BisInspWrm2021WellDao.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  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.BisInspWrm2021WellDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWrm2021Well" id="bisInspWrm2021WellResultMap">
  5. <result property="dataStat" column="DATA_STAT"/>
  6. <result property="id" column="ID"/>
  7. <result property="rgstrId" column="RGSTR_ID"/>
  8. <result property="bchkDep" column="BCHK_DEP"/>
  9. <result property="bchkDepCon" column="BCHK_DEP_CON"/>
  10. <result property="bchkDepDuy" column="BCHK_DEP_DUY"/>
  11. <result property="bchkDepDuyTel" column="BCHK_DEP_DUY_TEL"/>
  12. <result property="chkDep" column="CHK_DEP"/>
  13. <result property="chkDepPers" column="CHK_DEP_PERS"/>
  14. <result property="chkTm" column="CHK_TM"/>
  15. <result property="isFrbd" column="IS_FRBD"/>
  16. <result property="isGuwtFrdb" column="IS_GUWT_FRDB"/>
  17. <result property="isAddFrdb" column="IS_ADD_FRDB"/>
  18. <result property="isFrdbPlan" column="IS_FRDB_PLAN"/>
  19. <result property="isFrdbAsk" column="IS_FRDB_ASK"/>
  20. <result property="isFrdbBook" column="IS_FRDB_BOOK"/>
  21. <result property="isCloseBook" column="IS_CLOSE_BOOK"/>
  22. <result property="isBuldMsr" column="IS_BULD_MSR"/>
  23. <result property="isClosePub" column="IS_CLOSE_PUB"/>
  24. <result property="isSendMend" column="IS_SEND_MEND"/>
  25. <result property="isMendAsk" column="IS_MEND_ASK"/>
  26. <result property="persId" column="PERS_ID"/>
  27. <result property="intm" column="INTM"/>
  28. <result property="uptm" column="UPTM"/>
  29. <result property="status" column="STATUS"/>
  30. </resultMap>
  31. <sql id="table_columns">
  32. DATA_STAT,
  33. ID,
  34. RGSTR_ID,
  35. BCHK_DEP,
  36. BCHK_DEP_CON,
  37. BCHK_DEP_DUY,
  38. BCHK_DEP_DUY_TEL,
  39. CHK_DEP,
  40. CHK_DEP_PERS,
  41. CHK_TM,
  42. IS_FRBD,
  43. IS_GUWT_FRDB,
  44. IS_ADD_FRDB,
  45. IS_FRDB_PLAN,
  46. IS_FRDB_ASK,
  47. IS_FRDB_BOOK,
  48. IS_CLOSE_BOOK,
  49. IS_BULD_MSR,
  50. IS_CLOSE_PUB,
  51. IS_SEND_MEND,
  52. IS_MEND_ASK,
  53. PERS_ID,
  54. INTM,
  55. UPTM,
  56. STATUS
  57. </sql>
  58. <sql id="entity_properties">
  59. #{dataStat},
  60. #{id},
  61. #{rgstrId},
  62. #{bchkDep},
  63. #{bchkDepCon},
  64. #{bchkDepDuy},
  65. #{bchkDepDuyTel},
  66. #{chkDep},
  67. #{chkDepPers},
  68. #{chkTm},
  69. #{isFrbd},
  70. #{isGuwtFrdb},
  71. #{isAddFrdb},
  72. #{isFrdbPlan},
  73. #{isFrdbAsk},
  74. #{isFrdbBook},
  75. #{isCloseBook},
  76. #{isBuldMsr},
  77. #{isClosePub},
  78. #{isSendMend},
  79. #{isMendAsk},
  80. #{persId},
  81. #{intm},
  82. #{uptm},
  83. #{status}
  84. </sql>
  85. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  86. <sql id="page_where">
  87. <trim prefix="where" prefixOverrides="and | or ">
  88. <if test="dataStat != null and dataStat != ''">
  89. and DATA_STAT = #{dataStat}
  90. </if>
  91. <if test="rgstrId != null and rgstrId != ''">
  92. and RGSTR_ID = #{rgstrId}
  93. </if>
  94. <if test="bchkDep != null and bchkDep != ''">
  95. and BCHK_DEP = #{bchkDep}
  96. </if>
  97. <if test="bchkDepCon != null and bchkDepCon != ''">
  98. and BCHK_DEP_CON = #{bchkDepCon}
  99. </if>
  100. <if test="bchkDepDuy != null and bchkDepDuy != ''">
  101. and BCHK_DEP_DUY = #{bchkDepDuy}
  102. </if>
  103. <if test="bchkDepDuyTel != null and bchkDepDuyTel != ''">
  104. and BCHK_DEP_DUY_TEL = #{bchkDepDuyTel}
  105. </if>
  106. <if test="chkDep != null and chkDep != ''">
  107. and CHK_DEP = #{chkDep}
  108. </if>
  109. <if test="chkDepPers != null and chkDepPers != ''">
  110. and CHK_DEP_PERS = #{chkDepPers}
  111. </if>
  112. <if test="chkTm != null">
  113. and CHK_TM = #{chkTm}
  114. </if>
  115. <if test="isFrbd != null and isFrbd != ''">
  116. and IS_FRBD = #{isFrbd}
  117. </if>
  118. <if test="isGuwtFrdb != null and isGuwtFrdb != ''">
  119. and IS_GUWT_FRDB = #{isGuwtFrdb}
  120. </if>
  121. <if test="isAddFrdb != null and isAddFrdb != ''">
  122. and IS_ADD_FRDB = #{isAddFrdb}
  123. </if>
  124. <if test="isFrdbPlan != null and isFrdbPlan != ''">
  125. and IS_FRDB_PLAN = #{isFrdbPlan}
  126. </if>
  127. <if test="isFrdbAsk != null and isFrdbAsk != ''">
  128. and IS_FRDB_ASK = #{isFrdbAsk}
  129. </if>
  130. <if test="isFrdbBook != null and isFrdbBook != ''">
  131. and IS_FRDB_BOOK = #{isFrdbBook}
  132. </if>
  133. <if test="isCloseBook != null and isCloseBook != ''">
  134. and IS_CLOSE_BOOK = #{isCloseBook}
  135. </if>
  136. <if test="isBuldMsr != null and isBuldMsr != ''">
  137. and IS_BULD_MSR = #{isBuldMsr}
  138. </if>
  139. <if test="isClosePub != null and isClosePub != ''">
  140. and IS_CLOSE_PUB = #{isClosePub}
  141. </if>
  142. <if test="isSendMend != null and isSendMend != ''">
  143. and IS_SEND_MEND = #{isSendMend}
  144. </if>
  145. <if test="isMendAsk != null and isMendAsk != ''">
  146. and IS_MEND_ASK = #{isMendAsk}
  147. </if>
  148. <if test="persId != null and persId != ''">
  149. and PERS_ID = #{persId}
  150. </if>
  151. <if test="intm != null">
  152. and INTM = #{intm}
  153. </if>
  154. <if test="uptm != null">
  155. and UPTM = #{uptm}
  156. </if>
  157. <if test="status != null and status != ''">
  158. and STATUS = #{status}
  159. </if>
  160. and DATA_STAT='0'
  161. </trim>
  162. </sql>
  163. <select id="get" resultMap="bisInspWrm2021WellResultMap" parameterType="String">
  164. select
  165. <include refid="table_columns"/>
  166. from BIS_INSP_WRM2021_WELL where RGSTR_ID = #{id}
  167. </select>
  168. <select id="getBy" resultMap="bisInspWrm2021WellResultMap">
  169. select
  170. <include refid="table_columns"/>
  171. from BIS_INSP_WRM2021_WELL
  172. <include refid="page_where"/>
  173. </select>
  174. <select id="findAll" resultMap="bisInspWrm2021WellResultMap">
  175. select
  176. <include refid="table_columns"/>
  177. from BIS_INSP_WRM2021_WELL
  178. </select>
  179. <select id="findList" resultMap="bisInspWrm2021WellResultMap">
  180. select
  181. <include refid="table_columns"/>
  182. from BIS_INSP_WRM2021_WELL
  183. <include refid="page_where"/>
  184. </select>
  185. <select id="selectCount" resultType="int">
  186. select count(ID) from BIS_INSP_WRM2021_WELL
  187. <include refid="page_where"/>
  188. </select>
  189. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrm2021Well">
  190. insert into BIS_INSP_WRM2021_WELL(
  191. <include refid="table_columns"/>
  192. )
  193. values (
  194. <include refid="entity_properties"/>
  195. )
  196. </insert>
  197. <delete id="delete" parameterType="java.lang.String">
  198. update BIS_INSP_WRM2021_WELL set DATA_STAT='9' where ID = #{id}
  199. </delete>
  200. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrm2021Well">
  201. update BIS_INSP_WRM2021_WELL set DATA_STAT='9'
  202. <include refid="page_where"/>
  203. </delete>
  204. <update id="deleteInFlag" parameterType="java.lang.String">
  205. update BIS_INSP_WRM2021_WELL set DATA_STAT = '9' where ID = #{id}
  206. </update>
  207. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrm2021Well">
  208. update BIS_INSP_WRM2021_WELL
  209. <trim prefix="set" suffixOverrides=",">
  210. <if test="dataStat != null and dataStat != ''">DATA_STAT
  211. = #{dataStat},
  212. </if>
  213. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  214. = #{rgstrId},
  215. </if>
  216. <if test="bchkDep != null and bchkDep != ''">BCHK_DEP
  217. = #{bchkDep},
  218. </if>
  219. <if test="bchkDepCon != null and bchkDepCon != ''">BCHK_DEP_CON
  220. = #{bchkDepCon},
  221. </if>
  222. <if test="bchkDepDuy != null and bchkDepDuy != ''">BCHK_DEP_DUY
  223. = #{bchkDepDuy},
  224. </if>
  225. <if test="bchkDepDuyTel != null and bchkDepDuyTel != ''">BCHK_DEP_DUY_TEL
  226. = #{bchkDepDuyTel},
  227. </if>
  228. <if test="chkDep != null and chkDep != ''">CHK_DEP
  229. = #{chkDep},
  230. </if>
  231. <if test="chkDepPers != null and chkDepPers != ''">CHK_DEP_PERS
  232. = #{chkDepPers},
  233. </if>
  234. <if test="chkTm != null">CHK_TM
  235. = #{chkTm},
  236. </if>
  237. <if test="isFrbd != null and isFrbd != ''">IS_FRBD
  238. = #{isFrbd},
  239. </if>
  240. <if test="isGuwtFrdb != null and isGuwtFrdb != ''">IS_GUWT_FRDB
  241. = #{isGuwtFrdb},
  242. </if>
  243. <if test="isAddFrdb != null and isAddFrdb != ''">IS_ADD_FRDB
  244. = #{isAddFrdb},
  245. </if>
  246. <if test="isFrdbPlan != null and isFrdbPlan != ''">IS_FRDB_PLAN
  247. = #{isFrdbPlan},
  248. </if>
  249. <if test="isFrdbAsk != null and isFrdbAsk != ''">IS_FRDB_ASK
  250. = #{isFrdbAsk},
  251. </if>
  252. <if test="isFrdbBook != null and isFrdbBook != ''">IS_FRDB_BOOK
  253. = #{isFrdbBook},
  254. </if>
  255. <if test="isCloseBook != null and isCloseBook != ''">IS_CLOSE_BOOK
  256. = #{isCloseBook},
  257. </if>
  258. <if test="isBuldMsr != null and isBuldMsr != ''">IS_BULD_MSR
  259. = #{isBuldMsr},
  260. </if>
  261. <if test="isClosePub != null and isClosePub != ''">IS_CLOSE_PUB
  262. = #{isClosePub},
  263. </if>
  264. <if test="isSendMend != null and isSendMend != ''">IS_SEND_MEND
  265. = #{isSendMend},
  266. </if>
  267. <if test="isMendAsk != null and isMendAsk != ''">IS_MEND_ASK
  268. = #{isMendAsk},
  269. </if>
  270. <if test="persId != null and persId != ''">PERS_ID
  271. = #{persId},
  272. </if>
  273. <if test="intm != null">INTM
  274. = #{intm},
  275. </if>
  276. <if test="uptm != null">UPTM
  277. = #{uptm},
  278. </if>
  279. <if test="status != null and status != ''">STATUS
  280. = #{status},
  281. </if>
  282. </trim>
  283. <where>ID = #{id}</where>
  284. </update>
  285. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrm2021Well">
  286. update BIS_INSP_WRM2021_WELL
  287. <trim prefix="set" suffixOverrides=",">
  288. <if test="dataStat != null and dataStat != ''">DATA_STAT
  289. = #{dataStat},
  290. </if>
  291. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  292. = #{rgstrId},
  293. </if>
  294. <if test="bchkDep != null and bchkDep != ''">BCHK_DEP
  295. = #{bchkDep},
  296. </if>
  297. <if test="bchkDepCon != null and bchkDepCon != ''">BCHK_DEP_CON
  298. = #{bchkDepCon},
  299. </if>
  300. <if test="bchkDepDuy != null and bchkDepDuy != ''">BCHK_DEP_DUY
  301. = #{bchkDepDuy},
  302. </if>
  303. <if test="bchkDepDuyTel != null and bchkDepDuyTel != ''">BCHK_DEP_DUY_TEL
  304. = #{bchkDepDuyTel},
  305. </if>
  306. <if test="chkDep != null and chkDep != ''">CHK_DEP
  307. = #{chkDep},
  308. </if>
  309. <if test="chkDepPers != null and chkDepPers != ''">CHK_DEP_PERS
  310. = #{chkDepPers},
  311. </if>
  312. <if test="chkTm != null">CHK_TM
  313. = #{chkTm},
  314. </if>
  315. <if test="isFrbd != null and isFrbd != ''">IS_FRBD
  316. = #{isFrbd},
  317. </if>
  318. <if test="isGuwtFrdb != null and isGuwtFrdb != ''">IS_GUWT_FRDB
  319. = #{isGuwtFrdb},
  320. </if>
  321. <if test="isAddFrdb != null and isAddFrdb != ''">IS_ADD_FRDB
  322. = #{isAddFrdb},
  323. </if>
  324. <if test="isFrdbPlan != null and isFrdbPlan != ''">IS_FRDB_PLAN
  325. = #{isFrdbPlan},
  326. </if>
  327. <if test="isFrdbAsk != null and isFrdbAsk != ''">IS_FRDB_ASK
  328. = #{isFrdbAsk},
  329. </if>
  330. <if test="isFrdbBook != null and isFrdbBook != ''">IS_FRDB_BOOK
  331. = #{isFrdbBook},
  332. </if>
  333. <if test="isCloseBook != null and isCloseBook != ''">IS_CLOSE_BOOK
  334. = #{isCloseBook},
  335. </if>
  336. <if test="isBuldMsr != null and isBuldMsr != ''">IS_BULD_MSR
  337. = #{isBuldMsr},
  338. </if>
  339. <if test="isClosePub != null and isClosePub != ''">IS_CLOSE_PUB
  340. = #{isClosePub},
  341. </if>
  342. <if test="isSendMend != null and isSendMend != ''">IS_SEND_MEND
  343. = #{isSendMend},
  344. </if>
  345. <if test="isMendAsk != null and isMendAsk != ''">IS_MEND_ASK
  346. = #{isMendAsk},
  347. </if>
  348. <if test="persId != null and persId != ''">PERS_ID
  349. = #{persId},
  350. </if>
  351. <if test="intm != null">INTM
  352. = #{intm},
  353. </if>
  354. <if test="uptm != null">UPTM
  355. = #{uptm},
  356. </if>
  357. <if test="status != null and status != ''">STATUS
  358. = #{status},
  359. </if>
  360. </trim>
  361. <include refid="page_where"/>
  362. </update>
  363. <!-- 其他自定义SQL -->
  364. </mapper>