闪变
This commit is contained in:
@@ -68,7 +68,7 @@ public class SocketDevResponseService {
|
||||
|
||||
private List<String> icdTypeList;
|
||||
|
||||
private final List<String> 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<String> 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;
|
||||
|
||||
@@ -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次预热确保触发稳定
|
||||
|
||||
@@ -33,6 +33,9 @@ public class DevData {
|
||||
@JSONField(name = "SqlDataHarm", ordinal = 5)
|
||||
private List<SqlDataHarmDTO> sqlDataHarm;
|
||||
|
||||
@JSONField(name = "SqlDataHarm", ordinal = 6)
|
||||
private List<SlowValueTimeDTO> slowValueTimeList;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class SqlDataDTO {
|
||||
@@ -82,4 +85,30 @@ public class DevData {
|
||||
private List<String> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ public class SocketManager {
|
||||
private static List<SourceIssue> sourceIssueList = new CopyOnWriteArrayList<>();
|
||||
|
||||
/**
|
||||
* 用于存储pq_script_checkdata表里Value_Type与树字典表code
|
||||
* 用于存储pq_script_checkdata表里Value_Type与树字典表code。key为code,value为id值
|
||||
*/
|
||||
public static Map<String, String> valueTypeMap = new HashMap<>();
|
||||
|
||||
|
||||
@@ -305,8 +305,7 @@ public class NettyDevClientHandler extends SimpleChannelInboundHandler<String> {
|
||||
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分钟超时
|
||||
|
||||
@@ -27,6 +27,7 @@ public enum PowerIndexEnum {
|
||||
IMBV("IMBV", "负序电压不平衡度"),
|
||||
IMBA("IMBA", "负序电流不平衡度"),
|
||||
F("F", "短时电压闪变"),
|
||||
LF("LF", "长时电压闪变"),
|
||||
P("P", "功率"),
|
||||
ANGLE("Angle", "基波相位");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user