From 05683f2b2bdbdbe21cf17ad523c21ab338bd1c54 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期二, 19 七月 2022 21:49:55 +0800
Subject: [PATCH] 优化添加设备 功能

---
 java110-db/src/main/resources/mapper/community/RoomServiceDaoImplMapper.xml |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/community/RoomServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/RoomServiceDaoImplMapper.xml
index ac54f25..2818fe9 100755
--- a/java110-db/src/main/resources/mapper/community/RoomServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/RoomServiceDaoImplMapper.xml
@@ -6,13 +6,12 @@
 
     <!-- 淇濆瓨灏忓尯鎴垮眿淇℃伅 add by wuxw 2018-07-03 -->
     <insert id="saveBusinessRoomInfo" parameterType="Map">
-        insert into business_building_room(
-        fee_coefficient,section,remark,user_id,room_id,layer,built_up_area,operate,room_num,unit_id,b_id,apartment,state,community_id,
-        room_type,room_sub_type,room_rent,room_area
-        ) values (
-        #{feeCoefficient},#{section},#{remark},#{userId},#{roomId},#{layer},#{builtUpArea},#{operate},#{roomNum},#{unitId},#{bId},#{apartment},#{state},
-        #{communityId},#{roomType},#{roomSubType},#{roomRent},#{roomArea}
-        )
+        insert into business_building_room(fee_coefficient, section, remark, user_id, room_id, layer, built_up_area,
+                                           operate, room_num, unit_id, b_id, apartment, state, community_id,
+                                           room_type, room_sub_type, room_rent, room_area)
+        values (#{feeCoefficient}, #{section}, #{remark}, #{userId}, #{roomId}, #{layer}, #{builtUpArea}, #{operate},
+                #{roomNum}, #{unitId}, #{bId}, #{apartment}, #{state},
+                #{communityId}, #{roomType}, #{roomSubType}, #{roomRent}, #{roomArea})
     </insert>
 
 
@@ -307,7 +306,7 @@
         <if test="roomSubType !=null and roomSubType != ''">
             and t.room_sub_type= #{roomSubType}
         </if>
-        
+
     </select>
 
     <!-- 鏌ヨ灏忓尯鎴垮眿鏁伴噺 add by wuxw 2018-07-03 -->
@@ -384,7 +383,7 @@
         <if test="unitNum !=null and unitNum != ''">
             and u.unit_num= #{unitNum}
         </if>
-      
+
     </select>
 
     <!-- 鏌ヨ灏忓尯鎴垮眿鏁伴噺 add by wuxw 2018-07-03 -->
@@ -581,7 +580,7 @@
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
-        
+
         and borr.`room_id` is null
         <if test="page != -1 and page != null">
             limit #{page},#{row}
@@ -756,7 +755,7 @@
             and t.community_id= #{communityId}
         </if>
 
-        order by f.floor_num ,u.unit_num,t.room_num
+        order by f.floor_num ,u.unit_num,t.layer,t.room_num
         <if test="page != -1 and page != null">
             limit #{page},#{row}
         </if>
@@ -770,7 +769,8 @@
         t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.room_num,
         t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num`
         unitNum,f.`floor_num` floorNum,t.room_type roomType,t.room_type,f.floor_id floorId
-        ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea
+        ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area
+        roomArea,bo.name ownerName
         FROM
         building_owner bo,building_room t,building_owner_room_rel borr,building_unit u,f_floor f
         WHERE
@@ -798,6 +798,9 @@
         <if test="name !=null and name != ''">
             and bo.name= #{name}
         </if>
+        <if test="ownerNameLike !=null and ownerNameLike != ''">
+            and bo.name like concat('%',#{ownerNameLike},'%')
+        </if>
         <if test="link !=null and link != ''">
             and bo.link= #{link}
         </if>
@@ -813,7 +816,6 @@
         <if test="bId !=null and bId != ''">
             and bo.b_id= #{bId}
         </if>
-
         <if test="age !=null and age != ''">
             and bo.age= #{age}
         </if>
@@ -823,7 +825,6 @@
         <if test="ownerTypeCd !=null and ownerTypeCd != ''">
             and bo.owner_type_cd= #{ownerTypeCd}
         </if>
-
     </select>
 
     <!-- 鏌ヨ灏忓尯鎴垮眿淇℃伅 add by wuxw 2018-07-03 -->

--
Gitblit v1.8.0