BisInspYnDrdmpSafetyDao.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  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.BisInspYnDrdmpSafetyDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspYnDrdmpSafety" id="bisInspYnDrdmpSafetyResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isSafeGuid" column="IS_SAFE_GUID"/>
  8. <result property="safeGuidNote" column="SAFE_GUID_NOTE"/>
  9. <result property="isMakLev" column="IS_MAK_LEV"/>
  10. <result property="makLevNote" column="MAK_LEV_NOTE"/>
  11. <result property="isMakKey" column="IS_MAK_KEY"/>
  12. <result property="makKeyNote" column="MAK_KEY_NOTE"/>
  13. <result property="isMakMwr" column="IS_MAK_MWR"/>
  14. <result property="makMwrNote" column="MAK_MWR_NOTE"/>
  15. <result property="isMakBook" column="IS_MAK_BOOK"/>
  16. <result property="makBookNote" column="MAK_BOOK_NOTE"/>
  17. <result property="isManList" column="IS_MAN_LIST"/>
  18. <result property="manListNote" column="MAN_LIST_NOTE"/>
  19. <result property="isMakPlan" column="IS_MAK_PLAN"/>
  20. <result property="makPlanNote" column="MAK_PLAN_NOTE"/>
  21. <result property="isPlanAct" column="IS_PLAN_ACT"/>
  22. <result property="planActNote" column="PLAN_ACT_NOTE"/>
  23. <result property="isDrvRun" column="IS_DRV_RUN"/>
  24. <result property="drvRunNote" column="DRV_RUN_NOTE"/>
  25. <result property="isMakSys" column="IS_MAK_SYS"/>
  26. <result property="makSysNote" column="MAK_SYS_NOTE"/>
  27. <result property="isMakDb" column="IS_MAK_DB"/>
  28. <result property="makDbNote" column="MAK_DB_NOTE"/>
  29. <result property="isActIt" column="IS_ACT_IT"/>
  30. <result property="actItNote" column="ACT_IT_NOTE"/>
  31. <result property="isNactPhn" column="IS_NACT_PHN"/>
  32. <result property="nactPhnNote" column="NACT_PHN_NOTE"/>
  33. <result property="isActPblm" column="IS_ACT_PBLM"/>
  34. <result property="actPblmNote" column="ACT_PBLM_NOTE"/>
  35. <result property="persId" column="PERS_ID"/>
  36. <result property="intm" column="INTM"/>
  37. <result property="uptm" column="UPTM"/>
  38. <result property="state" column="STATE"/>
  39. <result property="dataStat" column="DATA_STAT"/>
  40. </resultMap>
  41. <sql id="table_columns">
  42. ID,
  43. RGSTR_ID,
  44. IS_SAFE_GUID,
  45. SAFE_GUID_NOTE,
  46. IS_MAK_LEV,
  47. MAK_LEV_NOTE,
  48. IS_MAK_KEY,
  49. MAK_KEY_NOTE,
  50. IS_MAK_MWR,
  51. MAK_MWR_NOTE,
  52. IS_MAK_BOOK,
  53. MAK_BOOK_NOTE,
  54. IS_MAN_LIST,
  55. MAN_LIST_NOTE,
  56. IS_MAK_PLAN,
  57. MAK_PLAN_NOTE,
  58. IS_PLAN_ACT,
  59. PLAN_ACT_NOTE,
  60. IS_DRV_RUN,
  61. DRV_RUN_NOTE,
  62. IS_MAK_SYS,
  63. MAK_SYS_NOTE,
  64. IS_MAK_DB,
  65. MAK_DB_NOTE,
  66. IS_ACT_IT,
  67. ACT_IT_NOTE,
  68. IS_NACT_PHN,
  69. NACT_PHN_NOTE,
  70. IS_ACT_PBLM,
  71. ACT_PBLM_NOTE,
  72. PERS_ID,
  73. INTM,
  74. UPTM,
  75. STATE,
  76. DATA_STAT
  77. </sql>
  78. <sql id="entity_properties">
  79. #{id},
  80. #{rgstrId},
  81. #{isSafeGuid},
  82. #{safeGuidNote},
  83. #{isMakLev},
  84. #{makLevNote},
  85. #{isMakKey},
  86. #{makKeyNote},
  87. #{isMakMwr},
  88. #{makMwrNote},
  89. #{isMakBook},
  90. #{makBookNote},
  91. #{isManList},
  92. #{manListNote},
  93. #{isMakPlan},
  94. #{makPlanNote},
  95. #{isPlanAct},
  96. #{planActNote},
  97. #{isDrvRun},
  98. #{drvRunNote},
  99. #{isMakSys},
  100. #{makSysNote},
  101. #{isMakDb},
  102. #{makDbNote},
  103. #{isActIt},
  104. #{actItNote},
  105. #{isNactPhn},
  106. #{nactPhnNote},
  107. #{isActPblm},
  108. #{actPblmNote},
  109. #{persId},
  110. #{intm},
  111. #{uptm},
  112. #{state},
  113. #{dataStat}
  114. </sql>
  115. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  116. <sql id="page_where">
  117. <trim prefix="where" prefixOverrides="and | or ">
  118. <if test="rgstrId != null and rgstrId != ''">
  119. and RGSTR_ID = #{rgstrId}
  120. </if>
  121. <if test="isSafeGuid != null and isSafeGuid != ''">
  122. and IS_SAFE_GUID = #{isSafeGuid}
  123. </if>
  124. <if test="safeGuidNote != null and safeGuidNote != ''">
  125. and SAFE_GUID_NOTE = #{safeGuidNote}
  126. </if>
  127. <if test="isMakLev != null and isMakLev != ''">
  128. and IS_MAK_LEV = #{isMakLev}
  129. </if>
  130. <if test="makLevNote != null and makLevNote != ''">
  131. and MAK_LEV_NOTE = #{makLevNote}
  132. </if>
  133. <if test="isMakKey != null and isMakKey != ''">
  134. and IS_MAK_KEY = #{isMakKey}
  135. </if>
  136. <if test="makKeyNote != null and makKeyNote != ''">
  137. and MAK_KEY_NOTE = #{makKeyNote}
  138. </if>
  139. <if test="isMakMwr != null and isMakMwr != ''">
  140. and IS_MAK_MWR = #{isMakMwr}
  141. </if>
  142. <if test="makMwrNote != null and makMwrNote != ''">
  143. and MAK_MWR_NOTE = #{makMwrNote}
  144. </if>
  145. <if test="isMakBook != null and isMakBook != ''">
  146. and IS_MAK_BOOK = #{isMakBook}
  147. </if>
  148. <if test="makBookNote != null and makBookNote != ''">
  149. and MAK_BOOK_NOTE = #{makBookNote}
  150. </if>
  151. <if test="isManList != null and isManList != ''">
  152. and IS_MAN_LIST = #{isManList}
  153. </if>
  154. <if test="manListNote != null and manListNote != ''">
  155. and MAN_LIST_NOTE = #{manListNote}
  156. </if>
  157. <if test="isMakPlan != null and isMakPlan != ''">
  158. and IS_MAK_PLAN = #{isMakPlan}
  159. </if>
  160. <if test="makPlanNote != null and makPlanNote != ''">
  161. and MAK_PLAN_NOTE = #{makPlanNote}
  162. </if>
  163. <if test="isPlanAct != null and isPlanAct != ''">
  164. and IS_PLAN_ACT = #{isPlanAct}
  165. </if>
  166. <if test="planActNote != null and planActNote != ''">
  167. and PLAN_ACT_NOTE = #{planActNote}
  168. </if>
  169. <if test="isDrvRun != null and isDrvRun != ''">
  170. and IS_DRV_RUN = #{isDrvRun}
  171. </if>
  172. <if test="drvRunNote != null and drvRunNote != ''">
  173. and DRV_RUN_NOTE = #{drvRunNote}
  174. </if>
  175. <if test="isMakSys != null and isMakSys != ''">
  176. and IS_MAK_SYS = #{isMakSys}
  177. </if>
  178. <if test="makSysNote != null and makSysNote != ''">
  179. and MAK_SYS_NOTE = #{makSysNote}
  180. </if>
  181. <if test="isMakDb != null and isMakDb != ''">
  182. and IS_MAK_DB = #{isMakDb}
  183. </if>
  184. <if test="makDbNote != null and makDbNote != ''">
  185. and MAK_DB_NOTE = #{makDbNote}
  186. </if>
  187. <if test="isActIt != null and isActIt != ''">
  188. and IS_ACT_IT = #{isActIt}
  189. </if>
  190. <if test="actItNote != null and actItNote != ''">
  191. and ACT_IT_NOTE = #{actItNote}
  192. </if>
  193. <if test="isNactPhn != null and isNactPhn != ''">
  194. and IS_NACT_PHN = #{isNactPhn}
  195. </if>
  196. <if test="nactPhnNote != null and nactPhnNote != ''">
  197. and NACT_PHN_NOTE = #{nactPhnNote}
  198. </if>
  199. <if test="isActPblm != null and isActPblm != ''">
  200. and IS_ACT_PBLM = #{isActPblm}
  201. </if>
  202. <if test="actPblmNote != null and actPblmNote != ''">
  203. and ACT_PBLM_NOTE = #{actPblmNote}
  204. </if>
  205. <if test="persId != null and persId != ''">
  206. and PERS_ID = #{persId}
  207. </if>
  208. <if test="intm != null">
  209. and INTM = #{intm}
  210. </if>
  211. <if test="uptm != null">
  212. and UPTM = #{uptm}
  213. </if>
  214. <if test="state != null and state != ''">
  215. and STATE = #{state}
  216. </if>
  217. <if test="dataStat != null and dataStat != ''">
  218. and DATA_STAT = #{dataStat}
  219. </if>
  220. and DATA_STAT='0'
  221. </trim>
  222. </sql>
  223. <select id="get" resultMap="bisInspYnDrdmpSafetyResultMap" parameterType="String">
  224. select
  225. <include refid="table_columns"/>
  226. from BIS_INSP_YN_DRDMP_SAFETY where RGSTR_ID = #{id}
  227. </select>
  228. <select id="getBy" resultMap="bisInspYnDrdmpSafetyResultMap">
  229. select
  230. <include refid="table_columns"/>
  231. from BIS_INSP_YN_DRDMP_SAFETY
  232. <include refid="page_where"/>
  233. </select>
  234. <select id="findAll" resultMap="bisInspYnDrdmpSafetyResultMap">
  235. select
  236. <include refid="table_columns"/>
  237. from BIS_INSP_YN_DRDMP_SAFETY
  238. </select>
  239. <select id="findList" resultMap="bisInspYnDrdmpSafetyResultMap">
  240. select
  241. <include refid="table_columns"/>
  242. from BIS_INSP_YN_DRDMP_SAFETY
  243. <include refid="page_where"/>
  244. </select>
  245. <select id="selectCount" resultType="int">
  246. select count(ID) from BIS_INSP_YN_DRDMP_SAFETY
  247. <include refid="page_where"/>
  248. </select>
  249. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspYnDrdmpSafety">
  250. insert into BIS_INSP_YN_DRDMP_SAFETY(
  251. <include refid="table_columns"/>
  252. )
  253. values (
  254. <include refid="entity_properties"/>
  255. )
  256. </insert>
  257. <delete id="delete" parameterType="java.lang.String">
  258. update BIS_INSP_YN_DRDMP_SAFETY set DATA_STAT='9' where ID = #{id}
  259. </delete>
  260. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspYnDrdmpSafety">
  261. update BIS_INSP_YN_DRDMP_SAFETY set DATA_STAT='9'
  262. <include refid="page_where"/>
  263. </delete>
  264. <update id="deleteInFlag" parameterType="java.lang.String">
  265. update BIS_INSP_YN_DRDMP_SAFETY set DATA_STAT = '9' where ID = #{id}
  266. </update>
  267. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspYnDrdmpSafety">
  268. update BIS_INSP_YN_DRDMP_SAFETY
  269. <trim prefix="set" suffixOverrides=",">
  270. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  271. = #{rgstrId},
  272. </if>
  273. <if test="isSafeGuid != null and isSafeGuid != ''">IS_SAFE_GUID
  274. = #{isSafeGuid},
  275. </if>
  276. <if test="safeGuidNote != null and safeGuidNote != ''">SAFE_GUID_NOTE
  277. = #{safeGuidNote},
  278. </if>
  279. <if test="isMakLev != null and isMakLev != ''">IS_MAK_LEV
  280. = #{isMakLev},
  281. </if>
  282. <if test="makLevNote != null and makLevNote != ''">MAK_LEV_NOTE
  283. = #{makLevNote},
  284. </if>
  285. <if test="isMakKey != null and isMakKey != ''">IS_MAK_KEY
  286. = #{isMakKey},
  287. </if>
  288. <if test="makKeyNote != null and makKeyNote != ''">MAK_KEY_NOTE
  289. = #{makKeyNote},
  290. </if>
  291. <if test="isMakMwr != null and isMakMwr != ''">IS_MAK_MWR
  292. = #{isMakMwr},
  293. </if>
  294. <if test="makMwrNote != null and makMwrNote != ''">MAK_MWR_NOTE
  295. = #{makMwrNote},
  296. </if>
  297. <if test="isMakBook != null and isMakBook != ''">IS_MAK_BOOK
  298. = #{isMakBook},
  299. </if>
  300. <if test="makBookNote != null and makBookNote != ''">MAK_BOOK_NOTE
  301. = #{makBookNote},
  302. </if>
  303. <if test="isManList != null and isManList != ''">IS_MAN_LIST
  304. = #{isManList},
  305. </if>
  306. <if test="manListNote != null and manListNote != ''">MAN_LIST_NOTE
  307. = #{manListNote},
  308. </if>
  309. <if test="isMakPlan != null and isMakPlan != ''">IS_MAK_PLAN
  310. = #{isMakPlan},
  311. </if>
  312. <if test="makPlanNote != null and makPlanNote != ''">MAK_PLAN_NOTE
  313. = #{makPlanNote},
  314. </if>
  315. <if test="isPlanAct != null and isPlanAct != ''">IS_PLAN_ACT
  316. = #{isPlanAct},
  317. </if>
  318. <if test="planActNote != null and planActNote != ''">PLAN_ACT_NOTE
  319. = #{planActNote},
  320. </if>
  321. <if test="isDrvRun != null and isDrvRun != ''">IS_DRV_RUN
  322. = #{isDrvRun},
  323. </if>
  324. <if test="drvRunNote != null and drvRunNote != ''">DRV_RUN_NOTE
  325. = #{drvRunNote},
  326. </if>
  327. <if test="isMakSys != null and isMakSys != ''">IS_MAK_SYS
  328. = #{isMakSys},
  329. </if>
  330. <if test="makSysNote != null and makSysNote != ''">MAK_SYS_NOTE
  331. = #{makSysNote},
  332. </if>
  333. <if test="isMakDb != null and isMakDb != ''">IS_MAK_DB
  334. = #{isMakDb},
  335. </if>
  336. <if test="makDbNote != null and makDbNote != ''">MAK_DB_NOTE
  337. = #{makDbNote},
  338. </if>
  339. <if test="isActIt != null and isActIt != ''">IS_ACT_IT
  340. = #{isActIt},
  341. </if>
  342. <if test="actItNote != null and actItNote != ''">ACT_IT_NOTE
  343. = #{actItNote},
  344. </if>
  345. <if test="isNactPhn != null and isNactPhn != ''">IS_NACT_PHN
  346. = #{isNactPhn},
  347. </if>
  348. <if test="nactPhnNote != null and nactPhnNote != ''">NACT_PHN_NOTE
  349. = #{nactPhnNote},
  350. </if>
  351. <if test="isActPblm != null and isActPblm != ''">IS_ACT_PBLM
  352. = #{isActPblm},
  353. </if>
  354. <if test="actPblmNote != null and actPblmNote != ''">ACT_PBLM_NOTE
  355. = #{actPblmNote},
  356. </if>
  357. <if test="persId != null and persId != ''">PERS_ID
  358. = #{persId},
  359. </if>
  360. <if test="intm != null">INTM
  361. = #{intm},
  362. </if>
  363. <if test="uptm != null">UPTM
  364. = #{uptm},
  365. </if>
  366. <if test="state != null and state != ''">STATE
  367. = #{state},
  368. </if>
  369. <if test="dataStat != null and dataStat != ''">DATA_STAT
  370. = #{dataStat},
  371. </if>
  372. </trim>
  373. <where>ID = #{id}</where>
  374. </update>
  375. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspYnDrdmpSafety">
  376. update BIS_INSP_YN_DRDMP_SAFETY
  377. <trim prefix="set" suffixOverrides=",">
  378. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  379. = #{rgstrId},
  380. </if>
  381. <if test="isSafeGuid != null and isSafeGuid != ''">IS_SAFE_GUID
  382. = #{isSafeGuid},
  383. </if>
  384. <if test="safeGuidNote != null and safeGuidNote != ''">SAFE_GUID_NOTE
  385. = #{safeGuidNote},
  386. </if>
  387. <if test="isMakLev != null and isMakLev != ''">IS_MAK_LEV
  388. = #{isMakLev},
  389. </if>
  390. <if test="makLevNote != null and makLevNote != ''">MAK_LEV_NOTE
  391. = #{makLevNote},
  392. </if>
  393. <if test="isMakKey != null and isMakKey != ''">IS_MAK_KEY
  394. = #{isMakKey},
  395. </if>
  396. <if test="makKeyNote != null and makKeyNote != ''">MAK_KEY_NOTE
  397. = #{makKeyNote},
  398. </if>
  399. <if test="isMakMwr != null and isMakMwr != ''">IS_MAK_MWR
  400. = #{isMakMwr},
  401. </if>
  402. <if test="makMwrNote != null and makMwrNote != ''">MAK_MWR_NOTE
  403. = #{makMwrNote},
  404. </if>
  405. <if test="isMakBook != null and isMakBook != ''">IS_MAK_BOOK
  406. = #{isMakBook},
  407. </if>
  408. <if test="makBookNote != null and makBookNote != ''">MAK_BOOK_NOTE
  409. = #{makBookNote},
  410. </if>
  411. <if test="isManList != null and isManList != ''">IS_MAN_LIST
  412. = #{isManList},
  413. </if>
  414. <if test="manListNote != null and manListNote != ''">MAN_LIST_NOTE
  415. = #{manListNote},
  416. </if>
  417. <if test="isMakPlan != null and isMakPlan != ''">IS_MAK_PLAN
  418. = #{isMakPlan},
  419. </if>
  420. <if test="makPlanNote != null and makPlanNote != ''">MAK_PLAN_NOTE
  421. = #{makPlanNote},
  422. </if>
  423. <if test="isPlanAct != null and isPlanAct != ''">IS_PLAN_ACT
  424. = #{isPlanAct},
  425. </if>
  426. <if test="planActNote != null and planActNote != ''">PLAN_ACT_NOTE
  427. = #{planActNote},
  428. </if>
  429. <if test="isDrvRun != null and isDrvRun != ''">IS_DRV_RUN
  430. = #{isDrvRun},
  431. </if>
  432. <if test="drvRunNote != null and drvRunNote != ''">DRV_RUN_NOTE
  433. = #{drvRunNote},
  434. </if>
  435. <if test="isMakSys != null and isMakSys != ''">IS_MAK_SYS
  436. = #{isMakSys},
  437. </if>
  438. <if test="makSysNote != null and makSysNote != ''">MAK_SYS_NOTE
  439. = #{makSysNote},
  440. </if>
  441. <if test="isMakDb != null and isMakDb != ''">IS_MAK_DB
  442. = #{isMakDb},
  443. </if>
  444. <if test="makDbNote != null and makDbNote != ''">MAK_DB_NOTE
  445. = #{makDbNote},
  446. </if>
  447. <if test="isActIt != null and isActIt != ''">IS_ACT_IT
  448. = #{isActIt},
  449. </if>
  450. <if test="actItNote != null and actItNote != ''">ACT_IT_NOTE
  451. = #{actItNote},
  452. </if>
  453. <if test="isNactPhn != null and isNactPhn != ''">IS_NACT_PHN
  454. = #{isNactPhn},
  455. </if>
  456. <if test="nactPhnNote != null and nactPhnNote != ''">NACT_PHN_NOTE
  457. = #{nactPhnNote},
  458. </if>
  459. <if test="isActPblm != null and isActPblm != ''">IS_ACT_PBLM
  460. = #{isActPblm},
  461. </if>
  462. <if test="actPblmNote != null and actPblmNote != ''">ACT_PBLM_NOTE
  463. = #{actPblmNote},
  464. </if>
  465. <if test="persId != null and persId != ''">PERS_ID
  466. = #{persId},
  467. </if>
  468. <if test="intm != null">INTM
  469. = #{intm},
  470. </if>
  471. <if test="uptm != null">UPTM
  472. = #{uptm},
  473. </if>
  474. <if test="state != null and state != ''">STATE
  475. = #{state},
  476. </if>
  477. <if test="dataStat != null and dataStat != ''">DATA_STAT
  478. = #{dataStat},
  479. </if>
  480. </trim>
  481. <include refid="page_where"/>
  482. </update>
  483. <!-- 其他自定义SQL -->
  484. </mapper>