Compare commits

..

11 Commits

Author SHA1 Message Date
5eb42bec84 work init 2025-06-26 16:13:07 +08:00
e7b3a21c6d BMS总览+电池簇列表取数逻辑 2025-06-26 14:43:38 +08:00
4a69027f63 单站监控-实时运行液冷数据 2025-06-25 14:32:26 +08:00
0d6b712e46 首页-装机容量+功率 2025-06-25 12:40:04 +08:00
46e0b94571 PCS+BMS总览+电池簇抽数逻辑 2025-06-25 11:27:53 +08:00
7b64e193fc PCS抽数逻辑 2025-06-24 17:04:59 +08:00
7134bc03f8 PCS+BMS总览+BMS电池簇-框架 2025-06-24 01:18:07 +08:00
a2d8b6876d 首页看板-数据概览-数据筛选 2025-06-21 09:50:10 +08:00
53c1093f65 首页看板-数据概览 2025-06-21 09:42:31 +08:00
490261bc1f 站点地图修改 2025-06-20 12:17:04 +08:00
43237b4a93 设备监控-实时运行头数据 2025-06-19 19:00:33 +08:00
58 changed files with 5401 additions and 304 deletions

View File

@ -36,7 +36,7 @@ public class EmsHomePageController extends BaseController{
@GetMapping("/dataList")
public AjaxResult list()
{
return success(homePageService.getSiteTotalInfo());
return success(homePageService.getHomePageDataList());
}
/**

View File

@ -26,4 +26,76 @@ public class EmsSiteMonitorController extends BaseController{
{
return success(iSingleSiteService.getSiteMonitorDataVo(siteId));
}
/**
* 单站监控-设备监控-实时运行头部数据
*/
@GetMapping("/runningHeadInfo")
public AjaxResult getRunningHeadInfo(@RequestParam Long siteId)
{
return success(iSingleSiteService.getSiteRunningHeadInfo(siteId));
}
/**
* 单站监控-设备监控-实时运行曲线图数据
*/
@GetMapping("/runningGraph")
public AjaxResult getRunningGraph(@RequestParam Long siteId)
{
return success(iSingleSiteService.getRunningGraph(siteId));
}
/**
* 单站监控-设备监控-PCS
*/
@GetMapping("/getPcsDetailInfo")
public AjaxResult getPcsDetailInfo(@RequestParam Long siteId)
{
return success(iSingleSiteService.getPcsDetailInfo(siteId));
}
/**
* 单站监控-设备监控-BMS总览
*/
@GetMapping("/getBMSOverView")
public AjaxResult getBMSOverView(@RequestParam Long siteId)
{
return success(iSingleSiteService.getBMSOverView(siteId));
}
/**
* 单站监控-设备监控-BMS电池簇
*/
@GetMapping("/getBMSBatteryCluster")
public AjaxResult getBMSBatteryCluster(@RequestParam Long siteId)
{
return success(iSingleSiteService.getBMSBatteryCluster(siteId));
}
/**
* 获取所有电池堆
*/
@GetMapping("/getStackNameList")
public AjaxResult getStackNameList(@RequestParam Long siteId)
{
return success(iSingleSiteService.getBMSBatteryCluster(siteId));
}
/**
* 获取所有电池簇
*/
@GetMapping("/getClusterNameList")
public AjaxResult getClusterNameList(@RequestParam Long siteId)
{
return success(iSingleSiteService.getBMSBatteryCluster(siteId));
}
/**
* 液冷设备参数
*/
@GetMapping("/getCoolingDataList")
public AjaxResult getCoolingDataList(@RequestParam Long siteId)
{
return success(iSingleSiteService.getCoolingDataList(siteId));
}
}

View File

@ -0,0 +1,105 @@
package com.xzzn.web.controller.ems;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.xzzn.common.utils.poi.ExcelUtil;
import com.xzzn.ems.domain.EmsTicket;
import com.xzzn.ems.service.IEmsTicketService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.xzzn.common.annotation.Log;
import com.xzzn.common.core.controller.BaseController;
import com.xzzn.common.core.domain.AjaxResult;
import com.xzzn.common.enums.BusinessType;
import com.xzzn.common.core.page.TableDataInfo;
/**
* 工单主Controller
*
* @author xzzn
* @date 2025-06-26
*/
@RestController
@RequestMapping("/ticket")
public class EmsTicketController extends BaseController
{
@Autowired
private IEmsTicketService emsTicketService;
/**
* 查询工单主列表
*/
@PreAuthorize("@ss.hasPermi('system:ticket:list')")
@GetMapping("/list")
public TableDataInfo list(EmsTicket emsTicket)
{
startPage();
List<EmsTicket> list = emsTicketService.selectEmsTicketList(emsTicket);
return getDataTable(list);
}
/**
* 导出工单主列表
*/
@PreAuthorize("@ss.hasPermi('system:ticket:export')")
@Log(title = "工单主", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EmsTicket emsTicket)
{
List<EmsTicket> list = emsTicketService.selectEmsTicketList(emsTicket);
ExcelUtil<EmsTicket> util = new ExcelUtil<EmsTicket>(EmsTicket.class);
util.exportExcel(response, list, "工单主数据");
}
/**
* 获取工单主详细信息
*/
@PreAuthorize("@ss.hasPermi('system:ticket:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(emsTicketService.selectEmsTicketById(id));
}
/**
* 新增工单主
*/
@PreAuthorize("@ss.hasPermi('system:ticket:add')")
@Log(title = "工单主", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EmsTicket emsTicket)
{
return toAjax(emsTicketService.insertEmsTicket(emsTicket));
}
/**
* 修改工单主
*/
@PreAuthorize("@ss.hasPermi('system:ticket:edit')")
@Log(title = "工单主", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EmsTicket emsTicket)
{
return toAjax(emsTicketService.updateEmsTicket(emsTicket));
}
/**
* 删除工单主
*/
@PreAuthorize("@ss.hasPermi('system:ticket:remove')")
@Log(title = "工单主", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(emsTicketService.deleteEmsTicketByIds(ids));
}
}

View File

@ -0,0 +1,269 @@
package com.xzzn.ems.domain;
import java.math.BigDecimal;
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_cluster
*
* @author xzzn
* @date 2025-06-22
*/
public class EmsBatteryCluster extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 工作状态 */
@Excel(name = "工作状态")
private String workStatus;
/** 与PCS通信状态 */
@Excel(name = "与PCS通信状态")
private String pcsCommunicationStatus;
/** 与EMS通信状态 */
@Excel(name = "与EMS通信状态")
private String emsCommunicationStatus;
/** 簇电压 (V) */
@Excel(name = "簇电压 (V)")
private BigDecimal clusterVoltage;
/** 可充电量 (kWh) */
@Excel(name = "可充电量 (kWh)")
private BigDecimal chargeableCapacity;
/** 累计充电量 (kWh) */
@Excel(name = "累计充电量 (kWh)")
private BigDecimal totalChargedCapacity;
/** 簇电流 (A) */
@Excel(name = "簇电流 (A)")
private BigDecimal clusterCurrent;
/** 可放电量 (kWh) */
@Excel(name = "可放电量 (kWh)")
private BigDecimal dischargeableCapacity;
/** 累计放电量 (kWh) */
@Excel(name = "累计放电量 (kWh)")
private BigDecimal totalDischargedCapacity;
/** SOH (%) */
@Excel(name = "SOH (%)")
private BigDecimal soh;
/** 平均温度 (℃) */
@Excel(name = "平均温度 (℃)")
private BigDecimal averageTemperature;
/** 绝缘电阻 (Ω) */
@Excel(name = "绝缘电阻 (Ω)")
private BigDecimal insulationResistance;
/** 当前SOC (%) */
@Excel(name = "当前SOC (%)")
private BigDecimal currentSoc;
/** 站点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 setWorkStatus(String workStatus)
{
this.workStatus = workStatus;
}
public String getWorkStatus()
{
return workStatus;
}
public void setPcsCommunicationStatus(String pcsCommunicationStatus)
{
this.pcsCommunicationStatus = pcsCommunicationStatus;
}
public String getPcsCommunicationStatus()
{
return pcsCommunicationStatus;
}
public void setEmsCommunicationStatus(String emsCommunicationStatus)
{
this.emsCommunicationStatus = emsCommunicationStatus;
}
public String getEmsCommunicationStatus()
{
return emsCommunicationStatus;
}
public void setClusterVoltage(BigDecimal clusterVoltage)
{
this.clusterVoltage = clusterVoltage;
}
public BigDecimal getClusterVoltage()
{
return clusterVoltage;
}
public void setChargeableCapacity(BigDecimal chargeableCapacity)
{
this.chargeableCapacity = chargeableCapacity;
}
public BigDecimal getChargeableCapacity()
{
return chargeableCapacity;
}
public void setTotalChargedCapacity(BigDecimal totalChargedCapacity)
{
this.totalChargedCapacity = totalChargedCapacity;
}
public BigDecimal getTotalChargedCapacity()
{
return totalChargedCapacity;
}
public void setClusterCurrent(BigDecimal clusterCurrent)
{
this.clusterCurrent = clusterCurrent;
}
public BigDecimal getClusterCurrent()
{
return clusterCurrent;
}
public void setDischargeableCapacity(BigDecimal dischargeableCapacity)
{
this.dischargeableCapacity = dischargeableCapacity;
}
public BigDecimal getDischargeableCapacity()
{
return dischargeableCapacity;
}
public void setTotalDischargedCapacity(BigDecimal totalDischargedCapacity)
{
this.totalDischargedCapacity = totalDischargedCapacity;
}
public BigDecimal getTotalDischargedCapacity()
{
return totalDischargedCapacity;
}
public void setSoh(BigDecimal soh)
{
this.soh = soh;
}
public BigDecimal getSoh()
{
return soh;
}
public void setAverageTemperature(BigDecimal averageTemperature)
{
this.averageTemperature = averageTemperature;
}
public BigDecimal getAverageTemperature()
{
return averageTemperature;
}
public void setInsulationResistance(BigDecimal insulationResistance)
{
this.insulationResistance = insulationResistance;
}
public BigDecimal getInsulationResistance()
{
return insulationResistance;
}
public void setCurrentSoc(BigDecimal currentSoc)
{
this.currentSoc = currentSoc;
}
public BigDecimal getCurrentSoc()
{
return currentSoc;
}
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("workStatus", getWorkStatus())
.append("pcsCommunicationStatus", getPcsCommunicationStatus())
.append("emsCommunicationStatus", getEmsCommunicationStatus())
.append("clusterVoltage", getClusterVoltage())
.append("chargeableCapacity", getChargeableCapacity())
.append("totalChargedCapacity", getTotalChargedCapacity())
.append("clusterCurrent", getClusterCurrent())
.append("dischargeableCapacity", getDischargeableCapacity())
.append("totalDischargedCapacity", getTotalDischargedCapacity())
.append("soh", getSoh())
.append("averageTemperature", getAverageTemperature())
.append("insulationResistance", getInsulationResistance())
.append("currentSoc", getCurrentSoc())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("siteId", getSiteId())
.append("deviceId", getDeviceId())
.toString();
}
}

View File

@ -0,0 +1,211 @@
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-25
*/
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;
/** 簇设备id */
@Excel(name = "簇设备id")
private Long clusterDeviceId;
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;
}
public void setClusterDeviceId(Long clusterDeviceId)
{
this.clusterDeviceId = clusterDeviceId;
}
public Long getClusterDeviceId()
{
return clusterDeviceId;
}
@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())
.append("clusterDeviceId", getClusterDeviceId())
.toString();
}
}

View File

