代码调整

This commit is contained in:
2025-01-09 16:00:31 +08:00
parent 0b35ce08b0
commit 55e7f1ce69
6 changed files with 48 additions and 8 deletions

View File

@@ -63,7 +63,7 @@ public class SocketDevResponseService {
private final DateTimeFormatter formatter = DateTimeFormatter.ISO_DATE_TIME;
private final List<String> nonHarmonicList = Stream.of(DicDataEnum.FREQ.getCode(), DicDataEnum.V.getCode(), DicDataEnum.I.getCode(), DicDataEnum.IMBV.getCode(), DicDataEnum.IMBA.getCode(), DicDataEnum.VOLTAGE.getCode()).collect(Collectors.toList());
private final List<String> nonHarmonicList = Stream.of(DicDataEnum.FREQ.getCode(), DicDataEnum.V.getCode(), DicDataEnum.I.getCode(), DicDataEnum.IMBV.getCode(), DicDataEnum.IMBA.getCode(), DicDataEnum.VOLTAGE.getCode(), DicDataEnum.F.getCode()).collect(Collectors.toList());
private final List<String> harmonicList = Stream.of(DicDataEnum.HV.getCode(), DicDataEnum.HI.getCode(), DicDataEnum.HP.getCode(), DicDataEnum.HSV.getCode(), DicDataEnum.HSI.getCode()).collect(Collectors.toList());
private final WebSocketHandler webSocketHandler;
@@ -959,6 +959,7 @@ public class SocketDevResponseService {
}
/**
* 退出检测返回
*/
@@ -1155,10 +1156,13 @@ public class SocketDevResponseService {
}
//字典树
SocketManager.valueTypeMap = iPqScriptCheckDataService.getValueTypeMap(param.getScriptId());
initXiManager(param);
if(param.getOperateType().equals(SourceOperateCodeEnum.COEFFICIENT_TEST.getValue())){
initXiManager(param);
}
}
//初始化
//初始化系数校验参数
private void initXiManager(PreDetectionParam param) {
XiNumberManager.devParameterList.clear();

View File

@@ -119,14 +119,14 @@ public class NettyDevClientHandler extends SimpleChannelInboundHandler<String> {
System.out.println("超时函数进入-----》" + sourceIssue.getType() + "----:" + SocketManager.clockMap.get(sourceIssue.getIndex()) + "S");
if (sourceIssue.getType().equals(DicDataEnum.F.getCode())) {
//闪变
if (SocketManager.clockMap.get(sourceIssue.getIndex()) > 1800) {
//闪变,正常抛一轮最大等待20分钟超时
if (SocketManager.clockMap.get(sourceIssue.getIndex()) > 1300) {
System.out.println("超时处理-----》" + sourceIssue.getType() + "已超时----------------关闭");
CnSocketUtil.quitSend(param);
timeoutSend(sourceIssue);
}
} else if (sourceIssue.getType().equals(DicDataEnum.VOLTAGE.getCode()) || sourceIssue.getType().equals(DicDataEnum.HP.getCode())) {
//统计数据项
//统计数据项,正常抛一轮数据,超时
if (SocketManager.clockMap.get(sourceIssue.getIndex()) > 180) {
CnSocketUtil.quitSend(param);
System.out.println("超时处理-----》" + sourceIssue.getType() + "已超时----------------关闭");
@@ -191,6 +191,9 @@ public class NettyDevClientHandler extends SimpleChannelInboundHandler<String> {
}
/**
*
*/
private void timeoutSend(SourceIssue sourceIssue){
List<DevLineTestResult> devListRes = new ArrayList<>();
FormalTestManager.devList.forEach(dev -> {