平台修改意见20251120-021_FXX_01站点设备点位初始化配置,读取配置的设备点位匹配关系,存储对应的点位数据

This commit is contained in:
zq
2025-11-29 19:54:10 +08:00
parent d9c0ff733a
commit b38bc36ad6
9 changed files with 1092 additions and 347 deletions

View File

@ -0,0 +1,39 @@
package com.xzzn.common.utils;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class DataUtils {
private static final Log log = LogFactory.getLog(DataUtils.class);
public static String getJSONFromFile(InputStream inputStream) {
BufferedReader bufferReader = null;
StringBuffer stringBuffer = new StringBuffer();
try {
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "utf-8");
bufferReader = new BufferedReader(inputStreamReader);
stringBuffer = new StringBuffer();
String lineData = null;
while ((lineData = bufferReader.readLine()) != null) {
stringBuffer.append(lineData);
}
} catch (Exception e) {
log.warn("getJSONFromFile error", e);
} finally {
if (null != bufferReader) {
try {
bufferReader.close();
inputStream.close();
} catch (Exception e) {
log.warn("getJSONFromFile error", e);
}
}
}
return stringBuffer.toString();
}
}

View File

@ -0,0 +1,116 @@
package com.xzzn.ems.domain.vo;
import java.util.Map;
public class DevicePointMatchInfo {
private Map<String, String> pcs;
private Map<String, String> branch;
private Map<String, String> stack;
private Map<String, String> cluster;
private Map<String, String> battery;
private Map<String, String> ammeterLoad;
private Map<String, String> ammeterMete;
private Map<String, String> cooling;
private Map<String, String> dh;
private Map<String, String> xf;
private Map<String, String> batteryGroup;
public Map<String, String> getPcs() {
return pcs;
}
public void setPcs(Map<String, String> pcs) {
this.pcs = pcs;
}
public Map<String, String> getBranch() {
return branch;
}
public void setBranch(Map<String, String> branch) {
this.branch = branch;
}
public Map<String, String> getStack() {
return stack;
}
public void setStack(Map<String, String> stack) {
this.stack = stack;
}
public Map<String, String> getCluster() {
return cluster;
}
public void setCluster(Map<String, String> cluster) {
this.cluster = cluster;
}
public Map<String, String> getBattery() {
return battery;
}
public void setBattery(Map<String, String> battery) {
this.battery = battery;
}
public Map<String, String> getAmmeterLoad() {
return ammeterLoad;
}
public void setAmmeterLoad(Map<String, String> ammeterLoad) {
this.ammeterLoad = ammeterLoad;
}
public Map<String, String> getAmmeterMete() {
return ammeterMete;
}
public void setAmmeterMete(Map<String, String> ammeterMete) {
this.ammeterMete = ammeterMete;
}
public Map<String, String> getCooling() {
return cooling;
}
public void setCooling(Map<String, String> cooling) {
this.cooling = cooling;
}
public Map<String, String> getDh() {
return dh;
}
public void setDh(Map<String, String> dh) {
this.dh = dh;
}
public Map<String, String> getXf() {
return xf;
}
public void setXf(Map<String, String> xf) {
this.xf = xf;
}
public Map<String, String> getBatteryGroup() {
return batteryGroup;
}
public void setBatteryGroup(Map<String, String> batteryGroup) {
this.batteryGroup = batteryGroup;
}
}

View File

@ -6,6 +6,7 @@ import com.xzzn.ems.domain.EmsBatteryData;
import com.xzzn.ems.domain.EmsBatteryGroup;
import com.xzzn.ems.domain.EmsBatteryStack;
import com.xzzn.ems.domain.EmsCoolingData;
import com.xzzn.ems.domain.EmsDhData;
import com.xzzn.ems.domain.EmsPcsBranchData;
import com.xzzn.ems.domain.EmsPcsData;
import com.xzzn.ems.domain.EmsXfData;
@ -25,7 +26,7 @@ public enum DeviceMatchTable
BATTERY("BATTERY", "ems_battery_data", EmsBatteryData.class),
AMMETER("AMMETER", "ems_ammeter_data", EmsAmmeterData.class),
COOLING("COOLING", "ems_cooling_data", EmsCoolingData.class),
DH("DH", "ems_dh_data", EmsBatteryData.class),
DH("DH", "ems_dh_data", EmsDhData.class),
XF("XF", "ems_xf_data", EmsXfData.class),
BATTERY_GROUP("BATTERY_GROUP", "ems_battery_group", EmsBatteryGroup.class);

View File

@ -32,5 +32,11 @@ public interface IEmsPointMatchService
*/
public String importPoint(List<EmsPointMatch> userList, boolean updateSupport, String operName);
/**
* 上传设备的点位清单
* @param request
* @return
* @throws Exception
*/
public List<DevicePointMatchVo> importDataByDevice(ImportPointDataRequest request, String operName);
}

View File

