| | |
| | | */ |
| | | @Getter |
| | | public enum PopulPersonTypeEnum { |
| | | HJ(1, "户籍人员"), LS(2, "留守人员"), WD(3, "外地人员"), JW(4, "境外人员"); |
| | | HJ(1, "户籍人口"), LS(2, "留守人员"), WD(3, "外地人员"), JW(4, "境外人员"), |
| | | LD(5, "流动人口"), CZ(6, "常住人口"), ZZ(7, "暂住人口"); |
| | | |
| | | private final Integer code; |
| | | private final String name; |
| | |
| | | @ApiModelProperty("楼栋数") |
| | | private Integer buildNum; |
| | | |
| | | @ApiModelProperty("户籍人口") |
| | | private Integer houseRegTotal; |
| | | |
| | | @ApiModelProperty("流动人口") |
| | | private Integer floatingTotal; |
| | | |
| | | @ApiModelProperty("常住人口") |
| | | private Integer permanentTotal; |
| | | |
| | | @ApiModelProperty("暂住人口") |
| | | private Integer temporaryTotal; |
| | | |
| | | @ApiModelProperty("外地人员") |
| | | private Integer outOfTownTotal; |
| | | |
| | | @ApiModelProperty("留守人员") |
| | | private Integer leftTotal; |
| | | |
| | | @ApiModelProperty("境外人员") |
| | | private Integer overseasTotal; |
| | | } |
| | |
| | | head27.add("是否居住地(是/否)"); |
| | | |
| | | List<String> head28 = new ArrayList<String>(); |
| | | head28.add("人员类型(户籍人员/留守人员/外地人员/境外人员)"); |
| | | head28.add("人员类型(户籍人口/留守人员/外地人员/境外人员/流动人口/常住人口/暂住人口)"); |
| | | List<String> head29 = new ArrayList<String>(); |
| | | head29.add("国家"); |
| | | List<String> head30 = new ArrayList<String>(); |
| | |
| | | AreaAddressVO getAreaAddress(@Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode, |
| | | @Param("districtCode") String districtCode); |
| | | |
| | | @Select("select count(cmpct.id) as populationTotal " |
| | | + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.out_or_local = 1) as localTotal " |
| | | + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.out_or_local = 2) as outTotal " |
| | | + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmpct.label is not null) as specialTotal " |
| | | + ",(select count(DISTINCT `name`) from com_mng_village where community_id = ${communityId}) as villageTotal " |
| | | + ",(select count(id) from com_mng_building where act_id = #{communityId}) as buildNum " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','吸毒人员','%')) as drugTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','社区矫正','%')) as correctTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','精神障碍患者','%')) as majorTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','邪教人员','%')) as cultTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','刑释人员','%')) as rehabilitationTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','重点人员','%')) as keyTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','退役军人','%')) as veteransTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','残疾人','%')) as disabilityTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','低保户','%')) as lowSecurityTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','高龄老人','%')) as elderTotal " |
| | | + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','养老金人员','%')) as pensionTotal " |
| | | + " from com_mng_population_community_tags as cmpct inner join com_mng_population as cmp on cmp.id = cmpct.population_id where community_id = ${communityId}") |
| | | // @Select("select count(cmpct.id) as populationTotal " |
| | | // + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.out_or_local = 1) as localTotal " |
| | | // + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.out_or_local = 2) as outTotal " |
| | | // + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmpct.label is not null) as specialTotal " |
| | | // + ",(select count(DISTINCT `name`) from com_mng_village where community_id = ${communityId}) as villageTotal " |
| | | // + ",(select count(id) from com_mng_building where act_id = #{communityId}) as buildNum " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','吸毒人员','%')) as drugTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','社区矫正','%')) as correctTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','精神障碍患者','%')) as majorTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','邪教人员','%')) as cultTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','刑释人员','%')) as rehabilitationTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','重点人员','%')) as keyTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','退役军人','%')) as veteransTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','残疾人','%')) as disabilityTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','低保户','%')) as lowSecurityTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','高龄老人','%')) as elderTotal " |
| | | // + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','养老金人员','%')) as pensionTotal " |
| | | // + " from com_mng_population_community_tags as cmpct inner join com_mng_population as cmp on cmp.id = cmpct.population_id where community_id = ${communityId}") |
| | | /** |
| | | * 实有人口统计 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | ComMngPopulationTotalVO getPopulationTotalByAdmin(@Param("communityId") Long communityId); |
| | | |
| | | @Select("select count(id) as populationTotal," + |
| | |
| | | ELSE 2 END `status` |
| | | FROM com_act_easy_photo WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8) |
| | | </select> |
| | | <select id="getPopulationTotalByAdmin" |
| | | resultType="com.panzhihua.common.model.vos.community.ComMngPopulationTotalVO"> |
| | | select count(cmpct.id) as populationTotal , |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.out_or_local = 1) as localTotal , |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.out_or_local = 2) as outTotal , |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmpct.label is not null) as specialTotal , |
| | | (select count(DISTINCT `name`) from com_mng_village where community_id = ${communityId}) as villageTotal , |
| | | (select count(id) from com_mng_building where act_id = ${communityId}) as buildNum , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','吸毒人员','%')) as drugTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','社区矫正','%')) as correctTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','精神障碍患者','%')) as majorTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','邪教人员','%')) as cultTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','刑释人员','%')) as rehabilitationTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','重点人员','%')) as keyTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','退役军人','%')) as veteransTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','残疾人','%')) as disabilityTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','低保户','%')) as lowSecurityTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','高龄老人','%')) as elderTotal , |
| | | (select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','养老金人员','%')) as pensionTotal, |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 1) AS houseRegTotal, |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 2) AS leftTotal, |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 3) AS outOfTownTotal, |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 4) AS overseasTotal, |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 5) AS floatingTotal, |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 6) AS permanentTotal, |
| | | (select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.person_type = 7) AS temporaryTotal |
| | | from com_mng_population_community_tags as cmpct inner join com_mng_population as cmp on cmp.id = cmpct.population_id where community_id = ${communityId} |
| | | </select> |
| | | </mapper> |