select id, public.st_asewkt(geom) AS geom, upload_id, geom_json, sort, geom_area from t_geom_db_details
insert into t_geom_db_details
id,
geom,
upload_id,
geom_json,
sort,
geom_area,
#{id},
public.st_transform(public.st_geomfromewkt(#{geom}), #{shpDbSRID}),
#{uploadId},
#{geomJson},
#{sort},
public.st_area(public.st_transform(public.st_geomfromewkt(#{geom}), #{shpAreaSRID})
::PUBLIC.geography
),
update t_geom_db_details
geom = #{geom},
upload_id = #{uploadId},
geom_json = #{geomJson},
sort = #{sort},
geom_area = #{geomArea},
where id = #{id}
delete from t_geom_db_details where id = #{id}
delete from t_geom_db_details where id in
#{id}
INSERT INTO vector.djzq (bsm, ysdm, djzqdm, djzqmc, bz, geom, valid_flag)
VALUES
(
#{item.bsm},
#{item.ysdm},
#{item.djzqdm},
#{item.djzqmc},
#{item.projectid},
public.st_transform(public.st_geomfromewkt(#{item.the_geom}), #{shpDbSRID})
null
,
1
)
INSERT INTO vector.djq (bsm, ysdm, djqdm, djqmc, bz, geom, valid_flag)
VALUES
(
#{item.bsm},
#{item.ysdm},
#{item.djqdm},
#{item.djqmc},
#{item.projectid},
public.st_transform(public.st_geomfromewkt(#{item.the_geom}), #{shpDbSRID})
null
,
1
)