JtuseMapper.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.onemap.sanya.mapper.spatial.JtuseMapper">
  6. <resultMap type="com.onemap.sanya.domain.spatial.Jtuse" id="JtuseResult">
  7. <result property="id" column="id" />
  8. <result property="geom" column="geom" />
  9. <result property="objectid1" column="objectid_1" />
  10. <result property="objectid" column="objectid" />
  11. <result property="syqr" column="syqr" />
  12. <result property="zdtybm" column="zdtybm" />
  13. <result property="zdzl" column="zdzl" />
  14. <result property="zdmj" column="zdmj" />
  15. <result property="tdyt" column="tdyt" />
  16. <result property="ytdzh" column="ytdzh" />
  17. <result property="mapguid" column="mapguid" />
  18. <result property="iid" column="iid" />
  19. <result property="certNo" column="cert_no" />
  20. <result property="ztid" column="ztid" />
  21. <result property="zdh" column="zdh" />
  22. <result property="fLb" column="f_lb" />
  23. <result property="fXb" column="f_xb" />
  24. <result property="fXdm" column="f_xdm" />
  25. <result property="fFbf" column="f_fbf" />
  26. <result property="fCbqssj" column="f_cbqssj" />
  27. <result property="fCbjssj" column="f_cbjssj" />
  28. <result property="fLqsqm" column="f_lqsqm" />
  29. <result property="fZysz" column="f_zysz" />
  30. <result property="fZs" column="f_zs" />
  31. <result property="fSllb" column="f_sllb" />
  32. <result property="fZlnd" column="f_zlnd" />
  33. <result property="fSyqx" column="f_syqx" />
  34. <result property="fQlbz" column="f_qlbz" />
  35. <result property="fCreateB" column="f_create_b" />
  36. <result property="fCreateT" column="f_create_t" />
  37. <result property="yzbx" column="yzbx" />
  38. <result property="sjglbsm" column="sjglbsm" />
  39. </resultMap>
  40. <sql id="selectJtuseVo">
  41. 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"
  42. </sql>
  43. <select id="selectJtuseList" parameterType="com.onemap.sanya.domain.spatial.Jtuse" resultMap="JtuseResult">
  44. <include refid="selectJtuseVo"/>
  45. <where>
  46. <if test="geom != null and geom != ''"> and geom = #{geom}</if>
  47. <if test="objectid1 != null "> and objectid_1 = #{objectid1}</if>
  48. <if test="objectid != null "> and objectid = #{objectid}</if>
  49. <if test="syqr != null and syqr != ''"> and syqr = #{syqr}</if>
  50. <if test="zdtybm != null and zdtybm != ''"> and zdtybm = #{zdtybm}</if>
  51. <if test="zdzl != null and zdzl != ''"> and zdzl = #{zdzl}</if>
  52. <if test="zdmj != null "> and zdmj = #{zdmj}</if>
  53. <if test="tdyt != null and tdyt != ''"> and tdyt = #{tdyt}</if>
  54. <if test="ytdzh != null and ytdzh != ''"> and ytdzh = #{ytdzh}</if>
  55. <if test="mapguid != null and mapguid != ''"> and mapguid = #{mapguid}</if>
  56. <if test="iid != null and iid != ''"> and iid = #{iid}</if>
  57. <if test="certNo != null and certNo != ''"> and cert_no = #{certNo}</if>
  58. <if test="ztid != null "> and ztid = #{ztid}</if>
  59. <if test="zdh != null and zdh != ''"> and zdh = #{zdh}</if>
  60. <if test="fLb != null and fLb != ''"> and f_lb = #{fLb}</if>
  61. <if test="fXb != null and fXb != ''"> and f_xb = #{fXb}</if>
  62. <if test="fXdm != null and fXdm != ''"> and f_xdm = #{fXdm}</if>
  63. <if test="fFbf != null and fFbf != ''"> and f_fbf = #{fFbf}</if>
  64. <if test="fCbqssj != null and fCbqssj != ''"> and f_cbqssj = #{fCbqssj}</if>
  65. <if test="fCbjssj != null and fCbjssj != ''"> and f_cbjssj = #{fCbjssj}</if>
  66. <if test="fLqsqm != null and fLqsqm != ''"> and f_lqsqm = #{fLqsqm}</if>
  67. <if test="fZysz != null and fZysz != ''"> and f_zysz = #{fZysz}</if>
  68. <if test="fZs != null "> and f_zs = #{fZs}</if>
  69. <if test="fSllb != null and fSllb != ''"> and f_sllb = #{fSllb}</if>
  70. <if test="fZlnd != null "> and f_zlnd = #{fZlnd}</if>
  71. <if test="fSyqx != null and fSyqx != ''"> and f_syqx = #{fSyqx}</if>
  72. <if test="fQlbz != null and fQlbz != ''"> and f_qlbz = #{fQlbz}</if>
  73. <if test="fCreateB != null and fCreateB != ''"> and f_create_b = #{fCreateB}</if>
  74. <if test="fCreateT != null and fCreateT != ''"> and f_create_t = #{fCreateT}</if>
  75. <if test="yzbx != null and yzbx != ''"> and yzbx = #{yzbx}</if>
  76. <if test="sjglbsm != null "> and sjglbsm = #{sjglbsm}</if>
  77. </where>
  78. </select>
  79. <select id="selectJtuseById" parameterType="Integer" resultMap="JtuseResult">
  80. <include refid="selectJtuseVo"/>
  81. where id = #{id}
  82. </select>
  83. <select id="selectJtuseByPolygon" parameterType="String" resultMap="JtuseResult">
  84. <include refid="selectJtuseVo"/>
  85. where public.st_intersects( public.st_geomfromewkt(#{polygon}),jtuse.geom)
  86. </select>
  87. <insert id="insertJtuse" parameterType="com.onemap.sanya.domain.spatial.Jtuse" useGeneratedKeys="true" keyProperty="id">
  88. insert into jtuse
  89. <trim prefix="(" suffix=")" suffixOverrides=",">
  90. <if test="geom != null">geom,</if>
  91. <if test="objectid1 != null">objectid_1,</if>
  92. <if test="objectid != null">objectid,</if>
  93. <if test="syqr != null">syqr,</if>
  94. <if test="zdtybm != null">zdtybm,</if>
  95. <if test="zdzl != null">zdzl,</if>
  96. <if test="zdmj != null">zdmj,</if>
  97. <if test="tdyt != null">tdyt,</if>
  98. <if test="ytdzh != null">ytdzh,</if>
  99. <if test="mapguid != null">mapguid,</if>
  100. <if test="iid != null">iid,</if>
  101. <if test="certNo != null">cert_no,</if>
  102. <if test="ztid != null">ztid,</if>
  103. <if test="zdh != null">zdh,</if>
  104. <if test="fLb != null">f_lb,</if>
  105. <if test="fXb != null">f_xb,</if>
  106. <if test="fXdm != null">f_xdm,</if>
  107. <if test="fFbf != null">f_fbf,</if>
  108. <if test="fCbqssj != null">f_cbqssj,</if>
  109. <if test="fCbjssj != null">f_cbjssj,</if>
  110. <if test="fLqsqm != null">f_lqsqm,</if>
  111. <if test="fZysz != null">f_zysz,</if>
  112. <if test="fZs != null">f_zs,</if>
  113. <if test="fSllb != null">f_sllb,</if>
  114. <if test="fZlnd != null">f_zlnd,</if>
  115. <if test="fSyqx != null">f_syqx,</if>
  116. <if test="fQlbz != null">f_qlbz,</if>
  117. <if test="fCreateB != null">f_create_b,</if>
  118. <if test="fCreateT != null">f_create_t,</if>
  119. <if test="yzbx != null">yzbx,</if>
  120. <if test="sjglbsm != null">sjglbsm,</if>
  121. </trim>
  122. <trim prefix="values (" suffix=")" suffixOverrides=",">
  123. <if test="geom != null">#{geom},</if>
  124. <if test="objectid1 != null">#{objectid1},</if>
  125. <if test="objectid != null">#{objectid},</if>
  126. <if test="syqr != null">#{syqr},</if>
  127. <if test="zdtybm != null">#{zdtybm},</if>
  128. <if test="zdzl != null">#{zdzl},</if>
  129. <if test="zdmj != null">#{zdmj},</if>
  130. <if test="tdyt != null">#{tdyt},</if>
  131. <if test="ytdzh != null">#{ytdzh},</if>
  132. <if test="mapguid != null">#{mapguid},</if>
  133. <if test="iid != null">#{iid},</if>
  134. <if test="certNo != null">#{certNo},</if>
  135. <if test="ztid != null">#{ztid},</if>
  136. <if test="zdh != null">#{zdh},</if>
  137. <if test="fLb != null">#{fLb},</if>
  138. <if test="fXb != null">#{fXb},</if>
  139. <if test="fXdm != null">#{fXdm},</if>
  140. <if test="fFbf != null">#{fFbf},</if>
  141. <if test="fCbqssj != null">#{fCbqssj},</if>
  142. <if test="fCbjssj != null">#{fCbjssj},</if>
  143. <if test="fLqsqm != null">#{fLqsqm},</if>
  144. <if test="fZysz != null">#{fZysz},</if>
  145. <if test="fZs != null">#{fZs},</if>
  146. <if test="fSllb != null">#{fSllb},</if>
  147. <if test="fZlnd != null">#{fZlnd},</if>
  148. <if test="fSyqx != null">#{fSyqx},</if>
  149. <if test="fQlbz != null">#{fQlbz},</if>
  150. <if test="fCreateB != null">#{fCreateB},</if>
  151. <if test="fCreateT != null">#{fCreateT},</if>
  152. <if test="yzbx != null">#{yzbx},</if>
  153. <if test="sjglbsm != null">#{sjglbsm},</if>
  154. </trim>
  155. </insert>
  156. <update id="updateJtuse" parameterType="com.onemap.sanya.domain.spatial.Jtuse">
  157. update jtuse
  158. <trim prefix="SET" suffixOverrides=",">
  159. <if test="geom != null">geom = #{geom},</if>
  160. <if test="objectid1 != null">objectid_1 = #{objectid1},</if>
  161. <if test="objectid != null">objectid = #{objectid},</if>
  162. <if test="syqr != null">syqr = #{syqr},</if>
  163. <if test="zdtybm != null">zdtybm = #{zdtybm},</if>
  164. <if test="zdzl != null">zdzl = #{zdzl},</if>
  165. <if test="zdmj != null">zdmj = #{zdmj},</if>
  166. <if test="tdyt != null">tdyt = #{tdyt},</if>
  167. <if test="ytdzh != null">ytdzh = #{ytdzh},</if>
  168. <if test="mapguid != null">mapguid = #{mapguid},</if>
  169. <if test="iid != null">iid = #{iid},</if>
  170. <if test="certNo != null">cert_no = #{certNo},</if>
  171. <if test="ztid != null">ztid = #{ztid},</if>
  172. <if test="zdh != null">zdh = #{zdh},</if>
  173. <if test="fLb != null">f_lb = #{fLb},</if>
  174. <if test="fXb != null">f_xb = #{fXb},</if>
  175. <if test="fXdm != null">f_xdm = #{fXdm},</if>
  176. <if test="fFbf != null">f_fbf = #{fFbf},</if>
  177. <if test="fCbqssj != null">f_cbqssj = #{fCbqssj},</if>
  178. <if test="fCbjssj != null">f_cbjssj = #{fCbjssj},</if>
  179. <if test="fLqsqm != null">f_lqsqm = #{fLqsqm},</if>
  180. <if test="fZysz != null">f_zysz = #{fZysz},</if>
  181. <if test="fZs != null">f_zs = #{fZs},</if>
  182. <if test="fSllb != null">f_sllb = #{fSllb},</if>
  183. <if test="fZlnd != null">f_zlnd = #{fZlnd},</if>
  184. <if test="fSyqx != null">f_syqx = #{fSyqx},</if>
  185. <if test="fQlbz != null">f_qlbz = #{fQlbz},</if>
  186. <if test="fCreateB != null">f_create_b = #{fCreateB},</if>
  187. <if test="fCreateT != null">f_create_t = #{fCreateT},</if>
  188. <if test="yzbx != null">yzbx = #{yzbx},</if>
  189. <if test="sjglbsm != null">sjglbsm = #{sjglbsm},</if>
  190. </trim>
  191. where id = #{id}
  192. </update>
  193. <delete id="deleteJtuseById" parameterType="Integer">
  194. delete from jtuse where id = #{id}
  195. </delete>
  196. <delete id="deleteJtuseByIds" parameterType="String">
  197. delete from jtuse where id in
  198. <foreach item="id" collection="array" open="(" separator="," close=")">
  199. #{id}
  200. </foreach>
  201. </delete>
  202. </mapper>