| | |
| | | </if> |
| | | </sql> |
| | | |
| | | |
| | | |
| | | <!--过滤社区数据--> |
| | | <sql id="filterCommunity"> |
| | | <if test="houseParam.roleName!=null and houseParam.roleName!=''"> |
| | |
| | | </if> |
| | | </if> |
| | | </sql> |
| | | |
| | | |
| | | <!--门牌地址详情查询--> |
| | | <resultMap id="doorplateAddressDetailMap" type="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO" |
| | |
| | | |
| | | |
| | | <!--查询区域数据-街道--> |
| | | <select id="getRegionListByGroupTwon" resultType="org.springblade.common.node.TreeStringNode" > |
| | | select town_street_code as id,town_street_name as name from jczz_doorplate_address |
| | | where 1=1 |
| | | <if test="houseParam.userId!=null and houseParam.userId!='' and houseParam.userId=='1726859808689696770'"> |
| | | and nei_name = '万达社区居民委员会' |
| | | <!-- <select id="getRegionListByGroupTwon" resultType="org.springblade.common.node.TreeStringNode" >--> |
| | | <!-- select town_street_code as id,town_street_name as name from jczz_doorplate_address--> |
| | | <!-- where 1=1--> |
| | | <!-- <if test="houseParam.userId!=null and houseParam.userId!='' and houseParam.userId=='1726859808689696770'">--> |
| | | <!-- and nei_name = '万达社区居民委员会'--> |
| | | <!-- </if>--> |
| | | <!-- <include refid="filterHouseGrid"/>--> |
| | | <!-- <include refid="filterCommunity"/>--> |
| | | <!-- group by town_street_code,town_street_name--> |
| | | <!-- </select>--> |
| | | |
| | | <!--过滤网格数据--> |
| | | <sql id="filterHouseGridByTownOrCommunity"> |
| | | <if test="houseParam.roleName!=null and houseParam.roleName!='' and houseParam.roleName!='系统管理员'"> |
| | | <choose> |
| | | <when test="houseParam.roleName=='网格员' and houseParam.userId!='1726859808689696770'"> |
| | | <choose> |
| | | <when test="list != null and list.size()>0"> |
| | | and jg.grid_code in |
| | | <foreach collection="list" item="gridCode" separator ="," open="(" close=")"> |
| | | #{gridCode} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and jg.grid_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </when> |
| | | <otherwise> |
| | | and jg.grid_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | <include refid="filterHouseGrid"/> |
| | | <include refid="filterCommunity"/> |
| | | group by town_street_code,town_street_name |
| | | </sql> |
| | | |
| | | <!--查询区域数据-街道--> |
| | | <select id="getRegionListByGroupTwon" resultType="org.springblade.common.node.TreeStringNode" > |
| | | select br.town_code as id,br.town_name as name from jczz_grid jg |
| | | left join blade_region br on jg.community_code = br.code |
| | | where jg.is_deleted = 0 |
| | | <if test="houseParam.userId!=null and houseParam.userId!='' and houseParam.userId=='1726859808689696770'"> |
| | | and br.name = '万达社区居民委员会' |
| | | </if> |
| | | <include refid="filterHouseGridByTownOrCommunity"/> |
| | | union |
| | | select br.town_code as id,br.town_name as name from jczz_police_affairs_grid jpag |
| | | left join blade_region br on jpag.community_code = br.code |
| | | where jpag.is_deleted = 0 |
| | | <include refid="filterCommunityByTownOrCommunity"/> |
| | | </select> |
| | | |
| | | <!--过滤社区数据--> |
| | | <sql id="filterCommunityByTownOrCommunity"> |
| | | <if test="houseParam.roleName!=null and houseParam.roleName!=''"> |
| | | <choose> |
| | | <when test="houseParam.roleName=='民警' and houseParam.userId!='1726859808689696770'"> |
| | | <choose> |
| | | <when test="communityList != null and communityList.size()>0"> |
| | | and br.code in |
| | | <foreach collection="communityList" item="code" separator ="," open="(" close=")"> |
| | | #{code} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and br.code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </when> |
| | | <otherwise> |
| | | and br.code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | </sql> |
| | | |
| | | <!--查询区域数据-社区--> |
| | | <select id="getRegionListByGroupNei" resultType="org.springblade.common.node.TreeStringNode" > |
| | | select nei_code as id,nei_name as name,town_street_code as parentId from jczz_doorplate_address |
| | | where 1=1 |
| | | select br.village_code as id,br.village_name as name,br.town_code as parentId from jczz_grid jg |
| | | left join blade_region br on jg.community_code = br.code |
| | | where jg.is_deleted = 0 |
| | | <if test="houseParam.userId!=null and houseParam.userId!='' and houseParam.userId=='1726859808689696770'"> |
| | | and nei_name = '万达社区居民委员会' |
| | | </if> |
| | | <include refid="filterHouseGrid"/> |
| | | <include refid="filterCommunity"/> |
| | | group by nei_code,nei_name,town_street_code |
| | | <include refid="filterHouseGridByTownOrCommunity"/> |
| | | union |
| | | select br.village_code as id,br.village_name as name,br.town_code as parentId from jczz_police_affairs_grid jpag |
| | | left join blade_region br on jpag.community_code = br.code |
| | | where jpag.is_deleted = 0 |
| | | <include refid="filterCommunityByTownOrCommunity"/> |
| | | </select> |
| | | |
| | | <!--根据社区名称查询小区集合--> |