BusJcbWjcxcMapper.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  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.BusJcbWjcxcMapper">
  5. <resultMap id="BaseResultMap" type="com.railway.business.catenary.domain.BusJcbWjcxc">
  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="lbjzt" property="lbjzt"/>
  18. <result column="lbjzt_gzms" property="lbjztGzms"/>
  19. <result column="zxlcz" property="zxlcz"/>
  20. <result column="zxdg" property="zxdg"/>
  21. <result column="cxlcz" property="cxlcz"/>
  22. <result column="cxdg" property="cxdg"/>
  23. <result column="hdxjzt" property="hdxjzt"/>
  24. <result column="hdxjzt_gzms" property="hdxjztGzms"/>
  25. <result column="zxwxjq" property="zxwxjq"/>
  26. <result column="cxwxjq" property="cxwxjq"/>
  27. <result column="dljzt" property="dljzt"/>
  28. <result column="dljzt_gzms" property="dljztGzms"/>
  29. <result column="azzxlcz" property="azzxlcz"/>
  30. <result column="azzxdg" property="azzxdg"/>
  31. <result column="azcxlcz" property="azcxlcz"/>
  32. <result column="azcxdg" property="azcxdg"/>
  33. <result column="bzzxlcz" property="bzzxlcz"/>
  34. <result column="bzzxdg" property="bzzxdg"/>
  35. <result column="bzcxlcz" property="bzcxlcz"/>
  36. <result column="bzcxdg" property="bzcxdg"/>
  37. <result column="czzxlcz" property="czzxlcz"/>
  38. <result column="czzxdg" property="czzxdg"/>
  39. <result column="czcxlcz" property="czcxlcz"/>
  40. <result column="czcxdg" property="czcxdg"/>
  41. <result column="sbzt" property="sbzt"/>
  42. <result column="check_user" property="checkUser"/>
  43. <result column="confirm_user" property="confirmUser"/>
  44. <result column="czwt" property="czwt"/>
  45. <result column="submit_state" property="submitState"/>
  46. <result column="create_by" property="createBy"/>
  47. <result column="create_time" property="createTime"/>
  48. <result column="update_by" property="updateBy"/>
  49. <result column="update_time" property="updateTime"/>
  50. <result column="user_id" property="userId"/>
  51. <result column="del_flag" property="delFlag"/>
  52. </resultMap>
  53. <sql id="Base_Column_List">
  54. t.id,
  55. t.xc_id,
  56. v.dept_id,
  57. v.dept_name,
  58. v.station_name,
  59. v.station_id,
  60. t.dept_station_id,
  61. t.pillar_code,
  62. t.xch,
  63. t.temperature,
  64. t.check_date,
  65. t.lbjzt,
  66. t.lbjzt_gzms,
  67. t.zxlcz,
  68. t.zxdg,
  69. t.cxlcz,
  70. t.cxdg,
  71. t.hdxjzt,
  72. t.hdxjzt_gzms,
  73. t.zxwxjq,
  74. t.cxwxjq,
  75. t.dljzt,
  76. t.dljzt_gzms,
  77. t.azzxlcz,
  78. t.azzxdg,
  79. t.azcxlcz,
  80. t.azcxdg,
  81. t.bzzxlcz,
  82. t.bzzxdg,
  83. t.bzcxlcz,
  84. t.bzcxdg,
  85. t.czzxlcz,
  86. t.czzxdg,
  87. t.czcxlcz,
  88. t.czcxdg,
  89. t.sbzt,
  90. t.check_user,
  91. t.confirm_user,
  92. t.czwt,
  93. t.submit_state,
  94. t.create_by,
  95. t.create_time,
  96. t.update_by,
  97. t.update_time,
  98. t.user_id,
  99. t.del_flag
  100. </sql>
  101. <insert id="insert" parameterType="com.railway.business.catenary.domain.BusJcbWjcxc">
  102. INSERT INTO bus_jcb_wjcxc
  103. <trim prefix="(" suffix=")" suffixOverrides=",">
  104. <if test='null != deptStationId'>
  105. dept_station_id,
  106. </if>
  107. <if test='null != pillarCode'>
  108. pillar_code,
  109. </if>
  110. <if test='null != xcId'>
  111. xc_id,
  112. </if>
  113. <if test='null != xch'>
  114. xch,
  115. </if>
  116. <if test='null != temperature'>
  117. temperature,
  118. </if>
  119. <if test='null != checkDate'>
  120. check_date,
  121. </if>
  122. <if test='null != lbjzt'>
  123. lbjzt,
  124. </if>
  125. <if test='null != lbjztGzms'>
  126. lbjzt_gzms,
  127. </if>
  128. <if test='null != zxlcz'>
  129. zxlcz,
  130. </if>
  131. <if test='null != zxdg'>
  132. zxdg,
  133. </if>
  134. <if test='null != cxlcz'>
  135. cxlcz,
  136. </if>
  137. <if test='null != cxdg'>
  138. cxdg,
  139. </if>
  140. <if test='null != hdxjzt'>
  141. hdxjzt,
  142. </if>
  143. <if test='null != hdxjztGzms'>
  144. hdxjzt_gzms,
  145. </if>
  146. <if test='null != zxwxjq'>
  147. zxwxjq,
  148. </if>
  149. <if test='null != cxwxjq'>
  150. cxwxjq,
  151. </if>
  152. <if test='null != dljzt'>
  153. dljzt,
  154. </if>
  155. <if test='null != dljztGzms'>
  156. dljzt_gzms,
  157. </if>
  158. <if test='null != azzxlcz'>
  159. azzxlcz,
  160. </if>
  161. <if test='null != azzxdg'>
  162. azzxdg,
  163. </if>
  164. <if test='null != azcxlcz'>
  165. azcxlcz,
  166. </if>
  167. <if test='null != azcxdg'>
  168. azcxdg,
  169. </if>
  170. <if test='null != bzzxlcz'>
  171. bzzxlcz,
  172. </if>
  173. <if test='null != bzzxdg'>
  174. bzzxdg,
  175. </if>
  176. <if test='null != bzcxlcz'>
  177. bzcxlcz,
  178. </if>
  179. <if test='null != bzcxdg'>
  180. bzcxdg,
  181. </if>
  182. <if test='null != czzxlcz'>
  183. czzxlcz,
  184. </if>
  185. <if test='null != czzxdg'>
  186. czzxdg,
  187. </if>
  188. <if test='null != czcxlcz'>
  189. czcxlcz,
  190. </if>
  191. <if test='null != czcxdg'>
  192. czcxdg,
  193. </if>
  194. <if test='null != sbzt'>
  195. sbzt,
  196. </if>
  197. <if test='null != checkUser'>
  198. check_user,
  199. </if>
  200. <if test='null != czwt'>
  201. czwt,
  202. </if>
  203. <if test='null != submitState'>
  204. submit_state,
  205. </if>
  206. <if test='null != createBy'>
  207. create_by,
  208. </if>
  209. <if test='null != createTime'>
  210. create_time,
  211. </if>
  212. <if test='null != updateBy'>
  213. update_by,
  214. </if>
  215. <if test='null != updateTime'>
  216. update_time,
  217. </if>
  218. <if test='null != userId'>
  219. user_id,
  220. </if>
  221. <if test='null != delFlag'>
  222. del_flag
  223. </if>
  224. </trim>
  225. <trim prefix="values (" suffix=")" suffixOverrides=",">
  226. <if test='null != deptStationId'>
  227. #{deptStationId},
  228. </if>
  229. <if test='null != pillarCode'>
  230. #{pillarCode},
  231. </if>
  232. <if test='null != xcId'>
  233. #{xcId},
  234. </if>
  235. <if test='null != xch'>
  236. #{xch},
  237. </if>
  238. <if test='null != temperature'>
  239. #{temperature},
  240. </if>
  241. <if test='null != checkDate'>
  242. #{checkDate},
  243. </if>
  244. <if test='null != lbjzt'>
  245. #{lbjzt},
  246. </if>
  247. <if test='null != lbjztGzms'>
  248. #{lbjztGzms},
  249. </if>
  250. <if test='null != zxlcz'>
  251. #{zxlcz},
  252. </if>
  253. <if test='null != zxdg'>
  254. #{zxdg},
  255. </if>
  256. <if test='null != cxlcz'>
  257. #{cxlcz},
  258. </if>
  259. <if test='null != cxdg'>
  260. #{cxdg},
  261. </if>
  262. <if test='null != hdxjzt'>
  263. #{hdxjzt},
  264. </if>
  265. <if test='null != hdxjztGzms'>
  266. #{hdxjztGzms},
  267. </if>
  268. <if test='null != zxwxjq'>
  269. #{zxwxjq},
  270. </if>
  271. <if test='null != cxwxjq'>
  272. #{cxwxjq},
  273. </if>
  274. <if test='null != dljzt'>
  275. #{dljzt},
  276. </if>
  277. <if test='null != dljztGzms'>
  278. #{dljztGzms},
  279. </if>
  280. <if test='null != azzxlcz'>
  281. #{azzxlcz},
  282. </if>
  283. <if test='null != azzxdg'>
  284. #{azzxdg},
  285. </if>
  286. <if test='null != azcxlcz'>
  287. #{azcxlcz},
  288. </if>
  289. <if test='null != azcxdg'>
  290. #{azcxdg},
  291. </if>
  292. <if test='null != bzzxlcz'>
  293. #{bzzxlcz},
  294. </if>
  295. <if test='null != bzzxdg'>
  296. #{bzzxdg},
  297. </if>
  298. <if test='null != bzcxlcz'>
  299. #{bzcxlcz},
  300. </if>
  301. <if test='null != bzcxdg'>
  302. #{bzcxdg},
  303. </if>
  304. <if test='null != czzxlcz'>
  305. #{czzxlcz},
  306. </if>
  307. <if test='null != czzxdg'>
  308. #{czzxdg},
  309. </if>
  310. <if test='null != czcxlcz'>
  311. #{czcxlcz},
  312. </if>
  313. <if test='null != czcxdg'>
  314. #{czcxdg},
  315. </if>
  316. <if test='null != sbzt'>
  317. #{sbzt},
  318. </if>
  319. <if test='null != checkUser'>
  320. #{checkUser},
  321. </if>
  322. <if test='null != czwt'>
  323. #{czwt},
  324. </if>
  325. <if test='null != submitState'>
  326. #{submitState},
  327. </if>
  328. <if test='null != createBy'>
  329. #{createBy},
  330. </if>
  331. <if test='null != createTime'>
  332. #{createTime},
  333. </if>
  334. <if test='null != updateBy'>
  335. #{updateBy},
  336. </if>
  337. <if test='null != updateTime'>
  338. #{updateTime},
  339. </if>
  340. <if test='null != userId'>
  341. #{userId},
  342. </if>
  343. <if test='null != delFlag'>
  344. #{delFlag}
  345. </if>
  346. </trim>
  347. </insert>
  348. <delete id="delete">
  349. UPDATE bus_jcb_wjcxc
  350. set del_flag='1'
  351. WHERE id = #{id}
  352. </delete>
  353. <update id="update" parameterType="com.railway.business.catenary.domain.BusJcbWjcxc">
  354. UPDATE bus_jcb_wjcxc
  355. <set>
  356. <if test='null != deptStationId'>dept_station_id = #{deptStationId},</if>
  357. <if test='null != pillarCode'>pillar_code = #{pillarCode},</if>
  358. <if test='null != xch'>xc_id = #{xcId},</if>
  359. <if test='null != xch'>xch = #{xch},</if>
  360. <if test='null != temperature'>temperature = #{temperature},</if>
  361. <if test='null != checkDate'>check_date = #{checkDate},</if>
  362. <if test='null != lbjzt'>lbjzt = #{lbjzt},</if>
  363. <if test='null != lbjztGzms'>lbjzt_gzms = #{lbjztGzms},</if>
  364. <if test='null != zxlcz'>zxlcz = #{zxlcz},</if>
  365. <if test='null != zxdg'>zxdg = #{zxdg},</if>
  366. <if test='null != cxlcz'>cxlcz = #{cxlcz},</if>
  367. <if test='null != cxdg'>cxdg = #{cxdg},</if>
  368. <if test='null != hdxjzt'>hdxjzt = #{hdxjzt},</if>
  369. <if test='null != hdxjztGzms'>hdxjzt_gzms = #{hdxjztGzms},</if>
  370. <if test='null != zxwxjq'>zxwxjq = #{zxwxjq},</if>
  371. <if test='null != cxwxjq'>cxwxjq = #{cxwxjq},</if>
  372. <if test='null != dljzt'>dljzt = #{dljzt},</if>
  373. <if test='null != dljztGzms'>dljzt_gzms = #{dljztGzms},</if>
  374. <if test='null != azzxlcz'>azzxlcz = #{azzxlcz},</if>
  375. <if test='null != azzxdg'>azzxdg = #{azzxdg},</if>
  376. <if test='null != azcxlcz'>azcxlcz = #{azcxlcz},</if>
  377. <if test='null != azcxdg'>azcxdg = #{azcxdg},</if>
  378. <if test='null != bzzxlcz'>bzzxlcz = #{bzzxlcz},</if>
  379. <if test='null != bzzxdg'>bzzxdg = #{bzzxdg},</if>
  380. <if test='null != bzcxlcz'>bzcxlcz = #{bzcxlcz},</if>
  381. <if test='null != bzcxdg'>bzcxdg = #{bzcxdg},</if>
  382. <if test='null != czzxlcz'>czzxlcz = #{czzxlcz},</if>
  383. <if test='null != czzxdg'>czzxdg = #{czzxdg},</if>
  384. <if test='null != czcxlcz'>czcxlcz = #{czcxlcz},</if>
  385. <if test='null != czcxdg'>czcxdg = #{czcxdg},</if>
  386. <if test='null != sbzt'>sbzt = #{sbzt},</if>
  387. <if test='null != checkUser'>check_user = #{checkUser},</if>
  388. <if test='null != czwt'>czwt = #{czwt},</if>
  389. <if test='null != submitState'>submit_state = #{submitState},</if>
  390. <if test='null != updateBy'>update_by = #{updateBy},</if>
  391. <if test='null != updateTime'>update_time = #{updateTime},</if>
  392. <if test='null != userId'>user_id = #{userId},</if>
  393. <if test='null != delFlag'>del_flag = #{delFlag}</if>
  394. </set>
  395. WHERE id = #{id}
  396. </update>
  397. <select id="getInfo" resultMap="BaseResultMap">
  398. SELECT
  399. <include refid="Base_Column_List"/>
  400. FROM bus_jcb_wjcxc t
  401. LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
  402. WHERE t.del_flag='0' and t.id = #{id}
  403. </select>
  404. <select id="getLastRecord" resultMap="BaseResultMap">
  405. SELECT
  406. a.zxlcz, a.zxdg, a.cxlcz, a.cxdg, a.zxwxjq, a.cxwxjq, a.azzxlcz, a.azzxdg, a.azcxlcz, a.azcxdg,
  407. a.bzzxlcz, a.bzzxdg, a.bzcxlcz, a.bzcxdg,a.czzxlcz, a.czzxdg, a.czcxlcz, a.czcxdg
  408. FROM bus_jcb_wjcxc a,
  409. (
  410. select max(update_time) as lastTime
  411. from bus_jcb_wjcxc
  412. WHERE user_id = #{user_id}
  413. and submit_state != '0'
  414. ) b
  415. WHERE a.update_time = b.lastTime
  416. </select>
  417. <select id="getList" resultMap="BaseResultMap">
  418. SELECT
  419. <include refid="Base_Column_List"/>
  420. FROM bus_jcb_wjcxc t
  421. LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
  422. <where>
  423. t.del_flag='0'
  424. <if test="stationId!=null and stationId!=''">
  425. and v.station_id=#{stationId}
  426. </if>
  427. <if test="pillarCode!=null and pillarCode!=''">
  428. and t.pillar_code=#{pillarCode}
  429. </if>
  430. <if test="xch!=null and xch!=''">
  431. and t.xch=#{xch}
  432. </if>
  433. <if test="temperature!=null and temperature!=''">
  434. and t.temperature=#{temperature}
  435. </if>
  436. <if test="checkDate!=null and checkDate!=''">
  437. and t.check_date=#{checkDate}
  438. </if>
  439. <if test="lbjzt!=null and lbjzt!=''">
  440. and t.lbjzt=#{lbjzt}
  441. </if>
  442. <if test="lbjztGzms!=null and lbjztGzms!=''">
  443. and t.lbjzt_gzms=#{lbjztGzms}
  444. </if>
  445. <if test="zxlcz!=null and zxlcz!=''">
  446. and t.zxlcz=#{zxlcz}
  447. </if>
  448. <if test="zxdg!=null and zxdg!=''">
  449. and t.zxdg=#{zxdg}
  450. </if>
  451. <if test="cxlcz!=null and cxlcz!=''">
  452. and t.cxlcz=#{cxlcz}
  453. </if>
  454. <if test="cxdg!=null and cxdg!=''">
  455. and t.cxdg=#{cxdg}
  456. </if>
  457. <if test="hdxjzt!=null and hdxjzt!=''">
  458. and t.hdxjzt=#{hdxjzt}
  459. </if>
  460. <if test="hdxjztGzms!=null and hdxjztGzms!=''">
  461. and t.hdxjzt_gzms=#{hdxjztGzms}
  462. </if>
  463. <if test="zxwxjq!=null and zxwxjq!=''">
  464. and t.zxwxjq=#{zxwxjq}
  465. </if>
  466. <if test="cxwxjq!=null and cxwxjq!=''">
  467. and t.cxwxjq=#{cxwxjq}
  468. </if>
  469. <if test="dljzt!=null and dljzt!=''">
  470. and t.dljzt=#{dljzt}
  471. </if>
  472. <if test="dljztGzms!=null and dljztGzms!=''">
  473. and t.dljzt_gzms=#{dljztGzms}
  474. </if>
  475. <if test="azzxlcz!=null and azzxlcz!=''">
  476. and t.azzxlcz=#{azzxlcz}
  477. </if>
  478. <if test="azzxdg!=null and azzxdg!=''">
  479. and t.azzxdg=#{azzxdg}
  480. </if>
  481. <if test="azcxlcz!=null and azcxlcz!=''">
  482. and t.azcxlcz=#{azcxlcz}
  483. </if>
  484. <if test="azcxdg!=null and azcxdg!=''">
  485. and t.azcxdg=#{azcxdg}
  486. </if>
  487. <if test="bzzxlcz!=null and bzzxlcz!=''">
  488. and t.bzzxlcz=#{bzzxlcz}
  489. </if>
  490. <if test="bzzxdg!=null and bzzxdg!=''">
  491. and t.bzzxdg=#{bzzxdg}
  492. </if>
  493. <if test="bzcxlcz!=null and bzcxlcz!=''">
  494. and t.bzcxlcz=#{bzcxlcz}
  495. </if>
  496. <if test="bzcxdg!=null and bzcxdg!=''">
  497. and t.bzcxdg=#{bzcxdg}
  498. </if>
  499. <if test="czzxlcz!=null and czzxlcz!=''">
  500. and t.czzxlcz=#{czzxlcz}
  501. </if>
  502. <if test="czzxdg!=null and czzxdg!=''">
  503. and t.czzxdg=#{czzxdg}
  504. </if>
  505. <if test="czcxlcz!=null and czcxlcz!=''">
  506. and t.czcxlcz=#{czcxlcz}
  507. </if>
  508. <if test="czcxdg!=null and czcxdg!=''">
  509. and t.czcxdg=#{czcxdg}
  510. </if>
  511. <if test="sbzt!=null and sbzt!=''">
  512. and t.sbzt=#{sbzt}
  513. </if>
  514. <if test="checkUser!=null and checkUser!=''">
  515. and t.check_user=#{checkUser}
  516. </if>
  517. <if test="czwt!=null and czwt!=''">
  518. and t.czwt=#{czwt}
  519. </if>
  520. <if test="submitState!=null and submitState!=''">
  521. and t.submit_state <![CDATA[ >= ]]> #{submitState}
  522. </if>
  523. <if test="createBy!=null and createBy!=''">
  524. and t.create_by=#{createBy}
  525. </if>
  526. <if test="createTime!=null and createTime!=''">
  527. and t.create_time=#{createTime}
  528. </if>
  529. <if test="updateBy!=null and updateBy!=''">
  530. and t.update_by=#{updateBy}
  531. </if>
  532. <if test="updateTime!=null and updateTime!=''">
  533. and t.update_time=#{updateTime}
  534. </if>
  535. <if test="userId!=null and userId!=''">
  536. and t.user_id=#{userId}
  537. </if>
  538. <if test="delFlag!=null and delFlag!=''">
  539. and t.del_flag=#{delFlag}
  540. </if>
  541. </where>
  542. <if test="orderBy!=null and orderBy!=''">
  543. order by t.${orderBy}
  544. </if>
  545. <if test="isAsc!=null and isAsc!=''">
  546. <if test="isAsc == '1'.toString()">
  547. asc
  548. </if>
  549. <if test="isAsc == '0'.toString()">
  550. desc
  551. </if>
  552. </if>
  553. </select>
  554. <resultMap id="JcabResultMap" type="com.railway.business.catenary.domain.vo.JcebRecordVo">
  555. <result column="dept_name" property="deptName"/>
  556. <result column="station_name" property="stationName"/>
  557. <result column="check_date" property="operationDate"/>
  558. <result column="operator" property="operator"/>
  559. <result column="jcebType" property="jcebType"/>
  560. </resultMap>
  561. <select id="getListByType" resultMap="JcabResultMap">
  562. SELECT v.dept_name, v.station_name, t.check_date, t.operator, #{jcebType} as jcebType
  563. FROM bus_jcb_wjcxc t
  564. LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
  565. <where>
  566. t.del_flag='0'
  567. <if test="stationId!=null and stationId!=''">
  568. and v.station_id=#{stationId}
  569. </if>
  570. <if test="pillarCode!=null and pillarCode!=''">
  571. and t.pillar_code=#{pillarCode}
  572. </if>
  573. <if test="operator!=null and operator!=''">
  574. and t.check_user=#{operator}
  575. </if>
  576. <if test="createBy!=null and createBy!=''">
  577. and t.create_by=#{createBy}
  578. </if>
  579. </where>
  580. </select>
  581. <resultMap id="JcabCountResultMap" type="com.railway.business.catenary.domain.vo.JcebRecordVo">
  582. <result column="c" property="count"/>
  583. <result column="check_date" property="operationDate"/>
  584. </resultMap>
  585. <select id="getCountByType" resultMap="JcabCountResultMap">
  586. SELECT count(*) c, max(t.check_date) as check_date
  587. FROM bus_jcb_wjcxc t
  588. LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
  589. <where>
  590. t.del_flag='0'
  591. <if test="stationId!=null and stationId!=''">
  592. and v.station_id=#{stationId}
  593. </if>
  594. <if test="pillarCode!=null and pillarCode!=''">
  595. and t.pillar_code=#{pillarCode}
  596. </if>
  597. <if test="operator!=null and operator!=''">
  598. and t.check_user=#{operator}
  599. </if>
  600. <if test="createBy!=null and createBy!=''">
  601. and t.create_by=#{createBy}
  602. </if>
  603. </where>
  604. </select>
  605. </mapper>