BMS总览-获取堆下面簇数据

This commit is contained in:
2025-07-03 16:12:19 +08:00
parent 7bf4baf85f
commit 126b637932
2 changed files with 57 additions and 23 deletions

View File

@ -21,16 +21,16 @@ public class BMSBatteryDataList {
private BigDecimal currentSoc;
/** 单体最高电压 (V) */
private BigDecimal maxVoltage;
private BigDecimal maxCellVoltage;
/** 单体最低电压 (V) */
private BigDecimal minVoltage;
private BigDecimal minCellVoltage;
/** 单体最高温度 (℃) */
private BigDecimal maxTemperature;
private BigDecimal maxCellTemp;
/** 单体最低温度 (℃) */
private BigDecimal minTemperature;
private BigDecimal minCellTemp;
/** 换电站id */
private String siteId;
@ -46,36 +46,52 @@ public class BMSBatteryDataList {
this.clusterId = clusterId;
}
public BigDecimal getMinTemperature() {
return minTemperature;
public String getStackDeviceId() {
return stackDeviceId;
}
public void setMinTemperature(BigDecimal minTemperature) {
this.minTemperature = minTemperature;
public void setStackDeviceId(String stackDeviceId) {
this.stackDeviceId = stackDeviceId;
}
public BigDecimal getMaxTemperature() {
return maxTemperature;
public String getSiteId() {
return siteId;
}
public void setMaxTemperature(BigDecimal maxTemperature) {
this.maxTemperature = maxTemperature;
public void setSiteId(String siteId) {
this.siteId = siteId;
}
public BigDecimal getMinVoltage() {
return minVoltage;
public BigDecimal getMinCellTemp() {
return minCellTemp;
}
public void setMinVoltage(BigDecimal minVoltage) {
this.minVoltage = minVoltage;
public void setMinCellTemp(BigDecimal minCellTemp) {
this.minCellTemp = minCellTemp;
}
public BigDecimal getMaxVoltage() {
return maxVoltage;
public BigDecimal getMaxCellTemp() {
return maxCellTemp;
}
public void setMaxVoltage(BigDecimal maxVoltage) {
this.maxVoltage = maxVoltage;
public void setMaxCellTemp(BigDecimal maxCellTemp) {
this.maxCellTemp = maxCellTemp;
}
public BigDecimal getMinCellVoltage() {
return minCellVoltage;
}
public void setMinCellVoltage(BigDecimal minCellVoltage) {
this.minCellVoltage = minCellVoltage;
}
public BigDecimal getMaxCellVoltage() {
return maxCellVoltage;
}
public void setMaxCellVoltage(BigDecimal maxCellVoltage) {
this.maxCellVoltage = maxCellVoltage;
}
public BigDecimal getCurrentSoc() {

View File

@ -195,10 +195,9 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
if (stackData != null) {
BeanUtils.copyProperties(stackData, bmsOverViewVo);
}
// 列表数据
// 下面簇列表数据
if (!StringUtils.isEmpty(stackId)) {
List<BMSBatteryDataList> batteryDataList = emsBatteryClusterMapper.getBmsBatteryData(siteId,stackId);
bmsOverViewVo.setBatteryDataList(batteryDataList);
getBMSClusterListInfo(siteId,stackId,bmsOverViewVo);
}
bmsOverViewVoList.add(bmsOverViewVo);
}
@ -206,6 +205,25 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
return bmsOverViewVoList;
}
private void getBMSClusterListInfo(String siteId, String stackId, BMSOverViewVo bmsOverViewVo) {
List<BMSBatteryDataList> batteryDataList = new ArrayList();
List<Map<String, Object>> clusterIds = emsDevicesSettingMapper.getDeviceInfoByParentId(stackId);
for (Map<String, Object> clusterDevice : clusterIds) {
BMSBatteryDataList bmsBatteryDataList= new BMSBatteryDataList();
// 从redis取单个簇的详细数据
String clusterId = clusterDevice.get("id").toString();
bmsBatteryDataList.setClusterId(clusterId);
EmsBatteryCluster clusterData = redisCache.getCacheObject(RedisKeyConstants.CLUSTER + siteId + "_" + clusterId);
if (clusterData != null) {
BeanUtils.copyProperties(clusterData, bmsBatteryDataList);
}
batteryDataList.add(bmsBatteryDataList);
}
bmsOverViewVo.setBatteryDataList(batteryDataList);
}
// 获取BMS电池簇数据
@Override
public List<BMSBatteryClusterVo> getBMSBatteryCluster(String siteId) {