From cc7d28f6a5df2dedb6d27f436e99c48df6c267b4 Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期一, 14 三月 2022 17:48:41 +0800
Subject: [PATCH] 党建bug修改
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java | 87 ++++++++++++++++++++++++++++++-------------
1 files changed, 61 insertions(+), 26 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
index 5789672..bb44fcd 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -4,6 +4,7 @@
import java.util.List;
import java.util.Map;
+import com.panzhihua.common.model.dtos.PageBaseDTO;
import com.panzhihua.common.model.dtos.community.CascadeHouseDTO;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.community.*;
@@ -98,7 +99,7 @@
+ "cmp.special_situation, " + "cmp.phone, " + "cmp.remark, " + "cmp.native_place, " + "cmp.nation, "
+ "cmpct.label, " + "cmp.marriage, " + "cmp.culture_level, " + "cmp.profession, " + "cmp.out_or_local, "
+ "cmp.census_register, " + "cmp.healthy, " + "cmp.birthday, " + "cmp.update_at, " + "cmp.address, "
- + "cmp.is_rent " + "FROM " + "com_mng_population AS cmp "
+ + "cmp.is_rent,cmp.death " + "FROM " + "com_mng_population AS cmp "
+ " LEFT JOIN com_mng_population_community_tags AS cmpct ON cmp.id = cmpct.population_id " + "<where>"
+ "<if test='comMngPopulationVO.name != null and comMngPopulationVO.name != ""'>"
+ "AND cmp.`name` LIKE concat(#{comMngPopulationVO.name},'%') " + " </if> "
@@ -133,6 +134,9 @@
+ "<if test='comMngPopulationVO.ageStartTime != null and comMngPopulationVO.ageEndTime != null and comMngPopulationVO.ageStartTime != comMngPopulationVO.ageEndTime'>"
+ "AND cmp.birthday BETWEEN #{comMngPopulationVO.ageEndTimeEnd} and #{comMngPopulationVO.ageStartTime}"
+ " </if> "
+ + "<if test='comMngPopulationVO.searchKey != null and comMngPopulationVO.searchKey != "" '>"
+ + "AND (cmp.name like concat('%',#{comMngPopulationVO.searchKey},'%') or cmp.card_no_str like concat('%',#{comMngPopulationVO.searchKey},'%') or cmp.phone like concat('%',#{comMngPopulationVO.searchKey},'%') "
+ + " </if> "
+ "<if test='comMngPopulationVO.nativePlace != null and comMngPopulationVO.nativePlace != ""'>"
+ "AND cmp.native_place LIKE concat(#{comMngPopulationVO.nativePlace},'%') " + " </if> "
+ "<if test='comMngPopulationVO.nation != null and comMngPopulationVO.nation != ""'>"
@@ -146,6 +150,13 @@
+ "</script>")
IPage<ComMngPopulationVO> pagePopulation(Page page,
@Param("comMngPopulationVO") ComMngPopulationDTO comMngPopulationVO);
+
+ /**
+ * 导出老人列表
+ * @param comMngPopulationVO
+ * @return
+ */
+ List<ComMngPopulationVO> exportOld(@Param("comMngPopulationVO") ComMngPopulationDTO comMngPopulationVO);
/**
* 分页查询特殊群体列表
@@ -186,24 +197,29 @@
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," +
@@ -416,17 +432,21 @@
Long countUsedCommunityPopulation(@Param("communityId") Long communityId);
@Select("SELECT " + "(SELECT COUNT(aa.age) FROM "
- + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = ${communityId}) as aa where aa.age<= 16) as age16,"
+ + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = ${communityId}) as aa where aa.age<= 18) as age16,"
+ "(SELECT COUNT(aa.age) FROM "
- + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = #{communityId}) AS aa WHERE aa.age > 16 and aa.age<= 27) AS age27,"
+ + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 19 and aa.age<= 30) AS age27,"
+ "(SELECT COUNT(aa.age) FROM "
- + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 27 and aa.age<= 35) AS age35,"
+ + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 31 and aa.age<= 40) AS age35,"
+ "(SELECT COUNT(aa.age) FROM "
- + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 35 and aa.age<= 45) AS age45,"
+ + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 41 and aa.age<= 50) AS age45,"
+ "(SELECT COUNT(aa.age) FROM "
- + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 45 and aa.age<= 55) AS age55,"
+ + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 51 and aa.age<= 59) AS age55,"
+ "(SELECT COUNT(aa.age) FROM "
- + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 55) AS age55over")
+ + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age >= 60 and aa.age<= 79) AS age65,"
+ + "(SELECT COUNT(aa.age) FROM "
+ + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age >= 80 and aa.age<= 89) AS age75,"
+ + "(SELECT COUNT(aa.age) FROM "
+ + "(SELECT (SELECT TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 89) AS age55over")
Map<String, Long> indexCountByAge(@Param("communityId") Long communityId);
@Select("SELECT " + " id, " + " su.nick_name AS userName, " + " su.image_url, " + " caep.create_at, "
@@ -667,9 +687,24 @@
IndexDynamic indexDynamic(Long communityId);
/**
- * 大屏事件数据
+ * 大屏30天內事件数据
* @param communityId
* @return
*/
List<EventGridIncidentStatisticsVO> getGridsGovernanceEventList(@Param("communityId") Long communityId);
+
+ /**
+ * 分页查询事件数据
+ * @param page
+ * @param pageBaseDTO
+ * @return
+ */
+ IPage<EventGridIncidentStatisticsVO> pageEventList(@Param("page") Page page, @Param("pageBaseDTO") PageBaseDTO pageBaseDTO);
+
+ /**
+ * 大屏事件详情新处理方式
+ * @param eventId
+ * @return
+ */
+ EventNewStatisticsVO getEventScreenSSPDateilNew(@Param("eventId") Long eventId);
}
--
Gitblit v1.7.1