| | |
| | | <select id="getDistrictList" resultType="org.springblade.common.node.TreeNode" > |
| | | select aoi_code as id,aoi_name as name from jczz_doorplate_address |
| | | where 1=1 |
| | | and nei_name = #{name} |
| | | and aoi_name !='' |
| | | and aoi_code !='' |
| | | <if test="name != null and name!=''"> |
| | | and nei_name = #{name} |
| | | </if> |
| | | <if test="code != null and code!=''"> |
| | | and nei_code = #{code} |
| | | </if> |
| | | group by aoi_code,aoi_name |
| | | union all |
| | | ( |
| | | select aoi_code as id,sub_aoi as name from jczz_doorplate_address |
| | | where 1=1 |
| | | and aoi_code !='' |
| | | and sub_aoi != '' |
| | | <if test="name != null and name!=''"> |
| | | and nei_name = #{name} |
| | | </if> |
| | | <if test="code != null and code!=''"> |
| | | and nei_code = #{code} |
| | | </if> |
| | | group by aoi_code,sub_aoi |
| | | ) |
| | | union all |
| | | ( |
| | | select nei_code as id,'自建房/商铺' as name from jczz_doorplate_address |
| | | where 1=1 |
| | | and aoi_code is null |
| | | <if test="name != null and name!=''"> |
| | | and nei_name = #{name} |
| | | </if> |
| | | <if test="code != null and code!=''"> |
| | | and nei_code = #{code} |
| | | </if> |
| | | group by nei_code |
| | | ) |
| | | </select> |
| | | |
| | | <!--根据社区名称查询楼栋集合--> |
| | | <!--根据小区名称查询楼栋集合--> |
| | | <select id="getBuildingList" resultType="org.springblade.common.node.TreeNode" > |
| | | select building_code as id,building_name as name from jczz_doorplate_address |
| | | select building_code as id,building_name as name,1 as addressType from jczz_doorplate_address |
| | | where 1=1 |
| | | and aoi_code = #{code} |
| | | and building_code !='' |
| | |
| | | </select> |
| | | <select id="getDistrictVOTreeList" |
| | | resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVOTree"> |
| | | SELECT district_code as code,district_name as name |
| | | SELECT aoi_code as code,aoi_name as name |
| | | FROM jczz_doorplate_address |
| | | WHERE street_ru_code =#{code} |
| | | and district_code is not null and district_code !='' |
| | | and district_name is not null and district_name !='' |
| | | GROUP BY district_code,district_name |
| | | and aoi_code is not null and aoi_code !='' |
| | | and aoi_name is not null and aoi_name !='' |
| | | GROUP BY aoi_code,aoi_name |
| | | </select> |
| | | <select id="getBuildingVOTreeList" |
| | | resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVOTree"> |
| | | SELECT building_code as code,building_name as name |
| | | FROM jczz_doorplate_address |
| | | WHERE district_code =#{code} |
| | | WHERE aoi_code =#{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 |
| | | </select> |
| | | |
| | | <!--根据社区查询街路巷集合--> |
| | | <select id="getStreetRuList" resultType="org.springblade.common.node.TreeNode" > |
| | | select street_ru_code as id,street_ru_name as name,2 as addressType from jczz_doorplate_address |
| | | where 1=1 |
| | | and aoi_code is null |
| | | <if test="name != null and name!=''"> |
| | | and nei_name = #{name} |
| | | </if> |
| | | <if test="code != null and code!=''"> |
| | | and nei_code = #{code} |
| | | </if> |
| | | group by street_ru_code,street_ru_name |
| | | </select> |
| | | |
| | | <!--根据街路巷编号查询街路巷门牌名称集合--> |
| | | <select id="getDoorplateNameList" resultType="org.springblade.modules.doorplateAddress.vo.FuncNode"> |
| | | select address_code as addressCode,doorplate_name as houseNo from jczz_doorplate_address |
| | | where 1=1 |
| | | and street_ru_code = #{code} |
| | | and nei_code = #{name} |
| | | and aoi_code is null |
| | | </select> |
| | | |
| | | </mapper> |