吉安感知网项目-后端
rain
2026-01-21 8d5b8a8c1909be6cdca5228a01bdc017b85a4078
drone-service/drone-fw/src/main/java/org/sxkj/fw/area/mapper/FwDefenseSceneMapper.xml
@@ -3,7 +3,7 @@
<mapper namespace="org.sxkj.fw.area.mapper.FwDefenseSceneMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="fwDefenseSceneResultMap" type="org.sxkj.fw.area.entity.FwDefenseSceneEntity">
    <resultMap id="fwDefenseSceneResultMap" type="org.sxkj.fw.area.vo.FwDefenseSceneVO">
        <result column="id" property="id"/>
        <result column="scene_name" property="sceneName"/>
        <result column="scene_type" property="sceneType"/>
@@ -14,7 +14,6 @@
        <result column="defense_area" property="defenseArea"/>
        <result column="device_mode" property="deviceMode"/>
        <result column="area_divide_ids" property="areaDivideIds"/>
        <result column="device_ids" property="deviceIds"/>
        <result column="area_code" property="areaCode"/>
        <result column="create_user" property="createUser"/>
        <result column="create_dept" property="createDept"/>
@@ -60,9 +59,6 @@
            <if test="param2.areaDivideIds != null and param2.areaDivideIds != ''">
                and area_divide_ids = #{param2.areaDivideIds}
            </if>
            <if test="param2.deviceIds != null and param2.deviceIds != ''">
                and device_ids = #{param2.deviceIds}
            </if>
            <if test="param2.areaCode != null and param2.areaCode != ''">
                and area_code = #{param2.areaCode}
            </if>
@@ -87,6 +83,41 @@
        </where>
    </select>
    <select id="selectFwDefenseSceneList" resultMap="fwDefenseSceneResultMap">
        select ds.* from ja_fw_defense_scene ds
        <where>
            ds.is_deleted = 0
            <if test="filterSelected != null and filterSelected == 1">
                and (
                    not exists (
                        select 1
                        from ja_fw_defense_zone dz
                        where dz.is_deleted = 0
                          and dz.defense_scene_ids is not null
                          and dz.defense_scene_ids != ''
                          and find_in_set(ds.id, dz.defense_scene_ids)
                    )
                    <if test="zoneId != null">
                        or exists (
                            select 1
                            from ja_fw_defense_zone dz
                            where dz.is_deleted = 0
                              and dz.id = #{zoneId}
                              and dz.defense_scene_ids is not null
                              and dz.defense_scene_ids != ''
                              and find_in_set(ds.id, dz.defense_scene_ids)
                        )
                    </if>
                )
            </if>
            <if test="areaId != null and (filterSelected == null or filterSelected != 1)">
                and ds.area_divide_ids is not null
                and ds.area_divide_ids != ''
                and find_in_set(#{areaId}, replace(ds.area_divide_ids, ' ', ''))
            </if>
        </where>
    </select>
    <select id="exportFwDefenseScene" resultType="org.sxkj.fw.area.excel.FwDefenseSceneExcel">
        SELECT * FROM ja_fw_defense_scene ${ew.customSqlSegment}