AttSdBaseCrrctDao.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  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.AttSdBaseCrrctDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttSdBaseCrrct" id="attSdBaseCrrctResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="sdCode" column="SD_CODE"/>
  7. <result property="sdName" column="SD_NAME"/>
  8. <result property="sdType" column="SD_TYPE"/>
  9. <result property="sdTypeStr" column="SD_TYPE_STR"/>
  10. <result property="conArea" column="CON_AREA"/>
  11. <result property="totCap" column="TOT_CAP"/>
  12. <result property="flcoCap" column="FLCO_CAP"/>
  13. <result property="sdrCap" column="SDR_CAP"/>
  14. <result property="flcoYear" column="FLCO_YEAR"/>
  15. <result property="warpCap" column="WARP_CAP"/>
  16. <result property="damSizeHig" column="DAM_SIZE_HIG"/>
  17. <result property="damTopLen" column="DAM_TOP_LEN"/>
  18. <result property="adCode" column="AD_CODE"/>
  19. <result property="sdLoc" column="SD_LOC"/>
  20. <result property="centerX" column="CENTER_X"/>
  21. <result property="centerY" column="CENTER_Y"/>
  22. <result property="gdX" column="GD_X"/>
  23. <result property="gdY" column="GD_Y"/>
  24. <result property="asinttds" column="ASINTTDS"/>
  25. <result property="noSpway" column="NO_SPWAY"/>
  26. <result property="damTear" column="DAM_TEAR"/>
  27. <result property="damLandSubSide" column="DAM_LAND_SUB_SIDE"/>
  28. <result property="damRsog" column="DAM_RSOG"/>
  29. <result property="damLopc" column="DAM_LOPC"/>
  30. <result property="dsLts" column="DS_LTS"/>
  31. <result property="dsCc" column="DS_CC"/>
  32. <result property="dsOc" column="DS_OC"/>
  33. <result property="frsMar" column="FRS_MAR"/>
  34. <result property="frsTbd" column="FRS_TBD"/>
  35. <result property="frsOth" column="FRS_OTH"/>
  36. <result property="note" column="NOTE"/>
  37. <result property="inTm" column="IN_TM"/>
  38. <result property="upTm" column="UP_TM"/>
  39. <result property="persId" column="PERS_ID"/>
  40. </resultMap>
  41. <sql id="table_columns">
  42. ID,
  43. SD_CODE,
  44. SD_NAME,
  45. SD_TYPE,
  46. SD_TYPE_STR,
  47. CON_AREA,
  48. TOT_CAP,
  49. FLCO_CAP,
  50. SDR_CAP,
  51. FLCO_YEAR,
  52. WARP_CAP,
  53. DAM_SIZE_HIG,
  54. DAM_TOP_LEN,
  55. AD_CODE,
  56. SD_LOC,
  57. CENTER_X,
  58. CENTER_Y,
  59. GD_X,
  60. GD_Y,
  61. ASINTTDS,
  62. NO_SPWAY,
  63. DAM_TEAR,
  64. DAM_LAND_SUB_SIDE,
  65. DAM_RSOG,
  66. DAM_LOPC,
  67. DS_LTS,
  68. DS_CC,
  69. DS_OC,
  70. FRS_MAR,
  71. FRS_TBD,
  72. FRS_OTH,
  73. NOTE,
  74. IN_TM,
  75. UP_TM,
  76. PERS_ID
  77. </sql>
  78. <sql id="entity_properties">
  79. #{id},
  80. #{sdCode},
  81. #{sdName},
  82. #{sdType},
  83. #{sdTypeStr},
  84. #{conArea},
  85. #{totCap},
  86. #{flcoCap},
  87. #{sdrCap},
  88. #{flcoYear},
  89. #{warpCap},
  90. #{damSizeHig},
  91. #{damTopLen},
  92. #{adCode},
  93. #{sdLoc},
  94. #{centerX},
  95. #{centerY},
  96. #{gdX},
  97. #{gdY},
  98. #{asinttds},
  99. #{noSpway},
  100. #{damTear},
  101. #{damLandSubSide},
  102. #{damRsog},
  103. #{damLopc},
  104. #{dsLts},
  105. #{dsCc},
  106. #{dsOc},
  107. #{frsMar},
  108. #{frsTbd},
  109. #{frsOth},
  110. #{note},
  111. #{inTm},
  112. #{upTm},
  113. #{persId}
  114. </sql>
  115. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  116. <sql id="page_where">
  117. <trim prefix="where" prefixOverrides="and | or ">
  118. <if test="sdCode != null and sdCode != ''">and SD_CODE = #{sdCode}</if>
  119. <if test="sdName != null and sdName != ''">and SD_NAME = #{sdName}</if>
  120. <if test="sdType != null and sdType != ''">and SD_TYPE = #{sdType}</if>
  121. <if test="sdTypeStr != null and sdTypeStr != ''">and SD_TYPE_STR = #{sdTypeStr}</if>
  122. <if test="conArea != null and conArea != ''">and CON_AREA = #{conArea}</if>
  123. <if test="totCap != null and totCap != ''">and TOT_CAP = #{totCap}</if>
  124. <if test="flcoCap != null and flcoCap != ''">and FLCO_CAP = #{flcoCap}</if>
  125. <if test="sdrCap != null and sdrCap != ''">and SDR_CAP = #{sdrCap}</if>
  126. <if test="flcoYear != null and flcoYear != ''">and FLCO_YEAR = #{flcoYear}</if>
  127. <if test="warpCap != null and warpCap != ''">and WARP_CAP = #{warpCap}</if>
  128. <if test="damSizeHig != null and damSizeHig != ''">and DAM_SIZE_HIG = #{damSizeHig}</if>
  129. <if test="damTopLen != null and damTopLen != ''">and DAM_TOP_LEN = #{damTopLen}</if>
  130. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  131. <if test="sdLoc != null and sdLoc != ''">and SD_LOC = #{sdLoc}</if>
  132. <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
  133. <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
  134. <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
  135. <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
  136. <if test="asinttds != null and asinttds != ''">and ASINTTDS = #{asinttds}</if>
  137. <if test="noSpway != null and noSpway != ''">and NO_SPWAY = #{noSpway}</if>
  138. <if test="damTear != null and damTear != ''">and DAM_TEAR = #{damTear}</if>
  139. <if test="damLandSubSide != null and damLandSubSide != ''">and DAM_LAND_SUB_SIDE = #{damLandSubSide}</if>
  140. <if test="damRsog != null and damRsog != ''">and DAM_RSOG = #{damRsog}</if>
  141. <if test="damLopc != null and damLopc != ''">and DAM_LOPC = #{damLopc}</if>
  142. <if test="dsLts != null and dsLts != ''">and DS_LTS = #{dsLts}</if>
  143. <if test="dsCc != null and dsCc != ''">and DS_CC = #{dsCc}</if>
  144. <if test="dsOc != null and dsOc != ''">and DS_OC = #{dsOc}</if>
  145. <if test="frsMar != null and frsMar != ''">and FRS_MAR = #{frsMar}</if>
  146. <if test="frsTbd != null and frsTbd != ''">and FRS_TBD = #{frsTbd}</if>
  147. <if test="frsOth != null and frsOth != ''">and FRS_OTH = #{frsOth}</if>
  148. <if test="note != null and note != ''">and NOTE = #{note}</if>
  149. <if test="inTm != null">and IN_TM = #{inTm}</if>
  150. <if test="upTm != null">and UP_TM = #{upTm}</if>
  151. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  152. </trim>
  153. </sql>
  154. <select id="get" resultMap="attSdBaseCrrctResultMap" parameterType="String" >
  155. select <include refid="table_columns" /> from ATT_SD_BASE_CRRCT where ID = #{id}
  156. </select>
  157. <select id="getBy" resultMap="attSdBaseCrrctResultMap">
  158. select <include refid="table_columns" /> from ATT_SD_BASE_CRRCT <include refid="page_where" />
  159. </select>
  160. <select id="findAll" resultMap="attSdBaseCrrctResultMap">
  161. select <include refid="table_columns" /> from ATT_SD_BASE_CRRCT
  162. </select>
  163. <select id="findList" resultMap="attSdBaseCrrctResultMap">
  164. select <include refid="table_columns" /> from ATT_SD_BASE_CRRCT <include refid="page_where" />
  165. </select>
  166. <select id="selectCount" resultType="int" >
  167. select count(ID) from ATT_SD_BASE_CRRCT <include refid="page_where" />
  168. </select>
  169. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttSdBaseCrrct">
  170. insert into ATT_SD_BASE_CRRCT( <include refid="table_columns" /> )
  171. values ( <include refid="entity_properties" /> )
  172. </insert>
  173. <delete id="delete" parameterType="java.lang.String">
  174. delete from ATT_SD_BASE_CRRCT where ID = #{id}
  175. </delete>
  176. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttSdBaseCrrct">
  177. delete from ATT_SD_BASE_CRRCT <include refid="page_where" />
  178. </delete>
  179. <update id="deleteInFlag" parameterType="java.lang.String">
  180. update ATT_SD_BASE_CRRCT set flag_valid = 0 where ID = #{id}
  181. </update>
  182. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttSdBaseCrrct">
  183. update ATT_SD_BASE_CRRCT
  184. <trim prefix="set" suffixOverrides=",">
  185. <if test="sdCode != null and sdCode != ''">SD_CODE = #{sdCode},</if>
  186. <if test="sdName != null and sdName != ''">SD_NAME = #{sdName},</if>
  187. <if test="sdType != null and sdType != ''">SD_TYPE = #{sdType},</if>
  188. <if test="sdTypeStr != null and sdTypeStr != ''">SD_TYPE_STR = #{sdTypeStr},</if>
  189. <if test="conArea != null and conArea != ''">CON_AREA = #{conArea},</if>
  190. <if test="totCap != null and totCap != ''">TOT_CAP = #{totCap},</if>
  191. <if test="flcoCap != null and flcoCap != ''">FLCO_CAP = #{flcoCap},</if>
  192. <if test="sdrCap != null and sdrCap != ''">SDR_CAP = #{sdrCap},</if>
  193. <if test="flcoYear != null and flcoYear != ''">FLCO_YEAR = #{flcoYear},</if>
  194. <if test="warpCap != null and warpCap != ''">WARP_CAP = #{warpCap},</if>
  195. <if test="damSizeHig != null and damSizeHig != ''">DAM_SIZE_HIG = #{damSizeHig},</if>
  196. <if test="damTopLen != null and damTopLen != ''">DAM_TOP_LEN = #{damTopLen},</if>
  197. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  198. <if test="sdLoc != null and sdLoc != ''">SD_LOC = #{sdLoc},</if>
  199. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  200. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  201. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  202. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  203. <if test="asinttds != null and asinttds != ''">ASINTTDS = #{asinttds},</if>
  204. <if test="noSpway != null and noSpway != ''">NO_SPWAY = #{noSpway},</if>
  205. <if test="damTear != null and damTear != ''">DAM_TEAR = #{damTear},</if>
  206. <if test="damLandSubSide != null and damLandSubSide != ''">DAM_LAND_SUB_SIDE = #{damLandSubSide},</if>
  207. <if test="damRsog != null and damRsog != ''">DAM_RSOG = #{damRsog},</if>
  208. <if test="damLopc != null and damLopc != ''">DAM_LOPC = #{damLopc},</if>
  209. <if test="dsLts != null and dsLts != ''">DS_LTS = #{dsLts},</if>
  210. <if test="dsCc != null and dsCc != ''">DS_CC = #{dsCc},</if>
  211. <if test="dsOc != null and dsOc != ''">DS_OC = #{dsOc},</if>
  212. <if test="frsMar != null and frsMar != ''">FRS_MAR = #{frsMar},</if>
  213. <if test="frsTbd != null and frsTbd != ''">FRS_TBD = #{frsTbd},</if>
  214. <if test="frsOth != null and frsOth != ''">FRS_OTH = #{frsOth},</if>
  215. <if test="note != null and note != ''">NOTE = #{note},</if>
  216. <if test="inTm != null">IN_TM = #{inTm},</if>
  217. <if test="upTm != null">UP_TM = #{upTm},</if>
  218. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  219. </trim>
  220. <where>ID = #{id}</where>
  221. </update>
  222. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttSdBaseCrrct">
  223. update ATT_SD_BASE_CRRCT
  224. <trim prefix="set" suffixOverrides=",">
  225. <if test="sdCode != null and sdCode != ''">SD_CODE = #{sdCode},</if>
  226. <if test="sdName != null and sdName != ''">SD_NAME = #{sdName},</if>
  227. <if test="sdType != null and sdType != ''">SD_TYPE = #{sdType},</if>
  228. <if test="sdTypeStr != null and sdTypeStr != ''">SD_TYPE_STR = #{sdTypeStr},</if>
  229. <if test="conArea != null and conArea != ''">CON_AREA = #{conArea},</if>
  230. <if test="totCap != null and totCap != ''">TOT_CAP = #{totCap},</if>
  231. <if test="flcoCap != null and flcoCap != ''">FLCO_CAP = #{flcoCap},</if>
  232. <if test="sdrCap != null and sdrCap != ''">SDR_CAP = #{sdrCap},</if>
  233. <if test="flcoYear != null and flcoYear != ''">FLCO_YEAR = #{flcoYear},</if>
  234. <if test="warpCap != null and warpCap != ''">WARP_CAP = #{warpCap},</if>
  235. <if test="damSizeHig != null and damSizeHig != ''">DAM_SIZE_HIG = #{damSizeHig},</if>
  236. <if test="damTopLen != null and damTopLen != ''">DAM_TOP_LEN = #{damTopLen},</if>
  237. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  238. <if test="sdLoc != null and sdLoc != ''">SD_LOC = #{sdLoc},</if>
  239. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  240. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  241. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  242. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  243. <if test="asinttds != null and asinttds != ''">ASINTTDS = #{asinttds},</if>
  244. <if test="noSpway != null and noSpway != ''">NO_SPWAY = #{noSpway},</if>
  245. <if test="damTear != null and damTear != ''">DAM_TEAR = #{damTear},</if>
  246. <if test="damLandSubSide != null and damLandSubSide != ''">DAM_LAND_SUB_SIDE = #{damLandSubSide},</if>
  247. <if test="damRsog != null and damRsog != ''">DAM_RSOG = #{damRsog},</if>
  248. <if test="damLopc != null and damLopc != ''">DAM_LOPC = #{damLopc},</if>
  249. <if test="dsLts != null and dsLts != ''">DS_LTS = #{dsLts},</if>
  250. <if test="dsCc != null and dsCc != ''">DS_CC = #{dsCc},</if>
  251. <if test="dsOc != null and dsOc != ''">DS_OC = #{dsOc},</if>
  252. <if test="frsMar != null and frsMar != ''">FRS_MAR = #{frsMar},</if>
  253. <if test="frsTbd != null and frsTbd != ''">FRS_TBD = #{frsTbd},</if>
  254. <if test="frsOth != null and frsOth != ''">FRS_OTH = #{frsOth},</if>
  255. <if test="note != null and note != ''">NOTE = #{note},</if>
  256. <if test="inTm != null">IN_TM = #{inTm},</if>
  257. <if test="upTm != null">UP_TM = #{upTm},</if>
  258. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  259. </trim>
  260. <include refid="page_where" />
  261. </update>
  262. <!-- 其他自定义SQL -->
  263. </mapper>