BusJcbDmcgyqMapper.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  3. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  4. <mapper namespace="com.railway.business.catenary.mapper.BusJcbDmcgyqMapper">
  5. <resultMap id="BaseResultMap" type="com.railway.business.catenary.domain.BusJcbDmcgyq">
  6. <result column="id" property="id"/>
  7. <result column="zhanqujian" property="zhanqujian"/>
  8. <result column="fenxiang" property="fenxiang"/>
  9. <result column="xingbie" property="xingbie"/>
  10. <result column="zzhfw" property="zzhfw"/>
  11. <result column="tianqi" property="tianqi"/>
  12. <result column="wendu" property="wendu"/>
  13. <result column="jianchariqi" property="jianchariqi"/>
  14. <result column="dgqwg_azlg" property="dgqwgAzlg"/>
  15. <result column="dgqwg_wzws" property="dgqwgWzws"/>
  16. <result column="dgqwg_bmqj" property="dgqwgBmqj"/>
  17. <result column="dgqwg_azlg_gzms" property="dgqwgAzlgGzms"/>
  18. <result column="dgqwg_wzws_gzms" property="dgqwgWzwsGzms"/>
  19. <result column="dgqwg_bmqj_gzms" property="dgqwgBmqjGzms"/>
  20. <result column="bspwg_bsqx" property="bspwgBsqx"/>
  21. <result column="bspwg_bsqx_gzms" property="bspwgBsqxGzms"/>
  22. <result column="bspwg_azlg" property="bspwgAzlg"/>
  23. <result column="bspwg_azlg_gzms" property="bspwgAzlgGzms"/>
  24. <result column="dgqcl_g1" property="dgqclG1"/>
  25. <result column="dgqcl_g2" property="dgqclG2"/>
  26. <result column="dgqcl_g3" property="dgqclG3"/>
  27. <result column="dgqcl_g4" property="dgqclG4"/>
  28. <result column="sbzt" property="sbzt"/>
  29. <result column="jcr" property="jcr"/>
  30. <result column="czwt" property="czwt"/>
  31. <result column="submit_status" property="submitStatus"/>
  32. <result column="create_by" property="createBy"/>
  33. <result column="create_time" property="createTime"/>
  34. <result column="update_by" property="updateBy"/>
  35. <result column="update_time" property="updateTime"/>
  36. <result column="user_id" property="userId"/>
  37. </resultMap>
  38. <sql id="Base_Column_List">
  39. id,
  40. zhanqujian,
  41. fenxiang,
  42. xingbie,
  43. zzhfw,
  44. tianqi,
  45. wendu,
  46. jianchariqi,
  47. dgqwg_azlg,
  48. dgqwg_wzws,
  49. dgqwg_bmqj,
  50. dgqwg_azlg_gzms,
  51. dgqwg_wzws_gzms,
  52. dgqwg_bmqj_gzms,
  53. bspwg_bsqx,
  54. bspwg_bsqx_gzms,
  55. bspwg_azlg,
  56. bspwg_azlg_gzms,
  57. dgqcl_g1,
  58. dgqcl_g2,
  59. dgqcl_g3,
  60. dgqcl_g4,
  61. sbzt,
  62. jcr,
  63. czwt,
  64. submit_status,
  65. create_by,
  66. create_time,
  67. update_by,
  68. update_time,
  69. user_id
  70. </sql>
  71. <insert id="insert" parameterType="com.railway.business.catenary.domain.BusJcbDmcgyq">
  72. INSERT INTO bus_jcb_dmcgyq
  73. <trim prefix="(" suffix=")" suffixOverrides=",">
  74. <if test ='null != zhanqujian'>
  75. zhanqujian,
  76. </if>
  77. <if test ='null != fenxiang'>
  78. fenxiang,
  79. </if>
  80. <if test ='null != xingbie'>
  81. xingbie,
  82. </if>
  83. <if test ='null != zzhfw'>
  84. zzhfw,
  85. </if>
  86. <if test ='null != tianqi'>
  87. tianqi,
  88. </if>
  89. <if test ='null != wendu'>
  90. wendu,
  91. </if>
  92. <if test ='null != jianchariqi'>
  93. jianchariqi,
  94. </if>
  95. <if test ='null != dgqwgAzlg'>
  96. dgqwg_azlg,
  97. </if>
  98. <if test ='null != dgqwgWzws'>
  99. dgqwg_wzws,
  100. </if>
  101. <if test ='null != dgqwgBmqj'>
  102. dgqwg_bmqj,
  103. </if>
  104. <if test ='null != dgqwgAzlgGzms'>
  105. dgqwg_azlg_gzms,
  106. </if>
  107. <if test ='null != dgqwgWzwsGzms'>
  108. dgqwg_wzws_gzms,
  109. </if>
  110. <if test ='null != dgqwgBmqjGzms'>
  111. dgqwg_bmqj_gzms,
  112. </if>
  113. <if test ='null != bspwgBsqx'>
  114. bspwg_bsqx,
  115. </if>
  116. <if test ='null != bspwgBsqxGzms'>
  117. bspwg_bsqx_gzms,
  118. </if>
  119. <if test ='null != bspwgAzlg'>
  120. bspwg_azlg,
  121. </if>
  122. <if test ='null != bspwgAzlgGzms'>
  123. bspwg_azlg_gzms,
  124. </if>
  125. <if test ='null != dgqclG1'>
  126. dgqcl_g1,
  127. </if>
  128. <if test ='null != dgqclG2'>
  129. dgqcl_g2,
  130. </if>
  131. <if test ='null != dgqclG3'>
  132. dgqcl_g3,
  133. </if>
  134. <if test ='null != dgqclG4'>
  135. dgqcl_g4,
  136. </if>
  137. <if test ='null != sbzt'>
  138. sbzt,
  139. </if>
  140. <if test ='null != jcr'>
  141. jcr,
  142. </if>
  143. <if test ='null != czwt'>
  144. czwt,
  145. </if>
  146. <if test ='null != submitStatus'>
  147. submit_status,
  148. </if>
  149. <if test ='null != createBy'>
  150. create_by,
  151. </if>
  152. <if test ='null != createTime'>
  153. create_time,
  154. </if>
  155. <if test ='null != updateBy'>
  156. update_by,
  157. </if>
  158. <if test ='null != updateTime'>
  159. update_time,
  160. </if>
  161. <if test ='null != userId'>
  162. user_id
  163. </if>
  164. </trim>
  165. <trim prefix="values (" suffix=")" suffixOverrides=",">
  166. <if test ='null != zhanqujian'>
  167. #{zhanqujian},
  168. </if>
  169. <if test ='null != fenxiang'>
  170. #{fenxiang},
  171. </if>
  172. <if test ='null != xingbie'>
  173. #{xingbie},
  174. </if>
  175. <if test ='null != zzhfw'>
  176. #{zzhfw},
  177. </if>
  178. <if test ='null != tianqi'>
  179. #{tianqi},
  180. </if>
  181. <if test ='null != wendu'>
  182. #{wendu},
  183. </if>
  184. <if test ='null != jianchariqi'>
  185. #{jianchariqi},
  186. </if>
  187. <if test ='null != dgqwgAzlg'>
  188. #{dgqwgAzlg},
  189. </if>
  190. <if test ='null != dgqwgWzws'>
  191. #{dgqwgWzws},
  192. </if>
  193. <if test ='null != dgqwgBmqj'>
  194. #{dgqwgBmqj},
  195. </if>
  196. <if test ='null != dgqwgAzlgGzms'>
  197. #{dgqwgAzlgGzms},
  198. </if>
  199. <if test ='null != dgqwgWzwsGzms'>
  200. #{dgqwgWzwsGzms},
  201. </if>
  202. <if test ='null != dgqwgBmqjGzms'>
  203. #{dgqwgBmqjGzms},
  204. </if>
  205. <if test ='null != bspwgBsqx'>
  206. #{bspwgBsqx},
  207. </if>
  208. <if test ='null != bspwgBsqxGzms'>
  209. #{bspwgBsqxGzms},
  210. </if>
  211. <if test ='null != bspwgAzlg'>
  212. #{bspwgAzlg},
  213. </if>
  214. <if test ='null != bspwgAzlgGzms'>
  215. #{bspwgAzlgGzms},
  216. </if>
  217. <if test ='null != dgqclG1'>
  218. #{dgqclG1},
  219. </if>
  220. <if test ='null != dgqclG2'>
  221. #{dgqclG2},
  222. </if>
  223. <if test ='null != dgqclG3'>
  224. #{dgqclG3},
  225. </if>
  226. <if test ='null != dgqclG4'>
  227. #{dgqclG4},
  228. </if>
  229. <if test ='null != sbzt'>
  230. #{sbzt},
  231. </if>
  232. <if test ='null != jcr'>
  233. #{jcr},
  234. </if>
  235. <if test ='null != czwt'>
  236. #{czwt},
  237. </if>
  238. <if test ='null != submitStatus'>
  239. #{submitStatus},
  240. </if>
  241. <if test ='null != createBy'>
  242. #{createBy},
  243. </if>
  244. <if test ='null != createTime'>
  245. #{createTime},
  246. </if>
  247. <if test ='null != updateBy'>
  248. #{updateBy},
  249. </if>
  250. <if test ='null != updateTime'>
  251. #{updateTime},
  252. </if>
  253. <if test ='null != userId'>
  254. #{userId}
  255. </if>
  256. </trim>
  257. </insert>
  258. <delete id="delete">
  259. UPDATE bus_jcb_dmcgyq
  260. set del_flag='1'
  261. WHERE id = #{id}
  262. </delete>
  263. <update id="update" parameterType="com.railway.business.catenary.domain.BusJcbDmcgyq">
  264. UPDATE bus_jcb_dmcgyq
  265. <set>
  266. <if test ='null != zhanqujian'>zhanqujian = #{zhanqujian},</if>
  267. <if test ='null != fenxiang'>fenxiang = #{fenxiang},</if>
  268. <if test ='null != xingbie'>xingbie = #{xingbie},</if>
  269. <if test ='null != zzhfw'>zzhfw = #{zzhfw},</if>
  270. <if test ='null != tianqi'>tianqi = #{tianqi},</if>
  271. <if test ='null != wendu'>wendu = #{wendu},</if>
  272. <if test ='null != jianchariqi'>jianchariqi = #{jianchariqi},</if>
  273. <if test ='null != dgqwgAzlg'>dgqwg_azlg = #{dgqwgAzlg},</if>
  274. <if test ='null != dgqwgWzws'>dgqwg_wzws = #{dgqwgWzws},</if>
  275. <if test ='null != dgqwgBmqj'>dgqwg_bmqj = #{dgqwgBmqj},</if>
  276. <if test ='null != dgqwgAzlgGzms'>dgqwg_azlg_gzms = #{dgqwgAzlgGzms},</if>
  277. <if test ='null != dgqwgWzwsGzms'>dgqwg_wzws_gzms = #{dgqwgWzwsGzms},</if>
  278. <if test ='null != dgqwgBmqjGzms'>dgqwg_bmqj_gzms = #{dgqwgBmqjGzms},</if>
  279. <if test ='null != bspwgBsqx'>bspwg_bsqx = #{bspwgBsqx},</if>
  280. <if test ='null != bspwgBsqxGzms'>bspwg_bsqx_gzms = #{bspwgBsqxGzms},</if>
  281. <if test ='null != bspwgAzlg'>bspwg_azlg = #{bspwgAzlg},</if>
  282. <if test ='null != bspwgAzlgGzms'>bspwg_azlg_gzms = #{bspwgAzlgGzms},</if>
  283. <if test ='null != dgqclG1'>dgqcl_g1 = #{dgqclG1},</if>
  284. <if test ='null != dgqclG2'>dgqcl_g2 = #{dgqclG2},</if>
  285. <if test ='null != dgqclG3'>dgqcl_g3 = #{dgqclG3},</if>
  286. <if test ='null != dgqclG4'>dgqcl_g4 = #{dgqclG4},</if>
  287. <if test ='null != sbzt'>sbzt = #{sbzt},</if>
  288. <if test ='null != jcr'>jcr = #{jcr},</if>
  289. <if test ='null != czwt'>czwt = #{czwt},</if>
  290. <if test ='null != submitStatus'>submit_status = #{submitStatus},</if>
  291. <if test ='null != createBy'>create_by = #{createBy},</if>
  292. <if test ='null != createTime'>create_time = #{createTime},</if>
  293. <if test ='null != updateBy'>update_by = #{updateBy},</if>
  294. <if test ='null != updateTime'>update_time = #{updateTime},</if>
  295. <if test ='null != userId'>user_id = #{userId}</if>
  296. </set>
  297. WHERE id = #{id}
  298. </update>
  299. <select id="getInfo" resultMap="BaseResultMap">
  300. SELECT
  301. <include refid="Base_Column_List"/>
  302. FROM bus_jcb_dmcgyq
  303. WHERE id = #{id} and del_flag='0'
  304. </select>
  305. <select id="getLastRecord" resultMap="BaseResultMap">
  306. SELECT
  307. a.DGQCL_G1, a.DGQCL_G2, a.DGQCL_G3, a.DGQCL_G4
  308. FROM bus_jcb_dmcgyq a,
  309. (
  310. select max(update_time) as lastTime
  311. from bus_jcb_dmcgyq
  312. WHERE user_id = #{user_id}
  313. and submit_status != '0'
  314. ) b
  315. WHERE a.update_time = b.lastTime
  316. </select>
  317. <select id="getList" resultMap="BaseResultMap">
  318. SELECT
  319. <include refid="Base_Column_List"/>
  320. FROM bus_jcb_dmcgyq
  321. <where>
  322. del_flag='0'
  323. <if test="zhanqujian!=null and zhanqujian!=''">
  324. and zhanqujian=#{zhanqujian}
  325. </if>
  326. <if test="fenxiang!=null and fenxiang!=''">
  327. and fenxiang=#{fenxiang}
  328. </if>
  329. <if test="xingbie!=null and xingbie!=''">
  330. and xingbie=#{xingbie}
  331. </if>
  332. <if test="zzhfw!=null and zzhfw!=''">
  333. and zzhfw=#{zzhfw}
  334. </if>
  335. <if test="tianqi!=null and tianqi!=''">
  336. and tianqi=#{tianqi}
  337. </if>
  338. <if test="wendu!=null and wendu!=''">
  339. and wendu=#{wendu}
  340. </if>
  341. <if test="jianchariqi!=null and jianchariqi!=''">
  342. and jianchariqi=#{jianchariqi}
  343. </if>
  344. <if test="dgqwgAzlg!=null and dgqwgAzlg!=''">
  345. and dgqwg_azlg=#{dgqwgAzlg}
  346. </if>
  347. <if test="dgqwgWzws!=null and dgqwgWzws!=''">
  348. and dgqwg_wzws=#{dgqwgWzws}
  349. </if>
  350. <if test="dgqwgBmqj!=null and dgqwgBmqj!=''">
  351. and dgqwg_bmqj=#{dgqwgBmqj}
  352. </if>
  353. <if test="dgqwgAzlgGzms!=null and dgqwgAzlgGzms!=''">
  354. and dgqwg_azlg_gzms=#{dgqwgAzlgGzms}
  355. </if>
  356. <if test="dgqwgWzwsGzms!=null and dgqwgWzwsGzms!=''">
  357. and dgqwg_wzws_gzms=#{dgqwgWzwsGzms}
  358. </if>
  359. <if test="dgqwgBmqjGzms!=null and dgqwgBmqjGzms!=''">
  360. and dgqwg_bmqj_gzms=#{dgqwgBmqjGzms}
  361. </if>
  362. <if test="bspwgBsqx!=null and bspwgBsqx!=''">
  363. and bspwg_bsqx=#{bspwgBsqx}
  364. </if>
  365. <if test="bspwgBsqxGzms!=null and bspwgBsqxGzms!=''">
  366. and bspwg_bsqx_gzms=#{bspwgBsqxGzms}
  367. </if>
  368. <if test="bspwgAzlg!=null and bspwgAzlg!=''">
  369. and bspwg_azlg=#{bspwgAzlg}
  370. </if>
  371. <if test="bspwgAzlgGzms!=null and bspwgAzlgGzms!=''">
  372. and bspwg_azlg_gzms=#{bspwgAzlgGzms}
  373. </if>
  374. <if test="dgqclG1!=null and dgqclG1!=''">
  375. and dgqcl_g1=#{dgqclG1}
  376. </if>
  377. <if test="dgqclG2!=null and dgqclG2!=''">
  378. and dgqcl_g2=#{dgqclG2}
  379. </if>
  380. <if test="dgqclG3!=null and dgqclG3!=''">
  381. and dgqcl_g3=#{dgqclG3}
  382. </if>
  383. <if test="dgqclG4!=null and dgqclG4!=''">
  384. and dgqcl_g4=#{dgqclG4}
  385. </if>
  386. <if test="sbzt!=null and sbzt!=''">
  387. and sbzt=#{sbzt}
  388. </if>
  389. <if test="jcr!=null and jcr!=''">
  390. and jcr=#{jcr}
  391. </if>
  392. <if test="czwt!=null and czwt!=''">
  393. and czwt=#{czwt}
  394. </if>
  395. <if test="submitStatus!=null and submitStatus!=''">
  396. and submit_status=#{submitStatus}
  397. </if>
  398. <if test="createBy!=null and createBy!=''">
  399. and create_by=#{createBy}
  400. </if>
  401. <if test="createTime!=null and createTime!=''">
  402. and create_time=#{createTime}
  403. </if>
  404. <if test="updateBy!=null and updateBy!=''">
  405. and update_by=#{updateBy}
  406. </if>
  407. <if test="updateTime!=null and updateTime!=''">
  408. and update_time=#{updateTime}
  409. </if>
  410. <if test="userId!=null and userId!=''">
  411. and user_id=#{userId}
  412. </if>
  413. </where>
  414. </select>
  415. </mapper>