|
|
@@ -120,4 +120,84 @@
|
|
|
LIMIT 1
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ <insert id="insertTableData" parameterType="map">
|
|
|
+ INSERT INTO vector.${tableName}
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="data.xmmc != null">xmmc,</if>
|
|
|
+ <if test="data.sccb != null">sccb,</if>
|
|
|
+ <if test="data.scsj != null">scsj,</if>
|
|
|
+ <if test="data.scnf != null">scnf,</if>
|
|
|
+ <if test="data.tdyyt != null">tdyyt,</if>
|
|
|
+ <if test="data.ghyt != null">ghyt,</if>
|
|
|
+ <if test="data.mj_m != null">mj_m,</if>
|
|
|
+ <if test="data.scfs != null">scfs,</if>
|
|
|
+ <if test="data.dkmc != null">dkmc,</if>
|
|
|
+ <if test="data.xzqmc != null">xzqmc,</if>
|
|
|
+ <if test="data.wz != null">wz,</if>
|
|
|
+ <if test="data.jhxzmj != null">jhxzmj,</if>
|
|
|
+ <if test="data.yscmj != null">yscmj,</if>
|
|
|
+ <if test="data.bndscmj != null">bndscmj,</if>
|
|
|
+ <if test="data.qqkf != null">qqkf,</if>
|
|
|
+ <if test="data.bndkfmj != null">bndkfmj,</if>
|
|
|
+ <if test="data.bndwccb != null">bndwccb,</if>
|
|
|
+ <if test="data.ngymj != null">ngymj,</if>
|
|
|
+ <if test="data.ngysj != null">ngysj,</if>
|
|
|
+ <if test="data.gyfs != null">gyfs,</if>
|
|
|
+ <if test="data.yjgysr != null">yjgysr,</if>
|
|
|
+ <if test="data.mj_12 != null">mj_12,</if>
|
|
|
+ <if test="data.xzqdm != null">xzqdm,</if>
|
|
|
+ <if test="data.dzjgh != null">dzjgh,</if>
|
|
|
+ <if test="data.htbh != null">htbh,</if>
|
|
|
+ <if test="data.htmc != null">htmc,</if>
|
|
|
+ <if test="data.qdrq != null">qdrq,</if>
|
|
|
+ <if test="data.the_geom != null">geom,</if>
|
|
|
+ <if test="data.source_type != null">source_type,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="data.xmmc != null">#{data.xmmc}::varchar,</if>
|
|
|
+ <if test="data.sccb != null">#{data.sccb}::numeric(18,4),</if>
|
|
|
+ <if test="data.scsj != null">#{data.scsj}::date,</if>
|
|
|
+ <if test="data.scnf != null">#{data.scnf}::varchar,</if>
|
|
|
+ <if test="data.tdyyt != null">#{data.tdyyt}::varchar,</if>
|
|
|
+ <if test="data.ghyt != null">#{data.ghyt}::varchar,</if>
|
|
|
+ <if test="data.mj_m != null">#{data.mj_m}::numeric(18,4),</if>
|
|
|
+ <if test="data.scfs != null">#{data.scfs}::varchar,</if>
|
|
|
+ <if test="data.dkmc != null">#{data.dkmc}::varchar,</if>
|
|
|
+ <if test="data.xzqmc != null">#{data.xzqmc}::varchar,</if>
|
|
|
+ <if test="data.wz != null">#{data.wz}::varchar,</if>
|
|
|
+ <if test="data.jhxzmj != null">#{data.jhxzmj}::numeric(18,4),</if>
|
|
|
+ <if test="data.yscmj != null">#{data.yscmj}::numeric(18,4),</if>
|
|
|
+ <if test="data.bndscmj != null">#{data.bndscmj}::numeric(18,4),</if>
|
|
|
+ <if test="data.qqkf != null">#{data.qqkf}::varchar,</if>
|
|
|
+ <if test="data.bndkfmj != null">#{data.bndkfmj}::numeric(18,4),</if>
|
|
|
+ <if test="data.bndwccb != null">#{data.bndwccb}::varchar,</if>
|
|
|
+ <if test="data.ngymj != null">#{data.ngymj}::numeric(18,4),</if>
|
|
|
+ <if test="data.ngysj != null">#{data.ngysj}::date,</if>
|
|
|
+ <if test="data.gyfs != null">#{data.gyfs}::varchar,</if>
|
|
|
+ <if test="data.yjgysr != null">#{data.yjgysr}::numeric(18,4),</if>
|
|
|
+ <if test="data.mj_12 != null">#{data.mj_12}::numeric(18,4),</if>
|
|
|
+ <if test="data.xzqdm != null">#{data.xzqdm}::varchar,</if>
|
|
|
+ <if test="data.dzjgh != null">#{data.dzjgh}::varchar,</if>
|
|
|
+ <if test="data.htbh != null">#{data.htbh}::varchar,</if>
|
|
|
+ <if test="data.htmc != null">#{data.htmc}::varchar,</if>
|
|
|
+ <if test="data.qdrq != null">#{data.qdrq}::date,</if>
|
|
|
+ <if test="data.the_geom != null">public.st_transform(public.st_geomfromewkt(#{data.the_geom}), #{shpDbSRID}),</if>
|
|
|
+ <if test="data.source_type != null">#{data.source_type}::varchar,</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <!-- 根据gid删除记录 -->
|
|
|
+ <delete id="deleteByTable" parameterType="String">
|
|
|
+ DELETE FROM vector.${tableName}
|
|
|
+ WHERE 1=1
|
|
|
+ <if test="gid != null and gid !=''">
|
|
|
+ and gid = #{gid}
|
|
|
+ </if>
|
|
|
+ <if test="sourceType != null and sourceType !=''">
|
|
|
+ and source_type = #{sourceType}
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+
|
|
|
</mapper>
|