springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/Constants.java
@@ -144,4 +144,6 @@ public static final String GRID_DEFAULT_ROLE_KEY="grid_member_default_role"; public static final String ZONG_ZHI_GRID_MEMBER_IMAGE_URL = "https://www.psciio.com//idcard/57bf4104a76741cfabfead0bb8218307.jpg"; public static final String ZZ_APP_TAG_LIST = "{\"list\":[\"流动人口\",\"户籍人口\",\"社区矫正\",\"吸毒人员\",\"重精患者\",\"刑满释放\"]}"; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/work/ScreenActActivityPeopleListDTO.java
@@ -20,4 +20,13 @@ @NotNull(message = "活动id不可为空") private Long activityId; @ApiModelProperty(value = "手机号") private String phone; @ApiModelProperty(value = "姓名") private String name; @ApiModelProperty(value = "身份证") private String cardNo; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventAddDTO.java
@@ -11,6 +11,7 @@ import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; import java.util.Date; import java.util.List; /** @@ -26,7 +27,7 @@ public class CommonEventAddDTO { @Max(127) @ApiModelProperty(value = "事件分类:1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件", hidden = false, example = "1", required = true) @ApiModelProperty(value = "事件分类:1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群上报", hidden = false, example = "1", required = true) @NotNull(message = "事件分类不能为空") private Integer eventType; @@ -113,4 +114,7 @@ @Length(max = 11) private String phone; @ApiModelProperty(value = "上报人口id列表,当事件类型为特殊人群上报时此字段不为空", hidden = false) private List<Long> populationIds; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventEditDTO.java
@@ -10,6 +10,7 @@ import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; import java.util.Date; import java.util.List; /** @@ -25,7 +26,7 @@ public class CommonEventEditDTO { @Max(127) @ApiModelProperty(value = "事件分类:1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件", hidden = false, example = "1", required = true) @ApiModelProperty(value = "事件分类:1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群上报", hidden = false, example = "1", required = true) @NotNull(message = "事件分类不能为空") private Integer eventType; @@ -114,4 +115,7 @@ @Length(max = 11) private String phone; @ApiModelProperty(value = "上报人口id列表,当事件类型为特殊人群上报时此字段不为空", hidden = false) private List<Long> populationIds; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventDTO.java
@@ -32,7 +32,7 @@ private Long gridId; @Max(127) @ApiModelProperty(value = "事件分类:1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件", hidden = false, example = "1", required = true) @ApiModelProperty(value = "事件分类:1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群上报", hidden = false, example = "1", required = true) @NotNull(message = "事件分类不能为空") private Integer eventType; @@ -93,6 +93,10 @@ @ApiModelProperty(value = "网格员名字", hidden = false, example = "") private String gridMemberName; @Length(max=100) @ApiModelProperty(value = "事件类型", hidden = false, example = "") private String eventClazz; @Length(max=20) @ApiModelProperty(value = "网格员联系方式", hidden = false, example = "") springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventSpecialPopulationDTO.java
New file @@ -0,0 +1,34 @@ package com.panzhihua.common.model.dtos.grid; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotNull; /** * 分页查询表单 * * @author cedoo email:cedoo(a)qq.com * @version 1.0 * @since 1.0 * @date 2021-05-26 * */ @Data @ApiModel("查询事件特殊人群请求参数") public class PageEventSpecialPopulationDTO { @ApiModelProperty(value = "分页-当前页数", example = "1") private Long pageNum = 1L; @ApiModelProperty(value = "分页-每页记录数", example = "10") private Long pageSize = 10L; @ApiModelProperty(value = "社区id", hidden = true, example = "2") private Long communityId; @ApiModelProperty(value = "关键词") private String keyWord; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PagePopulationListDTO.java
New file @@ -0,0 +1,39 @@ package com.panzhihua.common.model.dtos.grid; import com.google.common.base.CaseFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; /** * 分页查询表单 * * @author cedoo email:cedoo(a)qq.com * @version 1.0 * @since 1.0 * @date 2021-05-26 * */ @Data @ApiModel("查询事件请求参数") public class PagePopulationListDTO { @ApiModelProperty(value = "分页-当前页数", example = "1") private Long pageNum = 1L; @ApiModelProperty(value = "分页-每页记录数", example = "10") private Long pageSize = 10L; @ApiModelProperty(value = "关键字", example = "1") private String keyWord; @ApiModelProperty(value = "社区ID", hidden = true, example = "1") private Long communityId; @ApiModelProperty(value = "特殊人员标签") private String label; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventDetailsVO.java
@@ -195,6 +195,8 @@ @ApiModelProperty(value = "事件处理数据") private List<EventTransferRecordVO> trans; @ApiModelProperty(value = "特殊人群列表") private List<EventSpecialPopulationDetailsVO> populationList; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventSpecialPopulationDetailsVO.java
New file @@ -0,0 +1,50 @@ package com.panzhihua.common.model.vos.grid; import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * * @author cedoo email:cedoo(a)qq.com * @version 1.0 * @since 1.0 * @date 2021-05-26 * */ @Data @EncryptDecryptClass @ApiModel("特殊人群信息返回参数") public class EventSpecialPopulationDetailsVO { @ApiModelProperty(value = "id") private Long id; @ApiModelProperty(value = "姓名") private String name; @ApiModelProperty(value = "手机号") @EncryptDecryptField private String phone; @ApiModelProperty(value = "身份证号码") @EncryptDecryptField private String idCard; @ApiModelProperty(value = "标签") private String label; @ApiModelProperty(value = "居住地址") private String address; @ApiModelProperty(value = "民族") private String nation; @ApiModelProperty(value = "年龄") private Integer age; @ApiModelProperty(value = "政治面貌(1.中共党员2.中共预备党员3.共青团员4.民革党员5.民盟盟员6.民建会员7.8.农工党党员9.致公党党员10.九三学社社员11.台盟盟员12.无党派人士13.群众)") private Integer politicalOutlook; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventSpecialPopulationVO.java
New file @@ -0,0 +1,45 @@ package com.panzhihua.common.model.vos.grid; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("特殊人群上报-人口数据返回参数") @EncryptDecryptClass public class EventSpecialPopulationVO { @ApiModelProperty("实有人口id") @JsonSerialize(using = ToStringSerializer.class) private Long id; @ApiModelProperty("姓名") private String name; @ApiModelProperty("身份证号") @EncryptDecryptField private String idCard; @ApiModelProperty("人员标签") private String label; @ApiModelProperty("居住地址") private String address; @ApiModelProperty("政治面貌(1.中共党员2.中共预备党员3.共青团员4.民革党员5.民盟盟员6.民建会员7.8.农工党党员9.致公党党员10.九三学社社员11.台盟盟员12.无党派人士13.群众)") private Integer politicalOutlook; @ApiModelProperty("年龄") private Integer age; @ApiModelProperty("手机号") private String phone; @ApiModelProperty("性别(1.男 2.女 3.保密)") private Integer sex; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/PopulationDetailVO.java
New file @@ -0,0 +1,101 @@ package com.panzhihua.common.model.vos.grid; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * * @author cedoo email:cedoo(a)qq.com * @version 1.0 * @since 1.0 * @date 2021-05-26 * */ @Data @ApiModel("居民详情返回参数") @EncryptDecryptClass public class PopulationDetailVO { @ApiModelProperty(value = "主键ID") @JsonSerialize(using = ToStringSerializer.class) private Long id; @ApiModelProperty(value = "姓名") private String name; @ApiModelProperty(value = "手机号") @EncryptDecryptField private String phone; @ApiModelProperty(value = "身份证号码") @EncryptDecryptField private String cardNo; @ApiModelProperty(value = "标签") private String label; @ApiModelProperty(value = "居住地址") private String address; @ApiModelProperty(value = "民族") private String nation; @ApiModelProperty(value = "年龄") private Integer age; @ApiModelProperty(value = "政治面貌(1.中共党员2.中共预备党员3.共青团员4.民革党员5.民盟盟员6.民建会员7.8.农工党党员9.致公党党员10.九三学社社员11.台盟盟员12.无党派人士13.群众)") private Integer politicalOutlook; @ApiModelProperty(value = "性别(1.男 2.女)") private String sex; @ApiModelProperty(value = "出生年月") private String birthday; @ApiModelProperty(value = "籍贯") private String nativePlace; @ApiModelProperty(value = "婚姻状况") private String marriage; @ApiModelProperty(value = "文化程度") private String cultureLevel; @ApiModelProperty(value = "健康状况") private String healthy; @ApiModelProperty(value = "是否租住(0.否 1.是)") private Integer isRent; @ApiModelProperty("街路巷") private String road; @ApiModelProperty("门牌号") private String doorNo; @ApiModelProperty("楼排号") private String floor; @ApiModelProperty("单元号") private String unitNo; @ApiModelProperty("户室(房间号)") private String houseNo; @ApiModelProperty("工作单位") private String workCompany; @ApiModelProperty("户口所在地") private String censusRegister; @ApiModelProperty("外地or本地(1.本地 2.外地)") private Integer outOrLocal; @ApiModelProperty("备注") private String remark; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/PopulationListVO.java
New file @@ -0,0 +1,59 @@ package com.panzhihua.common.model.vos.grid; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; /** * * @author cedoo email:cedoo(a)qq.com * @version 1.0 * @since 1.0 * @date 2021-05-26 * */ @Data @ApiModel("居民列表返回参数") @EncryptDecryptClass public class PopulationListVO { @ApiModelProperty(value = "主键ID") @JsonSerialize(using = ToStringSerializer.class) private Long id; @ApiModelProperty(value = "姓名") private String name; @ApiModelProperty(value = "手机号") @EncryptDecryptField private String phone; @ApiModelProperty(value = "身份证号码") @EncryptDecryptField private String cardNo; @ApiModelProperty(value = "标签") private String label; @ApiModelProperty(value = "居住地址") private String address; @ApiModelProperty(value = "民族") private String nation; @ApiModelProperty(value = "年龄") private Integer age; @ApiModelProperty(value = "政治面貌(1.中共党员2.中共预备党员3.共青团员4.民革党员5.民盟盟员6.民建会员7.8.农工党党员9.致公党党员10.九三学社社员11.台盟盟员12.无党派人士13.群众)") private Integer politicalOutlook; @ApiModelProperty(value = "性别(1.男 2.女)") private String sex; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -17,6 +17,7 @@ import com.panzhihua.common.model.dtos.elders.ComEldersAuthGetResultDTO; import com.panzhihua.common.model.dtos.elders.ComEldersAuthPageDTO; import com.panzhihua.common.model.dtos.elders.ComEldersAuthUserAddAppDTO; import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; import com.panzhihua.common.model.dtos.neighbor.*; import com.panzhihua.common.model.dtos.neighbor.*; import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAdminDTO; @@ -3069,4 +3070,27 @@ @PostMapping("/screen/work/getScreenMicroList") R getScreenMicroList(@RequestBody ScreenMicroListDTO microListDTO); /** * 获取系统参数接口 * @param code 参数code * @return 系统参数 */ @GetMapping("/sys/conf/get") R getConf(@RequestParam("code") String code); /** * 根据社区id获取社区下人口数据信息 * @param populationListDTO 请求参数 * @return 人口数据 */ @PostMapping("/population/list/app") R getPopulationListByApp(@RequestBody PagePopulationListDTO populationListDTO); /** * 根据人口id获取人口详情 * @param populationId * @return */ @GetMapping("/population/detail/app") R getPopulationDetailByApp(@RequestParam("populationId") Long populationId); } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/grid/GridService.java
@@ -903,6 +903,14 @@ R getScreenEventList(@RequestBody ScreenEventListDTO eventListDTO); /** * 特殊人群上报-社区人口数据列表 * @param specialPopulationDTO 请求参数 * @return 社区人口数据列表 */ @PostMapping("/event/special/population/list") R specialPopulationList(@RequestBody PageEventSpecialPopulationDTO specialPopulationDTO); /** * description 根据本地网格ID,查询对于的浪潮市平台对应的ID * * @param id 本地网格ID springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ScreenWorkApi.java
@@ -194,8 +194,9 @@ @ApiOperation(value = "分页查询社区动态", response = ComActDynVO.class) @PostMapping("pagedynamic") public R pageDynamic(@RequestBody ComActDynVO comActDynVO) { Long communityId = this.getCommunityId(); comActDynVO.setCommunityId(communityId); if(comActDynVO.getCommunityId() == null){ return R.fail("参数错误"); } return communityService.pageDynamicByAdmin(comActDynVO); } springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/CommonApi.java
@@ -2,6 +2,7 @@ import com.panzhihua.common.constants.FtpConstants; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.service.community.CommunityService; import com.panzhihua.common.utlis.SFTPUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -45,6 +46,9 @@ private int port; @Value("${ftp.url}") private String url; @Resource private CommunityService communityService; /** * 允许的图片文件后缀 @@ -150,4 +154,10 @@ sftp.logout(); return R.ok(urlList); } @GetMapping("/getConf/noToken") @ApiOperation(value = "根据code查询系统配置") public R getConf(@RequestParam("code") String code){ return communityService.getConf(code); } } springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/CommonEventApi.java
@@ -39,7 +39,7 @@ if(eventType==null){ return false; } boolean inType = eventType==1 | eventType==2 |eventType==3| eventType==4| eventType==5; boolean inType = eventType==1 | eventType==2 |eventType==3| eventType==4| eventType==5| eventType==6; return inType; } springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/EventApi.java
@@ -7,6 +7,7 @@ import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComActVO; import com.panzhihua.common.model.vos.grid.EventGridDataAreaVO; import com.panzhihua.common.model.vos.grid.EventSpecialPopulationVO; import com.panzhihua.common.utlis.ClazzUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -126,4 +127,13 @@ return gridService.getNearByGrid(pageEventGridNearbyDTO); } @ApiOperation(value = "查询社区特殊人群列表", response = EventSpecialPopulationVO.class) @PostMapping("/special/population/list") public R specialPopulationList(@RequestBody PageEventSpecialPopulationDTO specialPopulationDTO){ LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); specialPopulationDTO.setCommunityId(loginUserInfoVO.getCommunityId()); return gridService.specialPopulationList(specialPopulationDTO); } } springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/PopulationApi.java
New file @@ -0,0 +1,48 @@ package com.panzhihua.grid_app.api; import com.panzhihua.common.controller.BaseController; import com.panzhihua.common.model.dtos.grid.PageEventGridNearbyDTO; import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; import com.panzhihua.common.model.vos.LoginUserInfoVO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.grid.EventGridDataAreaVO; import com.panzhihua.common.model.vos.grid.PopulationDetailVO; import com.panzhihua.common.model.vos.grid.PopulationListVO; import com.panzhihua.common.service.community.CommunityService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @Slf4j @RestController @RequestMapping("/population") @Api(tags = {"网格综治居民管理 @lyq"}) public class PopulationApi extends BaseController { @Resource private CommunityService communityService; @PostMapping("/list") @ApiOperation(value = "查询居民列表", response = PopulationListVO.class) public R list(@RequestBody PagePopulationListDTO populationListDTO){ LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); populationListDTO.setCommunityId(loginUserInfo.getCommunityId()); return communityService.getPopulationListByApp(populationListDTO); } @GetMapping("/detail") @ApiOperation(value = "查询居民详情", response = PopulationDetailVO.class) public R detail(@RequestParam("populationId") Long populationId){ if(populationId == null){ return R.fail("参数错误"); } return communityService.getPopulationDetailByApp(populationId); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/PopulationApi.java
New file @@ -0,0 +1,30 @@ package com.panzhihua.service_community.api; import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAppDTO; import com.panzhihua.common.model.vos.R; import com.panzhihua.service_community.service.ComMngPopulationService; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; @Slf4j @RestController @RequestMapping("/population/") public class PopulationApi { @Resource private ComMngPopulationService comMngPopulationService; @PostMapping("list/app") public R pagePopulationList(@RequestBody PagePopulationListDTO populationListDTO) { return comMngPopulationService.pagePopulationListApp(populationListDTO); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/SysConfApi.java
New file @@ -0,0 +1,30 @@ package com.panzhihua.service_community.api; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.panzhihua.common.constants.Constants; import com.panzhihua.common.model.vos.R; import com.panzhihua.service_community.model.dos.SysConfDO; import com.panzhihua.service_community.service.SysConfService; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @Slf4j @RestController @RequestMapping("/sys/conf/") public class SysConfApi { @Resource private SysConfService sysConfService; @GetMapping("get") public R get(@RequestParam("code") String code) { SysConfDO sysConfDO = sysConfService.getOne(new QueryWrapper<SysConfDO>().lambda().eq(SysConfDO::getCode,code)); String value = Constants.ZZ_APP_TAG_LIST; if(sysConfDO != null){ value = sysConfDO.getValue(); } return R.ok(value); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActSignDAO.java
@@ -59,7 +59,8 @@ "</script>") List<ActivitySignVO> listActivitySign(ActivitySignVO activitySignVO); @Select("SELECT " + @Select("<script> " + "SELECT " + " caas.user_id, " + " su.NAME, " + "CASE " + @@ -70,6 +71,16 @@ " caas.create_at " + "FROM " + " com_act_act_sign AS caas " + " LEFT JOIN sys_user AS su ON su.user_id = caas.user_id where caas.activity_id = #{activityPeopleListDTO.activityId}") " LEFT JOIN sys_user AS su ON su.user_id = caas.user_id where caas.activity_id = #{activityPeopleListDTO.activityId} " + "<if test='activityPeopleListDTO.phone != null and activityPeopleListDTO.phone != ""'>" + " and su.phone like concat (#{activityPeopleListDTO.phone},'%') "+ " </if> " + "<if test='activityPeopleListDTO.cardNo != null and activityPeopleListDTO.cardNo != ""'>" + " AND su.id_card = #{activityPeopleListDTO.cardNo} " + " </if> " + "<if test='activityPeopleListDTO.name != null and activityPeopleListDTO.name != ""'>" + " AND su.name like concat (#{activityPeopleListDTO.name},'%') "+ " </if> " + " </script>") IPage<ActActivityPeopleListVO> getActActivityPeopleList(Page page,@Param("activityPeopleListDTO") ScreenActActivityPeopleListDTO activityPeopleListDTO); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
@@ -311,7 +311,7 @@ " AND DATE_FORMAT(caa.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{actActivityListDTO.endTime} " + " </if> " + "<if test='actActivityListDTO.type!=null'>" + " AND caa.status = #{actActivityListDTO.status} " + " AND caa.type = #{actActivityListDTO.type} " + " </if> " + " </where> "+ "ORDER BY " + springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; import com.panzhihua.common.model.dtos.user.PageInputUserDTO; import com.panzhihua.common.model.vos.area.AreaAddressVO; import com.panzhihua.common.model.vos.community.ComActMessageVO; @@ -14,6 +15,7 @@ import com.panzhihua.common.model.vos.community.screen.event.*; import com.panzhihua.common.model.vos.community.screen.index.*; import com.panzhihua.common.model.vos.grid.EventGridDataVO; import com.panzhihua.common.model.vos.grid.PopulationListVO; import com.panzhihua.common.model.vos.user.*; import com.panzhihua.common.model.vos.community.PageComActMessageVO; import com.panzhihua.common.model.vos.user.ComHouseMemberVo; @@ -864,4 +866,16 @@ @Select("select count(id) from com_elders_auth_elderly WHERE community_id = #{communityId}") Integer getStatisticsCount(@Param("communityId") Long communityId); @Select("<script> " + "select cmp.id,cmp.`name`,cmp.phone,cmp.card_no,cmp.label,cmp.address,cmp.nation,cmp.political_outlook,cmp.sex from com_mng_population as cmp " + " where cmp.act_id = #{populationListDTO.communityId}" + "<if test='populationListDTO.keyWord != null and populationListDTO.keyWord != ""'>" + "AND (cmp.`name` like concat (#{populationListDTO.keyWord},'%') or cmp.card_no_str like concat (#{populationListDTO.keyWord},'%')) " + " </if> " + "<if test='populationListDTO.label != null and populationListDTO.label != ""'>" + "AND cmp.label like concat ('%',#{populationListDTO.label},'%') " + " </if> " + " </script>") IPage<PopulationListVO> pagePopulationListApp(Page page, @Param("populationListDTO") PagePopulationListDTO populationListDTO); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngPopulationDO.java
@@ -158,9 +158,9 @@ private String healthy; /** * 房屋地址 * 居住地址 */ // private String houseAddress; private String address; /** * 出生年月日 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngPopulationService.java
@@ -5,6 +5,7 @@ import com.panzhihua.common.model.dtos.community.ComMngPopulationTagCardNoDTO; import com.panzhihua.common.model.dtos.community.ComMngPopulationTagDTO; import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDetailDTO; import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; import com.panzhihua.common.model.dtos.user.PageInputUserDTO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComMngPopulationServeExcelVO; @@ -207,4 +208,6 @@ R getScreenGirds(Long communityId); R getScreenEventDetail(BigScreenEventDetailDTO eventDetailDTO); R pagePopulationListApp(PagePopulationListDTO populationListDTO); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/SysConfService.java
New file @@ -0,0 +1,13 @@ package com.panzhihua.service_community.service; import com.baomidou.mybatisplus.extension.service.IService; import com.panzhihua.service_community.model.dos.SysConfDO; /** * @auther lyq * @create 2021-06-23 10:41:36 * @describe 系统配置表服务类 */ public interface SysConfService extends IService<SysConfDO> { } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -1,5 +1,6 @@ package com.panzhihua.service_community.service.impl; import cn.hutool.core.util.IdcardUtil; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -14,6 +15,7 @@ import com.panzhihua.common.exceptions.ServiceException; import com.panzhihua.common.model.dtos.community.*; import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDetailDTO; import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; import com.panzhihua.common.model.dtos.user.PageInputUserDTO; import com.panzhihua.common.model.helper.AESUtil; import com.panzhihua.common.model.vos.R; @@ -27,6 +29,7 @@ import com.panzhihua.common.model.vos.community.screen.index.*; import com.panzhihua.common.model.vos.grid.EventGridDataVO; import com.panzhihua.common.model.vos.grid.EventResourceVO; import com.panzhihua.common.model.vos.grid.PopulationListVO; import com.panzhihua.common.model.vos.screen.ComActPopulationCultureVO; import com.panzhihua.common.model.vos.screen.ComActPopulationScreenVO; import com.panzhihua.common.model.vos.screen.ComMngPopulationAgeVO; @@ -1436,5 +1439,16 @@ return R.ok(statisticsVO); } @Override public R pagePopulationListApp(PagePopulationListDTO populationListDTO){ IPage<PopulationListVO> pagePopulationList = this.baseMapper.pagePopulationListApp(new Page(populationListDTO.getPageNum(),populationListDTO.getPageSize()),populationListDTO); if(!pagePopulationList.getRecords().isEmpty()){ pagePopulationList.getRecords().forEach(population -> { population.setAge(IdcardUtil.getAgeByIdCard(population.getCardNo())); }); } return R.ok(pagePopulationList); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/SysConfServiceImpl.java
New file @@ -0,0 +1,19 @@ package com.panzhihua.service_community.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.panzhihua.service_community.dao.SysConfMapper; import com.panzhihua.service_community.model.dos.SysConfDO; import com.panzhihua.service_community.service.SysConfService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; /** * @auther lyq * @create 2021-06-23 10:41:36 * @describe 系统配置表服务实现类 */ @Slf4j @Service public class SysConfServiceImpl extends ServiceImpl<SysConfMapper, SysConfDO> implements SysConfService { } springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EventApi.java
@@ -325,4 +325,13 @@ R reportDirect(@RequestBody CommonEventDirectReportDTO commonEventDirectReportDTO){ return eventService.reportDirect(commonEventDirectReportDTO); } /** * 特殊人群上报-社区人口数据列表 * @param specialPopulationDTO 请求参数 * @return 社区人口数据列表 */ @PostMapping("/special/population/list") public R specialPopulationList(@RequestBody PageEventSpecialPopulationDTO specialPopulationDTO){ return eventService.specialPopulationList(specialPopulationDTO); } } springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventMapper.java
@@ -108,4 +108,12 @@ */ IPage<EventListVO> getScreenEventList(Page page, @Param("eventListDTO") ScreenEventListDTO eventListDTO); /** * 特殊人群上报-社区人口数据列表 * @param specialPopulationDTO 请求参数 * @return 社区人口数据列表 */ IPage<EventSpecialPopulationVO> specialPopulationList(Page page, @Param("specialPopulationDTO") PageEventSpecialPopulationDTO specialPopulationDTO); } springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventSpecialCrowdRecordMapper.java
New file @@ -0,0 +1,26 @@ package com.panzhihua.service_grid.dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.panzhihua.common.model.vos.grid.EventSpecialPopulationDetailsVO; import com.panzhihua.service_grid.model.dos.EventSpecialCrowdRecordDO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; /** * @auther lyq * @create 2021-06-22 15:37:01 * @describe 事件-特殊人群上报人口关联表mapper类 */ @Mapper public interface EventSpecialCrowdRecordMapper extends BaseMapper<EventSpecialCrowdRecordDO> { /** * 根据事件id查询特殊人群人口数据 * @param eventId 事件id * @return 上报人群信息列表 */ List<EventSpecialPopulationDetailsVO> getSpecialPopulationIds(@Param("eventId")Long eventId); } springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/model/dos/EventSpecialCrowdRecordDO.java
New file @@ -0,0 +1,54 @@ package com.panzhihua.service_grid.model.dos; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import java.io.Serializable; import java.util.Date; /** * @auther lyq * @create 2021-06-22 15:37:01 * @describe 事件-特殊人群上报人口关联表实体类 */ @Data @TableName("event_special_crowd_record") public class EventSpecialCrowdRecordDO implements Serializable { private static final long serialVersionUID = 1L; /** * 主键id */ @TableId(type = IdType.AUTO) private Long id; /** * 事件id */ private Long eventId; /** * 实有人口id */ private Long populationId; /** * 创建时间 */ private Date createAt; @Override public String toString() { return "EventSpecialCrowdRecordDO{" + "id=" + id + ", eventId=" + eventId + ", populationId=" + populationId + ", createAt=" + createAt + "}"; } } springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventService.java
@@ -250,6 +250,13 @@ * @return 事件列表 */ R getScreenEventList(ScreenEventListDTO eventListDTO); /** * 特殊人群上报-社区人口数据列表 * @param specialPopulationDTO 请求参数 * @return 社区人口数据列表 */ R specialPopulationList(PageEventSpecialPopulationDTO specialPopulationDTO); /** * description 获取所有未上传到浪潮平台的事件列表 * springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventSpecialCrowdRecordService.java
New file @@ -0,0 +1,13 @@ package com.panzhihua.service_grid.service; import com.baomidou.mybatisplus.extension.service.IService; import com.panzhihua.service_grid.model.dos.EventSpecialCrowdRecordDO; /** * @auther lyq * @create 2021-06-22 15:37:01 * @describe 事件-特殊人群上报人口关联表服务类 */ public interface EventSpecialCrowdRecordService extends IService<EventSpecialCrowdRecordDO> { } springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java
@@ -1,5 +1,6 @@ package com.panzhihua.service_grid.service.impl; import cn.hutool.core.util.IdcardUtil; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -11,6 +12,7 @@ import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; import com.panzhihua.common.model.dtos.community.bigscreen.event.ScreenEventListDTO; import com.panzhihua.common.model.dtos.grid.*; import com.panzhihua.common.model.helper.AESUtil; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComActVO; import com.panzhihua.common.model.vos.community.screen.event.EventListVO; @@ -21,10 +23,7 @@ import com.panzhihua.common.utlis.StringUtils; import com.panzhihua.service_grid.dao.*; import com.panzhihua.service_grid.model.dos.*; import com.panzhihua.service_grid.service.EventGridDataService; import com.panzhihua.service_grid.service.EventResourceService; import com.panzhihua.service_grid.service.EventService; import com.panzhihua.service_grid.service.EventTransferRecordService; import com.panzhihua.service_grid.service.*; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.beans.BeanUtils; @@ -56,6 +55,10 @@ private EventGridDataMapper eventGridDataMapper; @Resource private EventGridMemberRelationMapper eventGridMemberRelationMapper; @Resource private EventSpecialCrowdRecordService eventSpecialCrowdRecordService; @Resource private EventSpecialCrowdRecordMapper eventSpecialCrowdRecordMapper; @Resource private EventGridDataService eventGridDataService; @Resource @@ -252,6 +255,16 @@ eventDetailsVO.setCreator(createUser.get("name") == null ? "" : createUser.get("name").toString()); } //当事件为特殊人群上报时,需要查询事件与人口关联关系 if(eventDetailsVO.getEventType().equals(6)){ List<EventSpecialPopulationDetailsVO> specialPopulationList = eventSpecialCrowdRecordMapper.getSpecialPopulationIds(eventDetailsVO.getId()); if(!specialPopulationList.isEmpty()){ specialPopulationList.forEach(special -> { special.setAge(IdcardUtil.getAgeByIdCard(special.getIdCard())); }); } eventDetailsVO.setPopulationList(specialPopulationList); } return R.ok(eventDetailsVO); } return R.fail("事件不存在"); @@ -272,6 +285,14 @@ if (eventGridDataDO == null) { return R.fail("网格不存在"); } //检查特殊人群上报时参数 if(commonEventAddDTO.getEventType().equals(6)){ if(commonEventAddDTO.getPopulationIds() == null || commonEventAddDTO.getPopulationIds().size() <= 0){ return R.fail("上报人员为空"); } } eventDO.setEventCategory(1l);//办件事件 eventDO.setEventStatus(2);//事件状态 2发布 eventDO.setProcessType(1);//网格员处理 @@ -283,6 +304,21 @@ eventDO.setSubmitDate(new Date()); eventDO.setOrderSn(getEventOrderSn(eventDO.getEventType())); if (eventMapper.insert(eventDO) == 1) { //如果是特殊人群,则新增特殊人群与事件关系 if(commonEventAddDTO.getEventType().equals(6)){ List<EventSpecialCrowdRecordDO> crowdRecordList = new ArrayList<>(); commonEventAddDTO.getPopulationIds().forEach(populationId -> { EventSpecialCrowdRecordDO specialCrowdRecordDO = new EventSpecialCrowdRecordDO(); specialCrowdRecordDO.setEventId(eventDO.getId()); specialCrowdRecordDO.setPopulationId(populationId); specialCrowdRecordDO.setCreateAt(new Date()); crowdRecordList.add(specialCrowdRecordDO); }); //添加特殊人群上报事件与人口关系 eventSpecialCrowdRecordService.saveBatch(crowdRecordList); } //添加音频 if (StringUtils.isNotEmpty(commonEventAddDTO.getAudio())) { EventResourceDO eventResourceDO = new EventResourceDO(); @@ -343,7 +379,15 @@ if (eventGridDataDO == null) { return R.fail("网格不存在"); } if (commonEventEditDTO.getId() == null) { //检查特殊人群上报时参数 if(commonEventEditDTO.getEventType().equals(6)){ if(commonEventEditDTO.getPopulationIds().isEmpty()){ return R.fail("上报人员为空"); } } EventDO eventDO = new EventDO(); BeanUtils.copyProperties(commonEventEditDTO, eventDO); eventDO.setGridMemberId(commonEventEditDTO.getUserId()); @@ -357,6 +401,21 @@ eventDO.setGridMemberTelephone(commonEventEditDTO.getPhone()); eventDO.setEventDealStatus(5); if (eventMapper.insert(eventDO) > 0) { //如果是特殊人群,则新增特殊人群与事件关系 if(commonEventEditDTO.getEventType().equals(6)){ List<EventSpecialCrowdRecordDO> crowdRecordList = new ArrayList<>(); commonEventEditDTO.getPopulationIds().forEach(populationId -> { EventSpecialCrowdRecordDO specialCrowdRecordDO = new EventSpecialCrowdRecordDO(); specialCrowdRecordDO.setEventId(eventDO.getId()); specialCrowdRecordDO.setPopulationId(populationId); specialCrowdRecordDO.setCreateAt(new Date()); crowdRecordList.add(specialCrowdRecordDO); }); //添加特殊人群上报事件与人口关系 eventSpecialCrowdRecordService.saveBatch(crowdRecordList); } //添加音频 if (StringUtils.isNotEmpty(commonEventEditDTO.getAudio())) { EventResourceDO eventResourceDO = new EventResourceDO(); @@ -2117,6 +2176,22 @@ return R.ok(eventPageList); } /** * 特殊人群上报-社区人口数据列表 * @param specialPopulationDTO 请求参数 * @return 社区人口数据列表 */ @Override public R specialPopulationList(PageEventSpecialPopulationDTO specialPopulationDTO) { IPage<EventSpecialPopulationVO> specialPopulationVOIPage = this.baseMapper.specialPopulationList(new Page(specialPopulationDTO.getPageNum(), specialPopulationDTO.getPageSize()), specialPopulationDTO); if(!specialPopulationVOIPage.getRecords().isEmpty()){ specialPopulationVOIPage.getRecords().forEach(specialPopulation -> { specialPopulation.setAge(IdcardUtil.getAgeByIdCard(specialPopulation.getIdCard())); }); } return R.ok(specialPopulationVOIPage); } @Override public List<EventDetailsVO> getUnUploadEvent() { List<EventDetailsVO> eventDetailsVOList =new ArrayList<>(); springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventSpecialCrowdRecordServiceImpl.java
New file @@ -0,0 +1,19 @@ package com.panzhihua.service_grid.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.panzhihua.service_grid.dao.EventSpecialCrowdRecordMapper; import com.panzhihua.service_grid.model.dos.EventSpecialCrowdRecordDO; import com.panzhihua.service_grid.service.EventSpecialCrowdRecordService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; /** * @auther lyq * @create 2021-06-22 15:37:01 * @describe 事件-特殊人群上报人口关联表服务实现类 */ @Slf4j @Service public class EventSpecialCrowdRecordServiceImpl extends ServiceImpl<EventSpecialCrowdRecordMapper, EventSpecialCrowdRecordDO> implements EventSpecialCrowdRecordService { } springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml
@@ -120,6 +120,9 @@ <if test="pageEventDTO.eventDes!=null"> AND event_des = #{pageEventDTO.eventDes} </if> <if test="pageEventDTO.eventClazz!=null"> AND event_clazz like concat(#{pageEventDTO.eventClazz},'%') </if> <if test="pageEventDTO.propagandaObject!=null"> AND propaganda_object = #{pageEventDTO.propagandaObject} </if> @@ -951,4 +954,30 @@ order by e.create_at desc </select> <select id="specialPopulationList" resultType="com.panzhihua.common.model.vos.grid.EventSpecialPopulationVO" parameterType="com.panzhihua.common.model.dtos.grid.PageEventSpecialPopulationDTO"> SELECT cmp.id, cmp.`name`, cmp.card_no as idCard, cmp.label, cmp.sex, cmp.phone, cmp.address, cmp.political_outlook FROM com_mng_population AS cmp <where> and cmp.label IS NOT NULL <if test='specialPopulationDTO.communityId != null'> and cmp.act_id = #{specialPopulationDTO.communityId} </if> <if test="specialPopulationDTO.keyWord!=null and specialPopulationDTO.keyWord!= """> AND (cmp.name like concat(#{specialPopulationDTO.keyWord},'%') or cmp.card_no_str like concat(#{specialPopulationDTO.keyWord},'%')) </if> </where> ORDER BY cmp.create_at DESC </select> </mapper> springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventSpecialCrowdRecordDOMapper.xml
New file @@ -0,0 +1,35 @@ <?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_grid.dao.EventSpecialCrowdRecordMapper"> <!-- 通用查询映射结果 --> <resultMap id="BaseResultMap" type="com.panzhihua.service_grid.model.dos.EventSpecialCrowdRecordDO"> <id column="id" property="id" /> <result column="event_id" property="eventId" /> <result column="population_id" property="populationId" /> <result column="create_at" property="createAt" /> </resultMap> <!-- 通用查询结果列 --> <sql id="Base_Column_List"> id, event_id, population_id, create_at </sql> <select id="getSpecialPopulationIds" resultType="com.panzhihua.common.model.vos.grid.EventSpecialPopulationDetailsVO" parameterType="Long"> SELECT escr.id, cmp.`name`, cmp.phone, cmp.card_no AS idCard, cmp.label, cmp.address, cmp.nation, cmp.political_outlook FROM event_special_crowd_record AS escr LEFT JOIN com_mng_population AS cmp ON cmp.id = escr.population_id WHERE escr.event_id = #{eventId} </select> </mapper>