3D机房查询添加set_info表关联

任务不能创建bug
This commit is contained in:
wangwenrui
2018-10-12 18:56:36 +08:00
parent 31b50142dd
commit c1d5a3c3c0
3 changed files with 16 additions and 5 deletions

View File

@@ -1249,7 +1249,6 @@ public class DetectionSetAction extends BaseAction {
} }
errBuffer.append(getI18nText("i18n_DetectionSetAction.downloadExample.rangRepeat_n81i")); errBuffer.append(getI18nText("i18n_DetectionSetAction.downloadExample.rangRepeat_n81i"));
} }
} }
// 判断数据是否存在 // 判断数据是否存在
list = this.commonService list = this.commonService
@@ -1337,6 +1336,17 @@ public class DetectionSetAction extends BaseAction {
.getGroupId()); .getGroupId());
detectionSetInfo.setNodegroup(ng); 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.setNodeIp(detectionSetInfo.getNodeIpsName());
detectionSetInfo.setDetectionSetState("1"); detectionSetInfo.setDetectionSetState("1");
detectionSetInfo.setCreateUserId(this.getUserID()); detectionSetInfo.setCreateUserId(this.getUserID());
@@ -1345,7 +1355,7 @@ public class DetectionSetAction extends BaseAction {
// 将更新操作写到操作日志中 // 将更新操作写到操作日志中
this.addDBOperationRpt(commonService, "detection_Set_Info", this.addDBOperationRpt(commonService, "detection_Set_Info",
"INSERT", detectionSetInfo.getId()); "INSERT", detectionSetInfo.getId());
commonService.commit();
// 保存并更新上传的脚本文件 // 保存并更新上传的脚本文件
saveScriptFile(myFile, detectionSetInfo); saveScriptFile(myFile, detectionSetInfo);
@@ -1354,7 +1364,7 @@ public class DetectionSetAction extends BaseAction {
// 用来实现即时向客户端发送配置信息 // 用来实现即时向客户端发送配置信息
sendSetInfo(null, detectionSetInfo, commonService); sendSetInfo(null, detectionSetInfo, commonService);
commonService.commit();
//记录用户操作用于设置向导 //记录用户操作用于设置向导
if(fromWhere!=null && !"".equals(fromWhere)){ if(fromWhere!=null && !"".equals(fromWhere)){
if(fromWhere.equals("formGuide")){ if(fromWhere.equals("formGuide")){

View File

@@ -3852,7 +3852,7 @@ public class MonitorDataAction extends BaseAction {
String nmsClientStr = objs[index2] == null ? "" : objs[index2].toString(); String nmsClientStr = objs[index2] == null ? "" : objs[index2].toString();
String state = ""; String state = "";
int initK = 1;// 默认第一个为握手监测其它监测从1开始取 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 " 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 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" + " left join check_type_info cti on dsi.check_type_id = cti.id"

View File

@@ -411,7 +411,8 @@ public class TopoShowAction extends BaseAction
String sql = null; String sql = null;
if(this.getAdminMark()){ 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 = " 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{ }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 = " 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