| | |
| | | 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> |