吉安感知网项目-后端
rain
2026-01-13 f0ad850a7a962dcf53c6c88e31de4bc2b1e20457
drone-service/drone-fw/src/main/java/org/sxkj/fw/area/mapper/FwAreaDivideMapper.xml
@@ -156,9 +156,18 @@
        left join ja_fw_police_station ps on ps.id = ad.police_station_id and ps.is_deleted = 0
        <where>
            ad.is_deleted = 0
            <choose>
                <when test="sceneId != null">
                    and exists (
            <if test="filterSelected != null and filterSelected == 1">
                and (
                    not exists (
                        select 1
                        from ja_fw_defense_scene ds
                        where ds.is_deleted = 0
                          and ds.area_divide_ids is not null
                          and ds.area_divide_ids != ''
                          and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', ''))
                    )
                    <if test="sceneId != null">
                        or exists (
                        select 1
                        from ja_fw_defense_scene ds
                        where ds.is_deleted = 0
@@ -167,18 +176,9 @@
                          and ds.area_divide_ids != ''
                          and find_in_set(ad.id, replace(ds.area_divide_ids, ' ', ''))
                    )
                </when>
                <when test="filterSelected != null and filterSelected == 1">
                    and not exists (
                        select 1
                        from ja_fw_defense_scene ds
                        where ds.is_deleted = 0
                          and ds.area_divide_ids is not null
                          and ds.area_divide_ids != ''
                          and find_in_set(ad.id, ds.area_divide_ids)
                    </if>
                    )
                </when>
            </choose>
            </if>
        </where>
    </select>