diff --git a/detection/src/main/java/com/njcn/gather/detection/handler/SocketContrastResponseService.java b/detection/src/main/java/com/njcn/gather/detection/handler/SocketContrastResponseService.java index 85325bbd..6e2a3efa 100644 --- a/detection/src/main/java/com/njcn/gather/detection/handler/SocketContrastResponseService.java +++ b/detection/src/main/java/com/njcn/gather/detection/handler/SocketContrastResponseService.java @@ -1100,6 +1100,15 @@ public class SocketContrastResponseService { socketMsg.setData(jsonString); SocketManager.sendMsg(s, JSON.toJSONString(socketMsg)); FormalTestManager.currentStep = SourceOperateCodeEnum.RECORD_WAVE_STEP1; + } else { + // 最终将检测结果推送到前端 + webSend.setCode(SourceResponseCodeEnum.ALL_SUCCESS.getCode());//最终成功推送 + WebServiceManager.sendMsg(param.getUserPageId(), JSON.toJSONString(webSend)); + // 修改检测点状态、设备状态 + FormalTestManager.pairsIdMap.forEach((id1, id2) -> { + pqMonitorService.updateMonitorResult(id1, adTypes, DataSourceEnum.REAL_DATA, FormalTestManager.numMap.get(id1), null, code); + pqDevService.updateResult(id1.split(CnSocketUtil.SPLIT_TAG)[0], param.getUserId()); + }); } } else { // 最终将检测结果推送到前端 diff --git a/detection/src/main/java/com/njcn/gather/detection/service/impl/DetectionServiceImpl.java b/detection/src/main/java/com/njcn/gather/detection/service/impl/DetectionServiceImpl.java index 7fc73000..a2358260 100644 --- a/detection/src/main/java/com/njcn/gather/detection/service/impl/DetectionServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/detection/service/impl/DetectionServiceImpl.java @@ -1616,15 +1616,14 @@ public class DetectionServiceImpl { resultMap.put(PowerIndexEnum.V.getKey(), isQualified(devDataList, standardDevDataList, devIdMapComm, pqErrSysDtls, true, fUn, (isDelta && isExitDelta ? DetectionCodeEnum.PVRMS.getCode() : DetectionCodeEnum.VRMS.getCode()), dataRule, num, code, oneConfig.getScale(), waveNum)); break; case IRMS: - if (ObjectUtil.isNotNull(waveNum)) { - devDataList.stream().forEach(devData -> devData.getSqlData().stream().filter(sqlData -> sqlData.getDesc().equals(DetectionCodeEnum.IRMS.getCode())).findFirst().ifPresent(sqlData -> { - DevData.SqlDataDTO.ListDTO listDTO = sqlData.getList(); - listDTO.setA(1.5); - listDTO.setC(1.5); - sqlData.setList(listDTO); - })); - } - +// if (ObjectUtil.isNotNull(waveNum)) { +// devDataList.stream().forEach(devData -> devData.getSqlData().stream().filter(sqlData -> sqlData.getDesc().equals(DetectionCodeEnum.IRMS.getCode())).findFirst().ifPresent(sqlData -> { +// DevData.SqlDataDTO.ListDTO listDTO = sqlData.getList(); +// listDTO.setA(1.5); +// listDTO.setC(1.5); +// sqlData.setList(listDTO); +// })); +// } resultMap.put(PowerIndexEnum.I.getKey(), isQualified(devDataList, standardDevDataList, devIdMapComm, pqErrSysDtls, true, fIn, DetectionCodeEnum.IRMS.getCode(), dataRule, num, code, oneConfig.getScale(), waveNum)); break; case V_UNBAN: