zhongrj
2023-12-23 2bd69d1dca40d2fdf07f72e0117d2f0febde5359
src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
@@ -21,6 +21,25 @@
        </if>
    </sql>
    <!--过滤社区数据-->
    <sql id="filterCommunity">
        <if test="houseParam.roleName!=null and houseParam.roleName!=''">
            <if test="houseParam.roleName=='民警' and houseParam.userId!='1726859808689696770'">
                <choose>
                    <when test="communityList != null and communityList.size()>0">
                        and nei_code in
                        <foreach collection="communityList" item="neiCode" separator ="," open="("  close=")">
                            #{neiCode}
                        </foreach>
                    </when>
                    <otherwise>
                        and nei_code in ('')
                    </otherwise>
                </choose>
            </if>
        </if>
    </sql>
    <!--门牌地址详情查询-->
    <resultMap id="doorplateAddressDetailMap" type="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO"
               autoMapping="true">
@@ -56,6 +75,7 @@
            and nei_name = '万达社区居民委员会'
        </if>
        <include refid="filterHouseGrid"/>
        <include refid="filterCommunity"/>
        group by town_street_code,town_street_name
    </select>
@@ -67,6 +87,7 @@
            and nei_name = '万达社区居民委员会'
        </if>
        <include refid="filterHouseGrid"/>
        <include refid="filterCommunity"/>
        group by nei_code,nei_name,town_street_code
    </select>
@@ -83,6 +104,7 @@
            and nei_code = #{houseParam.code}
        </if>
        <include refid="filterHouseGrid"/>
        <include refid="filterCommunity"/>
        group by aoi_code,aoi_name
        union all
        (
@@ -97,6 +119,7 @@
            and nei_code = #{houseParam.code}
        </if>
        <include refid="filterHouseGrid"/>
        <include refid="filterCommunity"/>
        group by aoi_code,sub_aoi
        )
        union all
@@ -111,6 +134,7 @@
            and nei_code = #{houseParam.code}
        </if>
        <include refid="filterHouseGrid"/>
        <include refid="filterCommunity"/>
        group by nei_code
        )
        union all