|
@ -721,12 +721,19 @@ |
|
|
ih.HOUSE_TYPE houseType, |
|
|
ih.HOUSE_TYPE houseType, |
|
|
ih.PURPOSE, |
|
|
ih.PURPOSE, |
|
|
ih.RENT_FLAG, |
|
|
ih.RENT_FLAG, |
|
|
|
|
|
(case when ih.RENT_FLAG = '0' then '自住' |
|
|
|
|
|
when ih.RENT_FLAG = '1' then '出租' |
|
|
|
|
|
when ih.RENT_FLAG = '2' then '闲置' |
|
|
|
|
|
when ih.RENT_FLAG = '3' then '未出售' |
|
|
|
|
|
else '' end) as houseStatusName, |
|
|
ih.OWNER_NAME, |
|
|
ih.OWNER_NAME, |
|
|
ih.OWNER_PHONE, |
|
|
ih.OWNER_PHONE, |
|
|
|
|
|
ih.OWNER_PHONE as showOwnerPhone, |
|
|
ih.OWNER_ID_CARD, |
|
|
ih.OWNER_ID_CARD, |
|
|
|
|
|
ih.OWNER_ID_CARD as showOwnerIdCard, |
|
|
ih.REMARK, |
|
|
ih.REMARK, |
|
|
(select count(r.ID) |
|
|
(select count(r.ID) |
|
|
from lingshan_lianhu_house_rel r |
|
|
from lingshan_party_center_house_lianhu r |
|
|
where r.PARTY_CENTER_HOUSE_ID=ih.ID |
|
|
where r.PARTY_CENTER_HOUSE_ID=ih.ID |
|
|
and r.DEL_FLAG='0' |
|
|
and r.DEL_FLAG='0' |
|
|
)as totalLianHu |
|
|
)as totalLianHu |
|
@ -742,14 +749,23 @@ |
|
|
ih.DEL_FLAG = '0' |
|
|
ih.DEL_FLAG = '0' |
|
|
AND b.DEL_FLAG = '0' |
|
|
AND b.DEL_FLAG = '0' |
|
|
AND h.DEL_FLAG = '0' |
|
|
AND h.DEL_FLAG = '0' |
|
|
|
|
|
<if test="partyCenterHouseFlag != null and partyCenterHouseFlag.trim() != ''"> |
|
|
AND ih.PARTY_CENTER_HOUSE_FLAG='1' |
|
|
AND ih.PARTY_CENTER_HOUSE_FLAG='1' |
|
|
AND (h.AGENCY_ID=#{agencyId} or h.AGENCY_PIDS like concat('%',#{agencyId},'%') ) |
|
|
</if> |
|
|
<if test="neighborHoodName != null and neighborHoodName.trim() != ''"> |
|
|
<if test="neighborHoodName != null and neighborHoodName.trim() != ''"> |
|
|
and h.NEIGHBOR_HOOD_NAME like concat('%',#{neighborHoodName},'%') |
|
|
and h.NEIGHBOR_HOOD_NAME like concat('%',#{neighborHoodName},'%') |
|
|
</if> |
|
|
</if> |
|
|
<if test="buildingName != null and buildingName.trim() != ''"> |
|
|
<if test="buildingName != null and buildingName.trim() != ''"> |
|
|
and b.BUILDING_NAME like concat('%',#{buildingName},'%') |
|
|
and b.BUILDING_NAME like concat('%',#{buildingName},'%') |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
<if test="buildingId != null and buildingId.trim() != ''"> |
|
|
|
|
|
and b.id = #{buildingId} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="null == buildingId or '' == buildingId "> |
|
|
|
|
|
<if test="agencyId != null and agencyId.trim() != ''"> |
|
|
|
|
|
AND (h.AGENCY_ID=#{agencyId} or h.AGENCY_PIDS like concat('%',#{agencyId},'%') ) |
|
|
|
|
|
</if> |
|
|
|
|
|
</if> |
|
|
order by ca.CREATED_TIME asc,cg.CREATED_TIME asc,h.CREATED_TIME asc |
|
|
order by ca.CREATED_TIME asc,cg.CREATED_TIME asc,h.CREATED_TIME asc |
|
|
</select> |
|
|
</select> |
|
|
</mapper> |
|
|
</mapper> |
|
|