| | |
| | | left join jczz_grid_range jgr on jgr.house_code = jh.house_code |
| | | left join jczz_grid jg on jg.id = jgr.grid_id and jg.is_deleted = 0 |
| | | left join blade_region br on br.code = jg.community_code |
| | | where jh.is_deleted = 0 |
| | | <where> |
| | | <if test="house.id != null ">and jh.id = #{house.id}</if> |
| | | <if test="house.streetCode != null and house.streetCode != ''"> |
| | | and jda.town_street_code like concat('%',#{house.streetCode},'%') |
| | |
| | | <if test="house.regionCode != null and house.regionCode !='' "> |
| | | and jg.community_code like concat('%',#{house.regionCode},'%') |
| | | </if> |
| | | <if test="house.parentId != null "> |
| | | and jh.house_code in ( |
| | | SELECT DISTINCT |
| | | juhl.house_code |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 2 |
| | | <if test="house.labelId != null "> |
| | | AND jl.id = #{house.labelId} |
| | | </if> |
| | | <if test="house.parentId != null "> |
| | | AND jl.parent_id = #{house.parentId} |
| | | </if> |
| | | AND juhl.label_id IS NOT NULL |
| | | ) |
| | | </if> |
| | | and jh.is_deleted = 0 |
| | | ORDER BY |
| | | jh.update_time DESC |
| | | </where> |
| | | |
| | | |
| | | </select> |
| | | |
| | | <!--房屋自定义详情查询--> |