From c6b944ae631e1d37d8f6bacfa1f5c7e855f0dab8 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期四, 21 七月 2022 12:47:43 +0800
Subject: [PATCH] 优化报表功能

---
 java110-db/src/main/resources/mapper/report/ReportCommunityServiceDaoImplMapper.xml |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/report/ReportCommunityServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/report/ReportCommunityServiceDaoImplMapper.xml
index 945decd..ee99cd9 100755
--- a/java110-db/src/main/resources/mapper/report/ReportCommunityServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/report/ReportCommunityServiceDaoImplMapper.xml
@@ -199,6 +199,20 @@
 
 
 
-
+    <!-- 鏌ヨ鏃犳晥璐圭敤 add by wuxw 2018-07-03 -->
+    <select id="queryRoomsTree" parameterType="Map" resultType="Map">
+        SELECT t.room_id,t.room_id roomId,t.layer,t.room_num,
+        t.room_num roomNum,t.unit_id,u.`unit_num` unitNum,
+        u.unit_id unitId,f.floor_id floorId,f.floor_num floorNum,t.`community_id` communityId,bo.owner_id ownerId ,bo.`name` ownerName ,bo.link link
+        FROM building_room t
+        inner join building_unit u on t.`unit_id` = u.`unit_id` and u.`status_cd` = '0'
+        inner JOIN f_floor f on u.`floor_id` = f.`floor_id` AND f.`community_id` = t.`community_id` AND f.`status_cd` =
+        '0'
+        left join building_owner_room_rel borr on t.room_id =  borr.room_id and borr.status_cd = '0'
+        left join building_owner bo on borr.owner_id =  bo.member_id and bo.status_cd = '0'
+        WHERE 1 =1
+        and u.unit_id = #{unitId}
+        and t.community_id= #{communityId}
+    </select>
 
 </mapper>

--
Gitblit v1.8.0