diff --git a/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterService.java b/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterService.java index e7f04dcd..0c96ee1f 100644 --- a/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterService.java +++ b/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterService.java @@ -328,14 +328,17 @@ public class SocketFreqConverterService { if (ObjectUtil.isNotNull(this.lastTolerancePoint)) { boolean isNewGroup = this.isNewGroup(this.lastTolerancePoint, newTolerantPointVO); if (isNewGroup) { - if (this.lastTolerancePoint.getTolerant() == 1 && newTolerantPointVO.getTolerant() == 1) { - TolerantPointVO featurePointVO = new TolerantPointVO(); - featurePointVO.setResidualVoltage(this.lastTolerancePoint.getResidualVoltage()); - featurePointVO.setDurationMs(this.lastTolerancePoint.getDurationMs()); - featurePointVO.setTolerant(2); - socketDataMsg.setData(JSON.toJSONString(featurePointVO)); - WebServiceManager.sendMsg(this.userId, JSON.toJSONString(socketDataMsg)); - testRes.setTolerant(2); + // 纵向分组 + if (freqConverterConfig.getDirection() == 1) { + if (this.lastTolerancePoint.getTolerant() == 1 && testRes.getTolerant() == 1) { + TolerantPointVO featurePointVO = new TolerantPointVO(); + featurePointVO.setResidualVoltage(this.lastTolerancePoint.getResidualVoltage()); + featurePointVO.setDurationMs(this.lastTolerancePoint.getDurationMs()); + featurePointVO.setTolerant(2); + socketDataMsg.setData(JSON.toJSONString(featurePointVO)); + WebServiceManager.sendMsg(this.userId, JSON.toJSONString(socketDataMsg)); + testRes.setTolerant(2); + } } } else { if (this.lastTolerancePoint.getTolerant() == 1 && testRes.getTolerant() == 0) {