From f14c50cb0036d3ddd655ce4e34732ba396a836c4 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 30 五月 2023 12:42:03 +0800
Subject: [PATCH] optimize 统计

---
 java110-db/src/main/resources/mapper/community/FloorAttrServiceDaoImplMapper.xml |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/community/FloorAttrServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/FloorAttrServiceDaoImplMapper.xml
old mode 100644
new mode 100755
index 6ebd28b..bd591df
--- a/java110-db/src/main/resources/mapper/community/FloorAttrServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/FloorAttrServiceDaoImplMapper.xml
@@ -84,9 +84,21 @@
     <!-- 鏌ヨ鑰冨嫟鐝粍灞炴�т俊鎭� add by wuxw 2018-07-03 -->
     <select id="getFloorAttrInfo" parameterType="Map" resultType="Map">
         select t.floor_id,t.floor_id floorId,t.attr_id,t.attr_id attrId,t.spec_cd,t.spec_cd
-        specCd,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.value
+        specCd,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.value,
+        s.spec_name specName,
+        v.value_name valueName,
+        s.list_show listShow
         from f_floor_attr t
-        where 1 =1
+        left join attr_spec s on t.spec_cd = s.spec_cd and s.status_cd = '0' and t.spec_cd = s.spec_cd and s.table_name = 'building_room_attr'
+        left join attr_value v on t.`value` = v.`value` and s.spec_id = v.spec_id and v.status_cd = '0'
+        where
+        1=1
+        <if test="floorIds !=null and floorIds != ''">
+            and t.floor_id in
+            <foreach collection="floorIds" item="item" index="index" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
         <if test="floorId !=null and floorId != ''">
             and t.floor_id= #{floorId}
         </if>

--
Gitblit v1.8.0