springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/reserve/PageReserveRegisterDetailedAdminDTO.java
@@ -40,4 +40,7 @@ @ApiModelProperty(value = "省市区") private String area; @ApiModelProperty(value = "出发地") private String from; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/reserve/FiveCount.java
New file @@ -0,0 +1,15 @@ package com.panzhihua.common.model.vos.community.reserve; import lombok.Data; /** * @author zzj */ @Data public class FiveCount { private Integer allCount; private Integer dangerCount; private Integer redMark; private Integer yellowMark; private Integer greenMark; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -9505,4 +9505,7 @@ */ @PostMapping("/comActEasyPhotoHandler/edit") R editEasyPhotoHandler(@RequestBody EditComActEasyPhotoHandlerDto comActEasyPhotoHandler); @GetMapping("/reserve/fiveCount") R fiveCount(@RequestParam("reserveId") Long reserveId); } springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActReserveApi.java
@@ -1061,4 +1061,10 @@ public R deleteRecord(@RequestParam("recordId") Long recordId) { return communityService.deleteRecord(recordId); } @ApiOperation("5个常规查询") @GetMapping("/fiveCount") public R fiveCount(@RequestParam("reserveId") Long reserveId){ return communityService.fiveCount(reserveId); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActReserveApi.java
@@ -378,4 +378,9 @@ public R deleteRecord(@RequestParam("recordId")Long recordId){ return R.ok(comActReserveRecordService.removeById(recordId)); } @GetMapping("/fiveCount") public R fiveCount(@RequestParam("reserveId") Long reserveId){ return comActReserveRecordService.fiveCount(reserveId); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActReserveAnswerContentMapper.java
@@ -7,6 +7,7 @@ import com.panzhihua.common.model.vos.community.ComActQuestnaireAnswerContentVO; import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedAnswerVO; import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedVO; import com.panzhihua.common.model.vos.community.reserve.FiveCount; import com.panzhihua.common.model.vos.community.reserve.HomeQuarantineRegisterStatisticsVO; import com.panzhihua.service_community.model.dos.ComActReserveAnswerContentDO; import org.apache.ibatis.annotations.Mapper; @@ -68,4 +69,11 @@ * @return */ List<String> exportHomeQuarantine(@Param("detailedAdminDTO") PageReserveRegisterDetailedAdminDTO detailedAdminDTO); /** * 5个常规数据查询 * @param reserveId * @return */ FiveCount fiveCount(Long reserveId); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActReserveRecordService.java
@@ -82,4 +82,10 @@ R registerDetailedDetailAdmin(Long reserveRecordId); /** * 5个常规查询 * @param reserveId * @return */ R fiveCount(Long reserveId); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveRecordServiceImpl.java
@@ -332,4 +332,9 @@ return R.ok(registerDetailedVO); } @Override public R fiveCount(Long reserveId) { return R.ok(comActReserveAnswerContentMapper.fiveCount(reserveId)); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveAnswerContentMapper.xml
@@ -65,7 +65,10 @@ AND carr.json_object like concat ('%',#{detailedAdminDTO.keyword},'%') </if> <if test="detailedAdminDTO.area!=null and detailedAdminDTO.area != """> AND carr.json_object like concat ('%',#{detailedAdminDTO.area},'%') AND JSON_EXTRACT(json_object, '$[6].values') like concat ('%',#{detailedAdminDTO.area},'%') </if> <if test="detailedAdminDTO.from!=null and detailedAdminDTO.from != """> AND JSON_EXTRACT(json_object, '$[3].values') like concat ('%',#{detailedAdminDTO.from},'%') </if> group by carr.id order by carr.id desc </select> @@ -210,4 +213,20 @@ </if> GROUP BY answer_content ORDER BY id DESC </select> <select id="fiveCount" resultType="com.panzhihua.common.model.vos.community.reserve.FiveCount"> select ( select count(*) from com_act_reserve_record where reserve_id = #{reserveId} and JSON_EXTRACT(json_object, '$[9].values') = 0 ) redMark,( select count(*) from com_act_reserve_record where reserve_id = #{reserveId} and JSON_EXTRACT(json_object, '$[9].values') = 1 ) yellowMark,( select count(*) from com_act_reserve_record where reserve_id = #{reserveId} and JSON_EXTRACT(json_object, '$[9].values') = 2 ) greenMark,(select count(*) from com_act_reserve_record where reserve_id = #{reserveId} and JSON_EXTRACT(json_object, '$[10].values') = 0 ) dangerCount, ( select count(*) from com_act_reserve_record where reserve_id = #{reserveId}) allCount </select> </mapper>