From 6707113924fdc5e2b159bcc425261e6ae79cb494 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期四, 03 四月 2025 21:54:09 +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/TBillMapper.xml |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml
index 87f6a83..e10c3ec 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml
@@ -210,10 +210,9 @@
         FROM
             t_street ts
                 LEFT JOIN t_house th ON ts.id = th.street_id
-                LEFT JOIN t_contract tc ON tc.house_id = th.id
-                LEFT JOIN t_bill tb ON tc.id = tb.contract_id
+                LEFT JOIN t_contract tc ON tc.house_id = th.id AND tc.pay_type = 2
+                LEFT JOIN t_bill tb ON tc.id = tb.contract_id AND tb.pay_fees_status != 5
             <where>
-               tc.pay_type = 2 AND tb.pay_fees_status != 5
                 <if test="businessDeptId != 0">
                     AND th.business_dept_id = #{businessDeptId}
                 </if>

--
Gitblit v1.7.1