diff --git a/src/main/java/com/cm/population/controller/route/populationinfo/PopulationInfoBigdataRouteController.java b/src/main/java/com/cm/population/controller/route/populationinfo/PopulationInfoBigdataRouteController.java index 9e3dec8..510d23a 100644 --- a/src/main/java/com/cm/population/controller/route/populationinfo/PopulationInfoBigdataRouteController.java +++ b/src/main/java/com/cm/population/controller/route/populationinfo/PopulationInfoBigdataRouteController.java @@ -3,7 +3,6 @@ package com.cm.population.controller.route.populationinfo; import com.cm.common.base.AbstractController; import com.cm.common.component.SecurityComponent; import com.cm.common.constants.ISystemConstant; -import com.cm.common.pojo.bos.UserInfoBO; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -11,10 +10,12 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.ModelAndView; +import java.util.HashMap; +import java.util.Map; /** * @ClassName: PopulationInfoController - * @Description: 基础人口信息 + * @Description: 基础人口信息按条件查看 * @Author: CodeFactory * @Date: 2023-10-24 11:55:46 * @Version: 3.0 @@ -27,6 +28,17 @@ public class PopulationInfoBigdataRouteController extends AbstractController { @Autowired protected SecurityComponent securityComponent; + static final Map organizationMap = new HashMap(); + static { + organizationMap.put("党员", "中国共产党党员"); + organizationMap.put("共青团员", "中国共产主义青年团团员"); + organizationMap.put("预备党员", "中国共产党预备党员"); + } + + /** + * 民族 + * @return + */ @GetMapping("nation") public ModelAndView nation(@RequestParam String nation) { ModelAndView mv = new ModelAndView("populationinfo/list-bigdata"); @@ -34,6 +46,32 @@ public class PopulationInfoBigdataRouteController extends AbstractController { return mv; } + /** + * 总人口 + * @return + */ + @GetMapping("total") + public ModelAndView total() { + ModelAndView mv = new ModelAndView("populationinfo/list-bigdata"); + mv.addObject("params", ""); + return mv; + } + + /** + * 高新区街道人口 + * @return + */ + @GetMapping("jiedao") + public ModelAndView jiedao(@RequestParam String name) { + ModelAndView mv = new ModelAndView("populationinfo/list-bigdata"); + mv.addObject("params", "jiedao=" + name); + return mv; + } + + /** + * 性别 + * @return + */ @GetMapping("sex") public ModelAndView sex(@RequestParam String sex) { ModelAndView mv = new ModelAndView("populationinfo/list-bigdata"); @@ -41,4 +79,85 @@ public class PopulationInfoBigdataRouteController extends AbstractController { return mv; } + /** + * 政治面貌 + * @return + */ + @GetMapping("organization") + public ModelAndView organization(@RequestParam String organization) { + ModelAndView mv = new ModelAndView("populationinfo/list-bigdata"); + mv.addObject("params", "organization=" + organizationMap.get(organization)); + return mv; + } + + /** + * 常住人口 + * @return + */ + @GetMapping("changzhu") + public ModelAndView changzhu() { + ModelAndView mv = new ModelAndView("populationinfo/list-bigdata"); + mv.addObject("params", "type=常住人口"); + return mv; + } + + /** + * 流动人口 + * @return + */ + @GetMapping("liudong") + public ModelAndView liudong() { + ModelAndView mv = new ModelAndView("populationinfo/list-bigdata"); + mv.addObject("params", "type=流动人口"); + return mv; + } + + /** + * 宗教信仰 + * @param religion + * @return + */ + @GetMapping("religion") + public ModelAndView religion(@RequestParam String religion) { + ModelAndView mv = new ModelAndView("populationinfo/list-bigdata"); + mv.addObject("params", "religion=" + religion); + return mv; + } + + /** + * 信访管理类人员 + * @param name [name: 矛盾纠纷 / 涉邪人员 / 吸毒人员 / 社会治安 / 重点上访] + * @return + */ + @GetMapping("xinfang") + public ModelAndView xinfang(@RequestParam String name) { + ModelAndView mv = new ModelAndView("populationinfo/list-bigdata"); + mv.addObject("params", "xinfang=" + name); + return mv; + } + + /** + * 社会保障类人员 + * @param name [name: 老年人 / 残疾人 / (退役/服役) / 社会救助信息] + * @return + */ + @GetMapping("baozhang") + public ModelAndView baozhang(@RequestParam String name) { + ModelAndView mv = new ModelAndView("populationinfo/list-bigdata"); + mv.addObject("params", "baozhang=" + name); + return mv; + } + + /** + * 特殊人员 + * @param name [name: 社区矫正 / 刑满释放] + * @return + */ + @GetMapping("teshu") + public ModelAndView teshu(@RequestParam String name) { + ModelAndView mv = new ModelAndView("populationinfo/list-bigdata"); + mv.addObject("params", "teshu=" + name); + return mv; + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/dao/areatree/IAreatreeDao.java b/src/main/java/com/cm/population/dao/areatree/IAreatreeDao.java index 77820ce..0dab315 100644 --- a/src/main/java/com/cm/population/dao/areatree/IAreatreeDao.java +++ b/src/main/java/com/cm/population/dao/areatree/IAreatreeDao.java @@ -3,6 +3,7 @@ package com.cm.population.dao.areatree; import com.cm.common.exception.SearchException; import com.cm.common.plugin.pojo.dtos.dataarea.DataAreaDTO; import com.cm.population.pojo.dtos.areatree.AreaZtreeDTO; +import com.cm.population.pojo.dtos.populationinfo.PopulationInfoAreaDTO; import org.springframework.stereotype.Repository; import java.util.List; @@ -22,4 +23,5 @@ public interface IAreatreeDao { List listCache(Map params); AreaZtreeDTO getAreaByAreaId(Map params); + } diff --git a/src/main/java/com/cm/population/dao/populationinfo/IPopulationInfoDao.java b/src/main/java/com/cm/population/dao/populationinfo/IPopulationInfoDao.java index 062df2b..a29bc8f 100644 --- a/src/main/java/com/cm/population/dao/populationinfo/IPopulationInfoDao.java +++ b/src/main/java/com/cm/population/dao/populationinfo/IPopulationInfoDao.java @@ -5,6 +5,7 @@ import com.cm.common.exception.SaveException; import com.cm.common.exception.SearchException; import com.cm.common.exception.UpdateException; import com.cm.population.pojo.bos.populationinfo.PopulationInfoBO; +import com.cm.population.pojo.dtos.populationinfo.PopulationInfoAreaDTO; import com.cm.population.pojo.dtos.populationinfo.PopulationInfoBaseDTO; import com.cm.population.pojo.pos.populationinfo.PopulationInfoPO; import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO; @@ -120,4 +121,6 @@ public interface IPopulationInfoDao { PopulationInfoBaseDTO getBase(Map params); void updateCreator(Map params); + + PopulationInfoAreaDTO getCreatorArea(String creator); } \ No newline at end of file diff --git a/src/main/java/com/cm/population/pojo/dtos/populationinfo/PopulationInfoBaseDTO.java b/src/main/java/com/cm/population/pojo/dtos/populationinfo/PopulationInfoBaseDTO.java index 1408dc1..db1c37b 100644 --- a/src/main/java/com/cm/population/pojo/dtos/populationinfo/PopulationInfoBaseDTO.java +++ b/src/main/java/com/cm/population/pojo/dtos/populationinfo/PopulationInfoBaseDTO.java @@ -69,6 +69,16 @@ public class PopulationInfoBaseDTO { private Integer age; @ApiModelProperty(name = "创建人", value = "创建人") private String creator; + @ApiModelProperty(name = "创建人所在街道名称", value = "创建人所在街道名称") + private String creatorArea1; + + public String getCreatorArea1() { + return creatorArea1; + } + + public void setCreatorArea1(String creatorArea1) { + this.creatorArea1 = creatorArea1; + } public List getLabelList() { return labelList == null ? new ArrayList<>() : labelList; diff --git a/src/main/java/com/cm/population/pojo/dtos/populationinfo/PopulationInfoDTO.java b/src/main/java/com/cm/population/pojo/dtos/populationinfo/PopulationInfoDTO.java index a3aed69..04ee251 100644 --- a/src/main/java/com/cm/population/pojo/dtos/populationinfo/PopulationInfoDTO.java +++ b/src/main/java/com/cm/population/pojo/dtos/populationinfo/PopulationInfoDTO.java @@ -179,6 +179,8 @@ public class PopulationInfoDTO { private String creator; @ApiModelProperty(name = "创建人姓名", value = "创建人姓名") private String creatorName; + @ApiModelProperty(name = "创建人所在街道名称", value = "创建人所在街道名称") + private String creatorArea1; public String getCreatorName() { return creatorName; diff --git a/src/main/java/com/cm/population/service/populationinfo/IPopulationInfoService.java b/src/main/java/com/cm/population/service/populationinfo/IPopulationInfoService.java index 02662f4..97d6d48 100644 --- a/src/main/java/com/cm/population/service/populationinfo/IPopulationInfoService.java +++ b/src/main/java/com/cm/population/service/populationinfo/IPopulationInfoService.java @@ -6,6 +6,7 @@ import com.cm.common.result.SuccessResultData; import com.cm.common.result.SuccessResultList; import com.cm.population.pojo.dtos.areatree.AreaZtreeDTO; import com.cm.population.pojo.dtos.population.PopulationDTO; +import com.cm.population.pojo.dtos.populationinfo.PopulationInfoAreaDTO; import com.cm.population.pojo.dtos.populationinfo.PopulationInfoBaseDTO; import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO; import com.cm.population.pojo.vos.populationinfo.PopulationInfoVO; @@ -23,6 +24,8 @@ import java.util.Map; **/ public interface IPopulationInfoService { + PopulationInfoAreaDTO getCreatorArea(String creator); + public List getAreaList(); void getTuoMin(PopulationInfoDTO dto); void getTuoMin(PopulationInfoBaseDTO dto); diff --git a/src/main/java/com/cm/population/service/populationinfo/impl/PopulationInfoServiceImpl.java b/src/main/java/com/cm/population/service/populationinfo/impl/PopulationInfoServiceImpl.java index daf6946..572a1bb 100644 --- a/src/main/java/com/cm/population/service/populationinfo/impl/PopulationInfoServiceImpl.java +++ b/src/main/java/com/cm/population/service/populationinfo/impl/PopulationInfoServiceImpl.java @@ -25,6 +25,7 @@ import com.cm.population.pojo.dtos.cult.CultDTO; import com.cm.population.pojo.dtos.dispute.DisputeDTO; import com.cm.population.pojo.dtos.drug.DrugDTO; import com.cm.population.pojo.dtos.petition.PetitionDTO; +import com.cm.population.pojo.dtos.populationinfo.PopulationInfoAreaDTO; import com.cm.population.pojo.dtos.populationinfo.PopulationInfoBaseDTO; import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO; import com.cm.population.pojo.dtos.populationinfo.PopulationInfoLabelDTO; @@ -92,6 +93,15 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul return iAreatreeDao.getAreaByAreaId(params); } + @Override + public PopulationInfoAreaDTO getCreatorArea(String creator) { + PopulationInfoAreaDTO dto = populationInfoDao.getCreatorArea(creator); + if (dto == null) { + return new PopulationInfoAreaDTO(); + } + return dto; + } + @Override public List getAreaList() { Map params = new HashMap<>(); @@ -327,6 +337,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul }else{ setSaveInfo(token, params); } + params.put("creatorArea1", getCreatorArea(params.get("creator").toString()).getAreaName()); populationInfoDao.save(params); if (projectProperties.getPopulationInsertLog()) iPopulationLogService.saveInit(token, populationInfoId, params);// 记录日志 @@ -407,6 +418,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul }else{ setUpdateInfo(token, params); } + params.put("creatorArea1", getCreatorArea(params.get("modifier").toString()).getAreaName()); PopulationInfoDTO populationInfoDTO = get(populationInfoId); populationInfoDao.update(params); /** @@ -578,6 +590,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul Map params = getHashMap(2); params.put("populationInfoId", populationInfoId); params.put("creator", creator); + params.put("creatorArea1", getCreatorArea(creator).getAreaName()); populationInfoDao.updateCreator(params); } diff --git a/src/main/resources/mybatis/mapper/populationinfo/population-info-mapper.xml b/src/main/resources/mybatis/mapper/populationinfo/population-info-mapper.xml index 371aaad..3825e51 100644 --- a/src/main/resources/mybatis/mapper/populationinfo/population-info-mapper.xml +++ b/src/main/resources/mybatis/mapper/populationinfo/population-info-mapper.xml @@ -2,6 +2,11 @@ + + + + + @@ -19,6 +24,7 @@ + @@ -99,6 +105,7 @@ + @@ -239,6 +246,16 @@ + + INSERT INTO population_population_info( @@ -317,6 +334,7 @@ party_organization, party_time, othertext, + creator_area1, creator, gmt_create, modifier, @@ -398,6 +416,7 @@ #{partyOrganization}, #{partyTime}, #{othertext}, + #{creatorArea1}, #{creator}, #{gmtCreate}, #{modifier}, @@ -410,7 +429,8 @@ UPDATE population_population_info SET - creator = #{creator} + creator = #{creator}, + creator_area1 = #{creatorArea1} WHERE population_info_id = #{populationInfoId} @@ -658,6 +678,9 @@ othertext = #{othertext}, + + creator_area1 = #{creatorArea1}, + modifier = #{modifier}, gmt_modified = #{gmtModified}, population_info_id = population_info_id @@ -683,7 +706,8 @@ t1.is_military, t1.is_succour, t1.is_party, - t1.creator + t1.creator, + t1.creator_area1 FROM population_population_info t1 WHERE @@ -777,7 +801,8 @@ t1.party_time, t1.othertext, t1.population_info_id, - t1.creator + t1.creator, + t1.creator_area1 FROM population_population_info t1 WHERE @@ -1028,7 +1053,8 @@ t1.party_organization, t1.party_time, t1.othertext, - t1.creator + t1.creator, + t1.creator_area1 FROM population_population_info t1 WHERE @@ -1051,6 +1077,57 @@ AND t1.sex = #{sex} + + AND t1.organization = #{organization} + + + AND ( t1.organization != '中国共产党党员' AND t1.organization != '中国共产主义青年团团员' AND t1.organization != '中国共产党预备党员') + + + AND (t1.flow_time = '' OR t1.flow_time IS NULL) + + + AND t1.flow_time != '' AND t1.flow_time IS NOT NULL + + + AND t1.religion = #{religion} + + + AND EXISTS (SELECT 1 FROM population_dispute temp WHERE temp.is_delete = 0 AND temp.party_population_info_id = t1.population_info_id) + + + AND EXISTS (SELECT 1 FROM population_cult temp WHERE temp.is_delete = 0 AND temp.population_info_id = t1.population_info_id) + + + AND EXISTS (SELECT 1 FROM population_drug temp WHERE temp.is_delete = 0 AND temp.population_info_id = t1.population_info_id) + + + AND EXISTS (SELECT 1 FROM population_security temp WHERE temp.is_delete = 0 AND temp.population_info_id = t1.population_info_id) + + + AND EXISTS (SELECT 1 FROM population_petition temp WHERE temp.is_delete = 0 AND temp.population_info_id = t1.population_info_id) + + + AND is_oldage = '是' + + + AND is_disability = '是' + + + AND is_military = '是' + + + AND is_succour = '是' + + + AND EXISTS (SELECT 1 FROM population_correct temp WHERE temp.is_delete = 0 AND temp.population_info_id = t1.population_info_id) + + + AND EXISTS (SELECT 1 FROM population_release temp WHERE temp.is_delete = 0 AND temp.population_info_id = t1.population_info_id) + + + AND t1.creator_area1 = #{jiedao} + AND ( diff --git a/src/main/resources/templates/house/list.html b/src/main/resources/templates/house/list.html index 6d8c28c..9260445 100644 --- a/src/main/resources/templates/house/list.html +++ b/src/main/resources/templates/house/list.html @@ -1983,7 +1983,7 @@ type: 2, title: false, closeBtn: 0, - area: ['70%', '100%'], + area: ['90%', '100%'], offset: 'r', shadeClose: true, anim: 2, @@ -2002,7 +2002,7 @@ type: 2, title: false, closeBtn: 0, - area: ['70%', '100%'], + area: ['90%', '100%'], offset: 'r', shadeClose: true, anim: 2, diff --git a/src/main/resources/templates/house/save.html b/src/main/resources/templates/house/save.html index 56c5cd1..241eb45 100644 --- a/src/main/resources/templates/house/save.html +++ b/src/main/resources/templates/house/save.html @@ -419,6 +419,7 @@
+
@@ -613,6 +614,19 @@ reloadCohabit(); }); + // 房屋人员人口查看 + $(document).on("click", ".view-population" , function () { + var populationInfoId = $(this).data("population"); + top.dialog.open({ + url: top.restAjax.path('pages/housepopulation/index.html#/population-info?populationInfoId=' + populationInfoId, []), + title: '个人信息卡片', + width: '80%', + height: '80%', + onClose: function() { + } + }); + }); + // 托管人搜索 function custodianSearch() { top.dialog.open({ diff --git a/src/main/resources/templates/house/update.html b/src/main/resources/templates/house/update.html index 816eb86..f5695ce 100644 --- a/src/main/resources/templates/house/update.html +++ b/src/main/resources/templates/house/update.html @@ -423,6 +423,7 @@ {{# } }} + @@ -863,6 +864,19 @@ reloadCohabit(); }); + // 房屋人员人口查看 + $(document).on("click", ".view-population" , function () { + var populationInfoId = $(this).data("population"); + top.dialog.open({ + url: top.restAjax.path('pages/housepopulation/index.html#/population-info?populationInfoId=' + populationInfoId, []), + title: '个人信息卡片', + width: '80%', + height: '80%', + onClose: function() { + } + }); + }); + // 初始化内容 function initData() { var loadLayerIndex; diff --git a/src/main/resources/templates/population/list.html b/src/main/resources/templates/population/list.html index e046162..9324d1a 100644 --- a/src/main/resources/templates/population/list.html +++ b/src/main/resources/templates/population/list.html @@ -37,6 +37,9 @@ + @@ -268,6 +271,21 @@ } }); } + } else if(layEvent === 'viewEvent') { + if(checkDatas.length === 0) { + top.dialog.msg(top.dataMessage.table.selectEdit); + } else if(checkDatas.length > 1) { + top.dialog.msg(top.dataMessage.table.selectOneEdit); + } else { + top.dialog.open({ + url: top.restAjax.path('pages/housepopulation/index.html#/population-info?populationInfoId={populationInfoId}', [checkDatas[0].populationId]), + title: '个人信息卡片', + width: '80%', + height: '80%', + onClose: function() { + } + }); + } } else if(layEvent === 'removeEvent') { if(checkDatas.length === 0) { top.dialog.msg(top.dataMessage.table.selectDelete); diff --git a/src/main/resources/templates/populationinfo/list-bigdata.html b/src/main/resources/templates/populationinfo/list-bigdata.html index 49de1c8..7c3f36a 100644 --- a/src/main/resources/templates/populationinfo/list-bigdata.html +++ b/src/main/resources/templates/populationinfo/list-bigdata.html @@ -44,7 +44,7 @@ @@ -301,16 +301,12 @@ } else if(checkDatas.length > 1) { top.dialog.msg(top.dataMessage.table.selectOneEdit); } else { - layer.open({ - type: 2, - title: false, - closeBtn: 0, - area: ['100%', '100%'], - shadeClose: true, - anim: 2, - content: top.restAjax.path('route/populationinfo/update?populationInfoId={populationInfoId}', [checkDatas[0].populationInfoId]), - end: function() { - reloadTable(); + top.dialog.open({ + url: top.restAjax.path('pages/housepopulation/index.html#/population-info?populationInfoId={populationInfoId}', [checkDatas[0].populationInfoId]), + title: '个人信息卡片', + width: '80%', + height: '80%', + onClose: function() { } }); } diff --git a/src/main/resources/templates/populationinfo/list-creator.html b/src/main/resources/templates/populationinfo/list-creator.html index 8174b2b..974489a 100644 --- a/src/main/resources/templates/populationinfo/list-creator.html +++ b/src/main/resources/templates/populationinfo/list-creator.html @@ -52,6 +52,9 @@ + @@ -528,6 +531,21 @@ } }); } + } else if(layEvent === 'showEvent') { + if(checkDatas.length === 0) { + top.dialog.msg(top.dataMessage.table.selectEdit); + } else if(checkDatas.length > 1) { + top.dialog.msg(top.dataMessage.table.selectOneEdit); + } else { + top.dialog.open({ + url: top.restAjax.path('pages/housepopulation/index.html#/population-info?populationInfoId={populationInfoId}', [checkDatas[0].populationInfoId]), + title: '个人信息卡片', + width: '80%', + height: '80%', + onClose: function() { + } + }); + } } }); }); diff --git a/src/main/resources/templates/populationinfo/list.html b/src/main/resources/templates/populationinfo/list.html index 4925357..b9d7a57 100644 --- a/src/main/resources/templates/populationinfo/list.html +++ b/src/main/resources/templates/populationinfo/list.html @@ -52,6 +52,9 @@ + @@ -76,6 +79,9 @@ + + + @@ -503,6 +509,33 @@ } }); } + } else if(layEvent === 'showEvent') { + if(checkDatas.length === 0) { + top.dialog.msg(top.dataMessage.table.selectEdit); + } else if(checkDatas.length > 1) { + top.dialog.msg(top.dataMessage.table.selectOneEdit); + } else { + top.dialog.open({ + url: top.restAjax.path('pages/housepopulation/index.html#/population-info?populationInfoId={populationInfoId}', [checkDatas[0].populationInfoId]), + title: '个人信息卡片', + width: '80%', + height: '80%', + onClose: function() { + } + }); + } + // top.layer.open({ + // type: 2, + // title: "调试", + // closeBtn: 1, + // area: ['95%', '95%'], + // shadeClose: true, + // anim: 2, + // content: top.restAjax.path('route/populationinfo-data/jiedao?name=万水泉镇', []), + // end: function() { + // reloadTable(); + // } + // }); } }); });