| | |
| | | and floor != '' |
| | | and house_name != '' |
| | | and doorplate_type = '户室牌' |
| | | and building_code = #{code} |
| | | and building_code = #{houseParam.code} |
| | | <include refid="filterHouseGrid"/> |
| | | ) |
| | | union all |
| | | ( |
| | |
| | | '' as realName,'' as roleType,2 as addressType |
| | | from jczz_doorplate_address |
| | | where 1=1 |
| | | and building_code = #{code} |
| | | and building_code = #{houseParam.code} |
| | | and building_name != '' |
| | | and (doorplate_type = '小门牌' or (doorplate_type = '中门牌' and address_level = 1)) |
| | | <include refid="filterHouseGrid"/> |
| | | ) |
| | | </select> |
| | | |
| | |
| | | IFNULL(CONCAT(doorplate_num,sub_door_plate_no), IF(doorplate_num IS NULL, sub_door_plate_no, doorplate_num)) as floor |
| | | from jczz_doorplate_address |
| | | where 1=1 |
| | | and street_ru_code = #{code} |
| | | and nei_code = #{name} |
| | | and street_ru_code = #{houseParam.code} |
| | | and nei_code = #{houseParam.name} |
| | | and aoi_code is null |
| | | <include refid="filterHouseGrid"/> |
| | | order by doorplate_num,sub_door_plate_no |
| | | </select> |
| | | |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <!--查询社区信息--> |
| | | <select id="getAllDoorplateAddress" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity"> |
| | | select * from jczz_doorplate_address where nei_name = #{name} |
| | | </select> |
| | | |
| | | <!--获取房屋树--> |
| | | <select id="getHouseTree" resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVOTree"> |
| | | SELECT |
| | | aoi_code as code, |
| | | aoi_name as name, |
| | | nei_code as parentCode |
| | | FROM jczz_doorplate_address |
| | | WHERE nei_code = #{houseParam.code} |
| | | and aoi_code is not null and aoi_code !='' |
| | | and aoi_name is not null and aoi_name !='' |
| | | GROUP BY aoi_code,aoi_name,nei_code |
| | | <include refid="filterHouseGrid"/> |
| | | union all |
| | | ( |
| | | SELECT |
| | | building_code as code, |
| | | building_name as name, |
| | | aoi_code as parentCode |
| | | FROM jczz_doorplate_address |
| | | WHERE nei_code = #{houseParam.code} |
| | | and building_code is not null and building_code !='' |
| | | and building_name is not null and building_name !='' |
| | | GROUP BY building_code,building_name,aoi_code |
| | | <include refid="filterHouseGrid"/> |
| | | ) |
| | | union all |
| | | ( |
| | | select |
| | | jda.unit_code as code, |
| | | ifnull(jda.unit_name,"一单元") name, |
| | | jda.building_code as parentCode |
| | | from jczz_doorplate_address jda |
| | | where 1=1 |
| | | and floor != '' |
| | | and house_name != '' |
| | | and doorplate_type = '户室牌' |
| | | and nei_code = #{houseParam.code} |
| | | <include refid="filterHouseGrid"/> |
| | | group by unit_name,unit_code,building_code |
| | | ) |
| | | union all |
| | | ( |
| | | select |
| | | jda.address_code as code, |
| | | jda.house_name as name, |
| | | jda.unit_code as parentCode |
| | | from jczz_doorplate_address jda |
| | | where 1=1 |
| | | and floor != '' |
| | | and house_name != '' |
| | | and doorplate_type = '户室牌' |
| | | and nei_code = #{houseParam.code} |
| | | <include refid="filterHouseGrid"/> |
| | | ) |
| | | </select> |
| | | |
| | | <!--查询所有户室数据--> |
| | | <select id="getHouseList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity"> |
| | | select * from jczz_doorplate_address |
| | | where 1=1 and doorplate_type = '户室牌' |
| | | and address_code not in ( |
| | | select house_code from jczz_house |
| | | ) |
| | | </select> |
| | | |
| | | </mapper> |