BisInspPresSafeDao.xml 15 KB

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