BisInspWrm2021UsrDao.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  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.BisInspWrm2021UsrDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWrm2021Usr" id="bisInspWrm2021UsrResultMap">
  5. <result property="dataStat" column="DATA_STAT"/>
  6. <result property="id" column="ID"/>
  7. <result property="rgstrId" column="RGSTR_ID"/>
  8. <result property="usrNm" column="USR_NM"/>
  9. <result property="mwrNm" column="MWR_NM"/>
  10. <result property="loc" column="LOC"/>
  11. <result property="mwrNo" column="MWR_NO"/>
  12. <result property="mwrCon" column="MWR_CON"/>
  13. <result property="mwrConTel" column="MWR_CON_TEL"/>
  14. <result property="chkDep" column="CHK_DEP"/>
  15. <result property="chkPers" column="CHK_PERS"/>
  16. <result property="chkTm" column="CHK_TM"/>
  17. <result property="isNcrtGtwt" column="IS_NCRT_GTWT"/>
  18. <result property="isCrtEnd" column="IS_CRT_END"/>
  19. <result property="isCrtApp" column="IS_CRT_APP"/>
  20. <result property="isCrtGtwt" column="IS_CRT_GTWT"/>
  21. <result property="isOverGtwt" column="IS_OVER_GTWT"/>
  22. <result property="isBuldGtwt" column="IS_BULD_GTWT"/>
  23. <result property="isBuldGtwtRun" column="IS_BULD_GTWT_RUN"/>
  24. <result property="isBuldGtwtChk" column="IS_BULD_GTWT_CHK"/>
  25. <result property="isBuldGtwtBook" column="IS_BULD_GTWT_BOOK"/>
  26. <result property="isMendGtwt" column="IS_MEND_GTWT"/>
  27. <result property="isNprdData" column="IS_NPRD_DATA"/>
  28. <result property="isCostAll" column="IS_COST_ALL"/>
  29. <result property="persId" column="PERS_ID"/>
  30. <result property="intm" column="INTM"/>
  31. <result property="uptm" column="UPTM"/>
  32. <result property="status" column="STATUS"/>
  33. </resultMap>
  34. <sql id="table_columns">
  35. DATA_STAT,
  36. ID,
  37. RGSTR_ID,
  38. USR_NM,
  39. MWR_NM,
  40. LOC,
  41. MWR_NO,
  42. MWR_CON,
  43. MWR_CON_TEL,
  44. CHK_DEP,
  45. CHK_PERS,
  46. CHK_TM,
  47. IS_NCRT_GTWT,
  48. IS_CRT_END,
  49. IS_CRT_APP,
  50. IS_CRT_GTWT,
  51. IS_OVER_GTWT,
  52. IS_BULD_GTWT,
  53. IS_BULD_GTWT_RUN,
  54. IS_BULD_GTWT_CHK,
  55. IS_BULD_GTWT_BOOK,
  56. IS_MEND_GTWT,
  57. IS_NPRD_DATA,
  58. IS_COST_ALL,
  59. PERS_ID,
  60. INTM,
  61. UPTM,
  62. STATUS
  63. </sql>
  64. <sql id="entity_properties">
  65. #{dataStat},
  66. #{id},
  67. #{rgstrId},
  68. #{usrNm},
  69. #{mwrNm},
  70. #{loc},
  71. #{mwrNo},
  72. #{mwrCon},
  73. #{mwrConTel},
  74. #{chkDep},
  75. #{chkPers},
  76. #{chkTm},
  77. #{isNcrtGtwt},
  78. #{isCrtEnd},
  79. #{isCrtApp},
  80. #{isCrtGtwt},
  81. #{isOverGtwt},
  82. #{isBuldGtwt},
  83. #{isBuldGtwtRun},
  84. #{isBuldGtwtChk},
  85. #{isBuldGtwtBook},
  86. #{isMendGtwt},
  87. #{isNprdData},
  88. #{isCostAll},
  89. #{persId},
  90. #{intm},
  91. #{uptm},
  92. #{status}
  93. </sql>
  94. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  95. <sql id="page_where">
  96. <trim prefix="where" prefixOverrides="and | or ">
  97. <if test="dataStat != null and dataStat != ''">
  98. and DATA_STAT = #{dataStat}
  99. </if>
  100. <if test="rgstrId != null and rgstrId != ''">
  101. and RGSTR_ID = #{rgstrId}
  102. </if>
  103. <if test="usrNm != null and usrNm != ''">
  104. and USR_NM = #{usrNm}
  105. </if>
  106. <if test="mwrNm != null and mwrNm != ''">
  107. and MWR_NM = #{mwrNm}
  108. </if>
  109. <if test="loc != null and loc != ''">
  110. and LOC = #{loc}
  111. </if>
  112. <if test="mwrNo != null and mwrNo != ''">
  113. and MWR_NO = #{mwrNo}
  114. </if>
  115. <if test="mwrCon != null and mwrCon != ''">
  116. and MWR_CON = #{mwrCon}
  117. </if>
  118. <if test="mwrConTel != null and mwrConTel != ''">
  119. and MWR_CON_TEL = #{mwrConTel}
  120. </if>
  121. <if test="chkDep != null and chkDep != ''">
  122. and CHK_DEP = #{chkDep}
  123. </if>
  124. <if test="chkPers != null and chkPers != ''">
  125. and CHK_PERS = #{chkPers}
  126. </if>
  127. <if test="chkTm != null">
  128. and CHK_TM = #{chkTm}
  129. </if>
  130. <if test="isNcrtGtwt != null and isNcrtGtwt != ''">
  131. and IS_NCRT_GTWT = #{isNcrtGtwt}
  132. </if>
  133. <if test="isCrtEnd != null and isCrtEnd != ''">
  134. and IS_CRT_END = #{isCrtEnd}
  135. </if>
  136. <if test="isCrtApp != null and isCrtApp != ''">
  137. and IS_CRT_APP = #{isCrtApp}
  138. </if>
  139. <if test="isCrtGtwt != null and isCrtGtwt != ''">
  140. and IS_CRT_GTWT = #{isCrtGtwt}
  141. </if>
  142. <if test="isOverGtwt != null and isOverGtwt != ''">
  143. and IS_OVER_GTWT = #{isOverGtwt}
  144. </if>
  145. <if test="isBuldGtwt != null and isBuldGtwt != ''">
  146. and IS_BULD_GTWT = #{isBuldGtwt}
  147. </if>
  148. <if test="isBuldGtwtRun != null and isBuldGtwtRun != ''">
  149. and IS_BULD_GTWT_RUN = #{isBuldGtwtRun}
  150. </if>
  151. <if test="isBuldGtwtChk != null and isBuldGtwtChk != ''">
  152. and IS_BULD_GTWT_CHK = #{isBuldGtwtChk}
  153. </if>
  154. <if test="isBuldGtwtBook != null and isBuldGtwtBook != ''">
  155. and IS_BULD_GTWT_BOOK = #{isBuldGtwtBook}
  156. </if>
  157. <if test="isMendGtwt != null and isMendGtwt != ''">
  158. and IS_MEND_GTWT = #{isMendGtwt}
  159. </if>
  160. <if test="isNprdData != null and isNprdData != ''">
  161. and IS_NPRD_DATA = #{isNprdData}
  162. </if>
  163. <if test="isCostAll != null and isCostAll != ''">
  164. and IS_COST_ALL = #{isCostAll}
  165. </if>
  166. <if test="persId != null and persId != ''">
  167. and PERS_ID = #{persId}
  168. </if>
  169. <if test="intm != null">
  170. and INTM = #{intm}
  171. </if>
  172. <if test="uptm != null">
  173. and UPTM = #{uptm}
  174. </if>
  175. <if test="status != null and status != ''">
  176. and STATUS = #{status}
  177. </if>
  178. and DATA_STAT='0'
  179. </trim>
  180. </sql>
  181. <select id="get" resultMap="bisInspWrm2021UsrResultMap" parameterType="String">
  182. select
  183. <include refid="table_columns"/>
  184. from BIS_INSP_WRM2021_USR where ID = #{id}
  185. </select>
  186. <select id="getBy" resultMap="bisInspWrm2021UsrResultMap">
  187. select
  188. <include refid="table_columns"/>
  189. from BIS_INSP_WRM2021_USR
  190. <include refid="page_where"/>
  191. </select>
  192. <select id="findAll" resultMap="bisInspWrm2021UsrResultMap">
  193. select
  194. <include refid="table_columns"/>
  195. from BIS_INSP_WRM2021_USR
  196. </select>
  197. <select id="findList" resultMap="bisInspWrm2021UsrResultMap">
  198. select
  199. <include refid="table_columns"/>
  200. from BIS_INSP_WRM2021_USR
  201. <include refid="page_where"/>
  202. </select>
  203. <select id="selectCount" resultType="int">
  204. select count(ID) from BIS_INSP_WRM2021_USR
  205. <include refid="page_where"/>
  206. </select>
  207. <select id="findBaseInfo" resultType="cn.com.goldenwater.dcproj.model.AttWintBaseB">
  208. SELECT
  209. *
  210. FROM
  211. ATT_WINT_BASE_B
  212. WHERE WINT_CODE NOT IN (
  213. SELECT MWR_NO FROM BIS_INSP_WRM2021_USR and MWR_NO is not null
  214. <where>
  215. <if test="id !=null and id != ''">
  216. and RGSTR_ID = #{id}
  217. </if>
  218. </where>
  219. )
  220. <if test="name !=null and name != ''">
  221. and WINT_NAME like '%${name}%'
  222. </if>
  223. </select>
  224. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrm2021Usr">
  225. insert into BIS_INSP_WRM2021_USR(
  226. <include refid="table_columns"/>
  227. )
  228. values (
  229. <include refid="entity_properties"/>
  230. )
  231. </insert>
  232. <delete id="delete" parameterType="java.lang.String">
  233. update BIS_INSP_WRM2021_USR set DATA_STAT='9' where ID = #{id}
  234. </delete>
  235. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrm2021Usr">
  236. update BIS_INSP_WRM2021_USR set DATA_STAT='9'
  237. <include refid="page_where"/>
  238. </delete>
  239. <update id="deleteInFlag" parameterType="java.lang.String">
  240. update BIS_INSP_WRM2021_USR set DATA_STAT = '9' where ID = #{id}
  241. </update>
  242. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrm2021Usr">
  243. update BIS_INSP_WRM2021_USR
  244. <trim prefix="set" suffixOverrides=",">
  245. <if test="dataStat != null and dataStat != ''">DATA_STAT
  246. = #{dataStat},
  247. </if>
  248. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  249. = #{rgstrId},
  250. </if>
  251. <if test="usrNm != null and usrNm != ''">USR_NM
  252. = #{usrNm},
  253. </if>
  254. <if test="mwrNm != null and mwrNm != ''">MWR_NM
  255. = #{mwrNm},
  256. </if>
  257. <if test="loc != null and loc != ''">LOC
  258. = #{loc},
  259. </if>
  260. <if test="mwrNo != null and mwrNo != ''">MWR_NO
  261. = #{mwrNo},
  262. </if>
  263. <if test="mwrCon != null and mwrCon != ''">MWR_CON
  264. = #{mwrCon},
  265. </if>
  266. <if test="mwrConTel != null and mwrConTel != ''">MWR_CON_TEL
  267. = #{mwrConTel},
  268. </if>
  269. <if test="chkDep != null and chkDep != ''">CHK_DEP
  270. = #{chkDep},
  271. </if>
  272. <if test="chkPers != null and chkPers != ''">CHK_PERS
  273. = #{chkPers},
  274. </if>
  275. <if test="chkTm != null">CHK_TM
  276. = #{chkTm},
  277. </if>
  278. <if test="isNcrtGtwt != null and isNcrtGtwt != ''">IS_NCRT_GTWT
  279. = #{isNcrtGtwt},
  280. </if>
  281. <if test="isCrtEnd != null and isCrtEnd != ''">IS_CRT_END
  282. = #{isCrtEnd},
  283. </if>
  284. <if test="isCrtApp != null and isCrtApp != ''">IS_CRT_APP
  285. = #{isCrtApp},
  286. </if>
  287. <if test="isCrtGtwt != null and isCrtGtwt != ''">IS_CRT_GTWT
  288. = #{isCrtGtwt},
  289. </if>
  290. <if test="isOverGtwt != null and isOverGtwt != ''">IS_OVER_GTWT
  291. = #{isOverGtwt},
  292. </if>
  293. <if test="isBuldGtwt != null and isBuldGtwt != ''">IS_BULD_GTWT
  294. = #{isBuldGtwt},
  295. </if>
  296. <if test="isBuldGtwtRun != null and isBuldGtwtRun != ''">IS_BULD_GTWT_RUN
  297. = #{isBuldGtwtRun},
  298. </if>
  299. <if test="isBuldGtwtChk != null and isBuldGtwtChk != ''">IS_BULD_GTWT_CHK
  300. = #{isBuldGtwtChk},
  301. </if>
  302. <if test="isBuldGtwtBook != null and isBuldGtwtBook != ''">IS_BULD_GTWT_BOOK
  303. = #{isBuldGtwtBook},
  304. </if>
  305. <if test="isMendGtwt != null and isMendGtwt != ''">IS_MEND_GTWT
  306. = #{isMendGtwt},
  307. </if>
  308. <if test="isNprdData != null and isNprdData != ''">IS_NPRD_DATA
  309. = #{isNprdData},
  310. </if>
  311. <if test="isCostAll != null and isCostAll != ''">IS_COST_ALL
  312. = #{isCostAll},
  313. </if>
  314. <if test="persId != null and persId != ''">PERS_ID
  315. = #{persId},
  316. </if>
  317. <if test="intm != null">INTM
  318. = #{intm},
  319. </if>
  320. <if test="uptm != null">UPTM
  321. = #{uptm},
  322. </if>
  323. <if test="status != null and status != ''">STATUS
  324. = #{status},
  325. </if>
  326. </trim>
  327. <where>ID = #{id}</where>
  328. </update>
  329. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrm2021Usr">
  330. update BIS_INSP_WRM2021_USR
  331. <trim prefix="set" suffixOverrides=",">
  332. <if test="dataStat != null and dataStat != ''">DATA_STAT
  333. = #{dataStat},
  334. </if>
  335. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  336. = #{rgstrId},
  337. </if>
  338. <if test="usrNm != null and usrNm != ''">USR_NM
  339. = #{usrNm},
  340. </if>
  341. <if test="mwrNm != null and mwrNm != ''">MWR_NM
  342. = #{mwrNm},
  343. </if>
  344. <if test="loc != null and loc != ''">LOC
  345. = #{loc},
  346. </if>
  347. <if test="mwrNo != null and mwrNo != ''">MWR_NO
  348. = #{mwrNo},
  349. </if>
  350. <if test="mwrCon != null and mwrCon != ''">MWR_CON
  351. = #{mwrCon},
  352. </if>
  353. <if test="mwrConTel != null and mwrConTel != ''">MWR_CON_TEL
  354. = #{mwrConTel},
  355. </if>
  356. <if test="chkDep != null and chkDep != ''">CHK_DEP
  357. = #{chkDep},
  358. </if>
  359. <if test="chkPers != null and chkPers != ''">CHK_PERS
  360. = #{chkPers},
  361. </if>
  362. <if test="chkTm != null">CHK_TM
  363. = #{chkTm},
  364. </if>
  365. <if test="isNcrtGtwt != null and isNcrtGtwt != ''">IS_NCRT_GTWT
  366. = #{isNcrtGtwt},
  367. </if>
  368. <if test="isCrtEnd != null and isCrtEnd != ''">IS_CRT_END
  369. = #{isCrtEnd},
  370. </if>
  371. <if test="isCrtApp != null and isCrtApp != ''">IS_CRT_APP
  372. = #{isCrtApp},
  373. </if>
  374. <if test="isCrtGtwt != null and isCrtGtwt != ''">IS_CRT_GTWT
  375. = #{isCrtGtwt},
  376. </if>
  377. <if test="isOverGtwt != null and isOverGtwt != ''">IS_OVER_GTWT
  378. = #{isOverGtwt},
  379. </if>
  380. <if test="isBuldGtwt != null and isBuldGtwt != ''">IS_BULD_GTWT
  381. = #{isBuldGtwt},
  382. </if>
  383. <if test="isBuldGtwtRun != null and isBuldGtwtRun != ''">IS_BULD_GTWT_RUN
  384. = #{isBuldGtwtRun},
  385. </if>
  386. <if test="isBuldGtwtChk != null and isBuldGtwtChk != ''">IS_BULD_GTWT_CHK
  387. = #{isBuldGtwtChk},
  388. </if>
  389. <if test="isBuldGtwtBook != null and isBuldGtwtBook != ''">IS_BULD_GTWT_BOOK
  390. = #{isBuldGtwtBook},
  391. </if>
  392. <if test="isMendGtwt != null and isMendGtwt != ''">IS_MEND_GTWT
  393. = #{isMendGtwt},
  394. </if>
  395. <if test="isNprdData != null and isNprdData != ''">IS_NPRD_DATA
  396. = #{isNprdData},
  397. </if>
  398. <if test="isCostAll != null and isCostAll != ''">IS_COST_ALL
  399. = #{isCostAll},
  400. </if>
  401. <if test="persId != null and persId != ''">PERS_ID
  402. = #{persId},
  403. </if>
  404. <if test="intm != null">INTM
  405. = #{intm},
  406. </if>
  407. <if test="uptm != null">UPTM
  408. = #{uptm},
  409. </if>
  410. <if test="status != null and status != ''">STATUS
  411. = #{status},
  412. </if>
  413. </trim>
  414. <include refid="page_where"/>
  415. </update>
  416. <!-- 其他自定义SQL -->
  417. </mapper>