BisInspIrrPondDao.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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.BisInspIrrPondDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspIrrPond" id="bisInspIrrPondResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="objId" column="OBJ_ID"/>
  8. <result property="code" column="CODE"/>
  9. <result property="name" column="NAME"/>
  10. <result property="adCode" column="AD_CODE"/>
  11. <result property="adName" column="AD_NAME"/>
  12. <result property="sour" column="SOUR"/>
  13. <result property="compDate" column="COMP_DATE"/>
  14. <result property="strgVlm" column="STRG_VLM"/>
  15. <result property="valdVlm" column="VALD_VLM"/>
  16. <result property="irrArea" column="IRR_AREA"/>
  17. <result property="availIrrWtr" column="AVAIL_IRR_WTR"/>
  18. <result property="higStnType" column="HIG_STN_TYPE"/>
  19. <result property="prjPbmArea" column="PRJ_PBM_AREA"/>
  20. <result property="prjWhoTend" column="PRJ_WHO_TEND"/>
  21. <result property="prjUsrType" column="PRJ_USR_TYPE"/>
  22. <result property="whoTend" column="WHO_TEND"/>
  23. <result property="isTendRcrd" column="IS_TEND_RCRD"/>
  24. <result property="tendRcrdType" column="TEND_RCRD_TYPE"/>
  25. <result property="isRun" column="IS_RUN"/>
  26. <result property="notRunType" column="NOT_RUN_TYPE"/>
  27. <result property="notRunNote" column="NOT_RUN_NOTE"/>
  28. <result property="isInAll" column="IS_IN_ALL"/>
  29. <result property="isSlpCll" column="IS_SLP_CLL"/>
  30. <result property="isAlluvial" column="IS_ALLUVIAL"/>
  31. <result property="evaluate" column="EVALUATE"/>
  32. <result property="note" column="NOTE"/>
  33. <result property="invsrName" column="INVSR_NAME"/>
  34. <result property="invsrPhone" column="INVSR_PHONE"/>
  35. <result property="invsrTm" column="INVSR_TM"/>
  36. <result property="persId" column="PERS_ID"/>
  37. <result property="intm" column="INTM"/>
  38. <result property="uptm" column="UPTM"/>
  39. <result property="dataStat" column="DATA_STAT"/>
  40. <result property="state" column="STATE"/>
  41. <result property="centerX" column="CENTER_X"/>
  42. <result property="centerY" column="CENTER_Y"/>
  43. <result property="gdX" column="GD_X"/>
  44. <result property="gdY" column="GD_Y"/>
  45. <result property="sourNote" column="SOUR_NOTE"/>
  46. <result property="isSlpCllCate" column="IS_SLP_CLL_CATE"/>
  47. <result property="isAlluvialCate" column="IS_ALLUVIAL_CATE"/>
  48. <result property="isCurryearComp" column="IS_CURRYEAR_COMP"/>
  49. <result property="beforeCurryearComp" column="BEFROE_CURRYEAR"/>
  50. <result property="afterCurryearComp" column="AFTER_CURRYEAR"/>
  51. </resultMap>
  52. <sql id="table_columns">
  53. IS_CURRYEAR_COMP,
  54. BEFROE_CURRYEAR,
  55. AFTER_CURRYEAR,
  56. IS_SLP_CLL_CATE,
  57. IS_ALLUVIAL_CATE,
  58. SOUR_NOTE,
  59. CENTER_X,
  60. CENTER_Y,
  61. GD_X,
  62. GD_Y,
  63. ID,
  64. RGSTR_ID,
  65. OBJ_ID,
  66. CODE,
  67. NAME,
  68. AD_CODE,
  69. AD_NAME,
  70. SOUR,
  71. COMP_DATE,
  72. STRG_VLM,
  73. VALD_VLM,
  74. IRR_AREA,
  75. AVAIL_IRR_WTR,
  76. HIG_STN_TYPE,
  77. PRJ_PBM_AREA,
  78. PRJ_WHO_TEND,
  79. PRJ_USR_TYPE,
  80. WHO_TEND,
  81. IS_TEND_RCRD,
  82. TEND_RCRD_TYPE,
  83. IS_RUN,
  84. NOT_RUN_TYPE,
  85. NOT_RUN_NOTE,
  86. IS_IN_ALL,
  87. IS_SLP_CLL,
  88. IS_ALLUVIAL,
  89. EVALUATE,
  90. NOTE,
  91. INVSR_NAME,
  92. INVSR_PHONE,
  93. INVSR_TM,
  94. PERS_ID,
  95. INTM,
  96. UPTM,
  97. DATA_STAT,
  98. STATE
  99. </sql>
  100. <sql id="entity_properties">
  101. #{isCurryearComp},
  102. #{beforeCurryearComp},
  103. #{afterCurryearComp},
  104. #{isSlpCllCate},
  105. #{isAlluvialCate},
  106. #{sourNote},
  107. #{centerX},
  108. #{centerY},
  109. #{gdX},
  110. #{gdY},
  111. #{id},
  112. #{rgstrId},
  113. #{objId},
  114. #{code},
  115. #{name},
  116. #{adCode},
  117. #{adName},
  118. #{sour},
  119. #{compDate},
  120. #{strgVlm},
  121. #{valdVlm},
  122. #{irrArea},
  123. #{availIrrWtr},
  124. #{higStnType},
  125. #{prjPbmArea},
  126. #{prjWhoTend},
  127. #{prjUsrType},
  128. #{whoTend},
  129. #{isTendRcrd},
  130. #{tendRcrdType},
  131. #{isRun},
  132. #{notRunType},
  133. #{notRunNote},
  134. #{isInAll},
  135. #{isSlpCll},
  136. #{isAlluvial},
  137. #{evaluate},
  138. #{note},
  139. #{invsrName},
  140. #{invsrPhone},
  141. #{invsrTm},
  142. #{persId},
  143. #{intm},
  144. #{uptm},
  145. #{dataStat},
  146. #{state}
  147. </sql>
  148. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  149. <sql id="page_where">
  150. <trim prefix="where" prefixOverrides="and | or ">
  151. <if test="isCurryearComp != null and isCurryearComp != ''">and IS_CURRYEAR_COMP = #{isCurryearComp}</if>
  152. <if test="beforeCurryearComp != null and beforeCurryearComp != ''">and BEFROE_CURRYEAR = #{beforeCurryearComp}</if>
  153. <if test="afterCurryearComp != null and afterCurryearComp != ''">and AFTER_CURRYEAR = #{afterCurryearComp}</if>
  154. <if test="isSlpCllCate != null and isSlpCllCate != ''">and IS_SLP_CLL_CATE = #{isSlpCllCate}</if>
  155. <if test="isAlluvialCate != null and isAlluvialCate != ''">and IS_ALLUVIAL_CATE = #{isAlluvialCate}</if>
  156. <if test="sourNote != null and sourNote != ''">and SOUR_NOTE = #{sourNote}</if>
  157. <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
  158. <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
  159. <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
  160. <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
  161. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  162. <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
  163. <if test="code != null and code != ''">and CODE = #{code}</if>
  164. <if test="name != null and name != ''">and NAME like concat('%',concat(#{name},'%'))</if>
  165. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  166. <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
  167. <if test="sour != null and sour != ''">and SOUR = #{sour}</if>
  168. <if test="compDate != null and compDate != ''">and COMP_DATE = #{compDate}</if>
  169. <if test="strgVlm != null and strgVlm != ''">and STRG_VLM = #{strgVlm}</if>
  170. <if test="valdVlm != null and valdVlm != ''">and VALD_VLM = #{valdVlm}</if>
  171. <if test="irrArea != null and irrArea != ''">and IRR_AREA = #{irrArea}</if>
  172. <if test="availIrrWtr != null and availIrrWtr != ''">and AVAIL_IRR_WTR = #{availIrrWtr}</if>
  173. <if test="higStnType != null and higStnType != ''">and HIG_STN_TYPE = #{higStnType}</if>
  174. <if test="prjPbmArea != null and prjPbmArea != ''">and PRJ_PBM_AREA = #{prjPbmArea}</if>
  175. <if test="prjWhoTend != null and prjWhoTend != ''">and PRJ_WHO_TEND = #{prjWhoTend}</if>
  176. <if test="prjUsrType != null and prjUsrType != ''">and PRJ_USR_TYPE = #{prjUsrType}</if>
  177. <if test="whoTend != null and whoTend != ''">and WHO_TEND = #{whoTend}</if>
  178. <if test="isTendRcrd != null and isTendRcrd != ''">and IS_TEND_RCRD = #{isTendRcrd}</if>
  179. <if test="tendRcrdType != null and tendRcrdType != ''">and TEND_RCRD_TYPE = #{tendRcrdType}</if>
  180. <if test="isRun != null and isRun != ''">and IS_RUN = #{isRun}</if>
  181. <if test="notRunType != null and notRunType != ''">and NOT_RUN_TYPE = #{notRunType}</if>
  182. <if test="notRunNote != null and notRunNote != ''">and NOT_RUN_NOTE = #{notRunNote}</if>
  183. <if test="isInAll != null and isInAll != ''">and IS_IN_ALL = #{isInAll}</if>
  184. <if test="isSlpCll != null and isSlpCll != ''">and IS_SLP_CLL = #{isSlpCll}</if>
  185. <if test="isAlluvial != null and isAlluvial != ''">and IS_ALLUVIAL = #{isAlluvial}</if>
  186. <if test="evaluate != null and evaluate != ''">and EVALUATE = #{evaluate}</if>
  187. <if test="note != null and note != ''">and NOTE = #{note}</if>
  188. <if test="invsrName != null and invsrName != ''">and INVSR_NAME = #{invsrName}</if>
  189. <if test="invsrPhone != null and invsrPhone != ''">and INVSR_PHONE = #{invsrPhone}</if>
  190. <if test="invsrTm != null">and INVSR_TM = #{invsrTm}</if>
  191. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  192. <if test="intm != null">and INTM = #{intm}</if>
  193. <if test="uptm != null">and UPTM = #{uptm}</if>
  194. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  195. <if test="state != null and state != ''">and STATE = #{state}</if>
  196. and DATA_STAT='0'
  197. </trim>
  198. </sql>
  199. <select id="get" resultMap="bisInspIrrPondResultMap" parameterType="String" >
  200. select <include refid="table_columns" /> from BIS_INSP_IRR_POND where ID = #{id}
  201. </select>
  202. <select id="getBy" resultMap="bisInspIrrPondResultMap">
  203. select <include refid="table_columns" /> from BIS_INSP_IRR_POND <include refid="page_where" />
  204. </select>
  205. <select id="findAll" resultMap="bisInspIrrPondResultMap">
  206. select <include refid="table_columns" /> from BIS_INSP_IRR_POND
  207. </select>
  208. <select id="findList" resultMap="bisInspIrrPondResultMap">
  209. select <include refid="table_columns" /> from BIS_INSP_IRR_POND <include refid="page_where" />
  210. </select>
  211. <select id="selectCount" resultType="int" >
  212. select count(ID) from BIS_INSP_IRR_POND <include refid="page_where" />
  213. </select>
  214. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspIrrPond">
  215. insert into BIS_INSP_IRR_POND( <include refid="table_columns" /> )
  216. values ( <include refid="entity_properties" /> )
  217. </insert>
  218. <delete id="delete" parameterType="java.lang.String">
  219. update BIS_INSP_IRR_POND set DATA_STAT='9' where ID = #{id}
  220. </delete>
  221. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspIrrPond">
  222. update BIS_INSP_IRR_POND set DATA_STAT='9' <include refid="page_where" />
  223. </delete>
  224. <update id="deleteInFlag" parameterType="java.lang.String">
  225. update BIS_INSP_IRR_POND set DATA_STAT = '9' where ID = #{id}
  226. </update>
  227. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspIrrPond">
  228. update BIS_INSP_IRR_POND
  229. <trim prefix="set" suffixOverrides=",">
  230. <if test="isCurryearComp != null and isCurryearComp != ''">IS_CURRYEAR_COMP = #{isCurryearComp},</if>
  231. <if test="beforeCurryearComp != null and beforeCurryearComp != ''">BEFROE_CURRYEAR = #{beforeCurryearComp},</if>
  232. <if test="afterCurryearComp != null and afterCurryearComp != ''">AFTER_CURRYEAR = #{afterCurryearComp},</if>
  233. <if test="isSlpCllCate != null and isSlpCllCate != ''">IS_SLP_CLL_CATE = #{isSlpCllCate},</if>
  234. <if test="isAlluvialCate != null and isAlluvialCate != ''">IS_ALLUVIAL_CATE = #{isAlluvialCate},</if>
  235. <if test="sourNote != null and sourNote != ''">SOUR_NOTE = #{sourNote},</if>
  236. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  237. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  238. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  239. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  240. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  241. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  242. <if test="code != null and code != ''">CODE = #{code},</if>
  243. <if test="name != null and name != ''">NAME = #{name},</if>
  244. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  245. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  246. <if test="sour != null and sour != ''">SOUR = #{sour},</if>
  247. <if test="compDate != null and compDate != ''">COMP_DATE = #{compDate},</if>
  248. <if test="strgVlm != null and strgVlm != ''">STRG_VLM = #{strgVlm},</if>
  249. <if test="valdVlm != null and valdVlm != ''">VALD_VLM = #{valdVlm},</if>
  250. <if test="irrArea != null and irrArea != ''">IRR_AREA = #{irrArea},</if>
  251. <if test="availIrrWtr != null and availIrrWtr != ''">AVAIL_IRR_WTR = #{availIrrWtr},</if>
  252. <if test="higStnType != null and higStnType != ''">HIG_STN_TYPE = #{higStnType},</if>
  253. <if test="prjPbmArea != null and prjPbmArea != ''">PRJ_PBM_AREA = #{prjPbmArea},</if>
  254. <if test="prjWhoTend != null and prjWhoTend != ''">PRJ_WHO_TEND = #{prjWhoTend},</if>
  255. <if test="prjUsrType != null and prjUsrType != ''">PRJ_USR_TYPE = #{prjUsrType},</if>
  256. <if test="whoTend != null and whoTend != ''">WHO_TEND = #{whoTend},</if>
  257. <if test="isTendRcrd != null and isTendRcrd != ''">IS_TEND_RCRD = #{isTendRcrd},</if>
  258. <if test="tendRcrdType != null and tendRcrdType != ''">TEND_RCRD_TYPE = #{tendRcrdType},</if>
  259. <if test="isRun != null and isRun != ''">IS_RUN = #{isRun},</if>
  260. <if test="notRunType != null and notRunType != ''">NOT_RUN_TYPE = #{notRunType},</if>
  261. <if test="notRunNote != null and notRunNote != ''">NOT_RUN_NOTE = #{notRunNote},</if>
  262. <if test="isInAll != null and isInAll != ''">IS_IN_ALL = #{isInAll},</if>
  263. <if test="isSlpCll != null and isSlpCll != ''">IS_SLP_CLL = #{isSlpCll},</if>
  264. <if test="isAlluvial != null and isAlluvial != ''">IS_ALLUVIAL = #{isAlluvial},</if>
  265. <if test="evaluate != null and evaluate != ''">EVALUATE = #{evaluate},</if>
  266. <if test="note != null and note != ''">NOTE = #{note},</if>
  267. <if test="invsrName != null and invsrName != ''">INVSR_NAME = #{invsrName},</if>
  268. <if test="invsrPhone != null and invsrPhone != ''">INVSR_PHONE = #{invsrPhone},</if>
  269. <if test="invsrTm != null">INVSR_TM = #{invsrTm},</if>
  270. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  271. <if test="intm != null">INTM = #{intm},</if>
  272. <if test="uptm != null">UPTM = #{uptm},</if>
  273. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  274. <if test="state != null and state != ''">STATE = #{state},</if>
  275. </trim>
  276. <where>ID = #{id}</where>
  277. </update>
  278. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspIrrPond">
  279. update BIS_INSP_IRR_POND
  280. <trim prefix="set" suffixOverrides=",">
  281. <if test="isCurryearComp != null and isCurryearComp != ''">IS_CURRYEAR_COMP = #{isCurryearComp},</if>
  282. <if test="beforeCurryearComp != null and beforeCurryearComp != ''">BEFROE_CURRYEAR = #{beforeCurryearComp},</if>
  283. <if test="afterCurryearComp != null and afterCurryearComp != ''">AFTER_CURRYEAR = #{afterCurryearComp},</if>
  284. <if test="isSlpCllCate != null and isSlpCllCate != ''">IS_SLP_CLL_CATE = #{isSlpCllCate},</if>
  285. <if test="isAlluvialCate != null and isAlluvialCate != ''">IS_ALLUVIAL_CATE = #{isAlluvialCate},</if>
  286. <if test="sourNote != null and sourNote != ''">SOUR_NOTE = #{sourNote},</if>
  287. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  288. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  289. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  290. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  291. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  292. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  293. <if test="code != null and code != ''">CODE = #{code},</if>
  294. <if test="name != null and name != ''">NAME = #{name},</if>
  295. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  296. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  297. <if test="sour != null and sour != ''">SOUR = #{sour},</if>
  298. <if test="compDate != null and compDate != ''">COMP_DATE = #{compDate},</if>
  299. <if test="strgVlm != null and strgVlm != ''">STRG_VLM = #{strgVlm},</if>
  300. <if test="valdVlm != null and valdVlm != ''">VALD_VLM = #{valdVlm},</if>
  301. <if test="irrArea != null and irrArea != ''">IRR_AREA = #{irrArea},</if>
  302. <if test="availIrrWtr != null and availIrrWtr != ''">AVAIL_IRR_WTR = #{availIrrWtr},</if>
  303. <if test="higStnType != null and higStnType != ''">HIG_STN_TYPE = #{higStnType},</if>
  304. <if test="prjPbmArea != null and prjPbmArea != ''">PRJ_PBM_AREA = #{prjPbmArea},</if>
  305. <if test="prjWhoTend != null and prjWhoTend != ''">PRJ_WHO_TEND = #{prjWhoTend},</if>
  306. <if test="prjUsrType != null and prjUsrType != ''">PRJ_USR_TYPE = #{prjUsrType},</if>
  307. <if test="whoTend != null and whoTend != ''">WHO_TEND = #{whoTend},</if>
  308. <if test="isTendRcrd != null and isTendRcrd != ''">IS_TEND_RCRD = #{isTendRcrd},</if>
  309. <if test="tendRcrdType != null and tendRcrdType != ''">TEND_RCRD_TYPE = #{tendRcrdType},</if>
  310. <if test="isRun != null and isRun != ''">IS_RUN = #{isRun},</if>
  311. <if test="notRunType != null and notRunType != ''">NOT_RUN_TYPE = #{notRunType},</if>
  312. <if test="notRunNote != null and notRunNote != ''">NOT_RUN_NOTE = #{notRunNote},</if>
  313. <if test="isInAll != null and isInAll != ''">IS_IN_ALL = #{isInAll},</if>
  314. <if test="isSlpCll != null and isSlpCll != ''">IS_SLP_CLL = #{isSlpCll},</if>
  315. <if test="isAlluvial != null and isAlluvial != ''">IS_ALLUVIAL = #{isAlluvial},</if>
  316. <if test="evaluate != null and evaluate != ''">EVALUATE = #{evaluate},</if>
  317. <if test="note != null and note != ''">NOTE = #{note},</if>
  318. <if test="invsrName != null and invsrName != ''">INVSR_NAME = #{invsrName},</if>
  319. <if test="invsrPhone != null and invsrPhone != ''">INVSR_PHONE = #{invsrPhone},</if>
  320. <if test="invsrTm != null">INVSR_TM = #{invsrTm},</if>
  321. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  322. <if test="intm != null">INTM = #{intm},</if>
  323. <if test="uptm != null">UPTM = #{uptm},</if>
  324. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  325. <if test="state != null and state != ''">STATE = #{state},</if>
  326. </trim>
  327. <include refid="page_where" />
  328. </update>
  329. <!-- 其他自定义SQL -->
  330. </mapper>