|
|
@@ -7,16 +7,16 @@
|
|
|
<!-- 保存小区房屋信息 add by wuxw 2018-07-03 -->
|
|
|
<insert id="saveBusinessRoomInfo" parameterType="Map">
|
|
|
insert into business_building_room(
|
|
|
-unit_price,section,remark,user_id,room_id,layer,built_up_area,operate,room_num,unit_id,b_id,apartment
|
|
|
+unit_price,section,remark,user_id,room_id,layer,built_up_area,operate,room_num,unit_id,b_id,apartment,state
|
|
|
) values (
|
|
|
-#{unitPrice},#{section},#{remark},#{userId},#{roomId},#{layer},#{builtUpArea},#{operate},#{roomNum},#{unitId},#{bId},#{apartment}
|
|
|
+#{unitPrice},#{section},#{remark},#{userId},#{roomId},#{layer},#{builtUpArea},#{operate},#{roomNum},#{unitId},#{bId},#{apartment},#{state}
|
|
|
)
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
<!-- 查询小区房屋信息(Business) add by wuxw 2018-07-03 -->
|
|
|
<select id="getBusinessRoomInfo" parameterType="Map" resultType="Map">
|
|
|
- select t.unit_price,t.unit_price unitPrice,t.section,t.remark,t.user_id,t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.operate,t.room_num,t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment
|
|
|
+ select t.unit_price,t.unit_price unitPrice,t.section,t.remark,t.user_id,t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.operate,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
|
|
|
from business_building_room t
|
|
|
where 1 =1
|
|
|
<if test="unitPrice !=null and unitPrice != ''">
|
|
|
@@ -54,7 +54,10 @@ where 1 =1
|
|
|
</if>
|
|
|
<if test="apartment !=null and apartment != ''">
|
|
|
and t.apartment= #{apartment}
|
|
|
-</if>
|
|
|
+</if>
|
|
|
+ <if test="state !=null and state != ''">
|
|
|
+ and t.state= #{state}
|
|
|
+ </if>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
@@ -65,8 +68,8 @@ where 1 =1
|
|
|
<!-- 保存小区房屋信息至 instance表中 add by wuxw 2018-07-03 -->
|
|
|
<insert id="saveRoomInfoInstance" parameterType="Map">
|
|
|
insert into building_room(
|
|
|
-unit_price,section,status_cd,remark,user_id,room_id,layer,built_up_area,room_num,unit_id,b_id,apartment
|
|
|
-) select t.unit_price,t.section,'0',t.remark,t.user_id,t.room_id,t.layer,t.built_up_area,t.room_num,t.unit_id,t.b_id,t.apartment from business_building_room t where 1=1
|
|
|
+unit_price,section,status_cd,remark,user_id,room_id,layer,built_up_area,room_num,unit_id,b_id,apartment,state
|
|
|
+) select t.unit_price,t.section,'0',t.remark,t.user_id,t.room_id,t.layer,t.built_up_area,t.room_num,t.unit_id,t.b_id,t.apartment,t.state from business_building_room t where 1=1
|
|
|
<if test="unitPrice !=null and unitPrice != ''">
|
|
|
and t.unit_price= #{unitPrice}
|
|
|
</if>
|
|
|
@@ -100,7 +103,10 @@ unit_price,section,status_cd,remark,user_id,room_id,layer,built_up_area,room_num
|
|
|
</if>
|
|
|
<if test="apartment !=null and apartment != ''">
|
|
|
and t.apartment= #{apartment}
|
|
|
-</if>
|
|
|
+</if>
|
|
|
+ <if test="state !=null and state != ''">
|
|
|
+ and t.state= #{state}
|
|
|
+ </if>
|
|
|
|
|
|
</insert>
|
|
|
|
|
|
@@ -108,7 +114,7 @@ unit_price,section,status_cd,remark,user_id,room_id,layer,built_up_area,room_num
|
|
|
|
|
|
<!-- 查询小区房屋信息 add by wuxw 2018-07-03 -->
|
|
|
<select id="getRoomInfo" parameterType="Map" resultType="Map">
|
|
|
- select t.unit_price,t.unit_price unitPrice,t.section,t.status_cd,t.status_cd statusCd,t.remark,t.user_id,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
|
|
|
+ select t.unit_price,t.unit_price unitPrice,t.section,t.status_cd,t.status_cd statusCd,t.remark,t.user_id,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
|
|
|
from building_room t
|
|
|
where 1 =1
|
|
|
<if test="unitPrice !=null and unitPrice != ''">
|
|
|
@@ -149,7 +155,10 @@ where 1 =1
|
|
|
</if>
|
|
|
<if test="page != -1 and page != null">
|
|
|
limit #{page},#{row}
|
|
|
-</if>
|
|
|
+</if>
|
|
|
+ <if test="state !=null and state != ''">
|
|
|
+ and t.state= #{state}
|
|
|
+ </if>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
@@ -188,7 +197,10 @@ where 1 =1
|
|
|
</if>
|
|
|
<if test="apartment !=null and apartment != ''">
|
|
|
, t.apartment= #{apartment}
|
|
|
-</if>
|
|
|
+</if>
|
|
|
+ <if test="state !=null and state != ''">
|
|
|
+ , t.state= #{state}
|
|
|
+ </if>
|
|
|
where 1=1 <if test="roomId !=null and roomId != ''">
|
|
|
and t.room_id= #{roomId}
|
|
|
</if>
|
|
|
@@ -238,7 +250,10 @@ where 1 =1
|
|
|
</if>
|
|
|
<if test="apartment !=null and apartment != ''">
|
|
|
and t.apartment= #{apartment}
|
|
|
-</if>
|
|
|
+</if>
|
|
|
+ <if test="state !=null and state != ''">
|
|
|
+ and t.state= #{state}
|
|
|
+ </if>
|
|
|
|
|
|
|
|
|
</select>
|
|
|
@@ -299,6 +314,9 @@ where 1 =1
|
|
|
<if test="apartment !=null and apartment != ''">
|
|
|
and t.apartment= #{apartment}
|
|
|
</if>
|
|
|
+ <if test="state !=null and state != ''">
|
|
|
+ and t.state= #{state}
|
|
|
+ </if>
|
|
|
|
|
|
|
|
|
</select>
|
|
|
@@ -307,7 +325,7 @@ where 1 =1
|
|
|
<select id="getRoomInfoByCommunityId" parameterType="Map" resultType="Map">
|
|
|
SELECT t.unit_price,t.unit_price unitPrice,t.section,t.status_cd,t.status_cd statusCd,t.remark,t.user_id,
|
|
|
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,u.`unit_num` unitNum
|
|
|
+ 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
|
|
|
FROM building_room t,s_community c,s_community_member cm,building_unit u,f_floor f
|
|
|
WHERE 1 =1
|
|
|
AND t.`unit_id` = u.`unit_id`
|
|
|
@@ -359,6 +377,9 @@ where 1 =1
|
|
|
<if test="apartment !=null and apartment != ''">
|
|
|
and t.apartment= #{apartment}
|
|
|
</if>
|
|
|
+ <if test="state !=null and state != ''">
|
|
|
+ and t.state= #{state}
|
|
|
+ </if>
|
|
|
<if test="page != -1 and page != null">
|
|
|
limit #{page},#{row}
|
|
|
</if>
|