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/ComActActivityVO.java
@@ -285,4 +285,8 @@ private Integer signCount; private Integer registerCount; private Integer isArticle; private String jumpArticleUrl; } 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/common/src/main/java/com/panzhihua/common/utlis/AssemblyUtils.java
@@ -33,7 +33,7 @@ //构建单个用户数据 List<Object> userData = new ArrayList<>(); String noExport = "以上信息仅用于"; String noExport = "本人对信息内容"; //遍历答案列表 Long reserveRecordId = 0L; Long reserveSubId = 0L; 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/model/dos/ComActActivityDO.java
@@ -243,4 +243,8 @@ * 单次活动时长(小时) */ private Integer duration; private Integer isArticle; private String jumpArticleUrl; } 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/ComActReserveAnswerContentServiceImpl.java
@@ -69,6 +69,11 @@ //查询用户回答 List<ComActQuestnaireAnswerContentVO> vos = this.baseMapper.export(pageReserveRegisterDetailedAdminDTO); vos.forEach(vo->{ if(vo.getType()==4){ vo.setAnswerContent(vo.getAnswerContent().replaceAll("(?<=\\w{3})\\w(?=\\w{4})", "*")); } }); result.setAnswers(vos); return R.ok(result); @@ -104,6 +109,9 @@ List<ComActReserveRegisterDetailedAnswerVO> registerDetailedAnswerList = this.baseMapper.getRegisterDetailedAnswerList(registerDetailed.getId()); if(!registerDetailedAnswerList.isEmpty()){ for (ComActReserveRegisterDetailedAnswerVO detailed:registerDetailedAnswerList) { if(detailed.getType()==4){ detailed.setAnswerContent(detailed.getAnswerContent().replaceAll("(?<=\\w{3})\\w(?=\\w{4})", "*")); } if(!detailed.getType().equals(5)){ if(detailed.getType().equals(1)){ String key = detailed.getReserveSubId() + ""; @@ -118,6 +126,7 @@ map.put(detailed.getReserveSubId() + "",detailed.getAnswerContent()); } } } } //渲染登记流水号 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveRecordServiceImpl.java
@@ -327,9 +327,19 @@ registerDetailedVO.setIdentity(identity.substring(0,identity.length()-1)); //查询答题数据 List<ComActReserveRegisterDetailedAnswerVO> answerList = comActReserveAnswerContentMapper.getRegisterDetailedAnswerList(reserveRecordId); answerList.forEach(answer ->{ if(answer.getType()==4){ answer.setAnswerContent(answer.getAnswerContent().replaceAll("(?<=\\w{3})\\w(?=\\w{4})", "*")); } }); registerDetailedVO.setAnswerList(answerList); } 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> @@ -151,7 +154,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> ) order by ac.reserve_record_id DESC,ac.id ASC @@ -210,4 +216,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>