| | |
| | | ",(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); |