| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.runzhixing.dao.interf.ThirdInterface">
- <update id="updateWxInfo" parameterType="com.runzhixing.bean.WxInfo">
- update TB_REG_USER set NICKNAME=#{nickName},REGTIME=to_date(#{operTime},'yyyy-mm-dd hh24:mi:ss') where WXID = #{wxId}
- </update>
-
- <update id="insertWxInfo" parameterType="com.runzhixing.bean.WxInfo">
- <!-- insert into TB_REG_USER(WXID,NICKNAME,REGTIME) values (#{wxId},#{nickName},to_date(#{operTime},'yyyy-mm-dd hh24:mi:ss')) -->
-
-
- insert into TB_REG_USER (WXID,NICKNAME,REGTIME)
- select #{wxId},#{nickName},to_date(#{operTime},'yyyy-mm-dd hh24:mi:ss') from dual
- where NOT EXISTS (SELECT WXID FROM TB_REG_USER WHERE WXID= #{wxId})
- </update>
-
-
- <update id="updateRegister" parameterType="com.runzhixing.bean.Register">
-
- update TB_REG_USER set
- <if test="UNITNAME != null">
- UNITNAME=#{UNITNAME},
- </if>
- <if test="UNITAB != null">
- UNITAB=#{UNITAB},
- </if>
- <if test="UNITMANA != null">
- UNITMANA=#{UNITMANA},
- </if>
- <if test="UNITPHONE != null">
- UNITPHONE=#{UNITPHONE},
- </if>
- <if test="USERNAME != null">
- USERNAME=#{USERNAME},
- </if>
- <if test="USCC != null">
- USCC=#{USCC},
- </if>
- <if test="UNITSAFEMANA != null">
- UNITSAFEMANA=#{UNITSAFEMANA},
- </if>
- <if test="UNITSAFEPHONE != null">
- UNITSAFEPHONE=#{UNITSAFEPHONE},
- </if>
- <if test="MOBILE != null">
- MOBILE=#{MOBILE},
- </if>
- <if test="POST != null">
- POST=#{POST},
- </if>
- <if test="ADDR != null">
- ADDR=#{ADDR},
- </if>
- <if test="USERID != null">
- USERID=#{USERID},
- </if>
- <if test="USERTYPE != null">
- USERTYPE=#{USERTYPE},
- </if>
- <if test="EMAIL != null">
- EMAIL=#{EMAIL},
- </if>
- <if test="nickName != null">
- nickName=#{nickName},
- </if>
- <if test="districtNo != null">
- DISTRICTNO=#{districtNo},
- </if>
- REGTIME=to_date(#{REGTIME},'yyyy-mm-dd hh24:mi:ss'),
- WXVERIFY=1,
- REGSTATE=1
- where WXID=#{openid}
-
- <!--
- where WXID=#{openid}
-
-
- update TB_REG_USER set
-
- UNITNAME=#{UNITNAME},
-
- UNITAB=#{UNITAB},
-
- UNITMANA=#{UNITMANA},
-
- UNITPHONE=#{UNITPHONE},
-
- USERNAME=#{USERNAME},
-
- USCC=#{USCC},
-
- UNITSAFEMANA=#{UNITSAFEMANA},
-
- UNITSAFEPHONE=#{UNITSAFEPHONE},
-
- MOBILE=#{MOBILE},
-
- POST=#{POST},
-
- ADDR=#{ADDR},
-
- USERID=#{USERID},
-
- USERTYPE=#{USERTYPE},
-
- EMAIL=#{EMAIL},
-
- nickName=#{nickName},
-
- REGTIME=to_date(#{REGTIME},'yyyy-mm-dd hh24:mi:ss'),
- WXVERIFY=1,
- REGSTATE=1
-
-
-
- where WXID=#{openid}
- -->
- </update>
- <insert id="insertRegister" parameterType="com.runzhixing.bean.Register">
- insert into
- TB_REG_USER(WXID,nickName,UNITNAME,UNITAB,UNITMANA,UNITPHONE,USERNAME,USCC,UNITSAFEMANA,UNITSAFEPHONE,MOBILE,POST,ADDR,USERID,USERTYPE,EMAIL,REGTIME,WXVERIFY,REGSTATE)
- values (#{openid},#{nickName},#{UNITNAME},#{UNITAB},#{UNITMANA},#{UNITPHONE},#{USERNAME},#{USCC},#{UNITSAFEMANA},#{UNITSAFEPHONE},#{MOBILE},#{POST},#{ADDR},#{USERID},#{USERTYPE},#{EMAIL},to_date(#{REGTIME},'yyyy-mm-dd hh24:mi:ss'),1,1)
- </insert>
-
- <resultMap id="province_list" type="com.runzhixing.bean.Provice_new">
- <result column="provinceno" property="id"/>
- <result column="provincename" property="name"/>
- <result column="provinceab" property="ab"/>
- <result column="carprefix1" property="carPrefix"/>
- <collection property="cityList" javaType="java.util.List" resultMap="cityList"/>
- </resultMap>
-
- <resultMap id="cityList" type="com.runzhixing.bean.City_new">
- <result column="cityno" property="id"/>
- <result column="cityname" property="name"/>
- <result column="cityab" property="ab"/>
- <result column="carprefix2" property="carPrefix"/>
-
- <collection property="countryList" javaType="java.util.List" resultMap="countryList"/>
- </resultMap>
-
- <resultMap id="countryList" type="com.runzhixing.bean.Country_new">
- <result column="countyno" property="id"/>
- <result column="countyname" property="name"/>
- <result column="countyab" property="ab"/>
- <result column="carprefix3" property="carPrefix"/>
- </resultMap>
-
- <select id="city_country_inifo" parameterType="String" resultMap="province_list">
- select
- t0.provinceno,t0.provincename,t0.provinceab,t0.carprefix as carprefix1,
- t.cityno,t.cityname,t.cityab,t.carprefix as carprefix2,
- t1.countyno,t1.countyname,t1.countyab,t1.carprefix as carprefix3
- from
- td_province t0
- left join
- td_city t on t.provinceno = t0.provinceno
- left join TD_COUNTY t1 on t1.provinceno = t.provinceno and t1.cityno=t.cityno
- where t.provinceno=#{province} and t.cityno!='00'
- order by t0.provinceno asc,t.cityno asc,t1.countyno asc
- </select>
-
- <resultMap id="wxList" type="com.runzhixing.bean.WxInfo">
- <result column="DISTRICTNO" property="districtNo"/>
- <result column="USER_GUID" property="userGuid"/>
- <result column="WXID" property="wxId"/>
- <result column="nickName" property="nickName"/>
- <result column="UNITNAME" property="UNITNAME"/>
- <result column="UNITAB" property="UNITAB"/>
- <result column="UNITMANA" property="UNITMANA"/>
- <result column="UNITPHONE" property="UNITPHONE"/>
- <result column="USERNAME" property="USERNAME"/>
- <result column="USCC" property="USCC"/>
- <result column="UNITSAFEMANA" property="UNITSAFEMANA"/>
- <result column="UNITSAFEPHONE" property="UNITSAFEPHONE"/>
- <result column="MOBILE" property="MOBILE"/>
- <result column="POST" property="POST"/>
- <result column="ADDR" property="ADDR"/>
- <result column="USERID" property="idNo"/>
- <result column="USERTYPE" property="USERTYPE"/>
- <result column="EMAIL" property="EMAIL"/>
- <result column="REGTIME" property="REGTIME"/>
- </resultMap>
-
- <select id="queryWxInfo" parameterType="com.runzhixing.bean.WxInfo" resultMap="wxList">
- select
- DISTRICTNO,USER_GUID,WXID,nickName,UNITNAME,UNITAB,UNITMANA,UNITPHONE,USERNAME,USCC,UNITSAFEMANA,UNITSAFEPHONE,MOBILE,POST,ADDR,USERID,USERTYPE,EMAIL,REGTIME,WXVERIFY,REGSTATE
- from TB_REG_USER t where t.WXID = #{wxId}
- </select>
-
- <resultMap id="atList" type="com.runzhixing.bean.AppType">
- <result column="PROVINCENO" property="id"/>
- <result column="PROVINCENAME" property="name"/>
- </resultMap>
-
- <select id="getProviceInfo" resultMap="atList">
- select
- PROVINCENO,PROVINCENAME
- from TD_PROVINCE order by PROVINCENO asc
- </select>
-
- <resultMap id="cyImgList" type="com.runzhixing.bean.CylinderImg">
- <result column="CYLINDER_GUID" property="CYLINDER_GUID"/>
- <result column="IMGTYPE" property="IMGTYPE"/>
- <result column="IMGINDEX" property="IMGINDEX"/>
- <result column="FILENAME" property="FILENAME"/>
- <result column="FROMTYPE" property="FROMTYPE"/>
- <result column="OTHEROPERATOR" property="OTHEROPERATOR"/>
- <result column="EDITSTATIONNO" property="EDITSTATIONNO"/>
- <result column="EDITOPERATORNO" property="EDITOPERATORNO"/>
- <result column="EDITOPERTIME" property="EDITOPERTIME"/>
- </resultMap>
-
- <select id="queryCylinderImg" parameterType="String" resultMap="cyImgList">
- select CYLINDER_GUID,IMGTYPE,IMGINDEX,IMGDIR,FILENAME,FROMTYPE,OTHEROPERATOR,EDITSTATIONNO,EDITOPERATORNO,EDITOPERTIME from TB_CYLINDER_IMG where CYLINDER_GUID = #{cylinderGuid}
- </select>
-
- <delete id="deleteCertInfo" parameterType="List">
- delete from TB_CYLINDER_IMG
- where CYLINDER_GUID in
- <foreach collection="list" index="index" item="cylinderW" open="(" separator="," close=")">
- #{cylinderW.cylinderGuid}
- </foreach>
- </delete>
-
- <select id="getCngCarCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="Integer">
- <!-- select count(T1.CAR_GUID) from V_CAR_ALL t1
- join
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE in(0,1,2,3,4) GROUP BY t.CAR_GUID
- )tt on tt.CAR_GUID = t1.CAR_GUID
- where
- t1.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T1.DISTRICTNO LIKE CONCAT(#{authCode},'%') -->
-
- select NVL(count(T1.CAR_GUID) ,0) from V_CAR_ALL t1
- where
- T1.CAR_GUID IN
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE in(0,1,2,3,4)
- )
- and
- t1.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
-
-
- </select>
-
- <select id="getCngCylinderCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="Integer">
- <!-- select count(t.CYLINDER_GUID) from V_CYLINDER_ALL t join V_CAR_ALL t1 on T1.CAR_GUID=t.CAR_GUID
- where
- t.CYLINDERTYPE in (0,1,2,3,4)
- and
- T1.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T1.DISTRICTNO LIKE CONCAT(#{authCode},'%') -->
- select NVL(sum(T1.installNum) ,0) from V_CAR_ALL t1
- where
- T1.CAR_GUID IN
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE in(0,1,2,3,4)
- )
- and
- t1.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- </select>
-
- <select id="getCngCarCylinderCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="com.runzhixing.bean.ReportFormBean">
- select count(T1.CAR_GUID) as cngCarCount, sum(T1.installNum) as cngCylinderCount from V_CAR_ALL t1
- where
- T1.CAR_GUID IN
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE in(0,1,2,3,4)
- )
- and
- t1.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- </select>
-
-
-
- <select id="getLngCarCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="Integer">
- <!-- select count(T1.CAR_GUID) from V_CAR_ALL t1
- join
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE = 5 GROUP BY t.CAR_GUID
- )tt on tt.CAR_GUID = T1.CAR_GUID
- where
- T1.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T1.DISTRICTNO LIKE CONCAT(#{authCode},'%') -->
-
- select NVL(count(T1.CAR_GUID) ,0) from V_CAR_ALL t1
- where
- T1.CAR_GUID IN
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE = 5
- )
- and
- t1.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- </select>
- <select id="getLngCngCylinderCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="com.runzhixing.bean.ReportFormBean">
- select count(T1.CAR_GUID) as lngCarCount, sum(T1.installNum) as lngCylinderCount from V_CAR_ALL t1
- where
- T1.CAR_GUID IN
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE = 5
- )
- and
- t1.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- </select>
-
- <select id="getLngCylinderCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="Integer">
- <!-- select count(t.CYLINDER_GUID) from V_CYLINDER_ALL t join V_CAR_ALL t1 on T1.CAR_GUID=t.CAR_GUID
- where
- t.CYLINDERTYPE = 5
- and T1.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and T1.CARSTATE=0
- and
- T1.DISTRICTNO LIKE CONCAT(#{authCode},'%') -->
- select NVL(sum(T1.installNum) ,0) from V_CAR_ALL t1
- where
- T1.CAR_GUID IN
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE = 5
- )
- and
- t1.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- </select>
-
-
- <select id="getCngCarCylinderInuseCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="com.runzhixing.bean.ReportFormBean">
- select count(T1.CAR_GUID) as cngCarInuseCount,sum(T1.installNum) as cngCylinderInuseCount from V_CAR_ALL t1
- where
- T1.CAR_GUID in
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE in(0,1,2,3,4)
- )
- and
- T1.CAR_GUID in
- (
- select t.CAR_GUID from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- </select>
-
- <select id="getLngCarCylinderInuseCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="com.runzhixing.bean.ReportFormBean">
- select count(T1.CAR_GUID) as cngCarInuseCount,sum(T1.installNum) as cngCylinderInuseCount from V_CAR_ALL t1
- where
- T1.CAR_GUID in
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE = 5
- )
- and
- T1.CAR_GUID in
- (
- select t.CAR_GUID from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- </select>
-
-
- <select id="getCngCarInuseCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="Integer">
- <!-- select count(T1.CAR_GUID) from V_CAR_ALL t1
- join
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE in(0,1,2,3,4) GROUP BY t.CAR_GUID
- )tt on tt.CAR_GUID = T1.CAR_GUID
- join
- (
- select t.CAR_GUID from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- GROUP BY t.CAR_GUID
- )tt1 on tt1.CAR_GUID = T1.CAR_GUID
- where
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%') -->
-
- select NVL(count(T1.CAR_GUID) ,0) from V_CAR_ALL t1
-
- where
- T1.CAR_GUID in
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE in(0,1,2,3,4)
- )
- and
- T1.CAR_GUID in
- (
- select t.CAR_GUID from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- </select>
-
- <select id="getCngCylinderInuseCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="Integer">
- <!-- select count(t.CYLINDER_GUID) from V_CYLINDER_ALL t join V_CAR_ALL t1 on T1.CAR_GUID=t.CAR_GUID
- join
- (
- select t.CAR_GUID from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- GROUP BY t.CAR_GUID
- )tt on tt.CAR_GUID = T1.CAR_GUID
- where
- t.CYLINDERTYPE in (0,1,2,3,4)
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%') -->
- select NVL(sum(T1.installNum) ,0) from V_CAR_ALL t1
-
- where
- T1.CAR_GUID in
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE in(0,1,2,3,4)
- )
- and
- T1.CAR_GUID in
- (
- select t.CAR_GUID from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
-
- </select>
-
- <select id="getLngCarInuseCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="Integer">
- <!-- select count(T1.CAR_GUID) from V_CAR_ALL t1
- join
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE =5 GROUP BY t.CAR_GUID
- )tt on tt.CAR_GUID = T1.CAR_GUID
- join
- (
- select t.CAR_GUID from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- GROUP BY t.CAR_GUID
- )tt1 on tt1.CAR_GUID = T1.CAR_GUID
- where
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%') -->
- select NVL(count(T1.CAR_GUID) ,0) from V_CAR_ALL t1
-
- where
- T1.CAR_GUID in
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE = 5
- )
- and
- T1.CAR_GUID in
- (
- select t.CAR_GUID from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
-
- </select>
-
- <select id="getLngCylinderInuseCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="Integer">
- <!-- select count(t.CYLINDER_GUID) from V_CYLINDER_ALL t join V_CAR_ALL t1 on T1.CAR_GUID=t.CAR_GUID
- join
- (
- select t.CAR_GUID from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- GROUP BY t.CAR_GUID
- )tt on tt.CAR_GUID = T1.CAR_GUID
- where
- t.CYLINDERTYPE =5
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%') -->
-
- select NVL(sum(T1.installNum) ,0) from V_CAR_ALL t1
-
- where
- T1.CAR_GUID in
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE = 5
- )
- and
- T1.CAR_GUID in
- (
- select t.CAR_GUID from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- </select>
-
- <select id="getRegisterRefitPlantCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="Integer">
- select count(t.STATIONNO) from v_station t where t.STATIONTYPE=3 and t.STATIONNO LIKE CONCAT(#{authCode},'%')
- </select>
-
- <select id="getRegisterInspectionStationCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="Integer">
- select count(t.STATIONNO) from v_station t where t.STATIONTYPE=1 and t.STATIONNO LIKE CONCAT(#{authCode},'%')
- </select>
-
- <select id="getRegisterGasStationCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="Integer">
- select count(t.STATIONNO) from v_station t where t.STATIONTYPE=2 and t.STATIONNO LIKE CONCAT(#{authCode},'%')
- </select>
-
- <resultMap id="rfbList" type="com.runzhixing.bean.ReportFormBean">
- <result column="REGTIME" property="regTime"/>
- <result column="count" property="count"/>
- </resultMap>
-
- <select id="getTrendCngCarLsit" parameterType="com.runzhixing.bean.ReportFormBean" resultMap="rfbList">
- <!-- select T1.REGTIME,count(T1.REGTIME) as count from V_CAR_ALL t1
- join
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE in(0,1,2,3,4) GROUP BY t.CAR_GUID
- )tt on tt.CAR_GUID = T1.CAR_GUID
- where
- (
- T1.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T1.REGTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- GROUP BY T1.REGTIME -->
-
- select to_char(T.REGTIME,'yyyy-mm') as REGTIME,count(*) as count from V_CAR_ALL t
- where
- t.car_guid in
- (
- select CAR_GUID from v_cylinder_all where CYLINDERTYPE in(0,1,2,3,4)
- )
- and
- (
- T.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T.REGTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
- and
- t.DISTRICTNO LIKE CONCAT(#{authCode},'%')
-
- GROUP BY to_char(T.REGTIME,'yyyy-mm')
- ORDER BY REGTIME
- </select>
-
- <select id="getTrendCngCylinderLsit" parameterType="com.runzhixing.bean.ReportFormBean" resultMap="rfbList">
- <!-- select T1.REGTIME,count(T1.REGTIME) as count from V_CYLINDER_ALL t join V_CAR_ALL t1 on T1.CAR_GUID=t.CAR_GUID
- where
- t.CYLINDERTYPE in (0,1,2,3,4)
- and (
- T1.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T1.REGTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
- and T1.CARSTATE=0
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- GROUP BY T1.REGTIME -->
- select to_char(T.REGTIME,'yyyy-mm') as REGTIME,sum(t.installNum) as count from V_CAR_ALL t
- where
- t.car_guid in
- (
- select CAR_GUID from v_cylinder_all where CYLINDERTYPE in(0,1,2,3,4)
- )
- and
- (
- T.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T.REGTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
- and
- t.DISTRICTNO LIKE CONCAT(#{authCode},'%')
-
- GROUP BY to_char(T.REGTIME,'yyyy-mm')
- ORDER BY REGTIME
- </select>
-
- <select id="getTrendLngCarLsit" parameterType="com.runzhixing.bean.ReportFormBean" resultMap="rfbList">
- <!-- select T1.REGTIME,count(T1.REGTIME) as count from V_CAR_ALL t1
- join
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE =5 GROUP BY t.CAR_GUID
- ) tt on tt.CAR_GUID = T1.CAR_GUID
- where
- (
- T1.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T1.REGTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
-
- GROUP BY T1.REGTIME -->
-
-
- select to_char(T.REGTIME,'yyyy-mm') as REGTIME,count(*) as count from V_CAR_ALL t
- where
- t.car_guid in
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE =5
- )
- and
- (
- T.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T.REGTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
- and
- t.DISTRICTNO LIKE CONCAT(#{authCode},'%')
-
- GROUP BY to_char(T.REGTIME,'yyyy-mm')
- ORDER BY REGTIME
- </select>
-
- <select id="getTrendLngCylinderLsit" parameterType="com.runzhixing.bean.ReportFormBean" resultMap="rfbList">
- <!-- select T1.REGTIME,count(T1.REGTIME) as count from V_CYLINDER_ALL t join V_CAR_ALL t1 on T1.CAR_GUID=t.CAR_GUID
- where
- t.CYLINDERTYPE =5
- and (
- T1.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T1.REGTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
- and T1.CARSTATE=0
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- GROUP BY T1.REGTIME -->
-
- select to_char(T.REGTIME,'yyyy-mm') as REGTIME,sum(t.installNum) as count from V_CAR_ALL t
- where
- t.car_guid in
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE =5
- )
- and
- (
- T.REGTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- T.REGTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
- and
- t.DISTRICTNO LIKE CONCAT(#{authCode},'%')
-
- GROUP BY to_char(T.REGTIME,'yyyy-mm')
- ORDER BY REGTIME
-
- </select>
-
- <resultMap id="inUseCngCarList" type="com.runzhixing.bean.ReportFormBean">
- <result column="CAR_GUID" property="carGuid"/>
- <result column="FILLTIME" property="fillTime"/>
- </resultMap>
-
- <select id="getTrendInUseCngCarLsit" parameterType="com.runzhixing.bean.ReportFormBean" resultMap="inUseCngCarList">
- <!-- select tt1.CAR_GUID,tt1.FILLTIME from V_CAR_ALL t1
- join
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE in(0,1,2,3,4) GROUP BY t.CAR_GUID
- )tt on tt.CAR_GUID=T1.CAR_GUID
- join
- (
- select t.CAR_GUID,t.FILLTIME from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- GROUP BY t.CAR_GUID,t.FILLTIME
- )tt1 on tt1.CAR_GUID = T1.CAR_GUID
- where
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- GROUP BY tt1.CAR_GUID,tt1.FILLTIME
- ORDER BY tt1.FILLTIME,tt1.CAR_GUID -->
-
-
- select count(*) as CAR_GUID from V_CAR_ALL t1
-
- where
- t1.car_guid in
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE in(0,1,2,3,4)
- )
-
-
- and t1.car_guid in
- (
- select t.CAR_GUID from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
-
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- </select>
-
- <select id="getTrendInUseLngCarLsit" parameterType="com.runzhixing.bean.ReportFormBean" resultMap="inUseCngCarList">
- <!-- select tt1.CAR_GUID,tt1.FILLTIME from V_CAR_ALL t1
- join
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE =5 GROUP BY t.CAR_GUID
- )tt on tt.CAR_GUID=T1.CAR_GUID
- join
- (
- select t.CAR_GUID,t.FILLTIME from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- GROUP BY t.CAR_GUID,t.FILLTIME
- )tt1 on tt1.CAR_GUID = T1.CAR_GUID
- where
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- GROUP BY tt1.CAR_GUID,tt1.FILLTIME
- ORDER BY tt1.FILLTIME,tt1.CAR_GUID -->
- select count(*) as CAR_GUID from V_CAR_ALL t1
-
- where
- t1.car_guid in
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE = 5
- )
-
-
- and t1.car_guid in
- (
- select t.CAR_GUID from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
-
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- </select>
-
- <resultMap id="inUseCngCylinderLsit" type="com.runzhixing.bean.ReportFormBean">
- <result column="cylinder_Guid" property="cylinderGuid"/>
- <result column="FILLTIME" property="fillTime"/>
- </resultMap>
-
- <select id="getTrendInUseCngCylinderLsit" parameterType="com.runzhixing.bean.ReportFormBean" resultMap="inUseCngCylinderLsit">
- <!-- select t.cylinder_Guid,tt1.FILLTIME FROM V_CYLINDER_ALL t join
- V_CAR_ALL t1 on t1.CAR_GUID = t.CAR_GUID
- join
- (
- select t.CAR_GUID,t.FILLTIME from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- GROUP BY t.CAR_GUID,t.FILLTIME
- ) tt1 on tt1.CAR_GUID = T1.CAR_GUID
- where t.CYLINDERTYPE in (0,1,2,3,4)
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- GROUP BY t.cylinder_Guid,tt1.FILLTIME
- ORDER BY t.cylinder_Guid,tt1.FILLTIME -->
-
- select sum(t1.installNum) as cylinder_Guid from V_CAR_ALL t1
-
- where
- t1.car_guid in
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE in(0,1,2,3,4)
- )
-
-
- and t1.car_guid in
- (
- select t.CAR_GUID from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
-
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- </select>
-
- <select id="getTrendInUseLngCylinderLsit" parameterType="com.runzhixing.bean.ReportFormBean" resultMap="inUseCngCylinderLsit">
- <!-- select t.cylinder_Guid,tt1.FILLTIME FROM V_CYLINDER_ALL t join
- V_CAR_ALL t1 on t1.CAR_GUID = t.CAR_GUID
- join
- (
- select t.CAR_GUID,t.FILLTIME from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- GROUP BY t.CAR_GUID,t.FILLTIME
- ) tt1 on tt1.CAR_GUID = T1.CAR_GUID
- where t.CYLINDERTYPE =5
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- GROUP BY t.cylinder_Guid,tt1.FILLTIME
- ORDER BY t.cylinder_Guid,tt1.FILLTIME -->
- select sum(t1.installNum) as cylinder_Guid from V_CAR_ALL t1
-
- where
- t1.car_guid in
- (
- select t.CAR_GUID from v_cylinder_all t where t.CYLINDERTYPE = 5
- )
-
-
- and t1.car_guid in
- (
- select t.CAR_GUID from tb_guidfillinfo t where
- t.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- t.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- )
-
- and
- t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
- </select>
-
- <resultMap id="gasStationNetworkInfoLsit" type="com.runzhixing.bean.ReportFormBean">
- <result column="stationname" property="stationName"/>
- <result column="connectDay" property="connectDay"/>
- </resultMap>
-
- <select id="getGasStationNetworkInfo" parameterType="com.runzhixing.bean.ReportFormBean" resultMap="gasStationNetworkInfoLsit">
-
- select stationname,
- (select count(STATIONNO) from (select t.STATIONNO from tb_CNGMACHINE_SUM t where t.SUMDATE <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd') and t.SUMDATE <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd') group by t.STATIONNO,t.SUMDATE) where STATIONNO=tt.STATIONNO) as connectDay
- from tb_cngstation tt
- where tt.STATIONNO like CONCAT(#{authCode},'%')
- order by connectDay desc ,stationname asc
- </select>
-
- <select id="getCheckedCylinderCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="Integer">
- select count(t.CYLINDER_GUID) from TB_CYLINDER t where
- t.CAR_GUID IN
- (
- select CAR_GUID from TB_CAR where DISTRICTNO like CONCAT(#{authCode},'%')
- )
- and
- t.NEXTCHECKDATE <![CDATA[ >= ]]> to_date(#{nowDate},'yyyy-mm-dd')
- </select>
-
- <select id="getNotCheckCylinderCount" parameterType="com.runzhixing.bean.ReportFormBean" resultType="Integer">
- select count(t.CYLINDER_GUID) from TB_CYLINDER t
- where t.NEXTCHECKDATE <![CDATA[ < ]]> to_date(#{endDate},'yyyy-mm-dd') and t.NEXTCHECKDATE <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
- and t.CAR_GUID IN
- (
- select CAR_GUID from TB_CAR where DISTRICTNO like CONCAT(#{authCode},'%')
- )
- AND
- t.CAR_GUID IN
- (
- select t1.CAR_GUID from tb_guidfillinfo t1 where
- t1.FILLTIME <![CDATA[ <= ]]> to_date(#{endDate},'yyyy-mm-dd')
- and
- t1.FILLTIME <![CDATA[ >= ]]> to_date(#{startDate},'yyyy-mm-dd')
-
- )
- </select>
-
- <select id="getAuthRegionName2" parameterType="String" resultType="String">
- select t.provincename from td_province t where t.provinceno=#{auth}
- </select>
- <select id="getAuthRegionName4" parameterType="String" resultType="String">
- select CONCAT(t.provincename,t1.CITYNAME) from td_province t join td_city t1 on t1.provinceno = t.provinceno
-
- where t1.provinceno=substr(#{auth},1,2) and t1.cityno = substr(#{auth},3,2)
- </select>
-
- <select id="getAuthRegionName6" parameterType="String" resultType="String">
- select concat(CONCAT(t.provincename,t1.CITYNAME),t2.countyname) from td_province t join td_city t1 on t1.provinceno = t.provinceno
- join TD_COUNTY t2 on t2.provinceno=t1.provinceno and t2.cityno=t1.cityno
- where t2.provinceno= substr(#{auth},1,2) and t2.cityno = substr(#{auth},3,2) and t2.countyno = substr(#{auth},5,2)
- </select>
-
- <delete id="remove_img" parameterType="com.runzhixing.bean.CylinderImg">
- <!-- delete from TB_CYLINDER_IMG where FILENAME = #{FILENAME} and OTHEROPERATOR=#{userGuid} -->
- delete from TB_CYLINDER_IMG where FILENAME = #{FILENAME} and OTHEROPERATOR=#{userGuid} and CYLINDER_GUID in (select CYLINDER_GUID from TB_CYLINDER where OPERSTATE in (0,6) )
- </delete>
-
- <update id="updateCar_userGuid" parameterType="com.runzhixing.bean.BindCar">
- update TB_CAR set USER_GUID=#{userGuid} where car_guid = #{carGuid}
- </update>
-
- <resultMap id="apiList" type="com.runzhixing.bean.TPAPI">
- <result column="DISTNO" property="DISTNO"/>
- <result column="APIKEY" property="APIKEY"/>
- </resultMap>
-
- <select id="getAPIStationNo" parameterType="com.runzhixing.bean.TPAPI" resultMap="apiList">
- select t.DISTNO,t.APIKEY from TP_API t where t.USERNAME=#{USERNAME} and t.PWD=#{PWD} and t.STATE=#{STATE}
- </select>
-
- </mapper>
|