BisInspRsvrRgstrRepeatDao.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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.BisInspRsvrRgstrRepeatDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsvrRgstr" id="bisInspRsvrRgstrRepeatResultMap">
  5. <result property="rgstrId" column="RGSTR_ID"/>
  6. <result property="objId" column="OBJ_ID"/>
  7. <result property="rsvrNm" column="RSVR_NM"/>
  8. <result property="adCode" column="AD_CODE"/>
  9. <result property="resCreateTime" column="RES_CREATE_TIME"/>
  10. <result property="hystSite" column="HYST_SITE"/>
  11. <result property="totCap" column="TOT_CAP"/>
  12. <result property="damRegCode" column="DAM_REG_CODE"/>
  13. <result property="damType" column="DAM_TYPE"/>
  14. <result property="hasDamRegCode" column="HAS_DAM_REG_CODE"/>
  15. <result property="resCreateTimeNote" column="RES_CREATE_TIME_NOTE"/>
  16. <result property="engScalNote" column="ENG_SCAL_NOTE"/>
  17. <result property="state" column="STATE"/>
  18. <result property="groupLeader" column="GROUP_LEADER"/>
  19. <result property="groupLeaderTel" column="GROUP_LEADER_TEL"/>
  20. <result property="recPersId" column="REC_PERS_ID"/>
  21. <result property="recPers" column="REC_PERS"/>
  22. <result property="recPersTel" column="REC_PERS_TEL"/>
  23. <result property="uptm" column="UPTM"/>
  24. <result property="intm" column="INTM"/>
  25. <result property="note" column="NOTE"/>
  26. <result property="dataStat" column="DATA_STAT"/>
  27. <result property="rsvrLong" column="RSVR_LONG"/>
  28. <result property="rsvrLat" column="RSVR_LAT"/>
  29. <result property="baseStat" column="BASE_STAT"/>
  30. <result property="presStat" column="PRES_STAT"/>
  31. <result property="resRunStat" column="RES_RUN_STAT"/>
  32. <result property="viewStat" column="VIEW_STAT"/>
  33. <result property="damMaxHigh" column="DAM_MAX_HIGH"/>
  34. <result property="rsCode" column="RS_CODE"/>
  35. <result property="liaisonManTel" column="LIAISON_MAN_TEL"/>
  36. <result property="liaisonMan" column="LIAISON_MAN"/>
  37. <result property="rsvrAdmName" column="RSVR_ADM_NAME"/>
  38. <result property="engScal" column="ENG_SCAL"/>
  39. <result property="compDateStr" column="COMP_DATE_STR"/>
  40. <result property="location" column="LOCATION"/>
  41. <result property="reverStat" column="REVER_STAT"/>
  42. <result property="benefitStat" column="BENEFIT_STAT"/>
  43. <result property="orgId" column="ORG_ID"/>
  44. <result property="repeatId" column="REPEAT_ID"/>
  45. </resultMap>
  46. <sql id="table_columns">
  47. RGSTR_ID,
  48. OBJ_ID,
  49. RSVR_NM,
  50. AD_CODE,
  51. RES_CREATE_TIME,
  52. HYST_SITE,
  53. TOT_CAP,
  54. DAM_REG_CODE,
  55. DAM_TYPE,
  56. HAS_DAM_REG_CODE,
  57. RES_CREATE_TIME_NOTE,
  58. ENG_SCAL_NOTE,
  59. STATE,
  60. GROUP_LEADER,
  61. GROUP_LEADER_TEL,
  62. REC_PERS_ID,
  63. REC_PERS,
  64. REC_PERS_TEL,
  65. UPTM,
  66. INTM,
  67. NOTE,
  68. DATA_STAT,
  69. RSVR_LONG,
  70. RSVR_LAT,
  71. BASE_STAT,
  72. PRES_STAT,
  73. RES_RUN_STAT,
  74. VIEW_STAT,
  75. DAM_MAX_HIGH,
  76. RS_CODE,
  77. LIAISON_MAN_TEL,
  78. LIAISON_MAN,
  79. RSVR_ADM_NAME,
  80. ENG_SCAL,
  81. COMP_DATE_STR,
  82. LOCATION,
  83. REVER_STAT,
  84. BENEFIT_STAT,
  85. ORG_ID,
  86. REPEAT_ID
  87. </sql>
  88. <sql id="entity_properties">
  89. #{rgstrId},
  90. #{objId},
  91. #{rsvrNm},
  92. #{adCode},
  93. #{resCreateTime},
  94. #{hystSite},
  95. #{totCap},
  96. #{damRegCode},
  97. #{damType},
  98. #{hasDamRegCode},
  99. #{resCreateTimeNote},
  100. #{engScalNote},
  101. #{state},
  102. #{groupLeader},
  103. #{groupLeaderTel},
  104. #{recPersId},
  105. #{recPers},
  106. #{recPersTel},
  107. #{uptm},
  108. #{intm},
  109. #{note},
  110. #{dataStat},
  111. #{rsvrLong},
  112. #{rsvrLat},
  113. #{baseStat},
  114. #{presStat},
  115. #{resRunStat},
  116. #{viewStat},
  117. #{damMaxHigh},
  118. #{rsCode},
  119. #{liaisonManTel},
  120. #{liaisonMan},
  121. #{rsvrAdmName},
  122. #{engScal},
  123. #{compDateStr},
  124. #{location},
  125. #{reverStat},
  126. #{benefitStat},
  127. #{orgId},
  128. #{repeatId}
  129. </sql>
  130. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  131. <sql id="page_where">
  132. <trim prefix="where" prefixOverrides="and | or ">
  133. <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
  134. <if test="rsvrNm != null and rsvrNm != ''">and RSVR_NM = #{rsvrNm}</if>
  135. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  136. <if test="resCreateTime != null">and RES_CREATE_TIME = #{resCreateTime}</if>
  137. <if test="hystSite != null and hystSite != ''">and HYST_SITE = #{hystSite}</if>
  138. <if test="totCap != null and totCap != ''">and TOT_CAP = #{totCap}</if>
  139. <if test="damRegCode != null and damRegCode != ''">and DAM_REG_CODE = #{damRegCode}</if>
  140. <if test="damType != null and damType != ''">and DAM_TYPE = #{damType}</if>
  141. <if test="hasDamRegCode != null and hasDamRegCode != ''">and HAS_DAM_REG_CODE = #{hasDamRegCode}</if>
  142. <if test="resCreateTimeNote != null and resCreateTimeNote != ''">and RES_CREATE_TIME_NOTE = #{resCreateTimeNote}</if>
  143. <if test="engScalNote != null and engScalNote != ''">and ENG_SCAL_NOTE = #{engScalNote}</if>
  144. <if test="state != null and state != ''">and STATE = #{state}</if>
  145. <if test="groupLeader != null and groupLeader != ''">and GROUP_LEADER = #{groupLeader}</if>
  146. <if test="groupLeaderTel != null and groupLeaderTel != ''">and GROUP_LEADER_TEL = #{groupLeaderTel}</if>
  147. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  148. <if test="recPers != null and recPers != ''">and REC_PERS = #{recPers}</if>
  149. <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
  150. <if test="uptm != null">and UPTM = #{uptm}</if>
  151. <if test="intm != null">and INTM = #{intm}</if>
  152. <if test="note != null and note != ''">and NOTE = #{note}</if>
  153. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  154. <if test="rsvrLong != null and rsvrLong != ''">and RSVR_LONG = #{rsvrLong}</if>
  155. <if test="rsvrLat != null and rsvrLat != ''">and RSVR_LAT = #{rsvrLat}</if>
  156. <if test="baseStat != null and baseStat != ''">and BASE_STAT = #{baseStat}</if>
  157. <if test="presStat != null and presStat != ''">and PRES_STAT = #{presStat}</if>
  158. <if test="resRunStat != null and resRunStat != ''">and RES_RUN_STAT = #{resRunStat}</if>
  159. <if test="viewStat != null and viewStat != ''">and VIEW_STAT = #{viewStat}</if>
  160. <if test="damMaxHigh != null and damMaxHigh != ''">and DAM_MAX_HIGH = #{damMaxHigh}</if>
  161. <if test="rsCode != null and rsCode != ''">and RS_CODE = #{rsCode}</if>
  162. <if test="liaisonManTel != null and liaisonManTel != ''">and LIAISON_MAN_TEL = #{liaisonManTel}</if>
  163. <if test="liaisonMan != null and liaisonMan != ''">and LIAISON_MAN = #{liaisonMan}</if>
  164. <if test="rsvrAdmName != null and rsvrAdmName != ''">and RSVR_ADM_NAME = #{rsvrAdmName}</if>
  165. <if test="engScal != null and engScal != ''">and ENG_SCAL = #{engScal}</if>
  166. <if test="compDateStr != null and compDateStr != ''">and COMP_DATE_STR = #{compDateStr}</if>
  167. <if test="location != null and location != ''">and LOCATION = #{location}</if>
  168. <if test="reverStat != null and reverStat != ''">and REVER_STAT = #{reverStat}</if>
  169. <if test="benefitStat != null and benefitStat != ''">and BENEFIT_STAT = #{benefitStat}</if>
  170. <if test="orgId != null and orgId != ''">and ORG_ID = #{orgId}</if>
  171. <if test="repeatId != null and repeatId != ''">and REPEAT_ID = #{repeatId}</if>
  172. </trim>
  173. </sql>
  174. <select id="get" resultMap="bisInspRsvrRgstrRepeatResultMap" parameterType="String" >
  175. select <include refid="table_columns" /> from BIS_INSP_RSVR_RGSTR_repeat where RGSTR_ID = #{id}
  176. </select>
  177. <select id="getBy" resultMap="bisInspRsvrRgstrRepeatResultMap">
  178. select <include refid="table_columns" /> from BIS_INSP_RSVR_RGSTR_repeat <include refid="page_where" />
  179. </select>
  180. <select id="findAll" resultMap="bisInspRsvrRgstrRepeatResultMap">
  181. select <include refid="table_columns" /> from BIS_INSP_RSVR_RGSTR_repeat
  182. </select>
  183. <select id="findList" resultMap="bisInspRsvrRgstrRepeatResultMap">
  184. select <include refid="table_columns" /> from BIS_INSP_RSVR_RGSTR_repeat <include refid="page_where" />
  185. </select>
  186. <select id="selectCount" resultType="int" >
  187. select count(ID) from BIS_INSP_RSVR_RGSTR_repeat <include refid="page_where" />
  188. </select>
  189. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrRgstr">
  190. insert into BIS_INSP_RSVR_RGSTR_repeat( <include refid="table_columns" /> )
  191. values ( <include refid="entity_properties" /> )
  192. </insert>
  193. <delete id="delete" parameterType="java.lang.String">
  194. delete from BIS_INSP_RSVR_RGSTR_repeat where ID = #{id}
  195. </delete>
  196. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrRgstr">
  197. delete from BIS_INSP_RSVR_RGSTR_repeat <include refid="page_where" />
  198. </delete>
  199. <update id="deleteInFlag" parameterType="java.lang.String">
  200. update BIS_INSP_RSVR_RGSTR_repeat set flag_valid = 0 where ID = #{id}
  201. </update>
  202. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrRgstr">
  203. update BIS_INSP_RSVR_RGSTR_repeat
  204. <trim prefix="set" suffixOverrides=",">
  205. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  206. <if test="rsvrNm != null and rsvrNm != ''">RSVR_NM = #{rsvrNm},</if>
  207. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  208. <if test="resCreateTime != null">RES_CREATE_TIME = #{resCreateTime},</if>
  209. <if test="hystSite != null and hystSite != ''">HYST_SITE = #{hystSite},</if>
  210. <if test="totCap != null and totCap != ''">TOT_CAP = #{totCap},</if>
  211. <if test="damRegCode != null and damRegCode != ''">DAM_REG_CODE = #{damRegCode},</if>
  212. <if test="damType != null and damType != ''">DAM_TYPE = #{damType},</if>
  213. <if test="hasDamRegCode != null and hasDamRegCode != ''">HAS_DAM_REG_CODE = #{hasDamRegCode},</if>
  214. <if test="resCreateTimeNote != null and resCreateTimeNote != ''">RES_CREATE_TIME_NOTE = #{resCreateTimeNote},</if>
  215. <if test="engScalNote != null and engScalNote != ''">ENG_SCAL_NOTE = #{engScalNote},</if>
  216. <if test="state != null and state != ''">STATE = #{state},</if>
  217. <if test="groupLeader != null and groupLeader != ''">GROUP_LEADER = #{groupLeader},</if>
  218. <if test="groupLeaderTel != null and groupLeaderTel != ''">GROUP_LEADER_TEL = #{groupLeaderTel},</if>
  219. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  220. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  221. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  222. <if test="uptm != null">UPTM = #{uptm},</if>
  223. <if test="intm != null">INTM = #{intm},</if>
  224. <if test="note != null and note != ''">NOTE = #{note},</if>
  225. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  226. <if test="rsvrLong != null and rsvrLong != ''">RSVR_LONG = #{rsvrLong},</if>
  227. <if test="rsvrLat != null and rsvrLat != ''">RSVR_LAT = #{rsvrLat},</if>
  228. <if test="baseStat != null and baseStat != ''">BASE_STAT = #{baseStat},</if>
  229. <if test="presStat != null and presStat != ''">PRES_STAT = #{presStat},</if>
  230. <if test="resRunStat != null and resRunStat != ''">RES_RUN_STAT = #{resRunStat},</if>
  231. <if test="viewStat != null and viewStat != ''">VIEW_STAT = #{viewStat},</if>
  232. <if test="damMaxHigh != null and damMaxHigh != ''">DAM_MAX_HIGH = #{damMaxHigh},</if>
  233. <if test="rsCode != null and rsCode != ''">RS_CODE = #{rsCode},</if>
  234. <if test="liaisonManTel != null and liaisonManTel != ''">LIAISON_MAN_TEL = #{liaisonManTel},</if>
  235. <if test="liaisonMan != null and liaisonMan != ''">LIAISON_MAN = #{liaisonMan},</if>
  236. <if test="rsvrAdmName != null and rsvrAdmName != ''">RSVR_ADM_NAME = #{rsvrAdmName},</if>
  237. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  238. <if test="compDateStr != null and compDateStr != ''">COMP_DATE_STR = #{compDateStr},</if>
  239. <if test="location != null and location != ''">LOCATION = #{location},</if>
  240. <if test="reverStat != null and reverStat != ''">REVER_STAT = #{reverStat},</if>
  241. <if test="benefitStat != null and benefitStat != ''">BENEFIT_STAT = #{benefitStat},</if>
  242. <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
  243. <if test="repeatId != null and repeatId != ''">REPEAT_ID = #{repeatId},</if>
  244. </trim>
  245. <where>RGSTR_ID = #{id}</where>
  246. </update>
  247. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrRgstr">
  248. update BIS_INSP_RSVR_RGSTR_repeat
  249. <trim prefix="set" suffixOverrides=",">
  250. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  251. <if test="rsvrNm != null and rsvrNm != ''">RSVR_NM = #{rsvrNm},</if>
  252. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  253. <if test="resCreateTime != null">RES_CREATE_TIME = #{resCreateTime},</if>
  254. <if test="hystSite != null and hystSite != ''">HYST_SITE = #{hystSite},</if>
  255. <if test="totCap != null and totCap != ''">TOT_CAP = #{totCap},</if>
  256. <if test="damRegCode != null and damRegCode != ''">DAM_REG_CODE = #{damRegCode},</if>
  257. <if test="damType != null and damType != ''">DAM_TYPE = #{damType},</if>
  258. <if test="hasDamRegCode != null and hasDamRegCode != ''">HAS_DAM_REG_CODE = #{hasDamRegCode},</if>
  259. <if test="resCreateTimeNote != null and resCreateTimeNote != ''">RES_CREATE_TIME_NOTE = #{resCreateTimeNote},</if>
  260. <if test="engScalNote != null and engScalNote != ''">ENG_SCAL_NOTE = #{engScalNote},</if>
  261. <if test="state != null and state != ''">STATE = #{state},</if>
  262. <if test="groupLeader != null and groupLeader != ''">GROUP_LEADER = #{groupLeader},</if>
  263. <if test="groupLeaderTel != null and groupLeaderTel != ''">GROUP_LEADER_TEL = #{groupLeaderTel},</if>
  264. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  265. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  266. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  267. <if test="uptm != null">UPTM = #{uptm},</if>
  268. <if test="intm != null">INTM = #{intm},</if>
  269. <if test="note != null and note != ''">NOTE = #{note},</if>
  270. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  271. <if test="rsvrLong != null and rsvrLong != ''">RSVR_LONG = #{rsvrLong},</if>
  272. <if test="rsvrLat != null and rsvrLat != ''">RSVR_LAT = #{rsvrLat},</if>
  273. <if test="baseStat != null and baseStat != ''">BASE_STAT = #{baseStat},</if>
  274. <if test="presStat != null and presStat != ''">PRES_STAT = #{presStat},</if>
  275. <if test="resRunStat != null and resRunStat != ''">RES_RUN_STAT = #{resRunStat},</if>
  276. <if test="viewStat != null and viewStat != ''">VIEW_STAT = #{viewStat},</if>
  277. <if test="damMaxHigh != null and damMaxHigh != ''">DAM_MAX_HIGH = #{damMaxHigh},</if>
  278. <if test="rsCode != null and rsCode != ''">RS_CODE = #{rsCode},</if>
  279. <if test="liaisonManTel != null and liaisonManTel != ''">LIAISON_MAN_TEL = #{liaisonManTel},</if>
  280. <if test="liaisonMan != null and liaisonMan != ''">LIAISON_MAN = #{liaisonMan},</if>
  281. <if test="rsvrAdmName != null and rsvrAdmName != ''">RSVR_ADM_NAME = #{rsvrAdmName},</if>
  282. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  283. <if test="compDateStr != null and compDateStr != ''">COMP_DATE_STR = #{compDateStr},</if>
  284. <if test="location != null and location != ''">LOCATION = #{location},</if>
  285. <if test="reverStat != null and reverStat != ''">REVER_STAT = #{reverStat},</if>
  286. <if test="benefitStat != null and benefitStat != ''">BENEFIT_STAT = #{benefitStat},</if>
  287. <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
  288. <if test="repeatId != null and repeatId != ''">REPEAT_ID = #{repeatId},</if>
  289. </trim>
  290. <include refid="page_where" />
  291. </update>
  292. <!-- 其他自定义SQL -->
  293. </mapper>