BisInspRsvrSdBldnDao.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  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.BisInspRsvrSdBldnDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsvrSdBldn" id="bisInspRsvrSdBldnResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isDamLeak" column="IS_DAM_LEAK"/>
  8. <result property="isDamHole" column="IS_DAM_HOLE"/>
  9. <result property="isDamOut" column="IS_DAM_OUT"/>
  10. <result property="isDamRise" column="IS_DAM_RISE"/>
  11. <result property="isDamDrain" column="IS_DAM_DRAIN"/>
  12. <result property="isDamVug" column="IS_DAM_VUG"/>
  13. <result property="isDamStbl" column="IS_DAM_STBL"/>
  14. <result property="isDamDrn" column="IS_DAM_DRN"/>
  15. <result property="isFld" column="IS_FLD"/>
  16. <result property="isFldAsk" column="IS_FLD_ASK"/>
  17. <result property="isFldRun" column="IS_FLD_RUN"/>
  18. <result property="isFldOut" column="IS_FLD_OUT"/>
  19. <result property="isFldRisk" column="IS_FLD_RISK"/>
  20. <result property="isFldBank" column="IS_FLD_BANK"/>
  21. <result property="isFldScr" column="IS_FLD_SCR"/>
  22. <result property="isFldLeak" column="IS_FLD_LEAK"/>
  23. <result property="isFldDrn" column="IS_FLD_DRN"/>
  24. <result property="isBldRun" column="IS_BLD_RUN"/>
  25. <result property="isBldOut" column="IS_BLD_OUT"/>
  26. <result property="isBldRise" column="IS_BLD_RISE"/>
  27. <result property="isBldLeak" column="IS_BLD_LEAK"/>
  28. <result property="isBldHole" column="IS_BLD_HOLE"/>
  29. <result property="isBldMog" column="IS_BLD_MOG"/>
  30. <result property="isOthrRisk" column="IS_OTHR_RISK"/>
  31. <result property="isOthrLeak" column="IS_OTHR_LEAK"/>
  32. <result property="isOthrOthr" column="IS_OTHR_OTHR"/>
  33. <result property="dataStat" column="DATA_STAT"/>
  34. <result property="persId" column="PERS_ID"/>
  35. <result property="intm" column="INTM"/>
  36. <result property="uptm" column="UPTM"/>
  37. <result property="note" column="NOTE"/>
  38. </resultMap>
  39. <sql id="table_columns">
  40. ID,
  41. RGSTR_ID,
  42. IS_DAM_LEAK,
  43. IS_DAM_HOLE,
  44. IS_DAM_OUT,
  45. IS_DAM_RISE,
  46. IS_DAM_DRAIN,
  47. IS_DAM_VUG,
  48. IS_DAM_STBL,
  49. IS_DAM_DRN,
  50. IS_FLD,
  51. IS_FLD_ASK,
  52. IS_FLD_RUN,
  53. IS_FLD_OUT,
  54. IS_FLD_RISK,
  55. IS_FLD_BANK,
  56. IS_FLD_SCR,
  57. IS_FLD_LEAK,
  58. IS_FLD_DRN,
  59. IS_BLD_RUN,
  60. IS_BLD_OUT,
  61. IS_BLD_RISE,
  62. IS_BLD_LEAK,
  63. IS_BLD_HOLE,
  64. IS_BLD_MOG,
  65. IS_OTHR_RISK,
  66. IS_OTHR_LEAK,
  67. IS_OTHR_OTHR,
  68. DATA_STAT,
  69. PERS_ID,
  70. INTM,
  71. UPTM,
  72. NOTE
  73. </sql>
  74. <sql id="entity_properties">
  75. #{id},
  76. #{rgstrId},
  77. #{isDamLeak},
  78. #{isDamHole},
  79. #{isDamOut},
  80. #{isDamRise},
  81. #{isDamDrain},
  82. #{isDamVug},
  83. #{isDamStbl},
  84. #{isDamDrn},
  85. #{isFld},
  86. #{isFldAsk},
  87. #{isFldRun},
  88. #{isFldOut},
  89. #{isFldRisk},
  90. #{isFldBank},
  91. #{isFldScr},
  92. #{isFldLeak},
  93. #{isFldDrn},
  94. #{isBldRun},
  95. #{isBldOut},
  96. #{isBldRise},
  97. #{isBldLeak},
  98. #{isBldHole},
  99. #{isBldMog},
  100. #{isOthrRisk},
  101. #{isOthrLeak},
  102. #{isOthrOthr},
  103. #{dataStat},
  104. #{persId},
  105. #{intm},
  106. #{uptm},
  107. #{note}
  108. </sql>
  109. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  110. <sql id="page_where">
  111. <trim prefix="where" prefixOverrides="and | or ">
  112. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  113. <if test="isDamLeak != null and isDamLeak != ''">and IS_DAM_LEAK = #{isDamLeak}</if>
  114. <if test="isDamHole != null and isDamHole != ''">and IS_DAM_HOLE = #{isDamHole}</if>
  115. <if test="isDamOut != null and isDamOut != ''">and IS_DAM_OUT = #{isDamOut}</if>
  116. <if test="isDamRise != null and isDamRise != ''">and IS_DAM_RISE = #{isDamRise}</if>
  117. <if test="isDamDrain != null and isDamDrain != ''">and IS_DAM_DRAIN = #{isDamDrain}</if>
  118. <if test="isDamVug != null and isDamVug != ''">and IS_DAM_VUG = #{isDamVug}</if>
  119. <if test="isDamStbl != null and isDamStbl != ''">and IS_DAM_STBL = #{isDamStbl}</if>
  120. <if test="isDamDrn != null and isDamDrn != ''">and IS_DAM_DRN = #{isDamDrn}</if>
  121. <if test="isFld != null and isFld != ''">and IS_FLD = #{isFld}</if>
  122. <if test="isFldAsk != null and isFldAsk != ''">and IS_FLD_ASK = #{isFldAsk}</if>
  123. <if test="isFldRun != null and isFldRun != ''">and IS_FLD_RUN = #{isFldRun}</if>
  124. <if test="isFldOut != null and isFldOut != ''">and IS_FLD_OUT = #{isFldOut}</if>
  125. <if test="isFldRisk != null and isFldRisk != ''">and IS_FLD_RISK = #{isFldRisk}</if>
  126. <if test="isFldBank != null and isFldBank != ''">and IS_FLD_BANK = #{isFldBank}</if>
  127. <if test="isFldScr != null and isFldScr != ''">and IS_FLD_SCR = #{isFldScr}</if>
  128. <if test="isFldLeak != null and isFldLeak != ''">and IS_FLD_LEAK = #{isFldLeak}</if>
  129. <if test="isFldDrn != null and isFldDrn != ''">and IS_FLD_DRN = #{isFldDrn}</if>
  130. <if test="isBldRun != null and isBldRun != ''">and IS_BLD_RUN = #{isBldRun}</if>
  131. <if test="isBldOut != null and isBldOut != ''">and IS_BLD_OUT = #{isBldOut}</if>
  132. <if test="isBldRise != null and isBldRise != ''">and IS_BLD_RISE = #{isBldRise}</if>
  133. <if test="isBldLeak != null and isBldLeak != ''">and IS_BLD_LEAK = #{isBldLeak}</if>
  134. <if test="isBldHole != null and isBldHole != ''">and IS_BLD_HOLE = #{isBldHole}</if>
  135. <if test="isBldMog != null and isBldMog != ''">and IS_BLD_MOG = #{isBldMog}</if>
  136. <if test="isOthrRisk != null and isOthrRisk != ''">and IS_OTHR_RISK = #{isOthrRisk}</if>
  137. <if test="isOthrLeak != null and isOthrLeak != ''">and IS_OTHR_LEAK = #{isOthrLeak}</if>
  138. <if test="isOthrOthr != null and isOthrOthr != ''">and IS_OTHR_OTHR = #{isOthrOthr}</if>
  139. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  140. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  141. <if test="intm != null">and INTM = #{intm}</if>
  142. <if test="uptm != null">and UPTM = #{uptm}</if>
  143. <if test="note != null and note != ''">and NOTE = #{note}</if>
  144. </trim>
  145. </sql>
  146. <select id="get" resultMap="bisInspRsvrSdBldnResultMap" parameterType="String" >
  147. select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_BLDN where RGSTR_ID = #{id}
  148. </select>
  149. <select id="getBy" resultMap="bisInspRsvrSdBldnResultMap">
  150. select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_BLDN <include refid="page_where" />
  151. </select>
  152. <select id="findAll" resultMap="bisInspRsvrSdBldnResultMap">
  153. select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_BLDN
  154. </select>
  155. <select id="findList" resultMap="bisInspRsvrSdBldnResultMap">
  156. select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_BLDN <include refid="page_where" />
  157. </select>
  158. <select id="selectCount" resultType="int" >
  159. select count(ID) from BIS_INSP_RSVR_SD_BLDN <include refid="page_where" />
  160. </select>
  161. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdBldn">
  162. insert into BIS_INSP_RSVR_SD_BLDN( <include refid="table_columns" /> )
  163. values ( <include refid="entity_properties" /> )
  164. </insert>
  165. <delete id="delete" parameterType="java.lang.String">
  166. update BIS_INSP_RSVR_SD_BLDN set DATA_STAT='9' where ID = #{id}
  167. </delete>
  168. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdBldn">
  169. delete from BIS_INSP_RSVR_SD_BLDN <include refid="page_where" />
  170. </delete>
  171. <update id="deleteInFlag" parameterType="java.lang.String">
  172. update BIS_INSP_RSVR_SD_BLDN set flag_valid = 0 where ID = #{id}
  173. </update>
  174. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdBldn">
  175. update BIS_INSP_RSVR_SD_BLDN
  176. <trim prefix="set" suffixOverrides=",">
  177. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  178. <if test="isDamLeak != null and isDamLeak != ''">IS_DAM_LEAK = #{isDamLeak},</if>
  179. <if test="isDamHole != null and isDamHole != ''">IS_DAM_HOLE = #{isDamHole},</if>
  180. <if test="isDamOut != null and isDamOut != ''">IS_DAM_OUT = #{isDamOut},</if>
  181. <if test="isDamRise != null and isDamRise != ''">IS_DAM_RISE = #{isDamRise},</if>
  182. <if test="isDamDrain != null and isDamDrain != ''">IS_DAM_DRAIN = #{isDamDrain},</if>
  183. <if test="isDamVug != null and isDamVug != ''">IS_DAM_VUG = #{isDamVug},</if>
  184. <if test="isDamStbl != null and isDamStbl != ''">IS_DAM_STBL = #{isDamStbl},</if>
  185. <if test="isDamDrn != null and isDamDrn != ''">IS_DAM_DRN = #{isDamDrn},</if>
  186. <if test="isFld != null and isFld != ''">IS_FLD = #{isFld},</if>
  187. <if test="isFldAsk != null and isFldAsk != ''">IS_FLD_ASK = #{isFldAsk},</if>
  188. <if test="isFldRun != null and isFldRun != ''">IS_FLD_RUN = #{isFldRun},</if>
  189. <if test="isFldOut != null and isFldOut != ''">IS_FLD_OUT = #{isFldOut},</if>
  190. <if test="isFldRisk != null and isFldRisk != ''">IS_FLD_RISK = #{isFldRisk},</if>
  191. <if test="isFldBank != null and isFldBank != ''">IS_FLD_BANK = #{isFldBank},</if>
  192. <if test="isFldScr != null and isFldScr != ''">IS_FLD_SCR = #{isFldScr},</if>
  193. <if test="isFldLeak != null and isFldLeak != ''">IS_FLD_LEAK = #{isFldLeak},</if>
  194. <if test="isFldDrn != null and isFldDrn != ''">IS_FLD_DRN = #{isFldDrn},</if>
  195. <if test="isBldRun != null and isBldRun != ''">IS_BLD_RUN = #{isBldRun},</if>
  196. <if test="isBldOut != null and isBldOut != ''">IS_BLD_OUT = #{isBldOut},</if>
  197. <if test="isBldRise != null and isBldRise != ''">IS_BLD_RISE = #{isBldRise},</if>
  198. <if test="isBldLeak != null and isBldLeak != ''">IS_BLD_LEAK = #{isBldLeak},</if>
  199. <if test="isBldHole != null and isBldHole != ''">IS_BLD_HOLE = #{isBldHole},</if>
  200. <if test="isBldMog != null and isBldMog != ''">IS_BLD_MOG = #{isBldMog},</if>
  201. <if test="isOthrRisk != null and isOthrRisk != ''">IS_OTHR_RISK = #{isOthrRisk},</if>
  202. <if test="isOthrLeak != null and isOthrLeak != ''">IS_OTHR_LEAK = #{isOthrLeak},</if>
  203. <if test="isOthrOthr != null and isOthrOthr != ''">IS_OTHR_OTHR = #{isOthrOthr},</if>
  204. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  205. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  206. <if test="intm != null">INTM = #{intm},</if>
  207. <if test="uptm != null">UPTM = #{uptm},</if>
  208. <if test="note != null and note != ''">NOTE = #{note},</if>
  209. </trim>
  210. <where>ID = #{id}</where>
  211. </update>
  212. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdBldn">
  213. update BIS_INSP_RSVR_SD_BLDN
  214. <trim prefix="set" suffixOverrides=",">
  215. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  216. <if test="isDamLeak != null and isDamLeak != ''">IS_DAM_LEAK = #{isDamLeak},</if>
  217. <if test="isDamHole != null and isDamHole != ''">IS_DAM_HOLE = #{isDamHole},</if>
  218. <if test="isDamOut != null and isDamOut != ''">IS_DAM_OUT = #{isDamOut},</if>
  219. <if test="isDamRise != null and isDamRise != ''">IS_DAM_RISE = #{isDamRise},</if>
  220. <if test="isDamDrain != null and isDamDrain != ''">IS_DAM_DRAIN = #{isDamDrain},</if>
  221. <if test="isDamVug != null and isDamVug != ''">IS_DAM_VUG = #{isDamVug},</if>
  222. <if test="isDamStbl != null and isDamStbl != ''">IS_DAM_STBL = #{isDamStbl},</if>
  223. <if test="isDamDrn != null and isDamDrn != ''">IS_DAM_DRN = #{isDamDrn},</if>
  224. <if test="isFld != null and isFld != ''">IS_FLD = #{isFld},</if>
  225. <if test="isFldAsk != null and isFldAsk != ''">IS_FLD_ASK = #{isFldAsk},</if>
  226. <if test="isFldRun != null and isFldRun != ''">IS_FLD_RUN = #{isFldRun},</if>
  227. <if test="isFldOut != null and isFldOut != ''">IS_FLD_OUT = #{isFldOut},</if>
  228. <if test="isFldRisk != null and isFldRisk != ''">IS_FLD_RISK = #{isFldRisk},</if>
  229. <if test="isFldBank != null and isFldBank != ''">IS_FLD_BANK = #{isFldBank},</if>
  230. <if test="isFldScr != null and isFldScr != ''">IS_FLD_SCR = #{isFldScr},</if>
  231. <if test="isFldLeak != null and isFldLeak != ''">IS_FLD_LEAK = #{isFldLeak},</if>
  232. <if test="isFldDrn != null and isFldDrn != ''">IS_FLD_DRN = #{isFldDrn},</if>
  233. <if test="isBldRun != null and isBldRun != ''">IS_BLD_RUN = #{isBldRun},</if>
  234. <if test="isBldOut != null and isBldOut != ''">IS_BLD_OUT = #{isBldOut},</if>
  235. <if test="isBldRise != null and isBldRise != ''">IS_BLD_RISE = #{isBldRise},</if>
  236. <if test="isBldLeak != null and isBldLeak != ''">IS_BLD_LEAK = #{isBldLeak},</if>
  237. <if test="isBldHole != null and isBldHole != ''">IS_BLD_HOLE = #{isBldHole},</if>
  238. <if test="isBldMog != null and isBldMog != ''">IS_BLD_MOG = #{isBldMog},</if>
  239. <if test="isOthrRisk != null and isOthrRisk != ''">IS_OTHR_RISK = #{isOthrRisk},</if>
  240. <if test="isOthrLeak != null and isOthrLeak != ''">IS_OTHR_LEAK = #{isOthrLeak},</if>
  241. <if test="isOthrOthr != null and isOthrOthr != ''">IS_OTHR_OTHR = #{isOthrOthr},</if>
  242. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  243. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  244. <if test="intm != null">INTM = #{intm},</if>
  245. <if test="uptm != null">UPTM = #{uptm},</if>
  246. <if test="note != null and note != ''">NOTE = #{note},</if>
  247. </trim>
  248. <include refid="page_where" />
  249. </update>
  250. <!-- 其他自定义SQL -->
  251. </mapper>