From 24f2e1047e0260915ce6e401ec36763974531eed Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Thu, 27 Jun 2024 10:15:23 +0800
Subject: [PATCH] 积木报表+业主大会统计
---
src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml | 39 ++++++++++++++++++++++++++++++---------
1 files changed, 30 insertions(+), 9 deletions(-)
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
index c1a00b2..9fbd3de 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
@@ -955,16 +955,37 @@
select house_code from jczz_household where is_deleted = 0 and relationship = 1 and house_code is not null and house_code != '' GROUP BY house_code
) a on a.house_code = jh.house_code
left join
- (
- select house_code from jczz_household where is_deleted = 0 and relationship = 18 and house_code is not null and house_code != '' GROUP BY house_code
- ) b on b.house_code = jh.house_code
+ (select house_code
+ from jczz_household
+ where is_deleted = 0
+ and relationship = 18
+ and house_code is not null
+ and house_code != ''
+ GROUP BY house_code) b on b.house_code = jh.house_code
left join
- (
- select house_code from jczz_household where is_deleted = 0 and relationship is null or (relationship!=1 and relationship!=18) and house_code is not null and house_code != '' GROUP BY house_code
- ) c on c.house_code = jh.house_code
- ) d left join jczz_user_house_label juhl on d.house_code = juhl.house_code and lable_type = 2
- where juhl.id is null and status is not null
- limit #{i},#{size}
+ (select house_code
+ from jczz_household
+ where is_deleted = 0 and relationship is null
+ or (relationship!=1 and relationship!=18) and house_code is not null and house_code != ''
+ GROUP BY house_code) c on c.house_code = jh.house_code) d
+ left join jczz_user_house_label juhl on d.house_code = juhl.house_code and lable_type = 2
+ where juhl.id is null
+ and status is not null
+ limit #{i}
+ , #{size}
+ </select>
+ <select id="getHoseTotalAndAreaTotalByDistrictCode" resultType="java.util.Map">
+
+ SELECT
+ count( 1 ) AS houseCount,
+ IFNULL(sum( area ),0) AS houseArea
+ FROM
+ jczz_house jh
+ WHERE
+ jh.district_code in
+ <foreach collection="aoiCodeList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
</select>
--
Gitblit v1.9.3