BusJcbFdfxjyqMapper.xml 27 KB

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