AttSdBaseCrrctDao.xml 14 KB

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