@ -3,6 +3,7 @@ package com.xzzn.ems.service.impl;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import com.alibaba.fastjson2.JSON;
import com.xzzn.common.constant.RedisKeyConstants;
@ -27,7 +28,7 @@ import com.xzzn.ems.enums.DeviceMatchTable;
import com.xzzn.ems.mapper.EmsPointMatchMapper;
import com.xzzn.ems.domain.EmsPointMatch;
import com.xzzn.ems.service.IEmsPointMatchService;
import com.xzzn.ems.utils.MatchTableUtils;
import com.xzzn.ems.utils.DevicePointMatchDataProcessor;
import javax.validation.Validator;
@ -113,6 +114,12 @@ public class EmsPointMatchServiceImpl implements IEmsPointMatchService
return successMsg.toString();
}
/**
* 导入设备点位清单数据到数据库并同步到Redis
* @param request
* @param operName
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public List<DevicePointMatchVo> importDataByDevice(ImportPointDataRequest request, String operName) {
@ -148,12 +155,12 @@ public class EmsPointMatchServiceImpl implements IEmsPointMatchService
savePoint.setDeviceId(deviceId);
savePoint.setDeviceCategory(deviceCategory);
savePoint.setMatchTable(DeviceMatchTable.getMatchTableByCode(deviceCategory));
savePoint.setPointName(MatchTableUtils.getFieldAnnotation(DeviceMatchTable.getClassByTable(savePoint.getMatchTable()), StringUtils.toCamelCase(savePoint.getMatchField())));
savePoint.setPointName(DevicePointMatchDataProcessor.getFieldAnnotation(DeviceMatchTable.getClassByTable(savePoint.getMatchTable()), StringUtils.toCamelCase(savePoint.getMatchField())));
savePoint.setCreateBy(operName);
savePoint.setUpdateBy(operName);
// 验证点位是否存在
EmsPointMatch dbPoint = emsPointMatchMapper.getOnePointMatch(siteId, deviceId, deviceCategory, pointMatch.getDataPoint());
if (StringUtils.isNull(dbPoint)) {
if (Objects.isNull(dbPoint)) {
emsPointMatchMapper.insertEmsPointMatch(savePoint);
} else {
emsPointMatchMapper.updateEmsPointMatch(savePoint);

View File

@ -15,17 +15,25 @@ import com.xzzn.common.utils.StringUtils;
import com.xzzn.ems.domain.*;
import com.xzzn.ems.domain.vo.EnergyPriceTimeRange;
import com.xzzn.ems.domain.vo.EnergyPriceVo;
import com.xzzn.ems.enums.DeviceMatchTable;
import com.xzzn.ems.mapper.*;
import com.xzzn.ems.service.IEmsAlarmRecordsService;
import com.xzzn.ems.service.IEmsEnergyPriceConfigService;
import com.xzzn.ems.service.IFXXDataProcessService;
import com.xzzn.ems.utils.AbstractBatteryDataProcessor;
import com.xzzn.ems.utils.DevicePointMatchDataProcessor;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.yaml.snakeyaml.introspector.PropertyUtils;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
@ -34,6 +42,7 @@ import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.stream.Collectors;
@Service
@ -84,6 +93,8 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
private IEmsEnergyPriceConfigService emsEnergyPriceConfigService;
@Autowired
private IEmsEnergyPriceConfigService iEmsEnergyPriceConfigService;
@Autowired
private DevicePointMatchDataProcessor devicePointMatchDataProcessor;
// 构造方法(调用父类构造)
public FXXDataProcessServiceImpl(ObjectMapper objectMapper) {
@ -144,6 +155,11 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
});
EmsCoolingData coolingData = new EmsCoolingData();
// 点位匹配数据
List<EmsPointMatch> pointMatchList = devicePointMatchDataProcessor.getDevicePointMatch(SITE_ID, deviceId, DeviceMatchTable.COOLING.getCode());
if (CollectionUtils.isNotEmpty(pointMatchList)) {
saveDeviceData(pointMatchList, obj, coolingData);
} else {
coolingData.setGsTemp(StringUtils.getBigDecimal(obj.get("GSWD")));
coolingData.setHsTemp(StringUtils.getBigDecimal(obj.get("HSWD")));
coolingData.setGsPressure(StringUtils.getBigDecimal(obj.get("GSYL")));
@ -151,6 +167,7 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
coolingData.setLysTemp(StringUtils.getBigDecimal(obj.get("LYSWD")));
coolingData.setVb01Kd(StringUtils.getBigDecimal(obj.get("VB1KD")));
coolingData.setVb02Kd(StringUtils.getBigDecimal(obj.get("VB2KD")));
}
coolingData.setCreateBy("system");
coolingData.setCreateTime(DateUtils.getNowDate());
@ -162,6 +179,8 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
emsCoolingDataMapper.insertEmsCoolingData(coolingData);
redisCache.setCacheObject(RedisKeyConstants.COOLING + SITE_ID + "_" +deviceId, coolingData);
saveDevicePointMatchData(pointMatchList, deviceId, DeviceMatchTable.COOLING, "ZSLQ");
}
private void dhDataProcess(String deviceId, String dataJson) {
@ -171,9 +190,14 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
//DH
EmsDhData dhData = new EmsDhData();
// 点位匹配数据
List<EmsPointMatch> pointMatchList = devicePointMatchDataProcessor.getDevicePointMatch(SITE_ID, deviceId, DeviceMatchTable.DH.getCode());
if (CollectionUtils.isNotEmpty(pointMatchList)) {
saveDeviceData(pointMatchList, obj, dhData);
} else {
dhData.setHumidity(StringUtils.getBigDecimal(obj.get("SD3")));
dhData.setTemperature(StringUtils.getBigDecimal(obj.get("WD3")));
}
dhData.setCreateBy("system");
dhData.setCreateTime(DateUtils.getNowDate());
@ -184,6 +208,8 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
emsDhDataMapper.insertEmsDhData(dhData);
redisCache.setCacheObject(RedisKeyConstants.DH + SITE_ID + "_" +deviceId, dhData);
saveDevicePointMatchData(pointMatchList, deviceId, DeviceMatchTable.DH, "donghuan");
}
private void batteryStackDataProcess(String deviceId, String dataJson) {
@ -200,6 +226,12 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
dataStack.setPcsCommunicationStatus(CommunicationStatus.OK.getCode());
dataStack.setEmsCommunicationStatus(CommunicationStatus.OK.getCode());
// 点位匹配数据
List<EmsPointMatch> pointMatchList = devicePointMatchDataProcessor.getDevicePointMatch(SITE_ID, deviceId, DeviceMatchTable.STACK.getCode());
if (CollectionUtils.isNotEmpty(pointMatchList)) {
saveDeviceData(pointMatchList, obj, dataStack);
} else {
// 电池堆状态数据设置
dataStack.setOperationStatus(StringUtils.getString(obj.get("DCZT")));
dataStack.setStackVoltage(StringUtils.getBigDecimal(obj.get("DCDDY")));
@ -231,11 +263,11 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
dataStack.setAvailableChargeCapacity(StringUtils.getBigDecimal(obj.get("DKCDL")));
dataStack.setAvailableDischargeCapacity(StringUtils.getBigDecimal(obj.get("DKFDL")));
// 时间信息
// 时间信息
dataStack.setRemainingDischargeTime(StringUtils.getLong(obj.get("KYFDSJ")));
dataStack.setRemainingChargeTime(StringUtils.getLong(obj.get("KYCDSJ")));
// 功率/电流限制
// 功率/电流限制
dataStack.setMaxDischargePower(StringUtils.getBigDecimal(obj.get("YXZDFDGL")));
dataStack.setMaxChargePower(StringUtils.getBigDecimal(obj.get("YXZDCDGL")));
dataStack.setMaxDischargeCurrent(StringUtils.getBigDecimal(obj.get("YXZDFDDL")));
@ -253,6 +285,8 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
dataStack.setBmsChargeStatus(StringUtils.getString(obj.get("BMSCFDZT")));
dataStack.setStackInsulationResistance(StringUtils.getBigDecimal(obj.get("DCDJYDZ")));
}
dataStack.setCreateBy("system");
dataStack.setCreateTime(DateUtils.getNowDate());
@ -264,8 +298,41 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
emsBatteryStackMapper.insertEmsBatteryStack(dataStack);
redisCache.setCacheObject(RedisKeyConstants.STACK + SITE_ID + "_" +deviceId, dataStack);
saveDevicePointMatchData(pointMatchList, deviceId, DeviceMatchTable.STACK, "BMSD");
}
private void saveDeviceData(List<EmsPointMatch> pointMatchList, Map<String, Object> obj, Object entity) {
Map<String, String> pointMatchMap = pointMatchList.stream().collect(Collectors.toMap(data -> StringUtils.toCamelCase(data.getMatchField()), EmsPointMatch::getDataPoint));
Field[] fields = entity.getClass().getDeclaredFields();
for (Field field : fields) {
if (pointMatchMap.containsKey(field.getName())) {
field.setAccessible(true);
try {
Object matchValue = obj.get(pointMatchMap.get(field.getName()));
Class<?> fieldType = field.getType();
if (String.class.equals(fieldType)) {
matchValue = StringUtils.getString(matchValue);
} else if (Long.class.equals(fieldType)) {
matchValue = StringUtils.getLong(matchValue);
} else if (BigDecimal.class.equals(fieldType)) {
matchValue = StringUtils.getBigDecimal(matchValue);
}
field.set(entity, matchValue);
} catch (IllegalAccessException e) {
log.warn("batteryStackDataProcess 设置字段值时出错", e);
}
}
}
}
private void saveDevicePointMatchData(List<EmsPointMatch> pointMatchList, String deviceId,
DeviceMatchTable pointMatchType, String dataDevice){
if (CollectionUtils.isNotEmpty(pointMatchList)) {
return;
}
devicePointMatchDataProcessor.saveDevicePointMatch(SITE_ID, deviceId, pointMatchType, dataDevice);
}
private void batteryClusterDataProcess(String deviceId, String dataJson) {
@ -283,6 +350,12 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
}
//BMS 电池簇
EmsBatteryCluster data = new EmsBatteryCluster();
// 点位匹配数据
List<EmsPointMatch> pointMatchList = devicePointMatchDataProcessor.getDevicePointMatch(SITE_ID, deviceId, DeviceMatchTable.CLUSTER.getCode());
if (CollectionUtils.isNotEmpty(pointMatchList)) {
saveDeviceData(pointMatchList, obj, data);
} else {
// 设置所有 BigDecimal 类型字段为 ZERO
data.setChargeableCapacity(StringUtils.getBigDecimal(obj.get("KCDL")));
data.setClusterVoltage(StringUtils.getBigDecimal(obj.get("ZDY")));
@ -320,6 +393,16 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
data.setTotalDischargeEnergy(StringUtils.getBigDecimal(obj.get("DCLJFDDL")));
// 其他非 BigDecimal 字段
data.setMaxCellVoltageId(StringUtils.getString(obj.get("ZGDTDYDYD")));
data.setMinCellVoltageId(StringUtils.getString(obj.get("ZDDTDYDYD")));
data.setMaxCellTempId(StringUtils.getString(obj.get("ZGDTWDDYD")));
data.setMinCellTempId(StringUtils.getString(obj.get("ZDDTWDDYD")));
data.setMaxCellSocId(StringUtils.getString(obj.get("ZGDTSOCDYD")));
data.setMinCellSocId(StringUtils.getString(obj.get("ZDDTSOCDYD")));
data.setMaxCellSohId(StringUtils.getString(obj.get("ZGDTSOHDYD")));
data.setMinCellSohId(StringUtils.getString(obj.get("ZDDTSOHDYD")));
}
data.setWorkStatus(WorkStatus.NORMAL.getCode()); // 或其他默认值
data.setPcsCommunicationStatus(CommunicationStatus.OK.getCode());
data.setEmsCommunicationStatus(CommunicationStatus.OK.getCode());
@ -329,14 +412,6 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
data.setUpdateTime(DateUtils.getNowDate());
data.setSiteId(SITE_ID);
data.setDeviceId(deviceId);
data.setMaxCellVoltageId(StringUtils.getString(obj.get("ZGDTDYDYD")));
data.setMinCellVoltageId(StringUtils.getString(obj.get("ZDDTDYDYD")));
data.setMaxCellTempId(StringUtils.getString(obj.get("ZGDTWDDYD")));
data.setMinCellTempId(StringUtils.getString(obj.get("ZDDTWDDYD")));
data.setMaxCellSocId(StringUtils.getString(obj.get("ZGDTSOCDYD")));
data.setMinCellSocId(StringUtils.getString(obj.get("ZDDTSOCDYD")));
data.setMaxCellSohId(StringUtils.getString(obj.get("ZGDTSOHDYD")));
data.setMinCellSohId(StringUtils.getString(obj.get("ZDDTSOHDYD")));
if (StringUtils.isNotBlank(stackDeviceId)) {
data.setStackDeviceId(stackDeviceId);
} else {
@ -346,6 +421,7 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
redisCache.setCacheObject(RedisKeyConstants.CLUSTER + SITE_ID + "_" +deviceId, data);
saveDevicePointMatchData(pointMatchList, deviceId, DeviceMatchTable.CLUSTER, "BMSC");
}
private void batteryDataProcess(String deviceId, String dataJson, Date dataUpdateTime) {
@ -368,6 +444,8 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
LocalDateTime oneHourAgo = LocalDateTime.now().minus(1, ChronoUnit.HOURS);
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
String oneHourAgoStr = oneHourAgo.format(formatter);
// 点位匹配数据
List<EmsPointMatch> pointMatchList = devicePointMatchDataProcessor.getDevicePointMatch(SITE_ID, deviceId, DeviceMatchTable.BATTERY.getCode());
//单体电池
for (Map.Entry<String, Map<String, Object>> record : records.entrySet()) {
String recordId = record.getKey();
@ -376,10 +454,15 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
EmsBatteryData batteryData = new EmsBatteryData();
batteryData.setDeviceId(recordId);
batteryData.setBatteryCellId(recordId);
if (CollectionUtils.isNotEmpty(pointMatchList)) {
saveDeviceData(pointMatchList, fields, batteryData);
} else {
batteryData.setSoc(StringUtils.getBigDecimal(fields.get("DTSOC")));
batteryData.setSoh(StringUtils.getBigDecimal(fields.get("DTSOH")));
batteryData.setTemperature(StringUtils.getBigDecimal(fields.get("DTWD")));
batteryData.setVoltage(StringUtils.getBigDecimal(fields.get("DTDY")));
}
batteryData.setBatteryCluster(deviceId);
batteryData.setBatteryPack(stackDeviceId);
@ -412,6 +495,8 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
redisCache.deleteList(RedisKeyConstants.BATTERY + SITE_ID + "_" + deviceId);
redisCache.setCacheList(RedisKeyConstants.BATTERY + SITE_ID + "_" + deviceId, list);
saveDevicePointMatchData(pointMatchList, deviceId, DeviceMatchTable.BATTERY, "BMSC");
}
// 批量处理每日最新数据
@ -434,14 +519,15 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
private void pcsDataProcess(String deviceId, String dataJson, Date dataUpdateTime) {
Map<String, Object> obj = JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {
});
//pcs
EmsPcsData pcsData = new EmsPcsData();
// 时间与状态类字段
pcsData.setDataUpdateTime(dataUpdateTime);
pcsData.setWorkStatus(WorkStatus.NORMAL.getCode());
pcsData.setGridStatus(GridStatus.GRID.getCode());
pcsData.setDeviceStatus(DeviceRunningStatus.RUNNING.getCode());
pcsData.setControlMode(ControlModeStatus.REMOTE.getCode());
// 点位匹配数据
List<EmsPointMatch> pointMatchList = devicePointMatchDataProcessor.getDevicePointMatch(SITE_ID, deviceId, DeviceMatchTable.PCS.getCode());
if (CollectionUtils.isNotEmpty(pointMatchList)) {
saveDeviceData(pointMatchList, obj, pcsData);
} else {
// 功率与能量类字段
pcsData.setTotalActivePower(StringUtils.getBigDecimal(obj.get("YGGL")));
@ -492,6 +578,15 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
pcsData.setvTemperature(StringUtils.getBigDecimal(obj.get("DY1VXIGBTWD")));
pcsData.setwTemperature(StringUtils.getBigDecimal(obj.get("DY1WXIGBTWD")));
}
// 时间与状态类字段
pcsData.setDataUpdateTime(dataUpdateTime);
pcsData.setWorkStatus(WorkStatus.NORMAL.getCode());
pcsData.setGridStatus(GridStatus.GRID.getCode());
pcsData.setDeviceStatus(DeviceRunningStatus.RUNNING.getCode());
pcsData.setControlMode(ControlModeStatus.REMOTE.getCode());
// 系统管理字段
pcsData.setCreateBy("system");
pcsData.setCreateTime(DateUtils.getNowDate());
@ -504,13 +599,15 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
emsPcsDataMapper.insertEmsPcsData(pcsData);
redisCache.setCacheObject(RedisKeyConstants.PCS + SITE_ID + "_" +deviceId, pcsData);
saveDevicePointMatchData(pointMatchList, deviceId, DeviceMatchTable.PCS, "PCS");
}
private void pcsBranchDataProcess(String deviceId, String dataJson) {
Map<String, Map<String, Object>> records = processDataPrefix(JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {}));
List<EmsPcsBranchData> list = new ArrayList<>();
// 点位匹配数据
List<EmsPointMatch> pointMatchList = devicePointMatchDataProcessor.getDevicePointMatch(SITE_ID, deviceId, DeviceMatchTable.BRANCH.getCode());
//PCS支路
for (Map.Entry<String, Map<String, Object>> record : records.entrySet()) {
@ -521,6 +618,9 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
data.setDeviceId(deviceId);
data.setSiteId(SITE_ID);
data.setGridStatus(GridStatus.GRID.getCode());
if (CollectionUtils.isNotEmpty(pointMatchList)) {
saveDeviceData(pointMatchList, fields, data);
} else {
data.setDcPower(StringUtils.getBigDecimal(fields.get("ZLGL")));
data.setDcVoltage(StringUtils.getBigDecimal(fields.get("ZLDY")));
data.setDcCurrent(StringUtils.getBigDecimal(fields.get("ZLDL")));
@ -543,6 +643,7 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
data.setTotalLoadRatio(StringUtils.getBigDecimal(fields.get("ZFZB")));
data.setAcLeakageCurrent(StringUtils.getBigDecimal(fields.get("JLLDL")));
data.setInsulationResistance(StringUtils.getBigDecimal(fields.get("JYZK")));
}
data.setBranchId(recordId);
data.setCreateBy("system");
data.setCreateTime(DateUtils.getNowDate());
@ -555,6 +656,7 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
redisCache.setCacheObject(RedisKeyConstants.BRANCH + SITE_ID + "_" +deviceId, list);
saveDevicePointMatchData(pointMatchList, deviceId, DeviceMatchTable.BRANCH, "PCS");
}
}
@ -569,6 +671,12 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
// 更新时间
dataLoad.setDataUpdateTime(dataUpdateTime);
// 点位匹配数据
List<EmsPointMatch> pointMatchList = devicePointMatchDataProcessor.getDevicePointMatch(SITE_ID, deviceId, DeviceMatchTable.AMMETER.getCode());
if (CollectionUtils.isNotEmpty(pointMatchList)) {
saveDeviceData(pointMatchList, obj, dataLoad);
} else {
// 电能设置-组合有功
dataLoad.setCurrentCombActiveTotal(StringUtils.getBigDecimal(obj.get("DQZHYGZDN")));
dataLoad.setCurrentCombActivePeak(StringUtils.getBigDecimal(obj.get("DQZHYGJDN")));
@ -646,6 +754,7 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
dataLoad.setReverseAcMaxDemand(StringUtils.getBigDecimal(obj.get("FXYGZDXL")));
dataLoad.setDailyForwardMaxDemand(StringUtils.getBigDecimal(obj.get("DRZXYGZDXL")));
}
dataLoad.setCreateBy("system");
dataLoad.setCreateTime(DateUtils.getNowDate());
dataLoad.setUpdateBy("system");
@ -656,6 +765,8 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
emsAmmeterDataMapper.insertEmsAmmeterData(dataLoad);
redisCache.setCacheObject(RedisKeyConstants.AMMETER + SITE_ID + "_" +deviceId, dataLoad);
saveDevicePointMatchData(pointMatchList, deviceId, DeviceMatchTable.AMMETER, "LOAD");
}
private void dealFXXDailyChargeDate(String deviceId, String dataJson) {
@ -694,7 +805,11 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
EmsAmmeterData dataLoad = new EmsAmmeterData();
// 更新时间
dataLoad.setDataUpdateTime(dataUpdateTime);
// 点位匹配数据
List<EmsPointMatch> pointMatchList = devicePointMatchDataProcessor.getDevicePointMatch(SITE_ID, deviceId, DeviceMatchTable.AMMETER.getCode());
if (CollectionUtils.isNotEmpty(pointMatchList)) {
saveDeviceData(pointMatchList, obj, dataLoad);
} else {
// 电压+电流
dataLoad.setPhaseAVoltage(StringUtils.getBigDecimal(obj.get("AXDY")));
dataLoad.setPhaseBVoltage(StringUtils.getBigDecimal(obj.get("BXDY")));
@ -767,6 +882,7 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
dataLoad.setCurrentForwardReactiveTotal(StringUtils.getBigDecimal(obj.get("ZXWGDN")));
dataLoad.setCurrentReverseReactiveTotal(StringUtils.getBigDecimal(obj.get("FXWGDN")));
}
dataLoad.setCreateBy("system");
dataLoad.setCreateTime(DateUtils.getNowDate());
dataLoad.setUpdateBy("system");
@ -778,6 +894,8 @@ public class FXXDataProcessServiceImpl extends AbstractBatteryDataProcessor impl
redisCache.setCacheObject(RedisKeyConstants.AMMETER + SITE_ID + "_" +deviceId, dataLoad);
saveDevicePointMatchData(pointMatchList, deviceId, DeviceMatchTable.AMMETER, "METE");
// 处理电表每日充放电数据
dealAmmeterDailyDate(obj, dataUpdateTime, lastAmmeterData);
}

View File

@ -0,0 +1,180 @@
package com.xzzn.ems.utils;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.xzzn.common.annotation.Excel;
import com.xzzn.common.constant.RedisKeyConstants;
import com.xzzn.common.core.redis.RedisCache;
import com.xzzn.common.enums.DeviceCategory;
import com.xzzn.common.utils.DataUtils;
import com.xzzn.common.utils.StringUtils;
import com.xzzn.ems.domain.EmsDevicesSetting;
import com.xzzn.ems.domain.EmsPointMatch;
import com.xzzn.ems.domain.vo.DevicePointMatchInfo;
import com.xzzn.ems.enums.DeviceMatchTable;
import com.xzzn.ems.mapper.EmsDevicesSettingMapper;
import com.xzzn.ems.mapper.EmsPointMatchMapper;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import javax.annotation.PostConstruct;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Service;
@Service
public class DevicePointMatchDataProcessor {
private static final Log log = LogFactory.getLog(DevicePointMatchDataProcessor.class);
private DevicePointMatchInfo devicePointMatchInfo;
@Autowired
private EmsDevicesSettingMapper emsDevicesSettingMapper;
@Autowired
private EmsPointMatchMapper emsPointMatchMapper;
@Autowired
private RedisCache redisCache;
/**
* 初始化加载设备匹配点位配置数据
*/
@PostConstruct
public void init()
{
try {
ClassPathResource classPathResource = new ClassPathResource("biz/configData/DevicePointMatch.json");
String configJson = DataUtils.getJSONFromFile(classPathResource.getInputStream());
devicePointMatchInfo = JSONObject.parseObject(configJson, DevicePointMatchInfo.class);
log.info("初始化设备匹配点位配置数据成功。"+ JSON.toJSONString(devicePointMatchInfo));
} catch (Exception ex) {
log.error("OcrMedicalStdHandler 设置mapping数据异常。", ex);
}
}
/**
* 获取字段注解信息
*/
public static String getFieldAnnotation(Class<?> clazz, String filedName)
{
List<Field> tempFields = new ArrayList<>();
tempFields.addAll(Arrays.asList(clazz.getDeclaredFields()));
for (Field field : tempFields) {
if (StringUtils.equals(filedName, field.getName()) && field.isAnnotationPresent(Excel.class))
{
Excel column = field.getAnnotation(Excel.class);
return column.name();
}
}
return null;
}
public List<EmsPointMatch> getDevicePointMatch(String siteId, String deviceId, String deviceCategory) {
// List<EmsPointMatch> pointMatchList = new ArrayList<>();
// EmsDevicesSetting devicesSetting = emsDevicesSettingMapper.getDeviceBySiteAndDeviceId(deviceId, siteId);
// if (devicesSetting == null) {
// log.info("未找到设备配置信息siteId: " + siteId + ", deviceId: "+ deviceId);
// return pointMatchList;
// }
List<EmsPointMatch> pointMatchList = redisCache.getCacheList(getPointTacthCacheKey(siteId, deviceId, deviceCategory));
if (CollectionUtils.isEmpty(pointMatchList)) {
pointMatchList = emsPointMatchMapper.getDevicePointMatchList(siteId, deviceId, deviceCategory);
}
return pointMatchList;
}
public void saveDevicePointMatch(String siteId, String deviceId, DeviceMatchTable pointMatchType, String dataDevice) {
// EmsDevicesSetting devicesSetting = emsDevicesSettingMapper.getDeviceBySiteAndDeviceId(deviceId, siteId);
// if (devicesSetting == null) {
// return;
// }
// String deviceCategory = devicesSetting.getDeviceCategory();
String deviceCategory = pointMatchType.getCode();
Map<String, String> devicePintointMtachInfo = this.getDevicePointMtachInfo(pointMatchType, dataDevice);
if (devicePintointMtachInfo.isEmpty()) {
return;
}
try {
devicePintointMtachInfo.forEach((key, value) -> {
// 查询点位是否存在
EmsPointMatch dbPoint = emsPointMatchMapper.getOnePointMatch(siteId, deviceId, deviceCategory, value);
if (!Objects.isNull(dbPoint)) {
return;
}
EmsPointMatch pointMatch = new EmsPointMatch();
pointMatch.setSiteId(siteId);
pointMatch.setDeviceId(deviceId);
pointMatch.setDeviceCategory(deviceCategory);
pointMatch.setMatchTable(DeviceMatchTable.getMatchTableByCode(deviceCategory));
pointMatch.setMatchField(StringUtils.toUnderScoreCase(key));
pointMatch.setDataPoint(value);
pointMatch.setPointName(getFieldAnnotation(DeviceMatchTable.getClassByTable(pointMatch.getMatchTable()), StringUtils.toCamelCase(pointMatch.getMatchField())));
pointMatch.setDataDevice(dataDevice);
// pointMatch.setDataPointName("");
// pointMatch.setDataUnit("");
pointMatch.setCreateBy("system");
pointMatch.setUpdateBy("system");
emsPointMatchMapper.insertEmsPointMatch(pointMatch);
});
} catch (Exception e) {
log.info("保存设备点位匹配信息异常siteId: " + siteId + ", deviceId: "+ deviceId + "异常信息:" + e.getMessage());
}
}
private Map<String, String> getDevicePointMtachInfo(DeviceMatchTable pointMatchType, String dataDevice) {
switch (pointMatchType) {
case PCS:
return devicePointMatchInfo.getPcs();
case BRANCH:
return devicePointMatchInfo.getBranch();
case STACK:
return devicePointMatchInfo.getStack();
case CLUSTER:
return devicePointMatchInfo.getCluster();
case BATTERY:
return devicePointMatchInfo.getBattery();
case AMMETER:
if (dataDevice.equals("LOAD")) {
return devicePointMatchInfo.getAmmeterLoad();
} else {
return devicePointMatchInfo.getAmmeterMete();
}
case COOLING:
return devicePointMatchInfo.getCooling();
case DH:
return devicePointMatchInfo.getDh();
case XF:
return devicePointMatchInfo.getXf();
case BATTERY_GROUP:
return devicePointMatchInfo.getBatteryGroup();
default:
return new HashMap<>();
}
}
/**
* 设置点位缓存key
* @param siteId
* @param deviceId
* @param deviceCategory
* @return 点位缓存key
*/
public static String getPointTacthCacheKey(String siteId, String deviceId, String deviceCategory)
{
return RedisKeyConstants.POINT_MATCH + deviceCategory + "_" + siteId + "_" + deviceId;
}
}

