From 5a8a90c095280fbd2106869ecd2bad10e01a57a6 Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期四, 23 十二月 2021 18:10:22 +0800
Subject: [PATCH] 12/23  大屏修改

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActVillageDAO.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActVillageDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActVillageDAO.java
index 1529a88..0e785fa 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActVillageDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActVillageDAO.java
@@ -28,14 +28,15 @@
 
     @Select("select count(id) as houseTotal"
         + ",(select count(DISTINCT floor) from com_mng_population_house where village_id = #{villageId}) as floorTotal"
-        + ",(select count(id) from com_mng_population where village_id = #{villageId}) as populationTotal"
+        + ",(select count(id) from com_mng_population  where road = (select alley from com_mng_village where village_id = #{villageId})"
+        + " and door_no = (select house_num from com_mng_village where village_id = #{villageId})) as populationTotal"
         + ",(select count(id) from com_mng_car where area_id = #{villageId}) as carTotal"
         + " from com_mng_population_house where village_id = #{villageId}")
     ComMngVillageVO getStatisticsCount(@Param("villageId") Long villageId);
 
-    @Select("select count(village_id) as villageTotal"
-        + ",(select count(village_id) from com_mng_village where community_id = #{communityId} and type = 1) as townTotal"
-        + ",(select count(village_id) from com_mng_village where community_id = #{communityId} and type = 2) as countrysideTotal"
+    @Select("select count(distinct `name`) as villageTotal"
+        + ",(select count(distinct `name`) from com_mng_village where community_id = #{communityId} and type = 1) as townTotal"
+        + ",(select count(distinct `name`) from com_mng_village where community_id = #{communityId} and type = 2) as countrysideTotal"
         + " from com_mng_village where community_id = #{communityId}")
     ComMngVillageTotalVO getVillageStatisticsCount(@Param("communityId") Long communityId);
 

--
Gitblit v1.7.1