From cdafc42ec5f04b23697ac1e7069f1e4689474947 Mon Sep 17 00:00:00 2001 From: 罗元桥 <2376770955@qq.com> Date: 星期三, 29 九月 2021 19:15:26 +0800 Subject: [PATCH] Merge branch 'test_bak' into 'master' --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java | 35 ++++++++++++++++++++++------------- 1 files changed, 22 insertions(+), 13 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java index c1e93c7..ac779a2 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java @@ -5,6 +5,8 @@ import java.util.Map; import com.panzhihua.common.model.dtos.community.CascadeHouseDTO; +import com.panzhihua.common.model.dtos.property.CommonPage; +import com.panzhihua.common.model.vos.community.ComMngPopulationDetailVO; import com.panzhihua.common.model.vos.community.VillageVO; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Mapper; @@ -143,18 +145,12 @@ IPage<ComMngPopulationVO> pagePopulation(Page page, @Param("comMngPopulationVO") ComMngPopulationDTO comMngPopulationVO); - @Select("<script> " - + "select cmp.id,cmv.`alley` as areaName,cmp.`name`,cmp.phone,cmp.label as tags,cmp.create_at from com_mng_population as cmp " - + "left join com_mng_village as cmv on cmv.village_id = cmp.village_id " - + "left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id " - + "where cmpct.community_id = #{pageInputUserDTO.communityId} and cmpct.label is not null " - + "<if test='pageInputUserDTO.name != null and pageInputUserDTO.name != ""'>" - + " AND cmp.`name` LIKE concat(#{pageInputUserDTO.name},'%') " + " </if> " - + "<if test='pageInputUserDTO.areaName != null and pageInputUserDTO.areaName != ""'>" - + " AND cmv.`alley` LIKE concat(#{pageInputUserDTO.areaName},'%') " + " </if> " - + "<if test='pageInputUserDTO.tags != null and pageInputUserDTO.tags != ""'>" - + " AND cmpct.label like concat('%',#{pageInputUserDTO.tags},'%') " + " </if> " - + " order by cmp.create_at desc " + "</script>") + /** + * 分页查询特殊群体列表 + * @param page 分页参数 + * @param pageInputUserDTO 请求参数 + * @return 特殊群体列表 + */ IPage<InputUserInfoVO> specialInputUser(Page page, @Param("pageInputUserDTO") PageInputUserDTO pageInputUserDTO); @Select("<script> " @@ -184,7 +180,7 @@ @Select("select count(cmpct.id) as populationTotal " + ",(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.out_or_local = 1) as localTotal " + ",(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.out_or_local = 2) as outTotal " - + ",(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 IFNULL(cmpct.label,'') != '') as specialTotal " + + ",(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 cmpct.label is not null) as specialTotal " + ",(select count(village_id) from com_mng_village where community_id = #{communityId}) as villageTotal " + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','吸毒人员','%')) as drugTotal " + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','社区矫正','%')) as correctTotal " @@ -693,4 +689,17 @@ * @return */ List<VillageVO> getSecondHouseAddress(Long communityId); + + /** + * 四长四员分页查询 + * @param page + * @param commonPage + * @return + */ + IPage<ComMngPopulationVO> query(Page page,@Param("commonPage") CommonPage commonPage); + + /** + * 居民详情 + */ + ComMngPopulationDetailVO getById(Long id); } -- Gitblit v1.7.1