|
@@ -5,11 +5,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<mapper namespace="com.onemap.sanya.mapper.spatial.GysyqMapper">
|
|
|
|
|
|
<resultMap type="com.onemap.sanya.domain.spatial.Gysyq" id="GysyqResult">
|
|
|
- <result property="smid" column="smid" />
|
|
|
- <result property="smuserid" column="smuserid" />
|
|
|
- <result property="smarea" column="smarea" />
|
|
|
- <result property="smperimeter" column="smperimeter" />
|
|
|
- <result property="smgeometry" column="smgeometry" />
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="geom" column="geom" />
|
|
|
<result property="objectid1" column="objectid_1" />
|
|
|
<result property="objectid" column="objectid" />
|
|
|
<result property="districtid" column="districtid" />
|
|
@@ -73,21 +70,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="oldCertN" column="old_cert_n" />
|
|
|
<result property="clearupSt" column="clearup_st" />
|
|
|
<result property="sjglbsm" column="sjglbsm" />
|
|
|
- <result property="shapeLength" column="shape_length" />
|
|
|
- <result property="shapeArea" column="shape_area" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectGysyqVo">
|
|
|
- select smid, smuserid, smarea, smperimeter, st_asewkt(smgeometry) as smgeometry , objectid_1, objectid, districtid, lot_id, lot_number, is_right, cert_no, ref_x, ref_y, atqy, atfg, f_land_loc, mapguid, f_syqlx, f_zdtzm, f_zddm, f_memo, atbmqy, f_use, f_owntype, f_sjly, f_fzmj, f_sjqljs, ztid, iid, qlrbs, f_unit_no, f_xmmc, f_xmxz, f_hydb, f_yhlxa, f_yhlxb, f_yhwzsm, f_zhax, f_hdmc, f_hddm, f_hdwz, f_hdyt, f_ydfw, f_ydmj, f_djbh, f_yhnx, f_syfs, f_jtyt, sytdmj, txmj, yfttdmj, yfgtdmj, f_qlbz, yzbx, export_bz, 处理类型, 坐标变化, 融合方式, objectid_b, created_ti, last_modif, right_owne, lot_numb_1, f_parcel_n, old_cert_n, clearup_st, sjglbsm, shape_length, shape_area from gysyq
|
|
|
+ select id, st_asewkt(geom) as geom, objectid_1, objectid, districtid, lot_id, lot_number, is_right, cert_no, ref_x, ref_y, atqy, atfg, f_land_loc, mapguid, f_syqlx, f_zdtzm, f_zddm, f_memo, atbmqy, f_use, f_owntype, f_sjly, f_fzmj, f_sjqljs, ztid, iid, qlrbs, f_unit_no, f_xmmc, f_xmxz, f_hydb, f_yhlxa, f_yhlxb, f_yhwzsm, f_zhax, f_hdmc, f_hddm, f_hdwz, f_hdyt, f_ydfw, f_ydmj, f_djbh, f_yhnx, f_syfs, f_jtyt, sytdmj, txmj, yfttdmj, yfgtdmj, f_qlbz, yzbx, export_bz, 处理类型, 坐标变化, 融合方式, objectid_b, created_ti, last_modif, right_owne, lot_numb_1, f_parcel_n, old_cert_n, clearup_st, sjglbsm from "gysyq"
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectGysyqList" parameterType="com.onemap.sanya.domain.spatial.Gysyq" resultMap="GysyqResult">
|
|
|
<include refid="selectGysyqVo"/>
|
|
|
<where>
|
|
|
- <if test="smuserid != null "> and smuserid = #{smuserid}</if>
|
|
|
- <if test="smarea != null "> and smarea = #{smarea}</if>
|
|
|
- <if test="smperimeter != null "> and smperimeter = #{smperimeter}</if>
|
|
|
- <if test="smgeometry != null and smgeometry != ''"> and smgeometry = #{smgeometry}</if>
|
|
|
+ <if test="geom != null and geom != ''"> and geom = #{geom}</if>
|
|
|
<if test="objectid1 != null "> and objectid_1 = #{objectid1}</if>
|
|
|
<if test="objectid != null "> and objectid = #{objectid}</if>
|
|
|
<if test="districtid != null and districtid != ''"> and districtid = #{districtid}</if>
|
|
@@ -151,26 +143,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="oldCertN != null and oldCertN != ''"> and old_cert_n = #{oldCertN}</if>
|
|
|
<if test="clearupSt != null and clearupSt != ''"> and clearup_st = #{clearupSt}</if>
|
|
|
<if test="sjglbsm != null "> and sjglbsm = #{sjglbsm}</if>
|
|
|
- <if test="shapeLength != null "> and shape_length = #{shapeLength}</if>
|
|
|
- <if test="shapeArea != null "> and shape_area = #{shapeArea}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectGysyqBySmid" parameterType="Integer" resultMap="GysyqResult">
|
|
|
+ <select id="selectGysyqById" parameterType="Integer" resultMap="GysyqResult">
|
|
|
<include refid="selectGysyqVo"/>
|
|
|
- where smid = #{smid}
|
|
|
+ where id = #{id}
|
|
|
</select>
|
|
|
+
|
|
|
<select id="selectGysyqByPolygon" parameterType="String" resultMap="GysyqResult">
|
|
|
<include refid="selectGysyqVo"/>
|
|
|
- where st_intersects( st_geomfromewkt(#{polygon}),gysyq.smgeometry)
|
|
|
+ where st_intersects( st_geomfromewkt(#{polygon}),gysyq.geom)
|
|
|
</select>
|
|
|
- <insert id="insertGysyq" parameterType="com.onemap.sanya.domain.spatial.Gysyq" useGeneratedKeys="true" keyProperty="smid">
|
|
|
+
|
|
|
+ <insert id="insertGysyq" parameterType="com.onemap.sanya.domain.spatial.Gysyq" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into gysyq
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="smuserid != null">smuserid,</if>
|
|
|
- <if test="smarea != null">smarea,</if>
|
|
|
- <if test="smperimeter != null">smperimeter,</if>
|
|
|
- <if test="smgeometry != null">smgeometry,</if>
|
|
|
+ <if test="geom != null">geom,</if>
|
|
|
<if test="objectid1 != null">objectid_1,</if>
|
|
|
<if test="objectid != null">objectid,</if>
|
|
|
<if test="districtid != null">districtid,</if>
|
|
@@ -234,14 +223,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="oldCertN != null">old_cert_n,</if>
|
|
|
<if test="clearupSt != null">clearup_st,</if>
|
|
|
<if test="sjglbsm != null">sjglbsm,</if>
|
|
|
- <if test="shapeLength != null">shape_length,</if>
|
|
|
- <if test="shapeArea != null">shape_area,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="smuserid != null">#{smuserid},</if>
|
|
|
- <if test="smarea != null">#{smarea},</if>
|
|
|
- <if test="smperimeter != null">#{smperimeter},</if>
|
|
|
- <if test="smgeometry != null">st_geomfromewkt(#{smgeometry}),</if>
|
|
|
+ <if test="geom != null">#{geom},</if>
|
|
|
<if test="objectid1 != null">#{objectid1},</if>
|
|
|
<if test="objectid != null">#{objectid},</if>
|
|
|
<if test="districtid != null">#{districtid},</if>
|
|
@@ -305,18 +289,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="oldCertN != null">#{oldCertN},</if>
|
|
|
<if test="clearupSt != null">#{clearupSt},</if>
|
|
|
<if test="sjglbsm != null">#{sjglbsm},</if>
|
|
|
- <if test="shapeLength != null">#{shapeLength},</if>
|
|
|
- <if test="shapeArea != null">#{shapeArea},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateGysyq" parameterType="com.onemap.sanya.domain.spatial.Gysyq">
|
|
|
update gysyq
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="smuserid != null">smuserid = #{smuserid},</if>
|
|
|
- <if test="smarea != null">smarea = #{smarea},</if>
|
|
|
- <if test="smperimeter != null">smperimeter = #{smperimeter},</if>
|
|
|
- <if test="smgeometry != null">smgeometry =st_geomfromewkt(#{smgeometry}),</if>
|
|
|
+ <if test="geom != null">geom = #{geom},</if>
|
|
|
<if test="objectid1 != null">objectid_1 = #{objectid1},</if>
|
|
|
<if test="objectid != null">objectid = #{objectid},</if>
|
|
|
<if test="districtid != null">districtid = #{districtid},</if>
|
|
@@ -380,20 +359,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="oldCertN != null">old_cert_n = #{oldCertN},</if>
|
|
|
<if test="clearupSt != null">clearup_st = #{clearupSt},</if>
|
|
|
<if test="sjglbsm != null">sjglbsm = #{sjglbsm},</if>
|
|
|
- <if test="shapeLength != null">shape_length = #{shapeLength},</if>
|
|
|
- <if test="shapeArea != null">shape_area = #{shapeArea},</if>
|
|
|
</trim>
|
|
|
- where smid = #{smid}
|
|
|
+ where id = #{id}
|
|
|
</update>
|
|
|
|
|
|
- <delete id="deleteGysyqBySmid" parameterType="Integer">
|
|
|
- delete from gysyq where smid = #{smid}
|
|
|
+ <delete id="deleteGysyqById" parameterType="Integer">
|
|
|
+ delete from gysyq where id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
- <delete id="deleteGysyqBySmids" parameterType="String">
|
|
|
- delete from gysyq where smid in
|
|
|
- <foreach item="smid" collection="array" open="(" separator="," close=")">
|
|
|
- #{smid}
|
|
|
+ <delete id="deleteGysyqByIds" parameterType="String">
|
|
|
+ delete from gysyq where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
</mapper>
|