AttEngIrrDao.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  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.AttEngIrrDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttEngIrr" id="attEngIrrResultMap">
  5. <result property="desIrrArea" column="DES_IRR_AREA"/>
  6. <result property="chanHignLeve" column="CHAN_HIGN_LEVE"/>
  7. <result property="chanNum" column="CHAN_NUM"/>
  8. <result property="chanLenTot" column="CHAN_LEN_TOT"/>
  9. <result property="chanDesFlow" column="CHAN_DES_FLOW"/>
  10. <result property="chsyGateNum" column="CHSY_GATE_NUM"/>
  11. <result property="chsyAquNum" column="CHSY_AQU_NUM"/>
  12. <result property="chsyDropNum" column="CHSY_DROP_NUM"/>
  13. <result property="chsyInvSiphNum" column="CHSY_INV_SIPH_NUM"/>
  14. <result property="chsyTunNum" column="CHSY_TUN_NUM"/>
  15. <result property="chsyCulNum" column="CHSY_CUL_NUM"/>
  16. <result property="chsyFarmBriNum" column="CHSY_FARM_BRI_NUM"/>
  17. <result property="chsyMeaNum" column="CHSY_MEA_NUM"/>
  18. <result property="chsyDitPustStNum" column="CHSY_DIT_PUST_ST_NUM"/>
  19. <result property="note" column="NOTE"/>
  20. <result property="collTime" column="COLL_TIME"/>
  21. <result property="updTime" column="UPD_TIME"/>
  22. <result property="recPers" column="REC_PERS"/>
  23. <result property="engReinForceGuid" column="ENG_REIN_FORCE_GUID"/>
  24. <result property="guid" column="GUID"/>
  25. <result property="pGuid" column="P_GUID"/>
  26. <result property="engName" column="ENG_NAME"/>
  27. <result property="engGuid" column="ENG_GUID"/>
  28. <result property="impoGrad" column="IMPO_GRAD"/>
  29. <result property="apprBudg" column="APPR_BUDG"/>
  30. <result property="startDate" column="START_DATE"/>
  31. <result property="compDate" column="COMP_DATE"/>
  32. <result property="engStat" column="ENG_STAT"/>
  33. <result property="orgGuid" column="ORG_GUID"/>
  34. <result property="oflpCode" column="OFLP_CODE"/>
  35. <result property="ifReinForce" column="IF_REIN_FORCE"/>
  36. <result property="projGuid" column="PROJ_GUID"/>
  37. <result property="stat" column="STAT"/>
  38. <result property="irrCode" column="IRR_CODE"/>
  39. <result property="cenLong" column="CEN_LONG"/>
  40. <result property="cenLat" column="CEN_LAT"/>
  41. <result property="irrLoc" column="IRR_LOC"/>
  42. <result property="adGuid" column="AD_GUID"/>
  43. <result property="rvGuid" column="RV_GUID"/>
  44. <result property="engScal" column="ENG_SCAL"/>
  45. <result property="totIrrArea" column="TOT_IRR_AREA"/>
  46. <result property="effIrrArea" column="EFF_IRR_AREA"/>
  47. </resultMap>
  48. <sql id="table_columns">
  49. DES_IRR_AREA,
  50. CHAN_HIGN_LEVE,
  51. CHAN_NUM,
  52. CHAN_LEN_TOT,
  53. CHAN_DES_FLOW,
  54. CHSY_GATE_NUM,
  55. CHSY_AQU_NUM,
  56. CHSY_DROP_NUM,
  57. CHSY_INV_SIPH_NUM,
  58. CHSY_TUN_NUM,
  59. CHSY_CUL_NUM,
  60. CHSY_FARM_BRI_NUM,
  61. CHSY_MEA_NUM,
  62. CHSY_DIT_PUST_ST_NUM,
  63. NOTE,
  64. COLL_TIME,
  65. UPD_TIME,
  66. REC_PERS,
  67. ENG_REIN_FORCE_GUID,
  68. GUID,
  69. P_GUID,
  70. ENG_NAME,
  71. ENG_GUID,
  72. IMPO_GRAD,
  73. APPR_BUDG,
  74. START_DATE,
  75. COMP_DATE,
  76. ENG_STAT,
  77. ORG_GUID,
  78. OFLP_CODE,
  79. IF_REIN_FORCE,
  80. PROJ_GUID,
  81. STAT,
  82. IRR_CODE,
  83. CEN_LONG,
  84. CEN_LAT,
  85. IRR_LOC,
  86. AD_GUID,
  87. RV_GUID,
  88. ENG_SCAL,
  89. TOT_IRR_AREA,
  90. EFF_IRR_AREA
  91. </sql>
  92. <sql id="entity_properties">
  93. #{desIrrArea},
  94. #{chanHignLeve},
  95. #{chanNum},
  96. #{chanLenTot},
  97. #{chanDesFlow},
  98. #{chsyGateNum},
  99. #{chsyAquNum},
  100. #{chsyDropNum},
  101. #{chsyInvSiphNum},
  102. #{chsyTunNum},
  103. #{chsyCulNum},
  104. #{chsyFarmBriNum},
  105. #{chsyMeaNum},
  106. #{chsyDitPustStNum},
  107. #{note},
  108. #{collTime},
  109. #{updTime},
  110. #{recPers},
  111. #{engReinForceGuid},
  112. #{guid},
  113. #{pGuid},
  114. #{engName},
  115. #{engGuid},
  116. #{impoGrad},
  117. #{apprBudg},
  118. #{startDate},
  119. #{compDate},
  120. #{engStat},
  121. #{orgGuid},
  122. #{oflpCode},
  123. #{ifReinForce},
  124. #{projGuid},
  125. #{stat},
  126. #{irrCode},
  127. #{cenLong},
  128. #{cenLat},
  129. #{irrLoc},
  130. #{adGuid},
  131. #{rvGuid},
  132. #{engScal},
  133. #{totIrrArea},
  134. #{effIrrArea}
  135. </sql>
  136. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  137. <sql id="page_where">
  138. <trim prefix="where" prefixOverrides="and | or ">
  139. <if test="chanHignLeve != null and chanHignLeve != ''">and CHAN_HIGN_LEVE = #{chanHignLeve}</if>
  140. <if test="chanNum != null and chanNum != ''">and CHAN_NUM = #{chanNum}</if>
  141. <if test="chanLenTot != null and chanLenTot != ''">and CHAN_LEN_TOT = #{chanLenTot}</if>
  142. <if test="chanDesFlow != null and chanDesFlow != ''">and CHAN_DES_FLOW = #{chanDesFlow}</if>
  143. <if test="chsyGateNum != null and chsyGateNum != ''">and CHSY_GATE_NUM = #{chsyGateNum}</if>
  144. <if test="chsyAquNum != null and chsyAquNum != ''">and CHSY_AQU_NUM = #{chsyAquNum}</if>
  145. <if test="chsyDropNum != null and chsyDropNum != ''">and CHSY_DROP_NUM = #{chsyDropNum}</if>
  146. <if test="chsyInvSiphNum != null and chsyInvSiphNum != ''">and CHSY_INV_SIPH_NUM = #{chsyInvSiphNum}</if>
  147. <if test="chsyTunNum != null and chsyTunNum != ''">and CHSY_TUN_NUM = #{chsyTunNum}</if>
  148. <if test="chsyCulNum != null and chsyCulNum != ''">and CHSY_CUL_NUM = #{chsyCulNum}</if>
  149. <if test="chsyFarmBriNum != null and chsyFarmBriNum != ''">and CHSY_FARM_BRI_NUM = #{chsyFarmBriNum}</if>
  150. <if test="chsyMeaNum != null and chsyMeaNum != ''">and CHSY_MEA_NUM = #{chsyMeaNum}</if>
  151. <if test="chsyDitPustStNum != null and chsyDitPustStNum != ''">and CHSY_DIT_PUST_ST_NUM =
  152. #{chsyDitPustStNum}
  153. </if>
  154. <if test="note != null and note != ''">and NOTE = #{note}</if>
  155. <if test="collTime != null">and COLL_TIME = #{collTime}</if>
  156. <if test="updTime != null">and UPD_TIME = #{updTime}</if>
  157. <if test="recPers != null and recPers != ''">and REC_PERS = #{recPers}</if>
  158. <if test="engReinForceGuid != null and engReinForceGuid != ''">and ENG_REIN_FORCE_GUID =
  159. #{engReinForceGuid}
  160. </if>
  161. <if test="desIrrArea != null and desIrrArea != ''">and DES_IRR_AREA = #{desIrrArea}</if>
  162. <if test="pGuid != null and pGuid != ''">and P_GUID = #{pGuid}</if>
  163. <if test="engName != null and engName != ''">and ENG_NAME = #{engName}</if>
  164. <if test="engGuid != null and engGuid != ''">and ENG_GUID = #{engGuid}</if>
  165. <if test="impoGrad != null and impoGrad != ''">and IMPO_GRAD = #{impoGrad}</if>
  166. <if test="apprBudg != null and apprBudg != ''">and APPR_BUDG = #{apprBudg}</if>
  167. <if test="startDate != null">and START_DATE = #{startDate}</if>
  168. <if test="compDate != null">and COMP_DATE = #{compDate}</if>
  169. <if test="engStat != null and engStat != ''">and ENG_STAT = #{engStat}</if>
  170. <if test="orgGuid != null and orgGuid != ''">and ORG_GUID = #{orgGuid}</if>
  171. <if test="oflpCode != null and oflpCode != ''">and OFLP_CODE = #{oflpCode}</if>
  172. <if test="ifReinForce != null and ifReinForce != ''">and IF_REIN_FORCE = #{ifReinForce}</if>
  173. <if test="projGuid != null and projGuid != ''">and PROJ_GUID = #{projGuid}</if>
  174. <if test="stat != null and stat != ''">and STAT = #{stat}</if>
  175. <if test="irrCode != null and irrCode != ''">and IRR_CODE = #{irrCode}</if>
  176. <if test="cenLong != null and cenLong != ''">and CEN_LONG = #{cenLong}</if>
  177. <if test="cenLat != null and cenLat != ''">and CEN_LAT = #{cenLat}</if>
  178. <if test="irrLoc != null and irrLoc != ''">and IRR_LOC = #{irrLoc}</if>
  179. <if test="adGuid != null and adGuid != ''">and AD_GUID = #{adGuid}</if>
  180. <if test="rvGuid != null and rvGuid != ''">and RV_GUID = #{rvGuid}</if>
  181. <if test="engScal != null and engScal != ''">and ENG_SCAL = #{engScal}</if>
  182. <if test="totIrrArea != null and totIrrArea != ''">and TOT_IRR_AREA = #{totIrrArea}</if>
  183. <if test="effIrrArea != null and effIrrArea != ''">and EFF_IRR_AREA = #{effIrrArea}</if>
  184. </trim>
  185. </sql>
  186. <select id="get" resultMap="attEngIrrResultMap" parameterType="String">
  187. select
  188. <include refid="table_columns"/>
  189. from att_eng_irr where GUID = #{id}
  190. </select>
  191. <select id="getBy" resultMap="attEngIrrResultMap">
  192. select
  193. <include refid="table_columns"/>
  194. from att_eng_irr
  195. <include refid="page_where"/>
  196. </select>
  197. <select id="findAll" resultMap="attEngIrrResultMap">
  198. select
  199. <include refid="table_columns"/>
  200. from att_eng_irr
  201. </select>
  202. <select id="findList" resultMap="attEngIrrResultMap">
  203. select
  204. <include refid="table_columns"/>
  205. from att_eng_irr
  206. <include refid="page_where"/>
  207. </select>
  208. <select id="selectCount" resultType="int">
  209. select count(GUID) from att_eng_irr
  210. <include refid="page_where"/>
  211. </select>
  212. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttEngIrr">
  213. insert into att_eng_irr(
  214. <include refid="table_columns"/>
  215. )
  216. values (
  217. <include refid="entity_properties"/>
  218. )
  219. </insert>
  220. <delete id="delete" parameterType="java.lang.String">
  221. delete from att_eng_irr where GUID = #{id}
  222. </delete>
  223. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttEngIrr">
  224. delete from att_eng_irr
  225. <include refid="page_where"/>
  226. </delete>
  227. <update id="deleteInFlag" parameterType="java.lang.String">
  228. update att_eng_irr set flag_valid = 0 where GUID = #{id}
  229. </update>
  230. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttEngIrr">
  231. update att_eng_irr
  232. <trim prefix="set" suffixOverrides=",">
  233. <if test="chanHignLeve != null and chanHignLeve != ''">CHAN_HIGN_LEVE = #{chanHignLeve},</if>
  234. <if test="chanNum != null and chanNum != ''">CHAN_NUM = #{chanNum},</if>
  235. <if test="chanLenTot != null and chanLenTot != ''">CHAN_LEN_TOT = #{chanLenTot},</if>
  236. <if test="chanDesFlow != null and chanDesFlow != ''">CHAN_DES_FLOW = #{chanDesFlow},</if>
  237. <if test="chsyGateNum != null and chsyGateNum != ''">CHSY_GATE_NUM = #{chsyGateNum},</if>
  238. <if test="chsyAquNum != null and chsyAquNum != ''">CHSY_AQU_NUM = #{chsyAquNum},</if>
  239. <if test="chsyDropNum != null and chsyDropNum != ''">CHSY_DROP_NUM = #{chsyDropNum},</if>
  240. <if test="chsyInvSiphNum != null and chsyInvSiphNum != ''">CHSY_INV_SIPH_NUM = #{chsyInvSiphNum},</if>
  241. <if test="chsyTunNum != null and chsyTunNum != ''">CHSY_TUN_NUM = #{chsyTunNum},</if>
  242. <if test="chsyCulNum != null and chsyCulNum != ''">CHSY_CUL_NUM = #{chsyCulNum},</if>
  243. <if test="chsyFarmBriNum != null and chsyFarmBriNum != ''">CHSY_FARM_BRI_NUM = #{chsyFarmBriNum},</if>
  244. <if test="chsyMeaNum != null and chsyMeaNum != ''">CHSY_MEA_NUM = #{chsyMeaNum},</if>
  245. <if test="chsyDitPustStNum != null and chsyDitPustStNum != ''">CHSY_DIT_PUST_ST_NUM = #{chsyDitPustStNum},
  246. </if>
  247. <if test="note != null and note != ''">NOTE = #{note},</if>
  248. <if test="collTime != null">COLL_TIME = #{collTime},</if>
  249. <if test="updTime != null">UPD_TIME = #{updTime},</if>
  250. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  251. <if test="engReinForceGuid != null and engReinForceGuid != ''">ENG_REIN_FORCE_GUID = #{engReinForceGuid},
  252. </if>
  253. <if test="desIrrArea != null and desIrrArea != ''">DES_IRR_AREA = #{desIrrArea},</if>
  254. <if test="pGuid != null and pGuid != ''">P_GUID = #{pGuid},</if>
  255. <if test="engName != null and engName != ''">ENG_NAME = #{engName},</if>
  256. <if test="engGuid != null and engGuid != ''">ENG_GUID = #{engGuid},</if>
  257. <if test="impoGrad != null and impoGrad != ''">IMPO_GRAD = #{impoGrad},</if>
  258. <if test="apprBudg != null and apprBudg != ''">APPR_BUDG = #{apprBudg},</if>
  259. <if test="startDate != null">START_DATE = #{startDate},</if>
  260. <if test="compDate != null">COMP_DATE = #{compDate},</if>
  261. <if test="engStat != null and engStat != ''">ENG_STAT = #{engStat},</if>
  262. <if test="orgGuid != null and orgGuid != ''">ORG_GUID = #{orgGuid},</if>
  263. <if test="oflpCode != null and oflpCode != ''">OFLP_CODE = #{oflpCode},</if>
  264. <if test="ifReinForce != null and ifReinForce != ''">IF_REIN_FORCE = #{ifReinForce},</if>
  265. <if test="projGuid != null and projGuid != ''">PROJ_GUID = #{projGuid},</if>
  266. <if test="stat != null and stat != ''">STAT = #{stat},</if>
  267. <if test="irrCode != null and irrCode != ''">IRR_CODE = #{irrCode},</if>
  268. <if test="cenLong != null and cenLong != ''">CEN_LONG = #{cenLong},</if>
  269. <if test="cenLat != null and cenLat != ''">CEN_LAT = #{cenLat},</if>
  270. <if test="irrLoc != null and irrLoc != ''">IRR_LOC = #{irrLoc},</if>
  271. <if test="adGuid != null and adGuid != ''">AD_GUID = #{adGuid},</if>
  272. <if test="rvGuid != null and rvGuid != ''">RV_GUID = #{rvGuid},</if>
  273. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  274. <if test="totIrrArea != null and totIrrArea != ''">TOT_IRR_AREA = #{totIrrArea},</if>
  275. <if test="effIrrArea != null and effIrrArea != ''">EFF_IRR_AREA = #{effIrrArea},</if>
  276. </trim>
  277. <where>GUID = #{guid}</where>
  278. </update>
  279. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttEngIrr">
  280. update att_eng_irr
  281. <trim prefix="set" suffixOverrides=",">
  282. <if test="chanHignLeve != null and chanHignLeve != ''">CHAN_HIGN_LEVE = #{chanHignLeve},</if>
  283. <if test="chanNum != null and chanNum != ''">CHAN_NUM = #{chanNum},</if>
  284. <if test="chanLenTot != null and chanLenTot != ''">CHAN_LEN_TOT = #{chanLenTot},</if>
  285. <if test="chanDesFlow != null and chanDesFlow != ''">CHAN_DES_FLOW = #{chanDesFlow},</if>
  286. <if test="chsyGateNum != null and chsyGateNum != ''">CHSY_GATE_NUM = #{chsyGateNum},</if>
  287. <if test="chsyAquNum != null and chsyAquNum != ''">CHSY_AQU_NUM = #{chsyAquNum},</if>
  288. <if test="chsyDropNum != null and chsyDropNum != ''">CHSY_DROP_NUM = #{chsyDropNum},</if>
  289. <if test="chsyInvSiphNum != null and chsyInvSiphNum != ''">CHSY_INV_SIPH_NUM = #{chsyInvSiphNum},</if>
  290. <if test="chsyTunNum != null and chsyTunNum != ''">CHSY_TUN_NUM = #{chsyTunNum},</if>
  291. <if test="chsyCulNum != null and chsyCulNum != ''">CHSY_CUL_NUM = #{chsyCulNum},</if>
  292. <if test="chsyFarmBriNum != null and chsyFarmBriNum != ''">CHSY_FARM_BRI_NUM = #{chsyFarmBriNum},</if>
  293. <if test="chsyMeaNum != null and chsyMeaNum != ''">CHSY_MEA_NUM = #{chsyMeaNum},</if>
  294. <if test="chsyDitPustStNum != null and chsyDitPustStNum != ''">CHSY_DIT_PUST_ST_NUM = #{chsyDitPustStNum},
  295. </if>
  296. <if test="note != null and note != ''">NOTE = #{note},</if>
  297. <if test="collTime != null">COLL_TIME = #{collTime},</if>
  298. <if test="updTime != null">UPD_TIME = #{updTime},</if>
  299. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  300. <if test="engReinForceGuid != null and engReinForceGuid != ''">ENG_REIN_FORCE_GUID = #{engReinForceGuid},
  301. </if>
  302. <if test="desIrrArea != null and desIrrArea != ''">DES_IRR_AREA = #{desIrrArea},</if>
  303. <if test="pGuid != null and pGuid != ''">P_GUID = #{pGuid},</if>
  304. <if test="engName != null and engName != ''">ENG_NAME = #{engName},</if>
  305. <if test="engGuid != null and engGuid != ''">ENG_GUID = #{engGuid},</if>
  306. <if test="impoGrad != null and impoGrad != ''">IMPO_GRAD = #{impoGrad},</if>
  307. <if test="apprBudg != null and apprBudg != ''">APPR_BUDG = #{apprBudg},</if>
  308. <if test="startDate != null">START_DATE = #{startDate},</if>
  309. <if test="compDate != null">COMP_DATE = #{compDate},</if>
  310. <if test="engStat != null and engStat != ''">ENG_STAT = #{engStat},</if>
  311. <if test="orgGuid != null and orgGuid != ''">ORG_GUID = #{orgGuid},</if>
  312. <if test="oflpCode != null and oflpCode != ''">OFLP_CODE = #{oflpCode},</if>
  313. <if test="ifReinForce != null and ifReinForce != ''">IF_REIN_FORCE = #{ifReinForce},</if>
  314. <if test="projGuid != null and projGuid != ''">PROJ_GUID = #{projGuid},</if>
  315. <if test="stat != null and stat != ''">STAT = #{stat},</if>
  316. <if test="irrCode != null and irrCode != ''">IRR_CODE = #{irrCode},</if>
  317. <if test="cenLong != null and cenLong != ''">CEN_LONG = #{cenLong},</if>
  318. <if test="cenLat != null and cenLat != ''">CEN_LAT = #{cenLat},</if>
  319. <if test="irrLoc != null and irrLoc != ''">IRR_LOC = #{irrLoc},</if>
  320. <if test="adGuid != null and adGuid != ''">AD_GUID = #{adGuid},</if>
  321. <if test="rvGuid != null and rvGuid != ''">RV_GUID = #{rvGuid},</if>
  322. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  323. <if test="totIrrArea != null and totIrrArea != ''">TOT_IRR_AREA = #{totIrrArea},</if>
  324. <if test="effIrrArea != null and effIrrArea != ''">EFF_IRR_AREA = #{effIrrArea},</if>
  325. </trim>
  326. <include refid="page_where"/>
  327. </update>
  328. <!-- 其他自定义SQL -->
  329. </mapper>