大探中心中间状态统计工具

来源:百度文库 编辑:神马文学网 时间:2024/05/23 14:23:43
功能测试
1.测试值班记录表,构成的状态数组
select * from (
select observer_date,observer_time,isopen,rownum
from aoc_cinrad.cinrad_onwatch
where stationnum=‘Z9555‘
and observer_date = ‘20070305‘
order by observer_time desc
)
where rownum = 1;
select Observer_Date,Observer_Time,IsOpen
from AOC_CINRAD.CINRAD_ONWATCH
where StationNum=‘Z9555‘
and Observer_Date = ‘20070101‘
order by Observer_Time;
测试站点      测试日期          测试结果
Z9551           20070215         OK
Z9551           20070301         OK
Z9551           20070228         OK
Z9555           20070216         OK
Z9555           20070228         OK
Z9555           20070306         OK
2.状态表数组\状态记录表
Z9555 cc 38所
测试站点      测试日期          测试结果
Z9555           20070216       OK
Z9555           20070228       OK
Z9555           20070306       OK
Z9555           20070101       OK
Z9555           20070215       OK
select distinct(substr(STATUS_TIME,1,3))
from CINRAD_HIS_38_STATUS
where STATIONNUM = ‘Z9555‘
and STATUS_DATE = ‘20070216‘
order by substr(STATUS_TIME,1,3);
测试站点      测试日期          测试结果
Z9551           20070215         OK
Z9551           20070301         OK
Z9551           20070228         OK
select distinct(substr(STATUS_TIME,1,3))
from CINRAD_HIS_MS_STATUS
where RADAR_STATION_ID = ‘Z9551‘
and STATUS_DATA = ‘20070228‘
order by substr(STATUS_TIME,1,3);
测试站点      测试日期          测试结果
Z9834           20070215       OK
Z9834           20070301       OK
Z9834           20070101       OK
select distinct(substr(STATUS_TIME,1,3))
from CINRAD_HIS_784_STATUS
where STATIONNUM = ‘Z9834‘
and STATUS_DATE = ‘20070101‘
order by substr(STATUS_TIME,1,3);
3.报警记录
Z9555 cc 38所
测试站点      测试日期          测试结果
Z9555           20070216       OK
Z9555           20070228       OK
Z9555           20070306       OK
Z9555           20070101       OK
Z9555           20070215       OK
select STATUS+1,Status_time
from V_CINRAD_HIS_38_ALARM
where Stationnum = ‘Z9555‘
and Status_date = ‘20070101‘
order by status_time;
测试站点      测试日期          测试结果
Z9551           20070215         OK
Z9551           20070301         OK
Z9551           20070228         OK
select Status_time,STATUS
from V_CINRAD_HIS_MST_ALARM
where Stationnum = ‘Z9551‘
and Status_date = ‘20070228‘
order by Status_time;
###
编辑修改后功能
select Status_time,decode(STATUS,‘MR‘,2,‘MM‘,3,‘IN‘,4,‘N/A‘,2,0) as STATUSS
from V_CINRAD_HIS_MST_ALARM
where Stationnum = ‘Z9551‘
and Status_date like ‘20070108‘
order by Status_time;
测试站点      测试日期          测试结果
Z9834           20070215       OK
Z9834           20070301       OK
Z9834           20070101       OK
select distinct(substr(STATUS_TIME,1,3))
from V_CINRAD_HIS_784_ALARM
where Stationnum = ‘Z9859‘
and Status_date = ‘20070101‘
order by substr(STATUS_TIME,1,3);
4.状态汇总
测试站点      测试日期          测试结果
Z9555           20070216       OK
Z9555           20070228       OK
Z9555           20070306       OK
Z9555           20070101       OK
Z9555           20070215       OK
测试站点      测试日期          测试结果
Z9551           20070215         OK
Z9551           20070301         OK
Z9551           20070228         OK
测试站点      测试日期          测试结果
Z9834           20070215       OK
Z9834           20070301       OK
Z9834           20070101       OK
########################################
值班记录表