tangxiaobao
2021-08-20 482685cef1fdacac3635c6d4d7b063a588b9dc96
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -276,15 +276,15 @@
            ",(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 " +
            ",(select count(id) from com_mng_population where act_id = #{communityId} and label LIKE CONCAT('%','吸毒人员','%')) as drugTotal " +
            ",(select count(id) from com_mng_population where act_id = #{communityId} and label LIKE CONCAT('%','社区矫正','%')) as correctTotal " +
            ",(select count(id) from com_mng_population where act_id = #{communityId} and label LIKE CONCAT('%','精神障碍患者','%')) as majorTotal " +
            ",(select count(id) from com_mng_population where act_id = #{communityId} and label LIKE CONCAT('%','邪教人员','%')) as cultTotal " +
            ",(select count(id) from com_mng_population where act_id = #{communityId} and label LIKE CONCAT('%','刑满释放','%')) as rehabilitationTotal " +
            ",(select count(id) from com_mng_population where act_id = #{communityId} and label LIKE CONCAT('%','重点人员','%')) as keyTotal " +
            ",(select count(id) from com_mng_population where act_id = #{communityId} and label LIKE CONCAT('%','退役军人','%')) as veteransTotal " +
            ",(select count(id) from com_mng_population where act_id = #{communityId} and label LIKE CONCAT('%','残疾人','%')) as disabilityTotal " +
            ",(select count(id) from com_mng_population where act_id = #{communityId} and label LIKE CONCAT('%','低保户','%')) as lowSecurityTotal " +
            ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','吸毒人员','%')) as drugTotal " +
            ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','社区矫正','%')) as correctTotal " +
            ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','精神障碍患者','%')) as majorTotal " +
            ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','邪教人员','%')) as cultTotal " +
            ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','刑满释放','%')) as rehabilitationTotal " +
            ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','重点人员','%')) as keyTotal " +
            ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','退役军人','%')) as veteransTotal " +
            ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','残疾人','%')) as disabilityTotal " +
            ",(select count(cmp.id) from com_mng_population cmp left join com_mng_population_community_tags cmpct on cmp.id = cmpct.population_id where cmp.act_id = #{communityId} and cmpct.label LIKE CONCAT('%','低保户','%')) as lowSecurityTotal " +
            " from com_mng_population as cmp where act_id = #{communityId}")
    ComMngPopulationTotalVO getPopulationTotalByAdmin(@Param("communityId") Long communityId);