吉安感知网项目-后端
zhongrj
2026-02-04 67397f33249a996c124e2e561e53c1f19974e1cb
drone-service/drone-fw/src/main/java/org/sxkj/fw/area/mapper/FwAreaDivideMapper.xml
@@ -454,6 +454,39 @@
        FROM ja_fw_area_divide ${ew.customSqlSegment}
    </select>
    <select id="selectFwAreaDivideListCockpit" resultType="org.sxkj.fw.area.vo.FwAreaDivideVO">
        select
        ad.*,
        ps.station_name as police_station_name,
        ps.contact_person as police_station_contact_person,
        ps.contact_phone as police_station_contact_phone
        from ja_fw_area_divide ad
        left join ja_fw_police_station ps on ps.id = ad.police_station_id and ps.is_deleted = 0
        inner join (
                SELECT
                    d.id
                FROM
                    ja_fw_device d
                WHERE
                    d.is_deleted = 0
                    AND d.is_enabled = 1
                    AND d.final_outbound_area IS NOT NULL
                <if test="regionCode != null and regionCode != ''">
                    and ( d.final_outbound_area_code like concat(#{regionCode},'%')
                    <if test="currentDeptId != null and currentDeptId != '' ">
                        or d.id in (
                        SELECT device_id FROM ja_fw_device_per_share
                        WHERE loan_to_dept_id = #{currentDeptId}
                        AND is_deleted = 0
                        )
                    </if>
                    )
                </if>
                GROUP BY
                    d.id
        ) dd on find_in_set(dd.id, ad.device_ids)
    </select>
    <insert id="insertWithGeom" parameterType="org.sxkj.fw.area.entity.FwAreaDivideEntity" useGeneratedKeys="true" keyProperty="id">
        insert into ja_fw_area_divide (
            id,