From 4bdb5a7f35460f1c39378e19c78a05bb7a9da82b Mon Sep 17 00:00:00 2001 From: puhanshu <a9236326> Date: 星期三, 19 一月 2022 14:28:34 +0800 Subject: [PATCH] 实有人口导入修改 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml | 14 +++++++------- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java | 8 ++++++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java index 7b7121a..468f3b1 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java @@ -4479,6 +4479,10 @@ private ComMngPopulationDO updatePopulationDO(ComMngPopulationServeExcelVO vo, ComMngPopulationDO populationDO, Long communityId, Long userId) { BeanUtils.copyProperties(vo, populationDO); + Integer personType = vo.getPersonType(); + if (nonNull(personType)) { + populationDO.setPersonType(personType.toString()); + } // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> // userTagStr.split("\\(")[0]).collect(Collectors.toList()); // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除 @@ -5010,6 +5014,10 @@ ComMngVillageDO comMngVillageDO, Long userId) { ComMngPopulationDO populationDO = new ComMngPopulationDO(); BeanUtils.copyProperties(vo, populationDO); + Integer personType = vo.getPersonType(); + if (nonNull(personType)) { + populationDO.setPersonType(personType.toString()); + } populationDO.setId(Snowflake.getId()); // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> // userTagStr.split("\\(")[0]).collect(Collectors.toList()); diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml index c238de5..7c5c011 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml @@ -1185,13 +1185,13 @@ (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','低保户','%')) as lowSecurityTotal , (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','高龄老人','%')) as elderTotal , (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','养老金人员','%')) as pensionTotal, - (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 1) AS houseRegTotal, - (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 2) AS leftTotal, - (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 3) AS outOfTownTotal, - (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 4) AS overseasTotal, - (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 5) AS floatingTotal, - (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 6) AS permanentTotal, - (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 7) AS temporaryTotal + (select count(cmpct.id) from com_mng_population_community_tags cmpct INNER JOIN com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 1) AS houseRegTotal, + (select count(cmpct.id) from com_mng_population_community_tags cmpct INNER JOIN com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 2) AS leftTotal, + (select count(cmpct.id) from com_mng_population_community_tags cmpct INNER JOIN com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 3) AS outOfTownTotal, + (select count(cmpct.id) from com_mng_population_community_tags cmpct INNER JOIN com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 4) AS overseasTotal, + (select count(cmpct.id) from com_mng_population_community_tags cmpct INNER JOIN com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 5) AS floatingTotal, + (select count(cmpct.id) from com_mng_population_community_tags cmpct INNER JOIN com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 6) AS permanentTotal, + (select count(cmpct.id) from com_mng_population_community_tags cmpct INNER JOIN com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 7) AS temporaryTotal from com_mng_population_community_tags as cmpct inner join com_mng_population as cmp on cmp.id = cmpct.population_id where community_id = ${communityId} </select> </mapper> -- Gitblit v1.7.1