Commit 21c61048 authored by wangjinjing's avatar wangjinjing

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

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