@ -0,0 +1,269 @@
package com.xzzn.ems.domain;
import java.math.BigDecimal;
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_stack
*
* @author xzzn
* @date 2025-06-22
*/
public class EmsBatteryStack extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 工作状态 */
@Excel(name = "工作状态")
private String workStatus;
/** 与PCS通信状态 */
@Excel(name = "与PCS通信状态")
private String pcsCommunicationStatus;
/** 与EMS通信状态 */
@Excel(name = "与EMS通信状态")
private String emsCommunicationStatus;
/** 电池堆总电压 (V) */
@Excel(name = "电池堆总电压 (V)")
private BigDecimal totalVoltage;
/** 可充电量 (kWh) */
@Excel(name = "可充电量 (kWh)")
private BigDecimal chargeableCapacity;
/** 累计充电量 (kWh) */
@Excel(name = "累计充电量 (kWh)")
private BigDecimal totalChargedCapacity;
/** 电池堆总电流 (A) */
@Excel(name = "电池堆总电流 (A)")
private BigDecimal totalCurrent;
/** 可放电量 (kWh) */
@Excel(name = "可放电量 (kWh)")
private BigDecimal dischargeableCapacity;
/** 累计放电量 (kWh) */
@Excel(name = "累计放电量 (kWh)")
private BigDecimal totalDischargedCapacity;
/** SOH (%) */
@Excel(name = "SOH (%)")
private BigDecimal soh;
/** 平均温度 (℃) */
@Excel(name = "平均温度 (℃)")
private BigDecimal averageTemperature;
/** 绝缘电阻 (Ω) */
@Excel(name = "绝缘电阻 (Ω)")
private BigDecimal insulationResistance;
/** 当前SOC (%) */
@Excel(name = "当前SOC (%)")
private BigDecimal currentSoc;
/** 站点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 setWorkStatus(String workStatus)
{
this.workStatus = workStatus;
}
public String getWorkStatus()
{
return workStatus;
}
public void setPcsCommunicationStatus(String pcsCommunicationStatus)
{
this.pcsCommunicationStatus = pcsCommunicationStatus;
}
public String getPcsCommunicationStatus()
{
return pcsCommunicationStatus;
}
public void setEmsCommunicationStatus(String emsCommunicationStatus)
{
this.emsCommunicationStatus = emsCommunicationStatus;
}
public String getEmsCommunicationStatus()
{
return emsCommunicationStatus;
}
public void setTotalVoltage(BigDecimal totalVoltage)
{
this.totalVoltage = totalVoltage;
}
public BigDecimal getTotalVoltage()
{
return totalVoltage;
}
public void setChargeableCapacity(BigDecimal chargeableCapacity)
{
this.chargeableCapacity = chargeableCapacity;
}
public BigDecimal getChargeableCapacity()
{
return chargeableCapacity;
}
public void setTotalChargedCapacity(BigDecimal totalChargedCapacity)
{
this.totalChargedCapacity = totalChargedCapacity;
}
public BigDecimal getTotalChargedCapacity()
{
return totalChargedCapacity;
}
public void setTotalCurrent(BigDecimal totalCurrent)
{
this.totalCurrent = totalCurrent;
}
public BigDecimal getTotalCurrent()
{
return totalCurrent;
}
public void setDischargeableCapacity(BigDecimal dischargeableCapacity)
{
this.dischargeableCapacity = dischargeableCapacity;
}
public BigDecimal getDischargeableCapacity()
{
return dischargeableCapacity;
}
public void setTotalDischargedCapacity(BigDecimal totalDischargedCapacity)
{
this.totalDischargedCapacity = totalDischargedCapacity;
}
public BigDecimal getTotalDischargedCapacity()
{
return totalDischargedCapacity;
}
public void setSoh(BigDecimal soh)
{
this.soh = soh;
}
public BigDecimal getSoh()
{
return soh;
}
public void setAverageTemperature(BigDecimal averageTemperature)
{
this.averageTemperature = averageTemperature;
}
public BigDecimal getAverageTemperature()
{
return averageTemperature;
}
public void setInsulationResistance(BigDecimal insulationResistance)
{
this.insulationResistance = insulationResistance;
}
public BigDecimal getInsulationResistance()
{
return insulationResistance;
}
public void setCurrentSoc(BigDecimal currentSoc)
{
this.currentSoc = currentSoc;
}
public BigDecimal getCurrentSoc()
{
return currentSoc;
}
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("workStatus", getWorkStatus())
.append("pcsCommunicationStatus", getPcsCommunicationStatus())
.append("emsCommunicationStatus", getEmsCommunicationStatus())
.append("totalVoltage", getTotalVoltage())
.append("chargeableCapacity", getChargeableCapacity())
.append("totalChargedCapacity", getTotalChargedCapacity())
.append("totalCurrent", getTotalCurrent())
.append("dischargeableCapacity", getDischargeableCapacity())
.append("totalDischargedCapacity", getTotalDischargedCapacity())
.append("soh", getSoh())
.append("averageTemperature", getAverageTemperature())
.append("insulationResistance", getInsulationResistance())
.append("currentSoc", getCurrentSoc())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("siteId", getSiteId())
.append("deviceId", getDeviceId())
.toString();
}
}

View File

@ -0,0 +1,209 @@
package com.xzzn.ems.domain;
import java.math.BigDecimal;
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_cooling_data
*
* @author xzzn
* @date 2025-06-25
*/
public class EmsCoolingData extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 系统名称如1#液冷 */
@Excel(name = "系统名称如1#液冷")
private String systemName;
/** 工作模式 */
@Excel(name = "工作模式")
private String workMode;
/** 当前温度 (℃) */
@Excel(name = "当前温度 (℃)")
private BigDecimal currentTemperature;
/** 制热开启点 (℃) */
@Excel(name = "制热开启点 (℃)")
private BigDecimal heatingStartPoint;
/** 制冷开启点 (℃) */
@Excel(name = "制冷开启点 (℃)")
private BigDecimal coolingStartPoint;
/** 高温告警点 (℃) */
@Excel(name = "高温告警点 (℃)")
private BigDecimal highTempAlarmPoint;
/** 制热停止点 (℃) */
@Excel(name = "制热停止点 (℃)")
private BigDecimal heatingStopPoint;
/** 制冷停止点 (℃) */
@Excel(name = "制冷停止点 (℃)")
private BigDecimal coolingStopPoint;
/** 低温告警点 (℃) */
@Excel(name = "低温告警点 (℃)")
private BigDecimal lowTempAlarmPoint;
/** 站点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 setSystemName(String systemName)
{
this.systemName = systemName;
}
public String getSystemName()
{
return systemName;
}
public void setWorkMode(String workMode)
{
this.workMode = workMode;
}
public String getWorkMode()
{
return workMode;
}
public void setCurrentTemperature(BigDecimal currentTemperature)
{
this.currentTemperature = currentTemperature;
}
public BigDecimal getCurrentTemperature()
{
return currentTemperature;
}
public void setHeatingStartPoint(BigDecimal heatingStartPoint)
{
this.heatingStartPoint = heatingStartPoint;
}
public BigDecimal getHeatingStartPoint()
{
return heatingStartPoint;
}
public void setCoolingStartPoint(BigDecimal coolingStartPoint)
{
this.coolingStartPoint = coolingStartPoint;
}
public BigDecimal getCoolingStartPoint()
{
return coolingStartPoint;
}
public void setHighTempAlarmPoint(BigDecimal highTempAlarmPoint)
{
this.highTempAlarmPoint = highTempAlarmPoint;
}
public BigDecimal getHighTempAlarmPoint()
{
return highTempAlarmPoint;
}
public void setHeatingStopPoint(BigDecimal heatingStopPoint)
{
this.heatingStopPoint = heatingStopPoint;
}
public BigDecimal getHeatingStopPoint()
{
return heatingStopPoint;
}
public void setCoolingStopPoint(BigDecimal coolingStopPoint)
{
this.coolingStopPoint = coolingStopPoint;
}
public BigDecimal getCoolingStopPoint()
{
return coolingStopPoint;
}
public void setLowTempAlarmPoint(BigDecimal lowTempAlarmPoint)
{
this.lowTempAlarmPoint = lowTempAlarmPoint;
}
public BigDecimal getLowTempAlarmPoint()
{
return lowTempAlarmPoint;
}
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("systemName", getSystemName())
.append("workMode", getWorkMode())
.append("currentTemperature", getCurrentTemperature())
.append("heatingStartPoint", getHeatingStartPoint())
.append("coolingStartPoint", getCoolingStartPoint())
.append("highTempAlarmPoint", getHighTempAlarmPoint())
.append("heatingStopPoint", getHeatingStopPoint())
.append("coolingStopPoint", getCoolingStopPoint())
.append("lowTempAlarmPoint", getLowTempAlarmPoint())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("siteId", getSiteId())
.append("deviceId", getDeviceId())
.toString();
}
}

View File

@ -0,0 +1,296 @@
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;
/**
* Modbus设备配置对象 ems_devices_setting
*
* @author xzzn
* @date 2025-06-24
*/
public class EmsDevicesSetting extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 设备ID主键自增长 */
private Long id;
/** 设备名称,用于标识设备 */
@Excel(name = "设备名称,用于标识设备")
private String deviceName;
/** 设备类型: TCP 网络设备RTU串口设备) */
@Excel(name = "设备类型: TCP ", readConverterExp = "网=络设备")
private String deviceType;
/** 从站地址默认为1 */
@Excel(name = "从站地址默认为1")
private Long slaveId;
/** 通信超时时间(毫秒)默认1000ms */
@Excel(name = "通信超时时间(毫秒)默认1000ms")
private Long timeoutMs;
/** 通信失败重试次数默认3次 */
@Excel(name = "通信失败重试次数默认3次")
private Long retries;
/** TCP设备的IP地址仅TCP类型需要 */
@Excel(name = "TCP设备的IP地址仅TCP类型需要")
private String ipAddress;
/** TCP端口号通常502仅TCP类型需要 */
@Excel(name = "TCP端口号通常502仅TCP类型需要")
private Long ipPort;
/** 串口路径(如COM3或/dev/ttyUSB0)仅RTU类型需要 */
@Excel(name = "串口路径(如COM3或/dev/ttyUSB0)仅RTU类型需要")
private String serialPort;
/** 波特率(如9600,19200)仅RTU类型需要 */
@Excel(name = "波特率(如9600,19200)仅RTU类型需要")
private Long baudRate;
/** 数据位(通常8)仅RTU类型需要 */
@Excel(name = "数据位(通常8)仅RTU类型需要")
private Long dataBits;
/** 停止位(1或2)仅RTU类型需要 */
@Excel(name = "停止位(1或2)仅RTU类型需要")
private Long stopBits;
/** 校验位(NONE无校验/EVEN偶校验/ODD奇校验)仅RTU类型需要 */
@Excel(name = "校验位(NONE无校验/EVEN偶校验/ODD奇校验)仅RTU类型需要")
private String parity;
/** 设备描述信息 */
@Excel(name = "设备描述信息")
private String description;
/** 记录创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "记录创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdAt;
/** 记录最后更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "记录最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedAt;
/** 站点id */
@Excel(name = "站点id")
private Long siteId;
/** 通信状态 */
@Excel(name = "通信状态")
private String communicationStatus;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDeviceName(String deviceName)
{
this.deviceName = deviceName;
}
public String getDeviceName()
{
return deviceName;
}
public void setDeviceType(String deviceType)
{
this.deviceType = deviceType;
}
public String getDeviceType()
{
return deviceType;
}
public void setSlaveId(Long slaveId)
{
this.slaveId = slaveId;
}
public Long getSlaveId()
{
return slaveId;
}
public void setTimeoutMs(Long timeoutMs)
{
this.timeoutMs = timeoutMs;
}
public Long getTimeoutMs()
{
return timeoutMs;
}
public void setRetries(Long retries)
{
this.retries = retries;
}
public Long getRetries()
{
return retries;
}
public void setIpAddress(String ipAddress)
{
this.ipAddress = ipAddress;
}
public String getIpAddress()
{
return ipAddress;
}
public void setIpPort(Long ipPort)
{
this.ipPort = ipPort;
}
public Long getIpPort()
{
return ipPort;
}
public void setSerialPort(String serialPort)
{
this.serialPort = serialPort;
}
public String getSerialPort()
{
return serialPort;
}
public void setBaudRate(Long baudRate)
{
this.baudRate = baudRate;
}
public Long getBaudRate()
{
return baudRate;
}
public void setDataBits(Long dataBits)
{
this.dataBits = dataBits;
}
public Long getDataBits()
{
return dataBits;
}
public void setStopBits(Long stopBits)
{
this.stopBits = stopBits;
}
public Long getStopBits()
{
return stopBits;
}
public void setParity(String parity)
{
this.parity = parity;
}
public String getParity()
{
return parity;
}
public void setDescription(String description)
{
this.description = description;
}
public String getDescription()
{
return description;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
public void setSiteId(Long siteId)
{
this.siteId = siteId;
}
public Long getSiteId()
{
return siteId;
}
public void setCommunicationStatus(String communicationStatus)
{
this.communicationStatus = communicationStatus;
}
public String getCommunicationStatus()
{
return communicationStatus;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("deviceName", getDeviceName())
.append("deviceType", getDeviceType())
.append("slaveId", getSlaveId())
.append("timeoutMs", getTimeoutMs())
.append("retries", getRetries())
.append("ipAddress", getIpAddress())
.append("ipPort", getIpPort())
.append("serialPort", getSerialPort())
.append("baudRate", getBaudRate())
.append("dataBits", getDataBits())
.append("stopBits", getStopBits())
.append("parity", getParity())
.append("description", getDescription())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.append("siteId", getSiteId())
.append("communicationStatus", getCommunicationStatus())
.toString();
}
}

View File

@ -0,0 +1,149 @@
package com.xzzn.ems.domain;
import java.math.BigDecimal;
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_branch_data
*
* @author xzzn
* @date 2025-06-24
*/
public class EmsPcsBranchData extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 放电状态 */
@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;
/** 支路id */
@Excel(name = "支路id")
private Long branchId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
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 void setBranchId(Long branchId)
{
this.branchId = branchId;
}
public Long getBranchId()
{
return branchId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.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("branchId", getBranchId())
.toString();
}
}

View File

@ -22,7 +22,7 @@ public class EmsPcsData extends BaseEntity
private Long id;
/** 数据更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "数据更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date dataUpdateTime;
@ -475,3 +475,4 @@ public class EmsPcsData extends BaseEntity
.toString();
}
}

View File

@ -1,57 +0,0 @@
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();
}
}

View File

@ -0,0 +1,151 @@
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_site_setting
*
* @author xzzn
* @date 2025-06-20
*/
public class EmsSiteSetting extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 自增主键 */
private Long id;
/** 站点名称 */
@Excel(name = "站点名称")
private String siteName;
/** 站点地址 */
@Excel(name = "站点地址")
private String siteAddress;
/** 运营时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "运营时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date runningTime;
/** 纬度 */
@Excel(name = "纬度")
private BigDecimal latitude;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
/** 装机容量 */
@Excel(name = "装机容量")
private BigDecimal installCapacity;
/** 装机功率 */
@Excel(name = "装机功率")
private BigDecimal installPower;
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;
}
public void setSiteAddress(String siteAddress)
{
this.siteAddress = siteAddress;
}
public String getSiteAddress()
{
return siteAddress;
}
public void setRunningTime(Date runningTime)
{
this.runningTime = runningTime;
}
public Date getRunningTime()
{
return runningTime;
}
public void setLatitude(BigDecimal latitude)
{
this.latitude = latitude;
}
public BigDecimal getLatitude()
{
return latitude;
}
public void setLongitude(BigDecimal longitude)
{
this.longitude = longitude;
}
public BigDecimal getLongitude()
{
return longitude;
}
public void setInstallCapacity(BigDecimal installCapacity)
{
this.installCapacity = installCapacity;
}
public BigDecimal getInstallCapacity()
{
return installCapacity;
}
public void setInstallPower(BigDecimal installPower)
{
this.installPower = installPower;
}
public BigDecimal getInstallPower()
{
return installPower;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("siteName", getSiteName())
.append("siteAddress", getSiteAddress())
.append("runningTime", getRunningTime())
.append("latitude", getLatitude())
.append("longitude", getLongitude())
.append("installCapacity", getInstallCapacity())
.append("installPower", getInstallPower())
.append("remark", getRemark())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.toString();
}
}

View File

