CheckStation.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--
  3. Copyright 2009-2012 the original author or authors.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. -->
  14. <!DOCTYPE mapper
  15. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  16. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  17. <mapper namespace="com.runzhixing.dao.interf.AuthorityRegionInterface">
  18. <select id="getImgPath" parameterType="String" resultType="String">
  19. select t.PARAMVALUE from TB_PARAM t where t.PARAMID=#{paramID}
  20. </select>
  21. <update id="updateWxLogin" parameterType="com.runzhixing.bean.WXLOGIN">
  22. update TB_REG_USER set
  23. nickname=#{nickname} where WXID=#{openid}
  24. </update>
  25. <select id="getStationNo" parameterType="String" resultType="String">
  26. select t.stationno from v_operator_all t where t.operatorno=#{userOperatorNo}
  27. </select>
  28. <select id="getPreCarNo" parameterType="String" resultType="String">
  29. select t.CITYAB from TD_CITY t where concat(t.provinceno,t.cityno)=#{districtNo}
  30. </select>
  31. <update id="register" parameterType="com.runzhixing.bean.Register">
  32. update TB_REG_USER set
  33. DISTRICTNO=#{districtNo},
  34. UNITNAME=#{UNITNAME},
  35. UNITAB=#{UNITAB},
  36. UNITMANA=#{UNITMANA},
  37. UNITPHONE=#{UNITPHONE},
  38. USERNAME=#{USERNAME},
  39. USCC=#{USCC},
  40. UNITSAFEMANA=#{UNITSAFEMANA},
  41. UNITSAFEPHONE=#{UNITSAFEPHONE},
  42. MOBILE=#{MOBILE},
  43. POST=#{POST},
  44. ADDR=#{ADDR},
  45. USERID=#{USERID},
  46. USERTYPE=#{USERTYPE},
  47. EMAIL=#{EMAIL},
  48. REGTIME=to_date(#{REGTIME},'yyyy-mm-dd hh24:mi:ss'),
  49. WXVERIFY=1,
  50. REGSTATE=1
  51. where WXID=#{openid}
  52. </update>
  53. <update id="examineCar" parameterType="com.runzhixing.bean.Car">
  54. update tb_car set OPERSTATE = #{operState},AUDITSTATIONNO=#{auditStationNo},AUDITOPERATORNO=#{auditOperatorNo},AUDITOPERTIME=to_date(#{auditOperTime1},'yyyy-mm-dd hh24:mi:ss') where car_guid=#{carGuid}
  55. </update>
  56. <insert id="insertImgInfo" parameterType="com.runzhixing.bean.CylinderImg">
  57. <!--
  58. insert into TB_CYLINDER_IMG(CYLINDER_GUID,IMGTYPE,IMGINDEX,IMGDIR,FILENAME,FROMTYPE,EDITOPERTIME,OTHEROPERATOR)
  59. values
  60. (#{CYLINDER_GUID},#{IMGTYPE},#{IMGINDEX},#{IMGDIR},#{FILENAME},#{FROMTYPE},to_date(#{EDITOPERTIME},'yyyy-mm-dd hh24:mi:ss'),#{userGuid})
  61. -->
  62. <!-- INSERT INTO TB_CYLINDER_IMG
  63. (IMGINDEX,CYLINDER_GUID,IMGTYPE)
  64. SELECT '202020',CYLINDER_GUID,12
  65. FROM TB_CYLINDER_IMG where rownum=1 and CYLINDER_GUID='2EF95B3B855F4FF49BA351AFD0981C79' -->
  66. insert into TB_CYLINDER_IMG
  67. (CYLINDER_GUID,IMGTYPE,IMGINDEX,IMGDIR,FILENAME,FROMTYPE,EDITOPERTIME,OTHEROPERATOR)
  68. SELECT CYLINDER_GUID,#{IMGTYPE},#{IMGINDEX},#{IMGDIR},#{FILENAME},#{FROMTYPE},to_date(#{EDITOPERTIME},'yyyy-mm-dd hh24:mi:ss'),#{userGuid}
  69. FROM TB_CYLINDER where rownum=1 and CYLINDER_GUID=#{CYLINDER_GUID}
  70. </insert>
  71. <update id="updateImgInfo" parameterType="com.runzhixing.bean.CylinderImg">
  72. update TB_CYLINDER_IMG
  73. set
  74. IMGDIR=#{IMGDIR},FILENAME=#{FILENAME},FROMTYPE=#{FROMTYPE},EDITOPERTIME=to_date(#{EDITOPERTIME},'yyyy-mm-dd hh24:mi:ss'),OTHEROPERATOR=#{userGuid}
  75. where
  76. CYLINDER_GUID=#{CYLINDER_GUID} and IMGTYPE=#{IMGTYPE} and IMGINDEX=#{IMGINDEX}
  77. and CYLINDER_GUID in (SELECT t.CYLINDER_GUID from TB_CYLINDER t where t.CYLINDER_GUID=#{CYLINDER_GUID} )
  78. </update>
  79. <resultMap id="CylinderProductList" type="com.runzhixing.bean.CityPlace">
  80. <result column="productno" property="id"/>
  81. <result column="productab" property="name"/>
  82. </resultMap>
  83. <select id="getCylinderProduct" resultMap="CylinderProductList">
  84. select t.productno,t.productab from tb_cylinderproduct t order by t.productab asc
  85. </select>
  86. <delete id="deleteCar" parameterType="String">
  87. delete from tb_car t where t.CAR_GUID=#{carGuid}
  88. </delete>
  89. <delete id="deleteCylinder" parameterType="String">
  90. delete from tb_cylinder t where t.CAR_GUID=#{carGuid}
  91. </delete>
  92. <resultMap id="countryList123" type="com.runzhixing.bean.CountryPlace">
  93. <result column="countyno" property="id"/>
  94. <result column="countyname" property="name"/>
  95. </resultMap>
  96. <select id="getCounty123" parameterType="com.runzhixing.bean.CountryPlace" resultMap="countryList123">
  97. select t.countyno,t.countyname from td_county t
  98. <where>
  99. <if test="provinceNO!=null">
  100. and t.provinceno=#{provinceNO}
  101. </if>
  102. <if test="cityNO!=null">
  103. and t.cityno=#{cityNO}
  104. </if>
  105. <if test="id!=null">
  106. and t.countyno=#{id}
  107. </if>
  108. </where>
  109. </select>
  110. <resultMap id="cityList123" type="com.runzhixing.bean.CityPlace">
  111. <result column="cityno" property="id"/>
  112. <result column="cityname" property="name"/>
  113. </resultMap>
  114. <select id="getCity" parameterType="com.runzhixing.bean.CityPlace" resultMap="cityList123">
  115. select t.cityno,t.cityname from td_city t
  116. <where>
  117. <if test="cprovinceNo!=null">
  118. and t.provinceno=#{cprovinceNo}
  119. </if>
  120. <if test="id!=null">
  121. and t.cityno=#{id}
  122. </if>
  123. </where>
  124. </select>
  125. <insert id="insertWXLogin" parameterType="com.runzhixing.bean.WXLOGIN">
  126. insert into TB_REG_USER(WXID,REGTIME,NICKNAME) values(#{openid},to_date(#{registertime},'yyyy-mm-dd hh24:mi:ss'),#{nickname})
  127. </insert>
  128. <select id="firstWXLogin" parameterType="String" resultType="Integer">
  129. select count(t.WXID) from TB_REG_USER t where t.WXID=#{openid}
  130. </select>
  131. <select id="WXRigster" parameterType="String" resultType="String">
  132. select t.DISTRICTNO from TB_REG_USER t where t.WXID=#{openid}
  133. </select>
  134. <select id="WXRigster1" parameterType="String" resultType="com.runzhixing.bean.Register">
  135. select t.USER_GUID as userGuid,t.UNITNAME,t.UNITAB,t.UNITMANA,t.UNITPHONE,t.USCC,t.UNITSAFEMANA,t.UNITSAFEPHONE,t.USERNAME,t.MOBILE,t.POST,t.ADDR,t.USERID,t.EMAIL,t.REGTIME,t.USERTYPE from TB_REG_USER t where t.WXID=#{openid}
  136. </select>
  137. <resultMap id="valveList" type="com.runzhixing.bean.Valve">
  138. <result column="CYLINDER_GUID" property="CYLINDER_GUID"/>
  139. <result column="CAR_GUID" property="CAR_GUID"/>
  140. <result column="STATIONNO" property="STATIONNO"/>
  141. <result column="OTHERSTATION" property="OTHERSTATION"/>
  142. <result column="VALVEPRODUCT" property="VALVEPRODUCT"/>
  143. <result column="VALVETYPE" property="VALVETYPE"/>
  144. <result column="VALVEBATCH" property="VALVEBATCH"/>
  145. <result column="OPERDATE" property="OPERDATE"/>
  146. <result column="OPERTYPE" property="OPERTYPE"/>
  147. <result column="REMARK" property="REMARK"/>
  148. </resultMap>
  149. <select id="getValveHistory" parameterType="com.runzhixing.bean.Valve" resultMap="valveList">
  150. select t.CYLINDER_GUID,t.CAR_GUID,t.STATIONNO,t.OTHERSTATION,t.VALVEPRODUCT,t.VALVETYPE,t.VALVEBATCH,t.OPERDATE,t.OPERTYPE,t.REMARK from TB_VALVE_TRACK t
  151. where t.CYLINDER_GUID=#{CYLINDER_GUID} order by t.OPERDATE DESC
  152. </select>
  153. <resultMap id="CylinderImgList" type="com.runzhixing.bean.CylinderImg">
  154. <result column="CYLINDER_GUID" property="CYLINDER_GUID"/>
  155. <result column="IMGTYPE" property="IMGTYPE"/>
  156. <result column="IMGINDEX" property="IMGINDEX"/>
  157. <result column="IMGDIR" property="IMGDIR"/>
  158. <result column="FILENAME" property="FILENAME"/>
  159. <result column="FROMTYPE" property="FROMTYPE"/>
  160. <result column="OTHEROPERATOR" property="OTHEROPERATOR"/>
  161. <result column="EDITSTATIONNO" property="EDITSTATIONNO"/>
  162. <result column="EDITOPERATORNO" property="EDITOPERATORNO"/>
  163. <result column="EDITOPERTIME" property="EDITOPERTIME"/>
  164. </resultMap>
  165. <select id="getCylinderImg" parameterType="com.runzhixing.bean.CylinderImg" resultMap="CylinderImgList">
  166. select t.CYLINDER_GUID,t.IMGTYPE,t.IMGINDEX,t.IMGDIR,t.FILENAME,t.FROMTYPE,t.OTHEROPERATOR,t.EDITSTATIONNO,t.EDITOPERATORNO,t.EDITOPERTIME from TB_CYLINDER_IMG t
  167. where t.CYLINDER_GUID=#{CYLINDER_GUID} order by t.IMGTYPE ASC,t.IMGINDEX ASC
  168. </select>
  169. <resultMap id="CylinderTypeList" type="com.runzhixing.bean.CylinderType">
  170. <result column="TYPE" property="TYPE"/>
  171. <result column="DETAIL" property="DETAIL"/>
  172. <result column="CYLINDERAB" property="CYLINDERAB"/>
  173. </resultMap>
  174. <select id="getCylinderType" resultMap="CylinderTypeList">
  175. select t.TYPE,t.DETAIL,t.CYLINDERAB from td_cylindertype t
  176. </select>
  177. <resultMap id="ProductTypeList" type="com.runzhixing.bean.ProductType">
  178. <result column="PRODUCTNO" property="PRODUCTNO"/>
  179. <result column="PRODUCTAB" property="PRODUCTAB"/>
  180. <result column="PRODUCTNAME" property="PRODUCTNAME"/>
  181. <result column="PRODUCTADDR" property="PRODUCTADDR"/>
  182. <result column="LICENCE" property="LICENCE"/>
  183. </resultMap>
  184. <select id="getProductType" resultMap="ProductTypeList">
  185. select t.PRODUCTNO,t.PRODUCTAB,t.PRODUCTNAME,t.PRODUCTADDR,t.LICENCE from TB_CYLINDERPRODUCT t
  186. </select>
  187. <resultMap id="CarList" type="com.runzhixing.bean.Car">
  188. <result column="WEIGHT" property="weight"/>
  189. </resultMap>
  190. <select id="getCar" parameterType="com.runzhixing.bean.Car" resultMap="CarList">
  191. select t.WEIGHT from tb_car t
  192. <where>
  193. <if test="carNo != null and !&quot;&quot;.equals(carNo.trim())">
  194. and t.CARNO like CONCAT('%',#{carNo},'%')
  195. </if>
  196. <if test="regNo != null and !&quot;&quot;.equals(regNo.trim())">
  197. and t.REGNO like CONCAT('%',#{carNo},'%')
  198. </if>
  199. </where>
  200. </select>
  201. <!-- 结果集 -->
  202. <resultMap id="stationMap" type="com.runzhixing.bean.CheckStation">
  203. <result property="id" column="STATIONNO"/>
  204. <result property="name" column="STATIONNAME"/>
  205. <result property="licence" column="LICENCE"/>
  206. <result property="licenceOrg" column="LICENCEORG"/>
  207. <result property="licenceDate1" column="LICENCEDATE"/>
  208. <result property="validity1" column="VALIDITY"/>
  209. <result property="manager" column="MANAGER"/>
  210. <result property="phone" column="PHONE"/>
  211. <result property="mobile" column="MOBILE"/>
  212. <result property="fax" column="FAX"/>
  213. <result property="addr" column="ADDR"/>
  214. <result property="post" column="POST"/>
  215. <result property="remark" column="REMARK"/>
  216. </resultMap>
  217. <!-- sql配置文件 -->
  218. <!-- 查询指定检验站-->
  219. <select id="getCheckStationByNo" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="stationMap">
  220. select
  221. STATIONNO,
  222. STATIONNAME,
  223. LICENCE,
  224. LICENCEORG,
  225. LICENCEDATE,
  226. VALIDITY,
  227. ADDR,
  228. MANAGER,
  229. PHONE,
  230. MOBILE,
  231. FAX,
  232. ADDR,
  233. POST,
  234. REMARK
  235. from tb_checkstation t
  236. <where>
  237. <if test="1==1">
  238. and t.stationno like '%' || #{cpstring1} || '%'
  239. </if>
  240. </where>
  241. </select>
  242. <update id="updateMachine" parameterType="com.runzhixing.bean.Machine">
  243. update TB_CNGMACHINE set WORKSTATE=#{state} where STATIONNO=#{stationNo} and MACHINENO=#{machineNo}
  244. </update>
  245. <update id="updateFillCheckOper" parameterType="com.runzhixing.bean.Machine">
  246. update TB_CNGMACHINE set FILLCHECKNO1=#{fillCheckNo1},FILLCHECKNO2=#{fillCheckNo2} where STATIONNO=#{stationNo} and MACHINENO=#{machineNo}
  247. </update>
  248. <select id="getFillCheckOper2" parameterType="String" resultType="com.runzhixing.bean.Machine">
  249. select t.stationNo,t.machineNo,t.FILLCHECKNO2 from TB_CNGMACHINE t
  250. where t.stationNo = #{stationNo}
  251. </select>
  252. <!-- 新注册/注销的cng车辆数量 -->
  253. <select id="getCarNum" parameterType="com.runzhixing.bean.CarCyNumStatictis" resultType="com.runzhixing.bean.CarCyNumStatictis">
  254. <!-- select t.operState,count(t.CAR_GUID) as carNum from TB_CAR t
  255. <where>
  256. (
  257. t.operState = 0
  258. <if test="startTime != null and !&quot;&quot;.equals(startTime.trim())">
  259. and t.regTime <![CDATA[ >= ]]> to_date(#{startTime},'yyyy-mm-dd')
  260. </if>
  261. <if test="endTime != null and !&quot;&quot;.equals(endTime.trim())">
  262. and t.regTime <![CDATA[ <= ]]> to_date(#{endTime},'yyyy-mm-dd')
  263. </if>
  264. )
  265. or
  266. (
  267. t.operState = 41
  268. <if test="startTime != null and !&quot;&quot;.equals(startTime.trim())">
  269. and t.EDITOPERTIME <![CDATA[ >= ]]> to_date(#{startTime},'yyyy-mm-dd')
  270. </if>
  271. <if test="endTime != null and !&quot;&quot;.equals(endTime.trim())">
  272. and t.EDITOPERTIME <![CDATA[ <= ]]> to_date(#{endTime},'yyyy-mm-dd')
  273. </if>
  274. )
  275. </where>
  276. GROUP BY t.OPERSTATE -->
  277. select
  278. t.operState,count(t.CAR_GUID) as carNum,sum(t.INSTALLNUM) as cyNum
  279. from V_CAR_ALL t
  280. join (select t1.CAR_GUID from V_CYLINDER_ALL t1 where t1.CYLINDERTYPE in (0,1,2,3,4) GROUP BY t1.CAR_GUID) temp on TEMP.CAR_GUID = t.CAR_GUID
  281. <where>
  282. (
  283. t.operState = 0
  284. <if test="startTime != null and !&quot;&quot;.equals(startTime.trim())">
  285. and t.regTime <![CDATA[ >= ]]> to_date(#{startTime},'yyyy-mm-dd')
  286. </if>
  287. <if test="endTime != null and !&quot;&quot;.equals(endTime.trim())">
  288. and t.regTime <![CDATA[ <= ]]> to_date(#{endTime},'yyyy-mm-dd')
  289. </if>
  290. )
  291. or
  292. (
  293. t.operState = 41
  294. <if test="startTime != null and !&quot;&quot;.equals(startTime.trim())">
  295. and t.EDITOPERTIME <![CDATA[ >= ]]> to_date(#{startTime},'yyyy-mm-dd')
  296. </if>
  297. <if test="endTime != null and !&quot;&quot;.equals(endTime.trim())">
  298. and t.EDITOPERTIME <![CDATA[ <= ]]> to_date(#{endTime},'yyyy-mm-dd')
  299. </if>
  300. )
  301. </where>
  302. GROUP BY t.OPERSTATE
  303. </select>
  304. <!-- 新注册/注销的lng车辆数量 -->
  305. <select id="getCarNum1" parameterType="com.runzhixing.bean.CarCyNumStatictis" resultType="com.runzhixing.bean.CarCyNumStatictis">
  306. select
  307. t.operState,count(t.CAR_GUID) as carNum,sum(t.INSTALLNUM) as cyNum
  308. from V_CAR_ALL t
  309. join (select t1.CAR_GUID from V_CYLINDER_ALL t1 where t1.CYLINDERTYPE = 5 GROUP BY t1.CAR_GUID) temp on TEMP.CAR_GUID = t.CAR_GUID
  310. <where>
  311. (
  312. t.operState = 0
  313. <if test="startTime != null and !&quot;&quot;.equals(startTime.trim())">
  314. and t.regTime <![CDATA[ >= ]]> to_date(#{startTime},'yyyy-mm-dd')
  315. </if>
  316. <if test="endTime != null and !&quot;&quot;.equals(endTime.trim())">
  317. and t.regTime <![CDATA[ <= ]]> to_date(#{endTime},'yyyy-mm-dd')
  318. </if>
  319. )
  320. or
  321. (
  322. t.operState = 41
  323. <if test="startTime != null and !&quot;&quot;.equals(startTime.trim())">
  324. and t.EDITOPERTIME <![CDATA[ >= ]]> to_date(#{startTime},'yyyy-mm-dd')
  325. </if>
  326. <if test="endTime != null and !&quot;&quot;.equals(endTime.trim())">
  327. and t.EDITOPERTIME <![CDATA[ <= ]]> to_date(#{endTime},'yyyy-mm-dd')
  328. </if>
  329. )
  330. </where>
  331. GROUP BY t.OPERSTATE
  332. </select>
  333. <!-- 新注册/注销的cng气瓶数量 -->
  334. <select id="getCyNum" parameterType="com.runzhixing.bean.CarCyNumStatictis" resultType="com.runzhixing.bean.CarCyNumStatictis">
  335. <!-- select t1.operState,count(t1.CAR_GUID) as cyNum from v_cylinder_all t1 join TB_CAR t on t.CAR_GUID = t1.CAR_GUID
  336. <where>
  337. (
  338. t1.operState = 0
  339. <if test="startTime != null and !&quot;&quot;.equals(startTime.trim())">
  340. and t.regTime <![CDATA[ >= ]]> to_date(#{startTime},'yyyy-mm-dd')
  341. </if>
  342. <if test="endTime != null and !&quot;&quot;.equals(endTime.trim())">
  343. and t.regTime <![CDATA[ <= ]]> to_date(#{endTime},'yyyy-mm-dd')
  344. </if>
  345. )
  346. or
  347. (
  348. t1.operState = 41
  349. <if test="startTime != null and !&quot;&quot;.equals(startTime.trim())">
  350. and t.EDITOPERTIME <![CDATA[ >= ]]> to_date(#{startTime},'yyyy-mm-dd')
  351. </if>
  352. <if test="endTime != null and !&quot;&quot;.equals(endTime.trim())">
  353. and t.EDITOPERTIME <![CDATA[ <= ]]> to_date(#{endTime},'yyyy-mm-dd')
  354. </if>
  355. )
  356. </where>
  357. GROUP BY t1.OPERSTATE -->
  358. select t.operState,sum(t.INSTALLNUM) as cyNum from TB_CAR t
  359. join (select t1.CAR_GUID from V_CYLINDER_ALL t1 where t1.CYLINDERTYPE in (0,1,2,3,4) GROUP BY t1.CAR_GUID) temp on TEMP.CAR_GUID = t.CAR_GUID
  360. <where>
  361. (
  362. t.operState = 0
  363. <if test="startTime != null and !&quot;&quot;.equals(startTime.trim())">
  364. and t.regTime <![CDATA[ >= ]]> to_date(#{startTime},'yyyy-mm-dd')
  365. </if>
  366. <if test="endTime != null and !&quot;&quot;.equals(endTime.trim())">
  367. and t.regTime <![CDATA[ <= ]]> to_date(#{endTime},'yyyy-mm-dd')
  368. </if>
  369. )
  370. or
  371. (
  372. t.operState = 41
  373. <if test="startTime != null and !&quot;&quot;.equals(startTime.trim())">
  374. and t.EDITOPERTIME <![CDATA[ >= ]]> to_date(#{startTime},'yyyy-mm-dd')
  375. </if>
  376. <if test="endTime != null and !&quot;&quot;.equals(endTime.trim())">
  377. and t.EDITOPERTIME <![CDATA[ <= ]]> to_date(#{endTime},'yyyy-mm-dd')
  378. </if>
  379. )
  380. </where>
  381. GROUP BY t.OPERSTATE
  382. </select>
  383. <!-- 新注册/注销的lng气瓶数量 -->
  384. <select id="getCyNum1" parameterType="com.runzhixing.bean.CarCyNumStatictis" resultType="com.runzhixing.bean.CarCyNumStatictis">
  385. select t.operState,sum(t.INSTALLNUM) as cyNum from TB_CAR t
  386. join (select t1.CAR_GUID from V_CYLINDER_ALL t1 where t1.CYLINDERTYPE = 5 GROUP BY t1.CAR_GUID) temp on TEMP.CAR_GUID = t.CAR_GUID
  387. <where>
  388. (
  389. t.operState = 0
  390. <if test="startTime != null and !&quot;&quot;.equals(startTime.trim())">
  391. and t.regTime <![CDATA[ >= ]]> to_date(#{startTime},'yyyy-mm-dd')
  392. </if>
  393. <if test="endTime != null and !&quot;&quot;.equals(endTime.trim())">
  394. and t.regTime <![CDATA[ <= ]]> to_date(#{endTime},'yyyy-mm-dd')
  395. </if>
  396. )
  397. or
  398. (
  399. t.operState = 41
  400. <if test="startTime != null and !&quot;&quot;.equals(startTime.trim())">
  401. and t.EDITOPERTIME <![CDATA[ >= ]]> to_date(#{startTime},'yyyy-mm-dd')
  402. </if>
  403. <if test="endTime != null and !&quot;&quot;.equals(endTime.trim())">
  404. and t.EDITOPERTIME <![CDATA[ <= ]]> to_date(#{endTime},'yyyy-mm-dd')
  405. </if>
  406. )
  407. </where>
  408. GROUP BY t.OPERSTATE
  409. </select>
  410. <select id="getStationInfos" parameterType="String" resultType="com.runzhixing.bean.Station">
  411. select t.media,count(t.media) as count from tb_cngstation t where
  412. t.MEDIA is not null
  413. and
  414. t.STATIONNO like CONCAT(#{distNo},'%')
  415. GROUP BY t.MEDIA
  416. order by t.media
  417. </select>
  418. <select id="getMachineInfos" parameterType="String" resultType="com.runzhixing.bean.Station">
  419. select t.media,count(t.media) as count from TB_CNGMACHINE t where
  420. t.MEDIA is not null
  421. and
  422. t.STATIONNO like CONCAT(#{distNo},'%')
  423. GROUP BY t.MEDIA
  424. order by t.media
  425. </select>
  426. </mapper>