diff --git a/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterDevService.java b/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterDevService.java index a238a52b..38c8a9bb 100644 --- a/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterDevService.java +++ b/detection/src/main/java/com/njcn/gather/detection/handler/SocketFreqConverterDevService.java @@ -370,6 +370,7 @@ public class SocketFreqConverterDevService { String freqConverterTag = currentUserId + CnSocketUtil.FREQ_CONVERTER_TAG; // 避免过早把 freqConverterTableSuffix 等全局值清掉,造成变频器无法使用全局变量 if (!SocketManager.isChannelActive(freqConverterTag)) { + FormalTestManager.freqConverterStep = null; FormalTestManager.clearFreqConverterRuntimeState(); } } 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 c39c9144..03155e10 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 @@ -284,6 +284,7 @@ public class SocketFreqConverterService { String devTag = currentUserId + CnSocketUtil.DEV_TAG; // 避免过早把 freqConverterTableSuffix 等全局值清掉,造成设备无法使用全局变量 if (!SocketManager.isChannelActive(devTag)) { + FormalTestManager.freqConverterDevStep = null; FormalTestManager.clearFreqConverterRuntimeState(); } } diff --git a/detection/src/main/java/com/njcn/gather/detection/util/socket/FormalTestManager.java b/detection/src/main/java/com/njcn/gather/detection/util/socket/FormalTestManager.java index e773b619..bc51a626 100644 --- a/detection/src/main/java/com/njcn/gather/detection/util/socket/FormalTestManager.java +++ b/detection/src/main/java/com/njcn/gather/detection/util/socket/FormalTestManager.java @@ -230,8 +230,6 @@ public class FormalTestManager { * 清理变频器耐受实验运行态数据 */ public static void clearFreqConverterRuntimeState() { - freqConverterStep = null; - freqConverterDevStep = null; currentFreqConverterId = null; freqConverterTableSuffix = null; pendingDipTaskMap.clear();