From d03abd47f2f6c0145b0d30773a8b5ee6252f1139 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Thu, 18 Jan 2024 14:18:50 +0800
Subject: [PATCH] 新增区域数据处理
---
src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.xml | 31 +++++++++++++++++++++++--------
1 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.xml
index f8cdc45..5489c0c 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.xml
@@ -130,6 +130,7 @@
and jg.community_code like concat('%',#{vo.regionCode},'%')
</if>
<include refid="filterHouseGrid"/>
+ order by jhr.create_time desc,jhr.id desc
</select>
<!--查询房屋出租情况-->
@@ -295,16 +296,30 @@
<select id="getStatisticsCount" resultType="java.lang.Integer">
SELECT
- count(1)
+ count( 1 )
FROM
- jczz_grid_range jgr
+ jczz_house_rental jhr
+ LEFT JOIN jczz_doorplate_address jda ON jhr.house_code = jda.address_code
+ <where>
+ <if test="neiCode != null and neiCode != ''">
+ and jda.nei_code = #{neiCode}
+ </if>
+ <if test="userId != null">
+ AND jhr.house_code IN (
+ SELECT
+ jgr.house_code
+ FROM
+ jczz_grid_range jgr
LEFT JOIN jczz_grid jg ON jg.id = jgr.grid_id
- LEFT JOIN jczz_gridman jgm on jg.id = jgm.grid_id
- LEFT JOIN jczz_house_rental jhr on jhr.house_code=jgr.house_code
- WHERE
- jg.is_deleted = 0
- and jhr.audit_status = 0
- AND jgm.user_id = #{userId}
+ LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id
+ WHERE
+ jg.is_deleted = 0
+ AND jgm.user_id = #{userId} )
+ </if>
+ and jhr.is_deleted = 0
+ and jhr.audit_status = 0
+ </where>
+
</select>
--
Gitblit v1.9.3