| | |
| | | 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, |
| | |
| | | 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> |
| | | |
| | | |
| | |
| | | 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, |
| | |
| | | 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, |
| | |
| | | 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, |
| | |
| | | #{createTime}, |
| | | #{updateUser}, |
| | | #{updateTime}, |
| | | IFNULL(#{status}, '0'), |
| | | IFNULL(#{isDeleted}, 0) |
| | | COALESCE(#{status}, '0'), |
| | | COALESCE(#{isDeleted}, 0) |
| | | ) |
| | | </insert> |
| | | |