|
@ -154,7 +154,7 @@ |
|
|
b.BUILDING_NAME as buildingName, |
|
|
b.BUILDING_NAME as buildingName, |
|
|
d.UNIT_NUM as unitNum, |
|
|
d.UNIT_NUM as unitNum, |
|
|
a.DOOR_NAME as doorName, |
|
|
a.DOOR_NAME as doorName, |
|
|
if(a.RENT_FLAG=1,'是','否') as rentFlag, |
|
|
if(a.RENT_FLAG=0,'自住',if(a.RENT_FLAG=1,'出租','闲置')) as rentFlag, |
|
|
a.OWNER_NAME as ownerName, |
|
|
a.OWNER_NAME as ownerName, |
|
|
/*a.RENT_FLAG as rentFlag, |
|
|
/*a.RENT_FLAG as rentFlag, |
|
|
a.PURPOSE as purpose,*/ |
|
|
a.PURPOSE as purpose,*/ |
|
@ -175,16 +175,26 @@ |
|
|
LEFT JOIN ic_neighbor_hood c on a.NEIGHBOR_HOOD_ID = c.ID and c.DEL_FLAG = '0' |
|
|
LEFT JOIN ic_neighbor_hood c on a.NEIGHBOR_HOOD_ID = c.ID and c.DEL_FLAG = '0' |
|
|
LEFT JOIN ic_building_unit d on a.BUILDING_UNIT_ID = d.ID and d.DEL_FLAG = '0' |
|
|
LEFT JOIN ic_building_unit d on a.BUILDING_UNIT_ID = d.ID and d.DEL_FLAG = '0' |
|
|
<where> |
|
|
<where> |
|
|
a.del_flag = '0' |
|
|
a.del_flag = '0' |
|
|
<if test="pids != null and pids != ''"> |
|
|
<if test="pids != null and pids != ''"> |
|
|
and case c.AGENCY_PIDS |
|
|
and case c.AGENCY_PIDS when '' then CONCAT(c.AGENCY_ID) like CONCAT(#{pids}, '%') |
|
|
when '' then CONCAT(c.AGENCY_ID) like CONCAT(#{pids}, '%') |
|
|
else CONCAT(c.AGENCY_PIDS, ':', c.AGENCY_ID) like CONCAT(#{pids}, '%') end |
|
|
else CONCAT(c.AGENCY_PIDS, ':', c.AGENCY_ID) like CONCAT(#{pids}, '%') |
|
|
|
|
|
end |
|
|
|
|
|
</if> |
|
|
</if> |
|
|
<if test="buildingId != null and buildingId.trim() != ''"> |
|
|
<if test="buildingId != null and buildingId.trim() != ''"> |
|
|
AND a.BUILDING_ID = #{buildingId} |
|
|
AND a.BUILDING_ID = #{buildingId} |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
<if test='level == "grid"'> |
|
|
|
|
|
AND c.GRID_ID = #{id} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test='level == "neighborHood"'> |
|
|
|
|
|
AND c.id = #{id} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test='level == "build"'> |
|
|
|
|
|
AND b.id = #{id} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="rentFlag != null and rentFlag.trim() != ''"> |
|
|
|
|
|
AND a.RENT_FLAG = #{rentFlag} |
|
|
|
|
|
</if> |
|
|
<if test="ownerName != null and ownerName.trim() != ''"> |
|
|
<if test="ownerName != null and ownerName.trim() != ''"> |
|
|
AND a.OWNER_NAME like concat('%',#{ownerName},'%') |
|
|
AND a.OWNER_NAME like concat('%',#{ownerName},'%') |
|
|
</if> |
|
|
</if> |
|
@ -197,6 +207,9 @@ |
|
|
<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="rentFlag != null and rentFlag.trim() != ''"> |
|
|
|
|
|
AND a.rent_flag = #{rentFlag} |
|
|
|
|
|
</if> |
|
|
</where> |
|
|
</where> |
|
|
/*排序规则:如果是社区查询则根据小区、楼栋、单元、房屋名字分别升序排序*/ |
|
|
/*排序规则:如果是社区查询则根据小区、楼栋、单元、房屋名字分别升序排序*/ |
|
|
<choose> |
|
|
<choose> |
|
@ -220,7 +233,7 @@ |
|
|
a.DOOR_NAME as doorName, |
|
|
a.DOOR_NAME as doorName, |
|
|
a.HOUSE_TYPE as houseType, |
|
|
a.HOUSE_TYPE as houseType, |
|
|
a.PURPOSE as purpose, |
|
|
a.PURPOSE as purpose, |
|
|
if(a.RENT_FLAG=1,'是','否') as rentFlag, |
|
|
if(a.RENT_FLAG=0,'自住',if(a.RENT_FLAG=1,'出租','闲置')) as rentFlag, |
|
|
a.OWNER_NAME as ownerName, |
|
|
a.OWNER_NAME as ownerName, |
|
|
a.OWNER_PHONE as ownerPhone, |
|
|
a.OWNER_PHONE as ownerPhone, |
|
|
a.OWNER_ID_CARD as ownerIdCard, |
|
|
a.OWNER_ID_CARD as ownerIdCard, |
|
|