diff --git a/detection/src/main/java/com/njcn/gather/detection/handler/SocketDevResponseService.java b/detection/src/main/java/com/njcn/gather/detection/handler/SocketDevResponseService.java index 352ec9a8..cb5e3cbb 100644 --- a/detection/src/main/java/com/njcn/gather/detection/handler/SocketDevResponseService.java +++ b/detection/src/main/java/com/njcn/gather/detection/handler/SocketDevResponseService.java @@ -778,6 +778,7 @@ public class SocketDevResponseService { if (successComm.size() == FormalTestManager.monitorIdListComm.size()) { successComm.clear(); failComm.clear(); + icdCheckDataMap.clear(); dataTypeList = pqScriptDtlsService.getScriptToIcdCheckInfo(param); icdTypeList = FormalTestManager.devList.stream().map(PreDetection::getIcdType).distinct().collect(Collectors.toList()); @@ -822,6 +823,7 @@ public class SocketDevResponseService { icdCheckDataMap.put(icdCheckData.getIcdType(), icdCheckData); if (isContinue) { + //System.out.println("icdCheckDataMap.size()="+icdCheckDataMap.size()+",icdTypeList.size()="+icdTypeList.size()); if (icdCheckDataMap.size() == icdTypeList.size()) { SocketDataMsg temMsg = new SocketDataMsg(); temMsg.setCode(SourceResponseCodeEnum.DEV_COMM_ALL_SUCCESS.getCode()); @@ -906,13 +908,15 @@ public class SocketDevResponseService { } } else { // 发送下一个脚本与icd校验 - Map map = new HashMap<>(2); - map.put("dataType", dataTypeList); - String icdType = icdTypeList.stream().filter(it -> !icdCheckDataMap.containsKey(it)).findFirst().get(); - map.put("icdType", icdType); - socketMsg.setData(JSON.toJSONString(map)); - System.out.println("开始脚本与icd校验:++++++++++"); - SocketManager.sendMsg(s, JSON.toJSONString(socketMsg)); + String icdType = icdTypeList.stream().filter(it -> !icdCheckDataMap.containsKey(it)).findFirst().orElse(null); + if(ObjectUtil.isNotNull(icdType)){ + Map map = new HashMap<>(2); + map.put("dataType", dataTypeList); + map.put("icdType", icdType); + socketMsg.setData(JSON.toJSONString(map)); + System.out.println("开始脚本与icd校验:++++++++++"); + SocketManager.sendMsg(s, JSON.toJSONString(socketMsg)); + } } } }