zhongrj
2024-04-02 566e7986291e73051d30ee252b0ebf852b1577a7
src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
@@ -129,18 +129,18 @@
                <when test="houseParam.roleName=='民警' and houseParam.userId!='1726859808689696770'">
                    <choose>
                        <when test="communityList != null and communityList.size()>0">
                            and br.code in
                            and jpag.jw_grid_code in
                            <foreach collection="communityList" item="code" separator ="," open="("  close=")">
                                #{code}
                            </foreach>
                        </when>
                        <otherwise>
                            and br.code in ('')
                            and jpag.jw_grid_code in ('')
                        </otherwise>
                    </choose>
                </when>
                <otherwise>
                    and br.code in ('')
                    and jpag.jw_grid_code in ('')
                </otherwise>
            </choose>
        </if>
@@ -700,4 +700,40 @@
        </if>
        limit 0,1000
    </select>
    <!--查询网格范围表未绑定的地址表信息数量-->
    <select id="getNotBindGridRangeDoorListCount" resultType="java.lang.Integer">
        select count(*) from jczz_doorplate_address jda
        left join jczz_grid_range jgr on jgr.house_code = jda.address_code
        where 1=1
        and jgr.house_code is null
        <if test="townName!=null and townName!=''">
            and jda.town_street_name like concat('%',#{townName},'%')
        </if>
        <if test="communityName!=null and communityName!=''">
            and jda.nei_name like concat('%',#{communityName},'%')
        </if>
        limit 0,1000
    </select>
    <!--查询所有未匹配的网格范围地址数据-->
    <select id="getNotBindGridRangeDoorList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
        select
        jda.address_code,
        jda.aoi_code,
        jda.building_code,
        jda.x,
        jda.y
        from jczz_doorplate_address jda
        left join jczz_grid_range jgr on jgr.house_code = jda.address_code
        where 1=1
        and jgr.house_code is null
        <if test="townName!=null and townName!=''">
            and jda.town_street_name like concat('%',#{townName},'%')
        </if>
        <if test="communityName!=null and communityName!=''">
            and jda.nei_name like concat('%',#{communityName},'%')
        </if>
        limit 0,1000
    </select>
</mapper>