From 09f98d8509fb22db2edcc18bdafc0c7ab7c3baa1 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期一, 07 四月 2025 09:12:05 +0800
Subject: [PATCH] Merge branch 'dev' of http://120.76.84.145:10101/gitblit/r/java/xizang into dev

---
 ruoyi-system/src/main/resources/mapper/system/THouseMapper.xml |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/THouseMapper.xml b/ruoyi-system/src/main/resources/mapper/system/THouseMapper.xml
index 00f15a6..f6a5a13 100644
--- a/ruoyi-system/src/main/resources/mapper/system/THouseMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/THouseMapper.xml
@@ -88,15 +88,14 @@
     </select>
     <select id="getRentedArea" resultType="java.lang.Double">
         SELECT COALESCE(SUM(t1.house_area),0) FROM t_house t1
-        LEFT JOIN t_contract t2 ON t1.id = t2.house_id
+        LEFT JOIN t_contract t2 ON t1.id = t2.house_id AND t2.status = 4 AND t2.pay_type = 2
         <where>
-            t2.pay_type = 2 AND t1.lease_status != 1
+            t1.lease_status != 1
             <if test="businessDeptId!=0">
                 AND t1.business_dept_id = #{businessDeptId}
             </if>
             AND t1.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
         </where>
-        GROUP BY t1.id
     </select>
 
 </mapper>

--
Gitblit v1.7.1