springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActAcidRecordApi.java
@@ -4,6 +4,7 @@ import com.panzhihua.common.controller.BaseController; import com.panzhihua.common.model.dtos.community.acid.ComActAcidRecordDTO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.acid.ComActAcidCharts; import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordTimeVO; import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordVO; import com.panzhihua.common.model.vos.community.reserve.FiveCount; @@ -86,6 +87,7 @@ @ApiOperation(value = "修改数据") @PostMapping("/update") public R update(@RequestBody ComActAcidRecordVO comActAcidRecordVO) { comActAcidRecordVO.setUserId(this.getUserId()); return this.communityService.updateComActAcidRecord(comActAcidRecordVO); } @@ -98,6 +100,7 @@ @ApiOperation(value = "修改数据") @PostMapping("/updateApplets") public R updateApplets(@RequestBody ComActAcidRecordVO comActAcidRecordVO) { comActAcidRecordVO.setUserId(this.getUserId()); return this.communityService.updateApplets(comActAcidRecordVO); } /** @@ -121,4 +124,19 @@ public R fiveCountPlus(@RequestParam("date")String date,@RequestParam("localCity") String localCity){ return this.communityService.comActAcidRecordFiveCountPlus(date,localCity); } @ApiOperation(value = "新版查看详情",response = ComActAcidRecordVO.class) @GetMapping("/detailByApp") public R detailByApp(@RequestParam("id")Long id){ return this.communityService.detailByApp(id); } /** * 图标统计 * @return */ @ApiOperation(value = "图标统计",response = ComActAcidCharts.class) @GetMapping("charts") public R charts(@RequestParam("date")String date,@RequestParam("localCity")String localCity){ return this.communityService.charts(date,localCity); } } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/acid/ComActAcidRecordDTO.java
@@ -57,4 +57,6 @@ private String colorMark; @ApiModelProperty("行程码") private String travelCard; @ApiModelProperty("核查状态") private String checkStatus; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/acid/ComActAcidCharts.java
New file @@ -0,0 +1,22 @@ package com.panzhihua.common.model.vos.community.acid; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; /** * @author zzj */ @Data @ApiModel public class ComActAcidCharts { @ApiModelProperty("报备人数") private List<ComActAcidChartsVO> acidList; @ApiModelProperty("风险人数") private List<ComActAcidChartsVO> dangerList; @ApiModelProperty("处理情况") private List<ComActAcidChartsVO> checkList; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/acid/ComActAcidChartsVO.java
New file @@ -0,0 +1,23 @@ package com.panzhihua.common.model.vos.community.acid; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.math.BigDecimal; /** * @author zzj */ @Data @ApiModel public class ComActAcidChartsVO { @ApiModelProperty("名字") private String name; @ApiModelProperty("数量一") private Integer numOne; @ApiModelProperty("数量二") private Integer numTwo; @ApiModelProperty("百分比") private BigDecimal percent; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/acid/ComActAcidRecordVO.java
@@ -10,6 +10,7 @@ import java.io.Serializable; import java.util.Date; import java.util.List; /** @@ -169,6 +170,15 @@ @ApiModelProperty("行程信息") private String transportInfo; @ApiModelProperty("上一条id") private Long lastId; @ApiModelProperty("下一条id") private Long nextId; @ApiModelProperty("修改记录") private List<ComActAcidUpdateRecordVO> comActAcidUpdateRecordVOList; public interface type{ int zj=1; int tr=2; springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/acid/ComActAcidUpdateRecordVO.java
New file @@ -0,0 +1,56 @@ package com.panzhihua.common.model.vos.community.acid; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.Date; /** * (ComActAcidUpdateRecord)表实体类 * projectName 成都呐喊信息技术有限公司-智慧社区项目 * description: 相关功能 * * @author zzj * @since 2022-05-30 14:57:03 */ @Data @ApiModel("") public class ComActAcidUpdateRecordVO implements Serializable { private static final long serialVersionUID = -90587224071702612L; private Long id; /** * 记录id */ @ApiModelProperty(value = "记录id") private Long recordId; /** * 修改人 */ @ApiModelProperty(value = "修改人") private String name; /** * 修改时间 */ @ApiModelProperty(value = "修改时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date createTime; /** * 手机号 */ @ApiModelProperty(value = "手机号") private String phone; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -9650,6 +9650,9 @@ @GetMapping("/comActAcidRecord/detailByApp") R detailByApp(@RequestParam("id") Long id); @GetMapping("/comActAcidRecord/charts") R charts(@RequestParam("date")String date,@RequestParam("localCity")String localCity); @PostMapping("/comActAcidRecord/export") R exportComActAcidRecord(@RequestBody ComActAcidRecordDTO comActAcidRecordDTO); springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActAcidRecordApi.java
@@ -117,6 +117,7 @@ @ApiOperation(value = "修改数据") @PostMapping("/update") public R update(@RequestBody ComActAcidRecordVO comActAcidRecordVO) { comActAcidRecordVO.setUserId(this.getUserId()); return this.communityService.updateComActAcidRecord(comActAcidRecordVO); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActAcidRecordApi.java
@@ -77,7 +77,7 @@ */ @GetMapping("{id}") public R selectOne(@PathVariable("id") Long id) { return R.ok(this.comActAcidRecordService.getById(id)); return this.comActAcidRecordService.detailByCommunity(id); } /** @@ -110,7 +110,7 @@ */ @PostMapping("/updateApplets") public R updateApplets(@RequestBody ComActAcidRecordVO comActAcidRecordVO) { return this.comActAcidRecordService.updateLocalCity(comActAcidRecordVO); return this.comActAcidRecordService.updateApplets(comActAcidRecordVO); } @@ -143,8 +143,22 @@ return this.comActAcidRecordService.fiveCountPlus(date,localCity); } /** * 图标统计 * @return */ @GetMapping("charts") public R charts(@RequestParam("date")String date,@RequestParam("localCity")String localCity){ return this.comActAcidRecordService.charts(date,localCity); } @GetMapping("/statics") public R statics(@RequestParam("date")String date){ return this.comActAcidRecordService.statics(date); } @GetMapping("/detailByApp") public R detailByApp(@RequestParam("id")Long id){ return this.comActAcidRecordService.detailByApp(id); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActAcidRecordDao.java
@@ -83,4 +83,36 @@ * @return */ FiveCount pushStatics(@Param("date") String date,@Param("localCity") String localCity); /** * 查询上下一条id * @param id * @return */ ComActAcidRecordVO selectLastNext(Long id); /** * 查询区级填报人数 * @param date * @param localCity * @return */ ComActAcidChartsVO selectAcidCount(@Param("date") String date,@Param("localCity") String localCity); /** * 查询区级风险人员,未填住址人员人数 * @param date * @param localCity * @return */ ComActAcidChartsVO selectDangerCount(@Param("date") String date,@Param("localCity") String localCity); /** * 查询区级风险人员处理情况 * @param date * @param localCity * @return */ List<ComActAcidChartsVO> selectCheck(@Param("date") String date,@Param("localCity") String localCity); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActAcidUpdateRecordDao.java
New file @@ -0,0 +1,27 @@ package com.panzhihua.service_community.dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.panzhihua.common.model.vos.community.acid.ComActAcidUpdateRecordVO; import org.apache.ibatis.annotations.Mapper; import com.panzhihua.service_community.entity.ComActAcidUpdateRecord; import java.util.List; /** * (ComActAcidUpdateRecord)表数据库访问层 * projectName 成都呐喊信息技术有限公司-智慧社区项目 * description: 相关功能 * * @author zzj * @since 2022-05-30 14:57:04 */ @Mapper public interface ComActAcidUpdateRecordDao extends BaseMapper<ComActAcidUpdateRecord> { /** * 查询列表 * @param id * @return */ List<ComActAcidUpdateRecordVO> selectList(Long id); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComAreaTownCommunityDao.java
@@ -21,4 +21,11 @@ List<ComAreaCounty> selectArea(); List<ComAreaCounty> selectTown(String area); List<ComAreaCounty> selectCommunity(@Param("town") String town,@Param("area")String area); /** * 根据区域名称查询街道 * @param area * @return */ List<String> selectDistinctTown(String area); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActAcidUpdateRecord.java
New file @@ -0,0 +1,56 @@ package com.panzhihua.service_community.entity; import java.util.Date; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.Date; /** * (ComActAcidUpdateRecord)表实体类 * projectName 成都呐喊信息技术有限公司-智慧社区项目 * description: 相关功能 * * @author zzj * @since 2022-05-30 14:57:03 */ @Data @Builder @AllArgsConstructor @NoArgsConstructor @ApiModel("") public class ComActAcidUpdateRecord implements Serializable { private static final long serialVersionUID = -90587224071702612L; @TableId(type = IdType.AUTO) private Long id; /** * 记录id */ @ApiModelProperty(value = "记录id") private Long recordId; /** * 修改人id */ @ApiModelProperty(value = "修改人id") private Long userId; /** * 修改时间 */ @ApiModelProperty(value = "修改时间") private Date createTime; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActAcidRecordService.java
@@ -58,6 +58,12 @@ R fiveCountPlus(String date,String localCity); /** * 图标统计 * @return */ R charts(String date,String localCity); /** * 统计 * @return */ @@ -83,4 +89,18 @@ * @return */ R delete(Long id); /** * 小程序查看详情 * @param id * @return */ R detailByApp(Long id); /** * 后台查看详情 * @param id * @return */ R detailByCommunity(Long id); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActAcidRecordServiceImpl.java
@@ -1,5 +1,6 @@ package com.panzhihua.service_community.service.impl; import cn.hutool.core.util.ArrayUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; @@ -13,11 +14,10 @@ import com.panzhihua.common.service.user.UserService; import com.panzhihua.common.utlis.DateUtils; import com.panzhihua.common.utlis.StringUtils; import com.panzhihua.service_community.dao.ComActAcidDangerMemberDao; import com.panzhihua.service_community.dao.ComActDAO; import com.panzhihua.service_community.dao.*; import com.panzhihua.service_community.entity.ComActAcidDangerMember; import com.panzhihua.service_community.entity.ComActAcidRecord; import com.panzhihua.service_community.dao.ComActAcidRecordDao; import com.panzhihua.service_community.entity.ComActAcidUpdateRecord; import com.panzhihua.service_community.service.ComActAcidRecordService; import lombok.extern.slf4j.Slf4j; import org.springframework.amqp.rabbit.core.RabbitTemplate; @@ -26,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -54,6 +55,10 @@ private UserService userService; @Resource private ComActDAO comActDAO; @Resource private ComActAcidUpdateRecordDao comActAcidUpdateRecordDao; @Resource private ComAreaTownCommunityDao comAreaTownCommunityDao; @Override public R pageList(ComActAcidRecordDTO comActAcidRecordDTO) { @@ -240,6 +245,74 @@ } @Override public R charts(String date, String localCity) { if(StringUtils.isNotEmpty(localCity)){ ComActAcidCharts comActAcidCharts=new ComActAcidCharts(); List<ComActAcidChartsVO> acidList=new ArrayList<>(); List<ComActAcidChartsVO> dangerList=new ArrayList<>(); List<ComActAcidChartsVO> checkCount=new ArrayList<>(); String[] area={"东区","西区","仁和区","米易县","盐边县"}; if("panzhihua".equals(localCity)){ for(String areaValue:area){ ComActAcidChartsVO acid=new ComActAcidChartsVO(); acid.setName(areaValue); ComActAcidChartsVO acidCount =this.baseMapper.selectAcidCount(date,localCity); if(acidCount!=null){ acid.setNumOne(acidCount.getNumOne()); } acidList.add(acid); ComActAcidChartsVO danger=new ComActAcidChartsVO(); danger.setName(areaValue); ComActAcidChartsVO dangerCount =this.baseMapper.selectDangerCount(date,localCity); if(dangerCount!=null){ danger.setNumOne(dangerCount.getNumOne()); danger.setNumTwo(dangerCount.getNumTwo()); }else{ danger.setNumOne(0); danger.setNumTwo(0); } dangerList.add(danger); checkCount =this.baseMapper.selectCheck(date,localCity); if(checkCount!=null){ checkCount.forEach(comActAcidChartsVO -> { if(comActAcidChartsVO.getNumTwo()!=null){ comActAcidChartsVO.setPercent(new BigDecimal(comActAcidChartsVO.getNumOne()) .divide(new BigDecimal(comActAcidChartsVO.getNumTwo()), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(0)); } }); } } } if(ArrayUtil.contains(area,localCity)){ List<String> streets=comAreaTownCommunityDao.selectDistinctTown(localCity); streets.forEach(street ->{ ComActAcidChartsVO acid=new ComActAcidChartsVO(); acid.setName(street); ComActAcidChartsVO acidCount =this.baseMapper.selectAcidCount(date,street); if(acidCount!=null){ acid.setNumOne(acidCount.getNumOne()); } acidList.add(acid); ComActAcidChartsVO danger=new ComActAcidChartsVO(); danger.setName(street); ComActAcidChartsVO dangerCount =this.baseMapper.selectDangerCount(date,street); if(dangerCount!=null){ danger.setNumOne(dangerCount.getNumOne()); danger.setNumTwo(dangerCount.getNumTwo()); } dangerList.add(danger); }); } comActAcidCharts.setAcidList(acidList); comActAcidCharts.setDangerList(dangerList); comActAcidCharts.setCheckList(checkCount); return R.ok(comActAcidCharts); } return R.fail(); } @Override public R statics(String date) { List<ComAcidStaticVO> comAcidStaticVOS=new ArrayList<>(); String[] area={"攀枝花市","东区","西区","仁和区","米易县","盐边县","钒钛新城"}; @@ -263,6 +336,11 @@ @Override public R updateLocalCity(ComActAcidRecordVO comActAcidRecordVO) { ComActAcidUpdateRecord comActAcidUpdateRecord=new ComActAcidUpdateRecord(); comActAcidUpdateRecord.setRecordId(comActAcidRecordVO.getId()); comActAcidUpdateRecord.setUserId(comActAcidRecordVO.getUserId()); comActAcidUpdateRecord.setCreateTime(new Date()); comActAcidUpdateRecordDao.insert(comActAcidUpdateRecord); ComActAcidRecord comActAcidRecord = new ComActAcidRecord(); BeanUtils.copyProperties(comActAcidRecordVO, comActAcidRecord); String idCard = comActAcidRecordVO.getIdCard(); @@ -301,11 +379,17 @@ } else if (comActAcidDangerMember != null && comActAcidDangerMember.getType() == 2) { this.comActAcidDangerMemberDao.deleteById(comActAcidDangerMember.getId()); } return R.ok(this.baseMapper.updateById(comActAcidRecord)); } @Override public R updateApplets(ComActAcidRecordVO comActAcidRecordVO) { ComActAcidUpdateRecord comActAcidUpdateRecord=new ComActAcidUpdateRecord(); comActAcidUpdateRecord.setRecordId(comActAcidRecordVO.getId()); comActAcidUpdateRecord.setUserId(comActAcidRecordVO.getUserId()); comActAcidUpdateRecord.setCreateTime(new Date()); comActAcidUpdateRecordDao.insert(comActAcidUpdateRecord); ComActAcidRecord comActAcidRecord = new ComActAcidRecord(); BeanUtils.copyProperties(comActAcidRecordVO, comActAcidRecord); String idCard = comActAcidRecordVO.getIdCard(); @@ -372,4 +456,24 @@ }); return R.ok(); } @Override public R detailByApp(Long id) { ComActAcidRecord comActAcidRecord=this.baseMapper.selectById(id); ComActAcidRecordVO comActAcidRecordVO=this.baseMapper.selectLastNext(id); BeanUtils.copyProperties(comActAcidRecord,comActAcidRecordVO); return R.ok(comActAcidRecordVO); } @Override public R detailByCommunity(Long id) { ComActAcidRecordVO comActAcidRecordVO=new ComActAcidRecordVO(); ComActAcidRecord comActAcidRecord= this.baseMapper.selectById(id); BeanUtils.copyProperties(comActAcidRecord,comActAcidRecordVO); List<ComActAcidUpdateRecordVO> comActAcidUpdateRecordList=this.comActAcidUpdateRecordDao.selectList(id); if(!comActAcidUpdateRecordList.isEmpty()){ comActAcidRecordVO.setComActAcidUpdateRecordVOList(comActAcidUpdateRecordList); } return R.ok(comActAcidRecordVO); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAcidRecordMapper.xml
@@ -29,11 +29,15 @@ <if test="commonPage.userId !=null"> and user_id = #{commonPage.userId} </if> <if test="commonPage.checkStatus !=null and commonPage.checkStatus !=''"> and check_status = #{commonPage.checkStatus} </if> <if test="commonPage.keyword !=null and commonPage.keyword!=''"> and (name like concat('%',#{commonPage.keyword},'%') or phone like concat('%',#{commonPage.keyword},'%') or id_card like concat('%',#{commonPage.keyword},'%')) and (name like concat('%',#{commonPage.keyword},'%') or phone like concat('%',#{commonPage.keyword},'%') or id_card like concat('%',#{commonPage.keyword},'%')) </if> <if test="commonPage.startTime !=null and commonPage.startTime !=''"> and create_time between #{commonPage.startTime} and #{commonPage.stopTime} and create_time between #{commonPage.startTime} and #{commonPage.stopTime} </if> <if test="commonPage.isAddress !=null"> <if test="commonPage.isAddress == 0"> @@ -67,10 +71,11 @@ and t.user_id = #{commonPage.userId} </if> <if test="commonPage.keyword !=null and commonPage.keyword!=''"> and (t.name like concat('%',#{commonPage.keyword},'%') or t.phone like concat('%',#{commonPage.keyword},'%') or t.id_card like concat('%',#{commonPage.keyword},'%')) and (t.name like concat('%',#{commonPage.keyword},'%') or t.phone like concat('%',#{commonPage.keyword},'%') or t.id_card like concat('%',#{commonPage.keyword},'%')) </if> <if test="commonPage.startTime !=null and commonPage.startTime !=''"> and t.create_time between #{commonPage.startTime} and #{commonPage.stopTime} and t.create_time between #{commonPage.startTime} and #{commonPage.stopTime} </if> <if test="commonPage.isAddress !=null"> <if test="commonPage.isAddress == 0"> @@ -104,10 +109,11 @@ and t.user_id = #{commonPage.userId} </if> <if test="commonPage.keyword !=null and commonPage.keyword!=''"> and (t.name like concat('%',#{commonPage.keyword},'%') or t.phone like concat('%',#{commonPage.keyword},'%') or t.id_card like concat('%',#{commonPage.keyword},'%')) and (t.name like concat('%',#{commonPage.keyword},'%') or t.phone like concat('%',#{commonPage.keyword},'%') or t.id_card like concat('%',#{commonPage.keyword},'%')) </if> <if test="commonPage.startTime !=null and commonPage.startTime !=''"> and t.create_time between #{commonPage.startTime} and concat(#{commonPage.stopTime},' 23:59:59') and t.create_time between #{commonPage.startTime} and concat(#{commonPage.stopTime},' 23:59:59') </if> <if test="commonPage.isAddress !=null"> <if test="commonPage.isAddress == 0"> @@ -134,40 +140,191 @@ </select> <select id="fiveCount" resultType="com.panzhihua.common.model.vos.community.reserve.FiveCount"> select (select count(*) from com_act_acid_record where is_del=0 <if test="localCity!=null and localCity!=''"> and local_city like concat('%',#{localCity},'%')</if>) allCount, (select count(*) from com_act_acid_record where danger_area = '是' and is_del=0<if test="localCity!=null and localCity!=''"> and local_city like concat('%',#{localCity},'%')</if>) dangerCount, (select count(*) from com_act_acid_record where color_mark = '绿码' and is_del=0 <if test="localCity!=null and localCity!=''"> and local_city like concat('%',#{localCity},'%')</if>) greenMark, (select count(*) from com_act_acid_record where color_mark = '红码' and is_del=0<if test="localCity!=null and localCity!=''"> and local_city like concat('%',#{localCity},'%')</if>) redMark, (select count(*) from com_act_acid_record where color_mark = '黄码' and is_del=0<if test="localCity!=null and localCity!=''"> and local_city like concat('%',#{localCity},'%')</if>) yellowMark, (select count(*) from com_act_acid_record where travel_card = '是' and is_del=0<if test="localCity!=null and localCity!=''"> and local_city like concat('%',#{localCity},'%')</if>) travelCount select (select count(*) from com_act_acid_record where is_del=0 <if test="localCity!=null and localCity!=''">and local_city like concat('%',#{localCity},'%')</if>) allCount, (select count(*) from com_act_acid_record where danger_area = '是' and is_del=0<if test="localCity!=null and localCity!=''">and local_city like concat('%',#{localCity},'%')</if>) dangerCount, (select count(*) from com_act_acid_record where color_mark = '绿码' and is_del=0 <if test="localCity!=null and localCity!=''">and local_city like concat('%',#{localCity},'%')</if>) greenMark, (select count(*) from com_act_acid_record where color_mark = '红码' and is_del=0<if test="localCity!=null and localCity!=''">and local_city like concat('%',#{localCity},'%')</if>) redMark, (select count(*) from com_act_acid_record where color_mark = '黄码' and is_del=0<if test="localCity!=null and localCity!=''">and local_city like concat('%',#{localCity},'%')</if>) yellowMark, (select count(*) from com_act_acid_record where travel_card = '是' and is_del=0<if test="localCity!=null and localCity!=''">and local_city like concat('%',#{localCity},'%')</if>) travelCount </select> <select id="areaStatics" resultType="com.panzhihua.common.model.vos.community.acid.ComAcidStaticVO"> select (select count(*) from com_act_acid_record where is_del=0<if test="localCity!=null and localCity!='' and localCity!='攀枝花市'"> and local_city like concat('%',#{localCity},'%')</if> <if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) allCount, (select count(*) from com_act_acid_record where danger_area = '是' and is_del=0<if test="localCity!=null and localCity!='' and localCity!='攀枝花市'"> and local_city like concat('%',#{localCity},'%')</if> <if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) dangerCount, (select count(*) from com_act_acid_record where color_mark = '绿码' and is_del=0<if test="localCity!=null and localCity!='' and localCity!='攀枝花市'"> and local_city like concat('%',#{localCity},'%')</if><if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) greenMark, (select count(*) from com_act_acid_record where color_mark = '红码' and is_del=0<if test="localCity!=null and localCity!='' and localCity!='攀枝花市'"> and local_city like concat('%',#{localCity},'%')</if><if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) redMark, (select count(*) from com_act_acid_record where color_mark = '黄码' and is_del=0<if test="localCity!=null and localCity!='' and localCity!='攀枝花市'"> and local_city like concat('%',#{localCity},'%')</if><if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) yellowMark, (select count(*) from com_act_acid_record where travel_card = '是' and is_del=0<if test="localCity!=null and localCity!='' and localCity!='攀枝花市'"> and local_city like concat('%',#{localCity},'%')</if><if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) travelCount select (select count(*) from com_act_acid_record where is_del=0 <if test="localCity!=null and localCity!='' and localCity!='攀枝花市'">and local_city like concat('%',#{localCity},'%') </if> <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) allCount, (select count(*) from com_act_acid_record where danger_area = '是' and is_del=0 <if test="localCity!=null and localCity!='' and localCity!='攀枝花市'">and local_city like concat('%',#{localCity},'%') </if> <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) dangerCount, (select count(*) from com_act_acid_record where color_mark = '绿码' and is_del=0 <if test="localCity!=null and localCity!='' and localCity!='攀枝花市'">and local_city like concat('%',#{localCity},'%') </if> <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) greenMark, (select count(*) from com_act_acid_record where color_mark = '红码' and is_del=0 <if test="localCity!=null and localCity!='' and localCity!='攀枝花市'">and local_city like concat('%',#{localCity},'%') </if> <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) redMark, (select count(*) from com_act_acid_record where color_mark = '黄码' and is_del=0 <if test="localCity!=null and localCity!='' and localCity!='攀枝花市'">and local_city like concat('%',#{localCity},'%') </if> <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) yellowMark, (select count(*) from com_act_acid_record where travel_card = '是' and is_del=0 <if test="localCity!=null and localCity!='' and localCity!='攀枝花市'">and local_city like concat('%',#{localCity},'%') </if> <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) travelCount </select> <select id="countryStatics" resultType="Integer"> select count(*) from com_act_acid_record where is_del=0 and departure_city like concat('%',#{departureCity},'%') <if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity!='攀枝花市'"> and local_city like concat('%',#{localCity},'%')</if> select count(*) from com_act_acid_record where is_del=0 and departure_city like concat('%',#{departureCity},'%') <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') </if> <if test="localCity!=null and localCity!='' and localCity!='攀枝花市'">and local_city like concat('%',#{localCity},'%') </if> </select> <select id="fiveCountPlus" resultType="com.panzhihua.common.model.vos.community.reserve.FiveCount"> select (select count(*) from com_act_acid_record where 1=1 and is_del=0<if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and local_city like concat('%',#{localCity},'%')</if>) allCount, (select count(*) from com_act_acid_record where danger_area = '是' and is_del=0<if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and local_city like concat('%',#{localCity},'%')</if>) dangerCount, (select count(*) from com_act_acid_record where color_mark = '绿码' and is_del=0<if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and local_city like concat('%',#{localCity},'%')</if>) greenMark, (select count(*) from com_act_acid_record where color_mark = '红码' and is_del=0<if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and local_city like concat('%',#{localCity},'%')</if>) redMark, (select count(*) from com_act_acid_record where color_mark = '黄码' and is_del=0<if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and local_city like concat('%',#{localCity},'%')</if>) yellowMark, (select count(*) from com_act_acid_record where travel_card = '是' and is_del=0<if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and local_city like concat('%',#{localCity},'%')</if>) travelCount, (select count(*) from com_act_acid_record where outside_city = '是' and is_del=0<if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and local_city like concat('%',#{localCity},'%')</if>) outsideCount select (select count(*) from com_act_acid_record where 1=1 and is_del=0 <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') </if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like concat('%',#{localCity},'%')</if>) allCount, (select count(*) from com_act_acid_record where danger_area = '是' and is_del=0 <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') </if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like concat('%',#{localCity},'%')</if>) dangerCount, (select count(*) from com_act_acid_record where color_mark = '绿码' and is_del=0 <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') </if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like concat('%',#{localCity},'%')</if>) greenMark, (select count(*) from com_act_acid_record where color_mark = '红码' and is_del=0 <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') </if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like concat('%',#{localCity},'%')</if>) redMark, (select count(*) from com_act_acid_record where color_mark = '黄码' and is_del=0 <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') </if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like concat('%',#{localCity},'%')</if>) yellowMark, (select count(*) from com_act_acid_record where travel_card = '是' and is_del=0 <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') </if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like concat('%',#{localCity},'%')</if>) travelCount, (select count(*) from com_act_acid_record where outside_city = '是' and is_del=0 <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') </if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like concat('%',#{localCity},'%')</if>) outsideCount </select> <select id="pushStatics" resultType="com.panzhihua.common.model.vos.community.reserve.FiveCount"> select (select count(*) from com_act_acid_record where 1=1 and is_del=0<if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and local_city like concat('%',#{localCity},'%')</if>) allCount, (select count(*) from com_act_acid_danger_member t LEFT JOIN com_act_acid_danger_member t1 on t.record_id = t1.id where 1=1 and t.is_del=0<if test="date!=null and date!=''"> and t.create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and t1.local_city like concat('%',#{localCity},'%')</if>) dangerCount select (select count(*) from com_act_acid_record where 1=1 and is_del=0 <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') </if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like concat('%',#{localCity},'%')</if>) allCount, (select count(*) from com_act_acid_danger_member t LEFT JOIN com_act_acid_danger_member t1 on t.record_id = t1.id where 1=1 and t.is_del=0 <if test="date!=null and date!=''">and t.create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') </if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and t1.local_city like concat('%',#{localCity},'%')</if>) dangerCount </select> <select id="selectLastNext" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidRecordVO"> select(select min(id) from com_act_acid_record where id > #{id} and check_status = 0) next_id, (select max(id) as next_id from com_act_acid_record where #{id} > id and check_status = 0) last_id </select> <select id="selectAcidCount" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidChartsVO"> select count(*) as numOne from com_act_acid_record where 1=1 and is_del=0 <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') </if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like concat('%',#{localCity},'%') </if> </select> <select id="selectDangerCount" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidChartsVO"> select (select count(*) as numOne from com_act_acid_danger_member where type = 1 <if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') </if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and relation_name like concat('%',#{localCity},'%')</if>) numberOne, (select count(*) as numTwo from com_act_acid_danger_member where type = 2 <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') </if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and relation_name like concat('%',#{localCity},'%')</if>) numberTwo </select> <select id="selectCheck" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidChartsVO"> select (select count(id) from com_act_acid_danger_member where type=1 <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') </if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and relation_name like concat('%',#{localCity},'%')</if>) numTwo,count(id) numOne, case WHEN status = 1 THEN "集中隔离" WHEN status = 2 THEN "居家隔离" WHEN status = 3 THEN "健康监测" WHEN status = 4 THEN "失联或尚需追踪" WHEN status = 5 THEN "排除风险" WHEN status = 6 THEN "暂未管控" end name from com_act_acid_danger_member where type=1 <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') </if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and relation_name like concat('%',#{localCity},'%') </if> GROUP BY status </select> </mapper> springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAcidUpdateRecordMapper.xml
New file @@ -0,0 +1,17 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.panzhihua.service_community.dao.ComActAcidUpdateRecordDao"> <resultMap type="com.panzhihua.service_community.entity.ComActAcidUpdateRecord" id="ComActAcidUpdateRecordBaseResultMap"> <result property="id" column="id"/> <result property="recordId" column="record_id"/> <result property="userId" column="user_id"/> <result property="createTime" column="create_time"/> </resultMap> <select id="selectList" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidUpdateRecordVO"> select t.create_time,t1.phone,t1.name from com_act_acid_update_record t left join sys_user t1 on t.user_id = t1.user_id where t.record_id = #{id} order by t.create_time desc </select> </mapper> springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComAreaTownCommunityMapper.xml
@@ -22,4 +22,8 @@ select distinct community as value,community_id from com_area_town_community where town =#{town} <if test="area==null or area ==''"> and community !='学园社区'</if> </select> <select id="selectDistinctTown" resultType="String"> select distinct town from com_area_town_community where area=#{area} </select> </mapper>