| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PagePopulationListDTO; |
| | | 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.screen.event.*; |
| | | import com.panzhihua.common.model.vos.community.screen.index.*; |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataVO; |
| | | import com.panzhihua.common.model.vos.grid.PopulationDetailVO; |
| | | import com.panzhihua.common.model.vos.grid.PopulationListVO; |
| | | import com.panzhihua.common.model.vos.user.*; |
| | | import com.panzhihua.common.model.vos.community.PageComActMessageVO; |
| | | import com.panzhihua.common.model.vos.user.ComHouseMemberVo; |
| | |
| | | ",(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 not null) as specialTotal " + |
| | | ",(select count(village_id) from com_mng_village where community_id = #{communityId}) as villageTotal " + |
| | | " from com_mng_population as cmp where act_id = #{communityId}") |
| | | ComMngPopulationTotalVO getPopulationTotalByAdmin(@Param("communityId") Long communityId); |
| | | |
| | |
| | | " community_id = #{communityId}") |
| | | List<CivilVillageStatisticsVO> getCivilScreenVillageList(@Param("communityId") Long communityId); |
| | | |
| | | @Select("SELECT " + |
| | | " count( id ) AS peopleNum, " + |
| | | " ( SELECT count( id ) FROM com_mng_population_house AS cmph WHERE village_id = #{villageId} ) AS houseNum, " + |
| | | " ( SELECT count( id ) FROM com_mng_population WHERE village_id = #{villageId} AND out_or_local = 1 ) AS registerNum, " + |
| | | " ( SELECT count( id ) FROM com_mng_population WHERE village_id = #{villageId} AND out_or_local = 2 ) AS flowNum " + |
| | | "FROM " + |
| | | " com_mng_population AS cmp " + |
| | | "WHERE " + |
| | | " village_id = #{villageId}") |
| | | CivilVillageStatisticsVO getCivilScreenVillageStatistics(@Param("villageId") Long villageId); |
| | | |
| | | |
| | | @Select("SELECT COUNT(id) AS man,(SELECT COUNT(id) FROM com_mng_population WHERE sex = 2 AND act_id = #{communityId}) AS woman FROM com_mng_population WHERE sex = 1 AND act_id = #{communityId}") |
| | | Map<String, Long> countBySex(@Param("communityId") Long communityId); |
| | |
| | | " e.id = #{eventId}") |
| | | EventNewStatisticsVO getEventScreenEventDetail(@Param("eventId") Long eventId); |
| | | |
| | | @Select("select process_date,process_result from event_transfer_record where event_id = #{eventId}") |
| | | @Select("select process_date,process_result,process_type,from_type,from_id,from_name,event_id from event_transfer_record where event_id = #{eventId}") |
| | | List<EventTransferRecordVO> getEventScreenEventTransList(@Param("eventId") Long eventId); |
| | | |
| | | @Select("SELECT " + |
| | | " cs.address AS streetName, " + |
| | | " ca.`name` AS communityName, " + |
| | | " egd.grid_name " + |
| | | "FROM " + |
| | | " `event` AS e " + |
| | | " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id " + |
| | | " LEFT JOIN com_act AS ca ON egd.grid_community_id = ca.community_id " + |
| | | " LEFT JOIN com_street AS cs ON cs.street_id = ca.street_id " + |
| | | "WHERE " + |
| | | " e.id = #{eventId}") |
| | | EventTransferRecordDetailVO getEventScreenEventTransDetail(@Param("eventId") Long eventId); |
| | | |
| | | @Select("select ca.`name` AS communityName,cs.address AS streetName from com_act as ca LEFT JOIN com_street AS cs ON cs.street_id = ca.street_id where ca.community_id = #{communityId}") |
| | | EventTransferRecordDetailVO getEventScreenEventTransDetailByCommunityId(@Param("communityId") Long communityId); |
| | | |
| | | @Select("select count(id) from com_elders_auth_elderly WHERE community_id = #{communityId}") |
| | | Integer getStatisticsCount(@Param("communityId") Long communityId); |
| | | |
| | | @Select("<script> " + |
| | | "select cmp.id,cmp.`name`,cmp.phone,cmp.card_no,cmp.label,cmp.address,cmp.nation,cmp.political_outlook,cmp.sex from com_mng_population as cmp " + |
| | | " where cmp.act_id = #{populationListDTO.communityId}" + |
| | | "<if test='populationListDTO.keyWord != null and populationListDTO.keyWord != ""'>" + |
| | | "AND (cmp.`name` like concat (#{populationListDTO.keyWord},'%') or cmp.card_no_str like concat (#{populationListDTO.keyWord},'%')) " + |
| | | " </if> " + |
| | | "<if test='populationListDTO.label != null and populationListDTO.label != ""'>" + |
| | | "AND cmp.label like concat ('%',#{populationListDTO.label},'%') " + |
| | | " </if> " + |
| | | " </script>") |
| | | IPage<PopulationListVO> pagePopulationListApp(Page page, @Param("populationListDTO") PagePopulationListDTO populationListDTO); |
| | | |
| | | @Select("SELECT " + |
| | | " cmp.id, " + |
| | | " cmp.`name`, " + |
| | | " cmp.phone, " + |
| | | " cmp.card_no, " + |
| | | " cmp.label, " + |
| | | " cmp.address, " + |
| | | " cmp.nation, " + |
| | | " cmp.political_outlook, " + |
| | | " cmp.sex, " + |
| | | " cmp.birthday, " + |
| | | " cmp.native_place, " + |
| | | " cmp.healthy, " + |
| | | " cmp.is_rent, " + |
| | | " cmv.alley AS road, " + |
| | | " cmv.house_num AS doorNo, " + |
| | | " cmp.floor, " + |
| | | " cmp.unit_no, " + |
| | | " cmp.house_no, " + |
| | | " cmp.work_company, " + |
| | | " cmp.census_register, " + |
| | | " cmp.out_or_local, " + |
| | | " cmp.remark, " + |
| | | " cmp.marriage " + |
| | | "FROM " + |
| | | " com_mng_population AS cmp " + |
| | | " LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id " + |
| | | "WHERE " + |
| | | " id = #{populationId}") |
| | | PopulationDetailVO getPopulationDetailApp(@Param("populationId") Long populationId); |
| | | |
| | | } |