AttSwhsBaseCrrctDao.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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.AttSwhsBaseCrrctDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttSwhsBaseCrrct" id="attSwhsBaseCrrctResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="swhsCode" column="SWHS_CODE"/>
  7. <result property="swhsName" column="SWHS_NAME"/>
  8. <result property="swhsLong" column="SWHS_LONG"/>
  9. <result property="swhsLat" column="SWHS_LAT"/>
  10. <result property="adCode" column="AD_CODE"/>
  11. <result property="swhsLoc" column="SWHS_LOC"/>
  12. <result property="wainWasoType" column="WAIN_WASO_TYPE"/>
  13. <result property="watArea" column="WAT_AREA"/>
  14. <result property="wainNum" column="WAIN_NUM"/>
  15. <result property="wainUse" column="WAIN_USE"/>
  16. <result property="wasuObjType" column="WASU_OBJ_TYPE"/>
  17. <result property="wasuTownName" column="WASU_TOWN_NAME"/>
  18. <result property="wasuTownName2" column="WASU_TOWN_NAME_2"/>
  19. <result property="wasuTownName3" column="WASU_TOWN_NAME_3"/>
  20. <result property="desAnnWain" column="DES_ANN_WAIN"/>
  21. <result property="desAnnWasuPop" column="DES_ANN_WASU_POP"/>
  22. <result property="runYear" column="RUN_YEAR"/>
  23. <result property="wintRvName" column="WINT_RV_NAME"/>
  24. <result property="wintLakeName" column="WINT_LAKE_NAME"/>
  25. <result property="wintRsName" column="WINT_RS_NAME"/>
  26. <result property="waquGoal" column="WAQU_GOAL"/>
  27. <result property="ifMonWqua" column="IF_MON_WQUA"/>
  28. <result property="wquaCat" column="WQUA_CAT"/>
  29. <result property="ifWquaUptoSta" column="IF_WQUA_UPTO_STA"/>
  30. <result property="ifWsProt" column="IF_WS_PROT"/>
  31. <result property="watArea1stProt" column="WAT_AREA_1ST_PROT"/>
  32. <result property="landArea1stProt" column="LAND_AREA_1ST_PROT"/>
  33. <result property="watArea2ndProt" column="WAT_AREA_2ND_PROT"/>
  34. <result property="landArea2ndProt" column="LAND_AREA_2ND_PROT"/>
  35. <result property="qusProt" column="QUS_PROT"/>
  36. <result property="insName" column="INS_NAME"/>
  37. <result property="tra" column="TRA"/>
  38. <result property="persId" column="PERS_ID"/>
  39. <result property="note" column="NOTE"/>
  40. <result property="effDate" column="EFF_DATE"/>
  41. <result property="exprDate" column="EXPR_DATE"/>
  42. <result property="swhsLongGd" column="SWHS_LONG_GD"/>
  43. <result property="swhsLatGd" column="SWHS_LAT_GD"/>
  44. <result property="displayLevel" column="DISPLAY_LEVEL"/>
  45. <result property="inTm" column="IN_TM"/>
  46. <result property="upTm" column="UP_TM"/>
  47. </resultMap>
  48. <sql id="table_columns">
  49. ID,
  50. SWHS_CODE,
  51. SWHS_NAME,
  52. SWHS_LONG,
  53. SWHS_LAT,
  54. AD_CODE,
  55. SWHS_LOC,
  56. WAIN_WASO_TYPE,
  57. WAT_AREA,
  58. WAIN_NUM,
  59. WAIN_USE,
  60. WASU_OBJ_TYPE,
  61. WASU_TOWN_NAME,
  62. WASU_TOWN_NAME_2,
  63. WASU_TOWN_NAME_3,
  64. DES_ANN_WAIN,
  65. DES_ANN_WASU_POP,
  66. RUN_YEAR,
  67. WINT_RV_NAME,
  68. WINT_LAKE_NAME,
  69. WINT_RS_NAME,
  70. WAQU_GOAL,
  71. IF_MON_WQUA,
  72. WQUA_CAT,
  73. IF_WQUA_UPTO_STA,
  74. IF_WS_PROT,
  75. WAT_AREA_1ST_PROT,
  76. LAND_AREA_1ST_PROT,
  77. WAT_AREA_2ND_PROT,
  78. LAND_AREA_2ND_PROT,
  79. QUS_PROT,
  80. INS_NAME,
  81. TRA,
  82. PERS_ID,
  83. NOTE,
  84. EFF_DATE,
  85. EXPR_DATE,
  86. SWHS_LONG_GD,
  87. SWHS_LAT_GD,
  88. DISPLAY_LEVEL,
  89. IN_TM,
  90. UP_TM
  91. </sql>
  92. <sql id="entity_properties">
  93. #{id},
  94. #{swhsCode},
  95. #{swhsName},
  96. #{swhsLong},
  97. #{swhsLat},
  98. #{adCode},
  99. #{swhsLoc},
  100. #{wainWasoType},
  101. #{watArea},
  102. #{wainNum},
  103. #{wainUse},
  104. #{wasuObjType},
  105. #{wasuTownName},
  106. #{wasuTownName2},
  107. #{wasuTownName3},
  108. #{desAnnWain},
  109. #{desAnnWasuPop},
  110. #{runYear},
  111. #{wintRvName},
  112. #{wintLakeName},
  113. #{wintRsName},
  114. #{waquGoal},
  115. #{ifMonWqua},
  116. #{wquaCat},
  117. #{ifWquaUptoSta},
  118. #{ifWsProt},
  119. #{watArea1stProt},
  120. #{landArea1stProt},
  121. #{watArea2ndProt},
  122. #{landArea2ndProt},
  123. #{qusProt},
  124. #{insName},
  125. #{tra},
  126. #{persId},
  127. #{note},
  128. #{effDate},
  129. #{exprDate},
  130. #{swhsLongGd},
  131. #{swhsLatGd},
  132. #{displayLevel},
  133. #{inTm},
  134. #{upTm}
  135. </sql>
  136. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  137. <sql id="page_where">
  138. <trim prefix="where" prefixOverrides="and | or ">
  139. <if test="swhsCode != null and swhsCode != ''">and SWHS_CODE = #{swhsCode}</if>
  140. <if test="swhsName != null and swhsName != ''">and SWHS_NAME = #{swhsName}</if>
  141. <if test="swhsLong != null and swhsLong != ''">and SWHS_LONG = #{swhsLong}</if>
  142. <if test="swhsLat != null and swhsLat != ''">and SWHS_LAT = #{swhsLat}</if>
  143. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  144. <if test="swhsLoc != null and swhsLoc != ''">and SWHS_LOC = #{swhsLoc}</if>
  145. <if test="wainWasoType != null and wainWasoType != ''">and WAIN_WASO_TYPE = #{wainWasoType}</if>
  146. <if test="watArea != null and watArea != ''">and WAT_AREA = #{watArea}</if>
  147. <if test="wainNum != null and wainNum != ''">and WAIN_NUM = #{wainNum}</if>
  148. <if test="wainUse != null and wainUse != ''">and WAIN_USE = #{wainUse}</if>
  149. <if test="wasuObjType != null and wasuObjType != ''">and WASU_OBJ_TYPE = #{wasuObjType}</if>
  150. <if test="wasuTownName != null and wasuTownName != ''">and WASU_TOWN_NAME = #{wasuTownName}</if>
  151. <if test="wasuTownName2 != null and wasuTownName2 != ''">and WASU_TOWN_NAME_2 = #{wasuTownName2}</if>
  152. <if test="wasuTownName3 != null and wasuTownName3 != ''">and WASU_TOWN_NAME_3 = #{wasuTownName3}</if>
  153. <if test="desAnnWain != null and desAnnWain != ''">and DES_ANN_WAIN = #{desAnnWain}</if>
  154. <if test="desAnnWasuPop != null and desAnnWasuPop != ''">and DES_ANN_WASU_POP = #{desAnnWasuPop}</if>
  155. <if test="runYear != null and runYear != ''">and RUN_YEAR = #{runYear}</if>
  156. <if test="wintRvName != null and wintRvName != ''">and WINT_RV_NAME = #{wintRvName}</if>
  157. <if test="wintLakeName != null and wintLakeName != ''">and WINT_LAKE_NAME = #{wintLakeName}</if>
  158. <if test="wintRsName != null and wintRsName != ''">and WINT_RS_NAME = #{wintRsName}</if>
  159. <if test="waquGoal != null and waquGoal != ''">and WAQU_GOAL = #{waquGoal}</if>
  160. <if test="ifMonWqua != null and ifMonWqua != ''">and IF_MON_WQUA = #{ifMonWqua}</if>
  161. <if test="wquaCat != null and wquaCat != ''">and WQUA_CAT = #{wquaCat}</if>
  162. <if test="ifWquaUptoSta != null and ifWquaUptoSta != ''">and IF_WQUA_UPTO_STA = #{ifWquaUptoSta}</if>
  163. <if test="ifWsProt != null and ifWsProt != ''">and IF_WS_PROT = #{ifWsProt}</if>
  164. <if test="watArea1stProt != null and watArea1stProt != ''">and WAT_AREA_1ST_PROT = #{watArea1stProt}</if>
  165. <if test="landArea1stProt != null and landArea1stProt != ''">and LAND_AREA_1ST_PROT = #{landArea1stProt}</if>
  166. <if test="watArea2ndProt != null and watArea2ndProt != ''">and WAT_AREA_2ND_PROT = #{watArea2ndProt}</if>
  167. <if test="landArea2ndProt != null and landArea2ndProt != ''">and LAND_AREA_2ND_PROT = #{landArea2ndProt}</if>
  168. <if test="qusProt != null and qusProt != ''">and QUS_PROT = #{qusProt}</if>
  169. <if test="insName != null and insName != ''">and INS_NAME = #{insName}</if>
  170. <if test="tra != null and tra != ''">and TRA = #{tra}</if>
  171. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  172. <if test="note != null and note != ''">and NOTE = #{note}</if>
  173. <if test="effDate != null">and EFF_DATE = #{effDate}</if>
  174. <if test="exprDate != null">and EXPR_DATE = #{exprDate}</if>
  175. <if test="swhsLongGd != null and swhsLongGd != ''">and SWHS_LONG_GD = #{swhsLongGd}</if>
  176. <if test="swhsLatGd != null and swhsLatGd != ''">and SWHS_LAT_GD = #{swhsLatGd}</if>
  177. <if test="displayLevel != null and displayLevel != ''">and DISPLAY_LEVEL = #{displayLevel}</if>
  178. <if test="inTm != null">and IN_TM = #{inTm}</if>
  179. <if test="upTm != null">and UP_TM = #{upTm}</if>
  180. </trim>
  181. </sql>
  182. <select id="get" resultMap="attSwhsBaseCrrctResultMap" parameterType="String" >
  183. select <include refid="table_columns" /> from ATT_SWHS_BASE_CRRCT where ID = #{id}
  184. </select>
  185. <select id="getBy" resultMap="attSwhsBaseCrrctResultMap">
  186. select <include refid="table_columns" /> from ATT_SWHS_BASE_CRRCT <include refid="page_where" />
  187. </select>
  188. <select id="findAll" resultMap="attSwhsBaseCrrctResultMap">
  189. select <include refid="table_columns" /> from ATT_SWHS_BASE_CRRCT
  190. </select>
  191. <select id="findList" resultMap="attSwhsBaseCrrctResultMap">
  192. select <include refid="table_columns" /> from ATT_SWHS_BASE_CRRCT <include refid="page_where" />
  193. </select>
  194. <select id="selectCount" resultType="int" >
  195. select count(ID) from ATT_SWHS_BASE_CRRCT <include refid="page_where" />
  196. </select>
  197. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttSwhsBaseCrrct">
  198. insert into ATT_SWHS_BASE_CRRCT( <include refid="table_columns" /> )
  199. values ( <include refid="entity_properties" /> )
  200. </insert>
  201. <delete id="delete" parameterType="java.lang.String">
  202. delete from ATT_SWHS_BASE_CRRCT where ID = #{id}
  203. </delete>
  204. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttSwhsBaseCrrct">
  205. delete from ATT_SWHS_BASE_CRRCT <include refid="page_where" />
  206. </delete>
  207. <update id="deleteInFlag" parameterType="java.lang.String">
  208. update ATT_SWHS_BASE_CRRCT set flag_valid = 0 where ID = #{id}
  209. </update>
  210. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttSwhsBaseCrrct">
  211. update ATT_SWHS_BASE_CRRCT
  212. <trim prefix="set" suffixOverrides=",">
  213. <if test="swhsCode != null and swhsCode != ''">SWHS_CODE = #{swhsCode},</if>
  214. <if test="swhsName != null and swhsName != ''">SWHS_NAME = #{swhsName},</if>
  215. <if test="swhsLong != null and swhsLong != ''">SWHS_LONG = #{swhsLong},</if>
  216. <if test="swhsLat != null and swhsLat != ''">SWHS_LAT = #{swhsLat},</if>
  217. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  218. <if test="swhsLoc != null and swhsLoc != ''">SWHS_LOC = #{swhsLoc},</if>
  219. <if test="wainWasoType != null and wainWasoType != ''">WAIN_WASO_TYPE = #{wainWasoType},</if>
  220. <if test="watArea != null and watArea != ''">WAT_AREA = #{watArea},</if>
  221. <if test="wainNum != null and wainNum != ''">WAIN_NUM = #{wainNum},</if>
  222. <if test="wainUse != null and wainUse != ''">WAIN_USE = #{wainUse},</if>
  223. <if test="wasuObjType != null and wasuObjType != ''">WASU_OBJ_TYPE = #{wasuObjType},</if>
  224. <if test="wasuTownName != null and wasuTownName != ''">WASU_TOWN_NAME = #{wasuTownName},</if>
  225. <if test="wasuTownName2 != null and wasuTownName2 != ''">WASU_TOWN_NAME_2 = #{wasuTownName2},</if>
  226. <if test="wasuTownName3 != null and wasuTownName3 != ''">WASU_TOWN_NAME_3 = #{wasuTownName3},</if>
  227. <if test="desAnnWain != null and desAnnWain != ''">DES_ANN_WAIN = #{desAnnWain},</if>
  228. <if test="desAnnWasuPop != null and desAnnWasuPop != ''">DES_ANN_WASU_POP = #{desAnnWasuPop},</if>
  229. <if test="runYear != null and runYear != ''">RUN_YEAR = #{runYear},</if>
  230. <if test="wintRvName != null and wintRvName != ''">WINT_RV_NAME = #{wintRvName},</if>
  231. <if test="wintLakeName != null and wintLakeName != ''">WINT_LAKE_NAME = #{wintLakeName},</if>
  232. <if test="wintRsName != null and wintRsName != ''">WINT_RS_NAME = #{wintRsName},</if>
  233. <if test="waquGoal != null and waquGoal != ''">WAQU_GOAL = #{waquGoal},</if>
  234. <if test="ifMonWqua != null and ifMonWqua != ''">IF_MON_WQUA = #{ifMonWqua},</if>
  235. <if test="wquaCat != null and wquaCat != ''">WQUA_CAT = #{wquaCat},</if>
  236. <if test="ifWquaUptoSta != null and ifWquaUptoSta != ''">IF_WQUA_UPTO_STA = #{ifWquaUptoSta},</if>
  237. <if test="ifWsProt != null and ifWsProt != ''">IF_WS_PROT = #{ifWsProt},</if>
  238. <if test="watArea1stProt != null and watArea1stProt != ''">WAT_AREA_1ST_PROT = #{watArea1stProt},</if>
  239. <if test="landArea1stProt != null and landArea1stProt != ''">LAND_AREA_1ST_PROT = #{landArea1stProt},</if>
  240. <if test="watArea2ndProt != null and watArea2ndProt != ''">WAT_AREA_2ND_PROT = #{watArea2ndProt},</if>
  241. <if test="landArea2ndProt != null and landArea2ndProt != ''">LAND_AREA_2ND_PROT = #{landArea2ndProt},</if>
  242. <if test="qusProt != null and qusProt != ''">QUS_PROT = #{qusProt},</if>
  243. <if test="insName != null and insName != ''">INS_NAME = #{insName},</if>
  244. <if test="tra != null and tra != ''">TRA = #{tra},</if>
  245. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  246. <if test="note != null and note != ''">NOTE = #{note},</if>
  247. <if test="effDate != null">EFF_DATE = #{effDate},</if>
  248. <if test="exprDate != null">EXPR_DATE = #{exprDate},</if>
  249. <if test="swhsLongGd != null and swhsLongGd != ''">SWHS_LONG_GD = #{swhsLongGd},</if>
  250. <if test="swhsLatGd != null and swhsLatGd != ''">SWHS_LAT_GD = #{swhsLatGd},</if>
  251. <if test="displayLevel != null and displayLevel != ''">DISPLAY_LEVEL = #{displayLevel},</if>
  252. <if test="inTm != null">IN_TM = #{inTm},</if>
  253. <if test="upTm != null">UP_TM = #{upTm},</if>
  254. </trim>
  255. <where>ID = #{id}</where>
  256. </update>
  257. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttSwhsBaseCrrct">
  258. update ATT_SWHS_BASE_CRRCT
  259. <trim prefix="set" suffixOverrides=",">
  260. <if test="swhsCode != null and swhsCode != ''">SWHS_CODE = #{swhsCode},</if>
  261. <if test="swhsName != null and swhsName != ''">SWHS_NAME = #{swhsName},</if>
  262. <if test="swhsLong != null and swhsLong != ''">SWHS_LONG = #{swhsLong},</if>
  263. <if test="swhsLat != null and swhsLat != ''">SWHS_LAT = #{swhsLat},</if>
  264. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  265. <if test="swhsLoc != null and swhsLoc != ''">SWHS_LOC = #{swhsLoc},</if>
  266. <if test="wainWasoType != null and wainWasoType != ''">WAIN_WASO_TYPE = #{wainWasoType},</if>
  267. <if test="watArea != null and watArea != ''">WAT_AREA = #{watArea},</if>
  268. <if test="wainNum != null and wainNum != ''">WAIN_NUM = #{wainNum},</if>
  269. <if test="wainUse != null and wainUse != ''">WAIN_USE = #{wainUse},</if>
  270. <if test="wasuObjType != null and wasuObjType != ''">WASU_OBJ_TYPE = #{wasuObjType},</if>
  271. <if test="wasuTownName != null and wasuTownName != ''">WASU_TOWN_NAME = #{wasuTownName},</if>
  272. <if test="wasuTownName2 != null and wasuTownName2 != ''">WASU_TOWN_NAME_2 = #{wasuTownName2},</if>
  273. <if test="wasuTownName3 != null and wasuTownName3 != ''">WASU_TOWN_NAME_3 = #{wasuTownName3},</if>
  274. <if test="desAnnWain != null and desAnnWain != ''">DES_ANN_WAIN = #{desAnnWain},</if>
  275. <if test="desAnnWasuPop != null and desAnnWasuPop != ''">DES_ANN_WASU_POP = #{desAnnWasuPop},</if>
  276. <if test="runYear != null and runYear != ''">RUN_YEAR = #{runYear},</if>
  277. <if test="wintRvName != null and wintRvName != ''">WINT_RV_NAME = #{wintRvName},</if>
  278. <if test="wintLakeName != null and wintLakeName != ''">WINT_LAKE_NAME = #{wintLakeName},</if>
  279. <if test="wintRsName != null and wintRsName != ''">WINT_RS_NAME = #{wintRsName},</if>
  280. <if test="waquGoal != null and waquGoal != ''">WAQU_GOAL = #{waquGoal},</if>
  281. <if test="ifMonWqua != null and ifMonWqua != ''">IF_MON_WQUA = #{ifMonWqua},</if>
  282. <if test="wquaCat != null and wquaCat != ''">WQUA_CAT = #{wquaCat},</if>
  283. <if test="ifWquaUptoSta != null and ifWquaUptoSta != ''">IF_WQUA_UPTO_STA = #{ifWquaUptoSta},</if>
  284. <if test="ifWsProt != null and ifWsProt != ''">IF_WS_PROT = #{ifWsProt},</if>
  285. <if test="watArea1stProt != null and watArea1stProt != ''">WAT_AREA_1ST_PROT = #{watArea1stProt},</if>
  286. <if test="landArea1stProt != null and landArea1stProt != ''">LAND_AREA_1ST_PROT = #{landArea1stProt},</if>
  287. <if test="watArea2ndProt != null and watArea2ndProt != ''">WAT_AREA_2ND_PROT = #{watArea2ndProt},</if>
  288. <if test="landArea2ndProt != null and landArea2ndProt != ''">LAND_AREA_2ND_PROT = #{landArea2ndProt},</if>
  289. <if test="qusProt != null and qusProt != ''">QUS_PROT = #{qusProt},</if>
  290. <if test="insName != null and insName != ''">INS_NAME = #{insName},</if>
  291. <if test="tra != null and tra != ''">TRA = #{tra},</if>
  292. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  293. <if test="note != null and note != ''">NOTE = #{note},</if>
  294. <if test="effDate != null">EFF_DATE = #{effDate},</if>
  295. <if test="exprDate != null">EXPR_DATE = #{exprDate},</if>
  296. <if test="swhsLongGd != null and swhsLongGd != ''">SWHS_LONG_GD = #{swhsLongGd},</if>
  297. <if test="swhsLatGd != null and swhsLatGd != ''">SWHS_LAT_GD = #{swhsLatGd},</if>
  298. <if test="displayLevel != null and displayLevel != ''">DISPLAY_LEVEL = #{displayLevel},</if>
  299. <if test="inTm != null">IN_TM = #{inTm},</if>
  300. <if test="upTm != null">UP_TM = #{upTm},</if>
  301. </trim>
  302. <include refid="page_where" />
  303. </update>
  304. <!-- 其他自定义SQL -->
  305. </mapper>