From ffcd3e31c9938eb256d616c80edbe1821e9fb2bf Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期五, 02 七月 2021 16:15:34 +0800 Subject: [PATCH] 综治后台小区模块接口 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java | 73 ++++++++++++++++++++++++++++++++++++ 1 files changed, 73 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 3770ae8..6129e4a 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 @@ -6,7 +6,9 @@ import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; import com.panzhihua.common.model.dtos.grid.PageComMngPopulationDTO; import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; +import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationExportDTO; import com.panzhihua.common.model.dtos.grid.admin.ComMngPopulationListDTO; +import com.panzhihua.common.model.dtos.grid.admin.PageComMngVillagePopulationDTO; import com.panzhihua.common.model.dtos.user.PageInputUserDTO; import com.panzhihua.common.model.vos.area.AreaAddressVO; import com.panzhihua.common.model.vos.community.ComActMessageVO; @@ -21,6 +23,7 @@ import com.panzhihua.common.model.vos.grid.PopulationDetailVO; import com.panzhihua.common.model.vos.grid.PopulationListVO; import com.panzhihua.common.model.vos.grid.admin.ComMngPopulationListVO; +import com.panzhihua.common.model.vos.grid.admin.ComMngVillagePopulationListVO; import com.panzhihua.common.model.vos.grid.admin.PopulationStatisticsVO; import com.panzhihua.common.model.vos.user.*; import com.panzhihua.common.model.vos.community.PageComActMessageVO; @@ -1017,4 +1020,74 @@ " </script>") PopulationStatisticsVO getGridPopulationStatistics(@Param("communityId") Long communityId); + @Select("<script> " + + "SELECT " + + " * " + + "FROM " + + " ( " + + " SELECT " + + " cmp.id, " + + " cmp.`name` AS userName, " + + " cmp.label, " + + " cmp.card_no, " + + " cmp.card_no_str, " + + " cmp.sex, " + + " cmp.address, " + + " cmp.political_outlook, " + + " cmp.census_register, " + + " cmp.house_id, " + + " cmp.phone, " + + " IFNULL(cmp.house_id,0) as isHouse, " + + " ( SELECT event_status FROM event_visiting_tasks WHERE event_status in (1,2,3,5) AND visiter_id = cmp.id ORDER BY create_at DESC LIMIT 1 ) AS eventStatus, " + + " ( SELECT create_at FROM event_visiting_tasks WHERE event_status in (1,2,3,5) AND visiter_id = cmp.id ORDER BY create_at DESC LIMIT 1 ) AS createAt " + + " FROM " + + " com_mng_population AS cmp where 1=1 " + + "<if test='populationExportDTO.keyWord != null and populationExportDTO.keyWord != ""'>" + + "AND (cmp.name like concat (#{populationExportDTO.keyWord},'%') or cmp.card_no_str like concat (#{populationExportDTO.keyWord},'%') or cmp.address like concat (#{populationExportDTO.keyWord},'%')) " + + " </if> " + + "<if test='populationExportDTO.label != null and populationExportDTO.label != ""'>" + + "AND cmp.label like concat ('%',#{populationExportDTO.label},'%') " + + " </if> " + + "<if test='populationExportDTO.sex != null'>" + + "AND cmp.sex = #{populationExportDTO.sex} " + + " </if> " + + "<if test='populationExportDTO.isHouse != null and populationExportDTO.isHouse == 1'>" + + "AND cmp.house_id is not null " + + " </if> " + + "<if test='populationExportDTO.populationIds != null and populationExportDTO.populationIds.size > 0'>" + + "AND cmp.id in " + + "<foreach item='item' collection='populationExportDTO.populationIds' separator=',' open='(' close=')' index=''>" + + "#{item}" + + "</foreach>" + + " </if> " + + "<if test='populationExportDTO.isHouse != null and populationExportDTO.isHouse == 2'>" + + "AND cmp.house_id is null " + + " </if> " + + "<if test='populationExportDTO.communityId != null'>" + + "AND cmp.act_id = #{populationExportDTO.communityId} " + + " </if> " + + "<if test='populationExportDTO.politicalOutlook != null'>" + + "AND cmp.political_outlook = #{populationExportDTO.politicalOutlook} " + + " </if> " + + " ) as population where 1=1 " + + "<if test='populationExportDTO.eventStatus != null'>" + + "AND population.eventStatus = #{populationExportDTO.eventStatus} " + + " </if> " + + " </script>") + List<ComMngPopulationListVO> getGridPopulationAdminLists(@Param("populationExportDTO") ComMngPopulationExportDTO populationExportDTO); + + @Select("<script> " + + " select id,`name`,card_no,label from com_mng_population where 1=1 " + + "<if test='villagePopulationDTO.villageId != null'>" + + " and village_id = #{villagePopulationDTO.villageId} " + + " </if> " + + "<if test='villagePopulationDTO.keyWord != null'>" + + " AND (name like concat (#{villagePopulationDTO.keyWord},'%') or card_no_str like concat (#{villagePopulationDTO.keyWord},'%')) " + + " </if> " + + "<if test='villagePopulationDTO.label != null and villagePopulationDTO.label != ""'>" + + " AND label like concat ('%',#{villagePopulationDTO.label},'%') " + + " </if> " + + " </script>") + IPage<ComMngVillagePopulationListVO> getVillagePopulationAdmin(Page page,@Param("villagePopulationDTO") PageComMngVillagePopulationDTO villagePopulationDTO); + } -- Gitblit v1.7.1