Commit 21c61048 authored by wangjinjing's avatar wangjinjing

监控 现在改了kz3 不为空,且不等于1 是监控的数据

parent dcea24ba
......@@ -6,7 +6,7 @@
<select id="getVideoInfos" resultClass="java.util.HashMap" parameterClass="java.util.Map">
select xh,sbbh,tdbh,tdmc,jd,wd,xzbh,
cast((select count(*) from trafficaccidentinfo b where a.xh=b.deviceId) as char) as bjl
from sbtdspsr a
from sbtdspsr a where a.kz3 is not null and a.kz3 != '1' and
</select>
<select id="getLedInfos" parameterClass="java.util.Map" resultClass="java.util.HashMap">
......@@ -57,7 +57,7 @@
</select>
<select id="getSbtdspsr" parameterClass="java.util.Map" resultClass="java.util.HashMap">
select * from sbtdspsr where xh = #xh#
select * from sbtdspsr where kz3 is not null and kz3 != '1' and xh = #xh#
</select>
<select id="getEventAlarm" parameterClass="java.util.Map" resultClass="java.util.HashMap">
......@@ -81,7 +81,7 @@
(case alarmLevel when '1' then '一般' when '2' then '重大' when '3' then '特别重大' end) as alarmLevelName,
eventUrl,vdId,channelId,planID ,rownum
from trafficaccidentinfo ) a left join sbtdspsr b on a.deviceId = b.xh
where 1=1
where b.kz3 is not null and b.kz3 != '1'
<isNotEmpty prepend='AND ' property='tdmc'>
b.tdmc like concat('%',#tdmc# ,'%')
</isNotEmpty>
......@@ -111,7 +111,7 @@
select count(*) from
(select deviceId,createAccount, occurTime, accidentState from trafficaccidentinfo ) a
left join sbtdspsr b on a.deviceId = b.xh
where 1=1
where b.kz3 is not null and b.kz3 != '1'
<isNotEmpty prepend='AND ' property='tdmc'>
b.tdmc like concat('%',#tdmc# ,'%')
</isNotEmpty>
......
......@@ -538,8 +538,8 @@
</select>
<select id="xhdOnline" resultClass="java.util.HashMap" parameterClass="java.util.Map">
select count(*) as totalcount,
SUM(case when a.state is not null and a.state=1 then 1 else 0 end) as xhdonline,
SUM(case when a.state =0 or a.state is null then 1 else 0 end) as xhdunonline
SUM(case when a.state is not null and a.state!=20 then 1 else 0 end) as xhdonline,
SUM(case when a.state =20 or a.state is null then 1 else 0 end) as xhdunonline
from nhywjtxhdgl a
</select>
......
......@@ -791,7 +791,7 @@
(bmbh = #bmbh# )
</isNotEmpty>
)a left join sbtdspsr b on a.sbbh= b.sbbh AND a.tdbh = b.tdbh
where 1=1
where b.kz3 is not null and b.kz3 != '1'
<isNotEmpty prepend='AND ' property='LIKEtdmc'>
(b.tdmc like concat('%',#LIKEtdmc# ,'%') )
</isNotEmpty>
......@@ -813,7 +813,7 @@
(bmbh = #bmbh# )
</isNotEmpty>
)a left join sbtdspsr b on a.sbbh= b.sbbh AND a.tdbh = b.tdbh
where 1=1
where b.kz3 is not null and b.kz3 != '1'
<isNotEmpty prepend='AND ' property='LIKEtdmc'>
(b.tdmc like concat('%',#LIKEtdmc# ,'%') )
</isNotEmpty>
......
......@@ -315,7 +315,7 @@
from Sbtdjqqx qx
left join sbtdspsr td on qx.sbbh = td.sbbh and qx.tdbh = td.tdbh
left join xtcl x on x.csdm = qx.tdlx and x.csdl = 'channelSmallType'
where 1=1
where kz3 is not null and kz3 != '1'
<isNotEmpty prepend='AND ' property='LIKEsbbh'>
(qx.sbbh like concat('%',#LIKEsbbh# ,'%') )
</isNotEmpty>
......
......@@ -733,7 +733,7 @@
(select xzmc from ptxzs b where b.xzbh=a.xzbh ) as xzmc,
xh,sbbh,tdbh,tdmc
from sbtdspsr a
where 1=1
where a.kz3 is not null and a.kz3!='1'
<isNotEmpty prepend='AND ' property='xzbh'>
<![CDATA[ xzbh in ]]>
<iterate property="xzbh" conjunction="," open="(" close=")">
......@@ -907,7 +907,7 @@
<select id="countSbtdspsrToChannelSet" resultClass="java.lang.Integer" parameterClass="java.util.Map">
<isEqual property="devicetype" compareValue="1">
select count(*) from sbtdspsr a
where 1=1
where a.kz3 is not null and a.kz3 !='1'
<isNotEmpty prepend='AND ' property='xzbh'>
<![CDATA[ xzbh in ]]>
<iterate property="xzbh" conjunction="," open="(" close=")">
......@@ -1228,18 +1228,18 @@
hh.csmc as sfzxmc
from sbtdspsr sptd
left join ptxzs p on p.xzbh = sptd.xzbh
left join xtcl l on sptd.tdlx = l.csdm and l.csdl = 'channelSmallType'
left join xtcl st on sptd.spbmgs = st.csdm and st.csdl = 'encodeFormat'
left join xtcl aa on sptd.lxlrcyfs = aa.csdm and aa.csdl = 'recordStoreType'
left join xtcl bb on sptd.lxfs = bb.csdm and bb.csdl = 'recordMethod'
left join xtcl l on l.csdl = 'channelSmallType' and sptd.tdlx = l.csdm
left join xtcl st on st.csdl = 'encodeFormat' and sptd.spbmgs = st.csdm
left join xtcl aa on aa.csdl = 'recordStoreType' and sptd.lxlrcyfs = aa.csdm
left join xtcl bb on bb.csdl = 'recordMethod' and sptd.lxfs = bb.csdm
left join ptlxccqz store on store.zbh = sptd.zxcczbh
left join xtcl cc on sptd.sqms = cc.csdm and cc.csdl = 'mediaWallMode'
left join xtcl dd on sptd.lxmlxz = dd.csdm and dd.csdl = 'recordMdeiaType'
left join xtcl ee on sptd.tdzt = ee.csdm and ee.csdl = 'channelState'
left join xtcl cc on cc.csdl = 'mediaWallMode' and sptd.sqms = cc.csdm
left join xtcl dd on dd.csdl = 'recordMdeiaType' and sptd.lxmlxz = dd.csdm
left join xtcl ee on ee.csdl = 'channelState'and sptd.tdzt = ee.csdm
left join sbxx ff on sptd.sbbh = ff.sbbh
left join sbcj gg on ff.cjbh = gg.cjbh
left join xtcl hh on sptd.sfzx = hh.csdm and hh.csdl = 'isOnline'
where 1=1
left join xtcl hh on hh.csdl = 'isOnline' and sptd.sfzx = hh.csdm
where sptd.kz3 is not null and sptd.kz3!='1'
<isNotEmpty prepend='AND ' property='LIKEsbbh'>
(sptd.sbbh like '%$LIKEsbbh$%' )
</isNotEmpty>
......@@ -1277,18 +1277,18 @@
count(*)
from sbtdspsr sptd
left join ptxzs p on p.xzbh = sptd.xzbh
left join xtcl l on sptd.tdlx = l.csdm and l.csdl = 'channelSmallType'
left join xtcl st on sptd.spbmgs = st.csdm and st.csdl = 'encodeFormat'
left join xtcl aa on sptd.lxlrcyfs = aa.csdm and aa.csdl = 'recordStoreType'
left join xtcl bb on sptd.lxfs = bb.csdm and bb.csdl = 'recordMethod'
left join xtcl l on l.csdl = 'channelSmallType' and sptd.tdlx = l.csdm
left join xtcl st on st.csdl = 'encodeFormat' and sptd.spbmgs = st.csdm
left join xtcl aa on aa.csdl = 'recordStoreType' and sptd.lxlrcyfs = aa.csdm
left join xtcl bb on bb.csdl = 'recordMethod' and sptd.lxfs = bb.csdm
left join ptlxccqz store on store.zbh = sptd.zxcczbh
left join xtcl cc on sptd.sqms = cc.csdm and cc.csdl = 'mediaWallMode'
left join xtcl dd on sptd.lxmlxz = dd.csdm and dd.csdl = 'recordMdeiaType'
left join xtcl ee on sptd.tdzt = ee.csdm and ee.csdl = 'channelState'
left join xtcl cc on cc.csdl = 'mediaWallMode' and sptd.sqms = cc.csdm
left join xtcl dd on dd.csdl = 'recordMdeiaType' and sptd.lxmlxz = dd.csdm
left join xtcl ee on ee.csdl = 'channelState' and sptd.tdzt = ee.csdm
left join sbxx ff on sptd.sbbh = ff.sbbh
left join sbcj gg on ff.cjbh = gg.cjbh
left join xtcl hh on sptd.sfzx = hh.csdm and hh.csdl = 'isOnline'
where 1=1
left join xtcl hh on hh.csdl = 'isOnline' and sptd.sfzx = hh.csdm
where sptd.kz3 is not null and sptd.kz3!='1'
<isNotEmpty prepend='AND ' property='LIKEsbbh'>
(sptd.sbbh like '%$LIKEsbbh$%' )
</isNotEmpty>
......
......@@ -623,7 +623,8 @@
from sbxx xx
left join sbcj cj on xx.cjbh = cj.cjbh
left join ptxzs pt on xx.xzbh = pt.xzbh
where 1=1
right join sbtdspsr b on xx.sbbh=b.sbbh
where b.kz3 is not null and b.kz3!='1'
<isNotEmpty prepend='AND ' property='LIKEsbbh'>
(xx.sbbh like '%$LIKEsbbh$%' )
</isNotEmpty>
......@@ -944,7 +945,8 @@
from sbxx xx
left join sbcj cj on xx.cjbh = cj.cjbh
left join ptxzs pt on xx.xzbh = pt.xzbh
where 1=1
right join sbtdspsr b on xx.sbbh=b.sbbh
where b.kz3 is not null and b.kz3!='1'
<isNotEmpty prepend='AND ' property='LIKEsbbh'>
(xx.sbbh like '%$LIKEsbbh$%' )
</isNotEmpty>
......
......@@ -9,19 +9,19 @@
from sbtdspsr f
left join ywvideocurrentstate a on (a.videonum = f.sbbh and a.channelnum = f.tdbh)
left join sbxx e on (f.sbbh =e.sbbh)
where 1=1
where f.kz3 is not null and f.kz3 != '1'
<isNotEmpty prepend="and " property='LIKEmc'>
tdmc like '%$LIKEmc$%'
</isNotEmpty>
<isNotEmpty prepend="and " property='state'>
isonline =#state#
isonline =#state#listYwvideohistorystateByPage
</isNotEmpty>
order by isonline
</select>
<select id="count_videoStatusData" parameterClass="java.util.Map" resultClass="java.lang.Integer">
select count(*) from (select *
from SBTDSPSR f left join ywvideocurrentstate a
on (a.videonum = f.sbbh and a.channelnum = f.tdbh) where 1=1
on (a.videonum = f.sbbh and a.channelnum = f.tdbh) where f.kz3 is not null and f.kz3 != '1'
<isNotEmpty prepend="and" property='LIKEmc'>
tdmc like '%$LIKEmc$%'
</isNotEmpty>
......@@ -33,8 +33,8 @@
<select id="query_videoStatusStatis" parameterClass="java.util.Map" resultClass="java.util.HashMap">
select count(*) total,'total' status
from SBTDSPSR
<isNotEmpty prepend="where " property='LIKEmc'>
from SBTDSPSR where kz3 is not null and kz3 != '1'
<isNotEmpty prepend="and " property='LIKEmc'>
tdmc like '%$LIKEmc$%'
</isNotEmpty>
union all
......@@ -53,8 +53,10 @@
</isNotEmpty>
union all
select count(*) total,'normal' status
from ywvideocurrentstate
from sbtdspsr a left join ywvideocurrentstate b
on a.sbbh=videonum and tdbh=channelnum
where isonline is not null and <![CDATA[isonline <> 0]]>
and a.kz3 is not null and a.kz3 != '1'
<isNotEmpty prepend="and " property='LIKEmc'>
channelname like '%$LIKEmc$%'
</isNotEmpty>
......@@ -63,6 +65,7 @@
from sbtdspsr a left join ywvideocurrentstate b
on a.sbbh=videonum and tdbh=channelnum
where (isonline is null or isonline=0)
and a.kz3 is not null and a.kz3 != '1'
<isNotEmpty prepend="and " property='LIKEmc'>
tdmc like '%$LIKEmc$%'
</isNotEmpty>
......
......@@ -850,7 +850,7 @@
<!-- 查询相机 id + 名称 -->
<select id="get_Cameras" resultClass="java.util.HashMap" parameterClass="java.util.Map">
select xh, tdmc from sbtdspsr
select xh, tdmc from sbtdspsr where kz3 is not null and kz3 != '1'
</select>
<!-- 统计 按月份统计 -->
......@@ -963,7 +963,7 @@
(
select a.xh,a.sbbh,a.tdbh,a.tdlx,a.tdmc,a.tdzt,a.jd,a.wd,a.xzbh,
(select roadId from trafficdevicerelate where deviceType='10' AND deviceId=a.xh limit 0,1) relationId
from sbtdspsr a
from sbtdspsr a where a.kz3 is not null and a.kz3 != '1'
) b
<!--
select xh,sbbh,tdbh,tdlx,tdmc,tdzt,jd,wd,xzbh,b.jql from sbtdspsr a
......
......@@ -373,7 +373,7 @@
<!-- 查询摄像头信息并分页 -->
<select id="getVideoListPage" resultClass="java.util.HashMap" parameterClass="java.util.Map">
select * from sbtdspsr where 1=1
select * from sbtdspsr where kz3 is not null and kz3 != '1'
<isNotEmpty prepend='AND ' property='xzbh' >
(xzbh like concat('%',#xzbh# ,'%') )
</isNotEmpty>
......@@ -382,7 +382,7 @@
</isNotEmpty>
</select>
<select id="getVideoListPageCount" resultClass="java.lang.Integer" parameterClass="java.util.Map">
select count(*) from sbtdspsr
select count(*) from sbtdspsr where kz3 is not null and kz3 != '1'
</select>
<!-- 查询情报板信息并分页 -->
......@@ -448,7 +448,7 @@
<select id="getRoadVideo" parameterClass="java.util.Map" resultClass="java.util.HashMap">
select xh as deviceId, sbbh as deviceNumber, tdmc as deviceName,
'10' as deviceType, concat(sbbh,'-',tdbh) as deviceInfo from sbtdspsr a
where not exists (select relationId from trafficdevicerelate b where a.xh=b.deviceId
where a.kz3 is not null and a.kz3 != '1' and not exists (select relationId from trafficdevicerelate b where a.xh=b.deviceId
<isNotEmpty prepend='AND ' property='roadId' >
b.roadId = #roadId#
</isNotEmpty>
......@@ -462,7 +462,7 @@
</select>
<select id="getRoadVideoCount" parameterClass="java.util.Map" resultClass="java.lang.Integer">
select count(*) from sbtdspsr a
where not exists (select relationId from trafficdevicerelate b where a.xh=b.deviceId
where b.kz3 is not null and b.kz3 != '1' and not exists (select relationId from trafficdevicerelate b where a.xh=b.deviceId
<isNotEmpty prepend='AND ' property='roadId' >
b.roadId = #roadId#
</isNotEmpty>
......@@ -760,7 +760,7 @@
(
select a.xh,a.sbbh,a.tdbh,a.tdmc,a.xzbh,a.tdzt,a.jd,a.wd,a.sfzx,a.sfzlx,a.lxzt,a.tdlx,
(select roadId from trafficdevicerelate where deviceType='10' and deviceId=a.xh ORDER BY createTime limit 1) roadId
from sbtdspsr a
from sbtdspsr a where a.kz3 is not null and a.kz3 != '1'
) b
where (select deviceId from trafficdevicerelate where roadId=b.roadId and deviceType='9' ORDER BY createTime limit 1) is NOT null;
</select>
......@@ -1052,7 +1052,9 @@
<!-- 路段关联监控设备 -->
<select id="get_roadVideo" parameterClass="java.util.Map" resultClass="java.util.HashMap">
select a.roadName, a.deviceName,a.deviceId,b.tpwzx as pictureX,b.tpwzy as pictureY
from trafficdevicerelate a , sbtdspsr b where a.deviceId = b.xh and a.deviceType="10"
from trafficdevicerelate a , sbtdspsr b where a.deviceId = b.xh
and b.kz3 is not null and b.kz3 != '1'
and a.deviceType="10"
<isNotEmpty prepend='AND ' property='roadId'>
a.roadId = #roadId#
</isNotEmpty>
......@@ -1064,7 +1066,9 @@
</isNotEmpty>
</select>
<select id="get_roadVideoCount" parameterClass="java.util.Map" resultClass="java.lang.Integer">
select count(*) from trafficdevicerelate a , sbtdspsr b where a.deviceId = b.xh and a.deviceType="10"
select count(*) from trafficdevicerelate a , sbtdspsr b where a.deviceId = b.xh
and b.kz3 is not null and b.kz3 != '1'
and a.deviceType="10"
<isNotEmpty prepend='AND ' property='roadId'>
a.roadId = #roadId#
</isNotEmpty>
......
......@@ -271,7 +271,7 @@
<select id="get_TrafficroadgridinfoById" resultClass="java.util.HashMap" parameterClass="java.util.Map">
select a.roadGridId,a.remarks1,a.roadName,a.roadGridPosition,a.createTime,b.tdmc,c.upDirection,
c.downDirection from trafficroadgridinfo a, sbtdspsr b, trafficroadinfo c
where a.vdid = b.sbbh and a.channelId = b.tdbh and a.roadNumber = c.roadId and a.roadGridId=#roadGridId#
where b.kz3 is not null and b.kz3 != '1' and a.vdid = b.sbbh and a.channelId = b.tdbh and a.roadNumber = c.roadId and a.roadGridId=#roadGridId#
</select>
</sqlMap>
......
......@@ -32,7 +32,7 @@
g.xzbh,(select xzmc from ptxzs b where b.xzbh=g.xzbh ) as xzmc from(
select sum(gjCount) as zcount,xzbh from(
select count(*) as gjCount, a.alarmdeviceid,a.channelnum, b.xzbh from ywalarmeventinfo
a, sbtdspsr b where a.alarmdeviceid=b.sbbh and a.channelnum=b.tdbh
a, sbtdspsr b where b.kz3 is not null and b.kz3 != '1' and a.alarmdeviceid=b.sbbh and a.channelnum=b.tdbh
<isNotEmpty prepend='AND ' property='xzbh'>
<![CDATA[ b.xzbh in ]]>
<iterate property="xzbh" conjunction="," open="(" close=")">
......@@ -53,7 +53,7 @@
select sum(gjCount) as hfcount,xzbh from(
select count(*) as gjCount, d.alarmdeviceid,d.channelnum,e.xzbh xzbh from
ywalarmeventinfo d,sbtdspsr e
where d.alarmdeviceid=e.sbbh and d.channelnum=e.tdbh
where e.kz3 is not null and e.kz3 != '1' and d.alarmdeviceid=e.sbbh and d.channelnum=e.tdbh
<isNotEmpty prepend='AND ' property='xzbh'>
<![CDATA[ e.xzbh in ]]>
<iterate property="xzbh" conjunction="," open="(" close=")">
......@@ -373,7 +373,7 @@
select count(*) from (
select sum(gjCount) as mcount,xzbh,(select xzmc from ptxzs f where f.xzbh=x.xzbh ) as xzmc from(
select count(*) as gjCount, a.alarmdeviceid,a.channelnum, b.xzbh from ywalarmeventinfo a,
sbtdspsr b where a.alarmdeviceid=b.sbbh and a.channelnum=b.tdbh
sbtdspsr b where b.kz3 is not null and b.kz3 != '1' and a.alarmdeviceid=b.sbbh and a.channelnum=b.tdbh
<isNotEmpty prepend='AND ' property='xzbh'>
<![CDATA[b.xzbh in ]]>
<iterate property="xzbh" conjunction="," open="(" close=")">
......@@ -551,7 +551,7 @@
zcount,g.tdmc,g.sbbh,g.tdbh,g.sbip,
trim(cast(case when h.mcount is null then 0 else h.mcount end as char(8))) as hfcount from(
select count(*) as mcount, tdmc,b.sbbh,tdbh,sbip from ywalarmeventinfo a, Sbtdspsr b left join sbxx c
on b.sbbh = c.sbbh where a.alarmdeviceid = b.sbbh and a.channelnum = b.tdbh and a.alarmdevicetype=1
on b.sbbh = c.sbbh where b.kz3 is not null and b.kz3 != '1' and a.alarmdeviceid = b.sbbh and a.channelnum = b.tdbh and a.alarmdevicetype=1
<isNotEmpty prepend="and" property="timeStart">
<![CDATA[
a.alarmtime >= #timeStart#
......@@ -570,7 +570,7 @@
group by tdmc,b.sbbh,tdbh,sbip
) g left join(
select count(*) as mcount, tdmc,e.sbbh,tdbh,sbip from ywalarmeventinfo d, Sbtdspsr e left join sbxx f
on e.sbbh = f.sbbh where d.alarmdeviceid = e.sbbh and d.channelnum = e.tdbh
on e.sbbh = f.sbbh where e.kz3 is not null and e.kz3 != '1' and d.alarmdeviceid = e.sbbh and d.channelnum = e.tdbh
and d.alarmdevicetype=1 and d.processstatus in (915,914,912)
<isNotEmpty prepend="and" property="timeStart">
<![CDATA[
......@@ -864,7 +864,7 @@
select count(*) from (
select count(*) as mcount, b.tdmc,b.sbbh,b.tdbh,sbip from
ywalarmeventinfo a, sbtdspsr b left join sbxx c
on b.sbbh = c.sbbh where a.alarmdeviceid = b.sbbh and a.channelnum = b.tdbh
on b.sbbh = c.sbbh where b.kz3 is not null and b.kz3 != '1' and a.alarmdeviceid = b.sbbh and a.channelnum = b.tdbh
and a.alarmdevicetype=1
<isNotEmpty prepend="and" property="timeStart">
<![CDATA[
......
......@@ -485,7 +485,7 @@
<!--</isNotEmpty>-->
LEFT JOIN sbtdspsr d on (d.sbbh=a.alarmdeviceid and d.tdbh=a.channelnum )
LEFT JOIN ptxzs c on (d.xzbh = c.xzbh)
where 1=1
where d.kz3 is not null and d.kz3 != '1'
<isNotEmpty prepend='AND ' property='alarmdeviceid'>
(a.alarmdeviceid = #alarmdeviceid# )
</isNotEmpty>
......@@ -714,7 +714,7 @@
) a
left join sbtdspsr b
on a.alarmdeviceid = sbbh and a.channelnum = b.tdbh
order by a.gjcs desc
where b.kz3 is not null and b.kz3 != '1' order by a.gjcs desc
</select>
</sqlMap>
......
......@@ -1004,7 +1004,7 @@
</isNotEmpty>) as jobnormalnum, sum(case when jd is not null and wd is not null then 1 else 0 end)
lalnormalnum,
(select count(*) as jobtotal from ywvideocurrentstate e where e.videonum=c.sbbh and
e.channelnum=c.tdbh and e.isolation is not null and e.isonline!=0) as zxsc
e.channelnum=c.tdbh and e.isonline is not null and e.isonline!=0) as zxsc
from sbtdspsr c
<isNotEmpty prepend='where ' property='areanum'>
(c.xzbh = #areanum# or (c.xzbh in (select xzbh from Ptxzs start with sjxzbh=
......
......@@ -432,9 +432,9 @@
<select id="count_HomepageDeviceCount" resultClass="java.util.HashMap" parameterClass="java.util.Map">
select count(*) as zs, 'fwqzl' as name from ywmachineinfo
union all
select count(*) as zs, 'jkzxs' as name from ywvideocurrentstate where (isolation is not null and isonline!=0)
select count(*) as zs, 'jkzxs' as name from ywvideocurrentstate a left join sbtdspsr b on a.videonum=b.sbbh and a.channelnum=b.tdbh where (a.isonline is not null and a.isonline!=0) and b.kz3 is not null and b.kz3 != '1'
union all
select count(*) as zs, 'jkzl' as name from sbtdspsr
select count(*) as zs, 'jkzl' as name from sbtdspsr where kz3 is not null and kz3 != '1'
union all
select count(*) as zs, 'fwqzxs' as name from ywmachinecurrentstate where machinestate=1
</select>
......
......@@ -869,7 +869,7 @@
wd
from ywrepairjobinfo
left join (SELECT sbbh xh, tdbh, jd, wd, '1' devicetype
FROM sbtdspsr
FROM sbtdspsr a where a.kz3 is not null and a.kz3 != '1'
union all
SELECT xh, null tdbh, jd, wd, '3' devicetype
FROM nhywjtxhdgl n
......@@ -997,7 +997,7 @@ confirmmaintenance,completiontime ,receivertime,receivercompany,receiverpeople ,
SELECT xzbh, sbbh, tdmc
, round(to_number(nvl(to_date(t.actualfinishtime, 'yyyy-mm-dd hh24:mi:ss'), SYSDATE) -
to_date(t.requirefinishtime, 'yyyy-mm-dd hh24:mi:ss'))) AS range
FROM YWREPAIRJOBINFO t ,SBTDSPSR a where faultdeviceid=a.sbbh
from ywrepairjobinfo t ,sbtdspsr a where a.kz3 is not null and a.kz3 != '1' and faultdeviceid=a.sbbh
<isNotEmpty prepend='AND ' property='xzbh'>
<![CDATA[ xzbh in ]]>
<iterate property="xzbh" conjunction="," open="(" close=")">
......@@ -1177,7 +1177,7 @@ confirmmaintenance,completiontime ,receivertime,receivercompany,receiverpeople ,
</select>
<select id="count_Ywrepairjobinstent" resultClass="java.lang.Integer" parameterClass="java.util.Map">
<isEqual compareValue="1" property="faultdevicetype">
select count(count(*)) from YWREPAIRJOBINFO t, SBTDSPSR a where t.faultdeviceid=a.sbbh
select count(count(*)) from ywrepairjobinfo t, sbtdspsr a where a.kz3 is not null and a.kz3 != '1' and t.faultdeviceid=a.sbbh
<isNotEmpty prepend='AND ' property='LIKEfaultdevicename'>
faultdevicename like '%LIKEfaultdevicename%'
</isNotEmpty>
......
......@@ -547,7 +547,7 @@
from ywvideocurrentstate a
right join sbtdspsr f on (f.sbbh=a.videonum and f.tdbh=a.channelnum )
left join sbxx e on (a.videonum=e.sbbh)
where 1=1
where f.kz3 is not null and f.kz3 != '1'
<isNotEmpty prepend='AND ' property='currentstateid'>
(a.currentstateid = #currentstateid# )
</isNotEmpty>
......@@ -604,7 +604,7 @@
right join sbtdspsr d on (d.sbbh=a.videonum and d.tdbh=a.channelnum )
left join ywarchivevideoinfo e on (e.videonum=a.videonum and e.channelnum=a.channelnum )
where 1=1
where d.kz3 is not null and d.kz3 != '1'
<isNotEmpty prepend='AND ' property='videocatalog'>
(d.xzbh = #videocatalog# <!-- or (d.xzbh in (select xzbh from ptxzs where sjxzbh = #videocatalog#)) -->)
</isNotEmpty>
......@@ -623,7 +623,7 @@
from ywvideocurrentstate a
right JOIN sbtdspsr d on (d.sbbh=a.videonum and d.tdbh=a.channelnum )
LEFT JOIN ywarchivevideoinfo e on (e.videonum=a.videonum and e.channelnum=a.channelnum )
where 1=1
where d.kz3 is not null and d.kz3 != '1'
<isNotEmpty prepend='AND ' property='videocatalog'>
(d.xzbh= #xzbh# or d.xzbh in(select xzbh from ptxzs start with sjxzbh=#xzbh# connect by prior xzbh= sjxzbh)
)
......@@ -639,7 +639,7 @@
select count(*)
from ywvideocurrentstate a
right JOIN sbtdspsr d on (d.sbbh=a.videonum and d.tdbh=a.channelnum )
where 1=1
where d.kz3 is not null and d.kz3 != '1'
<isNotEmpty prepend='AND ' property='currentstateid'>
(a.currentstateid = #currentstateid# )
</isNotEmpty>
......@@ -766,7 +766,7 @@
SUM(case when a.isonline =0 or a.isonline is null then 1 else 0 end) as unonlinenum
from ywvideocurrentstate a
right join sbtdspsr d on (d.sbbh=a.videonum and d.tdbh=a.channelnum )
where d.kz3 is not null and d.kz3 != '1'
</select>
<select id="statisticsVideoIntactRate" resultClass="java.util.HashMap" parameterClass="java.util.Map">
select count(*) as intactNum,
......@@ -782,18 +782,20 @@
<select id="videoCurrentStateStatistics" resultClass="java.util.HashMap" parameterClass="java.util.Map">
select 'total' csdm , 'total'csmc , count(*) cnt
from ywvideocurrentstate a right join sbtdspsr d on (d.sbbh=a.videonum and d.tdbh=a.channelnum )
where d.kz3 is not null and d.kz3 != '1'
union
select 'abnormal' csdm ,'abnormal'csmc , count(*) cnt
from ywvideocurrentstate a right join sbtdspsr d on (d.sbbh=a.videonum and d.tdbh=a.channelnum ) where isonline=0 or isonline is null
from ywvideocurrentstate a right join sbtdspsr d on (d.sbbh=a.videonum and d.tdbh=a.channelnum ) where isonline=0 or isonline is null and d.kz3 is not null and d.kz3 != '1'
union
select 'normal' csdm ,'normal'csmc , count(*) cnt
from ywvideocurrentstate a right join sbtdspsr d on (d.sbbh=a.videonum and d.tdbh=a.channelnum ) where a.isonline is not null and isonline!=0
and d.kz3 is not null and d.kz3 != '1'
</select>
<select id="vdqStatisticsRegion" resultClass="java.util.HashMap" parameterClass="java.util.Map">
select d.xzbh videocatalog, (select XZMC from ptxzs where xzbh=d.xzbh) as videocatalogname,
count(*) as jknum,
(select count(1) from sbtdspsr e where (e.xzbh = d.xzbh) ) as totalnum,
(select count(1) from sbtdspsr e where e.kz3 is not null
and kz3 != '1' and (e.xzbh = d.xzbh) ) as totalnum,
SUM(case when a.isonline=0 or a.isonline is null then 1 else 0 end) as lxnum,
SUM(case when a.isonline is not null and a.isonline!=0 then 1 else 0 end) as zxnum,
SUM(case when a.vqdstate=0 then 1 else 0 end) as videoabnormalnum,
......@@ -807,7 +809,7 @@
SUM(case when a.imgcolorstatus=0 then 1 else 0 end) as imgcolorstatusnum
FROM ywvideocurrentstate a
right JOIN sbtdspsr d on (d.sbbh=a.videonum and d.tdbh=a.channelnum )
WHERE 1=1
WHERE d.kz3 is not null and d.kz3 != '1'
<isNotEmpty prepend='AND ' property='videocatalog'>
(d.xzbh = #videocatalog# or (d.xzbh in (select xzbh from ptxzs where sjxzbh =
#videocatalog#)) )
......@@ -827,10 +829,7 @@
FROM ywvideocurrentstate a
<isNotEmpty prepend=' ' property='videocatalog'>
LEFT JOIN sbtdspsr d on (d.sbbh=a.videonum and d.tdbh=a.channelnum )
</isNotEmpty>
WHERE 1=1
<isNotEmpty prepend='AND ' property='videocatalog'>
(d.xzbh = #videocatalog# or (d.xzbh in (select xzbh from ptxzs where sjxzbh = #videocatalog#)) )
WHERE d.kz3 is not null and d.kz3 != '1' and (d.xzbh = #videocatalog# or (d.xzbh in (select xzbh from ptxzs where sjxzbh = #videocatalog#)) )
</isNotEmpty>
<isNotEmpty property='tableparam'>
$tableparam$
......@@ -844,12 +843,13 @@
<isEqual prepend="" property="alarmdevicetype" compareValue="1">
select f.*,f.mcount-(onlinecount+notonlinecount) as wxj from (
select d.xzbh xzqh ,
(select count(*) from sbtdspsr e where e.xzbh = d.xzbh ) as mcount,
(select count(*) from sbtdspsr e where e.xzbh = d.xzbh and e.kz3 is not null and e.kz3 != '1' ) as mcount,
(select XZMC from ptxzs where xzbh=d.xzbh) as xzmc,
SUM(case when a.isonline=0 or a.isonline is null then 1 else 0 end) as notonlinecount,
SUM(case when a.isonline is not null and a.isonline!=0 then 1 else 0 end) as onlinecount
from ywvideocurrentstate a
LEFT JOIN sbtdspsr d on (d.sbbh=a.videonum and d.tdbh=a.channelnum )
where d.kz3 is not null and d.kz3 != '1'
<isNotEmpty prepend='AND ' property='xzbh'>
<![CDATA[ d.xzbh in ]]>
<iterate property="xzbh" conjunction="," open="(" close=")">
......@@ -973,6 +973,7 @@
select f.* from (
select d.xzbh xzqh from ywvideocurrentstate a
right JOIN sbtdspsr d on (d.sbbh=a.videonum and d.tdbh=a.channelnum )
where d.kz3 is not null and d.kz3 != '1'
<isNotEmpty prepend='AND ' property='xzbh'>
<![CDATA[ d.xzbh in ]]>
<iterate property="xzbh" conjunction="," open="(" close=")">
......@@ -1081,7 +1082,7 @@
(select sbip from sbxx where sbbh=a.sbbh) as sbip
from sbtdspsr a
left join ywvideocurrentstate b on a.sbbh=b.videonum and a.tdbh=b.channelnum
where 1=1
where a.kz3 is not null and a.kz3 != '1'
<isNotEmpty prepend='AND ' property='xzbh'>
(a.xzbh= #xzbh# or a.xzbh in(select xzbh from ptxzs start with sjxzbh=#xzbh# connect
by prior xzbh= sjxzbh) )
......@@ -1098,7 +1099,7 @@
select a.tdmc, a.xzbh , a.sbbh , a.tdbh,b.currentstateid,b.isonline
from sbtdspsr a
left join ywvideocurrentstate b on a.sbbh=b.videonum and a.tdbh=b.channelnum
where 1=1
where a.kz3 is not null and a.kz3 != '1'
<isNotEmpty prepend='AND ' property='xzbh'>
(a.xzbh= #xzbh# or a.xzbh in(select xzbh from ptxzs start with sjxzbh=#xzbh# connect by
prior xzbh= sjxzbh) )
......@@ -1317,12 +1318,12 @@
left join sbxx b on a.videonum = b.sbbh
left join ptxzs c on a.videocatalog = c.xzbh
RIGHT JOIN sbtdspsr d on (d.sbbh=a.videonum and d.tdbh=a.channelnum )
where 1=1
where d.kz3 is not null and d.kz3 != '1'
<isNotEmpty prepend='AND ' property='xzqh'>
a.videocatalog = #xzqh#
</isNotEmpty>
<isNotEmpty prepend='AND ' property='normal'>
(a.isolation is not null and a.isonline!=0)
(a.isonline is not null and a.isonline!=0)
</isNotEmpty>
<isNotEmpty prepend='AND ' property='abnormal'>
(a.isonline=0 or a.isonline is null)
......@@ -1349,7 +1350,7 @@
a.videocatalog = #xzqh#
</isNotEmpty>
<isNotEmpty prepend='AND ' property='normal'>
(a.isolation is not null and a.isonline!=0)
(a.isonline is not null and a.isonline!=0)
</isNotEmpty>
<isNotEmpty prepend='AND ' property='abnormal'>
(a.isonline=0 or a.isonline is null)
......
......@@ -577,7 +577,7 @@
from sbtdspsr d
left join ywvideohistorystate a on (d.sbbh=a.videonum and d.tdbh=a.channelnum )
left join sbxx e on d.sbbh=e.sbbh
where 1=1
where d.kz3 is not null and d.kz3!='1'
<isNotEmpty prepend='AND ' property='xzbh'>
(d.xzbh = #xzbh# )
</isNotEmpty>
......@@ -623,7 +623,7 @@
left join ywvideohistorystate a
on (a.videonum=d.sbbh and a.channelnum=d.tdbh )
left join sbxx e on (d.sbbh=e.sbbh)
where 1=1
where d.kz3 is not null and d.kz3!='1'
<isNotEmpty prepend='AND ' property='xzbh'>
(d.xzbh = #xzbh# )
</isNotEmpty>
......
......@@ -789,6 +789,7 @@
from ywvideohistorystate m
left join sbtdspsr n on n.sbbh = m.videonum and n.tdbh = m.channelnum
left join sbxx l on l.sbbh=m.videonum
where n.kz3 is not null and n.kz3 != '1'
</isEqual>
<isEqual compareValue="3" property="devicetype">
SELECT xh,0 channelnum , m.state,ip ,xhdmc name, to_date(create_time,'yyyy-MM-dd hh24:mi:ss')xjsj
......@@ -842,6 +843,7 @@
from ywvideohistorystate m
left join sbtdspsr n on n.sbbh = m.videonum and n.tdbh = m.channelnum
left join sbxx l on l.sbbh=m.videonum
where n.kz3 is not null and n.kz3 != '1'
</isEqual>
<isEqual compareValue="3" property="devicetype">
SELECT xh,0 channelnum , m.state,ip ,xhdmc name, to_date(create_time,'yyyy-MM-dd hh24:mi:ss')xjsj
......@@ -895,7 +897,7 @@
<isNotEmpty prepend='AND ' property='taskid'>
(taskid = #taskid# )
</isNotEmpty>
)) sptd left join sbxx ff on sptd.sbbh = ff.sbbh
) and sptd.kz3 is not null and sptd.kz3 != '1') sptd left join sbxx ff on sptd.sbbh = ff.sbbh
<!--select sptd.* , ff.sbip-->
<!--from (select-->
<!--xh,sbbh,tdbh,tdmc,xzbh,(select xzmc from ptxzs p where p.xzbh = sptd.xzbh )xzmc-->
......@@ -983,7 +985,8 @@
<isNotEmpty prepend='AND ' property='taskid'>
(taskid = #taskid# )
</isNotEmpty>
)
) and sptd.kz3 is not null
and sptd.kz3 != '1'
<!--select sptd.* , ff.sbip-->
<!--from (select-->
<!--xh,sbbh,tdbh,tdmc,xzbh,(select xzmc from ptxzs p where p.xzbh = sptd.xzbh)xzmc-->
......
......@@ -573,7 +573,7 @@
a.createaccount,a.createtime,a.modifyaccount,a.modifytime,a.remarks,a.extend1,a.extend2,a.extend3,a.extend4
from ywvideotaskrunresult a
left join sbtdspsr b on (a.videonum=b.sbbh and a.channelnum=b.tdbh )
where 1=1
where b.kz3 is not null and b.kz3 != '1'
<isNotEmpty prepend='AND ' property='xzbh'>
(b.xzbh = #xzbh# or (b.xzbh in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
</isNotEmpty>
......@@ -625,7 +625,7 @@
)
ORDER BY runtime DESC ) c
left join sbtdspsr d on (c.videonum=d.sbbh and c.channelnum=d.tdbh )
where 1=1
where d.kz3 is not null and d.kz3 != '1'
<isNotEmpty prepend='AND ' property='xzbh'>
(d.xzbh = #xzbh# or (d.xzbh in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
</isNotEmpty>
......@@ -666,7 +666,7 @@
)
ORDER BY runtime DESC ) c
left join sbtdspsr d on (c.videonum=d.sbbh and c.channelnum=d.tdbh )
where 1=1
where d.kz3 is not null and d.kz3 != '1'
<isNotEmpty prepend='AND ' property='xzbh'>
(d.xzbh = #xzbh# or (d.xzbh in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
</isNotEmpty>
......@@ -706,7 +706,7 @@
)
ORDER BY runtime DESC ) c
left join sbtdspsr d on (c.videonum=d.sbbh and c.channelnum=d.tdbh )
where 1=1
where d.kz3 is not null and d.kz3 != '1'
<isNotEmpty prepend='AND ' property='xzbh'>
(d.xzbh = #xzbh# or (d.xzbh in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
</isNotEmpty>
......@@ -745,7 +745,7 @@
)
ORDER BY runtime DESC ) c
left join sbtdspsr d on (c.videonum=d.sbbh and c.channelnum=d.tdbh )
where 1=1
where d.kz3 is not null and d.kz3 != '1'
<isNotEmpty prepend='AND ' property='xzbh'>
(d.xzbh = #xzbh# or (d.xzbh in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
</isNotEmpty>
......@@ -779,7 +779,7 @@
select count(*)
from ywvideotaskrunresult a
left join sbtdspsr b on (a.videonum=b.sbbh and a.channelnum=b.tdbh )
where 1=1
where b.kz3 is not null and b.kz3 != '1'
<isNotEmpty prepend='AND ' property='xzbh'>
(b.xzbh = #xzbh# or (b.xzbh in (select xzbh from ptxzs where sjxzbh = #xzbh#)) )
</isNotEmpty>
......@@ -870,7 +870,7 @@
union all
select
a.*,'0' status
from sbtdspsr a where (sbbh,tdbh ) not in(select videonum, tdbh from ywvideochannelsetlist )
from sbtdspsr a where a.kz3 is not null and a.kz3 != '1' and (sbbh,tdbh ) not in(select videonum, tdbh from ywvideochannelsetlist )
</select>
</sqlMap>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment