From 3ddf0a2666b72db6833aa131c05462c591c62fb4 Mon Sep 17 00:00:00 2001 From: fangshunjian Date: Thu, 18 Oct 2018 16:08:23 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=B6=85=E5=91=A8=E6=9C=9F=E7=9B=91?= =?UTF-8?q?=E6=B5=8B=20=E5=A2=9E=E5=8A=A0=E5=BC=80=E5=85=B3=EF=BC=9A?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=8E=92=E9=99=A4=20=E6=8F=A1=E6=89=8B?= =?UTF-8?q?=E7=9B=91=E6=B5=8B=20=E5=A4=B1=E8=B4=A5=E7=9A=84=E8=8A=82?= =?UTF-8?q?=E7=82=B9=202=E3=80=81=E8=B6=85=E5=91=A8=E6=9C=9F=E7=9B=91?= =?UTF-8?q?=E6=B5=8B=E6=95=B0=E6=8D=AE=20next=5Fcheck=5Ftime=3Dnull?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/nms/thread/DetectDatasTimeoutAlarmThread.java | 10 ++++++++-- src/com/nms/thread/service/ThreadService.java | 5 +++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/com/nms/thread/DetectDatasTimeoutAlarmThread.java b/src/com/nms/thread/DetectDatasTimeoutAlarmThread.java index e55ee13..ce18d33 100644 --- a/src/com/nms/thread/DetectDatasTimeoutAlarmThread.java +++ b/src/com/nms/thread/DetectDatasTimeoutAlarmThread.java @@ -19,6 +19,7 @@ import nis.nms.util.ConnectionOracle; public class DetectDatasTimeoutAlarmThread implements Runnable{ private Logger logger = Logger.getLogger(DetectDatasTimeoutAlarmThread.class); private Date startTime = Calendar.getInstance().getTime(); + private boolean detectDatasTimeoutOthers = false;//监测超时 是否 过滤 握手监测 节点 @Override public void run() { // Thread.currentThread().setName("监测数据超时告警线程"); @@ -35,10 +36,15 @@ public class DetectDatasTimeoutAlarmThread implements Runnable{ inStream = new FileInputStream(url2.getPath().replace("%20", " ")); properties.load(inStream); String checkTypeName = properties.getProperty("detec.nmsclient.str"); + String detectOthers = properties.getProperty("detec.datastimeout.others");//监测超时 是否 过滤 握手监测 节点 // String checkTypeName = Constants.NMS_CLIENT_CHECKTYPENAME; if(StringUtils.isEmpty(checkTypeName)){ checkTypeName = "NMSClient"; - } + } + //过滤 握手监测 超时 告警 + if(StringUtils.isNotBlank(detectOthers) && "1".equalsIgnoreCase(detectOthers.trim())){ + detectDatasTimeoutOthers = true; + } SetInfo nmsClientSet = service.getSetInfoByCheckName(1,checkTypeName); //查询握手监测相关信息 List alarm = new ArrayList(); @@ -73,7 +79,7 @@ public class DetectDatasTimeoutAlarmThread implements Runnable{ List setInfoList = service.getAllSetInfo(1,null); //查询有效SetInfo信息 for(SetInfo setInfo : setInfoList){ - List alarmInfoList = service.detectDatasTimeoutCheck(setInfo,startTime,errorSeqIds);//监测当前监测是否超时无数据 + List alarmInfoList = service.detectDatasTimeoutCheck(setInfo,startTime,detectDatasTimeoutOthers?errorSeqIds:null);//监测当前监测是否超时无数据 if(alarmInfoList != null && alarmInfoList.size()>0){ alarm.addAll(alarmInfoList); /*for(String [] datas: alarmInfoList){ diff --git a/src/com/nms/thread/service/ThreadService.java b/src/com/nms/thread/service/ThreadService.java index ecf0e95..331e6ce 100644 --- a/src/com/nms/thread/service/ThreadService.java +++ b/src/com/nms/thread/service/ThreadService.java @@ -1253,11 +1253,11 @@ public class ThreadService { + "performace_data ,current_times ,start_time ," + "police_level ,data_check_time ,data_arrive_time ,detectioned_state ," + "status_change_time ,seq_id ,detection_info_id,data_check_time_digital,data_arrive_time_digital ," - + "POLICE_EMERGENT ) VALUES" + + "POLICE_EMERGENT,NEXT_CHECK_TIME ) VALUES" +"(?,?," + "?,?,?," + "?,?,?,?," - + "?,?,?,?,?,?)"; + + "?,?,?,?,?,?,null)"; return sql; } @@ -1287,6 +1287,7 @@ public class ThreadService { +" ,data_arrive_time_digital = ?" +" ,POLICE_EMERGENT = ?" + +" ,NEXT_CHECK_TIME = NULL" +" where din.detection_set_info_id = ?"