update TB_REG_USER set NICKNAME=#{nickName},REGTIME=to_date(#{operTime},'yyyy-mm-dd hh24:mi:ss') where WXID = #{wxId}
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 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},
DISTRICTNO=#{districtNo},
REGTIME=to_date(#{REGTIME},'yyyy-mm-dd hh24:mi:ss'),
WXVERIFY=1,
REGSTATE=1
where WXID=#{openid}
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)
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
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
PROVINCENO,PROVINCENAME
from TD_PROVINCE order by PROVINCENO asc
select CYLINDER_GUID,IMGTYPE,IMGINDEX,IMGDIR,FILENAME,FROMTYPE,OTHEROPERATOR,EDITSTATIONNO,EDITOPERATORNO,EDITOPERTIME from TB_CYLINDER_IMG where CYLINDER_GUID = #{cylinderGuid}
delete from TB_CYLINDER_IMG
where CYLINDER_GUID in
#{cylinderW.cylinderGuid}
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 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 to_date(#{endDate},'yyyy-mm-dd')
and
T1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
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 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 to_date(#{endDate},'yyyy-mm-dd')
and
T1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
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 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 = 5
)
and
t1.REGTIME to_date(#{endDate},'yyyy-mm-dd')
and
T1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
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 to_date(#{endDate},'yyyy-mm-dd')
and t.FILLTIME = ]]> to_date(#{startDate},'yyyy-mm-dd')
)
and
t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
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 to_date(#{endDate},'yyyy-mm-dd')
and t.FILLTIME = ]]> to_date(#{startDate},'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.CAR_GUID in
(
select t.CAR_GUID from tb_guidfillinfo t where
t.FILLTIME to_date(#{endDate},'yyyy-mm-dd')
and t.FILLTIME = ]]> to_date(#{startDate},'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.CAR_GUID in
(
select t.CAR_GUID from tb_guidfillinfo t where
t.FILLTIME to_date(#{endDate},'yyyy-mm-dd')
and t.FILLTIME = ]]> to_date(#{startDate},'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.CAR_GUID in
(
select t.CAR_GUID from tb_guidfillinfo t where
t.FILLTIME to_date(#{endDate},'yyyy-mm-dd')
and t.FILLTIME = ]]> to_date(#{startDate},'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 = 5
)
and
T1.CAR_GUID in
(
select t.CAR_GUID from tb_guidfillinfo t where
t.FILLTIME to_date(#{endDate},'yyyy-mm-dd')
and t.FILLTIME = ]]> to_date(#{startDate},'yyyy-mm-dd')
)
and
t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
select count(t.STATIONNO) from v_station t where t.STATIONTYPE=3 and t.STATIONNO LIKE CONCAT(#{authCode},'%')
select count(t.STATIONNO) from v_station t where t.STATIONTYPE=1 and t.STATIONNO LIKE CONCAT(#{authCode},'%')
select count(t.STATIONNO) from v_station t where t.STATIONTYPE=2 and t.STATIONNO LIKE CONCAT(#{authCode},'%')
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 to_date(#{endDate},'yyyy-mm-dd')
and
T.REGTIME = ]]> to_date(#{startDate},'yyyy-mm-dd')
)
and
t.DISTRICTNO LIKE CONCAT(#{authCode},'%')
GROUP BY to_char(T.REGTIME,'yyyy-mm')
ORDER BY 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 to_date(#{endDate},'yyyy-mm-dd')
and
T.REGTIME = ]]> to_date(#{startDate},'yyyy-mm-dd')
)
and
t.DISTRICTNO LIKE CONCAT(#{authCode},'%')
GROUP BY to_char(T.REGTIME,'yyyy-mm')
ORDER BY 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 to_date(#{endDate},'yyyy-mm-dd')
and
T.REGTIME = ]]> to_date(#{startDate},'yyyy-mm-dd')
)
and
t.DISTRICTNO LIKE CONCAT(#{authCode},'%')
GROUP BY to_char(T.REGTIME,'yyyy-mm')
ORDER BY 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 to_date(#{endDate},'yyyy-mm-dd')
and
T.REGTIME = ]]> to_date(#{startDate},'yyyy-mm-dd')
)
and
t.DISTRICTNO LIKE CONCAT(#{authCode},'%')
GROUP BY to_char(T.REGTIME,'yyyy-mm')
ORDER BY REGTIME
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 to_date(#{endDate},'yyyy-mm-dd')
and
t.FILLTIME = ]]> to_date(#{startDate},'yyyy-mm-dd')
)
and
t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
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 to_date(#{endDate},'yyyy-mm-dd')
and
t.FILLTIME = ]]> to_date(#{startDate},'yyyy-mm-dd')
)
and
t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
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 to_date(#{endDate},'yyyy-mm-dd')
and
t.FILLTIME = ]]> to_date(#{startDate},'yyyy-mm-dd')
)
and
t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
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 to_date(#{endDate},'yyyy-mm-dd')
and
t.FILLTIME = ]]> to_date(#{startDate},'yyyy-mm-dd')
)
and
t1.DISTRICTNO LIKE CONCAT(#{authCode},'%')
select stationname,
(select count(STATIONNO) from (select t.STATIONNO from tb_CNGMACHINE_SUM t where t.SUMDATE to_date(#{endDate},'yyyy-mm-dd') and t.SUMDATE = ]]> 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 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 = ]]> to_date(#{nowDate},'yyyy-mm-dd')
select count(t.CYLINDER_GUID) from TB_CYLINDER t
where t.NEXTCHECKDATE to_date(#{endDate},'yyyy-mm-dd') and t.NEXTCHECKDATE = ]]> 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 to_date(#{endDate},'yyyy-mm-dd')
and
t1.FILLTIME = ]]> to_date(#{startDate},'yyyy-mm-dd')
)
select t.provincename from td_province t where t.provinceno=#{auth}
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 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)
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) )
update TB_CAR set USER_GUID=#{userGuid} where car_guid = #{carGuid}
select t.DISTNO,t.APIKEY from TP_API t where t.USERNAME=#{USERNAME} and t.PWD=#{PWD} and t.STATE=#{STATE}