| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | " </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); |
| | | |
| | | } |