From 28e8b38e9de8cc76084d0af6a96d2d9d1e1f739f Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期四, 27 十月 2022 13:28:32 +0800
Subject: [PATCH] Merge branch 'local_20221024' into haucheng_panzhihua
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActVillageDAO.java | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 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..aa86c6b 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,28 +28,29 @@
@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"
- + " from com_mng_village where community_id = #{communityId}")
+ @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);
@Select("select village_id,alley,house_num,group_at,type,address,update_at from com_mng_village where village_id = #{villageId}")
ComMngVillageVO getVillageById(@Param("villageId") Long villageId);
- @Select("<script> " + "SELECT " + " village_id, " + " `name` AS userName, " + " build_sum, " + " address, "
+ @Select("<script> " + "SELECT " + " village_id, " + " `name` AS userName, " + " IFNULL((select count(id) from com_mng_building where village_id = cmv.village_id),0) as buildSum, " + " address, "
+ " create_at as createAt, " + " lng, " + " lat, "
+ " ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id ) AS userSum, "
+ " ( SELECT count( id ) FROM com_mng_population_house WHERE village_id = cmv.village_id ) AS houseNum, "
+ " ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id AND out_or_local = 1 ) AS registerNum, "
+ " ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id AND is_rent = 2 ) AS rentNum "
+ "FROM " + " com_mng_village AS cmv where 1=1 " + "<if test='villageListAppDTO.communityId != null'>"
- + " and cmv.community_id = #{villageListAppDTO.communityId} " + " </if> "
+ + " and cmv.community_id = ${villageListAppDTO.communityId} " + " </if> "
+ "<if test='villageListAppDTO.address != null and villageListAppDTO.address != ""'>"
+ " and cmv.address like concat(#{villageListAppDTO.address},'%') " + " </if> "
+ "<if test='villageListAppDTO.alley != null and villageListAppDTO.alley != ""'>"
@@ -65,12 +66,15 @@
IPage<PageComMngVillageVO> getGridVillageList(Page page,
@Param("villageListAppDTO") ComMngVillageListAppDTO villageListAppDTO);
+ IPage<PageComMngVillageVO> getGridVillageListApp(Page page,
+ @Param("villageListAppDTO") ComMngVillageListAppDTO villageListAppDTO);
+
@Select("<script> " + "SELECT " + " alley, " + " house_num as doorNum, " + " `name` AS userName, " + " build_sum, "
+ " address, " + " create_at as createAt, "
+ " ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id ) AS userSum, "
+ " ( SELECT count( id ) FROM com_mng_population_house WHERE village_id = cmv.village_id ) AS houseNum "
+ "FROM " + " com_mng_village AS cmv where 1=1 " + "<if test='villageListAppDTO.communityId != null'>"
- + " and cmv.community_id = #{villageListAppDTO.communityId} " + " </if> "
+ + " and cmv.community_id = ${villageListAppDTO.communityId} " + " </if> "
+ "<if test='villageListAppDTO.villageIds != null and villageListAppDTO.villageIds.size > 0'>"
+ " and cmv.village_id in "
+ "<foreach item='item' collection='villageListAppDTO.villageIds' separator=',' open='(' close=')' index=''> "
--
Gitblit v1.7.1