站点地图
This commit is contained in:
@ -0,0 +1,53 @@
|
||||
package com.xzzn.web.controller.ems;
|
||||
|
||||
import com.xzzn.common.core.controller.BaseController;
|
||||
import com.xzzn.common.core.domain.AjaxResult;
|
||||
import com.xzzn.ems.service.IEmsSiteService;
|
||||
import com.xzzn.ems.service.IHomePageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* 站点信息
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ems/homePage")
|
||||
public class EmsHomePageController extends BaseController{
|
||||
|
||||
@Autowired
|
||||
private IHomePageService homePageService;
|
||||
@Autowired
|
||||
private IEmsSiteService emsSiteService;
|
||||
|
||||
/**
|
||||
* 获取站点总信息
|
||||
*/
|
||||
@GetMapping("/getSiteTotalInfo")
|
||||
public AjaxResult getSiteTotalInfo()
|
||||
{
|
||||
return success(homePageService.getSiteTotalInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页看板数据
|
||||
*/
|
||||
@GetMapping("/dataList")
|
||||
public AjaxResult list()
|
||||
{
|
||||
return success(homePageService.getSiteTotalInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有站点
|
||||
*/
|
||||
@GetMapping("/getAllSites")
|
||||
public AjaxResult getAllSites()
|
||||
{
|
||||
return success(emsSiteService.getAllSites());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.xzzn.web.controller.ems;
|
||||
|
||||
import com.xzzn.common.core.controller.BaseController;
|
||||
import com.xzzn.common.core.domain.AjaxResult;
|
||||
import com.xzzn.ems.service.IEmsSiteService;
|
||||
import com.xzzn.ems.service.IHomePageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
*
|
||||
// * 站点地图
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ems/siteMap")
|
||||
public class EmsSiteMapController extends BaseController{
|
||||
|
||||
@Autowired
|
||||
private IHomePageService homePageService;
|
||||
|
||||
/**
|
||||
* 获取某个站点基本信息
|
||||
*/
|
||||
@GetMapping("/getSingleSiteBaseInfo")
|
||||
public AjaxResult getSingleSiteBaseInfo(@RequestParam Long siteId)
|
||||
{
|
||||
return success(homePageService.getSingleSiteBaseInfo(siteId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.xzzn.web.controller.ems;
|
||||
|
||||
import com.xzzn.common.core.controller.BaseController;
|
||||
import com.xzzn.common.core.domain.AjaxResult;
|
||||
import com.xzzn.ems.service.ISingleSiteService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* 单站监控
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ems/siteMonitor")
|
||||
public class EmsSiteMonitorController extends BaseController{
|
||||
|
||||
@Autowired
|
||||
private ISingleSiteService iSingleSiteService;
|
||||
|
||||
/**
|
||||
* 获取单站首页数据
|
||||
*/
|
||||
@GetMapping("/homeView")
|
||||
public AjaxResult getSingleSiteViewInfo(@RequestParam Long siteId)
|
||||
{
|
||||
return success(iSingleSiteService.getSiteMonitorDataVo(siteId));
|
||||
}
|
||||
}
|
@ -0,0 +1,181 @@
|
||||
package com.xzzn.ems.domain;
|
||||
|
||||
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_alarm_records
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-17
|
||||
*/
|
||||
public class EmsAlarmRecords extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 设备类型 */
|
||||
@Excel(name = "设备类型")
|
||||
private String deviceType;
|
||||
|
||||
/** 告警等级 */
|
||||
@Excel(name = "告警等级")
|
||||
private String alarmLevel;
|
||||
|
||||
/** 告警内容 */
|
||||
@Excel(name = "告警内容")
|
||||
private String alarmContent;
|
||||
|
||||
/** 告警发生时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "告警发生时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date alarmStartTime;
|
||||
|
||||
/** 告警结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "告警结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date alarmEndTime;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private Long siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
@Excel(name = "设备唯一标识符")
|
||||
private Long deviceId;
|
||||
|
||||
/** 设备名称,用于标识设备 */
|
||||
@Excel(name = "设备名称,用于标识设备")
|
||||
private String deviceName;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setDeviceType(String deviceType)
|
||||
{
|
||||
this.deviceType = deviceType;
|
||||
}
|
||||
|
||||
public String getDeviceType()
|
||||
{
|
||||
return deviceType;
|
||||
}
|
||||
|
||||
public void setAlarmLevel(String alarmLevel)
|
||||
{
|
||||
this.alarmLevel = alarmLevel;
|
||||
}
|
||||
|
||||
public String getAlarmLevel()
|
||||
{
|
||||
return alarmLevel;
|
||||
}
|
||||
|
||||
public void setAlarmContent(String alarmContent)
|
||||
{
|
||||
this.alarmContent = alarmContent;
|
||||
}
|
||||
|
||||
public String getAlarmContent()
|
||||
{
|
||||
return alarmContent;
|
||||
}
|
||||
|
||||
public void setAlarmStartTime(Date alarmStartTime)
|
||||
{
|
||||
this.alarmStartTime = alarmStartTime;
|
||||
}
|
||||
|
||||
public Date getAlarmStartTime()
|
||||
{
|
||||
return alarmStartTime;
|
||||
}
|
||||
|
||||
public void setAlarmEndTime(Date alarmEndTime)
|
||||
{
|
||||
this.alarmEndTime = alarmEndTime;
|
||||
}
|
||||
|
||||
public Date getAlarmEndTime()
|
||||
{
|
||||
return alarmEndTime;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName)
|
||||
{
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDeviceName()
|
||||
{
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("deviceType", getDeviceType())
|
||||
.append("alarmLevel", getAlarmLevel())
|
||||
.append("alarmContent", getAlarmContent())
|
||||
.append("alarmStartTime", getAlarmStartTime())
|
||||
.append("alarmEndTime", getAlarmEndTime())
|
||||
.append("status", getStatus())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("siteId", getSiteId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("deviceName", getDeviceName())
|
||||
.toString();
|
||||
}
|
||||
}
|
477
ems-system/src/main/java/com/xzzn/ems/domain/EmsPcsData.java
Normal file
477
ems-system/src/main/java/com/xzzn/ems/domain/EmsPcsData.java
Normal file
@ -0,0 +1,477 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* PCS数据对象 ems_pcs_data
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-17
|
||||
*/
|
||||
public class EmsPcsData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 数据更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "数据更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date dataUpdateTime;
|
||||
|
||||
/** 工作状态 */
|
||||
@Excel(name = "工作状态")
|
||||
private String workStatus;
|
||||
|
||||
/** 并网状态 */
|
||||
@Excel(name = "并网状态")
|
||||
private String gridStatus;
|
||||
|
||||
/** 设备状态 */
|
||||
@Excel(name = "设备状态")
|
||||
private String deviceStatus;
|
||||
|
||||
/** 控制模式 */
|
||||
@Excel(name = "控制模式")
|
||||
private String controlMode;
|
||||
|
||||
/** 总交流有功电率 (kW) */
|
||||
@Excel(name = "总交流有功电率 (kW)")
|
||||
private BigDecimal totalActivePower;
|
||||
|
||||
/** 当天交流充电量 (kWh) */
|
||||
@Excel(name = "当天交流充电量 (kWh)")
|
||||
private BigDecimal dailyAcChargeEnergy;
|
||||
|
||||
/** A相电压 (V) */
|
||||
@Excel(name = "A相电压 (V)")
|
||||
private BigDecimal aPhaseVoltage;
|
||||
|
||||
/** A相电流 (A) */
|
||||
@Excel(name = "A相电流 (A)")
|
||||
private BigDecimal aPhaseCurrent;
|
||||
|
||||
/** 总交流无功电率 (kVar) */
|
||||
@Excel(name = "总交流无功电率 (kVar)")
|
||||
private BigDecimal totalReactivePower;
|
||||
|
||||
/** 当天交流放电量 (kWh) */
|
||||
@Excel(name = "当天交流放电量 (kWh)")
|
||||
private BigDecimal dailyAcDischargeEnergy;
|
||||
|
||||
/** B相电压 (V) */
|
||||
@Excel(name = "B相电压 (V)")
|
||||
private BigDecimal bPhaseVoltage;
|
||||
|
||||
/** B相电流 (A) */
|
||||
@Excel(name = "B相电流 (A)")
|
||||
private BigDecimal bPhaseCurrent;
|
||||
|
||||
/** 总交流视在功率 (kVA) */
|
||||
@Excel(name = "总交流视在功率 (kVA)")
|
||||
private BigDecimal totalApparentPower;
|
||||
|
||||
/** PCS模块温度 (℃) */
|
||||
@Excel(name = "PCS模块温度 (℃)")
|
||||
private BigDecimal pcsModuleTemperature;
|
||||
|
||||
/** C相电压 (V) */
|
||||
@Excel(name = "C相电压 (V)")
|
||||
private BigDecimal cPhaseVoltage;
|
||||
|
||||
/** C相电流 (A) */
|
||||
@Excel(name = "C相电流 (A)")
|
||||
private BigDecimal cPhaseCurrent;
|
||||
|
||||
/** 总交流功率因数 */
|
||||
@Excel(name = "总交流功率因数")
|
||||
private BigDecimal totalPowerFactor;
|
||||
|
||||
/** PCS环境温度 (℃) */
|
||||
@Excel(name = "PCS环境温度 (℃)")
|
||||
private BigDecimal pcsEnvironmentTemperature;
|
||||
|
||||
/** 交流频率 (Hz) */
|
||||
@Excel(name = "交流频率 (Hz)")
|
||||
private BigDecimal acFrequency;
|
||||
|
||||
/** 支路状态 */
|
||||
@Excel(name = "支路状态")
|
||||
private String branchStatus;
|
||||
|
||||
/** 放电状态 */
|
||||
@Excel(name = "放电状态")
|
||||
private String dischargeStatus;
|
||||
|
||||
/** 直流功率 (kW) */
|
||||
@Excel(name = "直流功率 (kW)")
|
||||
private BigDecimal dcPower;
|
||||
|
||||
/** 直流电压 (V) */
|
||||
@Excel(name = "直流电压 (V)")
|
||||
private BigDecimal dcVoltage;
|
||||
|
||||
/** 直流电流 (A) */
|
||||
@Excel(name = "直流电流 (A)")
|
||||
private BigDecimal dcCurrent;
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private Long siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
@Excel(name = "设备唯一标识符")
|
||||
private Long deviceId;
|
||||
|
||||
/** 月 */
|
||||
@Excel(name = "月")
|
||||
private int dateMonth;
|
||||
|
||||
/** 日 */
|
||||
@Excel(name = "日")
|
||||
private int dateDay;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setDataUpdateTime(Date dataUpdateTime)
|
||||
{
|
||||
this.dataUpdateTime = dataUpdateTime;
|
||||
}
|
||||
|
||||
public Date getDataUpdateTime()
|
||||
{
|
||||
return dataUpdateTime;
|
||||
}
|
||||
|
||||
public void setWorkStatus(String workStatus)
|
||||
{
|
||||
this.workStatus = workStatus;
|
||||
}
|
||||
|
||||
public String getWorkStatus()
|
||||
{
|
||||
return workStatus;
|
||||
}
|
||||
|
||||
public void setGridStatus(String gridStatus)
|
||||
{
|
||||
this.gridStatus = gridStatus;
|
||||
}
|
||||
|
||||
public String getGridStatus()
|
||||
{
|
||||
return gridStatus;
|
||||
}
|
||||
|
||||
public void setDeviceStatus(String deviceStatus)
|
||||
{
|
||||
this.deviceStatus = deviceStatus;
|
||||
}
|
||||
|
||||
public String getDeviceStatus()
|
||||
{
|
||||
return deviceStatus;
|
||||
}
|
||||
|
||||
public void setControlMode(String controlMode)
|
||||
{
|
||||
this.controlMode = controlMode;
|
||||
}
|
||||
|
||||
public String getControlMode()
|
||||
{
|
||||
return controlMode;
|
||||
}
|
||||
|
||||
public void setTotalActivePower(BigDecimal totalActivePower)
|
||||
{
|
||||
this.totalActivePower = totalActivePower;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalActivePower()
|
||||
{
|
||||
return totalActivePower;
|
||||
}
|
||||
|
||||
public void setDailyAcChargeEnergy(BigDecimal dailyAcChargeEnergy)
|
||||
{
|
||||
this.dailyAcChargeEnergy = dailyAcChargeEnergy;
|
||||
}
|
||||
|
||||
public BigDecimal getDailyAcChargeEnergy()
|
||||
{
|
||||
return dailyAcChargeEnergy;
|
||||
}
|
||||
|
||||
public void setaPhaseVoltage(BigDecimal aPhaseVoltage)
|
||||
{
|
||||
this.aPhaseVoltage = aPhaseVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getaPhaseVoltage()
|
||||
{
|
||||
return aPhaseVoltage;
|
||||
}
|
||||
|
||||
public void setaPhaseCurrent(BigDecimal aPhaseCurrent)
|
||||
{
|
||||
this.aPhaseCurrent = aPhaseCurrent;
|
||||
}
|
||||
|
||||
public BigDecimal getaPhaseCurrent()
|
||||
{
|
||||
return aPhaseCurrent;
|
||||
}
|
||||
|
||||
public void setTotalReactivePower(BigDecimal totalReactivePower)
|
||||
{
|
||||
this.totalReactivePower = totalReactivePower;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalReactivePower()
|
||||
{
|
||||
return totalReactivePower;
|
||||
}
|
||||
|
||||
public void setDailyAcDischargeEnergy(BigDecimal dailyAcDischargeEnergy)
|
||||
{
|
||||
this.dailyAcDischargeEnergy = dailyAcDischargeEnergy;
|
||||
}
|
||||
|
||||
public BigDecimal getDailyAcDischargeEnergy()
|
||||
{
|
||||
return dailyAcDischargeEnergy;
|
||||
}
|
||||
|
||||
public void setbPhaseVoltage(BigDecimal bPhaseVoltage)
|
||||
{
|
||||
this.bPhaseVoltage = bPhaseVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getbPhaseVoltage()
|
||||
{
|
||||
return bPhaseVoltage;
|
||||
}
|
||||
|
||||
public void setbPhaseCurrent(BigDecimal bPhaseCurrent)
|
||||
{
|
||||
this.bPhaseCurrent = bPhaseCurrent;
|
||||
}
|
||||
|
||||
public BigDecimal getbPhaseCurrent()
|
||||
{
|
||||
return bPhaseCurrent;
|
||||
}
|
||||
|
||||
public void setTotalApparentPower(BigDecimal totalApparentPower)
|
||||
{
|
||||
this.totalApparentPower = totalApparentPower;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalApparentPower()
|
||||
{
|
||||
return totalApparentPower;
|
||||
}
|
||||
|
||||
public void setPcsModuleTemperature(BigDecimal pcsModuleTemperature)
|
||||
{
|
||||
this.pcsModuleTemperature = pcsModuleTemperature;
|
||||
}
|
||||
|
||||
public BigDecimal getPcsModuleTemperature()
|
||||
{
|
||||
return pcsModuleTemperature;
|
||||
}
|
||||
|
||||
public void setcPhaseVoltage(BigDecimal cPhaseVoltage)
|
||||
{
|
||||
this.cPhaseVoltage = cPhaseVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getcPhaseVoltage()
|
||||
{
|
||||
return cPhaseVoltage;
|
||||
}
|
||||
|
||||
public void setcPhaseCurrent(BigDecimal cPhaseCurrent)
|
||||
{
|
||||
this.cPhaseCurrent = cPhaseCurrent;
|
||||
}
|
||||
|
||||
public BigDecimal getcPhaseCurrent()
|
||||
{
|
||||
return cPhaseCurrent;
|
||||
}
|
||||
|
||||
public void setTotalPowerFactor(BigDecimal totalPowerFactor)
|
||||
{
|
||||
this.totalPowerFactor = totalPowerFactor;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalPowerFactor()
|
||||
{
|
||||
return totalPowerFactor;
|
||||
}
|
||||
|
||||
public void setPcsEnvironmentTemperature(BigDecimal pcsEnvironmentTemperature)
|
||||
{
|
||||
this.pcsEnvironmentTemperature = pcsEnvironmentTemperature;
|
||||
}
|
||||
|
||||
public BigDecimal getPcsEnvironmentTemperature()
|
||||
{
|
||||
return pcsEnvironmentTemperature;
|
||||
}
|
||||
|
||||
public void setAcFrequency(BigDecimal acFrequency)
|
||||
{
|
||||
this.acFrequency = acFrequency;
|
||||
}
|
||||
|
||||
public BigDecimal getAcFrequency()
|
||||
{
|
||||
return acFrequency;
|
||||
}
|
||||
|
||||
public void setBranchStatus(String branchStatus)
|
||||
{
|
||||
this.branchStatus = branchStatus;
|
||||
}
|
||||
|
||||
public String getBranchStatus()
|
||||
{
|
||||
return branchStatus;
|
||||
}
|
||||
|
||||
public void setDischargeStatus(String dischargeStatus)
|
||||
{
|
||||
this.dischargeStatus = dischargeStatus;
|
||||
}
|
||||
|
||||
public String getDischargeStatus()
|
||||
{
|
||||
return dischargeStatus;
|
||||
}
|
||||
|
||||
public void setDcPower(BigDecimal dcPower)
|
||||
{
|
||||
this.dcPower = dcPower;
|
||||
}
|
||||
|
||||
public BigDecimal getDcPower()
|
||||
{
|
||||
return dcPower;
|
||||
}
|
||||
|
||||
public void setDcVoltage(BigDecimal dcVoltage)
|
||||
{
|
||||
this.dcVoltage = dcVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getDcVoltage()
|
||||
{
|
||||
return dcVoltage;
|
||||
}
|
||||
|
||||
public void setDcCurrent(BigDecimal dcCurrent)
|
||||
{
|
||||
this.dcCurrent = dcCurrent;
|
||||
}
|
||||
|
||||
public BigDecimal getDcCurrent()
|
||||
{
|
||||
return dcCurrent;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public int getDateMonth() {
|
||||
return dateMonth;
|
||||
}
|
||||
|
||||
public void setDateMonth(int dateMonth) {
|
||||
this.dateMonth = dateMonth;
|
||||
}
|
||||
|
||||
public int getDateDay() {
|
||||
return dateDay;
|
||||
}
|
||||
|
||||
public void setDateDay(int dateDay) {
|
||||
this.dateDay = dateDay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("dataUpdateTime", getDataUpdateTime())
|
||||
.append("workStatus", getWorkStatus())
|
||||
.append("gridStatus", getGridStatus())
|
||||
.append("deviceStatus", getDeviceStatus())
|
||||
.append("controlMode", getControlMode())
|
||||
.append("totalActivePower", getTotalActivePower())
|
||||
.append("dailyAcChargeEnergy", getDailyAcChargeEnergy())
|
||||
.append("aPhaseVoltage", getaPhaseVoltage())
|
||||
.append("aPhaseCurrent", getaPhaseCurrent())
|
||||
.append("totalReactivePower", getTotalReactivePower())
|
||||
.append("dailyAcDischargeEnergy", getDailyAcDischargeEnergy())
|
||||
.append("bPhaseVoltage", getbPhaseVoltage())
|
||||
.append("bPhaseCurrent", getbPhaseCurrent())
|
||||
.append("totalApparentPower", getTotalApparentPower())
|
||||
.append("pcsModuleTemperature", getPcsModuleTemperature())
|
||||
.append("cPhaseVoltage", getcPhaseVoltage())
|
||||
.append("cPhaseCurrent", getcPhaseCurrent())
|
||||
.append("totalPowerFactor", getTotalPowerFactor())
|
||||
.append("pcsEnvironmentTemperature", getPcsEnvironmentTemperature())
|
||||
.append("acFrequency", getAcFrequency())
|
||||
.append("branchStatus", getBranchStatus())
|
||||
.append("dischargeStatus", getDischargeStatus())
|
||||
.append("dcPower", getDcPower())
|
||||
.append("dcVoltage", getDcVoltage())
|
||||
.append("dcCurrent", getDcCurrent())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("siteId", getSiteId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("dateMonth", getDateMonth())
|
||||
.append("dateDay", getDateDay())
|
||||
.toString();
|
||||
}
|
||||
}
|
57
ems-system/src/main/java/com/xzzn/ems/domain/EmsSite.java
Normal file
57
ems-system/src/main/java/com/xzzn/ems/domain/EmsSite.java
Normal file
@ -0,0 +1,57 @@
|
||||
package com.xzzn.ems.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 站点对象 site
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-16
|
||||
*/
|
||||
public class EmsSite extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键 */
|
||||
private Long id;
|
||||
|
||||
/** 站点名称 */
|
||||
@Excel(name = "站点名称")
|
||||
private String siteName;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSiteName(String siteName)
|
||||
{
|
||||
this.siteName = siteName;
|
||||
}
|
||||
|
||||
public String getSiteName()
|
||||
{
|
||||
return siteName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("siteName", getSiteName())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 实时运行-电池平均SOC数据
|
||||
*
|
||||
*/
|
||||
public class BatteryAveSOCVo {
|
||||
/**
|
||||
* 月份 月+日
|
||||
*/
|
||||
private String monthDay;
|
||||
|
||||
/**
|
||||
* 实时SOC
|
||||
*/
|
||||
private BigDecimal batterySOC;
|
||||
|
||||
/**
|
||||
* 昨日SOC
|
||||
*/
|
||||
private BigDecimal ytdBatterySOC;
|
||||
|
||||
public String getMonthDay() {
|
||||
return monthDay;
|
||||
}
|
||||
|
||||
public void setMonthDay(String monthDay) {
|
||||
this.monthDay = monthDay;
|
||||
}
|
||||
|
||||
public BigDecimal getBatterySOC() {
|
||||
return batterySOC;
|
||||
}
|
||||
|
||||
public void setBatterySOC(BigDecimal batterySOC) {
|
||||
this.batterySOC = batterySOC;
|
||||
}
|
||||
|
||||
public BigDecimal getYtdBatterySOC() {
|
||||
return ytdBatterySOC;
|
||||
}
|
||||
|
||||
public void setYtdBatterySOC(BigDecimal ytdBatterySOC) {
|
||||
this.ytdBatterySOC = ytdBatterySOC;
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 实时运行-电池平均温度数据
|
||||
*
|
||||
*/
|
||||
public class BatteryAveTempVo {
|
||||
/**
|
||||
* 月份 月+日
|
||||
*/
|
||||
private String monthDay;
|
||||
|
||||
/**
|
||||
* 实时温度
|
||||
*/
|
||||
private BigDecimal batteryTemp;
|
||||
|
||||
/**
|
||||
* 昨日温度
|
||||
*/
|
||||
private BigDecimal batteryYtdTemp;
|
||||
|
||||
|
||||
public String getMonthDay() {
|
||||
return monthDay;
|
||||
}
|
||||
|
||||
public void setMonthDay(String monthDay) {
|
||||
this.monthDay = monthDay;
|
||||
}
|
||||
|
||||
public BigDecimal getBatteryTemp() {
|
||||
return batteryTemp;
|
||||
}
|
||||
|
||||
public void setBatteryTemp(BigDecimal batteryTemp) {
|
||||
this.batteryTemp = batteryTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getBatteryYtdTemp() {
|
||||
return batteryYtdTemp;
|
||||
}
|
||||
|
||||
public void setBatteryYtdTemp(BigDecimal batteryYtdTemp) {
|
||||
this.batteryYtdTemp = batteryYtdTemp;
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 实时运行-储能功率数据
|
||||
*
|
||||
*/
|
||||
public class EnergyStoragePowVo {
|
||||
/**
|
||||
* 月份 月+日
|
||||
*/
|
||||
private String monthDay;
|
||||
|
||||
/**
|
||||
* pcs实时有功功率
|
||||
*/
|
||||
private BigDecimal pcsTotalActPower;
|
||||
|
||||
/**
|
||||
* pcs实时无功功率
|
||||
*/
|
||||
private BigDecimal pcsTotalReactivePower;
|
||||
|
||||
/**
|
||||
* pcs昨日有功功率
|
||||
*/
|
||||
private BigDecimal pcsYtdActPower;
|
||||
|
||||
/**
|
||||
* pcs昨日无功功率
|
||||
*/
|
||||
private BigDecimal pcsYtdReactivePower;
|
||||
|
||||
public String getMonthDay() {
|
||||
return monthDay;
|
||||
}
|
||||
|
||||
public void setMonthDay(String monthDay) {
|
||||
this.monthDay = monthDay;
|
||||
}
|
||||
|
||||
public BigDecimal getPcsTotalActPower() {
|
||||
return pcsTotalActPower;
|
||||
}
|
||||
|
||||
public void setPcsTotalActPower(BigDecimal pcsTotalActPower) {
|
||||
this.pcsTotalActPower = pcsTotalActPower;
|
||||
}
|
||||
|
||||
public BigDecimal getPcsTotalReactivePower() {
|
||||
return pcsTotalReactivePower;
|
||||
}
|
||||
|
||||
public void setPcsTotalReactivePower(BigDecimal pcsTotalReactivePower) {
|
||||
this.pcsTotalReactivePower = pcsTotalReactivePower;
|
||||
}
|
||||
|
||||
public BigDecimal getPcsYtdActPower() {
|
||||
return pcsYtdActPower;
|
||||
}
|
||||
|
||||
public void setPcsYtdActPower(BigDecimal pcsYtdActPower) {
|
||||
this.pcsYtdActPower = pcsYtdActPower;
|
||||
}
|
||||
|
||||
public BigDecimal getPcsYtdReactivePower() {
|
||||
return pcsYtdReactivePower;
|
||||
}
|
||||
|
||||
public void setPcsYtdReactivePower(BigDecimal pcsYtdReactivePower) {
|
||||
this.pcsYtdReactivePower = pcsYtdReactivePower;
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 实时运行-pcs平均温度数据
|
||||
*
|
||||
*/
|
||||
public class PCSAveTempVo {
|
||||
/**
|
||||
* 月份 月+日
|
||||
*/
|
||||
private String monthDay;
|
||||
|
||||
/**
|
||||
* 实时温度
|
||||
*/
|
||||
private BigDecimal pcsTemp;
|
||||
|
||||
/**
|
||||
* 昨日同时段温度(到分)
|
||||
*/
|
||||
private BigDecimal pcsYtdTemp;
|
||||
|
||||
public String getMonthDay() {
|
||||
return monthDay;
|
||||
}
|
||||
|
||||
public void setMonthDay(String monthDay) {
|
||||
this.monthDay = monthDay;
|
||||
}
|
||||
|
||||
public BigDecimal getPcsTemp() {
|
||||
return pcsTemp;
|
||||
}
|
||||
|
||||
public void setPcsTemp(BigDecimal pcsTemp) {
|
||||
this.pcsTemp = pcsTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getPcsYtdTemp() {
|
||||
return pcsYtdTemp;
|
||||
}
|
||||
|
||||
public void setPcsYtdTemp(BigDecimal pcsYtdTemp) {
|
||||
this.pcsYtdTemp = pcsYtdTemp;
|
||||
}
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 站点地图-某个站点基本信息
|
||||
*
|
||||
*/
|
||||
public class SingleSiteBaseInfo {
|
||||
/**
|
||||
* 今日充电量
|
||||
*/
|
||||
private BigDecimal dayChargedCap;
|
||||
|
||||
/**
|
||||
* 今日放电量
|
||||
*/
|
||||
private BigDecimal dayDisChargedCap;
|
||||
|
||||
/**
|
||||
* 总充电量
|
||||
*/
|
||||
private BigDecimal totalChargedCap;
|
||||
|
||||
/**
|
||||
* 总放电量
|
||||
*/
|
||||
private BigDecimal totalDischargedCap;
|
||||
|
||||
/**
|
||||
* 站点位置
|
||||
*/
|
||||
private String siteLocation;
|
||||
|
||||
/**
|
||||
* 投运时间
|
||||
*/
|
||||
private String runningTime;
|
||||
|
||||
/**
|
||||
* 装机功率(MW)
|
||||
*/
|
||||
private BigDecimal installedPower;
|
||||
|
||||
/**
|
||||
* 装机容量(MW)
|
||||
*/
|
||||
private BigDecimal installedCap;
|
||||
|
||||
/**
|
||||
* 七天放电统计
|
||||
*/
|
||||
private List<SiteMonitorDataVo> SevenDayDischargeStats;
|
||||
|
||||
public BigDecimal getDayChargedCap() {
|
||||
return dayChargedCap;
|
||||
}
|
||||
|
||||
public void setDayChargedCap(BigDecimal dayChargedCap) {
|
||||
this.dayChargedCap = dayChargedCap;
|
||||
}
|
||||
|
||||
public List<SiteMonitorDataVo> getSevenDayDischargeStats() {
|
||||
return SevenDayDischargeStats;
|
||||
}
|
||||
|
||||
public void setSevenDayDischargeStats(List<SiteMonitorDataVo> sevenDayDischargeStats) {
|
||||
SevenDayDischargeStats = sevenDayDischargeStats;
|
||||
}
|
||||
|
||||
public BigDecimal getInstalledCap() {
|
||||
return installedCap;
|
||||
}
|
||||
|
||||
public void setInstalledCap(BigDecimal installedCap) {
|
||||
this.installedCap = installedCap;
|
||||
}
|
||||
|
||||
public BigDecimal getInstalledPower() {
|
||||
return installedPower;
|
||||
}
|
||||
|
||||
public void setInstalledPower(BigDecimal installedPower) {
|
||||
this.installedPower = installedPower;
|
||||
}
|
||||
|
||||
public String getRunningTime() {
|
||||
return runningTime;
|
||||
}
|
||||
|
||||
public void setRunningTime(String runningTime) {
|
||||
this.runningTime = runningTime;
|
||||
}
|
||||
|
||||
public String getSiteLocation() {
|
||||
return siteLocation;
|
||||
}
|
||||
|
||||
public void setSiteLocation(String siteLocation) {
|
||||
this.siteLocation = siteLocation;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalDischargedCap() {
|
||||
return totalDischargedCap;
|
||||
}
|
||||
|
||||
public void setTotalDischargedCap(BigDecimal totalDischargedCap) {
|
||||
this.totalDischargedCap = totalDischargedCap;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalChargedCap() {
|
||||
return totalChargedCap;
|
||||
}
|
||||
|
||||
public void setTotalChargedCap(BigDecimal totalChargedCap) {
|
||||
this.totalChargedCap = totalChargedCap;
|
||||
}
|
||||
|
||||
public BigDecimal getDayDisChargedCap() {
|
||||
return dayDisChargedCap;
|
||||
}
|
||||
|
||||
public void setDayDisChargedCap(BigDecimal dayDisChargedCap) {
|
||||
this.dayDisChargedCap = dayDisChargedCap;
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 单站监控首页-能量流转数据
|
||||
*
|
||||
*/
|
||||
public class SiteMonitorDataVo {
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
private String ammeterDate;
|
||||
|
||||
/**
|
||||
* 放电量
|
||||
*/
|
||||
private BigDecimal disChargedCap;
|
||||
|
||||
/**
|
||||
* 充电量
|
||||
*/
|
||||
private BigDecimal chargedCap;
|
||||
|
||||
public String getAmmeterDate() {
|
||||
return ammeterDate;
|
||||
}
|
||||
|
||||
public void setAmmeterDate(String ammeterDate) {
|
||||
this.ammeterDate = ammeterDate;
|
||||
}
|
||||
|
||||
public BigDecimal getDisChargedCap() {
|
||||
return disChargedCap;
|
||||
}
|
||||
|
||||
public void setDisChargedCap(BigDecimal disChargedCap) {
|
||||
this.disChargedCap = disChargedCap;
|
||||
}
|
||||
|
||||
public BigDecimal getChargedCap() {
|
||||
return chargedCap;
|
||||
}
|
||||
|
||||
public void setChargedCap(BigDecimal chargedCap) {
|
||||
this.chargedCap = chargedCap;
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
/**
|
||||
* 单站监控首页告警数据
|
||||
*
|
||||
*/
|
||||
public class SiteMonitorHomeAlarmVo {
|
||||
/**
|
||||
* 告警名称
|
||||
*/
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 告警内容
|
||||
*/
|
||||
private String alarmContent;
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getAlarmContent() {
|
||||
return alarmContent;
|
||||
}
|
||||
|
||||
public void setAlarmContent(String alarmContent) {
|
||||
this.alarmContent = alarmContent;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
@ -0,0 +1,142 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 单站监控首页数据
|
||||
*
|
||||
*/
|
||||
public class SiteMonitorHomeVo {
|
||||
|
||||
|
||||
/**
|
||||
* 今日充电量
|
||||
*/
|
||||
private BigDecimal dayChargedCap;
|
||||
|
||||
/**
|
||||
* 今日放电量
|
||||
*/
|
||||
private BigDecimal dayDisChargedCap;
|
||||
|
||||
/**
|
||||
* 总充电量
|
||||
*/
|
||||
private BigDecimal totalChargedCap;
|
||||
|
||||
/**
|
||||
* 总放电量
|
||||
*/
|
||||
private BigDecimal totalDischargedCap;
|
||||
|
||||
/**
|
||||
* 告警集合
|
||||
*/
|
||||
private List<SiteMonitorHomeAlarmVo> siteMonitorHomeAlarmVo;
|
||||
|
||||
/**
|
||||
* 电网实时功率
|
||||
*/
|
||||
private BigDecimal gridNrtPower;
|
||||
|
||||
/**
|
||||
* 储能实时功率-暂空
|
||||
*/
|
||||
private BigDecimal energyStorageNrtPower;
|
||||
|
||||
/**
|
||||
* 储能可用电量
|
||||
*/
|
||||
private BigDecimal energyStorageAvailElec;
|
||||
|
||||
/**
|
||||
* 负载实时功率-暂空
|
||||
*/
|
||||
private BigDecimal loadNrtPower;
|
||||
|
||||
/**
|
||||
* 能量流转数据
|
||||
*/
|
||||
private List<SiteMonitorDataVo> siteMonitorDataVo;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalChargedCap() {
|
||||
return totalChargedCap;
|
||||
}
|
||||
|
||||
public void setTotalChargedCap(BigDecimal totalChargedCap) {
|
||||
this.totalChargedCap = totalChargedCap;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalDischargedCap() {
|
||||
return totalDischargedCap;
|
||||
}
|
||||
|
||||
public void setTotalDischargedCap(BigDecimal totalDischargedCap) {
|
||||
this.totalDischargedCap = totalDischargedCap;
|
||||
}
|
||||
|
||||
public List<SiteMonitorHomeAlarmVo> getSiteMonitorHomeAlarmVo() {
|
||||
return siteMonitorHomeAlarmVo;
|
||||
}
|
||||
|
||||
public void setSiteMonitorHomeAlarmVo(List<SiteMonitorHomeAlarmVo> siteMonitorHomeAlarmVo) {
|
||||
this.siteMonitorHomeAlarmVo = siteMonitorHomeAlarmVo;
|
||||
}
|
||||
|
||||
public BigDecimal getGridNrtPower() {
|
||||
return gridNrtPower;
|
||||
}
|
||||
|
||||
public void setGridNrtPower(BigDecimal gridNrtPower) {
|
||||
this.gridNrtPower = gridNrtPower;
|
||||
}
|
||||
|
||||
public BigDecimal getEnergyStorageNrtPower() {
|
||||
return energyStorageNrtPower;
|
||||
}
|
||||
|
||||
public void setEnergyStorageNrtPower(BigDecimal energyStorageNrtPower) {
|
||||
this.energyStorageNrtPower = energyStorageNrtPower;
|
||||
}
|
||||
|
||||
public BigDecimal getEnergyStorageAvailElec() {
|
||||
return energyStorageAvailElec;
|
||||
}
|
||||
|
||||
public void setEnergyStorageAvailElec(BigDecimal energyStorageAvailElec) {
|
||||
this.energyStorageAvailElec = energyStorageAvailElec;
|
||||
}
|
||||
|
||||
public BigDecimal getLoadNrtPower() {
|
||||
return loadNrtPower;
|
||||
}
|
||||
|
||||
public void setLoadNrtPower(BigDecimal loadNrtPower) {
|
||||
this.loadNrtPower = loadNrtPower;
|
||||
}
|
||||
|
||||
public List<SiteMonitorDataVo> getSiteMonitorDataVo() {
|
||||
return siteMonitorDataVo;
|
||||
}
|
||||
|
||||
public void setSiteMonitorDataVo(List<SiteMonitorDataVo> siteMonitorDataVo) {
|
||||
this.siteMonitorDataVo = siteMonitorDataVo;
|
||||
}
|
||||
}
|
@ -0,0 +1,140 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 单站监控-设备监控-实时运行数据
|
||||
*
|
||||
*/
|
||||
public class SiteMonitorRuningInfoVo {
|
||||
/**
|
||||
* 实时有功功率
|
||||
*/
|
||||
private BigDecimal totalActivePower;
|
||||
|
||||
/**
|
||||
* 实时无功功率
|
||||
*/
|
||||
private BigDecimal totalReactivePower;
|
||||
|
||||
/**
|
||||
* 电池簇SOC
|
||||
*/
|
||||
private BigDecimal soc;
|
||||
|
||||
/**
|
||||
* 电池堆SOH
|
||||
*/
|
||||
private BigDecimal soh;
|
||||
|
||||
/**
|
||||
* 今日充电量
|
||||
*/
|
||||
private BigDecimal dayChargedCap;
|
||||
|
||||
/**
|
||||
* 今日放电量
|
||||
*/
|
||||
private BigDecimal dayDisChargedCap;
|
||||
|
||||
/**
|
||||
* 储能功率list
|
||||
*/
|
||||
private List<EnergyStoragePowVo> energyStoragePowList;
|
||||
|
||||
/**
|
||||
* pcs平均温度list
|
||||
*/
|
||||
private List<PCSAveTempVo> pcsAveTempList;
|
||||
|
||||
/**
|
||||
* 电池平均soclist
|
||||
*/
|
||||
private List<BatteryAveSOCVo> batteryAveSOCList;
|
||||
|
||||
/**
|
||||
* 电池平均温度list
|
||||
*/
|
||||
private List<BatteryAveTempVo> batteryAveTempList;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public List<EnergyStoragePowVo> getEnergyStoragePowList() {
|
||||
return energyStoragePowList;
|
||||
}
|
||||
|
||||
public void setEnergyStoragePowList(List<EnergyStoragePowVo> energyStoragePowList) {
|
||||
this.energyStoragePowList = energyStoragePowList;
|
||||
}
|
||||
|
||||
public List<PCSAveTempVo> getPcsAveTempList() {
|
||||
return pcsAveTempList;
|
||||
}
|
||||
|
||||
public void setPcsAveTempList(List<PCSAveTempVo> pcsAveTempList) {
|
||||
this.pcsAveTempList = pcsAveTempList;
|
||||
}
|
||||
|
||||
public List<BatteryAveSOCVo> getBatteryAveSOCList() {
|
||||
return batteryAveSOCList;
|
||||
}
|
||||
|
||||
public void setBatteryAveSOCList(List<BatteryAveSOCVo> batteryAveSOCList) {
|
||||
this.batteryAveSOCList = batteryAveSOCList;
|
||||
}
|
||||
|
||||
public List<BatteryAveTempVo> getBatteryAveTempList() {
|
||||
return batteryAveTempList;
|
||||
}
|
||||
|
||||
public void setBatteryAveTempList(List<BatteryAveTempVo> batteryAveTempList) {
|
||||
this.batteryAveTempList = batteryAveTempList;
|
||||
}
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 站点总信息
|
||||
*
|
||||
*/
|
||||
public class SiteTotalInfoVo {
|
||||
/**
|
||||
* 站点总数(座)
|
||||
*/
|
||||
private int siteNum;
|
||||
|
||||
/**
|
||||
* 装机功率(MW)
|
||||
*/
|
||||
private BigDecimal installedPower;
|
||||
|
||||
/**
|
||||
* 装机容量(MW)
|
||||
*/
|
||||
private BigDecimal installedCap;
|
||||
|
||||
/**
|
||||
* 总充电量(MWH)
|
||||
*/
|
||||
private BigDecimal totalChargedCap;
|
||||
|
||||
/**
|
||||
* 总放电量(MWH)
|
||||
*/
|
||||
private BigDecimal totalDischargedCap;
|
||||
|
||||
public int getSiteNum() {
|
||||
return siteNum;
|
||||
}
|
||||
|
||||
public void setSiteNum(int siteNum) {
|
||||
this.siteNum = siteNum;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalDischargedCap() {
|
||||
return totalDischargedCap;
|
||||
}
|
||||
|
||||
public void setTotalDischargedCap(BigDecimal totalDischargedCap) {
|
||||
this.totalDischargedCap = totalDischargedCap;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalChargedCap() {
|
||||
return totalChargedCap;
|
||||
}
|
||||
|
||||
public void setTotalChargedCap(BigDecimal totalChargedCap) {
|
||||
this.totalChargedCap = totalChargedCap;
|
||||
}
|
||||
|
||||
public BigDecimal getInstalledCap() {
|
||||
return installedCap;
|
||||
}
|
||||
|
||||
public void setInstalledCap(BigDecimal installedCap) {
|
||||
this.installedCap = installedCap;
|
||||
}
|
||||
|
||||
public BigDecimal getInstalledPower() {
|
||||
return installedPower;
|
||||
}
|
||||
|
||||
public void setInstalledPower(BigDecimal installedPower) {
|
||||
this.installedPower = installedPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SiteVo{" +
|
||||
"siteNum=" + siteNum +
|
||||
", installedPower=" + installedPower +
|
||||
", installedCap=" + installedCap +
|
||||
", totalChargedCap=" + totalChargedCap +
|
||||
", totalDischargedCap=" + totalDischargedCap +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsAlarmRecords;
|
||||
import com.xzzn.ems.domain.vo.SiteMonitorHomeAlarmVo;
|
||||
|
||||
/**
|
||||
* 告警记录Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-17
|
||||
*/
|
||||
public interface EmsAlarmRecordsMapper
|
||||
{
|
||||
/**
|
||||
* 查询告警记录
|
||||
*
|
||||
* @param id 告警记录主键
|
||||
* @return 告警记录
|
||||
*/
|
||||
public EmsAlarmRecords selectEmsAlarmRecordsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询告警记录列表
|
||||
*
|
||||
* @param emsAlarmRecords 告警记录
|
||||
* @return 告警记录集合
|
||||
*/
|
||||
public List<EmsAlarmRecords> selectEmsAlarmRecordsList(EmsAlarmRecords emsAlarmRecords);
|
||||
|
||||
/**
|
||||
* 新增告警记录
|
||||
*
|
||||
* @param emsAlarmRecords 告警记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsAlarmRecords(EmsAlarmRecords emsAlarmRecords);
|
||||
|
||||
/**
|
||||
* 修改告警记录
|
||||
*
|
||||
* @param emsAlarmRecords 告警记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsAlarmRecords(EmsAlarmRecords emsAlarmRecords);
|
||||
|
||||
/**
|
||||
* 删除告警记录
|
||||
*
|
||||
* @param id 告警记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsAlarmRecordsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除告警记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsAlarmRecordsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据站点id获取告警记录
|
||||
*
|
||||
*/
|
||||
public List<SiteMonitorHomeAlarmVo> getAlarmRecordsBySiteId(Long siteId);
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsPcsData;
|
||||
import com.xzzn.ems.domain.vo.SiteMonitorDataVo;
|
||||
|
||||
/**
|
||||
* PCS数据Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-17
|
||||
*/
|
||||
public interface EmsPcsDataMapper
|
||||
{
|
||||
/**
|
||||
* 查询PCS数据
|
||||
*
|
||||
* @param id PCS数据主键
|
||||
* @return PCS数据
|
||||
*/
|
||||
public EmsPcsData selectEmsPcsDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询PCS数据列表
|
||||
*
|
||||
* @param emsPcsData PCS数据
|
||||
* @return PCS数据集合
|
||||
*/
|
||||
public List<EmsPcsData> selectEmsPcsDataList(EmsPcsData emsPcsData);
|
||||
|
||||
/**
|
||||
* 新增PCS数据
|
||||
*
|
||||
* @param emsPcsData PCS数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsPcsData(EmsPcsData emsPcsData);
|
||||
|
||||
/**
|
||||
* 修改PCS数据
|
||||
*
|
||||
* @param emsPcsData PCS数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsPcsData(EmsPcsData emsPcsData);
|
||||
|
||||
/**
|
||||
* 删除PCS数据
|
||||
*
|
||||
* @param id PCS数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsPcsDataById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除PCS数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsPcsDataByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据site_id获取日期对应的充放电数据
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
public List<SiteMonitorDataVo> getPcsDataBySiteId(Long siteId);
|
||||
|
||||
/**
|
||||
* 根据站点获取电网实时功率=sum(总交流有功电率)
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getGridNrtPower(Long siteId);
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsSite;
|
||||
import com.xzzn.ems.domain.vo.SiteTotalInfoVo;
|
||||
|
||||
/**
|
||||
* 站点Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-16
|
||||
*/
|
||||
public interface EmsSiteMapper
|
||||
{
|
||||
/**
|
||||
* 查询站点
|
||||
*
|
||||
* @param id 站点主键
|
||||
* @return 站点
|
||||
*/
|
||||
public EmsSite selectSiteById(Long id);
|
||||
|
||||
/**
|
||||
* 查询站点列表
|
||||
*
|
||||
* @return 站点集合
|
||||
*/
|
||||
public List<EmsSite> selectSiteList();
|
||||
|
||||
/**
|
||||
* 新增站点
|
||||
*
|
||||
* @param site 站点
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSite(EmsSite site);
|
||||
|
||||
/**
|
||||
* 修改站点
|
||||
*
|
||||
* @param site 站点
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSite(EmsSite site);
|
||||
|
||||
/**
|
||||
* 删除站点
|
||||
*
|
||||
* @param id 站点主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSiteById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除站点
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSiteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 获取站点总信息
|
||||
* @return
|
||||
*/
|
||||
public SiteTotalInfoVo getSiteTotalInfo();
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.xzzn.ems.service;
|
||||
|
||||
|
||||
import com.xzzn.ems.domain.EmsSite;
|
||||
import com.xzzn.ems.domain.vo.SiteTotalInfoVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 站点信息 服务层
|
||||
*
|
||||
*/
|
||||
public interface IEmsSiteService
|
||||
{
|
||||
|
||||
public List<EmsSite> getAllSites();
|
||||
|
||||
|
||||
public SiteTotalInfoVo getSiteTotalInfo();
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.xzzn.ems.service;
|
||||
|
||||
import com.xzzn.ems.domain.vo.SingleSiteBaseInfo;
|
||||
import com.xzzn.ems.domain.vo.SiteTotalInfoVo;
|
||||
|
||||
/**
|
||||
* 站点信息 服务层
|
||||
*
|
||||
*/
|
||||
public interface IHomePageService
|
||||
{
|
||||
|
||||
public SiteTotalInfoVo getSiteTotalInfo();
|
||||
|
||||
public SingleSiteBaseInfo getSingleSiteBaseInfo(Long siteId);
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.xzzn.ems.service;
|
||||
|
||||
import com.xzzn.ems.domain.vo.SiteMonitorHomeVo;
|
||||
import com.xzzn.ems.domain.vo.SiteMonitorRuningInfoVo;
|
||||
|
||||
/**
|
||||
* 单点监控 服务层
|
||||
*
|
||||
*/
|
||||
public interface ISingleSiteService
|
||||
{
|
||||
|
||||
public SiteMonitorHomeVo getSiteMonitorDataVo(Long siteId);
|
||||
|
||||
|
||||
public SiteMonitorRuningInfoVo getSiteRuningInfo(Long siteId);
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.xzzn.ems.service.impl;
|
||||
|
||||
import com.xzzn.ems.domain.EmsSite;
|
||||
import com.xzzn.ems.domain.vo.SiteTotalInfoVo;
|
||||
import com.xzzn.ems.mapper.EmsSiteMapper;
|
||||
import com.xzzn.ems.service.IEmsSiteService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 站点信息 服务层实现
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class EmsSiteServiceImpl implements IEmsSiteService
|
||||
{
|
||||
|
||||
@Autowired
|
||||
private EmsSiteMapper emsSiteMapper;
|
||||
|
||||
@Override
|
||||
public List<EmsSite> getAllSites() {
|
||||
return emsSiteMapper.selectSiteList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SiteTotalInfoVo getSiteTotalInfo() {
|
||||
return emsSiteMapper.getSiteTotalInfo();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.xzzn.ems.service.impl;
|
||||
|
||||
import com.xzzn.common.utils.DateUtils;
|
||||
import com.xzzn.common.utils.StringUtils;
|
||||
import com.xzzn.ems.domain.EmsSite;
|
||||
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.mapper.EmsPcsDataMapper;
|
||||
import com.xzzn.ems.mapper.EmsSiteMapper;
|
||||
import com.xzzn.ems.service.IEmsSiteService;
|
||||
import com.xzzn.ems.service.IHomePageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 首页看板+站点地图 服务层实现
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class HomePageServiceImpl implements IHomePageService
|
||||
{
|
||||
|
||||
@Autowired
|
||||
private IEmsSiteService emsSiteService;
|
||||
@Autowired
|
||||
private EmsPcsDataMapper emsPcsDataMapper;
|
||||
@Autowired
|
||||
private EmsSiteMapper emsSiteMapper;
|
||||
|
||||
@Override
|
||||
public SiteTotalInfoVo getSiteTotalInfo() {
|
||||
return emsSiteService.getSiteTotalInfo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleSiteBaseInfo getSingleSiteBaseInfo(Long siteId) {
|
||||
SingleSiteBaseInfo singleSiteBaseInfo = new SingleSiteBaseInfo();
|
||||
|
||||
if (siteId != null) {
|
||||
// 站点基本信息
|
||||
EmsSite emsSite = emsSiteMapper.selectSiteById(siteId);
|
||||
if (emsSite != null) {
|
||||
singleSiteBaseInfo.setSiteLocation(emsSite.getRemark());//站点位置
|
||||
singleSiteBaseInfo.setRunningTime(DateUtils.parseDateToStr("yyyy-MM-dd",emsSite.getCreateTime()));//投运时间
|
||||
// 装机功率+装机容量 待定
|
||||
// 七天放电数据统计
|
||||
List<SiteMonitorDataVo> siteMonitorDataVoList = emsPcsDataMapper.getPcsDataBySiteId(siteId);
|
||||
singleSiteBaseInfo.setSevenDayDischargeStats(siteMonitorDataVoList);
|
||||
// 充放电基本数据处理
|
||||
dealSitePCSDate(singleSiteBaseInfo,siteMonitorDataVoList);
|
||||
}
|
||||
}
|
||||
|
||||
return singleSiteBaseInfo;
|
||||
}
|
||||
|
||||
private void dealSitePCSDate(SingleSiteBaseInfo singleSiteBaseInfo, List<SiteMonitorDataVo> siteMonitorDataVoList) {
|
||||
if (siteMonitorDataVoList != null && !siteMonitorDataVoList.isEmpty()) {
|
||||
BigDecimal dayChargeCap = new BigDecimal(0);
|
||||
BigDecimal dayDisChargeCap = new BigDecimal(0);
|
||||
BigDecimal totalChargeCap = new BigDecimal(0);
|
||||
BigDecimal totalDisChargeCap = new BigDecimal(0);
|
||||
for (SiteMonitorDataVo sitePcsData : siteMonitorDataVoList) {
|
||||
// 总充电量
|
||||
totalChargeCap = totalChargeCap.add(sitePcsData.getChargedCap());
|
||||
// 总放电量
|
||||
totalDisChargeCap = totalDisChargeCap.add(sitePcsData.getDisChargedCap());
|
||||
// 获取当天的充电量+放电量
|
||||
String pcsDate = sitePcsData.getAmmeterDate();
|
||||
boolean isToday= checkIsToday(pcsDate);
|
||||
if(isToday){
|
||||
dayChargeCap = dayChargeCap.add(sitePcsData.getChargedCap());
|
||||
dayDisChargeCap = dayDisChargeCap.add(sitePcsData.getDisChargedCap());
|
||||
}
|
||||
}
|
||||
singleSiteBaseInfo.setDayChargedCap(dayChargeCap);
|
||||
singleSiteBaseInfo.setDayDisChargedCap(dayDisChargeCap);
|
||||
singleSiteBaseInfo.setTotalChargedCap(totalChargeCap);
|
||||
singleSiteBaseInfo.setTotalDischargedCap(totalDisChargeCap);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean checkIsToday(String pcsDate) {
|
||||
boolean flag = false;
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int todayMonth = calendar.get(Calendar.MONTH) + 1;
|
||||
int todayDay = calendar.get(Calendar.DAY_OF_MONTH);
|
||||
if (StringUtils.isNotEmpty(pcsDate)){
|
||||
String[] pcsDateArray = pcsDate.split("/");
|
||||
if (todayMonth == Integer.parseInt(pcsDateArray[0]) &&
|
||||
todayDay == Integer.parseInt(pcsDateArray[1])) {
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.xzzn.ems.service.impl;
|
||||
|
||||
import com.xzzn.common.utils.DateUtils;
|
||||
import com.xzzn.common.utils.StringUtils;
|
||||
import com.xzzn.ems.domain.vo.SiteMonitorDataVo;
|
||||
import com.xzzn.ems.domain.vo.SiteMonitorHomeAlarmVo;
|
||||
import com.xzzn.ems.domain.vo.SiteMonitorHomeVo;
|
||||
import com.xzzn.ems.domain.vo.SiteMonitorRuningInfoVo;
|
||||
import com.xzzn.ems.mapper.EmsAlarmRecordsMapper;
|
||||
import com.xzzn.ems.mapper.EmsPcsDataMapper;
|
||||
import com.xzzn.ems.service.ISingleSiteService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 单点监控 服务层实现
|
||||
*/
|
||||
@Service
|
||||
public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
|
||||
@Autowired
|
||||
private EmsPcsDataMapper emsPcsDataMapper;
|
||||
@Autowired
|
||||
private EmsAlarmRecordsMapper emsAlarmRecordsMapper;
|
||||
|
||||
@Override
|
||||
public SiteMonitorHomeVo getSiteMonitorDataVo(Long siteId) {
|
||||
SiteMonitorHomeVo siteMonitorHomeVo = new SiteMonitorHomeVo();
|
||||
|
||||
if (siteId != null) {
|
||||
// 实时告警数据 名称+状态+告警内容
|
||||
List<SiteMonitorHomeAlarmVo> siteMonitorHomeAlarmVo = emsAlarmRecordsMapper.getAlarmRecordsBySiteId(siteId);
|
||||
siteMonitorHomeVo.setSiteMonitorHomeAlarmVo(siteMonitorHomeAlarmVo);
|
||||
// 能量数据
|
||||
List<SiteMonitorDataVo> siteMonitorDataVoList = emsPcsDataMapper.getPcsDataBySiteId(siteId);
|
||||
if (siteMonitorDataVoList != null && !siteMonitorDataVoList.isEmpty()) {
|
||||
BigDecimal dayChargeCap = new BigDecimal(0);
|
||||
BigDecimal dayDisChargeCap = new BigDecimal(0);
|
||||
BigDecimal totalChargeCap = new BigDecimal(0);
|
||||
BigDecimal totalDisChargeCap = new BigDecimal(0);
|
||||
for (SiteMonitorDataVo sitePcsData : siteMonitorDataVoList) {
|
||||
// 总充电量
|
||||
totalChargeCap = totalChargeCap.add(sitePcsData.getChargedCap());
|
||||
// 总放电量
|
||||
totalDisChargeCap = totalDisChargeCap.add(sitePcsData.getDisChargedCap());
|
||||
// 获取当天的充电量+放电量
|
||||
String pcsDate = sitePcsData.getAmmeterDate();
|
||||
boolean isToday= checkIsToday(pcsDate);
|
||||
if(isToday){
|
||||
dayChargeCap = dayChargeCap.add(sitePcsData.getChargedCap());
|
||||
dayDisChargeCap = dayDisChargeCap.add(sitePcsData.getDisChargedCap());
|
||||
}
|
||||
}
|
||||
siteMonitorHomeVo.setDayChargedCap(dayChargeCap);
|
||||
siteMonitorHomeVo.setDayDisChargedCap(dayDisChargeCap);
|
||||
siteMonitorHomeVo.setTotalChargedCap(totalChargeCap);
|
||||
siteMonitorHomeVo.setTotalDischargedCap(totalDisChargeCap);
|
||||
// 储能可用电量
|
||||
BigDecimal energyStorageAvailElec = siteMonitorHomeVo.getTotalDischargedCap().subtract(siteMonitorHomeVo.getTotalChargedCap());
|
||||
siteMonitorHomeVo.setEnergyStorageAvailElec(energyStorageAvailElec);
|
||||
}
|
||||
siteMonitorHomeVo.setSiteMonitorDataVo(siteMonitorDataVoList);
|
||||
// 电网实时功率
|
||||
siteMonitorHomeVo.setGridNrtPower(emsPcsDataMapper.getGridNrtPower(siteId));
|
||||
}
|
||||
|
||||
return siteMonitorHomeVo;
|
||||
}
|
||||
|
||||
private boolean checkIsToday(String pcsDate) {
|
||||
boolean flag = false;
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int todayMonth = calendar.get(Calendar.MONTH) + 1;
|
||||
int todayDay = calendar.get(Calendar.DAY_OF_MONTH);
|
||||
if (StringUtils.isNotEmpty(pcsDate)){
|
||||
String[] pcsDateArray = pcsDate.split("/");
|
||||
if (todayMonth == Integer.parseInt(pcsDateArray[0]) &&
|
||||
todayDay == Integer.parseInt(pcsDateArray[1])) {
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SiteMonitorRuningInfoVo getSiteRuningInfo(Long siteId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xzzn.ems.mapper.EmsAlarmRecordsMapper">
|
||||
|
||||
<resultMap type="EmsAlarmRecords" id="EmsAlarmRecordsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="deviceType" column="device_type" />
|
||||
<result property="alarmLevel" column="alarm_level" />
|
||||
<result property="alarmContent" column="alarm_content" />
|
||||
<result property="alarmStartTime" column="alarm_start_time" />
|
||||
<result property="alarmEndTime" column="alarm_end_time" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="siteId" column="site_id" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmsAlarmRecordsVo">
|
||||
select id, device_type, alarm_level, alarm_content, alarm_start_time, alarm_end_time, status, create_by, create_time, update_by, update_time, remark, site_id, device_id, device_name from ems_alarm_records
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsAlarmRecordsList" parameterType="EmsAlarmRecords" resultMap="EmsAlarmRecordsResult">
|
||||
<include refid="selectEmsAlarmRecordsVo"/>
|
||||
<where>
|
||||
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
|
||||
<if test="alarmLevel != null and alarmLevel != ''"> and alarm_level = #{alarmLevel}</if>
|
||||
<if test="alarmContent != null and alarmContent != ''"> and alarm_content = #{alarmContent}</if>
|
||||
<if test="alarmStartTime != null "> and alarm_start_time = #{alarmStartTime}</if>
|
||||
<if test="alarmEndTime != null "> and alarm_end_time = #{alarmEndTime}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="siteId != null "> and site_id = #{siteId}</if>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEmsAlarmRecordsById" parameterType="Long" resultMap="EmsAlarmRecordsResult">
|
||||
<include refid="selectEmsAlarmRecordsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmsAlarmRecords" parameterType="EmsAlarmRecords" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ems_alarm_records
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="deviceType != null">device_type,</if>
|
||||
<if test="alarmLevel != null">alarm_level,</if>
|
||||
<if test="alarmContent != null">alarm_content,</if>
|
||||
<if test="alarmStartTime != null">alarm_start_time,</if>
|
||||
<if test="alarmEndTime != null">alarm_end_time,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="siteId != null">site_id,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="deviceName != null and deviceName != ''">device_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="deviceType != null">#{deviceType},</if>
|
||||
<if test="alarmLevel != null">#{alarmLevel},</if>
|
||||
<if test="alarmContent != null">#{alarmContent},</if>
|
||||
<if test="alarmStartTime != null">#{alarmStartTime},</if>
|
||||
<if test="alarmEndTime != null">#{alarmEndTime},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="siteId != null">#{siteId},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmsAlarmRecords" parameterType="EmsAlarmRecords">
|
||||
update ems_alarm_records
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="deviceType != null">device_type = #{deviceType},</if>
|
||||
<if test="alarmLevel != null">alarm_level = #{alarmLevel},</if>
|
||||
<if test="alarmContent != null">alarm_content = #{alarmContent},</if>
|
||||
<if test="alarmStartTime != null">alarm_start_time = #{alarmStartTime},</if>
|
||||
<if test="alarmEndTime != null">alarm_end_time = #{alarmEndTime},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="siteId != null">site_id = #{siteId},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="deviceName != null and deviceName != ''">device_name = #{deviceName},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmsAlarmRecordsById" parameterType="Long">
|
||||
delete from ems_alarm_records where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmsAlarmRecordsByIds" parameterType="String">
|
||||
delete from ems_alarm_records where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getAlarmRecordsBySiteId" parameterType="Long" resultType="com.xzzn.ems.domain.vo.SiteMonitorHomeAlarmVo">
|
||||
select device_name as deviceName,
|
||||
status,alarm_content as alarmContent
|
||||
from ems_alarm_records
|
||||
where site_id = #{siteId}
|
||||
</select>
|
||||
</mapper>
|
225
ems-system/src/main/resources/mapper/ems/EmsPcsDataMapper.xml
Normal file
225
ems-system/src/main/resources/mapper/ems/EmsPcsDataMapper.xml
Normal file
@ -0,0 +1,225 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xzzn.ems.mapper.EmsPcsDataMapper">
|
||||
|
||||
<resultMap type="EmsPcsData" id="EmsPcsDataResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="dataUpdateTime" column="data_update_time" />
|
||||
<result property="workStatus" column="work_status" />
|
||||
<result property="gridStatus" column="grid_status" />
|
||||
<result property="deviceStatus" column="device_status" />
|
||||
<result property="controlMode" column="control_mode" />
|
||||
<result property="totalActivePower" column="total_active_power" />
|
||||
<result property="dailyAcChargeEnergy" column="daily_ac_charge_energy" />
|
||||
<result property="aPhaseVoltage" column="a_phase_voltage" />
|
||||
<result property="aPhaseCurrent" column="a_phase_current" />
|
||||
<result property="totalReactivePower" column="total_reactive_power" />
|
||||
<result property="dailyAcDischargeEnergy" column="daily_ac_discharge_energy" />
|
||||
<result property="bPhaseVoltage" column="b_phase_voltage" />
|
||||
<result property="bPhaseCurrent" column="b_phase_current" />
|
||||
<result property="totalApparentPower" column="total_apparent_power" />
|
||||
<result property="pcsModuleTemperature" column="pcs_module_temperature" />
|
||||
<result property="cPhaseVoltage" column="c_phase_voltage" />
|
||||
<result property="cPhaseCurrent" column="c_phase_current" />
|
||||
<result property="totalPowerFactor" column="total_power_factor" />
|
||||
<result property="pcsEnvironmentTemperature" column="pcs_environment_temperature" />
|
||||
<result property="acFrequency" column="ac_frequency" />
|
||||
<result property="branchStatus" column="branch_status" />
|
||||
<result property="dischargeStatus" column="discharge_status" />
|
||||
<result property="dcPower" column="dc_power" />
|
||||
<result property="dcVoltage" column="dc_voltage" />
|
||||
<result property="dcCurrent" column="dc_current" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="siteId" column="site_id" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="dateMonth" column="date_month" />
|
||||
<result property="dateDay" column="date_day" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmsPcsDataVo">
|
||||
select id, data_update_time, work_status, grid_status, device_status, control_mode, total_active_power, daily_ac_charge_energy, a_phase_voltage, a_phase_current, total_reactive_power, daily_ac_discharge_energy, b_phase_voltage, b_phase_current, total_apparent_power, pcs_module_temperature, c_phase_voltage, c_phase_current, total_power_factor, pcs_environment_temperature, ac_frequency, branch_status, discharge_status, dc_power, dc_voltage, dc_current, create_by, create_time, update_by, update_time, remark, site_id, device_id, date_month, date_day from ems_pcs_data
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsPcsDataList" parameterType="EmsPcsData" resultMap="EmsPcsDataResult">
|
||||
<include refid="selectEmsPcsDataVo"/>
|
||||
<where>
|
||||
<if test="dataUpdateTime != null "> and data_update_time = #{dataUpdateTime}</if>
|
||||
<if test="workStatus != null and workStatus != ''"> and work_status = #{workStatus}</if>
|
||||
<if test="gridStatus != null and gridStatus != ''"> and grid_status = #{gridStatus}</if>
|
||||
<if test="deviceStatus != null and deviceStatus != ''"> and device_status = #{deviceStatus}</if>
|
||||
<if test="controlMode != null and controlMode != ''"> and control_mode = #{controlMode}</if>
|
||||
<if test="totalActivePower != null "> and total_active_power = #{totalActivePower}</if>
|
||||
<if test="dailyAcChargeEnergy != null "> and daily_ac_charge_energy = #{dailyAcChargeEnergy}</if>
|
||||
<if test="aPhaseVoltage != null "> and a_phase_voltage = #{aPhaseVoltage}</if>
|
||||
<if test="aPhaseCurrent != null "> and a_phase_current = #{aPhaseCurrent}</if>
|
||||
<if test="totalReactivePower != null "> and total_reactive_power = #{totalReactivePower}</if>
|
||||
<if test="dailyAcDischargeEnergy != null "> and daily_ac_discharge_energy = #{dailyAcDischargeEnergy}</if>
|
||||
<if test="bPhaseVoltage != null "> and b_phase_voltage = #{bPhaseVoltage}</if>
|
||||
<if test="bPhaseCurrent != null "> and b_phase_current = #{bPhaseCurrent}</if>
|
||||
<if test="totalApparentPower != null "> and total_apparent_power = #{totalApparentPower}</if>
|
||||
<if test="pcsModuleTemperature != null "> and pcs_module_temperature = #{pcsModuleTemperature}</if>
|
||||
<if test="cPhaseVoltage != null "> and c_phase_voltage = #{cPhaseVoltage}</if>
|
||||
<if test="cPhaseCurrent != null "> and c_phase_current = #{cPhaseCurrent}</if>
|
||||
<if test="totalPowerFactor != null "> and total_power_factor = #{totalPowerFactor}</if>
|
||||
<if test="pcsEnvironmentTemperature != null "> and pcs_environment_temperature = #{pcsEnvironmentTemperature}</if>
|
||||
<if test="acFrequency != null "> and ac_frequency = #{acFrequency}</if>
|
||||
<if test="branchStatus != null and branchStatus != ''"> and branch_status = #{branchStatus}</if>
|
||||
<if test="dischargeStatus != null and dischargeStatus != ''"> and discharge_status = #{dischargeStatus}</if>
|
||||
<if test="dcPower != null "> and dc_power = #{dcPower}</if>
|
||||
<if test="dcVoltage != null "> and dc_voltage = #{dcVoltage}</if>
|
||||
<if test="dcCurrent != null "> and dc_current = #{dcCurrent}</if>
|
||||
<if test="siteId != null "> and site_id = #{siteId}</if>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEmsPcsDataById" parameterType="Long" resultMap="EmsPcsDataResult">
|
||||
<include refid="selectEmsPcsDataVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmsPcsData" parameterType="EmsPcsData" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ems_pcs_data
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="dataUpdateTime != null">data_update_time,</if>
|
||||
<if test="workStatus != null">work_status,</if>
|
||||
<if test="gridStatus != null">grid_status,</if>
|
||||
<if test="deviceStatus != null">device_status,</if>
|
||||
<if test="controlMode != null">control_mode,</if>
|
||||
<if test="totalActivePower != null">total_active_power,</if>
|
||||
<if test="dailyAcChargeEnergy != null">daily_ac_charge_energy,</if>
|
||||
<if test="aPhaseVoltage != null">a_phase_voltage,</if>
|
||||
<if test="aPhaseCurrent != null">a_phase_current,</if>
|
||||
<if test="totalReactivePower != null">total_reactive_power,</if>
|
||||
<if test="dailyAcDischargeEnergy != null">daily_ac_discharge_energy,</if>
|
||||
<if test="bPhaseVoltage != null">b_phase_voltage,</if>
|
||||
<if test="bPhaseCurrent != null">b_phase_current,</if>
|
||||
<if test="totalApparentPower != null">total_apparent_power,</if>
|
||||
<if test="pcsModuleTemperature != null">pcs_module_temperature,</if>
|
||||
<if test="cPhaseVoltage != null">c_phase_voltage,</if>
|
||||
<if test="cPhaseCurrent != null">c_phase_current,</if>
|
||||
<if test="totalPowerFactor != null">total_power_factor,</if>
|
||||
<if test="pcsEnvironmentTemperature != null">pcs_environment_temperature,</if>
|
||||
<if test="acFrequency != null">ac_frequency,</if>
|
||||
<if test="branchStatus != null">branch_status,</if>
|
||||
<if test="dischargeStatus != null">discharge_status,</if>
|
||||
<if test="dcPower != null">dc_power,</if>
|
||||
<if test="dcVoltage != null">dc_voltage,</if>
|
||||
<if test="dcCurrent != null">dc_current,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="siteId != null">site_id,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="dataUpdateTime != null">#{dataUpdateTime},</if>
|
||||
<if test="workStatus != null">#{workStatus},</if>
|
||||
<if test="gridStatus != null">#{gridStatus},</if>
|
||||
<if test="deviceStatus != null">#{deviceStatus},</if>
|
||||
<if test="controlMode != null">#{controlMode},</if>
|
||||
<if test="totalActivePower != null">#{totalActivePower},</if>
|
||||
<if test="dailyAcChargeEnergy != null">#{dailyAcChargeEnergy},</if>
|
||||
<if test="aPhaseVoltage != null">#{aPhaseVoltage},</if>
|
||||
<if test="aPhaseCurrent != null">#{aPhaseCurrent},</if>
|
||||
<if test="totalReactivePower != null">#{totalReactivePower},</if>
|
||||
<if test="dailyAcDischargeEnergy != null">#{dailyAcDischargeEnergy},</if>
|
||||
<if test="bPhaseVoltage != null">#{bPhaseVoltage},</if>
|
||||
<if test="bPhaseCurrent != null">#{bPhaseCurrent},</if>
|
||||
<if test="totalApparentPower != null">#{totalApparentPower},</if>
|
||||
<if test="pcsModuleTemperature != null">#{pcsModuleTemperature},</if>
|
||||
<if test="cPhaseVoltage != null">#{cPhaseVoltage},</if>
|
||||
<if test="cPhaseCurrent != null">#{cPhaseCurrent},</if>
|
||||
<if test="totalPowerFactor != null">#{totalPowerFactor},</if>
|
||||
<if test="pcsEnvironmentTemperature != null">#{pcsEnvironmentTemperature},</if>
|
||||
<if test="acFrequency != null">#{acFrequency},</if>
|
||||
<if test="branchStatus != null">#{branchStatus},</if>
|
||||
<if test="dischargeStatus != null">#{dischargeStatus},</if>
|
||||
<if test="dcPower != null">#{dcPower},</if>
|
||||
<if test="dcVoltage != null">#{dcVoltage},</if>
|
||||
<if test="dcCurrent != null">#{dcCurrent},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="siteId != null">#{siteId},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmsPcsData" parameterType="EmsPcsData">
|
||||
update ems_pcs_data
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="dataUpdateTime != null">data_update_time = #{dataUpdateTime},</if>
|
||||
<if test="workStatus != null">work_status = #{workStatus},</if>
|
||||
<if test="gridStatus != null">grid_status = #{gridStatus},</if>
|
||||
<if test="deviceStatus != null">device_status = #{deviceStatus},</if>
|
||||
<if test="controlMode != null">control_mode = #{controlMode},</if>
|
||||
<if test="totalActivePower != null">total_active_power = #{totalActivePower},</if>
|
||||
<if test="dailyAcChargeEnergy != null">daily_ac_charge_energy = #{dailyAcChargeEnergy},</if>
|
||||
<if test="aPhaseVoltage != null">a_phase_voltage = #{aPhaseVoltage},</if>
|
||||
<if test="aPhaseCurrent != null">a_phase_current = #{aPhaseCurrent},</if>
|
||||
<if test="totalReactivePower != null">total_reactive_power = #{totalReactivePower},</if>
|
||||
<if test="dailyAcDischargeEnergy != null">daily_ac_discharge_energy = #{dailyAcDischargeEnergy},</if>
|
||||
<if test="bPhaseVoltage != null">b_phase_voltage = #{bPhaseVoltage},</if>
|
||||
<if test="bPhaseCurrent != null">b_phase_current = #{bPhaseCurrent},</if>
|
||||
<if test="totalApparentPower != null">total_apparent_power = #{totalApparentPower},</if>
|
||||
<if test="pcsModuleTemperature != null">pcs_module_temperature = #{pcsModuleTemperature},</if>
|
||||
<if test="cPhaseVoltage != null">c_phase_voltage = #{cPhaseVoltage},</if>
|
||||
<if test="cPhaseCurrent != null">c_phase_current = #{cPhaseCurrent},</if>
|
||||
<if test="totalPowerFactor != null">total_power_factor = #{totalPowerFactor},</if>
|
||||
<if test="pcsEnvironmentTemperature != null">pcs_environment_temperature = #{pcsEnvironmentTemperature},</if>
|
||||
<if test="acFrequency != null">ac_frequency = #{acFrequency},</if>
|
||||
<if test="branchStatus != null">branch_status = #{branchStatus},</if>
|
||||
<if test="dischargeStatus != null">discharge_status = #{dischargeStatus},</if>
|
||||
<if test="dcPower != null">dc_power = #{dcPower},</if>
|
||||
<if test="dcVoltage != null">dc_voltage = #{dcVoltage},</if>
|
||||
<if test="dcCurrent != null">dc_current = #{dcCurrent},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="siteId != null">site_id = #{siteId},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmsPcsDataById" parameterType="Long">
|
||||
delete from ems_pcs_data where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmsPcsDataByIds" parameterType="String">
|
||||
delete from ems_pcs_data where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getPcsDataBySiteId" parameterType="Long" resultType="com.xzzn.ems.domain.vo.SiteMonitorDataVo">
|
||||
select CONCAT(date_month,'/',date_day) as ammeterDate,
|
||||
sum(daily_ac_charge_energy) as chargedCap,
|
||||
sum(daily_ac_discharge_energy) as disChargedCap
|
||||
from ems_pcs_data
|
||||
where site_id = #{siteId}
|
||||
and date_sub(CURDATE(), interval 6 day) <= create_time
|
||||
group by date_month,date_day
|
||||
</select>
|
||||
|
||||
<select id="getGridNrtPower" parameterType="Long" resultType="java.math.BigDecimal">
|
||||
select sum(total_active_power) as gridNrtPower
|
||||
from ems_pcs_data
|
||||
where site_id = #{siteId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
83
ems-system/src/main/resources/mapper/ems/EmsSiteMapper.xml
Normal file
83
ems-system/src/main/resources/mapper/ems/EmsSiteMapper.xml
Normal file
@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xzzn.ems.mapper.EmsSiteMapper">
|
||||
|
||||
<resultMap type="EmsSite" id="SiteResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="siteName" column="site_name" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSiteVo">
|
||||
select id, site_name, remark, create_by, update_by, create_time, update_time from ems_site_setting
|
||||
</sql>
|
||||
|
||||
<select id="selectSiteList" parameterType="EmsSite" resultMap="SiteResult">
|
||||
<include refid="selectSiteVo"/>
|
||||
<where>
|
||||
<if test="siteName != null and siteName != ''"> and site_name like concat('%', #{siteName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSiteById" parameterType="Long" resultMap="SiteResult">
|
||||
<include refid="selectSiteVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSite" parameterType="EmsSite" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ems_site_setting
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="siteName != null and siteName != ''">site_name,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="siteName != null and siteName != ''">#{siteName},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSite" parameterType="EmsSite">
|
||||
update ems_site_setting
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="siteName != null and siteName != ''">site_name = #{siteName},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSiteById" parameterType="Long">
|
||||
delete from ems_site_setting where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSiteByIds" parameterType="String">
|
||||
delete from ems_site_setting where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getSiteTotalInfo" resultType="com.xzzn.ems.domain.vo.SiteTotalInfoVo">
|
||||
select count(DISTINCT s.id) as siteNum,
|
||||
SUM(d.daily_ac_charge_energy) as totalChargedCap,
|
||||
SUM(d.daily_ac_discharge_energy) as totalDischargedCap
|
||||
from ems_site_setting s left join ems_pcs_data d on s.id = d.site_id
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user