首页看板-数据概览
This commit is contained in:
196
ems-system/src/main/java/com/xzzn/ems/domain/EmsBatteryData.java
Normal file
196
ems-system/src/main/java/com/xzzn/ems/domain/EmsBatteryData.java
Normal file
@ -0,0 +1,196 @@
|
||||
package com.xzzn.ems.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xzzn.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.xzzn.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* 单体电池实时数据对象 ems_battery_data
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-19
|
||||
*/
|
||||
public class EmsBatteryData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 电池堆 */
|
||||
@Excel(name = "电池堆")
|
||||
private String batteryPack;
|
||||
|
||||
/** 电池簇 */
|
||||
@Excel(name = "电池簇")
|
||||
private String batteryCluster;
|
||||
|
||||
/** 单体编号 */
|
||||
@Excel(name = "单体编号")
|
||||
private String batteryCellId;
|
||||
|
||||
/** 电压 (V) */
|
||||
@Excel(name = "电压 (V)")
|
||||
private BigDecimal voltage;
|
||||
|
||||
/** 温度 (℃) */
|
||||
@Excel(name = "温度 (℃)")
|
||||
private BigDecimal temperature;
|
||||
|
||||
/** SOC (%) */
|
||||
@Excel(name = "SOC (%)")
|
||||
private BigDecimal soc;
|
||||
|
||||
/** SOH (%) */
|
||||
@Excel(name = "SOH (%)")
|
||||
private BigDecimal soh;
|
||||
|
||||
/** 数据采集时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "数据采集时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date dataTimestamp;
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private Long siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
@Excel(name = "设备唯一标识符")
|
||||
private Long deviceId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setBatteryPack(String batteryPack)
|
||||
{
|
||||
this.batteryPack = batteryPack;
|
||||
}
|
||||
|
||||
public String getBatteryPack()
|
||||
{
|
||||
return batteryPack;
|
||||
}
|
||||
|
||||
public void setBatteryCluster(String batteryCluster)
|
||||
{
|
||||
this.batteryCluster = batteryCluster;
|
||||
}
|
||||
|
||||
public String getBatteryCluster()
|
||||
{
|
||||
return batteryCluster;
|
||||
}
|
||||
|
||||
public void setBatteryCellId(String batteryCellId)
|
||||
{
|
||||
this.batteryCellId = batteryCellId;
|
||||
}
|
||||
|
||||
public String getBatteryCellId()
|
||||
{
|
||||
return batteryCellId;
|
||||
}
|
||||
|
||||
public void setVoltage(BigDecimal voltage)
|
||||
{
|
||||
this.voltage = voltage;
|
||||
}
|
||||
|
||||
public BigDecimal getVoltage()
|
||||
{
|
||||
return voltage;
|
||||
}
|
||||
|
||||
public void setTemperature(BigDecimal temperature)
|
||||
{
|
||||
this.temperature = temperature;
|
||||
}
|
||||
|
||||
public BigDecimal getTemperature()
|
||||
{
|
||||
return temperature;
|
||||
}
|
||||
|
||||
public void setSoc(BigDecimal soc)
|
||||
{
|
||||
this.soc = soc;
|
||||
}
|
||||
|
||||
public BigDecimal getSoc()
|
||||
{
|
||||
return soc;
|
||||
}
|
||||
|
||||
public void setSoh(BigDecimal soh)
|
||||
{
|
||||
this.soh = soh;
|
||||
}
|
||||
|
||||
public BigDecimal getSoh()
|
||||
{
|
||||
return soh;
|
||||
}
|
||||
|
||||
public void setDataTimestamp(Date dataTimestamp)
|
||||
{
|
||||
this.dataTimestamp = dataTimestamp;
|
||||
}
|
||||
|
||||
public Date getDataTimestamp()
|
||||
{
|
||||
return dataTimestamp;
|
||||
}
|
||||
|
||||
public void setSiteId(Long siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public Long getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("batteryPack", getBatteryPack())
|
||||
.append("batteryCluster", getBatteryCluster())
|
||||
.append("batteryCellId", getBatteryCellId())
|
||||
.append("voltage", getVoltage())
|
||||
.append("temperature", getTemperature())
|
||||
.append("soc", getSoc())
|
||||
.append("soh", getSoh())
|
||||
.append("dataTimestamp", getDataTimestamp())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("siteId", getSiteId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
/**
|
||||
* 首页看板数据概览-告警等级分布
|
||||
*/
|
||||
public class AlarmGradeList {
|
||||
/**
|
||||
* 告警等级
|
||||
*/
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 数据一
|
||||
*/
|
||||
private int num1;
|
||||
|
||||
/**
|
||||
* 数据三
|
||||
*/
|
||||
private int num2;
|
||||
|
||||
public String getGrade() {
|
||||
return grade;
|
||||
}
|
||||
|
||||
public void setGrade(String grade) {
|
||||
this.grade = grade;
|
||||
}
|
||||
|
||||
public int getNum1() {
|
||||
return num1;
|
||||
}
|
||||
|
||||
public void setNum1(int num1) {
|
||||
this.num1 = num1;
|
||||
}
|
||||
|
||||
public int getNum2() {
|
||||
return num2;
|
||||
}
|
||||
|
||||
public void setNum2(int num2) {
|
||||
this.num2 = num2;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
/**
|
||||
* 首页看板数据概览-告警趋势
|
||||
*/
|
||||
public class AlarmTrendList {
|
||||
/**
|
||||
* 月份
|
||||
*/
|
||||
private int dateMonth;
|
||||
|
||||
/**
|
||||
* 报警数
|
||||
*/
|
||||
private int alarmNum;
|
||||
|
||||
public int getDateMonth() {
|
||||
return dateMonth;
|
||||
}
|
||||
|
||||
public void setDateMonth(int dateMonth) {
|
||||
this.dateMonth = dateMonth;
|
||||
}
|
||||
|
||||
public int getAlarmNum() {
|
||||
return alarmNum;
|
||||
}
|
||||
|
||||
public void setAlarmNum(int alarmNum) {
|
||||
this.alarmNum = alarmNum;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
/**
|
||||
* 首页看板数据概览-设备告警占比
|
||||
*/
|
||||
public class DeviceAlarmProportionList {
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private int alarmNum;
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getAlarmNum() {
|
||||
return alarmNum;
|
||||
}
|
||||
|
||||
public void setAlarmNum(int alarmNum) {
|
||||
this.alarmNum = alarmNum;
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 首页看板数据概览-电量指标
|
||||
*/
|
||||
public class ElectricIndexList {
|
||||
/**
|
||||
* 月份
|
||||
*/
|
||||
private int dateMonth;
|
||||
|
||||
/**
|
||||
* 充电量
|
||||
*/
|
||||
private BigDecimal chargeEnergy;
|
||||
|
||||
/**
|
||||
* 放电量
|
||||
*/
|
||||
private BigDecimal disChargeEnergy;
|
||||
|
||||
public int getDateMonth() {
|
||||
return dateMonth;
|
||||
}
|
||||
|
||||
public void setDateMonth(int dateMonth) {
|
||||
this.dateMonth = dateMonth;
|
||||
}
|
||||
|
||||
public BigDecimal getChargeEnergy() {
|
||||
return chargeEnergy;
|
||||
}
|
||||
|
||||
public void setChargeEnergy(BigDecimal chargeEnergy) {
|
||||
this.chargeEnergy = chargeEnergy;
|
||||
}
|
||||
|
||||
public BigDecimal getDisChargeEnergy() {
|
||||
return disChargeEnergy;
|
||||
}
|
||||
|
||||
public void setDisChargeEnergy(BigDecimal disChargeEnergy) {
|
||||
this.disChargeEnergy = disChargeEnergy;
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 首页看板-数据概览
|
||||
*
|
||||
*/
|
||||
public class HomePageDataViewVo {
|
||||
/**
|
||||
* 电量指标
|
||||
*/
|
||||
private List<ElectricIndexList> elecDataList;
|
||||
|
||||
/**
|
||||
* 系统效率
|
||||
*/
|
||||
private List<SystemEfficiencyList> sysEfficList;
|
||||
|
||||
/**
|
||||
* 告警趋势
|
||||
*/
|
||||
private List<AlarmTrendList> alarmDataList;
|
||||
|
||||
/**
|
||||
* 设备告警占比
|
||||
*/
|
||||
private List<DeviceAlarmProportionList> deviceAlarmList;
|
||||
|
||||
/**
|
||||
* 告警等级分布
|
||||
*/
|
||||
private List<AlarmGradeList> alarmLevelList;
|
||||
|
||||
public List<ElectricIndexList> getElecDataList() {
|
||||
return elecDataList;
|
||||
}
|
||||
|
||||
public void setElecDataList(List<ElectricIndexList> elecDataList) {
|
||||
this.elecDataList = elecDataList;
|
||||
}
|
||||
|
||||
public List<SystemEfficiencyList> getSysEfficList() {
|
||||
return sysEfficList;
|
||||
}
|
||||
|
||||
public void setSysEfficList(List<SystemEfficiencyList> sysEfficList) {
|
||||
this.sysEfficList = sysEfficList;
|
||||
}
|
||||
|
||||
public List<AlarmTrendList> getAlarmDataList() {
|
||||
return alarmDataList;
|
||||
}
|
||||
|
||||
public void setAlarmDataList(List<AlarmTrendList> alarmDataList) {
|
||||
this.alarmDataList = alarmDataList;
|
||||
}
|
||||
|
||||
public List<DeviceAlarmProportionList> getDeviceAlarmList() {
|
||||
return deviceAlarmList;
|
||||
}
|
||||
|
||||
public void setDeviceAlarmList(List<DeviceAlarmProportionList> deviceAlarmList) {
|
||||
this.deviceAlarmList = deviceAlarmList;
|
||||
}
|
||||
|
||||
public List<AlarmGradeList> getAlarmLevelList() {
|
||||
return alarmLevelList;
|
||||
}
|
||||
|
||||
public void setAlarmLevelList(List<AlarmGradeList> alarmLevelList) {
|
||||
this.alarmLevelList = alarmLevelList;
|
||||
}
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 单站监控-设备监控-实时运行头部行数据
|
||||
*
|
||||
*/
|
||||
public class SiteMonitorRuningHeadInfoVo {
|
||||
/**
|
||||
* 实时有功功率
|
||||
*/
|
||||
private BigDecimal totalActivePower;
|
||||
|
||||
/**
|
||||
* 实时无功功率
|
||||
*/
|
||||
private BigDecimal totalReactivePower;
|
||||
|
||||
/**
|
||||
* 电池簇SOC
|
||||
*/
|
||||
private BigDecimal soc;
|
||||
|
||||
/**
|
||||
* 电池堆SOH
|
||||
*/
|
||||
private BigDecimal soh;
|
||||
|
||||
/**
|
||||
* 今日充电量
|
||||
*/
|
||||
private BigDecimal dayChargedCap;
|
||||
|
||||
/**
|
||||
* 今日放电量
|
||||
*/
|
||||
private BigDecimal dayDisChargedCap;
|
||||
|
||||
public BigDecimal getTotalActivePower() {
|
||||
return totalActivePower;
|
||||
}
|
||||
|
||||
public void setTotalActivePower(BigDecimal totalActivePower) {
|
||||
this.totalActivePower = totalActivePower;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalReactivePower() {
|
||||
return totalReactivePower;
|
||||
}
|
||||
|
||||
public void setTotalReactivePower(BigDecimal totalReactivePower) {
|
||||
this.totalReactivePower = totalReactivePower;
|
||||
}
|
||||
|
||||
public BigDecimal getSoc() {
|
||||
return soc;
|
||||
}
|
||||
|
||||
public void setSoc(BigDecimal soc) {
|
||||
this.soc = soc;
|
||||
}
|
||||
|
||||
public BigDecimal getSoh() {
|
||||
return soh;
|
||||
}
|
||||
|
||||
public void setSoh(BigDecimal soh) {
|
||||
this.soh = soh;
|
||||
}
|
||||
|
||||
public BigDecimal getDayChargedCap() {
|
||||
return dayChargedCap;
|
||||
}
|
||||
|
||||
public void setDayChargedCap(BigDecimal dayChargedCap) {
|
||||
this.dayChargedCap = dayChargedCap;
|
||||
}
|
||||
|
||||
public BigDecimal getDayDisChargedCap() {
|
||||
return dayDisChargedCap;
|
||||
}
|
||||
|
||||
public void setDayDisChargedCap(BigDecimal dayDisChargedCap) {
|
||||
this.dayDisChargedCap = dayDisChargedCap;
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 首页看板数据概览-系统效率
|
||||
*/
|
||||
public class SystemEfficiencyList {
|
||||
/**
|
||||
* 月份
|
||||
*/
|
||||
private int dateMonth;
|
||||
|
||||
/**
|
||||
* 系统效率
|
||||
*/
|
||||
private BigDecimal systemEfficiency;
|
||||
|
||||
public int getDateMonth() {
|
||||
return dateMonth;
|
||||
}
|
||||
|
||||
public void setDateMonth(int dateMonth) {
|
||||
this.dateMonth = dateMonth;
|
||||
}
|
||||
|
||||
public BigDecimal getSystemEfficiency() {
|
||||
return systemEfficiency;
|
||||
}
|
||||
|
||||
public void setSystemEfficiency(BigDecimal systemEfficiency) {
|
||||
this.systemEfficiency = systemEfficiency;
|
||||
}
|
||||
}
|
@ -2,6 +2,8 @@ package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsAlarmRecords;
|
||||
import com.xzzn.ems.domain.vo.AlarmTrendList;
|
||||
import com.xzzn.ems.domain.vo.DeviceAlarmProportionList;
|
||||
import com.xzzn.ems.domain.vo.SiteMonitorHomeAlarmVo;
|
||||
|
||||
/**
|
||||
@ -65,4 +67,16 @@ public interface EmsAlarmRecordsMapper
|
||||
*
|
||||
*/
|
||||
public List<SiteMonitorHomeAlarmVo> getAlarmRecordsBySiteId(Long siteId);
|
||||
|
||||
/**
|
||||
* 获取告警趋势数据
|
||||
*
|
||||
*/
|
||||
public List<AlarmTrendList> getAlarmTrendList();
|
||||
|
||||
/**
|
||||
* 获取设备告警占比
|
||||
*
|
||||
*/
|
||||
public List<DeviceAlarmProportionList> getDeviceAlarmPropList();
|
||||
}
|
||||
|
@ -3,8 +3,8 @@ package com.xzzn.ems.mapper;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.xzzn.ems.domain.EmsBatteryData;
|
||||
import com.xzzn.ems.domain.EmsPcsData;
|
||||
import com.xzzn.ems.domain.vo.ElectricIndexList;
|
||||
import com.xzzn.ems.domain.vo.SiteMonitorDataVo;
|
||||
import com.xzzn.ems.domain.vo.SiteMonitorRuningHeadInfoVo;
|
||||
|
||||
@ -84,4 +84,10 @@ public interface EmsPcsDataMapper
|
||||
* @return
|
||||
*/
|
||||
public SiteMonitorRuningHeadInfoVo getSiteRunningHeadInfo(Long siteId);
|
||||
|
||||
/**
|
||||
* 获取每月的充电量和放电量
|
||||
* @return
|
||||
*/
|
||||
public List<ElectricIndexList> getElectDataList();
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.xzzn.ems.service;
|
||||
|
||||
import com.xzzn.ems.domain.vo.HomePageDataViewVo;
|
||||
import com.xzzn.ems.domain.vo.SingleSiteBaseInfo;
|
||||
import com.xzzn.ems.domain.vo.SiteTotalInfoVo;
|
||||
|
||||
@ -13,4 +14,6 @@ public interface IHomePageService
|
||||
public SiteTotalInfoVo getSiteTotalInfo();
|
||||
|
||||
public SingleSiteBaseInfo getSingleSiteBaseInfo(Long siteId);
|
||||
|
||||
public HomePageDataViewVo getHomePageDataList();
|
||||
}
|
||||
|
@ -3,9 +3,8 @@ package com.xzzn.ems.service.impl;
|
||||
import com.xzzn.common.utils.DateUtils;
|
||||
import com.xzzn.common.utils.StringUtils;
|
||||
import com.xzzn.ems.domain.EmsSiteSetting;
|
||||
import com.xzzn.ems.domain.vo.SingleSiteBaseInfo;
|
||||
import com.xzzn.ems.domain.vo.SiteMonitorDataVo;
|
||||
import com.xzzn.ems.domain.vo.SiteTotalInfoVo;
|
||||
import com.xzzn.ems.domain.vo.*;
|
||||
import com.xzzn.ems.mapper.EmsAlarmRecordsMapper;
|
||||
import com.xzzn.ems.mapper.EmsPcsDataMapper;
|
||||
import com.xzzn.ems.mapper.EmsSiteSettingMapper;
|
||||
import com.xzzn.ems.service.IEmsSiteService;
|
||||
@ -14,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
@ -31,12 +31,15 @@ public class HomePageServiceImpl implements IHomePageService
|
||||
private EmsPcsDataMapper emsPcsDataMapper;
|
||||
@Autowired
|
||||
private EmsSiteSettingMapper emsSiteMapper;
|
||||
@Autowired
|
||||
private EmsAlarmRecordsMapper alarmRecordsMapper;
|
||||
|
||||
@Override
|
||||
public SiteTotalInfoVo getSiteTotalInfo() {
|
||||
return emsSiteService.getSiteTotalInfo();
|
||||
}
|
||||
|
||||
// 单站点基本信息
|
||||
@Override
|
||||
public SingleSiteBaseInfo getSingleSiteBaseInfo(Long siteId) {
|
||||
SingleSiteBaseInfo singleSiteBaseInfo = new SingleSiteBaseInfo();
|
||||
@ -105,4 +108,27 @@ public class HomePageServiceImpl implements IHomePageService
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页看板-数据概览
|
||||
*/
|
||||
@Override
|
||||
public HomePageDataViewVo getHomePageDataList() {
|
||||
HomePageDataViewVo homePageDataViewVo = new HomePageDataViewVo();
|
||||
// 电量指标
|
||||
List<ElectricIndexList> electricDataList = new ArrayList();
|
||||
electricDataList = emsPcsDataMapper.getElectDataList();
|
||||
homePageDataViewVo.setElecDataList(electricDataList);
|
||||
// 系统效率
|
||||
// 告警趋势
|
||||
List<AlarmTrendList> alarmTrendList = new ArrayList();
|
||||
alarmTrendList = alarmRecordsMapper.getAlarmTrendList();
|
||||
homePageDataViewVo.setAlarmDataList(alarmTrendList);
|
||||
// 设备告警占比
|
||||
List<DeviceAlarmProportionList> deviceAlarmPropList = new ArrayList();
|
||||
deviceAlarmPropList = alarmRecordsMapper.getDeviceAlarmPropList();
|
||||
homePageDataViewVo.setDeviceAlarmList(deviceAlarmPropList);
|
||||
// 告警等级分布
|
||||
return homePageDataViewVo;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user