BusJcbFdfxjyqMapper.xml 26 KB

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