AttRsBaseCrrctRepeatDao.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  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.AttRsBaseCrrctRepeatDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttRsBaseCrrct" id="attRsBaseCrrctRepeatResultMap">
  5. <result property="engScal" column="ENG_SCAL"/>
  6. <result property="limStag" column="LIM_STAG"/>
  7. <result property="totCap" column="TOT_CAP"/>
  8. <result property="rsAdmName" column="RS_ADM_NAME"/>
  9. <result property="rsAdmCode" column="RS_ADM_CODE"/>
  10. <result property="rsAdmDep" column="RS_ADM_DEP"/>
  11. <result property="admAttRel" column="ADM_ATT_REL"/>
  12. <result property="rsCode" column="RS_CODE"/>
  13. <result property="rsName" column="RS_NAME"/>
  14. <result property="longitude" column="LONGITUDE"/>
  15. <result property="latitude" column="LATITUDE"/>
  16. <result property="location" column="LOCATION"/>
  17. <result property="admDiv" column="ADM_DIV"/>
  18. <result property="rsType" column="RS_TYPE"/>
  19. <result property="damTypeMat" column="DAM_TYPE_MAT"/>
  20. <result property="damTypeStr" column="DAM_TYPE_STR"/>
  21. <result property="damSizeHig" column="DAM_SIZE_HIG"/>
  22. <result property="centerX" column="CENTER_X"/>
  23. <result property="centerY" column="CENTER_Y"/>
  24. <result property="src" column="SRC"/>
  25. <result property="dataQuality" column="DATA_QUALITY"/>
  26. <result property="centerXGd" column="CENTER_X_GD"/>
  27. <result property="centerYGd" column="CENTER_Y_GD"/>
  28. <result property="rsLoc" column="RS_LOC"/>
  29. <result property="regCode" column="REG_CODE"/>
  30. <result property="compDate" column="COMP_DATE"/>
  31. <result property="intm" column="INTM"/>
  32. <result property="regNo" column="REG_NO"/>
  33. <result property="chkState" column="CHK_STATE"/>
  34. <result property="persId" column="PERS_ID"/>
  35. <result property="hstInsp" column="HST_INSP"/>
  36. <result property="uptm" column="UPTM"/>
  37. <result property="edtrPesr" column="EDTR_PESR"/>
  38. <result property="crrctId" column="CRRCT_ID"/>
  39. <result property="compDateStr" column="COMP_DATE_STR"/>
  40. <result property="objId" column="OBJ_ID"/>
  41. </resultMap>
  42. <sql id="table_columns">
  43. ENG_SCAL,
  44. LIM_STAG,
  45. TOT_CAP,
  46. RS_ADM_NAME,
  47. RS_ADM_CODE,
  48. RS_ADM_DEP,
  49. ADM_ATT_REL,
  50. RS_CODE,
  51. RS_NAME,
  52. LONGITUDE,
  53. LATITUDE,
  54. LOCATION,
  55. ADM_DIV,
  56. RS_TYPE,
  57. DAM_TYPE_MAT,
  58. DAM_TYPE_STR,
  59. DAM_SIZE_HIG,
  60. CENTER_X,
  61. CENTER_Y,
  62. SRC,
  63. DATA_QUALITY,
  64. CENTER_X_GD,
  65. CENTER_Y_GD,
  66. RS_LOC,
  67. REG_CODE,
  68. COMP_DATE,
  69. INTM,
  70. REG_NO,
  71. CHK_STATE,
  72. PERS_ID,
  73. HST_INSP,
  74. UPTM,
  75. EDTR_PESR,
  76. CRRCT_ID,
  77. COMP_DATE_STR,
  78. OBJ_ID
  79. </sql>
  80. <sql id="entity_properties">
  81. #{engScal},
  82. #{limStag},
  83. #{totCap},
  84. #{rsAdmName},
  85. #{rsAdmCode},
  86. #{rsAdmDep},
  87. #{admAttRel},
  88. #{rsCode},
  89. #{rsName},
  90. #{longitude},
  91. #{latitude},
  92. #{location},
  93. #{admDiv},
  94. #{rsType},
  95. #{damTypeMat},
  96. #{damTypeStr},
  97. #{damSizeHig},
  98. #{centerX},
  99. #{centerY},
  100. #{src},
  101. #{dataQuality},
  102. #{centerXGd},
  103. #{centerYGd},
  104. #{rsLoc},
  105. #{regCode},
  106. #{compDate},
  107. #{intm},
  108. #{regNo},
  109. #{chkState},
  110. #{persId},
  111. #{hstInsp},
  112. #{uptm},
  113. #{edtrPesr},
  114. #{crrctId},
  115. #{compDateStr},
  116. #{objId}
  117. </sql>
  118. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  119. <sql id="page_where">
  120. <trim prefix="where" prefixOverrides="and | or ">
  121. <if test="limStag != null and limStag != ''">and LIM_STAG = #{limStag}</if>
  122. <if test="totCap != null and totCap != ''">and TOT_CAP = #{totCap}</if>
  123. <if test="rsAdmName != null and rsAdmName != ''">and RS_ADM_NAME = #{rsAdmName}</if>
  124. <if test="rsAdmCode != null and rsAdmCode != ''">and RS_ADM_CODE = #{rsAdmCode}</if>
  125. <if test="rsAdmDep != null and rsAdmDep != ''">and RS_ADM_DEP = #{rsAdmDep}</if>
  126. <if test="admAttRel != null and admAttRel != ''">and ADM_ATT_REL = #{admAttRel}</if>
  127. <if test="rsCode != null and rsCode != ''">and RS_CODE = #{rsCode}</if>
  128. <if test="rsName != null and rsName != ''">and RS_NAME = #{rsName}</if>
  129. <if test="longitude != null and longitude != ''">and LONGITUDE = #{longitude}</if>
  130. <if test="latitude != null and latitude != ''">and LATITUDE = #{latitude}</if>
  131. <if test="location != null and location != ''">and LOCATION = #{location}</if>
  132. <if test="admDiv != null and admDiv != ''">and ADM_DIV = #{admDiv}</if>
  133. <if test="rsType != null and rsType != ''">and RS_TYPE = #{rsType}</if>
  134. <if test="damTypeMat != null and damTypeMat != ''">and DAM_TYPE_MAT = #{damTypeMat}</if>
  135. <if test="damTypeStr != null and damTypeStr != ''">and DAM_TYPE_STR = #{damTypeStr}</if>
  136. <if test="damSizeHig != null and damSizeHig != ''">and DAM_SIZE_HIG = #{damSizeHig}</if>
  137. <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
  138. <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
  139. <if test="src != null and src != ''">and SRC = #{src}</if>
  140. <if test="dataQuality != null and dataQuality != ''">and DATA_QUALITY = #{dataQuality}</if>
  141. <if test="centerXGd != null and centerXGd != ''">and CENTER_X_GD = #{centerXGd}</if>
  142. <if test="centerYGd != null and centerYGd != ''">and CENTER_Y_GD = #{centerYGd}</if>
  143. <if test="rsLoc != null and rsLoc != ''">and RS_LOC = #{rsLoc}</if>
  144. <if test="regCode != null and regCode != ''">and REG_CODE = #{regCode}</if>
  145. <if test="compDate != null">and COMP_DATE = #{compDate}</if>
  146. <if test="intm != null">and INTM = #{intm}</if>
  147. <if test="regNo != null and regNo != ''">and REG_NO = #{regNo}</if>
  148. <if test="chkState != null and chkState != ''">and CHK_STATE = #{chkState}</if>
  149. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  150. <if test="hstInsp != null and hstInsp != ''">and HST_INSP = #{hstInsp}</if>
  151. <if test="uptm != null">and UPTM = #{uptm}</if>
  152. <if test="edtrPesr != null and edtrPesr != ''">and EDTR_PESR = #{edtrPesr}</if>
  153. <if test="crrctId != null and crrctId != ''">and CRRCT_ID = #{crrctId}</if>
  154. <if test="compDateStr != null and compDateStr != ''">and COMP_DATE_STR = #{compDateStr}</if>
  155. <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
  156. </trim>
  157. </sql>
  158. <select id="get" resultMap="attRsBaseCrrctRepeatResultMap" parameterType="String" >
  159. select <include refid="table_columns" /> from ATT_RS_BASE_CRRCT_REPEAT where ID = #{id}
  160. </select>
  161. <select id="getBy" resultMap="attRsBaseCrrctRepeatResultMap">
  162. select <include refid="table_columns" /> from ATT_RS_BASE_CRRCT_REPEAT <include refid="page_where" />
  163. </select>
  164. <select id="findAll" resultMap="attRsBaseCrrctRepeatResultMap">
  165. select <include refid="table_columns" /> from ATT_RS_BASE_CRRCT_REPEAT
  166. </select>
  167. <select id="findList" resultMap="attRsBaseCrrctRepeatResultMap">
  168. select <include refid="table_columns" /> from ATT_RS_BASE_CRRCT_REPEAT <include refid="page_where" />
  169. </select>
  170. <select id="selectCount" resultType="int" >
  171. select count(ID) from ATT_RS_BASE_CRRCT_REPEAT <include refid="page_where" />
  172. </select>
  173. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttRsBaseCrrct">
  174. insert into ATT_RS_BASE_CRRCT_REPEAT( <include refid="table_columns" /> )
  175. values ( <include refid="entity_properties" /> )
  176. </insert>
  177. <delete id="delete" parameterType="java.lang.String">
  178. delete from ATT_RS_BASE_CRRCT_REPEAT where ID = #{id}
  179. </delete>
  180. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttRsBaseCrrct">
  181. delete from ATT_RS_BASE_CRRCT_REPEAT <include refid="page_where" />
  182. </delete>
  183. <update id="deleteInFlag" parameterType="java.lang.String">
  184. update ATT_RS_BASE_CRRCT_REPEAT set flag_valid = 0 where ID = #{id}
  185. </update>
  186. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttRsBaseCrrct">
  187. update ATT_RS_BASE_CRRCT_REPEAT
  188. <trim prefix="set" suffixOverrides=",">
  189. <if test="limStag != null and limStag != ''">LIM_STAG = #{limStag},</if>
  190. <if test="totCap != null and totCap != ''">TOT_CAP = #{totCap},</if>
  191. <if test="rsAdmName != null and rsAdmName != ''">RS_ADM_NAME = #{rsAdmName},</if>
  192. <if test="rsAdmCode != null and rsAdmCode != ''">RS_ADM_CODE = #{rsAdmCode},</if>
  193. <if test="rsAdmDep != null and rsAdmDep != ''">RS_ADM_DEP = #{rsAdmDep},</if>
  194. <if test="admAttRel != null and admAttRel != ''">ADM_ATT_REL = #{admAttRel},</if>
  195. <if test="rsCode != null and rsCode != ''">RS_CODE = #{rsCode},</if>
  196. <if test="rsName != null and rsName != ''">RS_NAME = #{rsName},</if>
  197. <if test="longitude != null and longitude != ''">LONGITUDE = #{longitude},</if>
  198. <if test="latitude != null and latitude != ''">LATITUDE = #{latitude},</if>
  199. <if test="location != null and location != ''">LOCATION = #{location},</if>
  200. <if test="admDiv != null and admDiv != ''">ADM_DIV = #{admDiv},</if>
  201. <if test="rsType != null and rsType != ''">RS_TYPE = #{rsType},</if>
  202. <if test="damTypeMat != null and damTypeMat != ''">DAM_TYPE_MAT = #{damTypeMat},</if>
  203. <if test="damTypeStr != null and damTypeStr != ''">DAM_TYPE_STR = #{damTypeStr},</if>
  204. <if test="damSizeHig != null and damSizeHig != ''">DAM_SIZE_HIG = #{damSizeHig},</if>
  205. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  206. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  207. <if test="src != null and src != ''">SRC = #{src},</if>
  208. <if test="dataQuality != null and dataQuality != ''">DATA_QUALITY = #{dataQuality},</if>
  209. <if test="centerXGd != null and centerXGd != ''">CENTER_X_GD = #{centerXGd},</if>
  210. <if test="centerYGd != null and centerYGd != ''">CENTER_Y_GD = #{centerYGd},</if>
  211. <if test="rsLoc != null and rsLoc != ''">RS_LOC = #{rsLoc},</if>
  212. <if test="regCode != null and regCode != ''">REG_CODE = #{regCode},</if>
  213. <if test="compDate != null">COMP_DATE = #{compDate},</if>
  214. <if test="intm != null">INTM = #{intm},</if>
  215. <if test="regNo != null and regNo != ''">REG_NO = #{regNo},</if>
  216. <if test="chkState != null and chkState != ''">CHK_STATE = #{chkState},</if>
  217. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  218. <if test="hstInsp != null and hstInsp != ''">HST_INSP = #{hstInsp},</if>
  219. <if test="uptm != null">UPTM = #{uptm},</if>
  220. <if test="edtrPesr != null and edtrPesr != ''">EDTR_PESR = #{edtrPesr},</if>
  221. <if test="crrctId != null and crrctId != ''">CRRCT_ID = #{crrctId},</if>
  222. <if test="compDateStr != null and compDateStr != ''">COMP_DATE_STR = #{compDateStr},</if>
  223. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  224. </trim>
  225. <where>ID = #{id}</where>
  226. </update>
  227. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttRsBaseCrrct">
  228. update ATT_RS_BASE_CRRCT_REPEAT
  229. <trim prefix="set" suffixOverrides=",">
  230. <if test="limStag != null and limStag != ''">LIM_STAG = #{limStag},</if>
  231. <if test="totCap != null and totCap != ''">TOT_CAP = #{totCap},</if>
  232. <if test="rsAdmName != null and rsAdmName != ''">RS_ADM_NAME = #{rsAdmName},</if>
  233. <if test="rsAdmCode != null and rsAdmCode != ''">RS_ADM_CODE = #{rsAdmCode},</if>
  234. <if test="rsAdmDep != null and rsAdmDep != ''">RS_ADM_DEP = #{rsAdmDep},</if>
  235. <if test="admAttRel != null and admAttRel != ''">ADM_ATT_REL = #{admAttRel},</if>
  236. <if test="rsCode != null and rsCode != ''">RS_CODE = #{rsCode},</if>
  237. <if test="rsName != null and rsName != ''">RS_NAME = #{rsName},</if>
  238. <if test="longitude != null and longitude != ''">LONGITUDE = #{longitude},</if>
  239. <if test="latitude != null and latitude != ''">LATITUDE = #{latitude},</if>
  240. <if test="location != null and location != ''">LOCATION = #{location},</if>
  241. <if test="admDiv != null and admDiv != ''">ADM_DIV = #{admDiv},</if>
  242. <if test="rsType != null and rsType != ''">RS_TYPE = #{rsType},</if>
  243. <if test="damTypeMat != null and damTypeMat != ''">DAM_TYPE_MAT = #{damTypeMat},</if>
  244. <if test="damTypeStr != null and damTypeStr != ''">DAM_TYPE_STR = #{damTypeStr},</if>
  245. <if test="damSizeHig != null and damSizeHig != ''">DAM_SIZE_HIG = #{damSizeHig},</if>
  246. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  247. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  248. <if test="src != null and src != ''">SRC = #{src},</if>
  249. <if test="dataQuality != null and dataQuality != ''">DATA_QUALITY = #{dataQuality},</if>
  250. <if test="centerXGd != null and centerXGd != ''">CENTER_X_GD = #{centerXGd},</if>
  251. <if test="centerYGd != null and centerYGd != ''">CENTER_Y_GD = #{centerYGd},</if>
  252. <if test="rsLoc != null and rsLoc != ''">RS_LOC = #{rsLoc},</if>
  253. <if test="regCode != null and regCode != ''">REG_CODE = #{regCode},</if>
  254. <if test="compDate != null">COMP_DATE = #{compDate},</if>
  255. <if test="intm != null">INTM = #{intm},</if>
  256. <if test="regNo != null and regNo != ''">REG_NO = #{regNo},</if>
  257. <if test="chkState != null and chkState != ''">CHK_STATE = #{chkState},</if>
  258. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  259. <if test="hstInsp != null and hstInsp != ''">HST_INSP = #{hstInsp},</if>
  260. <if test="uptm != null">UPTM = #{uptm},</if>
  261. <if test="edtrPesr != null and edtrPesr != ''">EDTR_PESR = #{edtrPesr},</if>
  262. <if test="crrctId != null and crrctId != ''">CRRCT_ID = #{crrctId},</if>
  263. <if test="compDateStr != null and compDateStr != ''">COMP_DATE_STR = #{compDateStr},</if>
  264. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  265. </trim>
  266. <include refid="page_where" />
  267. </update>
  268. <!-- 其他自定义SQL -->
  269. </mapper>