BusJcbFdfxjyqMapper.xml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734
  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.BusJcbFdfxjyqMapper">
  5. <resultMap id="BaseResultMap" type="com.railway.business.catenary.domain.BusJcbFdfxjyq">
  6. <result column="id" property="id"/>
  7. <result column="fdfxjyq_id" property="fdfxjyqId"/>
  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="fdh" property="fdh"/>
  15. <result column="temperature" property="temperature"/>
  16. <result column="check_date" property="checkDate"/>
  17. <result column="pic_url" property="picUrl"/>
  18. <result column="point_a" property="pointA"/>
  19. <result column="point_b" property="pointB"/>
  20. <result column="point_c" property="pointC"/>
  21. <result column="point_d" property="pointD"/>
  22. <result column="point_e" property="pointE"/>
  23. <result column="point_f" property="pointF"/>
  24. <result column="point_g" property="pointG"/>
  25. <result column="point_h" property="pointH"/>
  26. <result column="fcd" property="fcd"/>
  27. <result column="fddmpsd" property="fddmpsd"/>
  28. <result column="jybj_fdjyqzjyzt" property="jybjFdjyqzjyzt"/>
  29. <result column="jybj_fdjyqzjyzt_desc" property="jybjFdjyqzjyztDesc"/>
  30. <result column="jybj_clsjyzzt" property="jybjClsjyzzt"/>
  31. <result column="jybj_clsjyzzt_desc" property="jybjClsjyzztDesc"/>
  32. <result column="lbjzt_ls" property="lbjztLs"/>
  33. <result column="lbjzt_ls_desc" property="lbjztLsDesc"/>
  34. <result column="lbjzt_xdx" property="lbjztXdx"/>
  35. <result column="lbjzt_xdx_desc" property="lbjztXdxDesc"/>
  36. <result column="lbjzt_phzj" property="lbjztPhzj"/>
  37. <result column="lbjzt_phzj_desc" property="lbjztPhzjDesc"/>
  38. <result column="lbjzt_jcxjt" property="lbjztJcxjt"/>
  39. <result column="lbjzt_jcxjt_desc" property="lbjztJcxjtDesc"/>
  40. <result column="lbjzt_xhj" property="lbjztXhj"/>
  41. <result column="lbjzt_xhj_desc" property="lbjztXhjDesc"/>
  42. <result column="sbzt" property="sbzt"/>
  43. <result column="sbzt_desc" property="sbztDesc"/>
  44. <result column="check_user" property="checkUser"/>
  45. <result column="confirm_user" property="confirmUser"/>
  46. <result column="czwt" property="czwt"/>
  47. <result column="create_by" property="createBy"/>
  48. <result column="create_time" property="createTime"/>
  49. <result column="update_by" property="updateBy"/>
  50. <result column="update_time" property="updateTime"/>
  51. <result column="submit_state" property="submitState"/>
  52. <result column="del_flag" property="delFlag"/>
  53. <result column="xlfd_xlpd" property="xlfdXlpd"/>
  54. <result column="xlfd_wgdg" property="xlfdWgdg"/>
  55. <result column="xlfd_fdsxlqj" property="xlfdFdsxlqj"/>
  56. <result column="xlfd_fdczxlqj" property="xlfdFdczxlqj"/>
  57. <result column="sdgjczt_sddg" property="sdgjcztSddg"/>
  58. <result column="sdgjczt_sddg_desc" property="sdgjcztSddgDesc"/>
  59. </resultMap>
  60. <sql id="Base_Column_List">
  61. t.id,
  62. t.fdfxjyq_id,
  63. b.dept_station_id,
  64. v.station_id,
  65. v.station_name,
  66. b.pillar_area pillar_code,
  67. b.dch fdh,
  68. t.temperature,
  69. t.check_date,
  70. t.pic_url,
  71. t.point_a,
  72. t.point_b,
  73. t.point_c,
  74. t.point_d,
  75. t.point_e,
  76. t.point_f,
  77. t.point_g,
  78. t.point_h,
  79. t.fcd,
  80. t.fddmpsd,
  81. t.jybj_fdjyqzjyzt,
  82. t.jybj_fdjyqzjyzt_desc,
  83. t.jybj_clsjyzzt,
  84. t.jybj_clsjyzzt_desc,
  85. t.lbjzt_ls,
  86. t.lbjzt_ls_desc,
  87. t.lbjzt_xdx,
  88. t.lbjzt_xdx_desc,
  89. t.lbjzt_phzj,
  90. t.lbjzt_phzj_desc,
  91. t.lbjzt_jcxjt,
  92. t.lbjzt_jcxjt_desc,
  93. t.lbjzt_xhj,
  94. t.lbjzt_xhj_desc,
  95. t.sbzt,
  96. t.sbzt_desc,
  97. t.check_user,
  98. t.confirm_user,
  99. t.czwt,
  100. t.create_by,
  101. t.create_time,
  102. t.update_by,
  103. t.update_time,
  104. t.submit_state,
  105. t.del_flag,
  106. t.xlfd_xlpd,
  107. t.xlfd_wgdg,
  108. t.xlfd_fdsxlqj,
  109. t.xlfd_fdczxlqj,
  110. t.sdgjczt_sddg,
  111. t.sdgjczt_sddg_desc
  112. </sql>
  113. <insert id="insert" parameterType="com.railway.business.catenary.domain.BusJcbFdfxjyq">
  114. INSERT INTO bus_jcb_fdfxjyq
  115. <trim prefix="(" suffix=")" suffixOverrides=",">
  116. <if test='null != fdfxjyqId'>
  117. fdfxjyq_id,
  118. </if>
  119. <if test='null != deptStationId'>
  120. dept_station_id,
  121. </if>
  122. <if test='null != pillarCode'>
  123. pillar_code,
  124. </if>
  125. <if test='null != fdh'>
  126. fdh,
  127. </if>
  128. <if test='null != temperature'>
  129. temperature,
  130. </if>
  131. <if test='null != checkDate'>
  132. check_date,
  133. </if>
  134. <if test='null != picUrl'>
  135. pic_url,
  136. </if>
  137. <if test='null != pointA'>
  138. point_a,
  139. </if>
  140. <if test='null != pointB'>
  141. point_b,
  142. </if>
  143. <if test='null != pointC'>
  144. point_c,
  145. </if>
  146. <if test='null != pointD'>
  147. point_d,
  148. </if>
  149. <if test='null != pointE'>
  150. point_e,
  151. </if>
  152. <if test='null != pointF'>
  153. point_f,
  154. </if>
  155. <if test='null != pointG'>
  156. point_g,
  157. </if>
  158. <if test='null != pointH'>
  159. point_h,
  160. </if>
  161. <if test='null != fcd'>
  162. fcd,
  163. </if>
  164. <if test='null != fddmpsd'>
  165. fddmpsd,
  166. </if>
  167. <if test='null != jybjFdjyqzjyzt'>
  168. jybj_fdjyqzjyzt,
  169. </if>
  170. <if test='null != jybjFdjyqzjyztDesc'>
  171. jybj_fdjyqzjyzt_desc,
  172. </if>
  173. <if test='null != jybjClsjyzzt'>
  174. jybj_clsjyzzt,
  175. </if>
  176. <if test='null != jybjClsjyzztDesc'>
  177. jybj_clsjyzzt_desc,
  178. </if>
  179. <if test='null != lbjztLs'>
  180. lbjzt_ls,
  181. </if>
  182. <if test='null != lbjztLsDesc'>
  183. lbjzt_ls_desc,
  184. </if>
  185. <if test='null != lbjztXdx'>
  186. lbjzt_xdx,
  187. </if>
  188. <if test='null != lbjztXdxDesc'>
  189. lbjzt_xdx_desc,
  190. </if>
  191. <if test='null != lbjztPhzj'>
  192. lbjzt_phzj,
  193. </if>
  194. <if test='null != lbjztPhzjDesc'>
  195. lbjzt_phzj_desc,
  196. </if>
  197. <if test='null != lbjztJcxjt'>
  198. lbjzt_jcxjt,
  199. </if>
  200. <if test='null != lbjztJcxjtDesc'>
  201. lbjzt_jcxjt_desc,
  202. </if>
  203. <if test='null != lbjztXhj'>
  204. lbjzt_xhj,
  205. </if>
  206. <if test='null != lbjztXhjDesc'>
  207. lbjzt_xhj_desc,
  208. </if>
  209. <if test='null != sbzt'>
  210. sbzt,
  211. </if>
  212. <if test='null != sbztDesc'>
  213. sbzt_desc,
  214. </if>
  215. <if test='null != checkUser'>
  216. check_user,
  217. </if>
  218. <if test='null != confirmUser'>
  219. confirm_user,
  220. </if>
  221. <if test='null != czwt'>
  222. czwt,
  223. </if>
  224. <if test='null != createBy'>
  225. create_by,
  226. </if>
  227. <if test='null != createTime'>
  228. create_time,
  229. </if>
  230. <if test='null != updateBy'>
  231. update_by,
  232. </if>
  233. <if test='null != updateTime'>
  234. update_time,
  235. </if>
  236. <if test='null != submitState'>
  237. submit_state,
  238. </if>
  239. <if test='null != delFlag'>
  240. del_flag,
  241. </if>
  242. <if test='null != xlfdXlpd'>
  243. xlfd_xlpd,
  244. </if>
  245. <if test='null != xlfdWgdg'>
  246. xlfd_wgdg,
  247. </if>
  248. <if test='null != xlfdFdsxlqj'>
  249. xlfd_fdsxlqj,
  250. </if>
  251. <if test='null != xlfdFdczxlqj'>
  252. xlfd_fdczxlqj,
  253. </if>
  254. <if test='null != sdgjcztSddg'>
  255. sdgjczt_sddg,
  256. </if>
  257. <if test='null != sdgjcztSddgDesc'>
  258. sdgjczt_sddg_desc
  259. </if>
  260. </trim>
  261. <trim prefix="values (" suffix=")" suffixOverrides=",">
  262. <if test='null != fdfxjyqId'>
  263. #{fdfxjyqId},
  264. </if>
  265. <if test='null != deptStationId'>
  266. #{deptStationId},
  267. </if>
  268. <if test='null != pillarCode'>
  269. #{pillarCode},
  270. </if>
  271. <if test='null != fdh'>
  272. #{fdh},
  273. </if>
  274. <if test='null != temperature'>
  275. #{temperature},
  276. </if>
  277. <if test='null != checkDate'>
  278. #{checkDate},
  279. </if>
  280. <if test='null != picUrl'>
  281. #{picUrl},
  282. </if>
  283. <if test='null != pointA'>
  284. #{pointA},
  285. </if>
  286. <if test='null != pointB'>
  287. #{pointB},
  288. </if>
  289. <if test='null != pointC'>
  290. #{pointC},
  291. </if>
  292. <if test='null != pointD'>
  293. #{pointD},
  294. </if>
  295. <if test='null != pointE'>
  296. #{pointE},
  297. </if>
  298. <if test='null != pointF'>
  299. #{pointF},
  300. </if>
  301. <if test='null != pointG'>
  302. #{pointG},
  303. </if>
  304. <if test='null != pointH'>
  305. #{pointH},
  306. </if>
  307. <if test='null != fcd'>
  308. #{fcd},
  309. </if>
  310. <if test='null != fddmpsd'>
  311. #{fddmpsd},
  312. </if>
  313. <if test='null != jybjFdjyqzjyzt'>
  314. #{jybjFdjyqzjyzt},
  315. </if>
  316. <if test='null != jybjFdjyqzjyztDesc'>
  317. #{jybjFdjyqzjyztDesc},
  318. </if>
  319. <if test='null != jybjClsjyzzt'>
  320. #{jybjClsjyzzt},
  321. </if>
  322. <if test='null != jybjClsjyzztDesc'>
  323. #{jybjClsjyzztDesc},
  324. </if>
  325. <if test='null != lbjztLs'>
  326. #{lbjztLs},
  327. </if>
  328. <if test='null != lbjztLsDesc'>
  329. #{lbjztLsDesc},
  330. </if>
  331. <if test='null != lbjztXdx'>
  332. #{lbjztXdx},
  333. </if>
  334. <if test='null != lbjztXdxDesc'>
  335. #{lbjztXdxDesc},
  336. </if>
  337. <if test='null != lbjztPhzj'>
  338. #{lbjztPhzj},
  339. </if>
  340. <if test='null != lbjztPhzjDesc'>
  341. #{lbjztPhzjDesc},
  342. </if>
  343. <if test='null != lbjztJcxjt'>
  344. #{lbjztJcxjt},
  345. </if>
  346. <if test='null != lbjztJcxjtDesc'>
  347. #{lbjztJcxjtDesc},
  348. </if>
  349. <if test='null != lbjztXhj'>
  350. #{lbjztXhj},
  351. </if>
  352. <if test='null != lbjztXhjDesc'>
  353. #{lbjztXhjDesc},
  354. </if>
  355. <if test='null != sbzt'>
  356. #{sbzt},
  357. </if>
  358. <if test='null != sbztDesc'>
  359. #{sbztDesc},
  360. </if>
  361. <if test='null != checkUser'>
  362. #{checkUser},
  363. </if>
  364. <if test='null != confirmUser'>
  365. #{confirmUser},
  366. </if>
  367. <if test='null != czwt'>
  368. #{czwt},
  369. </if>
  370. <if test='null != createBy'>
  371. #{createBy},
  372. </if>
  373. <if test='null != createTime'>
  374. #{createTime},
  375. </if>
  376. <if test='null != updateBy'>
  377. #{updateBy},
  378. </if>
  379. <if test='null != updateTime'>
  380. #{updateTime},
  381. </if>
  382. <if test='null != submitState'>
  383. #{submitState},
  384. </if>
  385. <if test='null != delFlag'>
  386. #{delFlag},
  387. </if>
  388. <if test='null != xlfdXlpd'>
  389. #{xlfdXlpd},
  390. </if>
  391. <if test='null != xlfdWgdg'>
  392. #{xlfdWgdg},
  393. </if>
  394. <if test='null != xlfdFdsxlqj'>
  395. #{xlfdFdsxlqj},
  396. </if>
  397. <if test='null != xlfdFdczxlqj'>
  398. #{xlfdFdczxlqj},
  399. </if>
  400. <if test='null != sdgjcztSddg'>
  401. #{sdgjcztSddg},
  402. </if>
  403. <if test='null != sdgjcztSddgDesc'>
  404. #{sdgjcztSddgDesc}
  405. </if>
  406. </trim>
  407. </insert>
  408. <delete id="delete">
  409. UPDATE bus_jcb_fdfxjyq
  410. set del_flag='1'
  411. WHERE id = #{id}
  412. </delete>
  413. <update id="update" parameterType="com.railway.business.catenary.domain.BusJcbFdfxjyq">
  414. UPDATE bus_jcb_fdfxjyq
  415. <set>
  416. <if test='null != fdfxjyqId'>fdfxjyq_id = #{fdfxjyqId},</if>
  417. <if test='null != deptStationId'>dept_station_id = #{deptStationId},</if>
  418. <if test='null != pillarCode'>pillar_code = #{pillarCode},</if>
  419. <if test='null != fdh'>fdh = #{fdh},</if>
  420. <if test='null != temperature'>temperature = #{temperature},</if>
  421. <if test='null != checkDate'>check_date = #{checkDate},</if>
  422. <if test='null != picUrl'>pic_url = #{picUrl},</if>
  423. <if test='null != pointA'>point_a = #{pointA},</if>
  424. <if test='null != pointB'>point_b = #{pointB},</if>
  425. <if test='null != pointC'>point_c = #{pointC},</if>
  426. <if test='null != pointD'>point_d = #{pointD},</if>
  427. <if test='null != pointE'>point_e = #{pointE},</if>
  428. <if test='null != pointF'>point_f = #{pointF},</if>
  429. <if test='null != pointG'>point_g = #{pointG},</if>
  430. <if test='null != pointH'>point_h = #{pointH},</if>
  431. <if test='null != fcd'>fcd = #{fcd},</if>
  432. <if test='null != fddmpsd'>fddmpsd = #{fddmpsd},</if>
  433. <if test='null != jybjFdjyqzjyzt'>jybj_fdjyqzjyzt = #{jybjFdjyqzjyzt},</if>
  434. <if test='null != jybjFdjyqzjyztDesc'>jybj_fdjyqzjyzt_desc = #{jybjFdjyqzjyztDesc},</if>
  435. <if test='null != jybjClsjyzzt'>jybj_clsjyzzt = #{jybjClsjyzzt},</if>
  436. <if test='null != jybjClsjyzztDesc'>jybj_clsjyzzt_desc = #{jybjClsjyzztDesc},</if>
  437. <if test='null != lbjztLs'>lbjzt_ls = #{lbjztLs},</if>
  438. <if test='null != lbjztLsDesc'>lbjzt_ls_desc = #{lbjztLsDesc},</if>
  439. <if test='null != lbjztXdx'>lbjzt_xdx = #{lbjztXdx},</if>
  440. <if test='null != lbjztXdxDesc'>lbjzt_xdx_desc = #{lbjztXdxDesc},</if>
  441. <if test='null != lbjztPhzj'>lbjzt_phzj = #{lbjztPhzj},</if>
  442. <if test='null != lbjztPhzjDesc'>lbjzt_phzj_desc = #{lbjztPhzjDesc},</if>
  443. <if test='null != lbjztJcxjt'>lbjzt_jcxjt = #{lbjztJcxjt},</if>
  444. <if test='null != lbjztJcxjtDesc'>lbjzt_jcxjt_desc = #{lbjztJcxjtDesc},</if>
  445. <if test='null != lbjztXhj'>lbjzt_xhj = #{lbjztXhj},</if>
  446. <if test='null != lbjztXhjDesc'>lbjzt_xhj_desc = #{lbjztXhjDesc},</if>
  447. <if test='null != sbzt'>sbzt = #{sbzt},</if>
  448. <if test='null != sbztDesc'>sbzt_desc = #{sbztDesc},</if>
  449. <if test='null != checkUser'>check_user = #{checkUser},</if>
  450. <if test='null != confirmUser'>confirm_user = #{confirmUser},</if>
  451. <if test='null != czwt'>czwt = #{czwt},</if>
  452. <if test='null != updateBy'>update_by = #{updateBy},</if>
  453. <if test='null != updateTime'>update_time = #{updateTime},</if>
  454. <if test='null != submitState'>submit_state = #{submitState},</if>
  455. <if test='null != delFlag'>del_flag = #{delFlag},</if>
  456. <if test='null != xlfdXlpd'>xlfd_xlpd=#{xlfdXlpd},</if>
  457. <if test='null != xlfdWgdg'>xlfd_wgdg=#{xlfdWgdg},</if>
  458. <if test='null != xlfdFdsxlqj'>xlfd_fdsxlqj=#{xlfdFdsxlqj},</if>
  459. <if test='null != xlfdFdczxlqj'>xlfd_fdczxlqj=#{xlfdFdczxlqj},</if>
  460. <if test='null != sdgjcztSddg'>sdgjczt_sddg=#{sdgjcztSddg},</if>
  461. <if test='null != sdgjcztSddgDesc'>sdgjczt_sddg_desc=#{sdgjcztSddgDesc}</if>
  462. </set>
  463. WHERE id = #{id}
  464. </update>
  465. <select id="getInfo" resultMap="BaseResultMap">
  466. SELECT
  467. <include refid="Base_Column_List"/>
  468. FROM
  469. bus_jcb_fdfxjyq t
  470. left join base_fdfxjyq b on t.fdfxjyq_id = b.id
  471. LEFT JOIN v_station v on b.dept_station_id = v.dept_station_id
  472. where t.del_flag='0' and b.del_flag='0' and b.del_flag='0' and t.id = #{id}
  473. </select>
  474. <select id="getList" resultMap="BaseResultMap">
  475. SELECT
  476. <include refid="Base_Column_List"/>
  477. FROM
  478. bus_jcb_fdfxjyq t
  479. left join base_fdfxjyq b on t.fdfxjyq_id = b.id
  480. LEFT JOIN v_station v on b.dept_station_id = v.dept_station_id
  481. <where>
  482. and t.del_flag='0' and b.del_flag='0'
  483. <if test="fdfxjyqId!=null and fdfxjyqId!=''">
  484. and t.fdfxjyq_id=#{fdfxjyqId}
  485. </if>
  486. <if test="stationId!=null and stationId!=''">
  487. and v.station_id=#{stationId}
  488. </if>
  489. <if test="pillarCode!=null and pillarCode!=''">
  490. and t.pillar_code=#{pillarCode}
  491. </if>
  492. <if test="fdh!=null and fdh!=''">
  493. and t.fdh=#{fdh}
  494. </if>
  495. <if test="temperature!=null and temperature!=''">
  496. and t.temperature=#{temperature}
  497. </if>
  498. <if test="checkDate!=null and checkDate!=''">
  499. and t.check_date=#{checkDate}
  500. </if>
  501. <if test="picUrl!=null and picUrl!=''">
  502. and t.pic_url=#{picUrl}
  503. </if>
  504. <if test="pointA!=null and pointA!=''">
  505. and t.point_a=#{pointA}
  506. </if>
  507. <if test="pointB!=null and pointB!=''">
  508. and t.point_b=#{pointB}
  509. </if>
  510. <if test="pointC!=null and pointC!=''">
  511. and t.point_c=#{pointC}
  512. </if>
  513. <if test="pointD!=null and pointD!=''">
  514. and t.point_d=#{pointD}
  515. </if>
  516. <if test="pointE!=null and pointE!=''">
  517. and t.point_e=#{pointE}
  518. </if>
  519. <if test="pointF!=null and pointF!=''">
  520. and t.point_f=#{pointF}
  521. </if>
  522. <if test="pointG!=null and pointG!=''">
  523. and t.point_g=#{pointG}
  524. </if>
  525. <if test="pointH!=null and pointH!=''">
  526. and t.point_h=#{pointH}
  527. </if>
  528. <if test="fcd!=null and fcd!=''">
  529. and t.fcd=#{fcd}
  530. </if>
  531. <if test="fddmpsd!=null and fddmpsd!=''">
  532. and t.fddmpsd=#{fddmpsd}
  533. </if>
  534. <if test="jybjFdjyqzjyzt!=null and jybjFdjyqzjyzt!=''">
  535. and t.jybj_fdjyqzjyzt=#{jybjFdjyqzjyzt}
  536. </if>
  537. <if test="jybjFdjyqzjyztDesc!=null and jybjFdjyqzjyztDesc!=''">
  538. and t.jybj_fdjyqzjyzt_desc=#{jybjFdjyqzjyztDesc}
  539. </if>
  540. <if test="jybjClsjyzzt!=null and jybjClsjyzzt!=''">
  541. and t.jybj_clsjyzzt=#{jybjClsjyzzt}
  542. </if>
  543. <if test="jybjClsjyzztDesc!=null and jybjClsjyzztDesc!=''">
  544. and t.jybj_clsjyzzt_desc=#{jybjClsjyzztDesc}
  545. </if>
  546. <if test="lbjztLs!=null and lbjztLs!=''">
  547. and t.lbjzt_ls=#{lbjztLs}
  548. </if>
  549. <if test="lbjztLsDesc!=null and lbjztLsDesc!=''">
  550. and t.lbjzt_ls_desc=#{lbjztLsDesc}
  551. </if>
  552. <if test="lbjztXdx!=null and lbjztXdx!=''">
  553. and t.lbjzt_xdx=#{lbjztXdx}
  554. </if>
  555. <if test="lbjztXdxDesc!=null and lbjztXdxDesc!=''">
  556. and t.lbjzt_xdx_desc=#{lbjztXdxDesc}
  557. </if>
  558. <if test="lbjztPhzj!=null and lbjztPhzj!=''">
  559. and t.lbjzt_phzj=#{lbjztPhzj}
  560. </if>
  561. <if test="lbjztPhzjDesc!=null and lbjztPhzjDesc!=''">
  562. and t.lbjzt_phzj_desc=#{lbjztPhzjDesc}
  563. </if>
  564. <if test="lbjztJcxjt!=null and lbjztJcxjt!=''">
  565. and t.lbjzt_jcxjt=#{lbjztJcxjt}
  566. </if>
  567. <if test="lbjztJcxjtDesc!=null and lbjztJcxjtDesc!=''">
  568. and t.lbjzt_jcxjt_desc=#{lbjztJcxjtDesc}
  569. </if>
  570. <if test="lbjztXhj!=null and lbjztXhj!=''">
  571. and t.lbjzt_xhj=#{lbjztXhj}
  572. </if>
  573. <if test="lbjztXhjDesc!=null and lbjztXhjDesc!=''">
  574. and t.lbjzt_xhj_desc=#{lbjztXhjDesc}
  575. </if>
  576. <if test="sbzt!=null and sbzt!=''">
  577. and t.sbzt=#{sbzt}
  578. </if>
  579. <if test="sbztDesc!=null and sbztDesc!=''">
  580. and t.sbzt_desc=#{sbztDesc}
  581. </if>
  582. <if test="checkUser!=null and checkUser!=''">
  583. and t.check_user=#{checkUser}
  584. </if>
  585. <if test="confirmUser!=null and confirmUser!=''">
  586. and t.confirm_user=#{confirmUser}
  587. </if>
  588. <if test="czwt!=null and czwt!=''">
  589. and t.czwt=#{czwt}
  590. </if>
  591. <if test="createBy!=null and createBy!=''">
  592. and t.create_by=#{createBy}
  593. </if>
  594. <if test="createTime!=null and createTime!=''">
  595. and t.create_time=#{createTime}
  596. </if>
  597. <if test="updateBy!=null and updateBy!=''">
  598. and t.update_by=#{updateBy}
  599. </if>
  600. <if test="updateTime!=null and updateTime!=''">
  601. and t.update_time=#{updateTime}
  602. </if>
  603. <if test="submitState!=null and submitState!=''">
  604. and t.submit_state <![CDATA[ >= ]]> #{submitState}
  605. </if>
  606. <if test="delFlag!=null and delFlag!=''">
  607. and t.del_flag=#{delFlag}
  608. </if>
  609. <if test="xlfdXlpd!=null and xlfdXlpd!=''">
  610. and t.xlfd_xlpd=#{xlfdXlpd}
  611. </if>
  612. <if test="xlfdWgdg!=null and xlfdWgdg!=''">
  613. and t.xlfd_wgdg=#{xlfdWgdg}
  614. </if>
  615. <if test="xlfdFdsxlqj!=null and xlfdFdsxlqj!=''">
  616. and t.xlfd_fdsxlqj=#{xlfdFdsxlqj}
  617. </if>
  618. <if test="xlfdFdczxlqj!=null and xlfdFdczxlqj!=''">
  619. and t.xlfd_fdczxlqj=#{xlfdFdczxlqj}
  620. </if>
  621. <if test="sdgjcztSddg!=null and sdgjcztSddg!=''">
  622. and t.sdgjczt_sddg=#{sdgjcztSddg}
  623. </if>
  624. <if test="sdgjcztSddgDesc!=null and sdgjcztSddgDesc!=''">
  625. and t.sdgjczt_sddg_desc=#{sdgjcztSddgDesc}
  626. </if>
  627. </where>
  628. <if test="orderBy!=null and orderBy!=''">
  629. order by t.${orderBy}
  630. </if>
  631. <if test="isAsc!=null and isAsc!=''">
  632. <if test="isAsc == '1'.toString()">
  633. asc
  634. </if>
  635. <if test="isAsc == '0'.toString()">
  636. desc
  637. </if>
  638. </if>
  639. </select>
  640. <select id="getLastOne" resultMap="BaseResultMap">
  641. SELECT
  642. <include refid="Base_Column_List"/>
  643. FROM
  644. bus_jcb_fdfxjyq t
  645. left join base_fdfxjyq b on t.fdfxjyq_id = b.id
  646. LEFT JOIN v_station v on b.dept_station_id = v.dept_station_id
  647. where t.del_flag='0' and b.del_flag='0' and b.del_flag='0'
  648. and t.submit_state = '1'and t.del_flag = '0'
  649. <if test="stationId!=null and stationId!=''">
  650. and v.station_id=#{stationId}
  651. </if>
  652. <if test="pillarCode!=null and pillarCode!=''">
  653. and t.pillar_code=#{pillarCode}
  654. </if>
  655. <if test="fdh!=null and fdh!=''">
  656. and t.fdh=#{fdh}
  657. </if>
  658. <if test="fdfxjyqId!=null and fdfxjyqId!=''">
  659. and t.fdfxjyq_id=#{fdfxjyqId}
  660. </if>
  661. ORDER BY
  662. update_time DESC
  663. LIMIT 1
  664. </select>
  665. <resultMap id="JcabResultMap" type="com.railway.business.catenary.domain.vo.JcebRecordVo">
  666. <result column="id" property="id"/>
  667. <result column="dept_name" property="deptName"/>
  668. <result column="station_name" property="stationName"/>
  669. <result column="check_date" property="operationDate"/>
  670. <result column="check_user" property="operator"/>
  671. <result column="jcebType" property="jcebType"/>
  672. </resultMap>
  673. <select id="getListByType" resultMap="JcabResultMap">
  674. SELECT t.id, v.dept_name, v.station_name, t.check_date, t.check_user, #{jcebType} as jcebType
  675. FROM bus_jcb_fdfxjyq t
  676. LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
  677. <where>
  678. t.del_flag='0' and t.submit_state = '9'
  679. <if test="stationId!=null and stationId!=''">
  680. and v.station_id=#{stationId}
  681. </if>
  682. <if test="pillarCode!=null and pillarCode!=''">
  683. and t.pillar_code=#{pillarCode}
  684. </if>
  685. <if test="operator!=null and operator!=''">
  686. and t.check_user=#{operator}
  687. </if>
  688. <if test="createBy!=null and createBy!=''">
  689. and t.create_by=#{createBy}
  690. </if>
  691. </where>
  692. </select>
  693. <resultMap id="JcabCountResultMap" type="com.railway.business.catenary.domain.vo.JcebRecordVo">
  694. <result column="c" property="count"/>
  695. <result column="check_date" property="operationDate"/>
  696. </resultMap>
  697. <select id="getCountByType" resultMap="JcabCountResultMap">
  698. SELECT count(*) c, max(t.check_date) as check_date
  699. FROM bus_jcb_fdfxjyq t
  700. LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
  701. <where>
  702. t.del_flag='0' and t.submit_state = '9'
  703. <if test="stationId!=null and stationId!=''">
  704. and v.station_id=#{stationId}
  705. </if>
  706. <if test="pillarCode!=null and pillarCode!=''">
  707. and t.pillar_code=#{pillarCode}
  708. </if>
  709. <if test="operator!=null and operator!=''">
  710. and t.check_user=#{operator}
  711. </if>
  712. <if test="createBy!=null and createBy!=''">
  713. and t.create_by=#{createBy}
  714. </if>
  715. </where>
  716. </select>
  717. </mapper>