View File

@ -1,33 +0,0 @@
package com.xzzn.ems.utils;
import com.xzzn.common.annotation.Excel;
import com.xzzn.common.utils.StringUtils;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* 匹配表工具类
*/
public class MatchTableUtils {
/**
* 获取字段注解信息
*/
public static String getFieldAnnotation(Class<?> clazz, String filedName)
{
List<Field> tempFields = new ArrayList<>();
tempFields.addAll(Arrays.asList(clazz.getDeclaredFields()));
for (Field field : tempFields) {
if (StringUtils.equals(filedName, field.getName()) && field.isAnnotationPresent(Excel.class))
{
Excel column = field.getAnnotation(Excel.class);
return column.name();
}
}
return null;
}
}

View File

@ -0,0 +1,311 @@
{
"pcs": {
"totalActivePower": "YGGL",
"dailyAcChargeEnergy": "RCDL",
"totalReactivePower": "XTWGGL",
"dailyAcDischargeEnergy": "RFDL",
"totalApparentPower": "XTSZGL",
"totalPowerFactor": "GLYS",
"dcPower": "XTSZGL",
"totalAcChargeEnergy": "ZCDL",
"totalAcDischargeEnergy": "ZFDL",
"acChargeActivePower": "JLCCDYGGL",
"acCapacitiveReactivePower": "JLCRXWGGL",
"acDischargeActivePower": "JLCFDYGGL",
"acInductiveReactivePower": "JLCGXWGGL",
"maxCapacitivePowerCapacity": "ZDRXWGNL",
"maxInductivePowerCapacity": "ZDGXWGNL",
"maxChargePowerCapacity": "ZDKCGL",
"maxDischargePowerCapacity": "ZDKFGL",
"sysUCurrent": "XTSCUXDL",
"sysVCurrent": "XTSCVXDL",
"sysWCurrent": "XTSCWXDL",
"uTemperature": "DY1UXIGBTWD",
"vTemperature": "DY1VXIGBTWD",
"wTemperature": "DY1WXIGBTWD"
},
"branch": {
"dcPower": "ZLGL",
"dcVoltage": "ZLDY",
"dcCurrent": "ZLDL",
"gridUVoltage": "DWUXDY",
"gridVVoltage": "DWVXDY",
"gridWVoltage": "DWWXDY",
"outputUCurrent": "SCUXDL",
"outputVCurrent": "SCVXDL",
"outputWCurrent": "SCWXDL",
"apparentPower": "SZGL",
"activePower": "YGGL",
"reactivePower": "WGGL",
"powerFactor": "GLYS",
"frequency": "PL",
"internalTemp": "DY1WD",
"uIgbtTemp": "UXIGBTWD",
"vIgbtTemp": "VXIGBTWD",
"wIgbtTemp": "WXIGBTWD",
"availablePower": "KYGL",
"totalLoadRatio": "ZFZB",
"acLeakageCurrent": "JLLDL",
"insulationResistance": "JYZK"
},
"stack": {
"operationStatus": "DCZT",
"stackVoltage": "DCDDY",
"stackCurrent": "DCDDL",
"stackSoc": "DCDSOC",
"stackSoh": "DCDSOH",
"maxCellVoltage": "ZGDCDY",
"maxVoltageGroupId": "ZGDCDYZH",
"maxVoltageCellId": "ZGDCDYZHDH",
"minCellVoltage": "ZDDCDY",
"minVoltageGroupId": "ZDDCDYZH",
"minVoltageCellId": "ZDDCDYZHDH",
"maxCellTemp": "ZGDCWD",
"maxTempGroupId": "ZGDCWDZH",
"maxTempCellId": "ZGDCWDZHDH",
"minCellTemp": "ZDDCWD",
"minTempGroupId": "ZDDCWDZH",
"minTempCellId": "ZDDCWDZHDH",
"totalChargeCapacity": "DLJCDDL",
"totalDischargeCapacity": "DLCFDDL",
"sessionChargeCapacity": "DDCLJCDDL",
"sessionDischargeCapacity": "DDCLJFDDL",
"availableChargeCapacity": "DKCDL",
"availableDischargeCapacity": "DKFDL",
"remainingDischargeTime": "KYFDSJ",
"remainingChargeTime": "KYCDSJ",
"maxDischargePower": "YXZDFDGL",
"maxChargePower": "YXZDCDGL",
"maxDischargeCurrent": "YXZDFDDL",
"maxChargeCurrent": "YXZDCDDL",
"dailyDischargeCycles": "DTFDCS",
"dailyChargeCycles": "DTCDCS",
"dailyDischargeCapacity": "DTFDDL",
"dailyChargeCapacity": "DTCDDL",
"operatingTemp": "YXWD",
"bmsStatus": "BMSDDQZT",
"bmsChargeStatus": "BMSCFDZT",
"stackInsulationResistance": "DCDJYDZ"
},
"cluster": {
"chargeableCapacity": "KCDL",
"clusterVoltage": "ZDY",
"clusterCurrent": "ZDL",
"totalChargedCapacity": "LJCDDL",
"dischargeableCapacity": "KFDL",
"totalDischargedCapacity": "LJFDDL",
"soh": "ZSOH",
"averageTemperature": "MKWD",
"insulationResistance": "ZJYDZ",
"currentSoc": "ZSOC",
"maxAllowedChargePower": "YXCDZDGL",
"maxAllowedDischargePower": "YXFDZDGL",
"maxAllowedChargeVoltage": "YXCDZDDY",
"maxAllowedDischargeVoltage": "YXFDZDDY",
"maxAllowedChargeCurrent": "YXCDZDDL",
"maxAllowedDischargeCurrent": "YXFDZDDL",
"batteryPackVoltage": "ZDY",
"batteryPackCurrent": "ZDL",
"batteryPackTemp": "MKWD",
"batteryPackSoc": "ZSOC",
"batteryPackSoh": "ZSOH",
"batteryPackInsulationResistance": "ZJYDZ",
"avgCellVoltage": "PJDTDY",
"avgCellTemp": "PJDTWD",
"maxCellVoltage": "ZGDTDY",
"minCellVoltage": "ZDDTDY",
"maxCellTemp": "ZGDTWD",
"minCellTemp": "ZDDTWD",
"maxCellSoc": "ZGDTSOC",
"minCellSoc": "ZDDTSOC",
"maxCellSoh": "ZGDTSOH",
"minCellSoh": "ZDDTSOH",
"totalChargeEnergy": "DCLJCDDL",
"totalDischargeEnergy": "DCLJFDDL",
"maxCellVoltageId": "ZGDTDYDYD",
"minCellVoltageId": "ZDDTDYDYD",
"maxCellTempId": "ZGDTWDDYD",
"minCellTempId": "ZDDTWDDYD",
"maxCellSocId": "ZGDTSOCDYD",
"minCellSocId": "ZDDTSOCDYD",
"maxCellSohId": "ZGDTSOHDYD",
"minCellSohId": "ZDDTSOHDYD"
},
"battery": {
"soc": "DTSOC",
"soh": "DTSOH",
"temperature": "DTWD",
"voltage": "DTDY"
},
"ammeterLoad": {
"currentCombActiveTotal": "DQZHYGZDN",
"currentCombActivePeak": "DQZHYGJDN",
"currentCombActiveHigh": "DQZHYGFDN",
"currentCombActiveFlat": "DQZHYGPDN",
"currentCombActiveValley": "DQZHYGGDN",
"currentForwardActiveTotal": "DQZXYGZDN",
"currentForwardActivePeak": "DQZXYGJDN",
"currentForwardActiveHigh": "DQZXYGFDN",
"currentForwardActiveFlat": "DQZXYGPDN",
"currentForwardActiveValley": "DQZXYGGDN",
"currentReverseActiveTotal": "DQFXYGZDN",
"currentReverseActivePeak": "DQFXYGJDN",
"currentReverseActiveHigh": "DQFXYGFDN",
"currentReverseActiveFlat": "DQFXYGPDN",
"currentReverseActiveValley": "DQFXYGGDN",
"currentCombReactiveTotal": "DQZHWGZDN",
"currentCombReactivePeak": "DQZHWGJDN",
"currentCombReactiveHigh": "DQZHWGFDN",
"currentCombReactiveFlat": "DQZHWGPDN",
"currentCombReactiveValley": "DQZHWGGDN",
"currentForwardReactiveTotal": "DQZXWGZDN",
"currentForwardReactivePeak": "DQZXWGJDN",
"currentForwardReactiveHigh": "DQZXWGFDN",
"currentForwardReactiveFlat": "DQZXWGPDN",
"currentForwardReactiveValley": "DQZXWGGDN",
"currentReverseReactiveTotal": "DQFXWGZDN",
"currentReverseReactivePeak": "DQFXWGJDN",
"currentReverseReactiveHigh": "DQFXWGFDN",
"currentReverseReactiveFlat": "DQFXWGPDN",
"currentReverseReactiveValley": "DQFXWGGDN",
"phaseAVoltage": "AXDY",
"phaseBVoltage": "BXDY",
"phaseCVoltage": "CXDY",
"phaseACurrent": "AXDL",
"phaseBCurrent": "BXDL",
"phaseCCurrent": "CXDL",
"abLineVoltage": "ABXDY",
"cbLineVoltage": "CBXDY",
"acLineVoltage": "ACXDY",
"frequency": "PL",
"phaseAActivePower": "AXYGGL",
"phaseBActivePower": "BXYGGL",
"phaseCActivePower": "CXYGGL",
"totalActivePower": "ZYGGL",
"phaseAReactivePower": "AXWGGL",
"phaseBReactivePower": "BXWGGL",
"phaseCReactivePower": "CXWGGL",
"totalReactivePower": "ZWGGL",
"phaseAApparentPower": "AXSZGL",
"phaseBApparentPower": "BXSZGL",
"phaseCApparentPower": "CXSZGL",
"totalApparentPower": "ZSZGL",
"phaseAPowerFactor": "AXGLYS",
"phaseBPowerFactor": "BXGLYS",
"phaseCPowerFactor": "CXGLYS",
"totalPowerFactor": "ZGLYS",
"forwardAcMaxDemand": "ZXYGZDXL",
"reverseAcMaxDemand": "FXYGZDXL",
"dailyForwardMaxDemand": "DRZXYGZDXL"
},
"ammeterMete": {
"phaseAVoltage": "AXDY",
"phaseBVoltage": "BXDY",
"phaseCVoltage": "CXDY",
"phaseACurrent": "AXDL",
"phaseBCurrent": "BXDL",
"phaseCCurrent": "CXDL",
"abLineVoltage": "ABXDY",
"cbLineVoltage": "BCXDY",
"acLineVoltage": "CAXDY",
"frequency": "DWPL",
"phaseAActivePower": "AXYGGL",
"phaseBActivePower": "BXYGGL",
"phaseCActivePower": "CXYGGL",
"totalActivePower": "ZYGGL",
"phaseAReactivePower": "AXWGGL",
"phaseBReactivePower": "BXWGGL",
"phaseCReactivePower": "CXWGGL",
"totalReactivePower": "ZWGGL",
"totalApparentPower": "ZSZGL",
"totalPowerFactor": "ZGLYS",
"secondaryAbLineVoltage": "ECABXDY",
"secondaryAPhaseCurrent": "ECAXDL",
"secondaryAPhaseVoltage": "ECAXDY",
"secondaryAPowerFactor": "ECAXGLYS",
"secondaryAApparentPower": "ECAXSZGL",
"secondaryAReactivePower": "ECAXWGGL",
"secondaryAActivePower": "ECAXYGGL",
"secondaryBcLineVoltage": "ECBCXDY",
"secondaryBPhaseCurrent": "ECBXDL",
"secondaryBPhaseVoltage": "ECBXDY",
"secondaryBPowerFactor": "ECBXGLYS",
"secondaryBApparentPower": "ECBXSZGL",
"secondaryBReactivePower": "ECBXWGGL",
"secondaryBActivePower": "ECBXYGGL",
"secondaryCaLineVoltage": "ECCAXDY",
"secondaryCPhaseCurrent": "ECCXDL",
"secondaryCPhaseVoltage": "ECCXDY",
"secondaryCPowerFactor": "ECCXGLYS",
"secondaryCApparentPower": "ECCXSZGL",
"secondaryCReactivePower": "ECCXWGGL",
"secondaryCActivePower": "ECCXYGGL",
"secondaryGridFrequency": "ECDWPL",
"secondaryReverseReactiveEnergy": "ECFXWGDN",
"secondaryNegativeActiveEnergy": "ECFXYGDN",
"secondaryTotalPowerFactor": "ECZGLYS",
"secondaryTotalApparentPower": "ECZSZFL",
"secondaryTotalReactivePower": "ECZWGGL",
"secondaryPositiveReactiveEnergy": "ECZXWGDN",
"secondaryPositiveActiveEnergy": "ECZXYGDN",
"secondaryTotalActivePower": "ECZYGGL",
"reverseReactiveEnergyEqMinus": "FXWGDN",
"reverseActiveEnergyEpMinus": "FXYGDN",
"positiveReactiveEnergyEqPlus": "ZXWGDN",
"positiveActiveEnergyEpPlus": "ZXYGDN",
"currentForwardActiveTotal": "ZXYGDN",
"currentReverseActiveTotal": "FXYGDN",
"currentForwardReactiveTotal": "ZXWGDN",
"currentReverseReactiveTotal": "FXWGDN"
},
"dh": {
"humidity": "SD3",
"temperature": "WD3"
},
"cooling": {
"gsTemp": "GSWD",
"hsTemp": "HSWD",
"gsPressure": "GSYL",
"hsPressure": "HSYL",
"lysTemp": "LYSWD",
"vb01Kd": "VB1KD",
"vb02Kd": "VB2KD"
}
}