|
@@ -7,9 +7,9 @@
|
|
|
<!-- 保存小区房屋信息 add by wuxw 2018-07-03 -->
|
|
<!-- 保存小区房屋信息 add by wuxw 2018-07-03 -->
|
|
|
<insert id="saveBusinessRoomInfo" parameterType="Map">
|
|
<insert id="saveBusinessRoomInfo" parameterType="Map">
|
|
|
insert into business_building_room(
|
|
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,state
|
|
|
|
|
|
|
+ unit_price,section,remark,user_id,room_id,layer,built_up_area,operate,room_num,unit_id,b_id,apartment,state,community_id
|
|
|
) values (
|
|
) values (
|
|
|
- #{unitPrice},#{section},#{remark},#{userId},#{roomId},#{layer},#{builtUpArea},#{operate},#{roomNum},#{unitId},#{bId},#{apartment},#{state}
|
|
|
|
|
|
|
+ #{unitPrice},#{section},#{remark},#{userId},#{roomId},#{layer},#{builtUpArea},#{operate},#{roomNum},#{unitId},#{bId},#{apartment},#{state},#{communityId}
|
|
|
)
|
|
)
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
@@ -18,7 +18,8 @@
|
|
|
<select id="getBusinessRoomInfo" parameterType="Map" resultType="Map">
|
|
<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
|
|
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
|
|
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
|
|
|
|
|
|
|
+ roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,t.community_id,t.community_id
|
|
|
|
|
+ communityId
|
|
|
from business_building_room t
|
|
from business_building_room t
|
|
|
where 1 =1
|
|
where 1 =1
|
|
|
<if test="unitPrice !=null and unitPrice != ''">
|
|
<if test="unitPrice !=null and unitPrice != ''">
|
|
@@ -60,6 +61,9 @@
|
|
|
<if test="state !=null and state != ''">
|
|
<if test="state !=null and state != ''">
|
|
|
and t.state= #{state}
|
|
and t.state= #{state}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="communityId !=null and communityId != ''">
|
|
|
|
|
+ and t.community_id= #{communityId}
|
|
|
|
|
+ </if>
|
|
|
|
|
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
@@ -67,9 +71,9 @@
|
|
|
<!-- 保存小区房屋信息至 instance表中 add by wuxw 2018-07-03 -->
|
|
<!-- 保存小区房屋信息至 instance表中 add by wuxw 2018-07-03 -->
|
|
|
<insert id="saveRoomInfoInstance" parameterType="Map">
|
|
<insert id="saveRoomInfoInstance" parameterType="Map">
|
|
|
insert into building_room(
|
|
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,state
|
|
|
|
|
|
|
+ unit_price,section,status_cd,remark,user_id,room_id,layer,built_up_area,room_num,unit_id,b_id,apartment,state,community_id
|
|
|
) select
|
|
) 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
|
|
|
|
|
|
|
+ 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,t.community_id
|
|
|
from business_building_room t where 1=1
|
|
from business_building_room t where 1=1
|
|
|
<if test="unitPrice !=null and unitPrice != ''">
|
|
<if test="unitPrice !=null and unitPrice != ''">
|
|
|
and t.unit_price= #{unitPrice}
|
|
and t.unit_price= #{unitPrice}
|
|
@@ -108,6 +112,9 @@
|
|
|
<if test="state !=null and state != ''">
|
|
<if test="state !=null and state != ''">
|
|
|
and t.state= #{state}
|
|
and t.state= #{state}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="communityId !=null and communityId != ''">
|
|
|
|
|
+ and t.community_id= #{communityId}
|
|
|
|
|
+ </if>
|
|
|
|
|
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
@@ -116,7 +123,8 @@
|
|
|
<select id="getRoomInfo" parameterType="Map" resultType="Map">
|
|
<select id="getRoomInfo" parameterType="Map" resultType="Map">
|
|
|
select t.unit_price,t.unit_price unitPrice,t.section,t.status_cd,t.status_cd
|
|
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
|
|
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
|
|
|
|
|
|
|
+ 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,t.community_id,t.community_id communityId
|
|
|
from building_room t
|
|
from building_room t
|
|
|
where 1 =1
|
|
where 1 =1
|
|
|
<if test="unitPrice !=null and unitPrice != ''">
|
|
<if test="unitPrice !=null and unitPrice != ''">
|
|
@@ -165,6 +173,10 @@
|
|
|
<if test="state !=null and state != ''">
|
|
<if test="state !=null and state != ''">
|
|
|
and t.state= #{state}
|
|
and t.state= #{state}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="communityId !=null and communityId != ''">
|
|
|
|
|
+ and t.community_id= #{communityId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ order by t.create_time desc
|
|
|
<if test="page != -1 and page != null">
|
|
<if test="page != -1 and page != null">
|
|
|
limit #{page},#{row}
|
|
limit #{page},#{row}
|
|
|
</if>
|
|
</if>
|
|
@@ -213,6 +225,9 @@
|
|
|
<if test="roomId !=null and roomId != ''">
|
|
<if test="roomId !=null and roomId != ''">
|
|
|
and t.room_id= #{roomId}
|
|
and t.room_id= #{roomId}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="communityId !=null and communityId != ''">
|
|
|
|
|
+ and t.community_id= #{communityId}
|
|
|
|
|
+ </if>
|
|
|
<if test="bId !=null and bId != ''">
|
|
<if test="bId !=null and bId != ''">
|
|
|
and t.b_id= #{bId}
|
|
and t.b_id= #{bId}
|
|
|
</if>
|
|
</if>
|
|
@@ -263,6 +278,9 @@
|
|
|
<if test="state !=null and state != ''">
|
|
<if test="state !=null and state != ''">
|
|
|
and t.state= #{state}
|
|
and t.state= #{state}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="communityId !=null and communityId != ''">
|
|
|
|
|
+ and t.community_id= #{communityId}
|
|
|
|
|
+ </if>
|
|
|
|
|
|
|
|
|
|
|
|
|
</select>
|
|
</select>
|
|
@@ -325,6 +343,9 @@
|
|
|
<if test="state !=null and state != ''">
|
|
<if test="state !=null and state != ''">
|
|
|
and t.state= #{state}
|
|
and t.state= #{state}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="communityId !=null and communityId != ''">
|
|
|
|
|
+ and t.community_id= #{communityId}
|
|
|
|
|
+ </if>
|
|
|
|
|
|
|
|
|
|
|
|
|
</select>
|
|
</select>
|
|
@@ -392,6 +413,9 @@
|
|
|
<if test="state !=null and state != ''">
|
|
<if test="state !=null and state != ''">
|
|
|
and t.state= #{state}
|
|
and t.state= #{state}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="communityId !=null and communityId != ''">
|
|
|
|
|
+ and t.community_id= #{communityId}
|
|
|
|
|
+ </if>
|
|
|
AND NOT EXISTS(
|
|
AND NOT EXISTS(
|
|
|
SELECT 1 FROM building_owner_room_rel borr
|
|
SELECT 1 FROM building_owner_room_rel borr
|
|
|
WHERE borr.`status_cd` = '0'
|
|
WHERE borr.`status_cd` = '0'
|
|
@@ -464,6 +488,9 @@
|
|
|
<if test="state !=null and state != ''">
|
|
<if test="state !=null and state != ''">
|
|
|
and t.state= #{state}
|
|
and t.state= #{state}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="communityId !=null and communityId != ''">
|
|
|
|
|
+ and t.community_id= #{communityId}
|
|
|
|
|
+ </if>
|
|
|
AND EXISTS(
|
|
AND EXISTS(
|
|
|
SELECT 1 FROM building_owner_room_rel borr
|
|
SELECT 1 FROM building_owner_room_rel borr
|
|
|
WHERE borr.`status_cd` = '0'
|
|
WHERE borr.`status_cd` = '0'
|
|
@@ -532,6 +559,9 @@
|
|
|
<if test="state !=null and state != ''">
|
|
<if test="state !=null and state != ''">
|
|
|
and t.state= #{state}
|
|
and t.state= #{state}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="communityId !=null and communityId != ''">
|
|
|
|
|
+ and t.community_id= #{communityId}
|
|
|
|
|
+ </if>
|
|
|
AND NOT EXISTS(
|
|
AND NOT EXISTS(
|
|
|
SELECT 1 FROM building_owner_room_rel borr
|
|
SELECT 1 FROM building_owner_room_rel borr
|
|
|
WHERE borr.`status_cd` = '0'
|
|
WHERE borr.`status_cd` = '0'
|
|
@@ -602,6 +632,9 @@
|
|
|
<if test="state !=null and state != ''">
|
|
<if test="state !=null and state != ''">
|
|
|
and t.state= #{state}
|
|
and t.state= #{state}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="communityId !=null and communityId != ''">
|
|
|
|
|
+ and t.community_id= #{communityId}
|
|
|
|
|
+ </if>
|
|
|
AND EXISTS(
|
|
AND EXISTS(
|
|
|
SELECT 1 FROM building_owner_room_rel borr
|
|
SELECT 1 FROM building_owner_room_rel borr
|
|
|
WHERE borr.`status_cd` = '0'
|
|
WHERE borr.`status_cd` = '0'
|
|
@@ -680,6 +713,9 @@
|
|
|
<if test="state !=null and state != ''">
|
|
<if test="state !=null and state != ''">
|
|
|
and t.state= #{state}
|
|
and t.state= #{state}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="communityId !=null and communityId != ''">
|
|
|
|
|
+ and t.community_id= #{communityId}
|
|
|
|
|
+ </if>
|
|
|
<if test="page != -1 and page != null">
|
|
<if test="page != -1 and page != null">
|
|
|
limit #{page},#{row}
|
|
limit #{page},#{row}
|
|
|
</if>
|
|
</if>
|