AttGrwBaseCrrctDao.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="cn.com.goldenwater.dcproj.dao.AttGrwBaseCrrctDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttGrwBaseCrrct" id="attGrwBaseCrrctResultMap">
  5. <result property="dtmmdpr" column="DTMMDPR"/>
  6. <result property="pbprj" column="PBPRJ"/>
  7. <result property="adnm" column="ADNM"/>
  8. <result property="aqme" column="AQME"/>
  9. <result property="uptm" column="UPTM"/>
  10. <result property="bwsttp" column="BWSTTP"/>
  11. <result property="isart" column="ISART"/>
  12. <result property="lgtd" column="LGTD"/>
  13. <result property="mnun" column="MNUN"/>
  14. <result property="stel" column="STEL"/>
  15. <result property="grdlvl" column="GRDLVL"/>
  16. <result property="calym" column="CALYM"/>
  17. <result property="stlc" column="STLC"/>
  18. <result property="onun" column="ONUN"/>
  19. <result property="dtmnm" column="DTMNM"/>
  20. <result property="edtrPesr" column="EDTR_PESR"/>
  21. <result property="adcd" column="ADCD"/>
  22. <result property="note" column="NOTE"/>
  23. <result property="stnm" column="STNM"/>
  24. <result property="intm" column="INTM"/>
  25. <result property="stndpnt" column="STNDPNT"/>
  26. <result property="burcn" column="BURCN"/>
  27. <result property="sttp" column="STTP"/>
  28. <result property="esstym" column="ESSTYM"/>
  29. <result property="crrctId" column="CRRCT_ID"/>
  30. <result property="stcd" column="STCD"/>
  31. <result property="ostcd" column="OSTCD"/>
  32. <result property="spghgh" column="SPGHGH"/>
  33. <result property="chkState" column="CHK_STATE"/>
  34. <result property="welldep" column="WELLDEP"/>
  35. <result property="lttdPc" column="LTTD_PC"/>
  36. <result property="rvnm" column="RVNM"/>
  37. <result property="lttd" column="LTTD"/>
  38. <result property="esstyr" column="ESSTYR"/>
  39. <result property="lgtdPc" column="LGTD_PC"/>
  40. <result property="prtc" column="PRTC"/>
  41. <result property="gogunt" column="GOGUNT"/>
  42. <result property="wsttp" column="WSTTP"/>
  43. </resultMap>
  44. <sql id="table_columns">
  45. DTMMDPR ,
  46. PBPRJ ,
  47. ADNM ,
  48. AQME ,
  49. TO_CHAR(UPTM,'YYYY-MM-DD HH24:MI:SS') UPTM,
  50. BWSTTP ,
  51. ISART ,
  52. LGTD ,
  53. MNUN ,
  54. STEL ,
  55. GRDLVL ,
  56. TO_CHAR(CALYM,'YYYY-MM-DD') CALYM,
  57. STLC ,
  58. ONUN ,
  59. DTMNM ,
  60. EDTR_PESR ,
  61. ADCD ,
  62. NOTE ,
  63. STNM ,
  64. TO_CHAR(INTM,'YYYY-MM-DD HH24:MI:SS') INTM,
  65. STNDPNT ,
  66. BURCN ,
  67. STTP ,
  68. TO_CHAR(ESSTYM,'YYYY-MM-DD') ESSTYM,
  69. CRRCT_ID ,
  70. STCD ,
  71. OSTCD ,
  72. SPGHGH ,
  73. CHK_STATE ,
  74. WELLDEP ,
  75. LTTD_PC ,
  76. RVNM ,
  77. LTTD ,
  78. ESSTYR ,
  79. LGTD_PC ,
  80. PRTC ,
  81. GOGUNT ,
  82. WSTTP
  83. </sql>
  84. <sql id="table_columns2">
  85. DTMMDPR ,
  86. PBPRJ ,
  87. ADNM ,
  88. AQME ,
  89. UPTM ,
  90. BWSTTP ,
  91. ISART ,
  92. LGTD ,
  93. MNUN ,
  94. STEL ,
  95. GRDLVL ,
  96. CALYM ,
  97. STLC ,
  98. ONUN ,
  99. DTMNM ,
  100. EDTR_PESR ,
  101. ADCD ,
  102. NOTE ,
  103. STNM ,
  104. INTM ,
  105. STNDPNT ,
  106. BURCN ,
  107. STTP ,
  108. ESSTYM ,
  109. CRRCT_ID ,
  110. STCD ,
  111. OSTCD ,
  112. SPGHGH ,
  113. CHK_STATE ,
  114. WELLDEP ,
  115. LTTD_PC ,
  116. RVNM ,
  117. LTTD ,
  118. ESSTYR ,
  119. LGTD_PC ,
  120. PRTC ,
  121. GOGUNT ,
  122. WSTTP
  123. </sql>
  124. <sql id="entity_properties">
  125. #{dtmmdpr},
  126. #{pbprj},
  127. #{adnm},
  128. #{aqme},
  129. TO_DATE(#{uptm},'YYYY-MM-DD HH24:MI:SS') ,
  130. #{bwsttp},
  131. #{isart},
  132. #{lgtd},
  133. #{mnun},
  134. #{stel},
  135. #{grdlvl},
  136. TO_DATE(#{calym},'YYYY-MM-DD'),
  137. #{stlc},
  138. #{onun},
  139. #{dtmnm},
  140. #{edtrPesr},
  141. #{adcd},
  142. #{note},
  143. #{stnm},
  144. TO_DATE(#{intm},'YYYY-MM-DD HH24:MI:SS') ,
  145. #{stndpnt},
  146. #{burcn},
  147. #{sttp},
  148. TO_DATE(#{esstym},'YYYY-MM-DD'),
  149. #{crrctId},
  150. #{stcd},
  151. #{ostcd},
  152. #{spghgh},
  153. #{chkState},
  154. #{welldep},
  155. #{lttdPc},
  156. #{rvnm},
  157. #{lttd},
  158. #{esstyr},
  159. #{lgtdPc},
  160. #{prtc},
  161. #{gogunt},
  162. #{wsttp}
  163. </sql>
  164. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  165. <sql id="page_where">
  166. <trim prefix="where" prefixOverrides="and | or ">
  167. <if test="dtmmdpr != null and dtmmdpr != ''">and DTMMDPR = #{dtmmdpr}</if>
  168. <if test="pbprj != null and pbprj != ''">and PBPRJ = #{pbprj}</if>
  169. <if test="adnm != null and adnm != ''">and ADNM = #{adnm}</if>
  170. <if test="aqme != null and aqme != ''">and AQME = #{aqme}</if>
  171. <if test="uptm != null and uptm != ''">and UPTM = TO_DATE(#{uptm},'YYYY-MM-DD HH24:MI:SS')</if>
  172. <if test="bwsttp != null and bwsttp != ''">and BWSTTP = #{bwsttp}</if>
  173. <if test="isart != null and isart != ''">and ISART = #{isart}</if>
  174. <if test="lgtd != null">and LGTD = #{lgtd}</if>
  175. <if test="mnun != null and mnun != ''">and MNUN = #{mnun}</if>
  176. <if test="stel != null and stel != ''">and STEL = #{stel}</if>
  177. <if test="grdlvl != null">and GRDLVL = #{grdlvl}</if>
  178. <if test="calym != null and calym != ''">and CALYM = TO_DATE(#{calym},'YYYY-MM-DD')</if>
  179. <if test="stlc != null and stlc != ''">and STLC = #{stlc}</if>
  180. <if test="onun != null and onun != ''">and ONUN = #{onun}</if>
  181. <if test="dtmnm != null and dtmnm != ''">and DTMNM = #{dtmnm}</if>
  182. <if test="edtrPesr != null and edtrPesr != ''">and EDTR_PESR = #{edtrPesr}</if>
  183. <if test="adcd != null and adcd != ''">and ADCD = #{adcd}</if>
  184. <if test="note != null and note != ''">and NOTE = #{note}</if>
  185. <if test="stnm != null and stnm != ''">and STNM = #{stnm}</if>
  186. <if test="intm != null and intm != ''">and INTM = TO_DATE(#{intm},'YYYY-MM-DD HH24:MI:SS')</if>
  187. <if test="stndpnt != null">and STNDPNT = #{stndpnt}</if>
  188. <if test="burcn != null and burcn != ''">and BURCN = #{burcn}</if>
  189. <if test="sttp != null and sttp != ''">and STTP = #{sttp}</if>
  190. <if test="esstym != null and esstym != ''">and ESSTYM = TO_DATE(#{esstym},'YYYY-MM-DD')</if>
  191. <if test="crrctId != null and crrctId != ''">and CRRCT_ID = #{crrctId}</if>
  192. <if test="stcd != null and stcd != ''">and STCD = #{stcd}</if>
  193. <if test="ostcd != null and ostcd != ''">and OSTCD = #{ostcd}</if>
  194. <if test="spghgh != null">and SPGHGH = #{spghgh}</if>
  195. <if test="chkState != null and chkState != ''">and CHK_STATE = #{chkState}</if>
  196. <if test="welldep != null">and WELLDEP = #{welldep}</if>
  197. <if test="lttdPc != null">and LTTD_PC = #{lttdPc}</if>
  198. <if test="rvnm != null and rvnm != ''">and RVNM = #{rvnm}</if>
  199. <if test="lttd != null">and LTTD = #{lttd}</if>
  200. <if test="esstyr != null and esstyr != ''">and ESSTYR = #{esstyr}</if>
  201. <if test="lgtdPc != null">and LGTD_PC = #{lgtdPc}</if>
  202. <if test="prtc != null and prtc != ''">and PRTC = #{prtc}</if>
  203. <if test="gogunt != null and gogunt != ''">and GOGUNT = #{gogunt}</if>
  204. <if test="wsttp != null and wsttp != ''">and WSTTP = #{wsttp}</if>
  205. </trim>
  206. </sql>
  207. <select id="get" resultMap="attGrwBaseCrrctResultMap" parameterType="String">
  208. select
  209. <include refid="table_columns"/>
  210. from att_grw_base_crrct where CRRCT_ID = #{id}
  211. </select>
  212. <select id="getBy" resultMap="attGrwBaseCrrctResultMap">
  213. select
  214. <include refid="table_columns"/>
  215. from att_grw_base_crrct
  216. <include refid="page_where"/>
  217. </select>
  218. <select id="findAll" resultMap="attGrwBaseCrrctResultMap">
  219. select
  220. <include refid="table_columns"/>
  221. from att_grw_base_crrct
  222. </select>
  223. <select id="findList" resultMap="attGrwBaseCrrctResultMap">
  224. select
  225. <include refid="table_columns"/>
  226. from att_grw_base_crrct
  227. <include refid="page_where"/>
  228. ORDER BY CRRCT_ID
  229. </select>
  230. <select id="selectCount" resultType="int">
  231. select count(CRRCT_ID) from att_grw_base_crrct
  232. <include refid="page_where"/>
  233. </select>
  234. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttGrwBaseCrrct">
  235. insert into att_grw_base_crrct(
  236. <include refid="table_columns2"/>
  237. )
  238. values (
  239. <include refid="entity_properties"/>
  240. )
  241. </insert>
  242. <delete id="delete" parameterType="java.lang.String">
  243. delete from att_grw_base_crrct where CRRCT_ID = #{id}
  244. </delete>
  245. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttGrwBaseCrrct">
  246. delete from att_grw_base_crrct
  247. <include refid="page_where"/>
  248. </delete>
  249. <update id="deleteInFlag" parameterType="java.lang.String">
  250. update att_grw_base_crrct set flag_valid = 0 where CRRCT_ID = #{id}
  251. </update>
  252. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttGrwBaseCrrct">
  253. update att_grw_base_crrct
  254. <trim prefix="set" suffixOverrides=",">
  255. <if test="dtmmdpr != null and dtmmdpr != ''">DTMMDPR = #{dtmmdpr},</if>
  256. <if test="pbprj != null and pbprj != ''">PBPRJ = #{pbprj},</if>
  257. <if test="adnm != null and adnm != ''">ADNM = #{adnm},</if>
  258. <if test="aqme != null and aqme != ''">AQME = #{aqme},</if>
  259. <if test="uptm != null and uptm != ''">UPTM = TO_DATE(#{uptm},'YYYY-MM-DD HH24:MI:SS'),</if>
  260. <if test="bwsttp != null and bwsttp != ''">BWSTTP = #{bwsttp},</if>
  261. <if test="isart != null and isart != ''">ISART = #{isart},</if>
  262. <if test="lgtd != null">LGTD = #{lgtd},</if>
  263. <if test="mnun != null and mnun != ''">MNUN = #{mnun},</if>
  264. <if test="stel != null and stel != ''">STEL = #{stel},</if>
  265. <if test="grdlvl != null">GRDLVL = #{grdlvl},</if>
  266. <if test="calym != null and calym != ''">CALYM = TO_DATE(#{calym},'YYYY-MM-DD'),</if>
  267. <if test="stlc != null and stlc != ''">STLC = #{stlc},</if>
  268. <if test="onun != null and onun != ''">ONUN = #{onun},</if>
  269. <if test="dtmnm != null and dtmnm != ''">DTMNM = #{dtmnm},</if>
  270. <if test="edtrPesr != null and edtrPesr != ''">EDTR_PESR = #{edtrPesr},</if>
  271. <if test="adcd != null and adcd != ''">ADCD = #{adcd},</if>
  272. <if test="note != null and note != ''">NOTE = #{note},</if>
  273. <if test="stnm != null and stnm != ''">STNM = #{stnm},</if>
  274. <if test="intm != null and intm != ''">INTM = TO_DATE(#{intm},'YYYY-MM-DD HH24:MI:SS'),</if>
  275. <if test="stndpnt != null">STNDPNT = #{stndpnt},</if>
  276. <if test="burcn != null and burcn != ''">BURCN = #{burcn},</if>
  277. <if test="sttp != null and sttp != ''">STTP = #{sttp},</if>
  278. <if test="esstym != null and esstym != ''">ESSTYM = TO_DATE(#{esstym},'YYYY-MM-DD'),</if>
  279. <if test="stcd != null and stcd != ''">STCD = #{stcd},</if>
  280. <if test="ostcd != null and ostcd != ''">OSTCD = #{ostcd},</if>
  281. <if test="spghgh != null">SPGHGH = #{spghgh},</if>
  282. <if test="chkState != null and chkState != ''">CHK_STATE = #{chkState},</if>
  283. <if test="welldep != null">WELLDEP = #{welldep},</if>
  284. <if test="lttdPc != null">LTTD_PC = #{lttdPc},</if>
  285. <if test="rvnm != null and rvnm != ''">RVNM = #{rvnm},</if>
  286. <if test="lttd != null">LTTD = #{lttd},</if>
  287. <if test="esstyr != null and esstyr != ''">ESSTYR = #{esstyr},</if>
  288. <if test="lgtdPc != null">LGTD_PC = #{lgtdPc},</if>
  289. <if test="prtc != null and prtc != ''">PRTC = #{prtc},</if>
  290. <if test="gogunt != null and gogunt != ''">GOGUNT = #{gogunt},</if>
  291. <if test="wsttp != null and wsttp != ''">WSTTP = #{wsttp},</if>
  292. </trim>
  293. <where>CRRCT_ID = #{crrctId}</where>
  294. </update>
  295. <!-- 其他自定义SQL -->
  296. </mapper>