BisInspUnwtSynDao.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  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.BisInspUnwtSynDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspUnwtSyn" id="bisInspUnwtSynResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isLeak" column="IS_LEAK"/>
  8. <result property="isQr" column="IS_QR"/>
  9. <result property="backNote" column="BACK_NOTE"/>
  10. <result property="isUsrScrt" column="IS_USR_SCRT"/>
  11. <result property="isNusrStnd" column="IS_NUSR_STND"/>
  12. <result property="isSysUsr" column="IS_SYS_USR"/>
  13. <result property="wtzNote" column="WTZ_NOTE"/>
  14. <result property="isNplanCmp" column="IS_NPLAN_CMP"/>
  15. <result property="isPrjtNusr" column="IS_PRJT_NUSR"/>
  16. <result property="isNusrRole" column="IS_NUSR_ROLE"/>
  17. <result property="repairNote" column="REPAIR_NOTE"/>
  18. <result property="persId" column="PERS_ID"/>
  19. <result property="intm" column="INTM"/>
  20. <result property="uptm" column="UPTM"/>
  21. <result property="note" column="NOTE"/>
  22. <result property="dataStat" column="DATA_STAT"/>
  23. <result property="isStopAll" column="IS_STOP_ALL"/>
  24. <result property="isQrFit" column="IS_QR_FIT"/>
  25. <result property="isSetLog" column="IS_SET_LOG"/>
  26. <result property="isLose" column="IS_LOSE"/>
  27. <result property="isMeet" column="IS_MEET"/>
  28. <result property="isLkbkLose" column="IS_LKBK_LOSE"/>
  29. <result property="isLkbkBook" column="IS_LKBK_BOOK"/>
  30. <result property="isLkbkRmd" column="IS_LKBK_RMD"/>
  31. <result property="isIrrBook" column="IS_IRR_BOOK"/>
  32. <result property="isIrrSend" column="IS_IRR_SEND"/>
  33. <result property="isIrrLimit" column="IS_IRR_LIMIT"/>
  34. </resultMap>
  35. <sql id="table_columns">
  36. ID,
  37. RGSTR_ID,
  38. IS_LEAK,
  39. IS_QR,
  40. BACK_NOTE,
  41. IS_USR_SCRT,
  42. IS_NUSR_STND,
  43. IS_SYS_USR,
  44. WTZ_NOTE,
  45. IS_NPLAN_CMP,
  46. IS_PRJT_NUSR,
  47. IS_NUSR_ROLE,
  48. REPAIR_NOTE,
  49. PERS_ID,
  50. INTM,
  51. UPTM,
  52. NOTE,
  53. DATA_STAT,
  54. IS_STOP_ALL,
  55. IS_QR_FIT,
  56. IS_SET_LOG,
  57. IS_LOSE,
  58. IS_MEET,
  59. IS_LKBK_LOSE,
  60. IS_LKBK_BOOK,
  61. IS_LKBK_RMD,
  62. IS_IRR_BOOK,
  63. IS_IRR_SEND,
  64. IS_IRR_LIMIT
  65. </sql>
  66. <sql id="entity_properties">
  67. #{id},
  68. #{rgstrId},
  69. #{isLeak},
  70. #{isQr},
  71. #{backNote},
  72. #{isUsrScrt},
  73. #{isNusrStnd},
  74. #{isSysUsr},
  75. #{wtzNote},
  76. #{isNplanCmp},
  77. #{isPrjtNusr},
  78. #{isNusrRole},
  79. #{repairNote},
  80. #{persId},
  81. #{intm},
  82. #{uptm},
  83. #{note},
  84. #{dataStat},
  85. #{isStopAll},
  86. #{isQrFit},
  87. #{isSetLog},
  88. #{isLose},
  89. #{isMeet},
  90. #{isLkbkLose},
  91. #{isLkbkBook},
  92. #{isLkbkRmd},
  93. #{isIrrBook},
  94. #{isIrrSend},
  95. #{isIrrLimit}
  96. </sql>
  97. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  98. <sql id="page_where">
  99. <trim prefix="where" prefixOverrides="and | or ">
  100. <if test="rgstrId != null and rgstrId != ''">
  101. and RGSTR_ID = #{rgstrId}
  102. </if>
  103. <if test="isLeak != null and isLeak != ''">
  104. and IS_LEAK = #{isLeak}
  105. </if>
  106. <if test="isQr != null and isQr != ''">
  107. and IS_QR = #{isQr}
  108. </if>
  109. <if test="backNote != null and backNote != ''">
  110. and BACK_NOTE = #{backNote}
  111. </if>
  112. <if test="isUsrScrt != null and isUsrScrt != ''">
  113. and IS_USR_SCRT = #{isUsrScrt}
  114. </if>
  115. <if test="isNusrStnd != null and isNusrStnd != ''">
  116. and IS_NUSR_STND = #{isNusrStnd}
  117. </if>
  118. <if test="isSysUsr != null and isSysUsr != ''">
  119. and IS_SYS_USR = #{isSysUsr}
  120. </if>
  121. <if test="wtzNote != null and wtzNote != ''">
  122. and WTZ_NOTE = #{wtzNote}
  123. </if>
  124. <if test="isNplanCmp != null and isNplanCmp != ''">
  125. and IS_NPLAN_CMP = #{isNplanCmp}
  126. </if>
  127. <if test="isPrjtNusr != null and isPrjtNusr != ''">
  128. and IS_PRJT_NUSR = #{isPrjtNusr}
  129. </if>
  130. <if test="isNusrRole != null and isNusrRole != ''">
  131. and IS_NUSR_ROLE = #{isNusrRole}
  132. </if>
  133. <if test="repairNote != null and repairNote != ''">
  134. and REPAIR_NOTE = #{repairNote}
  135. </if>
  136. <if test="persId != null and persId != ''">
  137. and PERS_ID = #{persId}
  138. </if>
  139. <if test="intm != null">
  140. and INTM = #{intm}
  141. </if>
  142. <if test="uptm != null">
  143. and UPTM = #{uptm}
  144. </if>
  145. <if test="note != null and note != ''">
  146. and NOTE = #{note}
  147. </if>
  148. <if test="dataStat != null and dataStat != ''">
  149. and DATA_STAT = #{dataStat}
  150. </if>
  151. <if test="isStopAll != null and isStopAll != ''">
  152. and IS_STOP_ALL = #{isStopAll}
  153. </if>
  154. <if test="isQrFit != null and isQrFit != ''">
  155. and IS_QR_FIT = #{isQrFit}
  156. </if>
  157. <if test="isSetLog != null and isSetLog != ''">
  158. and IS_SET_LOG = #{isSetLog}
  159. </if>
  160. <if test="isLose != null and isLose != ''">
  161. and IS_LOSE = #{isLose}
  162. </if>
  163. <if test="isMeet != null and isMeet != ''">
  164. and IS_MEET = #{isMeet}
  165. </if>
  166. <if test="isLkbkLose != null and isLkbkLose != ''">
  167. and IS_LKBK_LOSE = #{isLkbkLose}
  168. </if>
  169. <if test="isLkbkBook != null and isLkbkBook != ''">
  170. and IS_LKBK_BOOK = #{isLkbkBook}
  171. </if>
  172. <if test="isLkbkRmd != null and isLkbkRmd != ''">
  173. and IS_LKBK_RMD = #{isLkbkRmd}
  174. </if>
  175. <if test="isIrrBook != null and isIrrBook != ''">
  176. and IS_IRR_BOOK = #{isIrrBook}
  177. </if>
  178. <if test="isIrrSend != null and isIrrSend != ''">
  179. and IS_IRR_SEND = #{isIrrSend}
  180. </if>
  181. <if test="isIrrLimit != null and isIrrLimit != ''">
  182. and IS_IRR_LIMIT = #{isIrrLimit}
  183. </if>
  184. and DATA_STAT='0'
  185. </trim>
  186. </sql>
  187. <select id="get" resultMap="bisInspUnwtSynResultMap" parameterType="String">
  188. select
  189. <include refid="table_columns"/>
  190. from BIS_INSP_UNWT_SYN where RGSTR_ID = #{id}
  191. </select>
  192. <select id="getBy" resultMap="bisInspUnwtSynResultMap">
  193. select
  194. <include refid="table_columns"/>
  195. from BIS_INSP_UNWT_SYN
  196. <include refid="page_where"/>
  197. </select>
  198. <select id="findAll" resultMap="bisInspUnwtSynResultMap">
  199. select
  200. <include refid="table_columns"/>
  201. from BIS_INSP_UNWT_SYN
  202. </select>
  203. <select id="findList" resultMap="bisInspUnwtSynResultMap">
  204. select
  205. <include refid="table_columns"/>
  206. from BIS_INSP_UNWT_SYN
  207. <include refid="page_where"/>
  208. </select>
  209. <select id="selectCount" resultType="int">
  210. select count(ID) from BIS_INSP_UNWT_SYN
  211. <include refid="page_where"/>
  212. </select>
  213. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspUnwtSyn">
  214. insert into BIS_INSP_UNWT_SYN(
  215. <include refid="table_columns"/>
  216. )
  217. values (
  218. <include refid="entity_properties"/>
  219. )
  220. </insert>
  221. <delete id="delete" parameterType="java.lang.String">
  222. update BIS_INSP_UNWT_SYN set DATA_STAT='9' where ID = #{id}
  223. </delete>
  224. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspUnwtSyn">
  225. update BIS_INSP_UNWT_SYN set DATA_STAT='9'
  226. <include refid="page_where"/>
  227. </delete>
  228. <update id="deleteInFlag" parameterType="java.lang.String">
  229. update BIS_INSP_UNWT_SYN set DATA_STAT = '9' where ID = #{id}
  230. </update>
  231. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspUnwtSyn">
  232. update BIS_INSP_UNWT_SYN
  233. <trim prefix="set" suffixOverrides=",">
  234. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  235. = #{rgstrId},
  236. </if>
  237. <if test="isLeak != null and isLeak != ''">IS_LEAK
  238. = #{isLeak},
  239. </if>
  240. <if test="isQr != null and isQr != ''">IS_QR
  241. = #{isQr},
  242. </if>
  243. <if test="backNote != null and backNote != ''">BACK_NOTE
  244. = #{backNote},
  245. </if>
  246. <if test="isUsrScrt != null and isUsrScrt != ''">IS_USR_SCRT
  247. = #{isUsrScrt},
  248. </if>
  249. <if test="isNusrStnd != null and isNusrStnd != ''">IS_NUSR_STND
  250. = #{isNusrStnd},
  251. </if>
  252. <if test="isSysUsr != null and isSysUsr != ''">IS_SYS_USR
  253. = #{isSysUsr},
  254. </if>
  255. <if test="wtzNote != null and wtzNote != ''">WTZ_NOTE
  256. = #{wtzNote},
  257. </if>
  258. <if test="isNplanCmp != null and isNplanCmp != ''">IS_NPLAN_CMP
  259. = #{isNplanCmp},
  260. </if>
  261. <if test="isPrjtNusr != null and isPrjtNusr != ''">IS_PRJT_NUSR
  262. = #{isPrjtNusr},
  263. </if>
  264. <if test="isNusrRole != null and isNusrRole != ''">IS_NUSR_ROLE
  265. = #{isNusrRole},
  266. </if>
  267. <if test="repairNote != null and repairNote != ''">REPAIR_NOTE
  268. = #{repairNote},
  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="note != null and note != ''">NOTE
  280. = #{note},
  281. </if>
  282. <if test="dataStat != null and dataStat != ''">DATA_STAT
  283. = #{dataStat},
  284. </if>
  285. <if test="isStopAll != null and isStopAll != ''">IS_STOP_ALL
  286. = #{isStopAll},
  287. </if>
  288. <if test="isQrFit != null and isQrFit != ''">IS_QR_FIT
  289. = #{isQrFit},
  290. </if>
  291. <if test="isSetLog != null and isSetLog != ''">IS_SET_LOG
  292. = #{isSetLog},
  293. </if>
  294. <if test="isLose != null and isLose != ''">IS_LOSE
  295. = #{isLose},
  296. </if>
  297. <if test="isMeet != null and isMeet != ''">IS_MEET
  298. = #{isMeet},
  299. </if>
  300. <if test="isLkbkLose != null and isLkbkLose != ''">IS_LKBK_LOSE
  301. = #{isLkbkLose},
  302. </if>
  303. <if test="isLkbkBook != null and isLkbkBook != ''">IS_LKBK_BOOK
  304. = #{isLkbkBook},
  305. </if>
  306. <if test="isLkbkRmd != null and isLkbkRmd != ''">IS_LKBK_RMD
  307. = #{isLkbkRmd},
  308. </if>
  309. <if test="isIrrBook != null and isIrrBook != ''">IS_IRR_BOOK
  310. = #{isIrrBook},
  311. </if>
  312. <if test="isIrrSend != null and isIrrSend != ''">IS_IRR_SEND
  313. = #{isIrrSend},
  314. </if>
  315. <if test="isIrrLimit != null and isIrrLimit != ''">IS_IRR_LIMIT
  316. = #{isIrrLimit},
  317. </if>
  318. </trim>
  319. <where>ID = #{id}</where>
  320. </update>
  321. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspUnwtSyn">
  322. update BIS_INSP_UNWT_SYN
  323. <trim prefix="set" suffixOverrides=",">
  324. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  325. = #{rgstrId},
  326. </if>
  327. <if test="isLeak != null and isLeak != ''">IS_LEAK
  328. = #{isLeak},
  329. </if>
  330. <if test="isQr != null and isQr != ''">IS_QR
  331. = #{isQr},
  332. </if>
  333. <if test="backNote != null and backNote != ''">BACK_NOTE
  334. = #{backNote},
  335. </if>
  336. <if test="isUsrScrt != null and isUsrScrt != ''">IS_USR_SCRT
  337. = #{isUsrScrt},
  338. </if>
  339. <if test="isNusrStnd != null and isNusrStnd != ''">IS_NUSR_STND
  340. = #{isNusrStnd},
  341. </if>
  342. <if test="isSysUsr != null and isSysUsr != ''">IS_SYS_USR
  343. = #{isSysUsr},
  344. </if>
  345. <if test="wtzNote != null and wtzNote != ''">WTZ_NOTE
  346. = #{wtzNote},
  347. </if>
  348. <if test="isNplanCmp != null and isNplanCmp != ''">IS_NPLAN_CMP
  349. = #{isNplanCmp},
  350. </if>
  351. <if test="isPrjtNusr != null and isPrjtNusr != ''">IS_PRJT_NUSR
  352. = #{isPrjtNusr},
  353. </if>
  354. <if test="isNusrRole != null and isNusrRole != ''">IS_NUSR_ROLE
  355. = #{isNusrRole},
  356. </if>
  357. <if test="repairNote != null and repairNote != ''">REPAIR_NOTE
  358. = #{repairNote},
  359. </if>
  360. <if test="persId != null and persId != ''">PERS_ID
  361. = #{persId},
  362. </if>
  363. <if test="intm != null">INTM
  364. = #{intm},
  365. </if>
  366. <if test="uptm != null">UPTM
  367. = #{uptm},
  368. </if>
  369. <if test="note != null and note != ''">NOTE
  370. = #{note},
  371. </if>
  372. <if test="dataStat != null and dataStat != ''">DATA_STAT
  373. = #{dataStat},
  374. </if>
  375. <if test="isStopAll != null and isStopAll != ''">IS_STOP_ALL
  376. = #{isStopAll},
  377. </if>
  378. <if test="isQrFit != null and isQrFit != ''">IS_QR_FIT
  379. = #{isQrFit},
  380. </if>
  381. <if test="isSetLog != null and isSetLog != ''">IS_SET_LOG
  382. = #{isSetLog},
  383. </if>
  384. <if test="isLose != null and isLose != ''">IS_LOSE
  385. = #{isLose},
  386. </if>
  387. <if test="isMeet != null and isMeet != ''">IS_MEET
  388. = #{isMeet},
  389. </if>
  390. <if test="isLkbkLose != null and isLkbkLose != ''">IS_LKBK_LOSE
  391. = #{isLkbkLose},
  392. </if>
  393. <if test="isLkbkBook != null and isLkbkBook != ''">IS_LKBK_BOOK
  394. = #{isLkbkBook},
  395. </if>
  396. <if test="isLkbkRmd != null and isLkbkRmd != ''">IS_LKBK_RMD
  397. = #{isLkbkRmd},
  398. </if>
  399. <if test="isIrrBook != null and isIrrBook != ''">IS_IRR_BOOK
  400. = #{isIrrBook},
  401. </if>
  402. <if test="isIrrSend != null and isIrrSend != ''">IS_IRR_SEND
  403. = #{isIrrSend},
  404. </if>
  405. <if test="isIrrLimit != null and isIrrLimit != ''">IS_IRR_LIMIT
  406. = #{isIrrLimit},
  407. </if>
  408. </trim>
  409. <include refid="page_where"/>
  410. </update>
  411. <!-- 其他自定义SQL -->
  412. </mapper>