BisInspRsmlRgstrSafeDao.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  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.BisInspRsmlRgstrSafeDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsmlRgstrSafe" id="bisInspRsmlRgstrSafeResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isGovPers" column="IS_GOV_PERS"/>
  8. <result property="govPers" column="GOV_PERS"/>
  9. <result property="govPersTel" column="GOV_PERS_TEL"/>
  10. <result property="govPersDuty" column="GOV_PERS_DUTY"/>
  11. <result property="govPersTrain" column="GOV_PERS_TRAIN"/>
  12. <result property="govPersResu" column="GOV_PERS_RESU"/>
  13. <result property="isDutyPers" column="IS_DUTY_PERS"/>
  14. <result property="dutyPers" column="DUTY_PERS"/>
  15. <result property="dutyPersTel" column="DUTY_PERS_TEL"/>
  16. <result property="dutyPersDuty" column="DUTY_PERS_DUTY"/>
  17. <result property="dutyPersTrain" column="DUTY_PERS_TRAIN"/>
  18. <result property="dutyPersResu" column="DUTY_PERS_RESU"/>
  19. <result property="isMngPers" column="IS_MNG_PERS"/>
  20. <result property="mngPers" column="MNG_PERS"/>
  21. <result property="mngPersTel" column="MNG_PERS_TEL"/>
  22. <result property="mngPersDuty" column="MNG_PERS_DUTY"/>
  23. <result property="mngPersTrain" column="MNG_PERS_TRAIN"/>
  24. <result property="mngPersResu" column="MNG_PERS_RESU"/>
  25. <result property="recPersId" column="REC_PERS_ID"/>
  26. <result property="recPersNm" column="REC_PERS_NM"/>
  27. <result property="recPersTel" column="REC_PERS_TEL"/>
  28. <result property="inTm" column="IN_TM"/>
  29. <result property="upTm" column="UP_TM"/>
  30. <result property="status" column="STATUS"/>
  31. <result property="dataStat" column="DATA_STAT"/>
  32. </resultMap>
  33. <sql id="table_columns">
  34. ID,
  35. RGSTR_ID,
  36. IS_GOV_PERS,
  37. GOV_PERS,
  38. GOV_PERS_TEL,
  39. GOV_PERS_DUTY,
  40. GOV_PERS_TRAIN,
  41. GOV_PERS_RESU,
  42. IS_DUTY_PERS,
  43. DUTY_PERS,
  44. DUTY_PERS_TEL,
  45. DUTY_PERS_DUTY,
  46. DUTY_PERS_TRAIN,
  47. DUTY_PERS_RESU,
  48. IS_MNG_PERS,
  49. MNG_PERS,
  50. MNG_PERS_TEL,
  51. MNG_PERS_DUTY,
  52. MNG_PERS_TRAIN,
  53. MNG_PERS_RESU,
  54. REC_PERS_ID,
  55. REC_PERS_NM,
  56. REC_PERS_TEL,
  57. IN_TM,
  58. UP_TM,
  59. STATUS,
  60. DATA_STAT
  61. </sql>
  62. <sql id="entity_properties">
  63. #{id},
  64. #{rgstrId},
  65. #{isGovPers},
  66. #{govPers},
  67. #{govPersTel},
  68. #{govPersDuty},
  69. #{govPersTrain},
  70. #{govPersResu},
  71. #{isDutyPers},
  72. #{dutyPers},
  73. #{dutyPersTel},
  74. #{dutyPersDuty},
  75. #{dutyPersTrain},
  76. #{dutyPersResu},
  77. #{isMngPers},
  78. #{mngPers},
  79. #{mngPersTel},
  80. #{mngPersDuty},
  81. #{mngPersTrain},
  82. #{mngPersResu},
  83. #{recPersId},
  84. #{recPersNm},
  85. #{recPersTel},
  86. #{inTm},
  87. #{upTm},
  88. #{status},
  89. #{dataStat}
  90. </sql>
  91. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  92. <sql id="page_where">
  93. <trim prefix="where" prefixOverrides="and | or ">
  94. <if test="rgstrId != null and rgstrId != ''">
  95. and RGSTR_ID = #{rgstrId}
  96. </if>
  97. <if test="isGovPers != null and isGovPers != ''">
  98. and IS_GOV_PERS = #{isGovPers}
  99. </if>
  100. <if test="govPers != null and govPers != ''">
  101. and GOV_PERS = #{govPers}
  102. </if>
  103. <if test="govPersTel != null and govPersTel != ''">
  104. and GOV_PERS_TEL = #{govPersTel}
  105. </if>
  106. <if test="govPersDuty != null and govPersDuty != ''">
  107. and GOV_PERS_DUTY = #{govPersDuty}
  108. </if>
  109. <if test="govPersTrain != null and govPersTrain != ''">
  110. and GOV_PERS_TRAIN = #{govPersTrain}
  111. </if>
  112. <if test="govPersResu != null and govPersResu != ''">
  113. and GOV_PERS_RESU = #{govPersResu}
  114. </if>
  115. <if test="isDutyPers != null and isDutyPers != ''">
  116. and IS_DUTY_PERS = #{isDutyPers}
  117. </if>
  118. <if test="dutyPers != null and dutyPers != ''">
  119. and DUTY_PERS = #{dutyPers}
  120. </if>
  121. <if test="dutyPersTel != null and dutyPersTel != ''">
  122. and DUTY_PERS_TEL = #{dutyPersTel}
  123. </if>
  124. <if test="dutyPersDuty != null and dutyPersDuty != ''">
  125. and DUTY_PERS_DUTY = #{dutyPersDuty}
  126. </if>
  127. <if test="dutyPersTrain != null and dutyPersTrain != ''">
  128. and DUTY_PERS_TRAIN = #{dutyPersTrain}
  129. </if>
  130. <if test="dutyPersResu != null and dutyPersResu != ''">
  131. and DUTY_PERS_RESU = #{dutyPersResu}
  132. </if>
  133. <if test="isMngPers != null and isMngPers != ''">
  134. and IS_MNG_PERS = #{isMngPers}
  135. </if>
  136. <if test="mngPers != null and mngPers != ''">
  137. and MNG_PERS = #{mngPers}
  138. </if>
  139. <if test="mngPersTel != null and mngPersTel != ''">
  140. and MNG_PERS_TEL = #{mngPersTel}
  141. </if>
  142. <if test="mngPersDuty != null and mngPersDuty != ''">
  143. and MNG_PERS_DUTY = #{mngPersDuty}
  144. </if>
  145. <if test="mngPersTrain != null and mngPersTrain != ''">
  146. and MNG_PERS_TRAIN = #{mngPersTrain}
  147. </if>
  148. <if test="mngPersResu != null and mngPersResu != ''">
  149. and MNG_PERS_RESU = #{mngPersResu}
  150. </if>
  151. <if test="recPersId != null and recPersId != ''">
  152. and REC_PERS_ID = #{recPersId}
  153. </if>
  154. <if test="recPersNm != null and recPersNm != ''">
  155. and REC_PERS_NM = #{recPersNm}
  156. </if>
  157. <if test="recPersTel != null and recPersTel != ''">
  158. and REC_PERS_TEL = #{recPersTel}
  159. </if>
  160. <if test="inTm != null">
  161. and IN_TM = #{inTm}
  162. </if>
  163. <if test="upTm != null">
  164. and UP_TM = #{upTm}
  165. </if>
  166. <if test="status != null and status != ''">
  167. and STATUS = #{status}
  168. </if>
  169. <if test="dataStat != null and dataStat != ''">
  170. and DATA_STAT = #{dataStat}
  171. </if>
  172. and DATA_STAT='0'
  173. </trim>
  174. </sql>
  175. <select id="get" resultMap="bisInspRsmlRgstrSafeResultMap" parameterType="String">
  176. select
  177. <include refid="table_columns"/>
  178. from BIS_INSP_RSML_RGSTR_SAFE where RGSTR_ID = #{id}
  179. </select>
  180. <select id="getBy" resultMap="bisInspRsmlRgstrSafeResultMap">
  181. select
  182. <include refid="table_columns"/>
  183. from BIS_INSP_RSML_RGSTR_SAFE
  184. <include refid="page_where"/>
  185. </select>
  186. <select id="findAll" resultMap="bisInspRsmlRgstrSafeResultMap">
  187. select
  188. <include refid="table_columns"/>
  189. from BIS_INSP_RSML_RGSTR_SAFE
  190. </select>
  191. <select id="findList" resultMap="bisInspRsmlRgstrSafeResultMap">
  192. select
  193. <include refid="table_columns"/>
  194. from BIS_INSP_RSML_RGSTR_SAFE
  195. <include refid="page_where"/>
  196. </select>
  197. <select id="selectCount" resultType="int">
  198. select count(ID) from BIS_INSP_RSML_RGSTR_SAFE
  199. <include refid="page_where"/>
  200. </select>
  201. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsmlRgstrSafe">
  202. insert into BIS_INSP_RSML_RGSTR_SAFE(
  203. <include refid="table_columns"/>
  204. )
  205. values (
  206. <include refid="entity_properties"/>
  207. )
  208. </insert>
  209. <delete id="delete" parameterType="java.lang.String">
  210. update BIS_INSP_RSML_RGSTR_SAFE set DATA_STAT='9' where ID = #{id}
  211. </delete>
  212. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsmlRgstrSafe">
  213. update BIS_INSP_RSML_RGSTR_SAFE set DATA_STAT='9'
  214. <include refid="page_where"/>
  215. </delete>
  216. <update id="deleteInFlag" parameterType="java.lang.String">
  217. update BIS_INSP_RSML_RGSTR_SAFE set DATA_STAT = '9' where ID = #{id}
  218. </update>
  219. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsmlRgstrSafe">
  220. update BIS_INSP_RSML_RGSTR_SAFE
  221. <trim prefix="set" suffixOverrides=",">
  222. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  223. = #{rgstrId},
  224. </if>
  225. <if test="isGovPers != null and isGovPers != ''">IS_GOV_PERS
  226. = #{isGovPers},
  227. </if>
  228. <if test="govPers != null and govPers != ''">GOV_PERS
  229. = #{govPers},
  230. </if>
  231. <if test="govPersTel != null and govPersTel != ''">GOV_PERS_TEL
  232. = #{govPersTel},
  233. </if>
  234. <if test="govPersDuty != null and govPersDuty != ''">GOV_PERS_DUTY
  235. = #{govPersDuty},
  236. </if>
  237. <if test="govPersTrain != null and govPersTrain != ''">GOV_PERS_TRAIN
  238. = #{govPersTrain},
  239. </if>
  240. <if test="govPersResu != null and govPersResu != ''">GOV_PERS_RESU
  241. = #{govPersResu},
  242. </if>
  243. <if test="isDutyPers != null and isDutyPers != ''">IS_DUTY_PERS
  244. = #{isDutyPers},
  245. </if>
  246. <if test="dutyPers != null and dutyPers != ''">DUTY_PERS
  247. = #{dutyPers},
  248. </if>
  249. <if test="dutyPersTel != null and dutyPersTel != ''">DUTY_PERS_TEL
  250. = #{dutyPersTel},
  251. </if>
  252. <if test="dutyPersDuty != null and dutyPersDuty != ''">DUTY_PERS_DUTY
  253. = #{dutyPersDuty},
  254. </if>
  255. <if test="dutyPersTrain != null and dutyPersTrain != ''">DUTY_PERS_TRAIN
  256. = #{dutyPersTrain},
  257. </if>
  258. <if test="dutyPersResu != null and dutyPersResu != ''">DUTY_PERS_RESU
  259. = #{dutyPersResu},
  260. </if>
  261. <if test="isMngPers != null and isMngPers != ''">IS_MNG_PERS
  262. = #{isMngPers},
  263. </if>
  264. <if test="mngPers != null and mngPers != ''">MNG_PERS
  265. = #{mngPers},
  266. </if>
  267. <if test="mngPersTel != null and mngPersTel != ''">MNG_PERS_TEL
  268. = #{mngPersTel},
  269. </if>
  270. <if test="mngPersDuty != null and mngPersDuty != ''">MNG_PERS_DUTY
  271. = #{mngPersDuty},
  272. </if>
  273. <if test="mngPersTrain != null and mngPersTrain != ''">MNG_PERS_TRAIN
  274. = #{mngPersTrain},
  275. </if>
  276. <if test="mngPersResu != null and mngPersResu != ''">MNG_PERS_RESU
  277. = #{mngPersResu},
  278. </if>
  279. <if test="recPersId != null and recPersId != ''">REC_PERS_ID
  280. = #{recPersId},
  281. </if>
  282. <if test="recPersNm != null and recPersNm != ''">REC_PERS_NM
  283. = #{recPersNm},
  284. </if>
  285. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL
  286. = #{recPersTel},
  287. </if>
  288. <if test="inTm != null">IN_TM
  289. = #{inTm},
  290. </if>
  291. <if test="upTm != null">UP_TM
  292. = #{upTm},
  293. </if>
  294. <if test="status != null and status != ''">STATUS
  295. = #{status},
  296. </if>
  297. <if test="dataStat != null and dataStat != ''">DATA_STAT
  298. = #{dataStat},
  299. </if>
  300. </trim>
  301. <where>ID = #{id}</where>
  302. </update>
  303. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsmlRgstrSafe">
  304. update BIS_INSP_RSML_RGSTR_SAFE
  305. <trim prefix="set" suffixOverrides=",">
  306. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  307. = #{rgstrId},
  308. </if>
  309. <if test="isGovPers != null and isGovPers != ''">IS_GOV_PERS
  310. = #{isGovPers},
  311. </if>
  312. <if test="govPers != null and govPers != ''">GOV_PERS
  313. = #{govPers},
  314. </if>
  315. <if test="govPersTel != null and govPersTel != ''">GOV_PERS_TEL
  316. = #{govPersTel},
  317. </if>
  318. <if test="govPersDuty != null and govPersDuty != ''">GOV_PERS_DUTY
  319. = #{govPersDuty},
  320. </if>
  321. <if test="govPersTrain != null and govPersTrain != ''">GOV_PERS_TRAIN
  322. = #{govPersTrain},
  323. </if>
  324. <if test="govPersResu != null and govPersResu != ''">GOV_PERS_RESU
  325. = #{govPersResu},
  326. </if>
  327. <if test="isDutyPers != null and isDutyPers != ''">IS_DUTY_PERS
  328. = #{isDutyPers},
  329. </if>
  330. <if test="dutyPers != null and dutyPers != ''">DUTY_PERS
  331. = #{dutyPers},
  332. </if>
  333. <if test="dutyPersTel != null and dutyPersTel != ''">DUTY_PERS_TEL
  334. = #{dutyPersTel},
  335. </if>
  336. <if test="dutyPersDuty != null and dutyPersDuty != ''">DUTY_PERS_DUTY
  337. = #{dutyPersDuty},
  338. </if>
  339. <if test="dutyPersTrain != null and dutyPersTrain != ''">DUTY_PERS_TRAIN
  340. = #{dutyPersTrain},
  341. </if>
  342. <if test="dutyPersResu != null and dutyPersResu != ''">DUTY_PERS_RESU
  343. = #{dutyPersResu},
  344. </if>
  345. <if test="isMngPers != null and isMngPers != ''">IS_MNG_PERS
  346. = #{isMngPers},
  347. </if>
  348. <if test="mngPers != null and mngPers != ''">MNG_PERS
  349. = #{mngPers},
  350. </if>
  351. <if test="mngPersTel != null and mngPersTel != ''">MNG_PERS_TEL
  352. = #{mngPersTel},
  353. </if>
  354. <if test="mngPersDuty != null and mngPersDuty != ''">MNG_PERS_DUTY
  355. = #{mngPersDuty},
  356. </if>
  357. <if test="mngPersTrain != null and mngPersTrain != ''">MNG_PERS_TRAIN
  358. = #{mngPersTrain},
  359. </if>
  360. <if test="mngPersResu != null and mngPersResu != ''">MNG_PERS_RESU
  361. = #{mngPersResu},
  362. </if>
  363. <if test="recPersId != null and recPersId != ''">REC_PERS_ID
  364. = #{recPersId},
  365. </if>
  366. <if test="recPersNm != null and recPersNm != ''">REC_PERS_NM
  367. = #{recPersNm},
  368. </if>
  369. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL
  370. = #{recPersTel},
  371. </if>
  372. <if test="inTm != null">IN_TM
  373. = #{inTm},
  374. </if>
  375. <if test="upTm != null">UP_TM
  376. = #{upTm},
  377. </if>
  378. <if test="status != null and status != ''">STATUS
  379. = #{status},
  380. </if>
  381. <if test="dataStat != null and dataStat != ''">DATA_STAT
  382. = #{dataStat},
  383. </if>
  384. </trim>
  385. <include refid="page_where"/>
  386. </update>
  387. <!-- 其他自定义SQL -->
  388. </mapper>