吉安感知网项目-后端
rain
2026-01-13 2ba9230d91a80e81d8fa594b82bf886a4ed902f1
drone-service/drone-fw/src/main/java/org/sxkj/fw/area/mapper/FwDefenseZoneMapper.xml
@@ -30,7 +30,11 @@
        defense_scene_ids,
        area_divide_ids,
        device_ids,
        concat(ST_AsText(geom), ' | ', ST_SRID(geom)) as geom,
        case
            when geom is null then null
            when ST_SRID(geom) is null or ST_SRID(geom) = 0 then ST_AsText(geom)
            else concat(ST_AsText(ST_SwapXY(geom)), ' | ', ST_SRID(geom))
        end as geom,
        area_code,
        create_user,
        create_dept,
@@ -103,7 +107,11 @@
        defense_scene_ids,
        area_divide_ids,
        device_ids,
        concat(ST_AsText(geom), ' | ', ST_SRID(geom)) as geom,
        case
            when geom is null then null
            when ST_SRID(geom) is null or ST_SRID(geom) = 0 then ST_AsText(geom)
            else concat(ST_AsText(ST_SwapXY(geom)), ' | ', ST_SRID(geom))
        end as geom,
        area_code,
        create_user,
        create_dept,
@@ -164,12 +172,13 @@
            #{deviceIds},
            <choose>
                <when test="geom != null and geom != ''">
                    ST_SRID(
                        ST_GeomFromText(
                            trim(case when instr(#{geom}, '|') &gt; 0 then substring_index(#{geom}, '|', 1) else #{geom} end)
                        ),
                        case when instr(#{geom}, '|') &gt; 0 then cast(trim(substring_index(#{geom}, '|', -1)) as unsigned) else 4326 end
                    )
                    case
                        when instr(#{geom}, '|') &gt; 0 then ST_GeomFromText(
                            trim(substring_index(#{geom}, '|', 1)),
                            cast(trim(substring_index(#{geom}, '|', -1)) as unsigned)
                        )
                        else ST_GeomFromText(trim(#{geom}))
                    end
                </when>
                <otherwise>null</otherwise>
            </choose>,
@@ -193,12 +202,13 @@
            <if test="areaDivideIds != null">area_divide_ids = #{areaDivideIds},</if>
            <if test="deviceIds != null">device_ids = #{deviceIds},</if>
            <if test="geom != null and geom != ''">
                geom = ST_SRID(
                    ST_GeomFromText(
                        trim(case when instr(#{geom}, '|') &gt; 0 then substring_index(#{geom}, '|', 1) else #{geom} end)
                    ),
                    case when instr(#{geom}, '|') &gt; 0 then cast(trim(substring_index(#{geom}, '|', -1)) as unsigned) else 4326 end
                ),
                geom = case
                    when instr(#{geom}, '|') &gt; 0 then ST_GeomFromText(
                        trim(substring_index(#{geom}, '|', 1)),
                        cast(trim(substring_index(#{geom}, '|', -1)) as unsigned)
                    )
                    else ST_GeomFromText(trim(#{geom}))
                end,
            </if>
            <if test="areaCode != null">area_code = #{areaCode},</if>
            <if test="createUser != null">create_user = #{createUser},</if>