| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.onemap.sanya.mapper.spatial.JtuseMapper">
-
- <resultMap type="com.onemap.sanya.domain.spatial.Jtuse" id="JtuseResult">
- <result property="id" column="id" />
- <result property="geom" column="geom" />
- <result property="objectid1" column="objectid_1" />
- <result property="objectid" column="objectid" />
- <result property="syqr" column="syqr" />
- <result property="zdtybm" column="zdtybm" />
- <result property="zdzl" column="zdzl" />
- <result property="zdmj" column="zdmj" />
- <result property="tdyt" column="tdyt" />
- <result property="ytdzh" column="ytdzh" />
- <result property="mapguid" column="mapguid" />
- <result property="iid" column="iid" />
- <result property="certNo" column="cert_no" />
- <result property="ztid" column="ztid" />
- <result property="zdh" column="zdh" />
- <result property="fLb" column="f_lb" />
- <result property="fXb" column="f_xb" />
- <result property="fXdm" column="f_xdm" />
- <result property="fFbf" column="f_fbf" />
- <result property="fCbqssj" column="f_cbqssj" />
- <result property="fCbjssj" column="f_cbjssj" />
- <result property="fLqsqm" column="f_lqsqm" />
- <result property="fZysz" column="f_zysz" />
- <result property="fZs" column="f_zs" />
- <result property="fSllb" column="f_sllb" />
- <result property="fZlnd" column="f_zlnd" />
- <result property="fSyqx" column="f_syqx" />
- <result property="fQlbz" column="f_qlbz" />
- <result property="fCreateB" column="f_create_b" />
- <result property="fCreateT" column="f_create_t" />
- <result property="yzbx" column="yzbx" />
- <result property="sjglbsm" column="sjglbsm" />
- </resultMap>
- <sql id="selectJtuseVo">
- select id, public.st_asewkt(geom) as geom, objectid_1, objectid, syqr, zdtybm, zdzl, zdmj, tdyt, ytdzh, mapguid, iid, cert_no, ztid, zdh, f_lb, f_xb, f_xdm, f_fbf, f_cbqssj, f_cbjssj, f_lqsqm, f_zysz, f_zs, f_sllb, f_zlnd, f_syqx, f_qlbz, f_create_b, f_create_t, yzbx, sjglbsm from "jtuse"
- </sql>
- <select id="selectJtuseList" parameterType="com.onemap.sanya.domain.spatial.Jtuse" resultMap="JtuseResult">
- <include refid="selectJtuseVo"/>
- <where>
- <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="syqr != null and syqr != ''"> and syqr = #{syqr}</if>
- <if test="zdtybm != null and zdtybm != ''"> and zdtybm = #{zdtybm}</if>
- <if test="zdzl != null and zdzl != ''"> and zdzl = #{zdzl}</if>
- <if test="zdmj != null "> and zdmj = #{zdmj}</if>
- <if test="tdyt != null and tdyt != ''"> and tdyt = #{tdyt}</if>
- <if test="ytdzh != null and ytdzh != ''"> and ytdzh = #{ytdzh}</if>
- <if test="mapguid != null and mapguid != ''"> and mapguid = #{mapguid}</if>
- <if test="iid != null and iid != ''"> and iid = #{iid}</if>
- <if test="certNo != null and certNo != ''"> and cert_no = #{certNo}</if>
- <if test="ztid != null "> and ztid = #{ztid}</if>
- <if test="zdh != null and zdh != ''"> and zdh = #{zdh}</if>
- <if test="fLb != null and fLb != ''"> and f_lb = #{fLb}</if>
- <if test="fXb != null and fXb != ''"> and f_xb = #{fXb}</if>
- <if test="fXdm != null and fXdm != ''"> and f_xdm = #{fXdm}</if>
- <if test="fFbf != null and fFbf != ''"> and f_fbf = #{fFbf}</if>
- <if test="fCbqssj != null and fCbqssj != ''"> and f_cbqssj = #{fCbqssj}</if>
- <if test="fCbjssj != null and fCbjssj != ''"> and f_cbjssj = #{fCbjssj}</if>
- <if test="fLqsqm != null and fLqsqm != ''"> and f_lqsqm = #{fLqsqm}</if>
- <if test="fZysz != null and fZysz != ''"> and f_zysz = #{fZysz}</if>
- <if test="fZs != null "> and f_zs = #{fZs}</if>
- <if test="fSllb != null and fSllb != ''"> and f_sllb = #{fSllb}</if>
- <if test="fZlnd != null "> and f_zlnd = #{fZlnd}</if>
- <if test="fSyqx != null and fSyqx != ''"> and f_syqx = #{fSyqx}</if>
- <if test="fQlbz != null and fQlbz != ''"> and f_qlbz = #{fQlbz}</if>
- <if test="fCreateB != null and fCreateB != ''"> and f_create_b = #{fCreateB}</if>
- <if test="fCreateT != null and fCreateT != ''"> and f_create_t = #{fCreateT}</if>
- <if test="yzbx != null and yzbx != ''"> and yzbx = #{yzbx}</if>
- <if test="sjglbsm != null "> and sjglbsm = #{sjglbsm}</if>
- </where>
- </select>
-
- <select id="selectJtuseById" parameterType="Integer" resultMap="JtuseResult">
- <include refid="selectJtuseVo"/>
- where id = #{id}
- </select>
- <select id="selectJtuseByPolygon" parameterType="String" resultMap="JtuseResult">
- <include refid="selectJtuseVo"/>
- where public.st_intersects( public.st_geomfromewkt(#{polygon}),jtuse.geom)
- </select>
-
- <insert id="insertJtuse" parameterType="com.onemap.sanya.domain.spatial.Jtuse" useGeneratedKeys="true" keyProperty="id">
- insert into jtuse
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="geom != null">geom,</if>
- <if test="objectid1 != null">objectid_1,</if>
- <if test="objectid != null">objectid,</if>
- <if test="syqr != null">syqr,</if>
- <if test="zdtybm != null">zdtybm,</if>
- <if test="zdzl != null">zdzl,</if>
- <if test="zdmj != null">zdmj,</if>
- <if test="tdyt != null">tdyt,</if>
- <if test="ytdzh != null">ytdzh,</if>
- <if test="mapguid != null">mapguid,</if>
- <if test="iid != null">iid,</if>
- <if test="certNo != null">cert_no,</if>
- <if test="ztid != null">ztid,</if>
- <if test="zdh != null">zdh,</if>
- <if test="fLb != null">f_lb,</if>
- <if test="fXb != null">f_xb,</if>
- <if test="fXdm != null">f_xdm,</if>
- <if test="fFbf != null">f_fbf,</if>
- <if test="fCbqssj != null">f_cbqssj,</if>
- <if test="fCbjssj != null">f_cbjssj,</if>
- <if test="fLqsqm != null">f_lqsqm,</if>
- <if test="fZysz != null">f_zysz,</if>
- <if test="fZs != null">f_zs,</if>
- <if test="fSllb != null">f_sllb,</if>
- <if test="fZlnd != null">f_zlnd,</if>
- <if test="fSyqx != null">f_syqx,</if>
- <if test="fQlbz != null">f_qlbz,</if>
- <if test="fCreateB != null">f_create_b,</if>
- <if test="fCreateT != null">f_create_t,</if>
- <if test="yzbx != null">yzbx,</if>
- <if test="sjglbsm != null">sjglbsm,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="geom != null">#{geom},</if>
- <if test="objectid1 != null">#{objectid1},</if>
- <if test="objectid != null">#{objectid},</if>
- <if test="syqr != null">#{syqr},</if>
- <if test="zdtybm != null">#{zdtybm},</if>
- <if test="zdzl != null">#{zdzl},</if>
- <if test="zdmj != null">#{zdmj},</if>
- <if test="tdyt != null">#{tdyt},</if>
- <if test="ytdzh != null">#{ytdzh},</if>
- <if test="mapguid != null">#{mapguid},</if>
- <if test="iid != null">#{iid},</if>
- <if test="certNo != null">#{certNo},</if>
- <if test="ztid != null">#{ztid},</if>
- <if test="zdh != null">#{zdh},</if>
- <if test="fLb != null">#{fLb},</if>
- <if test="fXb != null">#{fXb},</if>
- <if test="fXdm != null">#{fXdm},</if>
- <if test="fFbf != null">#{fFbf},</if>
- <if test="fCbqssj != null">#{fCbqssj},</if>
- <if test="fCbjssj != null">#{fCbjssj},</if>
- <if test="fLqsqm != null">#{fLqsqm},</if>
- <if test="fZysz != null">#{fZysz},</if>
- <if test="fZs != null">#{fZs},</if>
- <if test="fSllb != null">#{fSllb},</if>
- <if test="fZlnd != null">#{fZlnd},</if>
- <if test="fSyqx != null">#{fSyqx},</if>
- <if test="fQlbz != null">#{fQlbz},</if>
- <if test="fCreateB != null">#{fCreateB},</if>
- <if test="fCreateT != null">#{fCreateT},</if>
- <if test="yzbx != null">#{yzbx},</if>
- <if test="sjglbsm != null">#{sjglbsm},</if>
- </trim>
- </insert>
- <update id="updateJtuse" parameterType="com.onemap.sanya.domain.spatial.Jtuse">
- update jtuse
- <trim prefix="SET" suffixOverrides=",">
- <if test="geom != null">geom = #{geom},</if>
- <if test="objectid1 != null">objectid_1 = #{objectid1},</if>
- <if test="objectid != null">objectid = #{objectid},</if>
- <if test="syqr != null">syqr = #{syqr},</if>
- <if test="zdtybm != null">zdtybm = #{zdtybm},</if>
- <if test="zdzl != null">zdzl = #{zdzl},</if>
- <if test="zdmj != null">zdmj = #{zdmj},</if>
- <if test="tdyt != null">tdyt = #{tdyt},</if>
- <if test="ytdzh != null">ytdzh = #{ytdzh},</if>
- <if test="mapguid != null">mapguid = #{mapguid},</if>
- <if test="iid != null">iid = #{iid},</if>
- <if test="certNo != null">cert_no = #{certNo},</if>
- <if test="ztid != null">ztid = #{ztid},</if>
- <if test="zdh != null">zdh = #{zdh},</if>
- <if test="fLb != null">f_lb = #{fLb},</if>
- <if test="fXb != null">f_xb = #{fXb},</if>
- <if test="fXdm != null">f_xdm = #{fXdm},</if>
- <if test="fFbf != null">f_fbf = #{fFbf},</if>
- <if test="fCbqssj != null">f_cbqssj = #{fCbqssj},</if>
- <if test="fCbjssj != null">f_cbjssj = #{fCbjssj},</if>
- <if test="fLqsqm != null">f_lqsqm = #{fLqsqm},</if>
- <if test="fZysz != null">f_zysz = #{fZysz},</if>
- <if test="fZs != null">f_zs = #{fZs},</if>
- <if test="fSllb != null">f_sllb = #{fSllb},</if>
- <if test="fZlnd != null">f_zlnd = #{fZlnd},</if>
- <if test="fSyqx != null">f_syqx = #{fSyqx},</if>
- <if test="fQlbz != null">f_qlbz = #{fQlbz},</if>
- <if test="fCreateB != null">f_create_b = #{fCreateB},</if>
- <if test="fCreateT != null">f_create_t = #{fCreateT},</if>
- <if test="yzbx != null">yzbx = #{yzbx},</if>
- <if test="sjglbsm != null">sjglbsm = #{sjglbsm},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteJtuseById" parameterType="Integer">
- delete from jtuse where id = #{id}
- </delete>
- <delete id="deleteJtuseByIds" parameterType="String">
- delete from jtuse where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|