@ -0,0 +1,164 @@
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_ticket
*
* @author xzzn
* @date 2025-06-26
*/
public class EmsTicket extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private String id;
/** 工单号规则T+日期+6位随机 */
@Excel(name = "工单号", readConverterExp = "规=则T+日期+6位随机")
private String ticketNo;
/** 提交用户ID */
@Excel(name = "提交用户ID")
private String userId;
/** 工单标题 */
@Excel(name = "工单标题")
private String title;
/** 问题描述 */
@Excel(name = "问题描述")
private String content;
/** 图片URL数组 */
@Excel(name = "图片URL数组")
private String images;
/** 1待处理 2处理中 3已完成 */
@Excel(name = "1待处理 2处理中 3已完成")
private Long status;
/** 完成时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date completeTime;
/** 处理人ID */
@Excel(name = "处理人ID")
private Long workUserId;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setTicketNo(String ticketNo)
{
this.ticketNo = ticketNo;
}
public String getTicketNo()
{
return ticketNo;
}
public void setUserId(String userId)
{
this.userId = userId;
}
public String getUserId()
{
return userId;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setContent(String content)
{
this.content = content;
}
public String getContent()
{
return content;
}
public void setImages(String images)
{
this.images = images;
}
public String getImages()
{
return images;
}
public void setStatus(Long status)
{
this.status = status;
}
public Long getStatus()
{
return status;
}
public void setCompleteTime(Date completeTime)
{
this.completeTime = completeTime;
}
public Date getCompleteTime()
{
return completeTime;
}
public void setWorkUserId(Long workUserId)
{
this.workUserId = workUserId;
}
public Long getWorkUserId()
{
return workUserId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("ticketNo", getTicketNo())
.append("userId", getUserId())
.append("title", getTitle())
.append("content", getContent())
.append("images", getImages())
.append("status", getStatus())
.append("createTime", getCreateTime())
.append("completeTime", getCompleteTime())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("workUserId", getWorkUserId())
.toString();
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -0,0 +1,76 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
/**
* BMS电池簇-电池单体数据
*/
public class BMSBatteryClusterDataList {
/**
* 名称
*/
private String dataName;
/** 单体平均值 */
private BigDecimal avgData;
/** 单体最小值 */
private BigDecimal minData;
/** 单体最小值ID */
private Long minDataID;
/** 单体最大值 */
private BigDecimal maxData;
/** 单体最大值ID */
private Long maxDataID;
public String getDataName() {
return dataName;
}
public void setDataName(String dataName) {
this.dataName = dataName;
}
public BigDecimal getAvgData() {
return avgData;
}
public void setAvgData(BigDecimal avgData) {
this.avgData = avgData;
}
public BigDecimal getMinData() {
return minData;
}
public void setMinData(BigDecimal minData) {
this.minData = minData;
}
public Long getMinDataID() {
return minDataID;
}
public void setMinDataID(Long minDataID) {
this.minDataID = minDataID;
}
public BigDecimal getMaxData() {
return maxData;
}
public void setMaxData(BigDecimal maxData) {
this.maxData = maxData;
}
public Long getMaxDataID() {
return maxDataID;
}
public void setMaxDataID(Long maxDataID) {
this.maxDataID = maxDataID;
}
}

View File

@ -0,0 +1,197 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
import java.util.List;
/**
* BMS电池簇数据
*
*/
public class BMSBatteryClusterVo {
/** 设备名称 */
private String deviceName;
/** 工作状态 */
private String workStatus;
/** 与PCS通信状态 */
private String pcsCommunicationStatus;
/** 与EMS通信状态 */
private String emsCommunicationStatus;
/** 簇电压 (V) */
private BigDecimal clusterVoltage;
/** 可充电量 (kWh) */
private BigDecimal chargeableCapacity;
/** 累计充电量 (kWh) */
private BigDecimal totalChargedCapacity;
/** 簇电流 (A) */
private BigDecimal clusterCurrent;
/** 可放电量 (kWh) */
private BigDecimal dischargeableCapacity;
/** 累计放电量 (kWh) */
private BigDecimal totalDischargedCapacity;
/** SOH (%) */
private BigDecimal soh;
/** 平均温度 (℃) */
private BigDecimal averageTemperature;
/** 绝缘电阻 (Ω) */
private BigDecimal insulationResistance;
/** 当前SOC (%) */
private BigDecimal currentSoc;
/** 站点id */
private Long siteId;
/** 设备唯一标识符 */
private Long deviceId;
private List<BMSBatteryClusterDataList> batteryDataList;
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public String getWorkStatus() {
return workStatus;
}
public void setWorkStatus(String workStatus) {
this.workStatus = workStatus;
}
public String getPcsCommunicationStatus() {
return pcsCommunicationStatus;
}
public void setPcsCommunicationStatus(String pcsCommunicationStatus) {
this.pcsCommunicationStatus = pcsCommunicationStatus;
}
public String getEmsCommunicationStatus() {
return emsCommunicationStatus;
}
public void setEmsCommunicationStatus(String emsCommunicationStatus) {
this.emsCommunicationStatus = emsCommunicationStatus;
}
public BigDecimal getClusterVoltage() {
return clusterVoltage;
}
public void setClusterVoltage(BigDecimal clusterVoltage) {
this.clusterVoltage = clusterVoltage;
}
public BigDecimal getChargeableCapacity() {
return chargeableCapacity;
}
public void setChargeableCapacity(BigDecimal chargeableCapacity) {
this.chargeableCapacity = chargeableCapacity;
}
public BigDecimal getTotalChargedCapacity() {
return totalChargedCapacity;
}
public void setTotalChargedCapacity(BigDecimal totalChargedCapacity) {
this.totalChargedCapacity = totalChargedCapacity;
}
public BigDecimal getClusterCurrent() {
return clusterCurrent;
}
public void setClusterCurrent(BigDecimal clusterCurrent) {
this.clusterCurrent = clusterCurrent;
}
public BigDecimal getDischargeableCapacity() {
return dischargeableCapacity;
}
public void setDischargeableCapacity(BigDecimal dischargeableCapacity) {
this.dischargeableCapacity = dischargeableCapacity;
}
public BigDecimal getTotalDischargedCapacity() {
return totalDischargedCapacity;
}
public void setTotalDischargedCapacity(BigDecimal totalDischargedCapacity) {
this.totalDischargedCapacity = totalDischargedCapacity;
}
public BigDecimal getSoh() {
return soh;
}
public void setSoh(BigDecimal soh) {
this.soh = soh;
}
public BigDecimal getAverageTemperature() {
return averageTemperature;
}
public void setAverageTemperature(BigDecimal averageTemperature) {
this.averageTemperature = averageTemperature;
}
public BigDecimal getInsulationResistance() {
return insulationResistance;
}
public void setInsulationResistance(BigDecimal insulationResistance) {
this.insulationResistance = insulationResistance;
}
public BigDecimal getCurrentSoc() {
return currentSoc;
}
public void setCurrentSoc(BigDecimal currentSoc) {
this.currentSoc = currentSoc;
}
public Long getSiteId() {
return siteId;
}
public void setSiteId(Long siteId) {
this.siteId = siteId;
}
public Long getDeviceId() {
return deviceId;
}
public void setDeviceId(Long deviceId) {
this.deviceId = deviceId;
}
public List<BMSBatteryClusterDataList> getBatteryDataList() {
return batteryDataList;
}
public void setBatteryDataList(List<BMSBatteryClusterDataList> batteryDataList) {
this.batteryDataList = batteryDataList;
}
}

View File

@ -0,0 +1,104 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
/**
* BMS总览-电池堆电池簇单体数据
*/
public class BMSBatteryDataList {
/**
* 簇号
*/
private Long clusterId;
/** 簇电压 (V) */
private BigDecimal clusterVoltage;
/** 簇电流 (A) */
private BigDecimal clusterCurrent;
/** 簇SOC (%) */
private BigDecimal currentSoc;
/** 单体最高电压 (V) */
private BigDecimal maxVoltage;
/** 单体最低电压 (V) */
private BigDecimal minVoltage;
/** 单体最高温度 (℃) */
private BigDecimal maxTemperature;
/** 单体最低温度 (℃) */
private BigDecimal minTemperature;
/** 换电站id */
private Long siteId;
/** 堆id */
private Long stackDeviceId;
public Long getClusterId() {
return clusterId;
}
public void setClusterId(Long clusterId) {
this.clusterId = clusterId;
}
public BigDecimal getMinTemperature() {
return minTemperature;
}
public void setMinTemperature(BigDecimal minTemperature) {
this.minTemperature = minTemperature;
}
public BigDecimal getMaxTemperature() {
return maxTemperature;
}
public void setMaxTemperature(BigDecimal maxTemperature) {
this.maxTemperature = maxTemperature;
}
public BigDecimal getMinVoltage() {
return minVoltage;
}
public void setMinVoltage(BigDecimal minVoltage) {
this.minVoltage = minVoltage;
}
public BigDecimal getMaxVoltage() {
return maxVoltage;
}
public void setMaxVoltage(BigDecimal maxVoltage) {
this.maxVoltage = maxVoltage;
}
public BigDecimal getCurrentSoc() {
return currentSoc;
}
public void setCurrentSoc(BigDecimal currentSoc) {
this.currentSoc = currentSoc;
}
public BigDecimal getClusterCurrent() {
return clusterCurrent;
}
public void setClusterCurrent(BigDecimal clusterCurrent) {
this.clusterCurrent = clusterCurrent;
}
public BigDecimal getClusterVoltage() {
return clusterVoltage;
}
public void setClusterVoltage(BigDecimal clusterVoltage) {
this.clusterVoltage = clusterVoltage;
}
}

View File

@ -0,0 +1,197 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
import java.util.List;
/**
* BMS总览数据
*
*/
public class BMSOverViewVo {
/** 设备名称 */
private String deviceName;
/** 工作状态 */
private String workStatus;
/** 与PCS通信状态 */
private String pcsCommunicationStatus;
/** 与EMS通信状态 */
private String emsCommunicationStatus;
/** 电池堆总电压 (V) */
private BigDecimal totalVoltage;
/** 可充电量 (kWh) */
private BigDecimal chargeableCapacity;
/** 累计充电量 (kWh) */
private BigDecimal totalChargedCapacity;
/** 电池堆总电流 (A) */
private BigDecimal totalCurrent;
/** 可放电量 (kWh) */
private BigDecimal dischargeableCapacity;
/** 累计放电量 (kWh) */
private BigDecimal totalDischargedCapacity;
/** SOH (%) */
private BigDecimal soh;
/** 平均温度 (℃) */
private BigDecimal averageTemperature;
/** 绝缘电阻 (Ω) */
private BigDecimal insulationResistance;
/** 当前SOC (%) */
private BigDecimal currentSoc;
/** 站点id */
private Long siteId;
/** 设备唯一标识符 */
private Long deviceId;
private List<BMSBatteryDataList> batteryDataList;
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public String getWorkStatus() {
return workStatus;
}
public void setWorkStatus(String workStatus) {
this.workStatus = workStatus;
}
public String getPcsCommunicationStatus() {
return pcsCommunicationStatus;
}
public void setPcsCommunicationStatus(String pcsCommunicationStatus) {
this.pcsCommunicationStatus = pcsCommunicationStatus;
}
public String getEmsCommunicationStatus() {
return emsCommunicationStatus;
}
public void setEmsCommunicationStatus(String emsCommunicationStatus) {
this.emsCommunicationStatus = emsCommunicationStatus;
}
public BigDecimal getTotalVoltage() {
return totalVoltage;
}
public void setTotalVoltage(BigDecimal totalVoltage) {
this.totalVoltage = totalVoltage;
}
public BigDecimal getChargeableCapacity() {
return chargeableCapacity;
}
public void setChargeableCapacity(BigDecimal chargeableCapacity) {
this.chargeableCapacity = chargeableCapacity;
}
public BigDecimal getTotalChargedCapacity() {
return totalChargedCapacity;
}
public void setTotalChargedCapacity(BigDecimal totalChargedCapacity) {
this.totalChargedCapacity = totalChargedCapacity;
}
public BigDecimal getTotalCurrent() {
return totalCurrent;
}
public void setTotalCurrent(BigDecimal totalCurrent) {
this.totalCurrent = totalCurrent;
}
public BigDecimal getDischargeableCapacity() {
return dischargeableCapacity;
}
public void setDischargeableCapacity(BigDecimal dischargeableCapacity) {
this.dischargeableCapacity = dischargeableCapacity;
}
public BigDecimal getTotalDischargedCapacity() {
return totalDischargedCapacity;
}
public void setTotalDischargedCapacity(BigDecimal totalDischargedCapacity) {
this.totalDischargedCapacity = totalDischargedCapacity;
}
public BigDecimal getSoh() {
return soh;
}
public void setSoh(BigDecimal soh) {
this.soh = soh;
}
public BigDecimal getAverageTemperature() {
return averageTemperature;
}
public void setAverageTemperature(BigDecimal averageTemperature) {
this.averageTemperature = averageTemperature;
}
public BigDecimal getInsulationResistance() {
return insulationResistance;
}
public void setInsulationResistance(BigDecimal insulationResistance) {
this.insulationResistance = insulationResistance;
}
public BigDecimal getCurrentSoc() {
return currentSoc;
}
public void setCurrentSoc(BigDecimal currentSoc) {
this.currentSoc = currentSoc;
}
public Long getDeviceId() {
return deviceId;
}
public void setDeviceId(Long deviceId) {
this.deviceId = deviceId;
}
public Long getSiteId() {
return siteId;
}
public void setSiteId(Long siteId) {
this.siteId = siteId;
}
public List<BMSBatteryDataList> getBatteryDataList() {
return batteryDataList;
}
public void setBatteryDataList(List<BMSBatteryDataList> batteryDataList) {
this.batteryDataList = batteryDataList;
}
}

View File

@ -0,0 +1,130 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
/**
* BMS电池簇-电池单体数据
*/
public class BatteryClusterDataDetailVo {
/** 设备id */
private Long siteId;
/** 电池簇id */
private Long clusterId;
/** 电压平均值 */
private BigDecimal avgVoltage;
/** 电压最大值 */
private BigDecimal maxVoltage;
/** 电压最小值 */
private BigDecimal minVoltage;
/** 温度平均值 */
private BigDecimal avgTemp;
/** 温度最大值 */
private BigDecimal maxTemp;
/** 温度最小值 */
private BigDecimal minTemp;
/** soc平均值 */
private BigDecimal avgSoc;
/** soc最大值 */
private BigDecimal maxSoc;
/** soc最小值 */
private BigDecimal minSoc;
public Long getSiteId() {
return siteId;
}
public void setSiteId(Long siteId) {
this.siteId = siteId;
}
public Long getClusterId() {
return clusterId;
}
public void setClusterId(Long clusterId) {
this.clusterId = clusterId;
}
public BigDecimal getAvgVoltage() {
return avgVoltage;
}
public void setAvgVoltage(BigDecimal avgVoltage) {
this.avgVoltage = avgVoltage;
}
public BigDecimal getMaxVoltage() {
return maxVoltage;
}
public void setMaxVoltage(BigDecimal maxVoltage) {
this.maxVoltage = maxVoltage;
}
public BigDecimal getMinVoltage() {
return minVoltage;
}
public void setMinVoltage(BigDecimal minVoltage) {
this.minVoltage = minVoltage;
}
public BigDecimal getAvgTemp() {
return avgTemp;
}
public void setAvgTemp(BigDecimal avgTemp) {
this.avgTemp = avgTemp;
}
public BigDecimal getMaxTemp() {
return maxTemp;
}
public void setMaxTemp(BigDecimal maxTemp) {
this.maxTemp = maxTemp;
}
public BigDecimal getMinTemp() {
return minTemp;
}
public void setMinTemp(BigDecimal minTemp) {
this.minTemp = minTemp;
}
public BigDecimal getAvgSoc() {
return avgSoc;
}
public void setAvgSoc(BigDecimal avgSoc) {
this.avgSoc = avgSoc;
}
public BigDecimal getMaxSoc() {
return maxSoc;
}
public void setMaxSoc(BigDecimal maxSoc) {
this.maxSoc = maxSoc;
}
public BigDecimal getMinSoc() {
return minSoc;
}
public void setMinSoc(BigDecimal minSoc) {
this.minSoc = minSoc;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -0,0 +1,91 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
/**
* PCS支路数据
*
* @author xzzn
* @date 2025-06-24
*/
public class PcsBranchInfo
{
private static final long serialVersionUID = 1L;
/** 放电状态 */
private String dischargeStatus;
/** 直流功率 (kW) */
private BigDecimal dcPower;
/** 直流电压 (V) */
private BigDecimal dcVoltage;
/** 直流电流 (A) */
private BigDecimal dcCurrent;
/** 站点id */
private Long siteId;
/** 设备唯一标识符 */
private Long deviceId;
/** 支路id */
private Long branchId;
public String getDischargeStatus() {
return dischargeStatus;
}
public void setDischargeStatus(String dischargeStatus) {
this.dischargeStatus = dischargeStatus;
}
public BigDecimal getDcPower() {
return dcPower;
}
public void setDcPower(BigDecimal dcPower) {
this.dcPower = dcPower;
}
public BigDecimal getDcVoltage() {
return dcVoltage;
}
public void setDcVoltage(BigDecimal dcVoltage) {
this.dcVoltage = dcVoltage;
}
public BigDecimal getDcCurrent() {
return dcCurrent;
}
public void setDcCurrent(BigDecimal dcCurrent) {
this.dcCurrent = dcCurrent;
}
public Long getSiteId() {
return siteId;
}
public void setSiteId(Long siteId) {
this.siteId = siteId;
}
public Long getDeviceId() {
return deviceId;
}
public void setDeviceId(Long deviceId) {
this.deviceId = deviceId;
}
public Long getBranchId() {
return branchId;
}
public void setBranchId(Long branchId) {
this.branchId = branchId;
}
}

View File

@ -0,0 +1,293 @@
package com.xzzn.ems.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xzzn.common.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* 单个PCS详细数据
*
* @author xzzn
* @date 2025-06-24
*/
public class PcsDetailInfoVo {
/** 通讯状态 */
private String communicationStatus;
/** 数据更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date dataUpdateTime;
/** 工作状态 */
private String workStatus;
/** 并网状态 */
private String gridStatus;
/** 设备状态 */
private String deviceStatus;
/** 控制模式 */
private String controlMode;
/** 总交流有功电率 (kW) */
private BigDecimal totalActivePower;
/** 当天交流充电量 (kWh) */
private BigDecimal dailyAcChargeEnergy;
/** A相电压 (V) */
private BigDecimal aPhaseVoltage;
/** A相电流 (A) */
private BigDecimal aPhaseCurrent;
/** 总交流无功电率 (kVar) */
private BigDecimal totalReactivePower;
/** 当天交流放电量 (kWh) */
@Excel(name = " (kWh)")
private BigDecimal dailyAcDischargeEnergy;
/** B相电压 (V) */
private BigDecimal bPhaseVoltage;
/** B相电流 (A) */
private BigDecimal bPhaseCurrent;
/** 总交流视在功率 (kVA) */
private BigDecimal totalApparentPower;
/** PCS模块温度 (℃) */
private BigDecimal pcsModuleTemperature;
/** C相电压 (V) */
private BigDecimal cPhaseVoltage;
/** C相电流 (A) */
private BigDecimal cPhaseCurrent;
/** 总交流功率因数 */
private BigDecimal totalPowerFactor;
/** PCS环境温度 (℃) */
private BigDecimal pcsEnvironmentTemperature;
/** 交流频率 (Hz) */
private BigDecimal acFrequency;
/** 站点id */
private Long siteId;
/** 设备唯一标识符 */
private Long deviceId;
/** 设备名称 */
private String deviceName;
private List<PcsBranchInfo> pcsBranchInfoList;
public Long getDeviceId() {
return deviceId;
}
public void setDeviceId(Long deviceId) {
this.deviceId = deviceId;
}
public Long getSiteId() {
return siteId;
}
public void setSiteId(Long siteId) {
this.siteId = siteId;
}
public BigDecimal getAcFrequency() {
return acFrequency;
}
public void setAcFrequency(BigDecimal acFrequency) {
this.acFrequency = acFrequency;
}
public BigDecimal getPcsEnvironmentTemperature() {
return pcsEnvironmentTemperature;
}
public void setPcsEnvironmentTemperature(BigDecimal pcsEnvironmentTemperature) {
this.pcsEnvironmentTemperature = pcsEnvironmentTemperature;
}
public BigDecimal getTotalPowerFactor() {
return totalPowerFactor;
}
public void setTotalPowerFactor(BigDecimal totalPowerFactor) {
this.totalPowerFactor = totalPowerFactor;
}
public BigDecimal getcPhaseCurrent() {
return cPhaseCurrent;
}
public void setcPhaseCurrent(BigDecimal cPhaseCurrent) {
this.cPhaseCurrent = cPhaseCurrent;
}
public BigDecimal getcPhaseVoltage() {
return cPhaseVoltage;
}
public void setcPhaseVoltage(BigDecimal cPhaseVoltage) {
this.cPhaseVoltage = cPhaseVoltage;
}
public BigDecimal getPcsModuleTemperature() {
return pcsModuleTemperature;
}
public void setPcsModuleTemperature(BigDecimal pcsModuleTemperature) {
this.pcsModuleTemperature = pcsModuleTemperature;
}
public BigDecimal getTotalApparentPower() {
return totalApparentPower;
}
public void setTotalApparentPower(BigDecimal totalApparentPower) {
this.totalApparentPower = totalApparentPower;
}
public BigDecimal getbPhaseCurrent() {
return bPhaseCurrent;
}
public void setbPhaseCurrent(BigDecimal bPhaseCurrent) {
this.bPhaseCurrent = bPhaseCurrent;
}
public BigDecimal getbPhaseVoltage() {
return bPhaseVoltage;
}
public void setbPhaseVoltage(BigDecimal bPhaseVoltage) {
this.bPhaseVoltage = bPhaseVoltage;
}
public BigDecimal getDailyAcDischargeEnergy() {
return dailyAcDischargeEnergy;
}
public void setDailyAcDischargeEnergy(BigDecimal dailyAcDischargeEnergy) {
this.dailyAcDischargeEnergy = dailyAcDischargeEnergy;
}
public BigDecimal getTotalReactivePower() {
return totalReactivePower;
}
public void setTotalReactivePower(BigDecimal totalReactivePower) {
this.totalReactivePower = totalReactivePower;
}
public BigDecimal getaPhaseCurrent() {
return aPhaseCurrent;
}
public void setaPhaseCurrent(BigDecimal aPhaseCurrent) {
this.aPhaseCurrent = aPhaseCurrent;
}
public BigDecimal getaPhaseVoltage() {
return aPhaseVoltage;
}
public void setaPhaseVoltage(BigDecimal aPhaseVoltage) {
this.aPhaseVoltage = aPhaseVoltage;
}
public BigDecimal getDailyAcChargeEnergy() {
return dailyAcChargeEnergy;
}
public void setDailyAcChargeEnergy(BigDecimal dailyAcChargeEnergy) {
this.dailyAcChargeEnergy = dailyAcChargeEnergy;
}
public BigDecimal getTotalActivePower() {
return totalActivePower;
}
public void setTotalActivePower(BigDecimal totalActivePower) {
this.totalActivePower = totalActivePower;
}
public String getControlMode() {
return controlMode;
}
public void setControlMode(String controlMode) {
this.controlMode = controlMode;
}
public String getDeviceStatus() {
return deviceStatus;
}
public void setDeviceStatus(String deviceStatus) {
this.deviceStatus = deviceStatus;
}
public String getGridStatus() {
return gridStatus;
}
public void setGridStatus(String gridStatus) {
this.gridStatus = gridStatus;
}
public String getWorkStatus() {
return workStatus;
}
public void setWorkStatus(String workStatus) {
this.workStatus = workStatus;
}
public Date getDataUpdateTime() {
return dataUpdateTime;
}
public void setDataUpdateTime(Date dataUpdateTime) {
this.dataUpdateTime = dataUpdateTime;
}
public List<PcsBranchInfo> getPcsBranchInfoList() {
return pcsBranchInfoList;
}
public String getCommunicationStatus() {
return communicationStatus;
}
public void setCommunicationStatus(String communicationStatus) {
this.communicationStatus = communicationStatus;
}
public void setPcsBranchInfoList(List<PcsBranchInfo> pcsBranchInfoList) {
this.pcsBranchInfoList = pcsBranchInfoList;
}
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
}

View File

@ -1,7 +1,6 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
@ -9,6 +8,11 @@ import java.util.List;
*
*/
public class SingleSiteBaseInfo {
/**
* 站点名称
*/
private String siteName;
/**
* 今日充电量
*/
@ -27,12 +31,17 @@ public class SingleSiteBaseInfo {
/**
* 总放电量
*/
private BigDecimal totalDischargedCap;
private BigDecimal totalDisChargedCap;
/**
* 站点坐标
*/
private String[] siteLocation;
/**
* 站点位置
*/
private String siteLocation;
private String siteAddress;
/**
* 投运时间
@ -52,7 +61,15 @@ public class SingleSiteBaseInfo {
/**
* 七天放电统计
*/
private List<SiteMonitorDataVo> SevenDayDischargeStats;
private List<SiteMonitorDataVo> sevenDayDisChargeStats;
public String getSiteName() {
return siteName;
}
public void setSiteName(String siteName) {
this.siteName = siteName;
}
public BigDecimal getDayChargedCap() {
return dayChargedCap;
@ -62,14 +79,6 @@ public class SingleSiteBaseInfo {
this.dayChargedCap = dayChargedCap;
}
public List<SiteMonitorDataVo> getSevenDayDischargeStats() {
return SevenDayDischargeStats;
}
public void setSevenDayDischargeStats(List<SiteMonitorDataVo> sevenDayDischargeStats) {
SevenDayDischargeStats = sevenDayDischargeStats;
}
public BigDecimal getInstalledCap() {
return installedCap;
}
@ -94,20 +103,28 @@ public class SingleSiteBaseInfo {
this.runningTime = runningTime;
}
public String getSiteLocation() {
public String[] getSiteLocation() {
return siteLocation;
}
public void setSiteLocation(String siteLocation) {
public void setSiteLocation(String[] siteLocation) {
this.siteLocation = siteLocation;
}
public BigDecimal getTotalDischargedCap() {
return totalDischargedCap;
public String getSiteAddress() {
return siteAddress;
}
public void setTotalDischargedCap(BigDecimal totalDischargedCap) {
this.totalDischargedCap = totalDischargedCap;
public void setSiteAddress(String siteAddress) {
this.siteAddress = siteAddress;
}
public BigDecimal getTotalDisChargedCap() {
return totalDisChargedCap;
}
public void setTotalDisChargedCap(BigDecimal totalDisChargedCap) {
this.totalDisChargedCap = totalDisChargedCap;
}
public BigDecimal getTotalChargedCap() {
@ -125,4 +142,12 @@ public class SingleSiteBaseInfo {
public void setDayDisChargedCap(BigDecimal dayDisChargedCap) {
this.dayDisChargedCap = dayDisChargedCap;
}
public List<SiteMonitorDataVo> getSevenDayDisChargeStats() {
return sevenDayDisChargeStats;
}
public void setSevenDayDisChargeStats(List<SiteMonitorDataVo> sevenDayDisChargeStats) {
this.sevenDayDisChargeStats = sevenDayDisChargeStats;
}
}

View File

@ -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;
}
}

View File

@ -1,43 +1,12 @@
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
*/
@ -58,54 +27,6 @@ public class SiteMonitorRuningInfoVo {
*/
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;
}

View File

@ -15,12 +15,12 @@ public class SiteTotalInfoVo {
/**
* 装机功率MW
*/
private BigDecimal installedPower;
private BigDecimal installPower;
/**
* 装机容量MW
*/
private BigDecimal installedCap;
private BigDecimal installCapacity;
/**
* 总充电量MWH
@ -56,28 +56,28 @@ public class SiteTotalInfoVo {
this.totalChargedCap = totalChargedCap;
}
public BigDecimal getInstalledCap() {
return installedCap;
public BigDecimal getInstallCapacity() {
return installCapacity;
}
public void setInstalledCap(BigDecimal installedCap) {
this.installedCap = installedCap;
public void setInstallCapacity(BigDecimal installCapacity) {
this.installCapacity = installCapacity;
}
public BigDecimal getInstalledPower() {
return installedPower;
public BigDecimal getInstallPower() {
return installPower;
}
public void setInstalledPower(BigDecimal installedPower) {
this.installedPower = installedPower;
public void setInstallPower(BigDecimal installPower) {
this.installPower = installPower;
}
@Override
public String toString() {
return "SiteVo{" +
"siteNum=" + siteNum +
", installedPower=" + installedPower +
", installedCap=" + installedCap +
", installedPower=" + installPower +
", installedCap=" + installCapacity +
", totalChargedCap=" + totalChargedCap +
", totalDischargedCap=" + totalDischargedCap +
'}';

View File

@ -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;
}
}

View File

@ -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();
}

View File

@ -0,0 +1,79 @@
package com.xzzn.ems.mapper;
import java.util.List;
import com.xzzn.ems.domain.EmsBatteryCluster;
import com.xzzn.ems.domain.vo.BMSBatteryClusterVo;
import com.xzzn.ems.domain.vo.BMSBatteryDataList;
import org.apache.ibatis.annotations.Param;
/**
* 电池簇数据Mapper接口
*
* @author xzzn
* @date 2025-06-22
*/
public interface EmsBatteryClusterMapper
{
/**
* 查询电池簇数据
*
* @param id 电池簇数据主键
* @return 电池簇数据
*/
public EmsBatteryCluster selectEmsBatteryClusterById(Long id);
/**
* 查询电池簇数据列表
*
* @param emsBatteryCluster 电池簇数据
* @return 电池簇数据集合
*/
public List<EmsBatteryCluster> selectEmsBatteryClusterList(EmsBatteryCluster emsBatteryCluster);
/**
* 新增电池簇数据
*
* @param emsBatteryCluster 电池簇数据
* @return 结果
*/
public int insertEmsBatteryCluster(EmsBatteryCluster emsBatteryCluster);
/**
* 修改电池簇数据
*
* @param emsBatteryCluster 电池簇数据
* @return 结果
*/
public int updateEmsBatteryCluster(EmsBatteryCluster emsBatteryCluster);
/**
* 删除电池簇数据
*
* @param id 电池簇数据主键
* @return 结果
*/
public int deleteEmsBatteryClusterById(Long id);
/**
* 批量删除电池簇数据
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEmsBatteryClusterByIds(Long[] ids);
/**
* 根据site_id获取电池簇数据
* @param siteId
* @return
*/
public List<BMSBatteryClusterVo> getBMSBatteryCluster(Long siteId);
/**
* 根据site_di和堆id获取簇数据和单体数据
* @param siteId
* @param stackDeviceId
* @return
*/
public List<BMSBatteryDataList> getBmsBatteryData(@Param("siteId")Long siteId, @Param("stackDeviceId")Long stackDeviceId);
}

View File

@ -0,0 +1,89 @@
package com.xzzn.ems.mapper;
import java.util.List;
import java.util.Map;
import com.xzzn.ems.domain.EmsBatteryData;
import com.xzzn.ems.domain.vo.BMSBatteryClusterDataList;
import com.xzzn.ems.domain.vo.BatteryClusterDataDetailVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 单体电池实时数据Mapper接口
*
* @author xzzn
* @date 2025-06-19
*/
public interface EmsBatteryDataMapper
{
/**
* 查询单体电池实时数据
*
* @param id 单体电池实时数据主键
* @return 单体电池实时数据
*/
public EmsBatteryData selectEmsBatteryDataById(Long id);
/**
* 查询单体电池实时数据列表
*
* @param emsBatteryData 单体电池实时数据
* @return 单体电池实时数据集合
*/
public List<EmsBatteryData> selectEmsBatteryDataList(EmsBatteryData emsBatteryData);
/**
* 新增单体电池实时数据
*
* @param emsBatteryData 单体电池实时数据
* @return 结果
*/
public int insertEmsBatteryData(EmsBatteryData emsBatteryData);
/**
* 修改单体电池实时数据
*
* @param emsBatteryData 单体电池实时数据
* @return 结果
*/
public int updateEmsBatteryData(EmsBatteryData emsBatteryData);
/**
* 删除单体电池实时数据
*
* @param id 单体电池实时数据主键
* @return 结果
*/
public int deleteEmsBatteryDataById(Long id);
/**
* 批量删除单体电池实时数据
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEmsBatteryDataByIds(Long[] ids);
/**
* 根据siteId查询站点电池实时数据
* @param siteId
* @return
*/
public EmsBatteryData getBatteryDataBySiteId(Long siteId);
/**
* 根据siteId和簇id获取单体数据
* @param siteId
* @param clusterDeviceId
* @return
*/
public BatteryClusterDataDetailVo getBatteryDataByClusterId(@Param("siteId")Long siteId, @Param("clusterDeviceId")Long clusterDeviceId);
/**
* 获取最大最小的单体id
* @param dataVo
* @return
*/
public List<Map<String, Object>> getDataIdsMap(BatteryClusterDataDetailVo dataVo);
}

View File

@ -0,0 +1,69 @@
package com.xzzn.ems.mapper;
import java.util.List;
import com.xzzn.ems.domain.EmsBatteryStack;
import com.xzzn.ems.domain.vo.BMSOverViewVo;
/**
* 电池堆数据Mapper接口
*
* @author xzzn
* @date 2025-06-23
*/
public interface EmsBatteryStackMapper
{
/**
* 查询电池堆数据
*
* @param id 电池堆数据主键
* @return 电池堆数据
*/
public EmsBatteryStack selectEmsBatteryStackById(Long id);
/**
* 查询电池堆数据列表
*
* @param emsBatteryStack 电池堆数据
* @return 电池堆数据集合
*/
public List<EmsBatteryStack> selectEmsBatteryStackList(EmsBatteryStack emsBatteryStack);
/**
* 新增电池堆数据
*
* @param emsBatteryStack 电池堆数据
* @return 结果
*/
public int insertEmsBatteryStack(EmsBatteryStack emsBatteryStack);
/**
* 修改电池堆数据
*
* @param emsBatteryStack 电池堆数据
* @return 结果
*/
public int updateEmsBatteryStack(EmsBatteryStack emsBatteryStack);
/**
* 删除电池堆数据
*
* @param id 电池堆数据主键
* @return 结果
*/
public int deleteEmsBatteryStackById(Long id);
/**
* 批量删除电池堆数据
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEmsBatteryStackByIds(Long[] ids);
/**
* 获取电池堆信息
* @param siteId
* @return
*/
public List<BMSOverViewVo> selectEmsBatteryStackBySiteId(Long siteId);
}

View File

@ -0,0 +1,68 @@
package com.xzzn.ems.mapper;
import java.util.List;
import com.xzzn.ems.domain.EmsCoolingData;
/**
* 冷却系统参数Mapper接口
*
* @author xzzn
* @date 2025-06-25
*/
public interface EmsCoolingDataMapper
{
/**
* 查询冷却系统参数
*
* @param id 冷却系统参数主键
* @return 冷却系统参数
*/
public EmsCoolingData selectEmsCoolingDataById(Long id);
/**
* 查询冷却系统参数列表
*
* @param emsCoolingData 冷却系统参数
* @return 冷却系统参数集合
*/
public List<EmsCoolingData> selectEmsCoolingDataList(EmsCoolingData emsCoolingData);
/**
* 新增冷却系统参数
*
* @param emsCoolingData 冷却系统参数
* @return 结果
*/
public int insertEmsCoolingData(EmsCoolingData emsCoolingData);
/**
* 修改冷却系统参数
*
* @param emsCoolingData 冷却系统参数
* @return 结果
*/
public int updateEmsCoolingData(EmsCoolingData emsCoolingData);
/**
* 删除冷却系统参数
*
* @param id 冷却系统参数主键
* @return 结果
*/
public int deleteEmsCoolingDataById(Long id);
/**
* 批量删除冷却系统参数
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEmsCoolingDataByIds(Long[] ids);
/**
* 获取液冷数据
* @param siteId
* @return
*/
public List<EmsCoolingData> getCoolingDataList(Long siteId);
}

View File

@ -0,0 +1,61 @@
package com.xzzn.ems.mapper;
import java.util.List;
import com.xzzn.ems.domain.EmsDevicesSetting;
/**
* Modbus设备配置Mapper接口
*
* @author xzzn
* @date 2025-06-24
*/
public interface EmsDevicesSettingMapper
{
/**
* 查询Modbus设备配置
*
* @param id Modbus设备配置主键
* @return Modbus设备配置
*/
public EmsDevicesSetting selectEmsDevicesSettingById(Long id);
/**
* 查询Modbus设备配置列表
*
* @param emsDevicesSetting Modbus设备配置
* @return Modbus设备配置集合
*/
public List<EmsDevicesSetting> selectEmsDevicesSettingList(EmsDevicesSetting emsDevicesSetting);
/**
* 新增Modbus设备配置
*
* @param emsDevicesSetting Modbus设备配置
* @return 结果
*/
public int insertEmsDevicesSetting(EmsDevicesSetting emsDevicesSetting);
/**
* 修改Modbus设备配置
*
* @param emsDevicesSetting Modbus设备配置
* @return 结果
*/
public int updateEmsDevicesSetting(EmsDevicesSetting emsDevicesSetting);
/**
* 删除Modbus设备配置
*
* @param id Modbus设备配置主键
* @return 结果
*/
public int deleteEmsDevicesSettingById(Long id);
/**
* 批量删除Modbus设备配置
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEmsDevicesSettingByIds(Long[] ids);
}

View File

@ -0,0 +1,71 @@
package com.xzzn.ems.mapper;
import java.util.List;
import com.xzzn.ems.domain.EmsPcsBranchData;
import com.xzzn.ems.domain.vo.PcsBranchInfo;
import org.apache.ibatis.annotations.Param;
/**
* pcs支路数据Mapper接口
*
* @author xzzn
* @date 2025-06-24
*/
public interface EmsPcsBranchDataMapper
{
/**
* 查询pcs支路数据
*
* @param id pcs支路数据主键
* @return pcs支路数据
*/
public EmsPcsBranchData selectEmsPcsBranchDataById(Long id);
/**
* 查询pcs支路数据列表
*
* @param emsPcsBranchData pcs支路数据
* @return pcs支路数据集合
*/
public List<EmsPcsBranchData> selectEmsPcsBranchDataList(EmsPcsBranchData emsPcsBranchData);
/**
* 新增pcs支路数据
*
* @param emsPcsBranchData pcs支路数据
* @return 结果
*/
public int insertEmsPcsBranchData(EmsPcsBranchData emsPcsBranchData);
/**
* 修改pcs支路数据
*
* @param emsPcsBranchData pcs支路数据
* @return 结果
*/
public int updateEmsPcsBranchData(EmsPcsBranchData emsPcsBranchData);
/**
* 删除pcs支路数据
*
* @param id pcs支路数据主键
* @return 结果
*/
public int deleteEmsPcsBranchDataById(Long id);
/**
* 批量删除pcs支路数据
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEmsPcsBranchDataByIds(Long[] ids);
/**
* 根据site_id和device_id获取支路最新数据
* @param siteId
* @param deviceId
* @return
*/
public List<PcsBranchInfo> getPcsBranchInfoList(@Param("siteId")Long siteId, @Param("deviceId")Long deviceId);
}

View File

@ -2,8 +2,13 @@ package com.xzzn.ems.mapper;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import com.xzzn.ems.domain.EmsPcsData;
import com.xzzn.ems.domain.vo.ElectricIndexList;
import com.xzzn.ems.domain.vo.PcsDetailInfoVo;
import com.xzzn.ems.domain.vo.SiteMonitorDataVo;
import com.xzzn.ems.domain.vo.SiteMonitorRuningHeadInfoVo;
/**
* PCS数据Mapper接口
@ -74,4 +79,30 @@ public interface EmsPcsDataMapper
* @return
*/
public BigDecimal getGridNrtPower(Long siteId);
/**
* 根据站点获取设备监控的实时运行头信息
* @param siteId
* @return
*/
public SiteMonitorRuningHeadInfoVo getSiteRunningHeadInfo(Long siteId);
/**
* 获取每月的充电量和放电量
* @return
*/
public List<ElectricIndexList> getElectDataList();
/**
* 根据site_id获取所有pcs最新update的数据
* @param siteId
* @return
*/
public List<PcsDetailInfoVo> getPcsDetailInfoBySiteId(Long siteId);
/**
* 获取总充+总放
* @return
*/
public Map<String, BigDecimal> getPcsTotalChargeData();
}

View File

@ -1,16 +1,16 @@
package com.xzzn.ems.mapper;
import java.util.List;
import com.xzzn.ems.domain.EmsSite;
import com.xzzn.ems.domain.EmsSiteSetting;
import com.xzzn.ems.domain.vo.SiteTotalInfoVo;
/**
* 站点Mapper接口
*
* @author xzzn
* @date 2025-06-16
* @date 2025-06-20
*/
public interface EmsSiteMapper
public interface EmsSiteSettingMapper
{
/**
* 查询站点
@ -18,30 +18,31 @@ public interface EmsSiteMapper
* @param id 站点主键
* @return 站点
*/
public EmsSite selectSiteById(Long id);
public EmsSiteSetting selectEmsSiteSettingById(Long id);
/**
* 查询站点列表
*
* @param emsSiteSetting 站点
* @return 站点集合
*/
public List<EmsSite> selectSiteList();
public List<EmsSiteSetting> selectEmsSiteSettingList(EmsSiteSetting emsSiteSetting);
/**
* 新增站点
*
* @param site 站点
* @param emsSiteSetting 站点
* @return 结果
*/
public int insertSite(EmsSite site);
public int insertEmsSiteSetting(EmsSiteSetting emsSiteSetting);
/**
* 修改站点
*
* @param site 站点
* @param emsSiteSetting 站点
* @return 结果
*/
public int updateSite(EmsSite site);
public int updateEmsSiteSetting(EmsSiteSetting emsSiteSetting);
/**
* 删除站点
@ -49,7 +50,7 @@ public interface EmsSiteMapper
* @param id 站点主键
* @return 结果
*/
public int deleteSiteById(Long id);
public int deleteEmsSiteSettingById(Long id);
/**
* 批量删除站点
@ -57,7 +58,7 @@ public interface EmsSiteMapper
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSiteByIds(Long[] ids);
public int deleteEmsSiteSettingByIds(Long[] ids);
/**
* 获取站点总信息

View File

@ -0,0 +1,62 @@
package com.xzzn.ems.mapper;
import com.xzzn.ems.domain.EmsTicket;
import java.util.List;
/**
* 工单主Mapper接口
*
* @author xzzn
* @date 2025-06-26
*/
public interface EmsTicketMapper
{
/**
* 查询工单主
*
* @param id 工单主主键
* @return 工单主
*/
public EmsTicket selectEmsTicketById(String id);
/**
* 查询工单主列表
*
* @param emsTicket 工单主
* @return 工单主集合
*/
public List<EmsTicket> selectEmsTicketList(EmsTicket emsTicket);
/**
* 新增工单主
*
* @param emsTicket 工单主
* @return 结果
*/
public int insertEmsTicket(EmsTicket emsTicket);
/**
* 修改工单主
*
* @param emsTicket 工单主
* @return 结果
*/
public int updateEmsTicket(EmsTicket emsTicket);
/**
* 删除工单主
*
* @param id 工单主主键
* @return 结果
*/
public int deleteEmsTicketById(String id);
/**
* 批量删除工单主
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteEmsTicketByIds(String[] ids);
}

View File

@ -1,7 +1,6 @@
package com.xzzn.ems.service;
import com.xzzn.ems.domain.EmsSite;
import com.xzzn.ems.domain.EmsSiteSetting;
import com.xzzn.ems.domain.vo.SiteTotalInfoVo;
import java.util.List;
@ -13,7 +12,7 @@ import java.util.List;
public interface IEmsSiteService
{
public List<EmsSite> getAllSites();
public List<EmsSiteSetting> getAllSites();
public SiteTotalInfoVo getSiteTotalInfo();

View File

@ -0,0 +1,62 @@
package com.xzzn.ems.service;
import com.xzzn.ems.domain.EmsTicket;
import java.util.List;
/**
* 工单主Service接口
*
* @author xzzn
* @date 2025-06-26
*/
public interface IEmsTicketService
{
/**
* 查询工单主
*
* @param id 工单主主键
* @return 工单主
*/
public EmsTicket selectEmsTicketById(String id);
/**
* 查询工单主列表
*
* @param emsTicket 工单主
* @return 工单主集合
*/
public List<EmsTicket> selectEmsTicketList(EmsTicket emsTicket);
/**
* 新增工单主
*
* @param emsTicket 工单主
* @return 结果
*/
public int insertEmsTicket(EmsTicket emsTicket);
/**
* 修改工单主
*
* @param emsTicket 工单主
* @return 结果
*/
public int updateEmsTicket(EmsTicket emsTicket);
/**
* 批量删除工单主
*
* @param ids 需要删除的工单主主键集合
* @return 结果
*/
public int deleteEmsTicketByIds(String[] ids);
/**
* 删除工单主信息
*
* @param id 工单主主键
* @return 结果
*/
public int deleteEmsTicketById(String id);
}

View File

@ -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();
}

View File

@ -1,7 +1,9 @@
package com.xzzn.ems.service;
import com.xzzn.ems.domain.vo.SiteMonitorHomeVo;
import com.xzzn.ems.domain.vo.SiteMonitorRuningInfoVo;
import com.xzzn.ems.domain.EmsCoolingData;
import com.xzzn.ems.domain.vo.*;
import java.util.List;
/**
* 单点监控 服务层
@ -13,5 +15,15 @@ public interface ISingleSiteService
public SiteMonitorHomeVo getSiteMonitorDataVo(Long siteId);
public SiteMonitorRuningInfoVo getSiteRuningInfo(Long siteId);
public SiteMonitorRuningHeadInfoVo getSiteRunningHeadInfo(Long siteId);
public SiteMonitorRuningInfoVo getRunningGraph(Long siteId);
public List<PcsDetailInfoVo> getPcsDetailInfo(Long siteId);
public List<BMSOverViewVo> getBMSOverView(Long siteId);
public List<BMSBatteryClusterVo> getBMSBatteryCluster(Long siteId);
public List<EmsCoolingData> getCoolingDataList(Long siteId);
}

View File

@ -1,8 +1,8 @@
package com.xzzn.ems.service.impl;
import com.xzzn.ems.domain.EmsSite;
import com.xzzn.ems.domain.EmsSiteSetting;
import com.xzzn.ems.domain.vo.SiteTotalInfoVo;
import com.xzzn.ems.mapper.EmsSiteMapper;
import com.xzzn.ems.mapper.EmsSiteSettingMapper;
import com.xzzn.ems.service.IEmsSiteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -18,11 +18,11 @@ public class EmsSiteServiceImpl implements IEmsSiteService
{
@Autowired
private EmsSiteMapper emsSiteMapper;
private EmsSiteSettingMapper emsSiteMapper;
@Override
public List<EmsSite> getAllSites() {
return emsSiteMapper.selectSiteList();
public List<EmsSiteSetting> getAllSites() {
return emsSiteMapper.selectEmsSiteSettingList(null);
}
@Override

View File

@ -0,0 +1,97 @@
package com.xzzn.ems.service.impl;
import java.util.List;
import com.xzzn.common.utils.DateUtils;
import com.xzzn.ems.domain.EmsTicket;
import com.xzzn.ems.mapper.EmsTicketMapper;
import com.xzzn.ems.service.IEmsTicketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 工单主Service业务层处理
*
* @author xzzn
* @date 2025-06-26
*/
@Service
public class EmsTicketServiceImpl implements IEmsTicketService
{
@Autowired
private EmsTicketMapper emsTicketMapper;
/**
* 查询工单主
*
* @param id 工单主主键
* @return 工单主
*/
@Override
public EmsTicket selectEmsTicketById(String id)
{
return emsTicketMapper.selectEmsTicketById(id);
}
/**
* 查询工单主列表
*
* @param emsTicket 工单主
* @return 工单主
*/
@Override
public List<EmsTicket> selectEmsTicketList(EmsTicket emsTicket)
{
return emsTicketMapper.selectEmsTicketList(emsTicket);
}
/**
* 新增工单主
*
* @param emsTicket 工单主
* @return 结果
*/
@Override
public int insertEmsTicket(EmsTicket emsTicket)
{
emsTicket.setCreateTime(DateUtils.getNowDate());
return emsTicketMapper.insertEmsTicket(emsTicket);
}
/**
* 修改工单主
*
* @param emsTicket 工单主
* @return 结果
*/
@Override
public int updateEmsTicket(EmsTicket emsTicket)
{
emsTicket.setUpdateTime(DateUtils.getNowDate());
return emsTicketMapper.updateEmsTicket(emsTicket);
}
/**
* 批量删除工单主
*
* @param ids 需要删除的工单主主键
* @return 结果
*/
@Override
public int deleteEmsTicketByIds(String[] ids)
{
return emsTicketMapper.deleteEmsTicketByIds(ids);
}
/**
* 删除工单主信息
*
* @param id 工单主主键
* @return 结果
*/
@Override
public int deleteEmsTicketById(String id)
{
return emsTicketMapper.deleteEmsTicketById(id);
}
}

View File

@ -2,21 +2,18 @@ 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.domain.EmsSiteSetting;
import com.xzzn.ems.domain.vo.*;
import com.xzzn.ems.mapper.EmsAlarmRecordsMapper;
import com.xzzn.ems.mapper.EmsPcsDataMapper;
import com.xzzn.ems.mapper.EmsSiteMapper;
import com.xzzn.ems.mapper.EmsSiteSettingMapper;
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;
import java.util.*;
/**
* 首页看板+站点地图 服务层实现
@ -31,27 +28,44 @@ public class HomePageServiceImpl implements IHomePageService
@Autowired
private EmsPcsDataMapper emsPcsDataMapper;
@Autowired
private EmsSiteMapper emsSiteMapper;
private EmsSiteSettingMapper emsSiteMapper;
@Autowired
private EmsAlarmRecordsMapper alarmRecordsMapper;
@Override
public SiteTotalInfoVo getSiteTotalInfo() {
return emsSiteService.getSiteTotalInfo();
SiteTotalInfoVo siteTotalInfoVo = new SiteTotalInfoVo();
siteTotalInfoVo = emsSiteService.getSiteTotalInfo();
// 获取总充+总放
Map<String,BigDecimal> pcsMap = new HashMap<>();
pcsMap = emsPcsDataMapper.getPcsTotalChargeData();
siteTotalInfoVo.setTotalChargedCap(pcsMap.get("totalChargedCap"));
siteTotalInfoVo.setTotalDischargedCap(pcsMap.get("totalDischargedCap"));
return siteTotalInfoVo;
}
// 单站点基本信息
@Override
public SingleSiteBaseInfo getSingleSiteBaseInfo(Long siteId) {
SingleSiteBaseInfo singleSiteBaseInfo = new SingleSiteBaseInfo();
if (siteId != null) {
// 站点基本信息
EmsSite emsSite = emsSiteMapper.selectSiteById(siteId);
EmsSiteSetting emsSite = emsSiteMapper.selectEmsSiteSettingById(siteId);
if (emsSite != null) {
singleSiteBaseInfo.setSiteLocation(emsSite.getRemark());//站点位置
singleSiteBaseInfo.setRunningTime(DateUtils.parseDateToStr("yyyy-MM-dd",emsSite.getCreateTime()));//投运时间
// 装机功率+装机容量 待定
// 装机功率+装机容量
singleSiteBaseInfo.setSiteName(emsSite.getSiteName());
singleSiteBaseInfo.setInstalledCap(emsSite.getInstallCapacity());
singleSiteBaseInfo.setInstalledPower(emsSite.getInstallPower());
String[] siteLocation = new String[2];
siteLocation[0] = emsSite.getLongitude() == null ? "" : emsSite.getLongitude().toString();
siteLocation[1] = emsSite.getLatitude() == null ? "" : emsSite.getLatitude().toString();
singleSiteBaseInfo.setSiteLocation(siteLocation);//站点位置
singleSiteBaseInfo.setSiteAddress(emsSite.getSiteAddress());
singleSiteBaseInfo.setRunningTime(DateUtils.parseDateToStr("yyyy-MM-dd",emsSite.getRunningTime()));//投运时间
// 七天放电数据统计
List<SiteMonitorDataVo> siteMonitorDataVoList = emsPcsDataMapper.getPcsDataBySiteId(siteId);
singleSiteBaseInfo.setSevenDayDischargeStats(siteMonitorDataVoList);
singleSiteBaseInfo.setSevenDayDisChargeStats(siteMonitorDataVoList);
// 充放电基本数据处理
dealSitePCSDate(singleSiteBaseInfo,siteMonitorDataVoList);
}
@ -82,7 +96,7 @@ public class HomePageServiceImpl implements IHomePageService
singleSiteBaseInfo.setDayChargedCap(dayChargeCap);
singleSiteBaseInfo.setDayDisChargedCap(dayDisChargeCap);
singleSiteBaseInfo.setTotalChargedCap(totalChargeCap);
singleSiteBaseInfo.setTotalDischargedCap(totalDisChargeCap);
singleSiteBaseInfo.setTotalDisChargedCap(totalDisChargeCap);
}
}
@ -101,4 +115,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;
}
}

View File

@ -1,21 +1,19 @@
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.domain.EmsBatteryData;
import com.xzzn.ems.domain.EmsCoolingData;
import com.xzzn.ems.domain.vo.*;
import com.xzzn.ems.mapper.*;
import com.xzzn.ems.service.ISingleSiteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.math.RoundingMode;
import java.util.*;
import java.util.stream.Collectors;
/**
* 单点监控 服务层实现
@ -23,10 +21,26 @@ import java.util.List;
@Service
public class SingleSiteServiceImpl implements ISingleSiteService {
private static final String CLUSTER_DATA_TEP = "温度";
private static final String CLUSTER_DATA_VOLTAGE = "电压";
private static final String CLUSTER_DATA_SOC = "SOC";
@Autowired
private EmsPcsDataMapper emsPcsDataMapper;
@Autowired
private EmsAlarmRecordsMapper emsAlarmRecordsMapper;
@Autowired
private EmsBatteryDataMapper emsBatteryDataMapper;
@Autowired
private EmsBatteryStackMapper emsBatteryStackMapper;
@Autowired
private EmsBatteryClusterMapper emsBatteryClusterMapper;
@Autowired
private EmsPcsBranchDataMapper emsPcsBranchDataMapper;
@Autowired
private EmsCoolingDataMapper emsCoolingDataMapper;
@Override
public SiteMonitorHomeVo getSiteMonitorDataVo(Long siteId) {
@ -38,7 +52,7 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
siteMonitorHomeVo.setSiteMonitorHomeAlarmVo(siteMonitorHomeAlarmVo);
// 能量数据
List<SiteMonitorDataVo> siteMonitorDataVoList = emsPcsDataMapper.getPcsDataBySiteId(siteId);
if (siteMonitorDataVoList != null && !siteMonitorDataVoList.isEmpty()) {
if (!CollectionUtils.isEmpty(siteMonitorDataVoList)) {
BigDecimal dayChargeCap = new BigDecimal(0);
BigDecimal dayDisChargeCap = new BigDecimal(0);
BigDecimal totalChargeCap = new BigDecimal(0);
@ -87,9 +101,161 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
return flag;
}
// 获取单站监控实时运行头部数据
@Override
public SiteMonitorRuningInfoVo getSiteRuningInfo(Long siteId) {
return null;
public SiteMonitorRuningHeadInfoVo getSiteRunningHeadInfo(Long siteId) {
SiteMonitorRuningHeadInfoVo siteMonitorRunningHeadInfoVo = new SiteMonitorRuningHeadInfoVo();
if (siteId != null) {
// 实时有功功率/实时无功功率/今日充电量/今日放电量
siteMonitorRunningHeadInfoVo = emsPcsDataMapper.getSiteRunningHeadInfo(siteId);
// 电池簇SOC
// 电池堆SOH
EmsBatteryData emsBatteryData = emsBatteryDataMapper.getBatteryDataBySiteId(siteId);
if (emsBatteryData != null) {
siteMonitorRunningHeadInfoVo.setSoc(emsBatteryData.getSoc());
siteMonitorRunningHeadInfoVo.setSoh(emsBatteryData.getSoh());
}
}
return siteMonitorRunningHeadInfoVo;
}
// 获取单站监控实时运行曲线图数据
@Override
public SiteMonitorRuningInfoVo getRunningGraph(Long siteId) {
SiteMonitorRuningInfoVo siteMonitorRuningInfoVo = new SiteMonitorRuningInfoVo();
if (siteId != null) {
//储能功率list
//pcs平均温度list
//电池平均soclist
//电池平均温度list
}
return siteMonitorRuningInfoVo;
}
// 根据site_id获取pcs详细数据+支路数据
@Override
public List<PcsDetailInfoVo> getPcsDetailInfo(Long siteId) {
List<PcsDetailInfoVo> pcsDetailInfoVoList = new ArrayList<>();
if (siteId != null) {
// 获取pcs最新数据
pcsDetailInfoVoList = emsPcsDataMapper.getPcsDetailInfoBySiteId(siteId);
if (!CollectionUtils.isEmpty(pcsDetailInfoVoList)) {
for (PcsDetailInfoVo pcsDetailInfoVo : pcsDetailInfoVoList) {
Long deviceId = pcsDetailInfoVo.getDeviceId();
// 获取支路最新数据
if (deviceId != null) {
List<PcsBranchInfo> pcsBranchInfoList = emsPcsBranchDataMapper.getPcsBranchInfoList(siteId, deviceId);
pcsDetailInfoVo.setPcsBranchInfoList(pcsBranchInfoList);
}
}
}
}
return pcsDetailInfoVoList;
}
// 获取BMS总览数据
@Override
public List<BMSOverViewVo> getBMSOverView(Long siteId) {
List<BMSOverViewVo> bmsOverViewVoList = new ArrayList<>();
if (siteId != null) {
// 获取电池堆list
bmsOverViewVoList = emsBatteryStackMapper.selectEmsBatteryStackBySiteId(siteId);
if (!CollectionUtils.isEmpty(bmsOverViewVoList)) {
for (BMSOverViewVo bmsOverViewVo : bmsOverViewVoList) {
// 获取单体电池数据-待确认
Long stackDeviceId = bmsOverViewVo.getDeviceId();
if (stackDeviceId != null) {
List<BMSBatteryDataList> batteryDataList = new ArrayList<>();
batteryDataList = emsBatteryClusterMapper.getBmsBatteryData(siteId,stackDeviceId);
bmsOverViewVo.setBatteryDataList(batteryDataList);
}
}
}
}
return bmsOverViewVoList;
}
// 获取BMS电池簇数据
@Override
public List<BMSBatteryClusterVo> getBMSBatteryCluster(Long siteId) {
List<BMSBatteryClusterVo> bmsBatteryClusterVoList = new ArrayList<>();
if (siteId != null) {
bmsBatteryClusterVoList = emsBatteryClusterMapper.getBMSBatteryCluster(siteId);
if (!CollectionUtils.isEmpty(bmsBatteryClusterVoList)) {
for (BMSBatteryClusterVo bmsBatteryClusterVo : bmsBatteryClusterVoList) {
Long clusterDeviceId = bmsBatteryClusterVo.getDeviceId();
List<BMSBatteryClusterDataList> clusterDataList = new ArrayList<>();
if (clusterDeviceId != null) {
// 获取单体电池数据-平均/最大/最小
BatteryClusterDataDetailVo batteryClusterDataDetailVo = emsBatteryDataMapper.getBatteryDataByClusterId(siteId,clusterDeviceId);
// 处理数据
if (batteryClusterDataDetailVo != null) {
BMSBatteryClusterDataList voltageData = new BMSBatteryClusterDataList();
BMSBatteryClusterDataList tempData = new BMSBatteryClusterDataList();
BMSBatteryClusterDataList socData = new BMSBatteryClusterDataList();
// 设值
voltageData.setDataName(CLUSTER_DATA_VOLTAGE);
voltageData.setAvgData(batteryClusterDataDetailVo.getAvgVoltage());
voltageData.setMaxData(batteryClusterDataDetailVo.getMaxVoltage());
voltageData.setMinData(batteryClusterDataDetailVo.getMinVoltage());
tempData.setDataName(CLUSTER_DATA_TEP);
tempData.setAvgData(batteryClusterDataDetailVo.getAvgTemp());
tempData.setMaxData(batteryClusterDataDetailVo.getMaxTemp());
tempData.setMinData(batteryClusterDataDetailVo.getMinTemp());
socData.setDataName(CLUSTER_DATA_SOC);
socData.setAvgData(batteryClusterDataDetailVo.getAvgSoc());
socData.setMaxData(batteryClusterDataDetailVo.getMaxSoc());
socData.setMinData(batteryClusterDataDetailVo.getMinSoc());
// 设置对应单体id
List<Map<String,Object>> dataIdMapList = emsBatteryDataMapper.getDataIdsMap(batteryClusterDataDetailVo);
Map<String,Long> resultIdMap = new HashMap<>();
if (!CollectionUtils.isEmpty(dataIdMapList)) {
resultIdMap = dataIdMapList.stream()
.filter(map -> map.containsKey("type") && map.containsKey("device_id")) // 过滤无效数据
.filter(map -> map.get("type") instanceof String && map.get("device_id") instanceof Number) // 确保类型正确
.collect(Collectors.toMap(
map -> (String) map.get("type"), // 键type 字段
map -> ((Number) map.get("device_id")).longValue(), // 值device_id 转为 int
(existing, replacement) -> existing // 处理键冲突的策略
));
// 电压
voltageData.setMaxDataID(resultIdMap.get("maxVoltageId"));
voltageData.setMaxDataID(resultIdMap.get("maxVoltageId"));
// 温度
tempData.setMaxDataID(resultIdMap.get("maxTempId"));
tempData.setMinDataID(resultIdMap.get("minTempId"));
// soc
socData.setMaxDataID(resultIdMap.get("maxSocId"));
socData.setMinDataID(resultIdMap.get("minSocId"));
}
clusterDataList.add(voltageData);
clusterDataList.add(tempData);
clusterDataList.add(socData);
}
bmsBatteryClusterVo.setBatteryDataList(clusterDataList);
}
}
}
}
return bmsBatteryClusterVoList;
}
// 获取液冷设备参数
@Override
public List<EmsCoolingData> getCoolingDataList(Long siteId) {
List<EmsCoolingData> emsCoolingDataList = new ArrayList<>();
if (siteId != null) {
emsCoolingDataList = emsCoolingDataMapper.getCoolingDataList(siteId);
}
return emsCoolingDataList;
}
}

View File

@ -120,4 +120,16 @@
from ems_alarm_records
where site_id = #{siteId}
</select>
<select id="getAlarmTrendList" resultType="com.xzzn.ems.domain.vo.AlarmTrendList">
select MONTH(alarm_start_time) as dateMonth,COUNT(1) as alarmNum
from ems_alarm_records
group by MONTH(alarm_start_time)
</select>
<select id="getDeviceAlarmPropList" resultType="com.xzzn.ems.domain.vo.DeviceAlarmProportionList">
select device_type as type,COUNT(1) as alarmNum
from ems_alarm_records
group by device_type
</select>
</mapper>

View File

@ -0,0 +1,160 @@
<?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.EmsBatteryClusterMapper">
<resultMap type="EmsBatteryCluster" id="EmsBatteryClusterResult">
<result property="id" column="id" />
<result property="workStatus" column="work_status" />
<result property="pcsCommunicationStatus" column="pcs_communication_status" />
<result property="emsCommunicationStatus" column="ems_communication_status" />
<result property="clusterVoltage" column="cluster_voltage" />
<result property="chargeableCapacity" column="chargeable_capacity" />
<result property="totalChargedCapacity" column="total_charged_capacity" />
<result property="clusterCurrent" column="cluster_current" />
<result property="dischargeableCapacity" column="dischargeable_capacity" />
<result property="totalDischargedCapacity" column="total_discharged_capacity" />
<result property="soh" column="soh" />
<result property="averageTemperature" column="average_temperature" />
<result property="insulationResistance" column="insulation_resistance" />
<result property="currentSoc" column="current_soc" />
<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" />
</resultMap>
<sql id="selectEmsBatteryClusterVo">
select id, work_status, pcs_communication_status, ems_communication_status, cluster_voltage, chargeable_capacity, total_charged_capacity, cluster_current, dischargeable_capacity, total_discharged_capacity, soh, average_temperature, insulation_resistance, current_soc, create_by, create_time, update_by, update_time, remark, site_id, device_id from ems_battery_cluster
</sql>
<select id="selectEmsBatteryClusterList" parameterType="EmsBatteryCluster" resultMap="EmsBatteryClusterResult">
<include refid="selectEmsBatteryClusterVo"/>
<where>
<if test="workStatus != null and workStatus != ''"> and work_status = #{workStatus}</if>
<if test="pcsCommunicationStatus != null and pcsCommunicationStatus != ''"> and pcs_communication_status = #{pcsCommunicationStatus}</if>
<if test="emsCommunicationStatus != null and emsCommunicationStatus != ''"> and ems_communication_status = #{emsCommunicationStatus}</if>
<if test="clusterVoltage != null "> and cluster_voltage = #{clusterVoltage}</if>
<if test="chargeableCapacity != null "> and chargeable_capacity = #{chargeableCapacity}</if>
<if test="totalChargedCapacity != null "> and total_charged_capacity = #{totalChargedCapacity}</if>
<if test="clusterCurrent != null "> and cluster_current = #{clusterCurrent}</if>
<if test="dischargeableCapacity != null "> and dischargeable_capacity = #{dischargeableCapacity}</if>
<if test="totalDischargedCapacity != null "> and total_discharged_capacity = #{totalDischargedCapacity}</if>
<if test="soh != null "> and soh = #{soh}</if>
<if test="averageTemperature != null "> and average_temperature = #{averageTemperature}</if>
<if test="insulationResistance != null "> and insulation_resistance = #{insulationResistance}</if>
<if test="currentSoc != null "> and current_soc = #{currentSoc}</if>
<if test="siteId != null "> and site_id = #{siteId}</if>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
</where>
</select>
<select id="selectEmsBatteryClusterById" parameterType="Long" resultMap="EmsBatteryClusterResult">
<include refid="selectEmsBatteryClusterVo"/>
where id = #{id}
</select>
<insert id="insertEmsBatteryCluster" parameterType="EmsBatteryCluster" useGeneratedKeys="true" keyProperty="id">
insert into ems_battery_cluster
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="workStatus != null">work_status,</if>
<if test="pcsCommunicationStatus != null">pcs_communication_status,</if>
<if test="emsCommunicationStatus != null">ems_communication_status,</if>
<if test="clusterVoltage != null">cluster_voltage,</if>
<if test="chargeableCapacity != null">chargeable_capacity,</if>
<if test="totalChargedCapacity != null">total_charged_capacity,</if>
<if test="clusterCurrent != null">cluster_current,</if>
<if test="dischargeableCapacity != null">dischargeable_capacity,</if>
<if test="totalDischargedCapacity != null">total_discharged_capacity,</if>
<if test="soh != null">soh,</if>
<if test="averageTemperature != null">average_temperature,</if>
<if test="insulationResistance != null">insulation_resistance,</if>
<if test="currentSoc != null">current_soc,</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="workStatus != null">#{workStatus},</if>
<if test="pcsCommunicationStatus != null">#{pcsCommunicationStatus},</if>
<if test="emsCommunicationStatus != null">#{emsCommunicationStatus},</if>
<if test="clusterVoltage != null">#{clusterVoltage},</if>
<if test="chargeableCapacity != null">#{chargeableCapacity},</if>
<if test="totalChargedCapacity != null">#{totalChargedCapacity},</if>
<if test="clusterCurrent != null">#{clusterCurrent},</if>
<if test="dischargeableCapacity != null">#{dischargeableCapacity},</if>
<if test="totalDischargedCapacity != null">#{totalDischargedCapacity},</if>
<if test="soh != null">#{soh},</if>
<if test="averageTemperature != null">#{averageTemperature},</if>
<if test="insulationResistance != null">#{insulationResistance},</if>
<if test="currentSoc != null">#{currentSoc},</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="updateEmsBatteryCluster" parameterType="EmsBatteryCluster">
update ems_battery_cluster
<trim prefix="SET" suffixOverrides=",">
<if test="workStatus != null">work_status = #{workStatus},</if>
<if test="pcsCommunicationStatus != null">pcs_communication_status = #{pcsCommunicationStatus},</if>
<if test="emsCommunicationStatus != null">ems_communication_status = #{emsCommunicationStatus},</if>
<if test="clusterVoltage != null">cluster_voltage = #{clusterVoltage},</if>
<if test="chargeableCapacity != null">chargeable_capacity = #{chargeableCapacity},</if>
<if test="totalChargedCapacity != null">total_charged_capacity = #{totalChargedCapacity},</if>
<if test="clusterCurrent != null">cluster_current = #{clusterCurrent},</if>
<if test="dischargeableCapacity != null">dischargeable_capacity = #{dischargeableCapacity},</if>
<if test="totalDischargedCapacity != null">total_discharged_capacity = #{totalDischargedCapacity},</if>
<if test="soh != null">soh = #{soh},</if>
<if test="averageTemperature != null">average_temperature = #{averageTemperature},</if>
<if test="insulationResistance != null">insulation_resistance = #{insulationResistance},</if>
<if test="currentSoc != null">current_soc = #{currentSoc},</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="deleteEmsBatteryClusterById" parameterType="Long">
delete from ems_battery_cluster where id = #{id}
</delete>
<delete id="deleteEmsBatteryClusterByIds" parameterType="String">
delete from ems_battery_cluster where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="getBMSBatteryCluster" parameterType="Long" resultType="com.xzzn.ems.domain.vo.BMSBatteryClusterVo">
select td.device_name as deviceName, tmp.work_status as workStatus,
tmp.pcs_communication_status as pcsCommunicationStatus, tmp.ems_communication_status as emsCommunicationStatus,
tmp.cluster_voltage as clusterVoltage,tmp.chargeable_capacity as chargeableCapacity, tmp.total_charged_capacity as totalChargedCapacity,
tmp.cluster_current as clusterCurrent,tmp.dischargeable_capacity as dischargeableCapacity, tmp.total_discharged_capacity as totalDischargedCapacity,
tmp.soh as soh,tmp.average_temperature as averageTemperature,tmp.insulation_resistance as insulationResistance,
tmp.current_soc as currentSoc,tmp.site_id as siteId,tmp.device_id as deviceId
from ems_battery_cluster tmp left join ems_devices_setting td on tmp.device_id = td.id and tmp.site_id = td.site_id
where tmp.site_id = #{siteId}
and tmp.update_time = (select MAX(t.update_time) FROM ems_battery_cluster t where t.site_id = tmp.site_id
and t.device_id = tmp.device_id)
order by tmp.device_id
</select>
</mapper>

View File

@ -0,0 +1,127 @@
<?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.EmsBatteryDataMapper">
<resultMap type="EmsBatteryData" id="EmsBatteryDataResult">
<result property="id" column="id" />
<result property="batteryPack" column="battery_pack" />
<result property="batteryCluster" column="battery_cluster" />
<result property="batteryCellId" column="battery_cell_id" />
<result property="voltage" column="voltage" />
<result property="temperature" column="temperature" />
<result property="soc" column="soc" />
<result property="soh" column="soh" />
<result property="dataTimestamp" column="data_timestamp" />
<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" />
</resultMap>
<sql id="selectEmsBatteryDataVo">
select id, battery_pack, battery_cluster, battery_cell_id, voltage, temperature, soc, soh, data_timestamp, create_by, create_time, update_by, update_time, remark, site_id, device_id from ems_battery_data
</sql>
<select id="selectEmsBatteryDataList" parameterType="EmsBatteryData" resultMap="EmsBatteryDataResult">
<include refid="selectEmsBatteryDataVo"/>
<where>
<if test="batteryPack != null and batteryPack != ''"> and battery_pack = #{batteryPack}</if>
<if test="batteryCluster != null and batteryCluster != ''"> and battery_cluster = #{batteryCluster}</if>
<if test="batteryCellId != null and batteryCellId != ''"> and battery_cell_id = #{batteryCellId}</if>
<if test="voltage != null "> and voltage = #{voltage}</if>
<if test="temperature != null "> and temperature = #{temperature}</if>
<if test="soc != null "> and soc = #{soc}</if>
<if test="soh != null "> and soh = #{soh}</if>
<if test="dataTimestamp != null "> and data_timestamp = #{dataTimestamp}</if>
<if test="siteId != null "> and site_id = #{siteId}</if>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
</where>
</select>
<select id="selectEmsBatteryDataById" parameterType="Long" resultMap="EmsBatteryDataResult">
<include refid="selectEmsBatteryDataVo"/>
where id = #{id}
</select>
<insert id="insertEmsBatteryData" parameterType="EmsBatteryData" useGeneratedKeys="true" keyProperty="id">
insert into ems_battery_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="batteryPack != null">battery_pack,</if>
<if test="batteryCluster != null">battery_cluster,</if>
<if test="batteryCellId != null">battery_cell_id,</if>
<if test="voltage != null">voltage,</if>
<if test="temperature != null">temperature,</if>
<if test="soc != null">soc,</if>
<if test="soh != null">soh,</if>
<if test="dataTimestamp != null">data_timestamp,</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="batteryPack != null">#{batteryPack},</if>
<if test="batteryCluster != null">#{batteryCluster},</if>
<if test="batteryCellId != null">#{batteryCellId},</if>
<if test="voltage != null">#{voltage},</if>
<if test="temperature != null">#{temperature},</if>
<if test="soc != null">#{soc},</if>
<if test="soh != null">#{soh},</if>
<if test="dataTimestamp != null">#{dataTimestamp},</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="updateEmsBatteryData" parameterType="EmsBatteryData">
update ems_battery_data
<trim prefix="SET" suffixOverrides=",">
<if test="batteryPack != null">battery_pack = #{batteryPack},</if>
<if test="batteryCluster != null">battery_cluster = #{batteryCluster},</if>
<if test="batteryCellId != null">battery_cell_id = #{batteryCellId},</if>
<if test="voltage != null">voltage = #{voltage},</if>
<if test="temperature != null">temperature = #{temperature},</if>
<if test="soc != null">soc = #{soc},</if>
<if test="soh != null">soh = #{soh},</if>
<if test="dataTimestamp != null">data_timestamp = #{dataTimestamp},</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="deleteEmsBatteryDataById" parameterType="Long">
delete from ems_battery_data where id = #{id}
</delete>
<delete id="deleteEmsBatteryDataByIds" parameterType="String">
delete from ems_battery_data where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="getBatteryDataBySiteId" parameterType="Long" resultMap="EmsBatteryDataResult">
<include refid="selectEmsBatteryDataVo"/>
where site_id = #{siteId}
and DATE(data_timestamp) = DATE(NOW())
</select>
</mapper>

View File

@ -0,0 +1,160 @@
<?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.EmsBatteryStackMapper">
<resultMap type="EmsBatteryStack" id="EmsBatteryStackResult">
<result property="id" column="id" />
<result property="workStatus" column="work_status" />
<result property="pcsCommunicationStatus" column="pcs_communication_status" />
<result property="emsCommunicationStatus" column="ems_communication_status" />
<result property="totalVoltage" column="total_voltage" />
<result property="chargeableCapacity" column="chargeable_capacity" />
<result property="totalChargedCapacity" column="total_charged_capacity" />
<result property="totalCurrent" column="total_current" />
<result property="dischargeableCapacity" column="dischargeable_capacity" />
<result property="totalDischargedCapacity" column="total_discharged_capacity" />
<result property="soh" column="soh" />
<result property="averageTemperature" column="average_temperature" />
<result property="insulationResistance" column="insulation_resistance" />
<result property="currentSoc" column="current_soc" />
<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" />
</resultMap>
<sql id="selectEmsBatteryStackVo">
select id, work_status, pcs_communication_status, ems_communication_status, total_voltage, chargeable_capacity, total_charged_capacity, total_current, dischargeable_capacity, total_discharged_capacity, soh, average_temperature, insulation_resistance, current_soc, create_by, create_time, update_by, update_time, remark, site_id, device_id from ems_battery_stack
</sql>
<select id="selectEmsBatteryStackList" parameterType="EmsBatteryStack" resultMap="EmsBatteryStackResult">
<include refid="selectEmsBatteryStackVo"/>
<where>
<if test="workStatus != null and workStatus != ''"> and work_status = #{workStatus}</if>
<if test="pcsCommunicationStatus != null and pcsCommunicationStatus != ''"> and pcs_communication_status = #{pcsCommunicationStatus}</if>
<if test="emsCommunicationStatus != null and emsCommunicationStatus != ''"> and ems_communication_status = #{emsCommunicationStatus}</if>
<if test="totalVoltage != null "> and total_voltage = #{totalVoltage}</if>
<if test="chargeableCapacity != null "> and chargeable_capacity = #{chargeableCapacity}</if>
<if test="totalChargedCapacity != null "> and total_charged_capacity = #{totalChargedCapacity}</if>
<if test="totalCurrent != null "> and total_current = #{totalCurrent}</if>
<if test="dischargeableCapacity != null "> and dischargeable_capacity = #{dischargeableCapacity}</if>
<if test="totalDischargedCapacity != null "> and total_discharged_capacity = #{totalDischargedCapacity}</if>
<if test="soh != null "> and soh = #{soh}</if>
<if test="averageTemperature != null "> and average_temperature = #{averageTemperature}</if>
<if test="insulationResistance != null "> and insulation_resistance = #{insulationResistance}</if>
<if test="currentSoc != null "> and current_soc = #{currentSoc}</if>
<if test="siteId != null "> and site_id = #{siteId}</if>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
</where>
</select>
<select id="selectEmsBatteryStackById" parameterType="Long" resultMap="EmsBatteryStackResult">
<include refid="selectEmsBatteryStackVo"/>
where id = #{id}
</select>
<insert id="insertEmsBatteryStack" parameterType="EmsBatteryStack" useGeneratedKeys="true" keyProperty="id">
insert into ems_battery_stack
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="workStatus != null">work_status,</if>
<if test="pcsCommunicationStatus != null">pcs_communication_status,</if>
<if test="emsCommunicationStatus != null">ems_communication_status,</if>
<if test="totalVoltage != null">total_voltage,</if>
<if test="chargeableCapacity != null">chargeable_capacity,</if>
<if test="totalChargedCapacity != null">total_charged_capacity,</if>
<if test="totalCurrent != null">total_current,</if>
<if test="dischargeableCapacity != null">dischargeable_capacity,</if>
<if test="totalDischargedCapacity != null">total_discharged_capacity,</if>
<if test="soh != null">soh,</if>
<if test="averageTemperature != null">average_temperature,</if>
<if test="insulationResistance != null">insulation_resistance,</if>
<if test="currentSoc != null">current_soc,</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="workStatus != null">#{workStatus},</if>
<if test="pcsCommunicationStatus != null">#{pcsCommunicationStatus},</if>
<if test="emsCommunicationStatus != null">#{emsCommunicationStatus},</if>
<if test="totalVoltage != null">#{totalVoltage},</if>
<if test="chargeableCapacity != null">#{chargeableCapacity},</if>
<if test="totalChargedCapacity != null">#{totalChargedCapacity},</if>
<if test="totalCurrent != null">#{totalCurrent},</if>
<if test="dischargeableCapacity != null">#{dischargeableCapacity},</if>
<if test="totalDischargedCapacity != null">#{totalDischargedCapacity},</if>
<if test="soh != null">#{soh},</if>
<if test="averageTemperature != null">#{averageTemperature},</if>
<if test="insulationResistance != null">#{insulationResistance},</if>
<if test="currentSoc != null">#{currentSoc},</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="updateEmsBatteryStack" parameterType="EmsBatteryStack">
update ems_battery_stack
<trim prefix="SET" suffixOverrides=",">
<if test="workStatus != null">work_status = #{workStatus},</if>
<if test="pcsCommunicationStatus != null">pcs_communication_status = #{pcsCommunicationStatus},</if>
<if test="emsCommunicationStatus != null">ems_communication_status = #{emsCommunicationStatus},</if>
<if test="totalVoltage != null">total_voltage = #{totalVoltage},</if>
<if test="chargeableCapacity != null">chargeable_capacity = #{chargeableCapacity},</if>
<if test="totalChargedCapacity != null">total_charged_capacity = #{totalChargedCapacity},</if>
<if test="totalCurrent != null">total_current = #{totalCurrent},</if>
<if test="dischargeableCapacity != null">dischargeable_capacity = #{dischargeableCapacity},</if>
<if test="totalDischargedCapacity != null">total_discharged_capacity = #{totalDischargedCapacity},</if>
<if test="soh != null">soh = #{soh},</if>
<if test="averageTemperature != null">average_temperature = #{averageTemperature},</if>
<if test="insulationResistance != null">insulation_resistance = #{insulationResistance},</if>
<if test="currentSoc != null">current_soc = #{currentSoc},</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="deleteEmsBatteryStackById" parameterType="Long">
delete from ems_battery_stack where id = #{id}
</delete>
<delete id="deleteEmsBatteryStackByIds" parameterType="String">
delete from ems_battery_stack where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="selectEmsBatteryStackBySiteId" parameterType="Long" resultType="com.xzzn.ems.domain.vo.BMSOverViewVo">
select td.device_name as deviceName,tmp.work_status as workStatus,
tmp.pcs_communication_status as pcsCommunicationStatus,tmp.ems_communication_status as emsCommunicationStatus,
tmp.total_voltage as totalVoltage,tmp.chargeable_capacity as chargeableCapacity,tmp.total_charged_capacity as totalChargedCapacity,
tmp.total_current as totalCurrent,tmp.dischargeable_capacity as dischargeableCapacity,tmp.total_discharged_capacity as totalDischargedCapacity,
tmp.soh as soh,tmp.average_temperature as averageTemperature,tmp.insulation_resistance as insulationResistance,
tmp.current_soc as currentSoc,tmp.site_id as siteId,tmp.device_id as deviceId
from ems_battery_stack tmp left join ems_devices_setting td on tmp.device_id = td.id and tmp.site_id = td.site_id
where tmp.site_id = #{siteId}
and tmp.update_time = (select MAX(t.update_time) FROM ems_battery_stack t where t.site_id = tmp.site_id
and t.device_id = tmp.device_id)
order by tmp.device_id
</select>
</mapper>

View File

@ -0,0 +1,136 @@
<?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.EmsCoolingDataMapper">
<resultMap type="EmsCoolingData" id="EmsCoolingDataResult">
<result property="id" column="id" />
<result property="systemName" column="system_name" />
<result property="workMode" column="work_mode" />
<result property="currentTemperature" column="current_temperature" />
<result property="heatingStartPoint" column="heating_start_point" />
<result property="coolingStartPoint" column="cooling_start_point" />
<result property="highTempAlarmPoint" column="high_temp_alarm_point" />
<result property="heatingStopPoint" column="heating_stop_point" />
<result property="coolingStopPoint" column="cooling_stop_point" />
<result property="lowTempAlarmPoint" column="low_temp_alarm_point" />
<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" />
</resultMap>
<sql id="selectEmsCoolingDataVo">
select id, system_name, work_mode, current_temperature, heating_start_point, cooling_start_point, high_temp_alarm_point, heating_stop_point, cooling_stop_point, low_temp_alarm_point, create_by, create_time, update_by, update_time, remark, site_id, device_id from ems_cooling_data
</sql>
<select id="selectEmsCoolingDataList" parameterType="EmsCoolingData" resultMap="EmsCoolingDataResult">
<include refid="selectEmsCoolingDataVo"/>
<where>
<if test="systemName != null and systemName != ''"> and system_name like concat('%', #{systemName}, '%')</if>
<if test="workMode != null and workMode != ''"> and work_mode = #{workMode}</if>
<if test="currentTemperature != null "> and current_temperature = #{currentTemperature}</if>
<if test="heatingStartPoint != null "> and heating_start_point = #{heatingStartPoint}</if>
<if test="coolingStartPoint != null "> and cooling_start_point = #{coolingStartPoint}</if>
<if test="highTempAlarmPoint != null "> and high_temp_alarm_point = #{highTempAlarmPoint}</if>
<if test="heatingStopPoint != null "> and heating_stop_point = #{heatingStopPoint}</if>
<if test="coolingStopPoint != null "> and cooling_stop_point = #{coolingStopPoint}</if>
<if test="lowTempAlarmPoint != null "> and low_temp_alarm_point = #{lowTempAlarmPoint}</if>
<if test="siteId != null "> and site_id = #{siteId}</if>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
</where>
</select>
<select id="selectEmsCoolingDataById" parameterType="Long" resultMap="EmsCoolingDataResult">
<include refid="selectEmsCoolingDataVo"/>
where id = #{id}
</select>
<insert id="insertEmsCoolingData" parameterType="EmsCoolingData" useGeneratedKeys="true" keyProperty="id">
insert into ems_cooling_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="systemName != null">system_name,</if>
<if test="workMode != null">work_mode,</if>
<if test="currentTemperature != null">current_temperature,</if>
<if test="heatingStartPoint != null">heating_start_point,</if>
<if test="coolingStartPoint != null">cooling_start_point,</if>
<if test="highTempAlarmPoint != null">high_temp_alarm_point,</if>
<if test="heatingStopPoint != null">heating_stop_point,</if>
<if test="coolingStopPoint != null">cooling_stop_point,</if>
<if test="lowTempAlarmPoint != null">low_temp_alarm_point,</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="systemName != null">#{systemName},</if>
<if test="workMode != null">#{workMode},</if>
<if test="currentTemperature != null">#{currentTemperature},</if>
<if test="heatingStartPoint != null">#{heatingStartPoint},</if>
<if test="coolingStartPoint != null">#{coolingStartPoint},</if>
<if test="highTempAlarmPoint != null">#{highTempAlarmPoint},</if>
<if test="heatingStopPoint != null">#{heatingStopPoint},</if>
<if test="coolingStopPoint != null">#{coolingStopPoint},</if>
<if test="lowTempAlarmPoint != null">#{lowTempAlarmPoint},</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="updateEmsCoolingData" parameterType="EmsCoolingData">
update ems_cooling_data
<trim prefix="SET" suffixOverrides=",">
<if test="systemName != null">system_name = #{systemName},</if>
<if test="workMode != null">work_mode = #{workMode},</if>
<if test="currentTemperature != null">current_temperature = #{currentTemperature},</if>
<if test="heatingStartPoint != null">heating_start_point = #{heatingStartPoint},</if>
<if test="coolingStartPoint != null">cooling_start_point = #{coolingStartPoint},</if>
<if test="highTempAlarmPoint != null">high_temp_alarm_point = #{highTempAlarmPoint},</if>
<if test="heatingStopPoint != null">heating_stop_point = #{heatingStopPoint},</if>
<if test="coolingStopPoint != null">cooling_stop_point = #{coolingStopPoint},</if>
<if test="lowTempAlarmPoint != null">low_temp_alarm_point = #{lowTempAlarmPoint},</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="deleteEmsCoolingDataById" parameterType="Long">
delete from ems_cooling_data where id = #{id}
</delete>
<delete id="deleteEmsCoolingDataByIds" parameterType="String">
delete from ems_cooling_data where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="getCoolingDataList" parameterType="Long" resultMap="EmsCoolingDataResult">
select t.*
from ems_cooling_data t
where t.site_id = 1
and t.update_time = (
select MAX(tcd.update_time) from ems_cooling_data tcd where tcd.site_id = t.site_id and tcd.device_id = t.device_id)
order by t.system_name
</select>
</mapper>

View File

@ -0,0 +1,136 @@
<?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.EmsDevicesSettingMapper">
<resultMap type="EmsDevicesSetting" id="EmsDevicesSettingResult">
<result property="id" column="id" />
<result property="deviceName" column="device_name" />
<result property="deviceType" column="device_type" />
<result property="slaveId" column="slave_id" />
<result property="timeoutMs" column="timeout_ms" />
<result property="retries" column="retries" />
<result property="ipAddress" column="ip_address" />
<result property="ipPort" column="ip_port" />
<result property="serialPort" column="serial_port" />
<result property="baudRate" column="baud_rate" />
<result property="dataBits" column="data_bits" />
<result property="stopBits" column="stop_bits" />
<result property="parity" column="parity" />
<result property="description" column="description" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
<result property="siteId" column="site_id" />
<result property="communicationStatus" column="communication_status" />
</resultMap>
<sql id="selectEmsDevicesSettingVo">
select id, device_name, device_type, slave_id, timeout_ms, retries, ip_address, ip_port, serial_port, baud_rate, data_bits, stop_bits, parity, description, created_at, updated_at, site_id, communication_status from ems_devices_setting
</sql>
<select id="selectEmsDevicesSettingList" parameterType="EmsDevicesSetting" resultMap="EmsDevicesSettingResult">
<include refid="selectEmsDevicesSettingVo"/>
<where>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
<if test="slaveId != null "> and slave_id = #{slaveId}</if>
<if test="timeoutMs != null "> and timeout_ms = #{timeoutMs}</if>
<if test="retries != null "> and retries = #{retries}</if>
<if test="ipAddress != null and ipAddress != ''"> and ip_address = #{ipAddress}</if>
<if test="ipPort != null "> and ip_port = #{ipPort}</if>
<if test="serialPort != null and serialPort != ''"> and serial_port = #{serialPort}</if>
<if test="baudRate != null "> and baud_rate = #{baudRate}</if>
<if test="dataBits != null "> and data_bits = #{dataBits}</if>
<if test="stopBits != null "> and stop_bits = #{stopBits}</if>
<if test="parity != null and parity != ''"> and parity = #{parity}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
<if test="siteId != null "> and site_id = #{siteId}</if>
<if test="communicationStatus != null and communicationStatus != ''"> and communication_status = #{communicationStatus}</if>
</where>
</select>
<select id="selectEmsDevicesSettingById" parameterType="Long" resultMap="EmsDevicesSettingResult">
<include refid="selectEmsDevicesSettingVo"/>
where id = #{id}
</select>
<insert id="insertEmsDevicesSetting" parameterType="EmsDevicesSetting" useGeneratedKeys="true" keyProperty="id">
insert into ems_devices_setting
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deviceName != null and deviceName != ''">device_name,</if>
<if test="deviceType != null and deviceType != ''">device_type,</if>
<if test="slaveId != null">slave_id,</if>
<if test="timeoutMs != null">timeout_ms,</if>
<if test="retries != null">retries,</if>
<if test="ipAddress != null">ip_address,</if>
<if test="ipPort != null">ip_port,</if>
<if test="serialPort != null">serial_port,</if>
<if test="baudRate != null">baud_rate,</if>
<if test="dataBits != null">data_bits,</if>
<if test="stopBits != null">stop_bits,</if>
<if test="parity != null">parity,</if>
<if test="description != null">description,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedAt != null">updated_at,</if>
<if test="siteId != null">site_id,</if>
<if test="communicationStatus != null">communication_status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
<if test="deviceType != null and deviceType != ''">#{deviceType},</if>
<if test="slaveId != null">#{slaveId},</if>
<if test="timeoutMs != null">#{timeoutMs},</if>
<if test="retries != null">#{retries},</if>
<if test="ipAddress != null">#{ipAddress},</if>
<if test="ipPort != null">#{ipPort},</if>
<if test="serialPort != null">#{serialPort},</if>
<if test="baudRate != null">#{baudRate},</if>
<if test="dataBits != null">#{dataBits},</if>
<if test="stopBits != null">#{stopBits},</if>
<if test="parity != null">#{parity},</if>
<if test="description != null">#{description},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
<if test="siteId != null">#{siteId},</if>
<if test="communicationStatus != null">#{communicationStatus},</if>
</trim>
</insert>
<update id="updateEmsDevicesSetting" parameterType="EmsDevicesSetting">
update ems_devices_setting
<trim prefix="SET" suffixOverrides=",">
<if test="deviceName != null and deviceName != ''">device_name = #{deviceName},</if>
<if test="deviceType != null and deviceType != ''">device_type = #{deviceType},</if>
<if test="slaveId != null">slave_id = #{slaveId},</if>
<if test="timeoutMs != null">timeout_ms = #{timeoutMs},</if>
<if test="retries != null">retries = #{retries},</if>
<if test="ipAddress != null">ip_address = #{ipAddress},</if>
<if test="ipPort != null">ip_port = #{ipPort},</if>
<if test="serialPort != null">serial_port = #{serialPort},</if>
<if test="baudRate != null">baud_rate = #{baudRate},</if>
<if test="dataBits != null">data_bits = #{dataBits},</if>
<if test="stopBits != null">stop_bits = #{stopBits},</if>
<if test="parity != null">parity = #{parity},</if>
<if test="description != null">description = #{description},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
<if test="siteId != null">site_id = #{siteId},</if>
<if test="communicationStatus != null">communication_status = #{communicationStatus},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEmsDevicesSettingById" parameterType="Long">
delete from ems_devices_setting where id = #{id}
</delete>
<delete id="deleteEmsDevicesSettingByIds" parameterType="String">
delete from ems_devices_setting where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,118 @@
<?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.EmsPcsBranchDataMapper">
<resultMap type="EmsPcsBranchData" id="EmsPcsBranchDataResult">
<result property="id" column="id" />
<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="branchId" column="branch_id" />
</resultMap>
<sql id="selectEmsPcsBranchDataVo">
select id, discharge_status, dc_power, dc_voltage, dc_current, create_by, create_time, update_by, update_time, remark, site_id, device_id, branch_id from ems_pcs_branch_data
</sql>
<select id="selectEmsPcsBranchDataList" parameterType="EmsPcsBranchData" resultMap="EmsPcsBranchDataResult">
<include refid="selectEmsPcsBranchDataVo"/>
<where>
<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>
<if test="branchId != null "> and branch_id = #{branchId}</if>
</where>
</select>
<select id="selectEmsPcsBranchDataById" parameterType="Long" resultMap="EmsPcsBranchDataResult">
<include refid="selectEmsPcsBranchDataVo"/>
where id = #{id}
</select>
<insert id="insertEmsPcsBranchData" parameterType="EmsPcsBranchData" useGeneratedKeys="true" keyProperty="id">
insert into ems_pcs_branch_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<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>
<if test="branchId != null">branch_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<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>
<if test="branchId != null">#{branchId},</if>
</trim>
</insert>
<update id="updateEmsPcsBranchData" parameterType="EmsPcsBranchData">
update ems_pcs_branch_data
<trim prefix="SET" suffixOverrides=",">
<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>
<if test="branchId != null">branch_id = #{branchId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEmsPcsBranchDataById" parameterType="Long">
delete from ems_pcs_branch_data where id = #{id}
</delete>
<delete id="deleteEmsPcsBranchDataByIds" parameterType="String">
delete from ems_pcs_branch_data where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="getPcsBranchInfoList" resultType="com.xzzn.ems.domain.vo.PcsBranchInfo">
select tmp.branch_id as branchId, tmp.discharge_status as dischargeStatus,
tmp.dc_power as dcPower, tmp.dc_voltage as dcVoltage,
tmp.dc_current as dcCurrent, tmp.site_id as siteId, tmp.device_id as deviceId
from ems_pcs_branch_data tmp
where tmp.site_id = #{siteId}
and tmp.device_id = #{deviceId}
and tmp.update_time = (select MAX(t.update_time) FROM ems_pcs_branch_data t where t.site_id = tmp.site_id
and t.device_id = tmp.device_id and t.branch_id = tmp.branch_id)
order by tmp.branch_id
</select>
</mapper>

View File

@ -40,10 +40,11 @@
<result property="deviceId" column="device_id" />
<result property="dateMonth" column="date_month" />
<result property="dateDay" column="date_day" />
<result property="communicationStatus" column="communication_status" />
</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
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, communication_status from ems_pcs_data
</sql>
<select id="selectEmsPcsDataList" parameterType="EmsPcsData" resultMap="EmsPcsDataResult">
@ -76,6 +77,9 @@
<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>
<if test="dateMonth != null "> and date_month = #{dateMonth}</if>
<if test="dateDay != null "> and date_day = #{dateDay}</if>
<if test="communicationStatus != null and communicationStatus != ''"> and communication_status = #{communicationStatus}</if>
</where>
</select>
@ -119,6 +123,9 @@
<if test="remark != null">remark,</if>
<if test="siteId != null">site_id,</if>
<if test="deviceId != null">device_id,</if>
<if test="dateMonth != null">date_month,</if>
<if test="dateDay != null">date_day,</if>
<if test="communicationStatus != null">communication_status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dataUpdateTime != null">#{dataUpdateTime},</if>
@ -153,6 +160,9 @@
<if test="remark != null">#{remark},</if>
<if test="siteId != null">#{siteId},</if>
<if test="deviceId != null">#{deviceId},</if>
<if test="dateMonth != null">#{dateMonth},</if>
<if test="dateDay != null">#{dateDay},</if>
<if test="communicationStatus != null">#{communicationStatus},</if>
</trim>
</insert>
@ -191,6 +201,9 @@
<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="dateMonth != null">date_month = #{dateMonth},</if>
<if test="dateDay != null">date_day = #{dateDay},</if>
<if test="communicationStatus != null">communication_status = #{communicationStatus},</if>
</trim>
where id = #{id}
</update>
@ -222,4 +235,64 @@
where site_id = #{siteId}
</select>
<select id="getPcsTotalChargeData" resultType="map">
select SUM(t.daily_ac_charge_energy) as totalChargedCap,
SUM(t.daily_ac_discharge_energy) as totalDischargedCap
from ems_pcs_data t
where t.data_update_time = (select MAX(data_update_time) FROM ems_pcs_data
where site_id = t.site_id and device_id = t.device_id and date_month = t.date_month and date_day = t.date_day)
</select>
<select id="getSiteRunningHeadInfo" parameterType="Long" resultType="com.xzzn.ems.domain.vo.SiteMonitorRuningHeadInfoVo">
select sum(a.total_active_power) as totalActivePower,
sum(a.total_reactive_power) as totalReactivePower,
sum(a.daily_ac_charge_energy) as dayChargedCap,
sum(a.daily_ac_discharge_energy) as dayDisChargedCap
from (
select t.total_active_power,t.total_reactive_power,
t.daily_ac_charge_energy,t.daily_ac_discharge_energy,
t.device_id,t.site_id,t.create_time
from ems_pcs_data t
where t.site_id = #{siteId}
and t.create_time = (select MAX(create_time) FROM ems_pcs_data where site_id = t.site_id and device_id = t.device_id)
group by t.device_id,t.total_active_power, total_reactive_power,
t.daily_ac_charge_energy,t.daily_ac_discharge_energy,t.site_id,t.create_time
) a
</select>
<select id="getElectDataList" resultType="com.xzzn.ems.domain.vo.ElectricIndexList">
select tmp.date_month as dateMonth,
SUM(tmp.daily_ac_charge_energy) as chargeEnergy,
SUM(tmp.daily_ac_discharge_energy) as disChargeEnergy
from
(
select date_month,date_day,
t.daily_ac_charge_energy,t.daily_ac_discharge_energy,t.create_time
from ems_pcs_data t
where t.create_time = (select MAX(create_time) FROM ems_pcs_data where site_id = t.site_id
and device_id = t.device_id and date_day = t.date_day and date_month = t.date_month)
) as tmp
group by dateMonth
</select>
<select id="getPcsDetailInfoBySiteId" parameterType="Long" resultType="com.xzzn.ems.domain.vo.PcsDetailInfoVo">
select td.device_name as deviceName,td.communication_status as communicationStatus,
tmp.site_id as siteId,tmp.device_id as deviceId,
tmp.data_update_time as dataUpdateTime,tmp.work_status as workStatus,
tmp.grid_status as gridStatus,tmp.device_status as deviceStatus,tmp.control_mode as controlMode,
tmp.total_active_power as totalActivePower,tmp.daily_ac_charge_energy as dailyAcChargeEnergy,
tmp.a_phase_voltage as aPhaseVoltage,tmp.a_phase_current as aPhaseCurrent,
tmp.total_reactive_power as totalReactivePower,tmp.daily_ac_discharge_energy as dailyAcDischargeEnergy,
tmp.b_phase_voltage as bPhaseVoltage,tmp.b_phase_current as bPhaseCurrent,
tmp.total_apparent_power as totalApparentPower,tmp.pcs_module_temperature as pcsModuleTemperature,
tmp.c_phase_current as cPhaseVoltage,tmp.c_phase_current as cPhaseCurrent,
tmp.total_power_factor as totalPowerFactor,
tmp.pcs_environment_temperature as pcsEnvironmentTemperature,tmp.ac_frequency as acFrequency
from ems_pcs_data tmp left join ems_devices_setting td on tmp.device_id = td.id and tmp.site_id = td.site_id
where tmp.site_id = #{siteId}
and tmp.data_update_time = (select MAX(data_update_time) FROM ems_pcs_data where site_id = tmp.site_id
and device_id = tmp.device_id)
order by tmp.device_id
</select>
</mapper>

View File

@ -1,83 +0,0 @@
<?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>

View File

@ -0,0 +1,113 @@
<?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.EmsSiteSettingMapper">
<resultMap type="EmsSiteSetting" id="EmsSiteSettingResult">
<result property="id" column="id" />
<result property="siteName" column="site_name" />
<result property="siteAddress" column="site_address" />
<result property="runningTime" column="running_time" />
<result property="latitude" column="latitude" />
<result property="longitude" column="longitude" />
<result property="installCapacity" column="install_capacity" />
<result property="installPower" column="install_power" />
<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="selectEmsSiteSettingVo">
select id, site_name, site_address, running_time, latitude, longitude, install_capacity, install_power, remark, create_by, update_by, create_time, update_time from ems_site_setting
</sql>
<select id="selectEmsSiteSettingList" parameterType="EmsSiteSetting" resultMap="EmsSiteSettingResult">
<include refid="selectEmsSiteSettingVo"/>
<where>
<if test="siteName != null and siteName != ''"> and site_name like concat('%', #{siteName}, '%')</if>
<if test="siteAddress != null and siteAddress != ''"> and site_address = #{siteAddress}</if>
<if test="runningTime != null "> and running_time = #{runningTime}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="installCapacity != null "> and install_capacity = #{installCapacity}</if>
<if test="installPower != null "> and install_power = #{installPower}</if>
</where>
</select>
<select id="selectEmsSiteSettingById" parameterType="Long" resultMap="EmsSiteSettingResult">
<include refid="selectEmsSiteSettingVo"/>
where id = #{id}
</select>
<insert id="insertEmsSiteSetting" parameterType="EmsSiteSetting" useGeneratedKeys="true" keyProperty="id">
insert into ems_site_setting
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="siteName != null and siteName != ''">site_name,</if>
<if test="siteAddress != null">site_address,</if>
<if test="runningTime != null">running_time,</if>
<if test="latitude != null">latitude,</if>
<if test="longitude != null">longitude,</if>
<if test="installCapacity != null">install_capacity,</if>
<if test="installPower != null">install_power,</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="siteAddress != null">#{siteAddress},</if>
<if test="runningTime != null">#{runningTime},</if>
<if test="latitude != null">#{latitude},</if>
<if test="longitude != null">#{longitude},</if>
<if test="installCapacity != null">#{installCapacity},</if>
<if test="installPower != null">#{installPower},</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="updateEmsSiteSetting" parameterType="EmsSiteSetting">
update ems_site_setting
<trim prefix="SET" suffixOverrides=",">
<if test="siteName != null and siteName != ''">site_name = #{siteName},</if>
<if test="siteAddress != null">site_address = #{siteAddress},</if>
<if test="runningTime != null">running_time = #{runningTime},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="installCapacity != null">install_capacity = #{installCapacity},</if>
<if test="installPower != null">install_power = #{installPower},</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="deleteEmsSiteSettingById" parameterType="Long">
delete from ems_site_setting where id = #{id}
</delete>
<delete id="deleteEmsSiteSettingByIds" 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(s.install_capacity) as installCapacity,
SUM(s.install_power) as installPower
from ems_site_setting s
</select>
</mapper>