吉安感知网项目-后端
linwei
yesterday 51a551a7f8eae7654f973d45cd2fa2952774673d
drone-service/drone-fw/src/main/java/org/sxkj/fw/area/mapper/FwDefenseZoneMapper.xml
@@ -63,8 +63,8 @@
        ad.area_size,
        case
            when ad.geom is null then null
            when ST_SRID(ad.geom) is null or ST_SRID(ad.geom) = 0 then ST_AsText(ad.geom)
            else concat(ST_AsText(ST_SwapXY(ad.geom)), ' | ', ST_SRID(ad.geom))
            when ST_SRID(ad.geom) is null or ST_SRID(ad.geom) = 0 then public.st_astext(ad.geom)
            else concat(public.st_astext(ST_SwapXY(ad.geom)), ' | ', ST_SRID(ad.geom))
        end as geom,
        ad.area_type,
        ad.trigger_condition,
@@ -91,12 +91,12 @@
            and dz.id = #{zoneId}
            and dz.defense_scene_ids is not null
            and dz.defense_scene_ids != ''
            and find_in_set(ds.id, replace(dz.defense_scene_ids, ' ', ''))
            and ds.id = ANY(string_to_array(replace(dz.defense_scene_ids, ' ', ''), ',')::bigint[])
        join ja_fw_area_divide ad on ad.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, ' ', ''))
        left join ja_fw_police_station ps on ps.id = ad.police_station_id::VARCHAR and ps.is_deleted = 0
            and ad.id = ANY(string_to_array(replace(ds.area_divide_ids, ' ', ''), ',')::bigint[])
        left join ja_fw_police_station ps on ps.id::VARCHAR = ad.police_station_id::VARCHAR and ps.is_deleted = 0
    </select>
@@ -110,8 +110,8 @@
        device_ids,
        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))
            when ST_SRID(geom) is null or ST_SRID(geom) = 0 then public.st_astext(geom)
            else concat(public.st_astext(ST_SwapXY(geom)), ' | ', ST_SRID(geom))
        end as geom,
        area_code,
        create_user,
@@ -187,8 +187,8 @@
        device_ids,
        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))
            when ST_SRID(geom) is null or ST_SRID(geom) = 0 then public.st_astext(geom)
            else concat(public.st_astext(ST_SwapXY(geom)), ' | ', ST_SRID(geom))
        end as geom,
        area_code,
        create_user,
@@ -212,7 +212,7 @@
        defense_scene_ids,
        area_divide_ids,
        device_ids,
        concat(ST_AsText(geom), ' | ', ST_SRID(geom)) as geom,
        concat(public.st_astext(geom), ' | ', ST_SRID(geom)) as geom,
        area_code,
        create_user,
        create_dept,
@@ -266,8 +266,8 @@
            #{createTime},
            #{updateUser},
            #{updateTime},
            IFNULL(#{status}, '0'),
            IFNULL(#{isDeleted}, 0)
        COALESCE(#{status}, '0'),
        COALESCE(#{isDeleted}, 0)
        )
    </insert>