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 c5359f39..35ab9ba7 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 @@ -68,7 +68,7 @@ public class SocketDevResponseService { private List icdTypeList; - private final List nonHarmonicList = Stream.of(PowerIndexEnum.FREQ.getKey(), PowerIndexEnum.V.getKey(), PowerIndexEnum.I.getKey(), PowerIndexEnum.IMBV.getKey(), PowerIndexEnum.IMBA.getKey(), PowerIndexEnum.VOLTAGE.getKey(), PowerIndexEnum.F.getKey()).collect(Collectors.toList()); + private final List nonHarmonicList = Stream.of(PowerIndexEnum.FREQ.getKey(), PowerIndexEnum.V.getKey(), PowerIndexEnum.I.getKey(), PowerIndexEnum.IMBV.getKey(), PowerIndexEnum.IMBA.getKey(), PowerIndexEnum.VOLTAGE.getKey(), PowerIndexEnum.F.getKey(), PowerIndexEnum.LF.getKey()).collect(Collectors.toList()); private final IPqDevService iPqDevService; private final IPqDevSubService iPqDevSubService; diff --git a/detection/src/main/java/com/njcn/gather/detection/handler/SocketSourceResponseService.java b/detection/src/main/java/com/njcn/gather/detection/handler/SocketSourceResponseService.java index 37b968c7..ec84a46d 100644 --- a/detection/src/main/java/com/njcn/gather/detection/handler/SocketSourceResponseService.java +++ b/detection/src/main/java/com/njcn/gather/detection/handler/SocketSourceResponseService.java @@ -538,12 +538,17 @@ public class SocketSourceResponseService { int readData; if (PowerIndexEnum.F.getKey().equals(sourceIssue.getType())) { - // 闪变检测:数据变化较慢,只需少量预热和读取 - // 闪变测量稳定性好,预热1次即可 + // 短时间闪变检测:数据变化较慢,只需少量预热和读取 + // 短时间闪变测量稳定性好,预热1次即可 ignoreCount = 1; // 读取2次数据计算闪变值 readData = 2; socketMsg.setOperateCode(SourceOperateCodeEnum.DEV_DATA_REQUEST_01.getValue()); + } else if (PowerIndexEnum.LF.getKey().equals(sourceIssue.getType())) { + // 长时间闪变检测 + ignoreCount = 1; + readData = 1; + socketMsg.setOperateCode(SourceOperateCodeEnum.DEV_DATA_REQUEST_01.getValue()); } else if (PowerIndexEnum.VOLTAGE.getKey().equals(sourceIssue.getType())) { // 暂态电压检测:需要更多预热时间,但只读取一次快照 // 暂态事件需要5次预热确保触发稳定 diff --git a/detection/src/main/java/com/njcn/gather/detection/pojo/po/DevData.java b/detection/src/main/java/com/njcn/gather/detection/pojo/po/DevData.java index 3d974cc1..d3bec831 100644 --- a/detection/src/main/java/com/njcn/gather/detection/pojo/po/DevData.java +++ b/detection/src/main/java/com/njcn/gather/detection/pojo/po/DevData.java @@ -33,6 +33,9 @@ public class DevData { @JSONField(name = "SqlDataHarm", ordinal = 5) private List sqlDataHarm; + @JSONField(name = "SqlDataHarm", ordinal = 6) + private List slowValueTimeList; + @NoArgsConstructor @Data public static class SqlDataDTO { @@ -82,4 +85,30 @@ public class DevData { private List c; } } + + @NoArgsConstructor + @Data + public static class SlowValueTimeDTO { + @JSONField(name = "type", ordinal = 1) + private String type; // 类似于 real、avg 、max、min、cp95 + + @JSONField(name = "desc", ordinal = 2) + private String desc; // 类似于 FREQ、PST、IRMS、VRMS等指标项 + + @JSONField(name = "list", ordinal = 3) + private ListDTO list; + + @NoArgsConstructor + @Data + public static class ListDTO { + @JSONField(name = "A", ordinal = 1) + private String a; // 表示时间 "2026-07-15T08:42:54.705" + @JSONField(name = "B", ordinal = 2) + private String b; + @JSONField(name = "C", ordinal = 3) + private String c; + @JSONField(name = "T", ordinal = 4) + private String t; + } + } } diff --git a/detection/src/main/java/com/njcn/gather/detection/util/socket/SocketManager.java b/detection/src/main/java/com/njcn/gather/detection/util/socket/SocketManager.java index 1452256b..faaeef4c 100644 --- a/detection/src/main/java/com/njcn/gather/detection/util/socket/SocketManager.java +++ b/detection/src/main/java/com/njcn/gather/detection/util/socket/SocketManager.java @@ -297,7 +297,7 @@ public class SocketManager { private static List sourceIssueList = new CopyOnWriteArrayList<>(); /** - * 用于存储pq_script_checkdata表里Value_Type与树字典表code + * 用于存储pq_script_checkdata表里Value_Type与树字典表code。key为code,value为id值 */ public static Map valueTypeMap = new HashMap<>(); diff --git a/detection/src/main/java/com/njcn/gather/detection/util/socket/cilent/NettyDevClientHandler.java b/detection/src/main/java/com/njcn/gather/detection/util/socket/cilent/NettyDevClientHandler.java index 242a5b89..9ace5153 100644 --- a/detection/src/main/java/com/njcn/gather/detection/util/socket/cilent/NettyDevClientHandler.java +++ b/detection/src/main/java/com/njcn/gather/detection/util/socket/cilent/NettyDevClientHandler.java @@ -305,8 +305,7 @@ public class NettyDevClientHandler extends SimpleChannelInboundHandler { String type = sourceIssue.getType(); // 根据不同检测类型使用不同的超时阈值 - if (PowerIndexEnum.F.getKey().equals(type)) { - // 闪变检测:需要更长时间,20分钟超时 + if (PowerIndexEnum.F.getKey().equals(type) || PowerIndexEnum.LF.getKey().equals(type)) { return currentTime >= SHORT_FLICKER_TIMEOUT; } else if (PowerIndexEnum.VOLTAGE.getKey().equals(type) || PowerIndexEnum.HP.getKey().equals(type)) { // 统计数据类型(电压、谐波):中等时间,3分钟超时 diff --git a/detection/src/main/java/com/njcn/gather/report/pojo/enums/PowerIndexEnum.java b/detection/src/main/java/com/njcn/gather/report/pojo/enums/PowerIndexEnum.java index d5fdb7db..da446eb4 100644 --- a/detection/src/main/java/com/njcn/gather/report/pojo/enums/PowerIndexEnum.java +++ b/detection/src/main/java/com/njcn/gather/report/pojo/enums/PowerIndexEnum.java @@ -27,6 +27,7 @@ public enum PowerIndexEnum { IMBV("IMBV", "负序电压不平衡度"), IMBA("IMBA", "负序电流不平衡度"), F("F", "短时电压闪变"), + LF("LF", "长时电压闪变"), P("P", "功率"), ANGLE("Angle", "基波相位");