From b500fcb5f25d0f1f0e31304fd1fa340e84360f3a Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期六, 22 五月 2021 10:56:41 +0800 Subject: [PATCH] 实有人口优化 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java | 8 ++++++++ 1 files changed, 8 insertions(+), 0 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 bbb6de0..9d8f013 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 @@ -7,6 +7,7 @@ import com.panzhihua.common.model.dtos.user.PageInputUserDTO; import com.panzhihua.common.model.vos.area.AreaAddressVO; import com.panzhihua.common.model.vos.community.ComActMessageVO; +import com.panzhihua.common.model.vos.community.ComMngPopulationTotalVO; import com.panzhihua.common.model.vos.community.ComMngPopulationVO; import com.panzhihua.common.model.vos.community.PageComActMessageVO; import com.panzhihua.common.model.vos.user.ComHouseMemberVo; @@ -223,4 +224,11 @@ "(select district_name from com_mng_struct_area_district where district_adcode = #{districtCode}) as district" + "</script>") AreaAddressVO getAreaAddress(@Param("provinceCode") String provinceCode,@Param("cityCode") String cityCode,@Param("districtCode") String districtCode); + + @Select("select count(id) as populationTotal " + + ",(select count(id) from com_mng_population where act_id = #{communityId} and out_or_local = 1) as localTotal " + + ",(select count(id) from com_mng_population where act_id = #{communityId} and out_or_local = 2) as outTotal " + + ",(select count(id) from com_mng_population where act_id = #{communityId} and label is null) as specialTotal " + + " from com_mng_population as cmp where act_id = #{communityId}") + ComMngPopulationTotalVO getPopulationTotalByAdmin(@Param("communityId") Long communityId); } -- Gitblit v1.7.1