getRegion.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  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. <!-- 结果集 -->
  19. <resultMap id="regionList" type="com.runzhixing.bean.AuthorityRegionPlace">
  20. <result column="ID" property="id"/>
  21. <result column="NAME" property="name"/>
  22. <result column="PLACEAB" property="placeAB"/>
  23. <result column="CARPREFIX" property="carprefix"/>
  24. </resultMap>
  25. <resultMap id="cityList" type="com.runzhixing.bean.CityPlace">
  26. <result property="cprovinceNo" column="CPROVINCENO"/>
  27. <result property="id" column="CID"/>
  28. <result property="name" column="CNAME"/>
  29. <result property="placeab" column="CPLACEAB"/>
  30. <result property="carPrefix" column="CCARPREFIX"/>
  31. <result property="areaCode" column="CAREACODE"/>
  32. </resultMap>
  33. <resultMap id="countryList" type="com.runzhixing.bean.CountryPlace">
  34. <result property="provinceNO" column="YPROVINCENO"/>
  35. <result property="cityNO" column="YCITYNO"/>
  36. <result property="name" column="YNAME"/>
  37. <result property="id" column="YID"/>
  38. <result property="placeAB" column="YPLACEAB"/>
  39. </resultMap>
  40. <!-- 查询指定加气站时,需要级联查询该加气站的所有信息(加气机列表、工作人员列表和加气站传输信息) -->
  41. <resultMap id="stationALL" type="com.runzhixing.bean.Station">
  42. <result property="id" column="STATIONNO"/>
  43. <result property="name" column="STATIONNAME"/>
  44. <result property="placeAB" column="STATIONAB"/>
  45. <result property="licence" column="LICENCE"/>
  46. <result property="licenceOrg" column="LICENCEORG"/>
  47. <result property="licenceDate1" column="LICENCEDATE"/>
  48. <result property="validity1" column="VALIDITY"/>
  49. <result property="stationAddr" column="STATIONADDR"/>
  50. <result property="manager" column="MANAGER"/>
  51. <result property="techManager" column="TECHMANA"/>
  52. <result property="phone" column="PHONE"/>
  53. <result property="mobile" column="MOBILE"/>
  54. <result property="fax" column="FAX"/>
  55. <result property="addr" column="ADDR"/>
  56. <result property="post" column="POST"/>
  57. <result property="remark" column="REMARK"/>
  58. </resultMap>
  59. <resultMap id="machineMap" type="com.runzhixing.bean.Machine">
  60. <result property="stationNo" column="stationno"/>
  61. <result property="machineNo" column="machineno"/>
  62. <result property="type" column="type"/>
  63. <result property="manu" column="manu"/>
  64. <result property="gunNum" column="gunnum"/>
  65. <result property="opType" column="optype"/>
  66. <result property="state" column="state"/>
  67. <result property="gundir" column="gundir"/>
  68. </resultMap>
  69. <resultMap id="resultMap" type="com.runzhixing.bean.CNGOperator">
  70. <result property="stationNo" column="stationno"/>
  71. <result property="operatorNo" column="operatorno"/>
  72. <result property="name" column="name"/>
  73. <result property="idNo" column="idno"/>
  74. <result property="licence" column="licence"/>
  75. <result property="licenceOrg" column="licenceorg"/>
  76. <result property="licenceDate" column="licencedate"/>
  77. <result property="validity" column="validity"/>
  78. <result property="sex" column="sex"/>
  79. <result property="profileno" column="profileno"/>
  80. </resultMap>
  81. <resultMap id="dataMap" type="com.runzhixing.bean.CNGdata">
  82. <result property="stationNo" column="stationno"/>
  83. <result property="machineNo" column="machineno"/>
  84. <result property="gunNo" column="gunno"/>
  85. <result property="operatorNo" column="operatorno"/>
  86. <result property="state" column="state"/>
  87. <result property="operTime1" column="opertime"/>
  88. <result property="endTime" column="endtime"/>
  89. <result property="carNo" column="carno"/>
  90. <result property="appType" column="apptype"/>
  91. <result property="turnOverType" column="turnovertype"/>
  92. <result property="plateType" column="platetype" />
  93. </resultMap>
  94. <resultMap id="worktimeMap" type="com.runzhixing.bean.WorkTimeBean">
  95. <result property="starttime" column="starttime"/>
  96. <result property="endtime" column="endtime"/>
  97. </resultMap>
  98. <resultMap id="OperatorMap" type="com.runzhixing.bean.CNGOperator1">
  99. <result property="stationNo" column="stationno"/>
  100. <result property="operatorNo" column="operatorno"/>
  101. <result property="name" column="name"/>
  102. <result property="idNo" column="idno"/>
  103. <result property="licence" column="licence"/>
  104. <result property="licenceOrg" column="licenceorg"/>
  105. <result property="licenceDate" column="licencedate"/>
  106. <result property="validity" column="validity"/>
  107. <result property="sex" column="sex"/>
  108. <result property="profileno" column="profileno"/>
  109. </resultMap>
  110. <resultMap type="com.runzhixing.bean.DynamicattemptMap" id="dynamicattemptMap">
  111. <result property="tmstationno" column="tmstationno"/>
  112. <result property="tmmachineno" column="tmmachineno"/>
  113. <result property="tmtype" column="tmtype"/>
  114. <result property="tmmanu" column="tmmanu"/>
  115. <result property="tmgunnum" column="tmgunnum"/>
  116. <result property="tmoptype" column="tmoptype"/>
  117. <result property="tmstate" column="tmstate"/>
  118. <result property="tmgundir" column="tmgundir"/>
  119. <result property="media" column="media"/>
  120. <collection property="tbcngstationdyn" javaType="java.util.List" resultMap="tbcngstationdyn"/>
  121. </resultMap>
  122. <resultMap type="com.runzhixing.bean.DynamicattemptMap1" id="tbcngstationdyn">
  123. <result property="tsdstationno" column="tsdstationno"/>
  124. <result property="tsdmachineno" column="tsdmachineno"/>
  125. <result property="tsdgunno" column="tsdgunno"/>
  126. <result property="tsdoperatorno" column="tsdoperatorno"/>
  127. <result property="tsdstate" column="tsdstate"/>
  128. <result property="tsdopertime" column="tsdopertime"/>
  129. <result property="tsdendtime" column="tsdendtime"/>
  130. <result property="tsdcarno" column="tsdcarno"/>
  131. <result property="tsdapptype" column="tsdapptype"/>
  132. <result property="tsdturnovertype" column="tsdturnovertype"/>
  133. <result property="tsdplatetype" column="tsdplatetype" />
  134. <collection property="tbcngoperatorduty" javaType="java.util.List" resultMap="tbcngoperatorduty"/>
  135. </resultMap>
  136. <resultMap type="com.runzhixing.bean.DynamicattemptMap2" id="tbcngoperatorduty">
  137. <result property="todstarttime" column="todstarttime"/>
  138. <result property="todendtime" column="todendtime"/>
  139. <collection property="tbcngoperator" javaType="java.util.List" resultMap="tbcngoperator"/>
  140. </resultMap>
  141. <resultMap type="com.runzhixing.bean.DynamicattemptMap3" id="tbcngoperator">
  142. <result property="tostationno" column="tostationno"/>
  143. <result property="tooperatorno" column="tooperatorno"/>
  144. <result property="toname" column="toname"/>
  145. <result property="toidno" column="toidno"/>
  146. <result property="tolicence" column="tolicence"/>
  147. <result property="tolicenceorg" column="tolicenceorg"/>
  148. <result property="tolicencedate" column="tolicencedate"/>
  149. <result property="tovalidity" column="tovalidity"/>
  150. <result property="tosex" column="tosex"/>
  151. </resultMap>
  152. <select id="getDynamicattempt" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="dynamicattemptMap">
  153. select
  154. tm.STATIONNO as TMSTATIONNO,
  155. tm.MACHINENO as TMMACHINENO,
  156. tm.TYPE as TMTYPE,
  157. tm.MANU as TMMANU,
  158. tm.GUNNUM as TMGUNNUM,
  159. tm.OPTYPE as TMOPTYPE,
  160. tm.STATE as TMSTATE,
  161. tm.GUNDIR as TMGUNDIR,
  162. tm.MEDIA,
  163. tsd.STATIONNO as TSDSTATIONNO,
  164. tsd.MACHINENO as TSDMACHINENO,
  165. tsd.GUNNO as TSDGUNNO,
  166. tsd.OPERATORNO as TSDOPERATORNO,
  167. tsd.STATE as TSDSTATE,
  168. tsd.OPERTIME as TSDOPERTIME,
  169. tsd.ENDTIME as TSDENDTIME,
  170. tsd.CARNO as TSDCARNO,
  171. tsd.APPTYPE as TSDAPPTYPE,
  172. tsd.TURNOVERTYPE as TSDTURNOVERTYPE,
  173. tsd.PLATETYPE as TSDPLATETYPE,
  174. tod.STARTTIME as TODSTARTTIME,
  175. tod.ENDTIME as TODENDTIME,
  176. top.STATIONNO as TOSTATION,
  177. top.OPERATORNO as TOOPERATORNO,
  178. top.NAME as TONAME,
  179. top.IDNO as TOIDNO,
  180. top.LICENCE as TOLICENCE,
  181. top.LICENCEORG as TOLICENCEORG,
  182. top.LICENCEDATE as TOLICENCEDATE,
  183. top.VALIDITY as TOVALIDITY,
  184. top.SEX as TOSEX
  185. from tb_cngmachine tm
  186. LEFT JOIN
  187. tb_cngstation_dyn tsd
  188. on
  189. tsd.STATIONNO = tm.STATIONNO
  190. and
  191. tsd.MACHINENO = tm.MACHINENO
  192. left JOIN
  193. tb_cngoperator_duty tod
  194. on
  195. tod.STATIONNO = tsd.STATIONNO
  196. and
  197. tod.MACHINENO = tsd.MACHINENO
  198. and
  199. tod.GUNNO = tsd.GUNNO
  200. and
  201. tod.OPERATORNO = tsd.OPERATORNO
  202. left JOIN
  203. tb_cngoperator top
  204. on
  205. top.OPERATORNO = tsd.OPERATORNO
  206. where tm.STATIONNO = #{cpstring1}
  207. </select>
  208. <!-- sql配置文件 开始-->
  209. <!-- 只知道省id,查询省市县,sql配置文件 开始-->
  210. <!-- 根据省id查询省名 -->
  211. <!-- <select id="getProvinceList" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="regionList">
  212. select
  213. t.PROVINCENO as ID,
  214. t.PROVINCENAME as NAME,
  215. t.PROVINCEAB as PLACEAB,
  216. t.CARPREFIX as CARPREFIX
  217. from TD_PROVINCE t
  218. <where>
  219. <if test="cpstring1 != null and !&quot;&quot;.equals(cpstring1.trim())">
  220. and t.PROVINCENO = #{cpstring1}
  221. </if>
  222. </where>
  223. </select>
  224. -->
  225. <select id="getProvinceList" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="regionList">
  226. select
  227. t.PROVINCENO as ID,
  228. t.PROVINCENAME as NAME,
  229. t.PROVINCEAB as PLACEAB,
  230. t.CARPREFIX as CARPREFIX
  231. from TD_PROVINCE t
  232. <where>
  233. <if test="cpstring1 != null and !&quot;&quot;.equals(cpstring1.trim())">
  234. and t.PROVINCENO = #{cpstring1}
  235. </if>
  236. </where>
  237. </select>
  238. <resultMap id="privilegeList" type="com.runzhixing.bean.AuthorityRegionPlace">
  239. <result column="ID" property="id"/>
  240. <result column="NAME" property="name"/>
  241. <result column="PLACEAB" property="placeAB"/>
  242. <result column="CARPREFIX" property="carprefix"/>
  243. <collection property="cityPlace" javaType="java.util.List" resultMap="cityResult"/>
  244. </resultMap>
  245. <resultMap id="cityResult" type="com.runzhixing.bean.CityPlace">
  246. <result property="cprovinceNo" column="CPROVINCENO"/>
  247. <result property="id" column="CID"/>
  248. <result property="name" column="CNAME"/>
  249. <result property="placeab" column="CPLACEAB"/>
  250. <result property="carPrefix" column="CCARPREFIX"/>
  251. <result property="areaCode" column="CAREACODE"/>
  252. <collection property="subPlaceList" javaType="java.util.List" resultMap="countryResult"/>
  253. </resultMap>
  254. <resultMap id="countryResult" type="com.runzhixing.bean.CountryPlace">
  255. <result property="provinceNO" column="YPROVINCENO"/>
  256. <result property="cityNO" column="YCITYNO"/>
  257. <result property="name" column="YNAME"/>
  258. <result property="id" column="YID"/>
  259. <result property="placeAB" column="YPLACEAB"/>
  260. <collection property="staion" javaType="java.util.List" resultMap="staionResult"/>
  261. </resultMap>
  262. <resultMap id="staionResult" type="com.runzhixing.bean.Station">
  263. <result property="id" column="STATIONNO"/>
  264. <result property="name" column="STATIONNAME"/>
  265. <result property="placeAB" column="STATIONAB"/>
  266. <result property="licence" column="LICENCE"/>
  267. <result property="licenceOrg" column="LICENCEORG"/>
  268. <result property="licenceDate1" column="LICENCEDATE"/>
  269. <result property="validity1" column="VALIDITY"/>
  270. <result property="stationAddr" column="STATIONADDR"/>
  271. <result property="manager" column="MANAGER"/>
  272. <result property="techManager" column="TECHMANA"/>
  273. <result property="phone" column="PHONE"/>
  274. <result property="mobile" column="MOBILE"/>
  275. <result property="fax" column="FAX"/>
  276. <result property="addr" column="ADDR"/>
  277. <result property="post" column="POST"/>
  278. <result property="remark" column="REMARK"/>
  279. </resultMap>
  280. <!-- 权限信息为2个长度 -->
  281. <select id="getPrivilege" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="privilegeList">
  282. select
  283. tp.PROVINCENO as ID,
  284. tp.PROVINCENAME as NAME,
  285. tp.PROVINCEAB as PLACEAB,
  286. tp.CARPREFIX as CARPREFIX,
  287. tc.PROVINCENO as CPROVINCENO,
  288. tc.CITYNO as CID,
  289. tc.CITYNAME as CNAME,
  290. tc.CITYAB as CPLACEAB,
  291. tc.CARPREFIX as CCARPREFIX,
  292. tc.AREACODE as CAREACODE,
  293. tu.PROVINCENO as YPROVINCENO,
  294. tu.CITYNO as YCITYNO,
  295. tu.COUNTYNAME as YNAME,
  296. tu.COUNTYNO as YID,
  297. tu.COUNTYAB as YPLACEAB
  298. <!--
  299. ts.STATIONNO,
  300. ts.STATIONNAME,
  301. ts.STATIONAB,
  302. ts.LICENCE,
  303. ts.LICENCEORG,
  304. ts.LICENCEDATE,
  305. ts.VALIDITY,
  306. ts.STATIONADDR,
  307. ts.MANAGER,
  308. ts.TECHMANA,
  309. ts.PHONE,
  310. ts.MOBILE,
  311. ts.FAX,
  312. ts.ADDR,
  313. ts.POST,
  314. ts.REMARK
  315. -->
  316. FROM TD_PROVINCE tp
  317. left join TD_CITY tc on tc.PROVINCENO = tp.PROVINCENO
  318. join TD_COUNTY tu on tu.PROVINCENO= tc.PROVINCENO and tu.CITYNO = tc.CITYNO
  319. <!--join tb_cngstation ts on ts.STATIONNO like '' || #{cpstring1}+tc.CITYNO+tu.COUNTYNO || '%' -->
  320. where tp.PROVINCENO = #{cpstring1}
  321. </select>
  322. <!-- 权限信息为4个长度 -->
  323. <select id="getPrivilege4" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="privilegeList">
  324. select
  325. tp.PROVINCENO as ID,
  326. tp.PROVINCENAME as NAME,
  327. tp.PROVINCEAB as PLACEAB,
  328. tp.CARPREFIX as CARPREFIX,
  329. tc.PROVINCENO as CPROVINCENO,
  330. tc.CITYNO as CID,
  331. tc.CITYNAME as CNAME,
  332. tc.CITYAB as CPLACEAB,
  333. tc.CARPREFIX as CCARPREFIX,
  334. tc.AREACODE as CAREACODE,
  335. tu.PROVINCENO as YPROVINCENO,
  336. tu.CITYNO as YCITYNO,
  337. tu.COUNTYNAME as YNAME,
  338. tu.COUNTYNO as YID,
  339. tu.COUNTYAB as YPLACEAB
  340. FROM TD_PROVINCE tp
  341. left join TD_CITY tc on tc.PROVINCENO = tp.PROVINCENO
  342. join TD_COUNTY tu on tu.PROVINCENO= tc.PROVINCENO and tu.CITYNO = tc.CITYNO
  343. where tp.PROVINCENO = #{cpstring1} and tc.CITYNO = #{cpstring2}
  344. </select>
  345. <!-- 权限信息为6个长度 -->
  346. <select id="getPrivilege6" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="privilegeList">
  347. select
  348. tp.PROVINCENO as ID,
  349. tp.PROVINCENAME as NAME,
  350. tp.PROVINCEAB as PLACEAB,
  351. tp.CARPREFIX as CARPREFIX,
  352. tc.PROVINCENO as CPROVINCENO,
  353. tc.CITYNO as CID,
  354. tc.CITYNAME as CNAME,
  355. tc.CITYAB as CPLACEAB,
  356. tc.CARPREFIX as CCARPREFIX,
  357. tc.AREACODE as CAREACODE,
  358. tu.PROVINCENO as YPROVINCENO,
  359. tu.CITYNO as YCITYNO,
  360. tu.COUNTYNAME as YNAME,
  361. tu.COUNTYNO as YID,
  362. tu.COUNTYAB as YPLACEAB
  363. FROM TD_PROVINCE tp
  364. left join TD_CITY tc on tc.PROVINCENO = tp.PROVINCENO
  365. join TD_COUNTY tu on tu.PROVINCENO= tc.PROVINCENO and tu.CITYNO = tc.CITYNO
  366. where tp.PROVINCENO = #{cpstring1} and tc.CITYNO = #{cpstring2} and tu.COUNTYNO = #{cpstring3}
  367. </select>
  368. <!-- 根据省id查询所有市名 -->
  369. <select id="getCityListByPid" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="cityList">
  370. select
  371. c.PROVINCENO as CPROVINCENO,
  372. c.CITYNO as CID,
  373. c.CITYNAME as CNAME,
  374. c.CITYAB as CPLACEAB,
  375. c.CARPREFIX as CCARPREFIX,
  376. c.AREACODE as CAREACODE
  377. from TD_CITY c
  378. <where>
  379. <if test="cpstring1 != null and !&quot;&quot;.equals(cpstring1.trim())">
  380. and c.PROVINCENO = #{cpstring1}
  381. </if>
  382. order by c.CITYNO
  383. </where>
  384. </select>
  385. <!-- 根据省id查询所有市名 -->
  386. <select id="getCityListByPCityid" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="cityList">
  387. select
  388. c.PROVINCENO as CPROVINCENO,
  389. c.CITYNO as CID,
  390. c.CITYNAME as CNAME,
  391. c.CITYAB as CPLACEAB,
  392. c.CARPREFIX as CCARPREFIX,
  393. c.AREACODE as CAREACODE
  394. from TD_CITY c
  395. <where>
  396. <if test="cpstring1 != null and !&quot;&quot;.equals(cpstring1.trim())">
  397. and c.PROVINCENO = #{cpstring1}
  398. </if>
  399. <if test="cpstring2 != null and !&quot;&quot;.equals(cpstring2.trim())">
  400. and c.CITYNO = #{cpstring2}
  401. </if>
  402. order by c.CITYNO
  403. </where>
  404. </select>
  405. <!-- 只知道省id,查询省市县,sql配置文件结束 -->
  406. <!-- 知道省id,市id,查询省市县,sql配置文件开始 -->
  407. <select id="getCountryListbyPCid" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="countryList">
  408. select
  409. u.PROVINCENO as YPROVINCENO,
  410. u.CITYNO as YCITYNO,
  411. u.COUNTYNAME as YNAME,
  412. u.COUNTYNO as YID,
  413. u.COUNTYAB as YPLACEAB
  414. from TD_COUNTY u
  415. <where>
  416. <if test="cpstring1 != null and !&quot;&quot;.equals(cpstring1.trim())">
  417. and u.PROVINCENO = #{cpstring1}
  418. </if>
  419. <if test="cpstring2 != null and !&quot;&quot;.equals(cpstring2.trim())">
  420. and u.CITYNO = #{cpstring2}
  421. </if>
  422. order by u.PROVINCENO,u.CITYNO,u.COUNTYNO
  423. </where>
  424. </select>
  425. <!-- 知道省id,市id,查询省市县,sql配置文件结束 -->
  426. <!-- 知道省id,市id,县id查询省市县,sql配置文件开始 -->
  427. <!-- 知道省id,市id,县id查询省市县,sql配置文件结束 -->
  428. <!-- 查询List -->
  429. <select id="getCNGStationList" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="stationALL">
  430. select
  431. t.STATIONNO,
  432. t.STATIONNAME,
  433. t.STATIONAB,
  434. t.LICENCE,
  435. t.LICENCEORG,
  436. t.LICENCEDATE,
  437. t.VALIDITY,
  438. t.STATIONADDR,
  439. t.MANAGER,
  440. t.TECHMANA,
  441. t.PHONE,
  442. t.MOBILE,
  443. t.FAX,
  444. t.ADDR,
  445. t.POST,
  446. t.REMARK
  447. from tb_cngstation t
  448. <where>
  449. <if test="1==1">
  450. and t.stationno like '' || #{cpstring3} || '%'
  451. </if>
  452. </where>
  453. </select>
  454. <select id="getCNGMachineListByStationId" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="machineMap">
  455. select
  456. t.stationno,
  457. t.machineno,
  458. t.type,
  459. t.manu,
  460. t.gunnum,
  461. t.optype,
  462. t.state,
  463. t.gundir
  464. from tb_cngmachine t
  465. <where>
  466. <if test="1==1">
  467. and t.STATIONNO = #{cpstring1}
  468. </if>
  469. </where>
  470. </select>
  471. <select id="getOperatorListByStationId" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="resultMap">
  472. select
  473. t.stationno,
  474. t.operatorno,
  475. t.name,
  476. t.idno,
  477. t.licence,
  478. t.licenceorg,
  479. t.licencedate,
  480. t.validity,
  481. t.sex,
  482. t.profileno
  483. from tb_cngoperator t
  484. <where>
  485. <if test="1==1">
  486. and t.STATIONNO = #{cpstring1}
  487. </if>
  488. </where>
  489. </select>
  490. <!-- CNGMachine.xml 级联查询 -->
  491. <select id="getMachineDynaDataList_Inner" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="dataMap">
  492. select
  493. t.stationno,
  494. t.machineno,
  495. t.gunno,
  496. t.operatorno,
  497. t.state,
  498. t.opertime,
  499. t.endtime,
  500. t.carno,
  501. t.apptype,
  502. t.turnovertype,
  503. t.platetype
  504. from tb_cngstation_dyn t
  505. <where>
  506. <if test="1==1">
  507. and t.stationno = #{cpstring1}
  508. </if>
  509. <if test="1==1">
  510. and t.machineno = #{cpstring2}
  511. </if>
  512. order by t.OPERTIME DESC
  513. </where>
  514. </select>
  515. <!-- tb_cngoperator_duty -->
  516. <select id="getWorkTime" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="worktimeMap">
  517. select
  518. t.starttime,
  519. t.endtime
  520. from tb_cngoperator_duty t
  521. <where>
  522. <if test="1==1">
  523. and t.stationno = #{cpstring1}
  524. </if>
  525. <if test="1==1">
  526. and t.machineno = #{cpstring2}
  527. </if>
  528. <if test="1==1">
  529. and t.gunno = #{cpstring3}
  530. </if>
  531. <if test="1==1">
  532. and t.operatorno = #{cpstring4}
  533. </if>
  534. order by t.STARTTIME DESC
  535. </where>
  536. </select>
  537. <!-- 查询(从CNGOperator.xml)这只加气枪的操作人员信息(动态数据) -->
  538. <select id="getOperatorById1" parameterType="com.runzhixing.util.bean.ConditionParameter" resultMap="OperatorMap">
  539. select
  540. t.stationno,
  541. t.operatorno,
  542. t.name,
  543. t.idno,
  544. t.licence,
  545. t.licenceorg,
  546. t.licencedate,
  547. t.validity,
  548. t.sex,
  549. t.profileno
  550. from tb_cngoperator t
  551. <where>
  552. <if test="1==1">
  553. and t.operatorno = #{cpstring1}
  554. </if>
  555. </where>
  556. </select>
  557. <!-- sql配置文件结束 -->
  558. </mapper>