| | |
| | | <!--过滤网格数据--> |
| | | <sql id="filterHouseGrid"> |
| | | <if test="houseParam.roleName!=null and houseParam.roleName!=''"> |
| | | <if test="houseParam.roleName=='网格员' and houseParam.userId!='1726859808689696770'"> |
| | | <if test="houseParam.roleName=='wgy' and houseParam.userId!='1726859808689696770'"> |
| | | <choose> |
| | | <when test="list != null and list.size()>0"> |
| | | and address_code in |
| | |
| | | <!--过滤社区数据--> |
| | | <sql id="filterCommunity"> |
| | | <if test="houseParam.roleName!=null and houseParam.roleName!=''"> |
| | | <if test="houseParam.roleName=='民警' and houseParam.userId!='1726859808689696770'"> |
| | | <if test="houseParam.roleName=='mj' and houseParam.userId!='1726859808689696770'"> |
| | | <choose> |
| | | <when test="communityList != null and communityList.size()>0"> |
| | | and nei_code in |
| | |
| | | |
| | | <!--过滤网格数据--> |
| | | <sql id="filterHouseGridByTownOrCommunity"> |
| | | <if test="houseParam.roleName!=null and houseParam.roleName!='' and houseParam.roleName!='系统管理员'"> |
| | | <if test="houseParam.roleName!=null and houseParam.roleName!='' and houseParam.roleName!='admin'"> |
| | | <choose> |
| | | <when test="houseParam.roleName=='网格员' and houseParam.userId!='1726859808689696770'"> |
| | | <when test="(houseParam.roleName=='wgy' or houseParam.roleName=='wzcj') and houseParam.userId!='1726859808689696770'"> |
| | | <choose> |
| | | <when test="list != null and list.size()>0"> |
| | | and jg.grid_code in |
| | |
| | | and br.name = '万达社区居民委员会' |
| | | </if> |
| | | <include refid="filterHouseGridByTownOrCommunity"/> |
| | | group by br.town_code,br.town_name |
| | | 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 |
| | | where jpag.is_deleted = 0 and br.town_code is not null |
| | | <include refid="filterCommunityByTownOrCommunity"/> |
| | | group by br.town_code,br.town_name |
| | | </select> |
| | | |
| | | <!--过滤社区数据--> |
| | | <sql id="filterCommunityByTownOrCommunity"> |
| | | <if test="houseParam.roleName!=null and houseParam.roleName!=''"> |
| | | <choose> |
| | | <when test="houseParam.roleName=='民警' and houseParam.userId!='1726859808689696770'"> |
| | | <when test="houseParam.roleName=='mj'"> |
| | | <choose> |
| | | <when test="communityList != null and communityList.size()>0"> |
| | | and jpag.jw_grid_code in |
| | |
| | | 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 |
| | | where jpag.is_deleted = 0 and br.village_code is not null |
| | | <include refid="filterCommunityByTownOrCommunity"/> |
| | | </select> |
| | | |
| | |
| | | </if> |
| | | limit 0,1000 |
| | | </select> |
| | | |
| | | <!--查询所有未匹配的网格范围地址数据--> |
| | | <select id="getDoorplateAddressDetailByHouseId" resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO"> |
| | | select |
| | | jda.* |
| | | from jczz_doorplate_address jda |
| | | left join jczz_house jh on jh.house_code = jda.address_code and jh.is_deleted = 0 |
| | | where 1=1 |
| | | and jh.id = #{houseId} |
| | | </select> |
| | | </mapper> |