BisInspStstnSceneDao.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  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.BisInspStstnSceneDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspStstnScene" id="bisInspStstnSceneResultMap">
  5. <result property="total" column="TOTAL"/>
  6. <result property="actualScore" column="ACTUAL_SCORE"/>
  7. <result property="id" column="ID"/>
  8. <result property="rgstrId" column="RGSTR_ID"/>
  9. <result property="locNum" column="LOC_NUM"/>
  10. <result property="closeNum" column="CLOSE_NUM"/>
  11. <result property="pubNum" column="PUB_NUM"/>
  12. <result property="safNum" column="SAF_NUM"/>
  13. <result property="chkNum" column="CHK_NUM"/>
  14. <result property="buldNum" column="BULD_NUM"/>
  15. <result property="parkNum" column="PARK_NUM"/>
  16. <result property="sendNum" column="SEND_NUM"/>
  17. <result property="lytNum" column="LYT_NUM"/>
  18. <result property="isSet" column="IS_SET"/>
  19. <result property="setNum" column="SET_NUM"/>
  20. <result property="setRoomNum" column="SET_ROOM_NUM"/>
  21. <result property="coverNum" column="COVER_NUM"/>
  22. <result property="wasteNum" column="WASTE_NUM"/>
  23. <result property="isPubSaf" column="IS_PUB_SAF"/>
  24. <result property="pubSafNum" column="PUB_SAF_NUM"/>
  25. <result property="isHndlPub" column="IS_HNDL_PUB"/>
  26. <result property="hndlPubNum" column="HNDL_PUB_NUM"/>
  27. <result property="isPrcPub" column="IS_PRC_PUB"/>
  28. <result property="prcPubNum" column="PRC_PUB_NUM"/>
  29. <result property="isMtcPub" column="IS_MTC_PUB"/>
  30. <result property="mtcPubNum" column="MTC_PUB_NUM"/>
  31. <result property="isTestChk" column="IS_TEST_CHK"/>
  32. <result property="testChkNum" column="TEST_CHK_NUM"/>
  33. <result property="isRghtPlc" column="IS_RGHT_PLC"/>
  34. <result property="rghtPlcNum" column="RGHT_PLC_NUM"/>
  35. <result property="isAppPlan" column="IS_APP_PLAN"/>
  36. <result property="appPlanNum" column="APP_PLAN_NUM"/>
  37. <result property="note" column="NOTE"/>
  38. <result property="persId" column="PERS_ID"/>
  39. <result property="intm" column="INTM"/>
  40. <result property="uptm" column="UPTM"/>
  41. <result property="dataStat" column="DATA_STAT"/>
  42. </resultMap>
  43. <sql id="table_columns">
  44. TOTAL,
  45. ACTUAL_SCORE,
  46. ID,
  47. RGSTR_ID,
  48. LOC_NUM,
  49. CLOSE_NUM,
  50. PUB_NUM,
  51. SAF_NUM,
  52. CHK_NUM,
  53. BULD_NUM,
  54. PARK_NUM,
  55. SEND_NUM,
  56. LYT_NUM,
  57. IS_SET,
  58. SET_NUM,
  59. SET_ROOM_NUM,
  60. COVER_NUM,
  61. WASTE_NUM,
  62. IS_PUB_SAF,
  63. PUB_SAF_NUM,
  64. IS_HNDL_PUB,
  65. HNDL_PUB_NUM,
  66. IS_PRC_PUB,
  67. PRC_PUB_NUM,
  68. IS_MTC_PUB,
  69. MTC_PUB_NUM,
  70. IS_TEST_CHK,
  71. TEST_CHK_NUM,
  72. IS_RGHT_PLC,
  73. RGHT_PLC_NUM,
  74. IS_APP_PLAN,
  75. APP_PLAN_NUM,
  76. NOTE,
  77. PERS_ID,
  78. INTM,
  79. UPTM,
  80. DATA_STAT
  81. </sql>
  82. <sql id="entity_properties">
  83. #{total},
  84. #{actualScore},
  85. #{id},
  86. #{rgstrId},
  87. #{locNum},
  88. #{closeNum},
  89. #{pubNum},
  90. #{safNum},
  91. #{chkNum},
  92. #{buldNum},
  93. #{parkNum},
  94. #{sendNum},
  95. #{lytNum},
  96. #{isSet},
  97. #{setNum},
  98. #{setRoomNum},
  99. #{coverNum},
  100. #{wasteNum},
  101. #{isPubSaf},
  102. #{pubSafNum},
  103. #{isHndlPub},
  104. #{hndlPubNum},
  105. #{isPrcPub},
  106. #{prcPubNum},
  107. #{isMtcPub},
  108. #{mtcPubNum},
  109. #{isTestChk},
  110. #{testChkNum},
  111. #{isRghtPlc},
  112. #{rghtPlcNum},
  113. #{isAppPlan},
  114. #{appPlanNum},
  115. #{note},
  116. #{persId},
  117. #{intm},
  118. #{uptm},
  119. #{dataStat}
  120. </sql>
  121. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  122. <sql id="page_where">
  123. <trim prefix="where" prefixOverrides="and | or ">
  124. <if test="total != null and total != ''">
  125. and TOTAL = #{total}
  126. </if>
  127. <if test="actualScore != null and actualScore != ''">
  128. and ACTUAL_SCORE = #{actualScore}
  129. </if>
  130. <if test="rgstrId != null and rgstrId != ''">
  131. and RGSTR_ID = #{rgstrId}
  132. </if>
  133. <if test="locNum != null ">
  134. and LOC_NUM = #{locNum}
  135. </if>
  136. <if test="closeNum != null ">
  137. and CLOSE_NUM = #{closeNum}
  138. </if>
  139. <if test="pubNum != null ">
  140. and PUB_NUM = #{pubNum}
  141. </if>
  142. <if test="safNum != null ">
  143. and SAF_NUM = #{safNum}
  144. </if>
  145. <if test="chkNum != null ">
  146. and CHK_NUM = #{chkNum}
  147. </if>
  148. <if test="buldNum != null ">
  149. and BULD_NUM = #{buldNum}
  150. </if>
  151. <if test="parkNum != null ">
  152. and PARK_NUM = #{parkNum}
  153. </if>
  154. <if test="sendNum != null ">
  155. and SEND_NUM = #{sendNum}
  156. </if>
  157. <if test="lytNum != null ">
  158. and LYT_NUM = #{lytNum}
  159. </if>
  160. <if test="isSet != null and isSet != ''">
  161. and IS_SET = #{isSet}
  162. </if>
  163. <if test="setNum != null ">
  164. and SET_NUM = #{setNum}
  165. </if>
  166. <if test="setRoomNum != null ">
  167. and SET_ROOM_NUM = #{setRoomNum}
  168. </if>
  169. <if test="coverNum != null ">
  170. and COVER_NUM = #{coverNum}
  171. </if>
  172. <if test="wasteNum != null ">
  173. and WASTE_NUM = #{wasteNum}
  174. </if>
  175. <if test="isPubSaf != null and isPubSaf != ''">
  176. and IS_PUB_SAF = #{isPubSaf}
  177. </if>
  178. <if test="pubSafNum != null ">
  179. and PUB_SAF_NUM = #{pubSafNum}
  180. </if>
  181. <if test="isHndlPub != null and isHndlPub != ''">
  182. and IS_HNDL_PUB = #{isHndlPub}
  183. </if>
  184. <if test="hndlPubNum != null ">
  185. and HNDL_PUB_NUM = #{hndlPubNum}
  186. </if>
  187. <if test="isPrcPub != null and isPrcPub != ''">
  188. and IS_PRC_PUB = #{isPrcPub}
  189. </if>
  190. <if test="prcPubNum != null ">
  191. and PRC_PUB_NUM = #{prcPubNum}
  192. </if>
  193. <if test="isMtcPub != null and isMtcPub != ''">
  194. and IS_MTC_PUB = #{isMtcPub}
  195. </if>
  196. <if test="mtcPubNum != null ">
  197. and MTC_PUB_NUM = #{mtcPubNum}
  198. </if>
  199. <if test="isTestChk != null and isTestChk != ''">
  200. and IS_TEST_CHK = #{isTestChk}
  201. </if>
  202. <if test="testChkNum != null ">
  203. and TEST_CHK_NUM = #{testChkNum}
  204. </if>
  205. <if test="isRghtPlc != null and isRghtPlc != ''">
  206. and IS_RGHT_PLC = #{isRghtPlc}
  207. </if>
  208. <if test="rghtPlcNum != null ">
  209. and RGHT_PLC_NUM = #{rghtPlcNum}
  210. </if>
  211. <if test="isAppPlan != null and isAppPlan != ''">
  212. and IS_APP_PLAN = #{isAppPlan}
  213. </if>
  214. <if test="appPlanNum != null ">
  215. and APP_PLAN_NUM = #{appPlanNum}
  216. </if>
  217. <if test="note != null and note != ''">
  218. and NOTE = #{note}
  219. </if>
  220. <if test="persId != null and persId != ''">
  221. and PERS_ID = #{persId}
  222. </if>
  223. <if test="intm != null">
  224. and INTM = #{intm}
  225. </if>
  226. <if test="uptm != null">
  227. and UPTM = #{uptm}
  228. </if>
  229. <if test="dataStat != null and dataStat != ''">
  230. and DATA_STAT = #{dataStat}
  231. </if>
  232. and DATA_STAT='0'
  233. </trim>
  234. </sql>
  235. <select id="get" resultMap="bisInspStstnSceneResultMap" parameterType="String">
  236. select
  237. <include refid="table_columns"/>
  238. from BIS_INSP_STSTN_SCENE where RGSTR_ID = #{rgstrId}
  239. </select>
  240. <select id="getBy" resultMap="bisInspStstnSceneResultMap">
  241. select
  242. <include refid="table_columns"/>
  243. from BIS_INSP_STSTN_SCENE
  244. <include refid="page_where"/>
  245. </select>
  246. <select id="findAll" resultMap="bisInspStstnSceneResultMap">
  247. select
  248. <include refid="table_columns"/>
  249. from BIS_INSP_STSTN_SCENE
  250. </select>
  251. <select id="findList" resultMap="bisInspStstnSceneResultMap">
  252. select
  253. <include refid="table_columns"/>
  254. from BIS_INSP_STSTN_SCENE
  255. <include refid="page_where"/>
  256. </select>
  257. <select id="selectCount" resultType="int">
  258. select count(ID) from BIS_INSP_STSTN_SCENE
  259. <include refid="page_where"/>
  260. </select>
  261. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspStstnScene">
  262. insert into BIS_INSP_STSTN_SCENE(
  263. <include refid="table_columns"/>
  264. )
  265. values (
  266. <include refid="entity_properties"/>
  267. )
  268. </insert>
  269. <delete id="delete" parameterType="java.lang.String">
  270. update BIS_INSP_STSTN_SCENE set DATA_STAT='9' where ID = #{id}
  271. </delete>
  272. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspStstnScene">
  273. update BIS_INSP_STSTN_SCENE set DATA_STAT='9'
  274. <include refid="page_where"/>
  275. </delete>
  276. <update id="deleteInFlag" parameterType="java.lang.String">
  277. update BIS_INSP_STSTN_SCENE set DATA_STAT = '9' where ID = #{id}
  278. </update>
  279. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspStstnScene">
  280. update BIS_INSP_STSTN_SCENE
  281. <trim prefix="set" suffixOverrides=",">
  282. <if test="total != null">TOTAL
  283. = #{total},
  284. </if>
  285. <if test="actualScore != null">ACTUAL_SCORE
  286. = #{actualScore},
  287. </if>
  288. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  289. = #{rgstrId},
  290. </if>
  291. <if test="locNum != null">LOC_NUM
  292. = #{locNum},
  293. </if>
  294. <if test="closeNum != null">CLOSE_NUM
  295. = #{closeNum},
  296. </if>
  297. <if test="pubNum != null">PUB_NUM
  298. = #{pubNum},
  299. </if>
  300. <if test="safNum != null">SAF_NUM
  301. = #{safNum},
  302. </if>
  303. <if test="chkNum != null">CHK_NUM
  304. = #{chkNum},
  305. </if>
  306. <if test="buldNum != null">BULD_NUM
  307. = #{buldNum},
  308. </if>
  309. <if test="parkNum != null">PARK_NUM
  310. = #{parkNum},
  311. </if>
  312. <if test="sendNum != null">SEND_NUM
  313. = #{sendNum},
  314. </if>
  315. <if test="lytNum != null">LYT_NUM
  316. = #{lytNum},
  317. </if>
  318. <if test="isSet != null">IS_SET
  319. = #{isSet},
  320. </if>
  321. <if test="setNum != null">SET_NUM
  322. = #{setNum},
  323. </if>
  324. <if test="setRoomNum != null">SET_ROOM_NUM
  325. = #{setRoomNum},
  326. </if>
  327. <if test="coverNum != null">COVER_NUM
  328. = #{coverNum},
  329. </if>
  330. <if test="wasteNum != null">WASTE_NUM
  331. = #{wasteNum},
  332. </if>
  333. <if test="isPubSaf != null and isPubSaf != ''">IS_PUB_SAF
  334. = #{isPubSaf},
  335. </if>
  336. <if test="pubSafNum != null">PUB_SAF_NUM
  337. = #{pubSafNum},
  338. </if>
  339. <if test="isHndlPub != null and isHndlPub != ''">IS_HNDL_PUB
  340. = #{isHndlPub},
  341. </if>
  342. <if test="hndlPubNum != null">HNDL_PUB_NUM
  343. = #{hndlPubNum},
  344. </if>
  345. <if test="isPrcPub != null and isPrcPub != ''">IS_PRC_PUB
  346. = #{isPrcPub},
  347. </if>
  348. <if test="prcPubNum != null">PRC_PUB_NUM
  349. = #{prcPubNum},
  350. </if>
  351. <if test="isMtcPub != null and isMtcPub != ''">IS_MTC_PUB
  352. = #{isMtcPub},
  353. </if>
  354. <if test="mtcPubNum != null">MTC_PUB_NUM
  355. = #{mtcPubNum},
  356. </if>
  357. <if test="isTestChk != null and isTestChk != ''">IS_TEST_CHK
  358. = #{isTestChk},
  359. </if>
  360. <if test="testChkNum != null">TEST_CHK_NUM
  361. = #{testChkNum},
  362. </if>
  363. <if test="isRghtPlc != null and isRghtPlc != ''">IS_RGHT_PLC
  364. = #{isRghtPlc},
  365. </if>
  366. <if test="rghtPlcNum != null">RGHT_PLC_NUM
  367. = #{rghtPlcNum},
  368. </if>
  369. <if test="isAppPlan != null and isAppPlan != ''">IS_APP_PLAN
  370. = #{isAppPlan},
  371. </if>
  372. <if test="appPlanNum != null">APP_PLAN_NUM
  373. = #{appPlanNum},
  374. </if>
  375. <if test="note != null and note != ''">NOTE
  376. = #{note},
  377. </if>
  378. <if test="persId != null and persId != ''">PERS_ID
  379. = #{persId},
  380. </if>
  381. <if test="intm != null">INTM
  382. = #{intm},
  383. </if>
  384. <if test="uptm != null">UPTM
  385. = #{uptm},
  386. </if>
  387. <if test="dataStat != null and dataStat != ''">DATA_STAT
  388. = #{dataStat},
  389. </if>
  390. </trim>
  391. <where>ID = #{id}</where>
  392. </update>
  393. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspStstnScene">
  394. update BIS_INSP_STSTN_SCENE
  395. <trim prefix="set" suffixOverrides=",">
  396. <if test="total != null and total != ''">TOTAL
  397. = #{total},
  398. </if>
  399. <if test="actualScore != null and actualScore != ''">ACTUAL_SCORE
  400. = #{actualScore},
  401. </if>
  402. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  403. = #{rgstrId},
  404. </if>
  405. <if test="locNum != null ">LOC_NUM
  406. = #{locNum},
  407. </if>
  408. <if test="closeNum != null ">CLOSE_NUM
  409. = #{closeNum},
  410. </if>
  411. <if test="pubNum != null ">PUB_NUM
  412. = #{pubNum},
  413. </if>
  414. <if test="safNum != null ">SAF_NUM
  415. = #{safNum},
  416. </if>
  417. <if test="chkNum != null ">CHK_NUM
  418. = #{chkNum},
  419. </if>
  420. <if test="buldNum != null ">BULD_NUM
  421. = #{buldNum},
  422. </if>
  423. <if test="parkNum != null ">PARK_NUM
  424. = #{parkNum},
  425. </if>
  426. <if test="sendNum != null ">SEND_NUM
  427. = #{sendNum},
  428. </if>
  429. <if test="lytNum != null ">LYT_NUM
  430. = #{lytNum},
  431. </if>
  432. <if test="isSet != null and isSet != ''">IS_SET
  433. = #{isSet},
  434. </if>
  435. <if test="setNum != null ">SET_NUM
  436. = #{setNum},
  437. </if>
  438. <if test="setRoomNum != null ">SET_ROOM_NUM
  439. = #{setRoomNum},
  440. </if>
  441. <if test="coverNum != null ">COVER_NUM
  442. = #{coverNum},
  443. </if>
  444. <if test="wasteNum != null ">WASTE_NUM
  445. = #{wasteNum},
  446. </if>
  447. <if test="isPubSaf != null and isPubSaf != ''">IS_PUB_SAF
  448. = #{isPubSaf},
  449. </if>
  450. <if test="pubSafNum != null ">PUB_SAF_NUM
  451. = #{pubSafNum},
  452. </if>
  453. <if test="isHndlPub != null and isHndlPub != ''">IS_HNDL_PUB
  454. = #{isHndlPub},
  455. </if>
  456. <if test="hndlPubNum != null ">HNDL_PUB_NUM
  457. = #{hndlPubNum},
  458. </if>
  459. <if test="isPrcPub != null and isPrcPub != ''">IS_PRC_PUB
  460. = #{isPrcPub},
  461. </if>
  462. <if test="prcPubNum != null ">PRC_PUB_NUM
  463. = #{prcPubNum},
  464. </if>
  465. <if test="isMtcPub != null and isMtcPub != ''">IS_MTC_PUB
  466. = #{isMtcPub},
  467. </if>
  468. <if test="mtcPubNum != null ">MTC_PUB_NUM
  469. = #{mtcPubNum},
  470. </if>
  471. <if test="isTestChk != null and isTestChk != ''">IS_TEST_CHK
  472. = #{isTestChk},
  473. </if>
  474. <if test="testChkNum != null ">TEST_CHK_NUM
  475. = #{testChkNum},
  476. </if>
  477. <if test="isRghtPlc != null and isRghtPlc != ''">IS_RGHT_PLC
  478. = #{isRghtPlc},
  479. </if>
  480. <if test="rghtPlcNum != null ">RGHT_PLC_NUM
  481. = #{rghtPlcNum},
  482. </if>
  483. <if test="isAppPlan != null and isAppPlan != ''">IS_APP_PLAN
  484. = #{isAppPlan},
  485. </if>
  486. <if test="appPlanNum != null ">APP_PLAN_NUM
  487. = #{appPlanNum},
  488. </if>
  489. <if test="note != null and note != ''">NOTE
  490. = #{note},
  491. </if>
  492. <if test="persId != null and persId != ''">PERS_ID
  493. = #{persId},
  494. </if>
  495. <if test="intm != null">INTM
  496. = #{intm},
  497. </if>
  498. <if test="uptm != null">UPTM
  499. = #{uptm},
  500. </if>
  501. <if test="dataStat != null and dataStat != ''">DATA_STAT
  502. = #{dataStat},
  503. </if>
  504. </trim>
  505. <include refid="page_where"/>
  506. </update>
  507. <!-- 其他自定义SQL -->
  508. </mapper>