BusJcbJcxcMapper.xml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795
  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.BusJcbJcxcMapper">
  5. <resultMap id="BaseResultMap" type="com.railway.business.catenary.domain.BusJcbJcxc">
  6. <result column="id" property="id"/>
  7. <result column="xc_id" property="xcId"/>
  8. <result column="dept_id" property="deptId"/>
  9. <result column="dept_name" property="deptName"/>
  10. <result column="station_id" property="stationId"/>
  11. <result column="station_name" property="stationName"/>
  12. <result column="dept_station_id" property="deptStationId"/>
  13. <result column="pillar_code" property="pillarCode"/>
  14. <result column="xch" property="xch"/>
  15. <result column="temperature" property="temperature"/>
  16. <result column="check_date" property="checkDate"/>
  17. <result column="gz1lcz" property="gz1lcz"/>
  18. <result column="gz2lcz" property="gz2lcz"/>
  19. <result column="fzlcz" property="fzlcz"/>
  20. <result column="zglcz" property="zglcz"/>
  21. <result column="qglcz" property="qglcz"/>
  22. <result column="ngj" property="ngj"/>
  23. <result column="plz" property="plz"/>
  24. <result column="xcxzgazlg" property="xcxzgazlg"/>
  25. <result column="xcxzgazlg_gzms" property="xcxzgazlgGzms"/>
  26. <result column="hdjx" property="hdjx"/>
  27. <result column="hdjx_gzms" property="hdjxGzms"/>
  28. <result column="fhzzsq" property="fhzzsq"/>
  29. <result column="fhzzsq_gzms" property="fhzzsqGzms"/>
  30. <result column="dqssxx" property="dqssxx"/>
  31. <result column="dqssxx_gzms" property="dqssxxGzms"/>
  32. <result column="lswst" property="lswst"/>
  33. <result column="lswst_gzms" property="lswstGzms"/>
  34. <result column="xzgldydx" property="xzgldydx"/>
  35. <result column="xzgldydx_gzms" property="xzgldydxGzms"/>
  36. <result column="dxztlh" property="dxztlh"/>
  37. <result column="dxztlh_gzms" property="dxztlhGzms"/>
  38. <result column="czjj" property="czjj"/>
  39. <result column="lgzzgc" property="lgzzgc"/>
  40. <result column="gzyfzgc" property="gzyfzgc"/>
  41. <result column="wxj" property="wxj"/>
  42. <result column="wxj_gzms" property="wxjGzms"/>
  43. <result column="hddxxjzt" property="hddxxjzt"/>
  44. <result column="hddxxjzt_gzms" property="hddxxjztGzms"/>
  45. <result column="jcdxzt" property="jcdxzt"/>
  46. <result column="jcdxzt_gzms" property="jcdxztGzms"/>
  47. <result column="dljxzt" property="dljxzt"/>
  48. <result column="dljxzt_gzms" property="dljxztGzms"/>
  49. <result column="sbzt" property="sbzt"/>
  50. <result column="check_user" property="checkUser"/>
  51. <result column="confirm_user" property="confirmUser"/>
  52. <result column="czwt" property="czwt"/>
  53. <result column="submit_state" property="submitState"/>
  54. <result column="create_by" property="createBy"/>
  55. <result column="create_time" property="createTime"/>
  56. <result column="update_by" property="updateBy"/>
  57. <result column="update_time" property="updateTime"/>
  58. <result column="user_id" property="userId"/>
  59. </resultMap>
  60. <sql id="Base_Column_List">
  61. t.id,
  62. t.xc_id,
  63. v.dept_id,
  64. v.dept_name,
  65. v.station_name,
  66. v.station_id,
  67. t.dept_station_id,
  68. t.pillar_code,
  69. t.xch,
  70. t.temperature,
  71. t.check_date,
  72. t.gz1lcz,
  73. t.gz2lcz,
  74. t.fzlcz,
  75. t.zglcz,
  76. t.qglcz,
  77. t.ngj,
  78. t.plz,
  79. t.xcxzgazlg,
  80. t.xcxzgazlg_gzms,
  81. t.hdjx,
  82. t.hdjx_gzms,
  83. t.fhzzsq,
  84. t.fhzzsq_gzms,
  85. t.dqssxx,
  86. t.dqssxx_gzms,
  87. t.lswst,
  88. t.lswst_gzms,
  89. t.xzgldydx,
  90. t.xzgldydx_gzms,
  91. t.dxztlh,
  92. t.dxztlh_gzms,
  93. t.czjj,
  94. t.lgzzgc,
  95. t.gzyfzgc,
  96. t.wxj,
  97. t.wxj_gzms,
  98. t.hddxxjzt,
  99. t.hddxxjzt_gzms,
  100. t.jcdxzt,
  101. t.jcdxzt_gzms,
  102. t.dljxzt,
  103. t.dljxzt_gzms,
  104. t.sbzt,
  105. t.check_user,
  106. t.confirm_user,
  107. t.czwt,
  108. t.submit_state,
  109. t.create_by,
  110. t.create_time,
  111. t.update_by,
  112. t.update_time,
  113. t.user_id
  114. </sql>
  115. <insert id="insert" parameterType="com.railway.business.catenary.domain.BusJcbJcxc">
  116. INSERT INTO bus_jcb_jcxc
  117. <trim prefix="(" suffix=")" suffixOverrides=",">
  118. <if test='null != deptStationId'>
  119. dept_station_id,
  120. </if>
  121. <if test='null != pillarCode'>
  122. pillar_code,
  123. </if>
  124. <if test='null != xcId'>
  125. xc_id,
  126. </if>
  127. <if test='null != xch'>
  128. xch,
  129. </if>
  130. <if test='null != temperature'>
  131. temperature,
  132. </if>
  133. <if test='null != checkDate'>
  134. check_date,
  135. </if>
  136. <if test='null != gz1lcz'>
  137. gz1lcz,
  138. </if>
  139. <if test='null != gz2lcz'>
  140. gz2lcz,
  141. </if>
  142. <if test='null != fzlcz'>
  143. fzlcz,
  144. </if>
  145. <if test='null != zglcz'>
  146. zglcz,
  147. </if>
  148. <if test='null != qglcz'>
  149. qglcz,
  150. </if>
  151. <if test='null != ngj'>
  152. ngj,
  153. </if>
  154. <if test='null != plz'>
  155. plz,
  156. </if>
  157. <if test='null != xcxzgazlg'>
  158. xcxzgazlg,
  159. </if>
  160. <if test='null != xcxzgazlgGzms'>
  161. xcxzgazlg_gzms,
  162. </if>
  163. <if test='null != hdjx'>
  164. hdjx,
  165. </if>
  166. <if test='null != hdjxGzms'>
  167. hdjx_gzms,
  168. </if>
  169. <if test='null != fhzzsq'>
  170. fhzzsq,
  171. </if>
  172. <if test='null != fhzzsqGzms'>
  173. fhzzsq_gzms,
  174. </if>
  175. <if test='null != dqssxx'>
  176. dqssxx,
  177. </if>
  178. <if test='null != dqssxxGzms'>
  179. dqssxx_gzms,
  180. </if>
  181. <if test='null != lswst'>
  182. lswst,
  183. </if>
  184. <if test='null != lswstGzms'>
  185. lswst_gzms,
  186. </if>
  187. <if test='null != xzgldydx'>
  188. xzgldydx,
  189. </if>
  190. <if test='null != xzgldydxGzms'>
  191. xzgldydx_gzms,
  192. </if>
  193. <if test='null != dxztlh'>
  194. dxztlh,
  195. </if>
  196. <if test='null != dxztlhGzms'>
  197. dxztlh_gzms,
  198. </if>
  199. <if test='null != czjj'>
  200. czjj,
  201. </if>
  202. <if test='null != lgzzgc'>
  203. lgzzgc,
  204. </if>
  205. <if test='null != gzyfzgc'>
  206. gzyfzgc,
  207. </if>
  208. <if test='null != wxj'>
  209. wxj,
  210. </if>
  211. <if test='null != wxjGzms'>
  212. wxj_gzms,
  213. </if>
  214. <if test='null != hddxxjzt'>
  215. hddxxjzt,
  216. </if>
  217. <if test='null != hddxxjztGzms'>
  218. hddxxjzt_gzms,
  219. </if>
  220. <if test='null != jcdxzt'>
  221. jcdxzt,
  222. </if>
  223. <if test='null != jcdxztGzms'>
  224. jcdxzt_gzms,
  225. </if>
  226. <if test='null != dljxzt'>
  227. dljxzt,
  228. </if>
  229. <if test='null != dljxztGzms'>
  230. dljxzt_gzms,
  231. </if>
  232. <if test='null != sbzt'>
  233. sbzt,
  234. </if>
  235. <if test='null != checkUser'>
  236. check_user,
  237. </if>
  238. <if test='null != czwt'>
  239. czwt,
  240. </if>
  241. <if test='null != submitState'>
  242. submit_state,
  243. </if>
  244. <if test='null != createBy'>
  245. create_by,
  246. </if>
  247. <if test='null != createTime'>
  248. create_time,
  249. </if>
  250. <if test='null != updateBy'>
  251. update_by,
  252. </if>
  253. <if test='null != updateTime'>
  254. update_time,
  255. </if>
  256. <if test='null != userId'>
  257. user_id
  258. </if>
  259. </trim>
  260. <trim prefix="values (" suffix=")" suffixOverrides=",">
  261. <if test='null != deptStationId'>
  262. #{deptStationId},
  263. </if>
  264. <if test='null != pillarCode'>
  265. #{pillarCode},
  266. </if>
  267. <if test='null != xcId'>
  268. #{xcId},
  269. </if>
  270. <if test='null != xch'>
  271. #{xch},
  272. </if>
  273. <if test='null != temperature'>
  274. #{temperature},
  275. </if>
  276. <if test='null != checkDate'>
  277. #{checkDate},
  278. </if>
  279. <if test='null != gz1lcz'>
  280. #{gz1lcz},
  281. </if>
  282. <if test='null != gz2lcz'>
  283. #{gz2lcz},
  284. </if>
  285. <if test='null != fzlcz'>
  286. #{fzlcz},
  287. </if>
  288. <if test='null != zglcz'>
  289. #{zglcz},
  290. </if>
  291. <if test='null != qglcz'>
  292. #{qglcz},
  293. </if>
  294. <if test='null != ngj'>
  295. #{ngj},
  296. </if>
  297. <if test='null != plz'>
  298. #{plz},
  299. </if>
  300. <if test='null != xcxzgazlg'>
  301. #{xcxzgazlg},
  302. </if>
  303. <if test='null != xcxzgazlgGzms'>
  304. #{xcxzgazlgGzms},
  305. </if>
  306. <if test='null != hdjx'>
  307. #{hdjx},
  308. </if>
  309. <if test='null != hdjxGzms'>
  310. #{hdjxGzms},
  311. </if>
  312. <if test='null != fhzzsq'>
  313. #{fhzzsq},
  314. </if>
  315. <if test='null != fhzzsqGzms'>
  316. #{fhzzsqGzms},
  317. </if>
  318. <if test='null != dqssxx'>
  319. #{dqssxx},
  320. </if>
  321. <if test='null != dqssxxGzms'>
  322. #{dqssxxGzms},
  323. </if>
  324. <if test='null != lswst'>
  325. #{lswst},
  326. </if>
  327. <if test='null != lswstGzms'>
  328. #{lswstGzms},
  329. </if>
  330. <if test='null != xzgldydx'>
  331. #{xzgldydx},
  332. </if>
  333. <if test='null != xzgldydxGzms'>
  334. #{xzgldydxGzms},
  335. </if>
  336. <if test='null != dxztlh'>
  337. #{dxztlh},
  338. </if>
  339. <if test='null != dxztlhGzms'>
  340. #{dxztlhGzms},
  341. </if>
  342. <if test='null != czjj'>
  343. #{czjj},
  344. </if>
  345. <if test='null != lgzzgc'>
  346. #{lgzzgc},
  347. </if>
  348. <if test='null != gzyfzgc'>
  349. #{gzyfzgc},
  350. </if>
  351. <if test='null != wxj'>
  352. #{wxj},
  353. </if>
  354. <if test='null != wxjGzms'>
  355. #{wxjGzms},
  356. </if>
  357. <if test='null != hddxxjzt'>
  358. #{hddxxjzt},
  359. </if>
  360. <if test='null != hddxxjztGzms'>
  361. #{hddxxjztGzms},
  362. </if>
  363. <if test='null != jcdxzt'>
  364. #{jcdxzt},
  365. </if>
  366. <if test='null != jcdxztGzms'>
  367. #{jcdxztGzms},
  368. </if>
  369. <if test='null != dljxzt'>
  370. #{dljxzt},
  371. </if>
  372. <if test='null != dljxztGzms'>
  373. #{dljxztGzms},
  374. </if>
  375. <if test='null != sbzt'>
  376. #{sbzt},
  377. </if>
  378. <if test='null != checkUser'>
  379. #{checkUser},
  380. </if>
  381. <if test='null != czwt'>
  382. #{czwt},
  383. </if>
  384. <if test='null != submitState'>
  385. #{submitState},
  386. </if>
  387. <if test='null != createBy'>
  388. #{createBy},
  389. </if>
  390. <if test='null != createTime'>
  391. #{createTime},
  392. </if>
  393. <if test='null != updateBy'>
  394. #{updateBy},
  395. </if>
  396. <if test='null != updateTime'>
  397. #{updateTime},
  398. </if>
  399. <if test='null != userId'>
  400. #{userId}
  401. </if>
  402. </trim>
  403. </insert>
  404. <delete id="delete">
  405. UPDATE bus_jcb_jcxc
  406. set del_flag='1'
  407. WHERE id = #{id}
  408. </delete>
  409. <update id="update" parameterType="com.railway.business.catenary.domain.BusJcbJcxc">
  410. UPDATE bus_jcb_jcxc
  411. <set>
  412. <if test='null != deptStationId'>dept_station_id = #{deptStationId},</if>
  413. <if test='null != pillarCode'>pillar_code = #{pillarCode},</if>
  414. <if test='null != xch'>xc_id = #{xcId},</if>
  415. <if test='null != xch'>xch = #{xch},</if>
  416. <if test='null != temperature'>temperature = #{temperature},</if>
  417. <if test='null != checkDate'>check_date = #{checkDate},</if>
  418. <if test='null != gz1lcz'>gz1lcz = #{gz1lcz},</if>
  419. <if test='null != gz2lcz'>gz2lcz = #{gz2lcz},</if>
  420. <if test='null != gz2lcz'>fzlcz = #{fzlcz},</if>
  421. <if test='null != zglcz'>zglcz = #{zglcz},</if>
  422. <if test='null != qglcz'>qglcz = #{qglcz},</if>
  423. <if test='null != ngj'>ngj = #{ngj},</if>
  424. <if test='null != plz'>plz = #{plz},</if>
  425. <if test='null != xcxzgazlg'>xcxzgazlg = #{xcxzgazlg},</if>
  426. <if test='null != xcxzgazlgGzms'>xcxzgazlg_gzms = #{xcxzgazlgGzms},</if>
  427. <if test='null != hdjx'>hdjx = #{hdjx},</if>
  428. <if test='null != hdjxGzms'>hdjx_gzms = #{hdjxGzms},</if>
  429. <if test='null != fhzzsq'>fhzzsq = #{fhzzsq},</if>
  430. <if test='null != fhzzsqGzms'>fhzzsq_gzms = #{fhzzsqGzms},</if>
  431. <if test='null != dqssxx'>dqssxx = #{dqssxx},</if>
  432. <if test='null != dqssxxGzms'>dqssxx_gzms = #{dqssxxGzms},</if>
  433. <if test='null != lswst'>lswst = #{lswst},</if>
  434. <if test='null != lswstGzms'>lswst_gzms = #{lswstGzms},</if>
  435. <if test='null != xzgldydx'>xzgldydx = #{xzgldydx},</if>
  436. <if test='null != xzgldydxGzms'>xzgldydx_gzms = #{xzgldydxGzms},</if>
  437. <if test='null != dxztlh'>dxztlh = #{dxztlh},</if>
  438. <if test='null != dxztlhGzms'>dxztlh_gzms = #{dxztlhGzms},</if>
  439. <if test='null != czjj'>czjj = #{czjj},</if>
  440. <if test='null != lgzzgc'>lgzzgc = #{lgzzgc},</if>
  441. <if test='null != gzyfzgc'>gzyfzgc = #{gzyfzgc},</if>
  442. <if test='null != wxj'>wxj = #{wxj},</if>
  443. <if test='null != wxjGzms'>wxj_gzms = #{wxjGzms},</if>
  444. <if test='null != hddxxjzt'>hddxxjzt = #{hddxxjzt},</if>
  445. <if test='null != hddxxjztGzms'>hddxxjzt_gzms = #{hddxxjztGzms},</if>
  446. <if test='null != jcdxzt'>jcdxzt = #{jcdxzt},</if>
  447. <if test='null != jcdxztGzms'>jcdxzt_gzms = #{jcdxztGzms},</if>
  448. <if test='null != dljxzt'>dljxzt = #{dljxzt},</if>
  449. <if test='null != dljxztGzms'>dljxzt_gzms = #{dljxztGzms},</if>
  450. <if test='null != sbzt'>sbzt = #{sbzt},</if>
  451. <if test='null != checkUser'>check_user = #{checkUser},</if>
  452. <if test='null != czwt'>czwt = #{czwt},</if>
  453. <if test='null != submitState'>submit_state = #{submitState},</if>
  454. <if test='null != updateBy'>update_by = #{updateBy},</if>
  455. <if test='null != updateTime'>update_time = #{updateTime},</if>
  456. <if test='null != userId'>user_id = #{userId}</if>
  457. </set>
  458. WHERE id = #{id}
  459. </update>
  460. <select id="getInfo" resultMap="BaseResultMap">
  461. SELECT
  462. <include refid="Base_Column_List"/>
  463. FROM bus_jcb_jcxc t
  464. LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
  465. WHERE t.del_flag='0' and t.id = #{id}
  466. </select>
  467. <select id="getLastRecord" resultMap="BaseResultMap">
  468. SELECT
  469. a.gz1lcz, a.gz2lcz, a.fzlcz, a.zglcz, a.qglcz, a.ngj, a.plz, a.czjj, a.lgzzgc, a.gzyfzgc
  470. FROM bus_jcb_jcxc a,
  471. (
  472. select max(update_time) as lastTime
  473. from bus_jcb_jcxc
  474. WHERE user_id = #{user_id}
  475. and submit_state != '0'
  476. ) b
  477. WHERE a.update_time = b.lastTime
  478. </select>
  479. <select id="getList" resultMap="BaseResultMap">
  480. SELECT
  481. <include refid="Base_Column_List"/>
  482. FROM bus_jcb_jcxc t
  483. LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
  484. <where>
  485. t.del_flag='0'
  486. <if test="deptId!=null and deptId!=''">
  487. and v.dept_id=#{deptId}
  488. </if>
  489. <if test="stationId!=null and stationId!=''">
  490. and v.station_id=#{stationId}
  491. </if>
  492. <if test="stationIds!=null and stationIds.length > 0">
  493. and v.station_id in
  494. <foreach collection="stationIds" item="stationId" index="i" open="(" separator="," close=")">
  495. #{stationId}
  496. </foreach>
  497. </if>
  498. <if test="pillarCode!=null and pillarCode!=''">
  499. and t.pillar_code=#{pillarCode}
  500. </if>
  501. <if test="xch!=null and xch!=''">
  502. and t.xch=#{xch}
  503. </if>
  504. <if test="temperature!=null and temperature!=''">
  505. and t.temperature=#{temperature}
  506. </if>
  507. <if test="checkDate!=null">
  508. and t.check_date=#{checkDate}
  509. </if>
  510. <if test="gz1lcz!=null and gz1lcz!=''">
  511. and t.gz1lcz=#{gz1lcz}
  512. </if>
  513. <if test="gz2lcz!=null and gz2lcz!=''">
  514. and t.gz2lcz=#{gz2lcz}
  515. </if>
  516. <if test="fzlcz!=null and fzlcz!=''">
  517. and t.fzlcz=#{fzlcz}
  518. </if>
  519. <if test="zglcz!=null and zglcz!=''">
  520. and t.zglcz=#{zglcz}
  521. </if>
  522. <if test="qglcz!=null and qglcz!=''">
  523. and t.qglcz=#{qglcz}
  524. </if>
  525. <if test="ngj!=null and ngj!=''">
  526. and t.ngj=#{ngj}
  527. </if>
  528. <if test="plz!=null and plz!=''">
  529. and t.plz=#{plz}
  530. </if>
  531. <if test="xcxzgazlg!=null and xcxzgazlg!=''">
  532. and t.xcxzgazlg=#{xcxzgazlg}
  533. </if>
  534. <if test="xcxzgazlgGzms!=null and xcxzgazlgGzms!=''">
  535. and t.xcxzgazlg_gzms=#{xcxzgazlgGzms}
  536. </if>
  537. <if test="hdjx!=null and hdjx!=''">
  538. and t.hdjx=#{hdjx}
  539. </if>
  540. <if test="hdjxGzms!=null and hdjxGzms!=''">
  541. and t.hdjx_gzms=#{hdjxGzms}
  542. </if>
  543. <if test="fhzzsq!=null and fhzzsq!=''">
  544. and t.fhzzsq=#{fhzzsq}
  545. </if>
  546. <if test="fhzzsqGzms!=null and fhzzsqGzms!=''">
  547. and t.fhzzsq_gzms=#{fhzzsqGzms}
  548. </if>
  549. <if test="dqssxx!=null and dqssxx!=''">
  550. and t.dqssxx=#{dqssxx}
  551. </if>
  552. <if test="dqssxxGzms!=null and dqssxxGzms!=''">
  553. and t.dqssxx_gzms=#{dqssxxGzms}
  554. </if>
  555. <if test="lswst!=null and lswst!=''">
  556. and t.lswst=#{lswst}
  557. </if>
  558. <if test="lswstGzms!=null and lswstGzms!=''">
  559. and t.lswst_gzms=#{lswstGzms}
  560. </if>
  561. <if test="xzgldydx!=null and xzgldydx!=''">
  562. and t.xzgldydx=#{xzgldydx}
  563. </if>
  564. <if test="xzgldydxGzms!=null and xzgldydxGzms!=''">
  565. and t.xzgldydx_gzms=#{xzgldydxGzms}
  566. </if>
  567. <if test="dxztlh!=null and dxztlh!=''">
  568. and t.dxztlh=#{dxztlh}
  569. </if>
  570. <if test="dxztlhGzms!=null and dxztlhGzms!=''">
  571. and t.dxztlh_gzms=#{dxztlhGzms}
  572. </if>
  573. <if test="czjj!=null and czjj!=''">
  574. and t.czjj=#{czjj}
  575. </if>
  576. <if test="lgzzgc!=null and lgzzgc!=''">
  577. and t.lgzzgc=#{lgzzgc}
  578. </if>
  579. <if test="gzyfzgc!=null and gzyfzgc!=''">
  580. and t.gzyfzgc=#{gzyfzgc}
  581. </if>
  582. <if test="wxj!=null and wxj!=''">
  583. and t.wxj=#{wxj}
  584. </if>
  585. <if test="wxjGzms!=null and wxjGzms!=''">
  586. and t.wxj_gzms=#{wxjGzms}
  587. </if>
  588. <if test="hddxxjzt!=null and hddxxjzt!=''">
  589. and t.hddxxjzt=#{hddxxjzt}
  590. </if>
  591. <if test="hddxxjztGzms!=null and hddxxjztGzms!=''">
  592. and t.hddxxjzt_gzms=#{hddxxjztGzms}
  593. </if>
  594. <if test="jcdxzt!=null and jcdxzt!=''">
  595. and t.jcdxzt=#{jcdxzt}
  596. </if>
  597. <if test="jcdxztGzms!=null and jcdxztGzms!=''">
  598. and t.jcdxzt_gzms=#{jcdxztGzms}
  599. </if>
  600. <if test="dljxzt!=null and dljxzt!=''">
  601. and t.dljxzt=#{dljxzt}
  602. </if>
  603. <if test="dljxztGzms!=null and dljxztGzms!=''">
  604. and t.dljxzt_gzms=#{dljxztGzms}
  605. </if>
  606. <if test="sbzt!=null and sbzt!=''">
  607. and t.sbzt=#{sbzt}
  608. </if>
  609. <if test="checkUser!=null and checkUser!=''">
  610. and t.check_user like concat('%', #{checkUser}, '%')
  611. </if>
  612. <if test="czwt!=null and czwt!=''">
  613. and t.czwt=#{czwt}
  614. </if>
  615. <if test="submitState!=null and submitState!=''">
  616. and t.submit_state <![CDATA[ >= ]]> #{submitState}
  617. </if>
  618. <if test="createBy!=null and createBy!=''">
  619. and t.create_by=#{createBy}
  620. </if>
  621. <if test="createTime!=null">
  622. and DATE_FORMAT(t.create_time, '%Y-%m-%d') = #{createTime}
  623. </if>
  624. <if test="updateBy!=null and updateBy!=''">
  625. and t.update_by=#{updateBy}
  626. </if>
  627. <if test="updateTime!=null">
  628. and DATE_FORMAT(t.update_time, '%Y-%m-%d') = #{updateTime}
  629. </if>
  630. <if test="userId!=null and userId!=''">
  631. and t.user_id=#{userId}
  632. </if>
  633. </where>
  634. <if test="orderBy!=null and orderBy!=''">
  635. order by t.${orderBy}
  636. </if>
  637. <if test="isAsc!=null and isAsc!=''">
  638. <if test="isAsc == '1'.toString()">
  639. asc
  640. </if>
  641. <if test="isAsc == '0'.toString()">
  642. desc
  643. </if>
  644. </if>
  645. </select>
  646. <select id="getJcebList" resultMap="BaseResultMap">
  647. SELECT
  648. <include refid="Base_Column_List"/>
  649. FROM bus_jcb_jcxc t
  650. LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
  651. <where>
  652. t.del_flag='0'
  653. <if test="submitState!=null and submitState!=''">
  654. and t.submit_state <![CDATA[ >= ]]> #{submitState}
  655. </if>
  656. <if test="deptId!=null and deptId!=''">
  657. and v.dept_id=#{deptId}
  658. </if>
  659. <if test="stationId!=null and stationId!=''">
  660. and v.station_id=#{stationId}
  661. </if>
  662. <if test="stationIds!=null and stationIds.length > 0">
  663. and v.station_id in
  664. <foreach collection="stationIds" item="stationId" index="i" open="(" separator="," close=")">
  665. #{stationId}
  666. </foreach>
  667. </if>
  668. <if test="pillarCode!=null and pillarCode!=''">
  669. and t.pillar_code=#{pillarCode}
  670. </if>
  671. <if test="operator!=null and operator!=''">
  672. and t.check_user like concat('%', #{operator}, '%')
  673. </if>
  674. <if test="createBy!=null and createBy!=''">
  675. and t.create_by=#{createBy}
  676. </if>
  677. <if test="operationDate!=null">
  678. and t.check_date=#{operationDate}
  679. </if>
  680. </where>
  681. </select>
  682. <resultMap id="JcabResultMap" type="com.railway.business.catenary.domain.vo.JcebRecordVo">
  683. <result column="id" property="id"/>
  684. <result column="dept_name" property="deptName"/>
  685. <result column="station_name" property="stationName"/>
  686. <result column="check_date" property="operationDate"/>
  687. <result column="check_user" property="operator"/>
  688. <result column="jcebType" property="jcebType"/>
  689. </resultMap>
  690. <select id="getListByType" resultMap="JcabResultMap">
  691. SELECT t.id, v.dept_name, v.station_name, t.check_date, t.check_user, #{jcebType} as jcebType
  692. FROM bus_jcb_jcxc t
  693. LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
  694. <where>
  695. t.del_flag='0'
  696. <if test="submitState!=null and submitState!=''">
  697. and t.submit_state <![CDATA[ >= ]]> #{submitState}
  698. </if>
  699. <if test="deptId!=null and deptId!=''">
  700. and v.dept_id=#{deptId}
  701. </if>
  702. <if test="stationId!=null and stationId!=''">
  703. and v.station_id=#{stationId}
  704. </if>
  705. <if test="stationIds!=null and stationIds.length > 0">
  706. and v.station_id in
  707. <foreach collection="stationIds" item="stationId" index="i" open="(" separator="," close=")">
  708. #{stationId}
  709. </foreach>
  710. </if>
  711. <if test="pillarCode!=null and pillarCode!=''">
  712. and t.pillar_code=#{pillarCode}
  713. </if>
  714. <if test="operator!=null and operator!=''">
  715. and t.check_user like concat('%', #{operator}, '%')
  716. </if>
  717. <if test="createBy!=null and createBy!=''">
  718. and t.create_by=#{createBy}
  719. </if>
  720. <if test="operationDate!=null">
  721. and t.check_date=#{operationDate}
  722. </if>
  723. </where>
  724. </select>
  725. <resultMap id="JcabCountResultMap" type="com.railway.business.catenary.domain.vo.JcebCountVo">
  726. <result column="c" property="count"/>
  727. <result column="check_date" property="operationDate"/>
  728. </resultMap>
  729. <select id="getCountByType" resultMap="JcabCountResultMap">
  730. SELECT count(*) c, max(t.check_date) as check_date
  731. FROM bus_jcb_jcxc t
  732. LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
  733. <where>
  734. t.del_flag='0'
  735. <if test="submitState!=null and submitState!=''">
  736. and t.submit_state <![CDATA[ >= ]]> #{submitState}
  737. </if>
  738. <if test="deptId!=null and deptId!=''">
  739. and v.dept_id=#{deptId}
  740. </if>
  741. <if test="stationId!=null and stationId!=''">
  742. and v.station_id=#{stationId}
  743. </if>
  744. <if test="pillarCode!=null and pillarCode!=''">
  745. and t.pillar_code=#{pillarCode}
  746. </if>
  747. <if test="operator!=null and operator!=''">
  748. and t.check_user like concat('%', #{operator}, '%')
  749. </if>
  750. <if test="createBy!=null and createBy!=''">
  751. and t.create_by=#{createBy}
  752. </if>
  753. <if test="operationDate!=null">
  754. and t.check_date=#{operationDate}
  755. </if>
  756. </where>
  757. </select>
  758. <resultMap id="JcabStationMap" type="com.railway.business.catenary.domain.vo.JcebStationVo">
  759. <result column="station_name" property="stationName"/>
  760. <result column="station_id" property="stationId"/>
  761. </resultMap>
  762. <select id="listStation" resultMap="JcabStationMap">
  763. SELECT distinct v.station_id, v.station_name
  764. FROM base_jcxc t
  765. LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
  766. <where>
  767. t.del_flag='0' and t.xclx = 'jcxc'
  768. <if test="deptId!=null and deptId!=''">
  769. and v.dept_id=#{deptId}
  770. </if>
  771. <if test="createBy!=null and createBy!=''">
  772. and t.create_by=#{createBy}
  773. </if>
  774. </where>
  775. </select>
  776. </mapper>