平台修改意见20251120-设备点位匹配解析;上传点位清单修改;

This commit is contained in:
zq
2025-12-05 08:46:19 +08:00
parent c068e7d4ab
commit 3735c4f4d8
28 changed files with 2441 additions and 452 deletions

View File

@ -67,6 +67,11 @@ public class RedisKeyConstants
*/
public static final String POINT_MATCH = "POINT_MATCH_";
/**
* topic对应站点ID redis key
*/
public static final String SITE_ID = "SITE_ID_";
/**
* 存放单个设备同步过来的原始数据-最晚一次数据
*/

View File

@ -0,0 +1,45 @@
package com.xzzn.common.enums;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* 设备点位类型
*/
public enum PointType
{
YES(1, ""),
NO(0, "");
private final Integer code;
private final String info;
private static final Map<Integer, String> CODE_NAME_MAP = new HashMap<>(PointType.values().length);
static {
Arrays.stream(PointType.values()).forEach(record -> {
CODE_NAME_MAP.put(record.code, record.info);
});
}
PointType(Integer code, String info)
{
this.code = code;
this.info = info;
}
public String getInfoByCode(Integer code) {
return CODE_NAME_MAP.get(code);
}
public Integer getCode()
{
return code;
}
public String getInfo()
{
return info;
}
}

View File

@ -0,0 +1,57 @@
package com.xzzn.common.enums;
/**
*
*/
public enum SiteDevice
{
/**
* 电池堆
*/
BMSD,
/**
* 电池簇
*/
BMSC,
/**
* PCS设备
*/
PCS,
/**
* 电表-总表
*/
LOAD,
/**
* 电表-光伏电表
*/
METEGF,
/**
* 电表-储能电表
*/
METE,
/**
* 电表-储能电表
*/
METE0,
/**
* 动环
*/
donghuan,
/**
* 动环
*/
DH,
/**
* 中水冷却
*/
ZSLQ
}

View File

@ -0,0 +1,39 @@
package com.xzzn.common.enums;
/**
* MQTT主题处理类型未知类型
*/
public enum TopicHandleType {
DEVICE("DEVICE", "设备数据"),
DEVICE_ALARM("DEVICE_ALARM", "设备告警数据"),
STRATEGY("STRATEGY", "策略数据"),
SYSTEM("SYSTEM", "系统数据"),
;
private final String code;
private final String info;
TopicHandleType(String code, String info) {
this.code = code;
this.info = info;
}
public String getName() {
return code;
}
public String getInfo() {
return info;
}
// 根据名称查找枚举
public static TopicHandleType getEnumByCode(String code) {
for (TopicHandleType type : values()) {
if (type.getName().equals(code)) {
return type;
}
}
// 默认返回SYSTEM
return SYSTEM;
}
}