From c1d5a3c3c0b3d4e29016177cba1831a4962e7c6e Mon Sep 17 00:00:00 2001 From: wangwenrui Date: Fri, 12 Oct 2018 18:56:36 +0800 Subject: [PATCH] =?UTF-8?q?3D=E6=9C=BA=E6=88=BF=E6=9F=A5=E8=AF=A2=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0set=5Finfo=E8=A1=A8=E5=85=B3=E8=81=94=20=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E4=B8=8D=E8=83=BD=E5=88=9B=E5=BB=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/detection/DetectionSetAction.java | 16 +++++++++++++--- .../web/actions/detection/MonitorDataAction.java | 2 +- .../web/actions/nodePosition/TopoShowAction.java | 3 ++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/nis/nms/web/actions/detection/DetectionSetAction.java b/src/nis/nms/web/actions/detection/DetectionSetAction.java index 0744a0a..9d03ce0 100644 --- a/src/nis/nms/web/actions/detection/DetectionSetAction.java +++ b/src/nis/nms/web/actions/detection/DetectionSetAction.java @@ -1249,7 +1249,6 @@ public class DetectionSetAction extends BaseAction { } errBuffer.append(getI18nText("i18n_DetectionSetAction.downloadExample.rangRepeat_n81i")); } - } // 判断数据是否存在 list = this.commonService @@ -1337,6 +1336,17 @@ public class DetectionSetAction extends BaseAction { .getGroupId()); detectionSetInfo.setNodegroup(ng); } + + if ((detectionSetInfo.getNodeIpsId() == null||"".equals(detectionSetInfo.getNodeGroupsId())) + &&(detectionSetInfo.getNodeIpsId()==null|| "".equals(detectionSetInfo.getNodeIpsId()))) {//节点组和节点都为空 + detectionSetInfo.setNodeGroupsId(null); + detectionSetInfo.setNodeIpsId(null); + } else if ((detectionSetInfo.getNodeGroupsId() != null + && !"".equals(detectionSetInfo.getNodeGroupsId())) + &&(detectionSetInfo.getNodeIpsId()==null|| "".equals(detectionSetInfo.getNodeIpsId()))) {//节点组不为空,节点为空 + detectionSetInfo.setNodeIpsId(null); + } + detectionSetInfo.setNodeIp(detectionSetInfo.getNodeIpsName()); detectionSetInfo.setDetectionSetState("1"); detectionSetInfo.setCreateUserId(this.getUserID()); @@ -1345,7 +1355,7 @@ public class DetectionSetAction extends BaseAction { // 将更新操作写到操作日志中 this.addDBOperationRpt(commonService, "detection_Set_Info", "INSERT", detectionSetInfo.getId()); - commonService.commit(); + // 保存并更新上传的脚本文件 saveScriptFile(myFile, detectionSetInfo); @@ -1354,7 +1364,7 @@ public class DetectionSetAction extends BaseAction { // 用来实现即时向客户端发送配置信息 sendSetInfo(null, detectionSetInfo, commonService); - + commonService.commit(); //记录用户操作用于设置向导 if(fromWhere!=null && !"".equals(fromWhere)){ if(fromWhere.equals("formGuide")){ diff --git a/src/nis/nms/web/actions/detection/MonitorDataAction.java b/src/nis/nms/web/actions/detection/MonitorDataAction.java index 1f4922f..3a9f9b6 100644 --- a/src/nis/nms/web/actions/detection/MonitorDataAction.java +++ b/src/nis/nms/web/actions/detection/MonitorDataAction.java @@ -3852,7 +3852,7 @@ public class MonitorDataAction extends BaseAction { String nmsClientStr = objs[index2] == null ? "" : objs[index2].toString(); String state = ""; int initK = 1;// 默认第一个为握手监测,其它监测从1开始取 - if (!getI18nText("i18n_MonitorDataAction.emportCurrentXlsAbnormalSet.shakehands_n81i").equals(nmsClientStr) && StringUtils.isNotBlank(ip)) {// 如果ip没有握手监测,则从数据库中进行查询 + if (!"i18n_check_type_info.NMSClient.CHECK_TYPE_NAME1_n81i".equals(nmsClientStr) && StringUtils.isNotBlank(ip)) {// 如果ip没有握手监测,则从数据库中进行查询 String sql = "select din.detectioned_state" + " from DETECTION_INFO_NEW din " + " left join DETECTION_SET_INFO dsi on din.detection_set_info_id = dsi.id" + " left join check_type_info cti on dsi.check_type_id = cti.id" diff --git a/src/nis/nms/web/actions/nodePosition/TopoShowAction.java b/src/nis/nms/web/actions/nodePosition/TopoShowAction.java index aaf355b..a96f9c1 100644 --- a/src/nis/nms/web/actions/nodePosition/TopoShowAction.java +++ b/src/nis/nms/web/actions/nodePosition/TopoShowAction.java @@ -411,7 +411,8 @@ public class TopoShowAction extends BaseAction String sql = null; if(this.getAdminMark()){ sql = "select count(diw.seq_Id) from detection_info_new diw where diw.DETECTIONED_STATE<>1 AND diw.police_emergent=0 and diw.seq_id = " - + seqId; + + seqId + + " and diw.DETECTION_SET_INFO_ID in (select dst.ID from DETECTION_SET_INFO dst where dst.DETECTION_SET_STATE=1 ) "; }else{ sql = "select count(diw.seq_Id) from detection_info_new diw where diw.DETECTIONED_STATE<>1 AND diw.police_emergent=0 and diw.seq_id = " + seqId