Compare commits
60 Commits
main
...
9dae47934f
Author | SHA1 | Date | |
---|---|---|---|
9dae47934f | |||
0e726a214d | |||
7964806b94 | |||
b4302edd8a | |||
88fee64f46 | |||
8081e38d5e | |||
8415e2749e | |||
170bae19f8 | |||
37fd07b0c8 | |||
f73ba23b52 | |||
a3f77113c9 | |||
a7e33afb19 | |||
2c5d4ddd1b | |||
9efb87ed24 | |||
4d5f2adef4 | |||
0318b2455d | |||
b2c624f452 | |||
b207208623 | |||
259784f525 | |||
5eb8de692c | |||
ed025d2750 | |||
d24da5363a | |||
342439e3a9 | |||
8663ab8325 | |||
93bd88b94c | |||
7e265e21b1 | |||
d0db9e137a | |||
790e4ca716 | |||
62e4608a7a | |||
9fbc6dc6b8 | |||
3d71b9caba | |||
a6af1397e9 | |||
2a5ac78394 | |||
f2e5e07857 | |||
fbab6ea631 | |||
337599d1c6 | |||
cebd845af1 | |||
49a3ce2c11 | |||
551ae90155 | |||
d0b98a0a8a | |||
aaacafc0c3 | |||
c6fc7c00cc | |||
ae59143771 | |||
1225559c36 | |||
324beeaa69 | |||
aed3f830f5 | |||
747ce8a08d | |||
d2824b6087 | |||
bb0f972f55 | |||
d1aa8dbd2c | |||
177e235c0e | |||
1a56bd6526 | |||
38e93c9681 | |||
73f62c8fa5 | |||
365dd819b5 | |||
31dc8e72c6 | |||
da894c26d1 | |||
f439228432 | |||
3609b03deb | |||
0544929d07 |
@ -0,0 +1,37 @@
|
||||
package com.xzzn.web.controller.ems;
|
||||
|
||||
import com.xzzn.common.core.controller.BaseController;
|
||||
import com.xzzn.common.core.page.TableDataInfo;
|
||||
import com.xzzn.ems.domain.vo.AlarmRecordListRequestVo;
|
||||
import com.xzzn.ems.domain.vo.AlarmRecordListResponseVo;
|
||||
import com.xzzn.ems.service.IEmsAlarmRecordsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 单站监控-故障告警
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ems/siteAlarm")
|
||||
public class EmsAlarmRecordsController extends BaseController
|
||||
{
|
||||
|
||||
@Autowired
|
||||
private IEmsAlarmRecordsService iEmsAlarmRecordsService;
|
||||
|
||||
/**
|
||||
* 获取告警详情列表
|
||||
*/
|
||||
@GetMapping("/getAlarmDetailList")
|
||||
public TableDataInfo getAlarmDetailList(AlarmRecordListRequestVo requestVo)
|
||||
{
|
||||
startPage();
|
||||
List<AlarmRecordListResponseVo> list = iEmsAlarmRecordsService.getAlarmRecordDetailList(requestVo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.xzzn.web.controller.ems;
|
||||
|
||||
import com.xzzn.common.core.controller.BaseController;
|
||||
import com.xzzn.common.core.page.TableDataInfo;
|
||||
import com.xzzn.ems.domain.EmsSiteSetting;
|
||||
import com.xzzn.ems.service.IEmsSiteService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 站点配置
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ems/siteConfig")
|
||||
public class EmsSiteConfigController extends BaseController{
|
||||
|
||||
@Autowired
|
||||
private IEmsSiteService iEmsSiteService;
|
||||
|
||||
/**
|
||||
* 获取站点列表
|
||||
*/
|
||||
@GetMapping("/getSiteInfoList")
|
||||
public TableDataInfo getSiteInfoList(@RequestParam String siteName, @RequestParam String startTime, @RequestParam String endTime)
|
||||
{
|
||||
startPage();
|
||||
List<EmsSiteSetting> list = iEmsSiteService.getAllSiteInfoList(siteName,startTime,endTime);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
}
|
@ -26,7 +26,7 @@ public class EmsSiteMapController extends BaseController{
|
||||
* 获取某个站点基本信息
|
||||
*/
|
||||
@GetMapping("/getSingleSiteBaseInfo")
|
||||
public AjaxResult getSingleSiteBaseInfo(@RequestParam Long siteId)
|
||||
public AjaxResult getSingleSiteBaseInfo(@RequestParam String siteId)
|
||||
{
|
||||
return success(homePageService.getSingleSiteBaseInfo(siteId));
|
||||
}
|
||||
|
@ -2,10 +2,15 @@ package com.xzzn.web.controller.ems;
|
||||
|
||||
import com.xzzn.common.core.controller.BaseController;
|
||||
import com.xzzn.common.core.domain.AjaxResult;
|
||||
import com.xzzn.common.core.page.TableDataInfo;
|
||||
import com.xzzn.ems.domain.vo.BatteryDataStatsListVo;
|
||||
import com.xzzn.ems.service.IEmsSiteService;
|
||||
import com.xzzn.ems.service.ISingleSiteService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 单站监控
|
||||
@ -17,12 +22,14 @@ public class EmsSiteMonitorController extends BaseController{
|
||||
|
||||
@Autowired
|
||||
private ISingleSiteService iSingleSiteService;
|
||||
@Autowired
|
||||
private IEmsSiteService iEmsSiteService;
|
||||
|
||||
/**
|
||||
* 获取单站首页数据
|
||||
*/
|
||||
@GetMapping("/homeView")
|
||||
public AjaxResult getSingleSiteViewInfo(@RequestParam Long siteId)
|
||||
public AjaxResult getSingleSiteViewInfo(@RequestParam String siteId)
|
||||
{
|
||||
return success(iSingleSiteService.getSiteMonitorDataVo(siteId));
|
||||
}
|
||||
@ -31,7 +38,7 @@ public class EmsSiteMonitorController extends BaseController{
|
||||
* 单站监控-设备监控-实时运行头部数据
|
||||
*/
|
||||
@GetMapping("/runningHeadInfo")
|
||||
public AjaxResult getRunningHeadInfo(@RequestParam Long siteId)
|
||||
public AjaxResult getRunningHeadInfo(@RequestParam String siteId)
|
||||
{
|
||||
return success(iSingleSiteService.getSiteRunningHeadInfo(siteId));
|
||||
}
|
||||
@ -40,7 +47,7 @@ public class EmsSiteMonitorController extends BaseController{
|
||||
* 单站监控-设备监控-实时运行曲线图数据
|
||||
*/
|
||||
@GetMapping("/runningGraph")
|
||||
public AjaxResult getRunningGraph(@RequestParam Long siteId)
|
||||
public AjaxResult getRunningGraph(@RequestParam String siteId)
|
||||
{
|
||||
return success(iSingleSiteService.getRunningGraph(siteId));
|
||||
}
|
||||
@ -49,7 +56,7 @@ public class EmsSiteMonitorController extends BaseController{
|
||||
* 单站监控-设备监控-PCS
|
||||
*/
|
||||
@GetMapping("/getPcsDetailInfo")
|
||||
public AjaxResult getPcsDetailInfo(@RequestParam Long siteId)
|
||||
public AjaxResult getPcsDetailInfo(@RequestParam String siteId)
|
||||
{
|
||||
return success(iSingleSiteService.getPcsDetailInfo(siteId));
|
||||
}
|
||||
@ -58,7 +65,7 @@ public class EmsSiteMonitorController extends BaseController{
|
||||
* 单站监控-设备监控-BMS总览
|
||||
*/
|
||||
@GetMapping("/getBMSOverView")
|
||||
public AjaxResult getBMSOverView(@RequestParam Long siteId)
|
||||
public AjaxResult getBMSOverView(@RequestParam String siteId)
|
||||
{
|
||||
return success(iSingleSiteService.getBMSOverView(siteId));
|
||||
}
|
||||
@ -67,7 +74,7 @@ public class EmsSiteMonitorController extends BaseController{
|
||||
* 单站监控-设备监控-BMS电池簇
|
||||
*/
|
||||
@GetMapping("/getBMSBatteryCluster")
|
||||
public AjaxResult getBMSBatteryCluster(@RequestParam Long siteId)
|
||||
public AjaxResult getBMSBatteryCluster(@RequestParam String siteId)
|
||||
{
|
||||
return success(iSingleSiteService.getBMSBatteryCluster(siteId));
|
||||
}
|
||||
@ -76,26 +83,46 @@ public class EmsSiteMonitorController extends BaseController{
|
||||
* 获取所有电池堆
|
||||
*/
|
||||
@GetMapping("/getStackNameList")
|
||||
public AjaxResult getStackNameList(@RequestParam Long siteId)
|
||||
public AjaxResult getStackNameList(@RequestParam String siteId)
|
||||
{
|
||||
return success(iSingleSiteService.getBMSBatteryCluster(siteId));
|
||||
return success(iEmsSiteService.getAllStackInfo(siteId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有电池簇
|
||||
*/
|
||||
@GetMapping("/getClusterNameList")
|
||||
public AjaxResult getClusterNameList(@RequestParam Long siteId)
|
||||
public AjaxResult getClusterNameList(@RequestParam String stackDeviceId)
|
||||
{
|
||||
return success(iSingleSiteService.getBMSBatteryCluster(siteId));
|
||||
return success(iEmsSiteService.getAllClusterInfo(stackDeviceId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 液冷设备参数
|
||||
*/
|
||||
@GetMapping("/getCoolingDataList")
|
||||
public AjaxResult getCoolingDataList(@RequestParam Long siteId)
|
||||
public AjaxResult getCoolingDataList(@RequestParam String siteId)
|
||||
{
|
||||
return success(iSingleSiteService.getCoolingDataList(siteId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取电池簇下面的单体电池数据
|
||||
*/
|
||||
@GetMapping("/getClusterDataInfoList")
|
||||
public TableDataInfo getClusterDataInfoList(@RequestParam String clusterDeviceId,@RequestParam String siteId)
|
||||
{
|
||||
startPage();
|
||||
List<BatteryDataStatsListVo> list = iSingleSiteService.getClusterDataInfoList(clusterDeviceId,siteId);
|
||||
return getDataTable2(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 电表数据
|
||||
*/
|
||||
@GetMapping("/getAmmeterDataList")
|
||||
public AjaxResult getAmmeterDataList(@RequestParam String siteId)
|
||||
{
|
||||
return success(iSingleSiteService.getAmmeterDataList(siteId));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,48 @@
|
||||
package com.xzzn.web.controller.ems;
|
||||
|
||||
import com.xzzn.common.core.controller.BaseController;
|
||||
import com.xzzn.common.core.domain.AjaxResult;
|
||||
import com.xzzn.common.utils.StringUtils;
|
||||
import com.xzzn.ems.domain.vo.DateSearchRequest;
|
||||
import com.xzzn.ems.service.IEmsStatsReportService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 单站监控-统计报表
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ems/statsReport")
|
||||
public class EmsStatisticalReportController extends BaseController
|
||||
{
|
||||
|
||||
@Autowired
|
||||
private IEmsStatsReportService ieEmsStatsReportService;
|
||||
|
||||
/**
|
||||
* 概率统计-收益指标查询
|
||||
*/
|
||||
@GetMapping("/getRevenueData")
|
||||
public AjaxResult getRevenueData(DateSearchRequest requestVo)
|
||||
{
|
||||
return success(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 概率统计-电量指标查询
|
||||
*/
|
||||
@GetMapping("/getElectricData")
|
||||
public AjaxResult getElectricData(DateSearchRequest requestVo)
|
||||
{
|
||||
if (!StringUtils.isEmpty(requestVo.getSiteId())) {
|
||||
return success(ieEmsStatsReportService.getElectricDataResult(requestVo));
|
||||
} else {
|
||||
return error("站点id必传");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package com.xzzn.web.controller.ems;
|
||||
|
||||
import com.xzzn.ems.domain.EmsMqttMessage;
|
||||
import com.xzzn.ems.service.IEmsMqttMessageService;
|
||||
import com.xzzn.ems.service.IFXXDataProcessService;
|
||||
import com.xzzn.framework.manager.MqttLifecycleManager;
|
||||
import com.xzzn.framework.web.service.MqttPublisher;
|
||||
import com.xzzn.framework.web.service.MqttSubscriber;
|
||||
import org.apache.juli.logging.Log;
|
||||
import org.apache.juli.logging.LogFactory;
|
||||
import org.eclipse.paho.client.mqttv3.IMqttMessageListener;
|
||||
import org.eclipse.paho.client.mqttv3.MqttException;
|
||||
import org.eclipse.paho.client.mqttv3.MqttMessage;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
@Service
|
||||
public class MqttMessageController implements MqttPublisher, MqttSubscriber {
|
||||
|
||||
|
||||
private static final Log log = LogFactory.getLog(MqttMessageController.class);
|
||||
|
||||
|
||||
private final MqttLifecycleManager mqttLifecycleManager;
|
||||
|
||||
@Autowired
|
||||
private IEmsMqttMessageService emsMqttMessageService;
|
||||
|
||||
@Autowired
|
||||
private IFXXDataProcessService fXXDataProcessService;
|
||||
|
||||
@Autowired
|
||||
public MqttMessageController(MqttLifecycleManager mqttLifecycleManager) {
|
||||
this.mqttLifecycleManager = mqttLifecycleManager;
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
// 订阅系统状态主题
|
||||
subscribe("021_FXX_01_UP", 1, this::handleDeviceData);
|
||||
subscribe("021_FXX_01_RECALL", 1, this::handleDeviceData);
|
||||
subscribe("021_FXX_01_DOWN", 1, this::handleDeviceData);
|
||||
subscribe("021_FXX_01", 1, this::handleSystemStatus);
|
||||
|
||||
}
|
||||
|
||||
// 处理系统状态消息
|
||||
private void handleSystemStatus(String topic, MqttMessage message) {
|
||||
String payload = new String(message.getPayload());
|
||||
System.out.println("[SYSTEM] Status update: " + payload);
|
||||
|
||||
try {
|
||||
// 业务处理逻辑
|
||||
EmsMqttMessage mqttMessage = new EmsMqttMessage();
|
||||
mqttMessage.setMqttTopic(topic);
|
||||
mqttMessage.setMqttMessage(payload);
|
||||
mqttMessage.setCreateTime(new java.util.Date());
|
||||
mqttMessage.setUpdateTime(new java.util.Date());
|
||||
mqttMessage.setCreateBy("system");
|
||||
mqttMessage.setUpdateBy("system");
|
||||
emsMqttMessageService.insertEmsMqttMessage(mqttMessage);
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to process system status message: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
// 处理设备数据
|
||||
private void handleDeviceData(String topic, MqttMessage message) {
|
||||
String payload = new String(message.getPayload());
|
||||
System.out.println("[DEVICE] data: " + payload);
|
||||
try {
|
||||
// 业务处理逻辑
|
||||
fXXDataProcessService.handleFxData(payload);
|
||||
|
||||
|
||||
EmsMqttMessage mqttMessage = new EmsMqttMessage();
|
||||
mqttMessage.setMqttTopic(topic);
|
||||
mqttMessage.setMqttMessage(payload);
|
||||
mqttMessage.setCreateTime(new java.util.Date());
|
||||
mqttMessage.setUpdateTime(new java.util.Date());
|
||||
mqttMessage.setCreateBy("system");
|
||||
mqttMessage.setUpdateBy("system");
|
||||
emsMqttMessageService.insertEmsMqttMessage(mqttMessage);
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to process system status message: " + e.getMessage(), e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publish(String topic, String message) throws MqttException {
|
||||
mqttLifecycleManager.publish(topic, message, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publish(String topic, String message, int qos) throws MqttException {
|
||||
mqttLifecycleManager.publish(topic, message, qos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void subscribe(String topic, int qos, IMqttMessageListener listener) {
|
||||
mqttLifecycleManager.subscribe(topic, qos, listener);
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 发送设备控制命令
|
||||
public void sendDeviceCommand(String deviceId, String command) {
|
||||
try {
|
||||
String topic = "devices/" + deviceId + "/commands";
|
||||
publish(topic, command, 1);
|
||||
} catch (MqttException e) {
|
||||
System.err.println("Failed to send command to device " + deviceId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -127,3 +127,12 @@ xss:
|
||||
excludes: /system/notice
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
mqtt:
|
||||
broker.url: tcp://122.51.194.184:1883
|
||||
client.id: ems-cloud
|
||||
username: dmbroker
|
||||
password: qwer1234
|
||||
connection-timeout: 15
|
||||
keep-alive-interval: 30
|
||||
automatic-reconnect: true
|
@ -0,0 +1,34 @@
|
||||
package com.xzzn.common.constant;
|
||||
|
||||
/**
|
||||
* 数据存储 Redis key 常量
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
public class RedisKeyConstants
|
||||
{
|
||||
/**
|
||||
* pcs数据 redis key
|
||||
*/
|
||||
public static final String PCS = "PCS_";
|
||||
|
||||
/**
|
||||
* pcs branch数据 redis key
|
||||
*/
|
||||
public static final String BRANCH = "BRANCH_";
|
||||
|
||||
/**
|
||||
* stack电池堆数据 redis key
|
||||
*/
|
||||
public static final String STACK = "STACK_";
|
||||
|
||||
/**
|
||||
* cluster电池簇数据 redis key
|
||||
*/
|
||||
public static final String CLUSTER = "CLUSTER_";
|
||||
|
||||
/**
|
||||
* battery单体电池数据 redis key
|
||||
*/
|
||||
public static final String BATTERY = "BATTERY_";
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
package com.xzzn.common.core.controller;
|
||||
|
||||
import java.beans.PropertyEditorSupport;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import org.slf4j.Logger;
|
||||
@ -199,4 +201,35 @@ public class BaseController
|
||||
{
|
||||
return getLoginUser().getUsername();
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动处理分页
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
protected TableDataInfo getDataTable2(List<?> list)
|
||||
{
|
||||
List<?> subList = new ArrayList<>();
|
||||
// 分页梳理
|
||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||
int pageNum = pageDomain.getPageNum();
|
||||
int pageSize = pageDomain.getPageSize();
|
||||
if (pageNum > 0 && pageSize > 0) {
|
||||
// 计算分页起始和结束索引
|
||||
int startIndex = (pageNum - 1) * pageSize;
|
||||
int endIndex = Math.min(startIndex + pageSize, list.size());
|
||||
// 防止越界
|
||||
if (startIndex >= list.size()) {
|
||||
subList = Collections.emptyList();
|
||||
}
|
||||
// 截取当前页数据
|
||||
subList = list.subList(startIndex, endIndex);
|
||||
}
|
||||
|
||||
TableDataInfo rspData = new TableDataInfo();
|
||||
rspData.setCode(HttpStatus.SUCCESS);
|
||||
rspData.setMsg("查询成功");
|
||||
rspData.setRows(subList);
|
||||
rspData.setTotal(list.size());
|
||||
return rspData;
|
||||
}
|
||||
}
|
||||
|
@ -265,4 +265,15 @@ public class RedisCache
|
||||
{
|
||||
return redisTemplate.keys(pattern);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除list
|
||||
*
|
||||
* @param key Redis键
|
||||
* @return 对象列表
|
||||
*/
|
||||
public boolean deleteList(final String key)
|
||||
{
|
||||
return redisTemplate.delete(key);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,30 @@
|
||||
package com.xzzn.common.enums;
|
||||
|
||||
/**
|
||||
* alarm-告警等级
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
public enum AlarmLevelStatus
|
||||
{
|
||||
WARNING("A", "提示"), GENERAL("B", "一般"), SERIOUS("C", "严重"), EMERGENCY("D", "紧急");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
AlarmLevelStatus(String code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo()
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.xzzn.common.enums;
|
||||
|
||||
/**
|
||||
* alarm-告警状态
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
public enum AlarmStatus
|
||||
{
|
||||
WAITING("0", "待处理"), DONE("1", "已处理"),PROCESSING("2", "处理中");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
AlarmStatus(String code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo()
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.xzzn.common.enums;
|
||||
|
||||
/**
|
||||
* ammeter-电表数据类别
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
public enum AmmeterCategoryStatus
|
||||
{
|
||||
TOTAL_CHARGE("1", "累计充电量"), TOTAL_DISCHARGE("2", "累计放电量"), DAILY_CHARGE("3", "日充电量"), DAILY_DISCHARGE("4", "日放电量");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
AmmeterCategoryStatus(String code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo()
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.xzzn.common.enums;
|
||||
|
||||
/**
|
||||
* pcs-branch-支路状态
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
public enum BranchStatus
|
||||
{
|
||||
STANDBY("0", "备用"), NORMAL("1", "正常"), SWITCHING("2", "切换中");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
BranchStatus(String code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo()
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.xzzn.common.enums;
|
||||
|
||||
/**
|
||||
* 充电状态&放电状态
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
public enum ChargeStatus
|
||||
{
|
||||
CHARGING("1", "充电"), STANDBY("2", "待机"), DISCHARGING("3", "放电");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
ChargeStatus(String code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo()
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.xzzn.common.enums;
|
||||
|
||||
/**
|
||||
* device-通信状态
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
public enum CommunicationStatus
|
||||
{
|
||||
OK("0", "正常"), SUSPEND("1", "通信中断") ,EXCEPTION("1", "异常");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
CommunicationStatus(String code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo()
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.xzzn.common.enums;
|
||||
|
||||
/**
|
||||
* pcs-控制模式
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
public enum ControlModeStatus
|
||||
{
|
||||
REMOTE("0", "远程"), LOCAL("1", "本地");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
ControlModeStatus(String code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo()
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.xzzn.common.enums;
|
||||
|
||||
/**
|
||||
* device-设备类别
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
public enum DeviceCategory
|
||||
{
|
||||
PCS("PCS", "PCS设备"),
|
||||
BRANCH("BRANCH", "PCS分支设备"),
|
||||
STACK("STACK", "电池堆"),
|
||||
CLUSTER("CLUSTER", "电池簇"),
|
||||
BATTERY("BATTERY", "单体电池"),
|
||||
AMMETER("AMMETER", "电表");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
DeviceCategory(String code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo()
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.xzzn.common.enums;
|
||||
|
||||
/**
|
||||
* pcs-设备状态
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
public enum DeviceStatus
|
||||
{
|
||||
ONLINE("0", "在线"), OFFLINE("1", "离线"), UNDER_REPAIR("2", "维修中");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
DeviceStatus(String code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo()
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.xzzn.common.enums;
|
||||
|
||||
/**
|
||||
* device-设备类型
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
|
||||
public enum DeviceType
|
||||
{
|
||||
/**
|
||||
* 网络设备
|
||||
*/
|
||||
TCP,
|
||||
|
||||
/**
|
||||
* 串口设备
|
||||
*/
|
||||
RTU
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.xzzn.common.enums;
|
||||
|
||||
/**
|
||||
* pcs-并网状态
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
public enum GridStatus
|
||||
{
|
||||
GRID("0", "并网"), NOTGRID("1", "未并网");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
GridStatus(String code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo()
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.xzzn.common.enums;
|
||||
|
||||
/**
|
||||
* strategy-策略状态
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
public enum StrategyStatus
|
||||
{
|
||||
NOT_ENABLED("0", "未启用"), RUNNING("1", "已运行"),SUSPENDED("2", "已暂停"), DISABLE("1", "禁用"),DELETE("2", "删除");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
StrategyStatus(String code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo()
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.xzzn.common.enums;
|
||||
|
||||
/**
|
||||
* pcs-开关状态
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
public enum SwitchStatus
|
||||
{
|
||||
CLOSED("0", "闭合"), DISCONNECT("1", "断开"), FAULT_DISCONNECT("2", "故障断开");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
SwitchStatus(String code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo()
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.xzzn.common.enums;
|
||||
|
||||
/**
|
||||
* pcs-工作状态
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
public enum WorkStatus
|
||||
{
|
||||
NORMAL("0", "正常"), ABNORMAL("1", "异常"), STOP("2", "停止");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
WorkStatus(String code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo()
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
@ -8,6 +8,7 @@ import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
|
||||
@ -188,4 +189,15 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
||||
ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault());
|
||||
return Date.from(zdt.toInstant());
|
||||
}
|
||||
|
||||
public static Long getNowMonthLong() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
long month = (long) calendar.get(Calendar.MONTH) + 1; // 月份从0开始,所以要加1
|
||||
return month;
|
||||
}
|
||||
public static Long getNowDayLong() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
long date = calendar.get(Calendar.DAY_OF_MONTH); // 月份从0开始,所以要加1
|
||||
return date;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.xzzn.common.utils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
@ -719,4 +720,35 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
public static BigDecimal getBigDecimal(Object s){
|
||||
BigDecimal result;
|
||||
try {
|
||||
result = new BigDecimal(s.toString());
|
||||
} catch (Exception e) {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Long getLong(Object s){
|
||||
Long result;
|
||||
try {
|
||||
result = Long.parseLong(s.toString());
|
||||
} catch (Exception e) {
|
||||
return Long.parseLong("0");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String getString(Object s){
|
||||
String result;
|
||||
try {
|
||||
result = String.valueOf(s);
|
||||
} catch (Exception e) {
|
||||
return "0";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
@ -46,7 +46,10 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.eclipse.paho</groupId>
|
||||
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
|
||||
</dependency>
|
||||
<!-- 获取系统信息 -->
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
|
@ -0,0 +1,31 @@
|
||||
package com.xzzn.framework.config;
|
||||
|
||||
import com.xzzn.framework.config.properties.MqttProperties;
|
||||
import org.eclipse.paho.client.mqttv3.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Configuration
|
||||
public class MqttConfig {
|
||||
private static final Logger logger = LoggerFactory.getLogger(MqttConfig.class);
|
||||
|
||||
@Resource
|
||||
private MqttProperties mqttProperties;
|
||||
@Bean
|
||||
public MqttConnectOptions mqttConnectOptions() {
|
||||
MqttConnectOptions options = new MqttConnectOptions();
|
||||
options.setServerURIs(new String[]{mqttProperties.getBrokerUrl()});
|
||||
if (!mqttProperties.getUsername().isEmpty()) options.setUserName(mqttProperties.getUsername());
|
||||
if (!mqttProperties.getPassword().isEmpty()) options.setPassword(mqttProperties.getPassword().toCharArray());
|
||||
options.setConnectionTimeout(mqttProperties.getConnectionTimeout());
|
||||
options.setKeepAliveInterval(mqttProperties.getKeepAliveInterval());
|
||||
options.setAutomaticReconnect(mqttProperties.isAutomaticReconnect());
|
||||
options.setCleanSession(true);
|
||||
return options;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
package com.xzzn.framework.config.properties;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class MqttProperties {
|
||||
@Value("${mqtt.broker.url}")
|
||||
private String brokerUrl;
|
||||
|
||||
@Value("${mqtt.client.id:}")
|
||||
private String clientId;
|
||||
|
||||
@Value("${mqtt.username:}")
|
||||
private String username;
|
||||
|
||||
@Value("${mqtt.password:}")
|
||||
private String password;
|
||||
|
||||
@Value("${mqtt.connection-timeout:10}")
|
||||
private int connectionTimeout;
|
||||
|
||||
@Value("${mqtt.keep-alive-interval:60}")
|
||||
private int keepAliveInterval;
|
||||
|
||||
@Value("${mqtt.automatic-reconnect:true}")
|
||||
private boolean automaticReconnect;
|
||||
|
||||
public String getBrokerUrl() {
|
||||
return brokerUrl;
|
||||
}
|
||||
|
||||
public void setBrokerUrl(String brokerUrl) {
|
||||
this.brokerUrl = brokerUrl;
|
||||
}
|
||||
|
||||
public String getClientId() {
|
||||
return clientId;
|
||||
}
|
||||
|
||||
public void setClientId(String clientId) {
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public int getConnectionTimeout() {
|
||||
return connectionTimeout;
|
||||
}
|
||||
|
||||
public void setConnectionTimeout(int connectionTimeout) {
|
||||
this.connectionTimeout = connectionTimeout;
|
||||
}
|
||||
|
||||
public int getKeepAliveInterval() {
|
||||
return keepAliveInterval;
|
||||
}
|
||||
|
||||
public void setKeepAliveInterval(int keepAliveInterval) {
|
||||
this.keepAliveInterval = keepAliveInterval;
|
||||
}
|
||||
|
||||
public boolean isAutomaticReconnect() {
|
||||
return automaticReconnect;
|
||||
}
|
||||
|
||||
public void setAutomaticReconnect(boolean automaticReconnect) {
|
||||
this.automaticReconnect = automaticReconnect;
|
||||
}
|
||||
}
|
@ -0,0 +1,155 @@
|
||||
package com.xzzn.framework.manager;
|
||||
|
||||
import org.eclipse.paho.client.mqttv3.*;
|
||||
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.context.SmartLifecycle;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@Component
|
||||
public class MqttLifecycleManager implements ApplicationRunner, SmartLifecycle, MqttCallback {
|
||||
|
||||
private final MqttConnectOptions connectOptions;
|
||||
private MqttClient mqttClient;
|
||||
private volatile boolean running = false;
|
||||
|
||||
// 存储订阅关系: topic -> (listener, qos)
|
||||
private final ConcurrentHashMap<String, SubscriptionInfo> subscriptions = new ConcurrentHashMap<>();
|
||||
|
||||
@Autowired
|
||||
public MqttLifecycleManager(MqttConnectOptions connectOptions) {
|
||||
this.connectOptions = connectOptions;
|
||||
}
|
||||
|
||||
// Spring Boot 启动完成后执行
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
if (running) return;
|
||||
|
||||
try {
|
||||
String clientId = connectOptions.getUserName() + "-" + System.currentTimeMillis();
|
||||
mqttClient = new MqttClient(
|
||||
connectOptions.getServerURIs()[0],
|
||||
clientId,
|
||||
new MemoryPersistence()
|
||||
);
|
||||
|
||||
mqttClient.setCallback(this);
|
||||
mqttClient.connect(connectOptions);
|
||||
|
||||
// 重连后自动重新订阅
|
||||
resubscribeAll();
|
||||
|
||||
running = true;
|
||||
System.out.println("MQTT client connected to: " + connectOptions.getServerURIs()[0]);
|
||||
} catch (MqttException e) {
|
||||
System.err.println("MQTT connection failed: " + e.getMessage());
|
||||
// 添加重试逻辑
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
if (mqttClient != null && mqttClient.isConnected()) {
|
||||
try {
|
||||
mqttClient.disconnect();
|
||||
mqttClient.close();
|
||||
} catch (MqttException e) {
|
||||
System.err.println("Error disconnecting MQTT client: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
running = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRunning() {
|
||||
return running;
|
||||
}
|
||||
|
||||
// MQTT 回调方法
|
||||
@Override
|
||||
public void connectionLost(Throwable cause) {
|
||||
System.err.println("MQTT connection lost: " + cause.getMessage());
|
||||
running = false;
|
||||
// 自动重连由 MqttConnectOptions 处理
|
||||
}
|
||||
|
||||
@Override
|
||||
public void messageArrived(String topic, MqttMessage message) throws Exception {
|
||||
SubscriptionInfo info = subscriptions.get(topic);
|
||||
if (info != null && info.getListener() != null) {
|
||||
info.getListener().messageArrived(topic, message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deliveryComplete(IMqttDeliveryToken token) {
|
||||
// 消息发布完成处理
|
||||
}
|
||||
|
||||
// 订阅方法
|
||||
public void subscribe(String topic, int qos, IMqttMessageListener listener) {
|
||||
try {
|
||||
if (mqttClient != null && mqttClient.isConnected()) {
|
||||
mqttClient.subscribe(topic, qos);
|
||||
}
|
||||
subscriptions.put(topic, new SubscriptionInfo(listener, qos));
|
||||
} catch (MqttException e) {
|
||||
System.err.println("Subscribe failed: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
// 发布方法
|
||||
public void publish(String topic, String payload, int qos) throws MqttException {
|
||||
if (mqttClient != null && mqttClient.isConnected()) {
|
||||
MqttMessage message = new MqttMessage(payload.getBytes());
|
||||
message.setQos(qos);
|
||||
mqttClient.publish(topic, message);
|
||||
} else {
|
||||
throw new MqttException(MqttException.REASON_CODE_CLIENT_NOT_CONNECTED);
|
||||
}
|
||||
}
|
||||
|
||||
// 重新订阅所有主题
|
||||
private void resubscribeAll() {
|
||||
if (mqttClient == null || !mqttClient.isConnected()) return;
|
||||
|
||||
subscriptions.forEach((topic, info) -> {
|
||||
try {
|
||||
mqttClient.subscribe(topic, info.getQos());
|
||||
} catch (MqttException e) {
|
||||
System.err.println("Resubscribe failed for topic: " + topic);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 订阅信息内部类
|
||||
private static class SubscriptionInfo {
|
||||
private final IMqttMessageListener listener;
|
||||
private final int qos;
|
||||
|
||||
public SubscriptionInfo(IMqttMessageListener listener, int qos) {
|
||||
this.listener = listener;
|
||||
this.qos = qos;
|
||||
}
|
||||
|
||||
public IMqttMessageListener getListener() {
|
||||
return listener;
|
||||
}
|
||||
|
||||
public int getQos() {
|
||||
return qos;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.xzzn.framework.web.service;
|
||||
|
||||
import org.eclipse.paho.client.mqttv3.MqttException;
|
||||
|
||||
public interface MqttPublisher {
|
||||
void publish(String topic, String message) throws MqttException;
|
||||
void publish(String topic, String message, int qos) throws MqttException;
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package com.xzzn.framework.web.service;
|
||||
|
||||
import org.eclipse.paho.client.mqttv3.IMqttMessageListener;
|
||||
|
||||
public interface MqttSubscriber {
|
||||
void subscribe(String topic, int qos, IMqttMessageListener listener);
|
||||
}
|
@ -11,7 +11,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* 告警记录对象 ems_alarm_records
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-17
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
public class EmsAlarmRecords extends BaseEntity
|
||||
{
|
||||
@ -48,11 +48,11 @@ public class EmsAlarmRecords extends BaseEntity
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private Long siteId;
|
||||
private String siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
@Excel(name = "设备唯一标识符")
|
||||
private Long deviceId;
|
||||
private String deviceId;
|
||||
|
||||
/** 设备名称,用于标识设备 */
|
||||
@Excel(name = "设备名称,用于标识设备")
|
||||
@ -128,22 +128,22 @@ public class EmsAlarmRecords extends BaseEntity
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setSiteId(Long siteId)
|
||||
public void setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public Long getSiteId()
|
||||
public String getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId)
|
||||
public void setDeviceId(String deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getDeviceId()
|
||||
public String getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
181
ems-system/src/main/java/com/xzzn/ems/domain/EmsAmmeterData.java
Normal file
181
ems-system/src/main/java/com/xzzn/ems/domain/EmsAmmeterData.java
Normal file
@ -0,0 +1,181 @@
|
||||
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_ammeter_data
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
public class EmsAmmeterData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 数据更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "数据更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date dataUpdateTime;
|
||||
|
||||
/** 类别 */
|
||||
@Excel(name = "类别")
|
||||
private String category;
|
||||
|
||||
/** 总 (kWh) */
|
||||
@Excel(name = "总 (kWh)")
|
||||
private BigDecimal totalKwh;
|
||||
|
||||
/** 尖 (kWh) */
|
||||
@Excel(name = "尖 (kWh)")
|
||||
private BigDecimal sharpKwh;
|
||||
|
||||
/** 峰 (kWh) */
|
||||
@Excel(name = "峰 (kWh)")
|
||||
private BigDecimal peakKwh;
|
||||
|
||||
/** 平 (kWh) */
|
||||
@Excel(name = "平 (kWh)")
|
||||
private BigDecimal flatKwh;
|
||||
|
||||
/** 谷 (kWh) */
|
||||
@Excel(name = "谷 (kWh)")
|
||||
private BigDecimal valleyKwh;
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private String siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
@Excel(name = "设备唯一标识符")
|
||||
private String deviceId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setDataUpdateTime(Date dataUpdateTime)
|
||||
{
|
||||
this.dataUpdateTime = dataUpdateTime;
|
||||
}
|
||||
|
||||
public Date getDataUpdateTime()
|
||||
{
|
||||
return dataUpdateTime;
|
||||
}
|
||||
|
||||
public void setCategory(String category)
|
||||
{
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getCategory()
|
||||
{
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setTotalKwh(BigDecimal totalKwh)
|
||||
{
|
||||
this.totalKwh = totalKwh;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalKwh()
|
||||
{
|
||||
return totalKwh;
|
||||
}
|
||||
|
||||
public void setSharpKwh(BigDecimal sharpKwh)
|
||||
{
|
||||
this.sharpKwh = sharpKwh;
|
||||
}
|
||||
|
||||
public BigDecimal getSharpKwh()
|
||||
{
|
||||
return sharpKwh;
|
||||
}
|
||||
|
||||
public void setPeakKwh(BigDecimal peakKwh)
|
||||
{
|
||||
this.peakKwh = peakKwh;
|
||||
}
|
||||
|
||||
public BigDecimal getPeakKwh()
|
||||
{
|
||||
return peakKwh;
|
||||
}
|
||||
|
||||
public void setFlatKwh(BigDecimal flatKwh)
|
||||
{
|
||||
this.flatKwh = flatKwh;
|
||||
}
|
||||
|
||||
public BigDecimal getFlatKwh()
|
||||
{
|
||||
return flatKwh;
|
||||
}
|
||||
|
||||
public void setValleyKwh(BigDecimal valleyKwh)
|
||||
{
|
||||
this.valleyKwh = valleyKwh;
|
||||
}
|
||||
|
||||
public BigDecimal getValleyKwh()
|
||||
{
|
||||
return valleyKwh;
|
||||
}
|
||||
|
||||
public void setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public String getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("dataUpdateTime", getDataUpdateTime())
|
||||
.append("category", getCategory())
|
||||
.append("totalKwh", getTotalKwh())
|
||||
.append("sharpKwh", getSharpKwh())
|
||||
.append("peakKwh", getPeakKwh())
|
||||
.append("flatKwh", getFlatKwh())
|
||||
.append("valleyKwh", getValleyKwh())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("siteId", getSiteId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* 电池簇数据对象 ems_battery_cluster
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-22
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
public class EmsBatteryCluster extends BaseEntity
|
||||
{
|
||||
@ -74,11 +74,143 @@ public class EmsBatteryCluster extends BaseEntity
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private Long siteId;
|
||||
private String siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
@Excel(name = "设备唯一标识符")
|
||||
private Long deviceId;
|
||||
private String deviceId;
|
||||
|
||||
/** 堆设备id */
|
||||
@Excel(name = "堆设备id")
|
||||
private String stackDeviceId;
|
||||
|
||||
/** 允许充电最大功率 */
|
||||
@Excel(name = "允许充电最大功率")
|
||||
private BigDecimal maxAllowedChargePower;
|
||||
|
||||
/** 允许放电最大功率 */
|
||||
@Excel(name = "允许放电最大功率")
|
||||
private BigDecimal maxAllowedDischargePower;
|
||||
|
||||
/** 允许充电最大电压 */
|
||||
@Excel(name = "允许充电最大电压")
|
||||
private BigDecimal maxAllowedChargeVoltage;
|
||||
|
||||
/** 允许放电最大电压 */
|
||||
@Excel(name = "允许放电最大电压")
|
||||
private BigDecimal maxAllowedDischargeVoltage;
|
||||
|
||||
/** 允许充电最大电流 */
|
||||
@Excel(name = "允许充电最大电流")
|
||||
private BigDecimal maxAllowedChargeCurrent;
|
||||
|
||||
/** 允许放电最大电流 */
|
||||
@Excel(name = "允许放电最大电流")
|
||||
private BigDecimal maxAllowedDischargeCurrent;
|
||||
|
||||
/** 组电压 */
|
||||
@Excel(name = "组电压")
|
||||
private BigDecimal batteryPackVoltage;
|
||||
|
||||
/** 组电流 */
|
||||
@Excel(name = "组电流")
|
||||
private BigDecimal batteryPackCurrent;
|
||||
|
||||
/** 模块温度 */
|
||||
@Excel(name = "模块温度")
|
||||
private BigDecimal batteryPackTemp;
|
||||
|
||||
/** 组SOC */
|
||||
@Excel(name = "组SOC")
|
||||
private BigDecimal batteryPackSoc;
|
||||
|
||||
/** 组SOH */
|
||||
@Excel(name = "组SOH")
|
||||
private BigDecimal batteryPackSoh;
|
||||
|
||||
/** 组绝缘电阻 */
|
||||
@Excel(name = "组绝缘电阻")
|
||||
private BigDecimal batteryPackInsulationResistance;
|
||||
|
||||
/** 平均单体电压 */
|
||||
@Excel(name = "平均单体电压")
|
||||
private BigDecimal avgCellVoltage;
|
||||
|
||||
/** 平均单体温度 */
|
||||
@Excel(name = "平均单体温度")
|
||||
private BigDecimal avgCellTemp;
|
||||
|
||||
/** 最高单体电压 */
|
||||
@Excel(name = "最高单体电压")
|
||||
private BigDecimal maxCellVoltage;
|
||||
|
||||
/** 最高单体电压对应点号 */
|
||||
@Excel(name = "最高单体电压对应点号")
|
||||
private Long maxCellVoltageId;
|
||||
|
||||
/** 最低单体电压 */
|
||||
@Excel(name = "最低单体电压")
|
||||
private BigDecimal minCellVoltage;
|
||||
|
||||
/** 最低单体电压对应点号 */
|
||||
@Excel(name = "最低单体电压对应点号")
|
||||
private Long minCellVoltageId;
|
||||
|
||||
/** 最高单体温度 */
|
||||
@Excel(name = "最高单体温度")
|
||||
private BigDecimal maxCellTemp;
|
||||
|
||||
/** 最高单体温度对应点号 */
|
||||
@Excel(name = "最高单体温度对应点号")
|
||||
private Long maxCellTempId;
|
||||
|
||||
/** 最低单体温度 */
|
||||
@Excel(name = "最低单体温度")
|
||||
private BigDecimal minCellTemp;
|
||||
|
||||
/** 最低单体温度对应点号 */
|
||||
@Excel(name = "最低单体温度对应点号")
|
||||
private Long minCellTempId;
|
||||
|
||||
/** 最高单体SOC */
|
||||
@Excel(name = "最高单体SOC")
|
||||
private BigDecimal maxCellSoc;
|
||||
|
||||
/** 最高单体SOC对应点号 */
|
||||
@Excel(name = "最高单体SOC对应点号")
|
||||
private Long maxCellSocId;
|
||||
|
||||
/** 最低单体SOC */
|
||||
@Excel(name = "最低单体SOC")
|
||||
private BigDecimal minCellSoc;
|
||||
|
||||
/** 最低单体SOC对应点号 */
|
||||
@Excel(name = "最低单体SOC对应点号")
|
||||
private Long minCellSocId;
|
||||
|
||||
/** 最高单体SOH */
|
||||
@Excel(name = "最高单体SOH")
|
||||
private BigDecimal maxCellSoh;
|
||||
|
||||
/** 最高单体SOH对应点号 */
|
||||
@Excel(name = "最高单体SOH对应点号")
|
||||
private Long maxCellSohId;
|
||||
|
||||
/** 最低单体SOH */
|
||||
@Excel(name = "最低单体SOH")
|
||||
private BigDecimal minCellSoh;
|
||||
|
||||
/** 最低单体SOH对应点号 */
|
||||
@Excel(name = "最低单体SOH对应点号")
|
||||
private Long minCellSohId;
|
||||
|
||||
/** 单次累计充电电量 */
|
||||
@Excel(name = "单次累计充电电量")
|
||||
private BigDecimal totalChargeEnergy;
|
||||
|
||||
/** 单次累计放电电量 */
|
||||
@Excel(name = "单次累计放电电量")
|
||||
private BigDecimal totalDischargeEnergy;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
@ -220,26 +352,356 @@ public class EmsBatteryCluster extends BaseEntity
|
||||
return currentSoc;
|
||||
}
|
||||
|
||||
public void setSiteId(Long siteId)
|
||||
public void setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public Long getSiteId()
|
||||
public String getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId)
|
||||
public void setDeviceId(String deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getDeviceId()
|
||||
public String getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setStackDeviceId(String stackDeviceId)
|
||||
{
|
||||
this.stackDeviceId = stackDeviceId;
|
||||
}
|
||||
|
||||
public String getStackDeviceId()
|
||||
{
|
||||
return stackDeviceId;
|
||||
}
|
||||
|
||||
public void setMaxAllowedChargePower(BigDecimal maxAllowedChargePower)
|
||||
{
|
||||
this.maxAllowedChargePower = maxAllowedChargePower;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxAllowedChargePower()
|
||||
{
|
||||
return maxAllowedChargePower;
|
||||
}
|
||||
|
||||
public void setMaxAllowedDischargePower(BigDecimal maxAllowedDischargePower)
|
||||
{
|
||||
this.maxAllowedDischargePower = maxAllowedDischargePower;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxAllowedDischargePower()
|
||||
{
|
||||
return maxAllowedDischargePower;
|
||||
}
|
||||
|
||||
public void setMaxAllowedChargeVoltage(BigDecimal maxAllowedChargeVoltage)
|
||||
{
|
||||
this.maxAllowedChargeVoltage = maxAllowedChargeVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxAllowedChargeVoltage()
|
||||
{
|
||||
return maxAllowedChargeVoltage;
|
||||
}
|
||||
|
||||
public void setMaxAllowedDischargeVoltage(BigDecimal maxAllowedDischargeVoltage)
|
||||
{
|
||||
this.maxAllowedDischargeVoltage = maxAllowedDischargeVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxAllowedDischargeVoltage()
|
||||
{
|
||||
return maxAllowedDischargeVoltage;
|
||||
}
|
||||
|
||||
public void setMaxAllowedChargeCurrent(BigDecimal maxAllowedChargeCurrent)
|
||||
{
|
||||
this.maxAllowedChargeCurrent = maxAllowedChargeCurrent;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxAllowedChargeCurrent()
|
||||
{
|
||||
return maxAllowedChargeCurrent;
|
||||
}
|
||||
|
||||
public void setMaxAllowedDischargeCurrent(BigDecimal maxAllowedDischargeCurrent)
|
||||
{
|
||||
this.maxAllowedDischargeCurrent = maxAllowedDischargeCurrent;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxAllowedDischargeCurrent()
|
||||
{
|
||||
return maxAllowedDischargeCurrent;
|
||||
}
|
||||
|
||||
public void setBatteryPackVoltage(BigDecimal batteryPackVoltage)
|
||||
{
|
||||
this.batteryPackVoltage = batteryPackVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getBatteryPackVoltage()
|
||||
{
|
||||
return batteryPackVoltage;
|
||||
}
|
||||
|
||||
public void setBatteryPackCurrent(BigDecimal batteryPackCurrent)
|
||||
{
|
||||
this.batteryPackCurrent = batteryPackCurrent;
|
||||
}
|
||||
|
||||
public BigDecimal getBatteryPackCurrent()
|
||||
{
|
||||
return batteryPackCurrent;
|
||||
}
|
||||
|
||||
public void setBatteryPackTemp(BigDecimal batteryPackTemp)
|
||||
{
|
||||
this.batteryPackTemp = batteryPackTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getBatteryPackTemp()
|
||||
{
|
||||
return batteryPackTemp;
|
||||
}
|
||||
|
||||
public void setBatteryPackSoc(BigDecimal batteryPackSoc)
|
||||
{
|
||||
this.batteryPackSoc = batteryPackSoc;
|
||||
}
|
||||
|
||||
public BigDecimal getBatteryPackSoc()
|
||||
{
|
||||
return batteryPackSoc;
|
||||
}
|
||||
|
||||
public void setBatteryPackSoh(BigDecimal batteryPackSoh)
|
||||
{
|
||||
this.batteryPackSoh = batteryPackSoh;
|
||||
}
|
||||
|
||||
public BigDecimal getBatteryPackSoh()
|
||||
{
|
||||
return batteryPackSoh;
|
||||
}
|
||||
|
||||
public void setBatteryPackInsulationResistance(BigDecimal batteryPackInsulationResistance)
|
||||
{
|
||||
this.batteryPackInsulationResistance = batteryPackInsulationResistance;
|
||||
}
|
||||
|
||||
public BigDecimal getBatteryPackInsulationResistance()
|
||||
{
|
||||
return batteryPackInsulationResistance;
|
||||
}
|
||||
|
||||
public void setAvgCellVoltage(BigDecimal avgCellVoltage)
|
||||
{
|
||||
this.avgCellVoltage = avgCellVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getAvgCellVoltage()
|
||||
{
|
||||
return avgCellVoltage;
|
||||
}
|
||||
|
||||
public void setAvgCellTemp(BigDecimal avgCellTemp)
|
||||
{
|
||||
this.avgCellTemp = avgCellTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getAvgCellTemp()
|
||||
{
|
||||
return avgCellTemp;
|
||||
}
|
||||
|
||||
public void setMaxCellVoltage(BigDecimal maxCellVoltage)
|
||||
{
|
||||
this.maxCellVoltage = maxCellVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxCellVoltage()
|
||||
{
|
||||
return maxCellVoltage;
|
||||
}
|
||||
|
||||
public void setMaxCellVoltageId(Long maxCellVoltageId)
|
||||
{
|
||||
this.maxCellVoltageId = maxCellVoltageId;
|
||||
}
|
||||
|
||||
public Long getMaxCellVoltageId()
|
||||
{
|
||||
return maxCellVoltageId;
|
||||
}
|
||||
|
||||
public void setMinCellVoltage(BigDecimal minCellVoltage)
|
||||
{
|
||||
this.minCellVoltage = minCellVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getMinCellVoltage()
|
||||
{
|
||||
return minCellVoltage;
|
||||
}
|
||||
|
||||
public void setMinCellVoltageId(Long minCellVoltageId)
|
||||
{
|
||||
this.minCellVoltageId = minCellVoltageId;
|
||||
}
|
||||
|
||||
public Long getMinCellVoltageId()
|
||||
{
|
||||
return minCellVoltageId;
|
||||
}
|
||||
|
||||
public void setMaxCellTemp(BigDecimal maxCellTemp)
|
||||
{
|
||||
this.maxCellTemp = maxCellTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxCellTemp()
|
||||
{
|
||||
return maxCellTemp;
|
||||
}
|
||||
|
||||
public void setMaxCellTempId(Long maxCellTempId)
|
||||
{
|
||||
this.maxCellTempId = maxCellTempId;
|
||||
}
|
||||
|
||||
public Long getMaxCellTempId()
|
||||
{
|
||||
return maxCellTempId;
|
||||
}
|
||||
|
||||
public void setMinCellTemp(BigDecimal minCellTemp)
|
||||
{
|
||||
this.minCellTemp = minCellTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getMinCellTemp()
|
||||
{
|
||||
return minCellTemp;
|
||||
}
|
||||
|
||||
public void setMinCellTempId(Long minCellTempId)
|
||||
{
|
||||
this.minCellTempId = minCellTempId;
|
||||
}
|
||||
|
||||
public Long getMinCellTempId()
|
||||
{
|
||||
return minCellTempId;
|
||||
}
|
||||
|
||||
public void setMaxCellSoc(BigDecimal maxCellSoc)
|
||||
{
|
||||
this.maxCellSoc = maxCellSoc;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxCellSoc()
|
||||
{
|
||||
return maxCellSoc;
|
||||
}
|
||||
|
||||
public void setMaxCellSocId(Long maxCellSocId)
|
||||
{
|
||||
this.maxCellSocId = maxCellSocId;
|
||||
}
|
||||
|
||||
public Long getMaxCellSocId()
|
||||
{
|
||||
return maxCellSocId;
|
||||
}
|
||||
|
||||
public void setMinCellSoc(BigDecimal minCellSoc)
|
||||
{
|
||||
this.minCellSoc = minCellSoc;
|
||||
}
|
||||
|
||||
public BigDecimal getMinCellSoc()
|
||||
{
|
||||
return minCellSoc;
|
||||
}
|
||||
|
||||
public void setMinCellSocId(Long minCellSocId)
|
||||
{
|
||||
this.minCellSocId = minCellSocId;
|
||||
}
|
||||
|
||||
public Long getMinCellSocId()
|
||||
{
|
||||
return minCellSocId;
|
||||
}
|
||||
|
||||
public void setMaxCellSoh(BigDecimal maxCellSoh)
|
||||
{
|
||||
this.maxCellSoh = maxCellSoh;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxCellSoh()
|
||||
{
|
||||
return maxCellSoh;
|
||||
}
|
||||
|
||||
public void setMaxCellSohId(Long maxCellSohId)
|
||||
{
|
||||
this.maxCellSohId = maxCellSohId;
|
||||
}
|
||||
|
||||
public Long getMaxCellSohId()
|
||||
{
|
||||
return maxCellSohId;
|
||||
}
|
||||
|
||||
public void setMinCellSoh(BigDecimal minCellSoh)
|
||||
{
|
||||
this.minCellSoh = minCellSoh;
|
||||
}
|
||||
|
||||
public BigDecimal getMinCellSoh()
|
||||
{
|
||||
return minCellSoh;
|
||||
}
|
||||
|
||||
public void setMinCellSohId(Long minCellSohId)
|
||||
{
|
||||
this.minCellSohId = minCellSohId;
|
||||
}
|
||||
|
||||
public Long getMinCellSohId()
|
||||
{
|
||||
return minCellSohId;
|
||||
}
|
||||
|
||||
public void setTotalChargeEnergy(BigDecimal totalChargeEnergy)
|
||||
{
|
||||
this.totalChargeEnergy = totalChargeEnergy;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalChargeEnergy()
|
||||
{
|
||||
return totalChargeEnergy;
|
||||
}
|
||||
|
||||
public void setTotalDischargeEnergy(BigDecimal totalDischargeEnergy)
|
||||
{
|
||||
this.totalDischargeEnergy = totalDischargeEnergy;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalDischargeEnergy()
|
||||
{
|
||||
return totalDischargeEnergy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
@ -264,6 +726,39 @@ public class EmsBatteryCluster extends BaseEntity
|
||||
.append("remark", getRemark())
|
||||
.append("siteId", getSiteId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("stackDeviceId", getStackDeviceId())
|
||||
.append("maxAllowedChargePower", getMaxAllowedChargePower())
|
||||
.append("maxAllowedDischargePower", getMaxAllowedDischargePower())
|
||||
.append("maxAllowedChargeVoltage", getMaxAllowedChargeVoltage())
|
||||
.append("maxAllowedDischargeVoltage", getMaxAllowedDischargeVoltage())
|
||||
.append("maxAllowedChargeCurrent", getMaxAllowedChargeCurrent())
|
||||
.append("maxAllowedDischargeCurrent", getMaxAllowedDischargeCurrent())
|
||||
.append("batteryPackVoltage", getBatteryPackVoltage())
|
||||
.append("batteryPackCurrent", getBatteryPackCurrent())
|
||||
.append("batteryPackTemp", getBatteryPackTemp())
|
||||
.append("batteryPackSoc", getBatteryPackSoc())
|
||||
.append("batteryPackSoh", getBatteryPackSoh())
|
||||
.append("batteryPackInsulationResistance", getBatteryPackInsulationResistance())
|
||||
.append("avgCellVoltage", getAvgCellVoltage())
|
||||
.append("avgCellTemp", getAvgCellTemp())
|
||||
.append("maxCellVoltage", getMaxCellVoltage())
|
||||
.append("maxCellVoltageId", getMaxCellVoltageId())
|
||||
.append("minCellVoltage", getMinCellVoltage())
|
||||
.append("minCellVoltageId", getMinCellVoltageId())
|
||||
.append("maxCellTemp", getMaxCellTemp())
|
||||
.append("maxCellTempId", getMaxCellTempId())
|
||||
.append("minCellTemp", getMinCellTemp())
|
||||
.append("minCellTempId", getMinCellTempId())
|
||||
.append("maxCellSoc", getMaxCellSoc())
|
||||
.append("maxCellSocId", getMaxCellSocId())
|
||||
.append("minCellSoc", getMinCellSoc())
|
||||
.append("minCellSocId", getMinCellSocId())
|
||||
.append("maxCellSoh", getMaxCellSoh())
|
||||
.append("maxCellSohId", getMaxCellSohId())
|
||||
.append("minCellSoh", getMinCellSoh())
|
||||
.append("minCellSohId", getMinCellSohId())
|
||||
.append("totalChargeEnergy", getTotalChargeEnergy())
|
||||
.append("totalDischargeEnergy", getTotalDischargeEnergy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* 单体电池实时数据对象 ems_battery_data
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-25
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
public class EmsBatteryData extends BaseEntity
|
||||
{
|
||||
@ -56,15 +56,15 @@ public class EmsBatteryData extends BaseEntity
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private Long siteId;
|
||||
private String siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
@Excel(name = "设备唯一标识符")
|
||||
private Long deviceId;
|
||||
private String deviceId;
|
||||
|
||||
/** 簇设备id */
|
||||
@Excel(name = "簇设备id")
|
||||
private Long clusterDeviceId;
|
||||
private String clusterDeviceId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
@ -156,32 +156,32 @@ public class EmsBatteryData extends BaseEntity
|
||||
return dataTimestamp;
|
||||
}
|
||||
|
||||
public void setSiteId(Long siteId)
|
||||
public void setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public Long getSiteId()
|
||||
public String getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId)
|
||||
public void setDeviceId(String deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getDeviceId()
|
||||
public String getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setClusterDeviceId(Long clusterDeviceId)
|
||||
public void setClusterDeviceId(String clusterDeviceId)
|
||||
{
|
||||
this.clusterDeviceId = clusterDeviceId;
|
||||
}
|
||||
|
||||
public Long getClusterDeviceId()
|
||||
public String getClusterDeviceId()
|
||||
{
|
||||
return clusterDeviceId;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* 电池堆数据对象 ems_battery_stack
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-22
|
||||
* @date 2025-07-02
|
||||
*/
|
||||
public class EmsBatteryStack extends BaseEntity
|
||||
{
|
||||
@ -20,65 +20,173 @@ public class EmsBatteryStack extends BaseEntity
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 工作状态 */
|
||||
@Excel(name = "工作状态")
|
||||
/** 工作状态:0-正常 1-异常 2-停止 */
|
||||
@Excel(name = "工作状态:0-正常 1-异常 2-停止")
|
||||
private String workStatus;
|
||||
|
||||
/** 与PCS通信状态 */
|
||||
@Excel(name = "与PCS通信状态")
|
||||
/** 与PCS通信状态:0-正常 1-通信中断 2-异常 */
|
||||
@Excel(name = "与PCS通信状态:0-正常 1-通信中断 2-异常")
|
||||
private String pcsCommunicationStatus;
|
||||
|
||||
/** 与EMS通信状态 */
|
||||
@Excel(name = "与EMS通信状态")
|
||||
/** 与EMS通信状态:0-正常 1-通信中断 2-异常 */
|
||||
@Excel(name = "与EMS通信状态:0-正常 1-通信中断 2-异常")
|
||||
private String emsCommunicationStatus;
|
||||
|
||||
/** 电池堆总电压 (V) */
|
||||
@Excel(name = "电池堆总电压 (V)")
|
||||
private BigDecimal totalVoltage;
|
||||
/** 电操状态 */
|
||||
@Excel(name = "电操状态")
|
||||
private String operationStatus;
|
||||
|
||||
/** 可充电量 (kWh) */
|
||||
@Excel(name = "可充电量 (kWh)")
|
||||
private BigDecimal chargeableCapacity;
|
||||
/** 电池堆电压/V */
|
||||
@Excel(name = "电池堆电压/V")
|
||||
private BigDecimal stackVoltage;
|
||||
|
||||
/** 累计充电量 (kWh) */
|
||||
@Excel(name = "累计充电量 (kWh)")
|
||||
private BigDecimal totalChargedCapacity;
|
||||
/** 电池堆电流/A */
|
||||
@Excel(name = "电池堆电流/A")
|
||||
private BigDecimal stackCurrent;
|
||||
|
||||
/** 电池堆总电流 (A) */
|
||||
@Excel(name = "电池堆总电流 (A)")
|
||||
private BigDecimal totalCurrent;
|
||||
/** 电池堆SOC/% */
|
||||
@Excel(name = "电池堆SOC/%")
|
||||
private BigDecimal stackSoc;
|
||||
|
||||
/** 可放电量 (kWh) */
|
||||
@Excel(name = "可放电量 (kWh)")
|
||||
private BigDecimal dischargeableCapacity;
|
||||
/** 电池堆SOH/% */
|
||||
@Excel(name = "电池堆SOH/%")
|
||||
private BigDecimal stackSoh;
|
||||
|
||||
/** 累计放电量 (kWh) */
|
||||
@Excel(name = "累计放电量 (kWh)")
|
||||
private BigDecimal totalDischargedCapacity;
|
||||
/** 最高电池电压/V */
|
||||
@Excel(name = "最高电池电压/V")
|
||||
private BigDecimal maxCellVoltage;
|
||||
|
||||
/** SOH (%) */
|
||||
@Excel(name = "SOH (%)")
|
||||
private BigDecimal soh;
|
||||
/** 最高电池电压组号 */
|
||||
@Excel(name = "最高电池电压组号")
|
||||
private Long maxVoltageGroupId;
|
||||
|
||||
/** 平均温度 (℃) */
|
||||
@Excel(name = "平均温度 (℃)")
|
||||
private BigDecimal averageTemperature;
|
||||
/** 高电压电池所在组中的点号 */
|
||||
@Excel(name = "高电压电池所在组中的点号")
|
||||
private Long maxVoltageCellId;
|
||||
|
||||
/** 绝缘电阻 (Ω) */
|
||||
@Excel(name = "绝缘电阻 (Ω)")
|
||||
private BigDecimal insulationResistance;
|
||||
/** 最低电池电压/V */
|
||||
@Excel(name = "最低电池电压/V")
|
||||
private BigDecimal minCellVoltage;
|
||||
|
||||
/** 当前SOC (%) */
|
||||
@Excel(name = "当前SOC (%)")
|
||||
private BigDecimal currentSoc;
|
||||
/** 最低电池电压组号 */
|
||||
@Excel(name = "最低电池电压组号")
|
||||
private Long minVoltageGroupId;
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private Long siteId;
|
||||
/** 最低电压电池所在组中的点号 */
|
||||
@Excel(name = "最低电压电池所在组中的点号")
|
||||
private Long minVoltageCellId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
@Excel(name = "设备唯一标识符")
|
||||
private Long deviceId;
|
||||
/** 最高电池温度/℃ */
|
||||
@Excel(name = "最高电池温度/℃")
|
||||
private BigDecimal maxCellTemp;
|
||||
|
||||
/** 最高温度电池组号 */
|
||||
@Excel(name = "最高温度电池组号")
|
||||
private Long maxTempGroupId;
|
||||
|
||||
/** 最高温度电池所在组中的点号 */
|
||||
@Excel(name = "最高温度电池所在组中的点号")
|
||||
private Long maxTempCellId;
|
||||
|
||||
/** 最低电池温度/℃ */
|
||||
@Excel(name = "最低电池温度/℃")
|
||||
private BigDecimal minCellTemp;
|
||||
|
||||
/** 最低电池温度组号 */
|
||||
@Excel(name = "最低电池温度组号")
|
||||
private Long minTempGroupId;
|
||||
|
||||
/** 最低温度电池所在组中的点号 */
|
||||
@Excel(name = "最低温度电池所在组中的点号")
|
||||
private Long minTempCellId;
|
||||
|
||||
/** 堆累计充电电量/kWh */
|
||||
@Excel(name = "堆累计充电电量/kWh")
|
||||
private BigDecimal totalChargeCapacity;
|
||||
|
||||
/** 堆累计放电电量/kWh */
|
||||
@Excel(name = "堆累计放电电量/kWh")
|
||||
private BigDecimal totalDischargeCapacity;
|
||||
|
||||
/** 堆单次累计充电电量/kWh */
|
||||
@Excel(name = "堆单次累计充电电量/kWh")
|
||||
private BigDecimal sessionChargeCapacity;
|
||||
|
||||
/** 堆单次累计放电电量/kWh */
|
||||
@Excel(name = "堆单次累计放电电量/kWh")
|
||||
private BigDecimal sessionDischargeCapacity;
|
||||
|
||||
/** 堆可充电量/kWh */
|
||||
@Excel(name = "堆可充电量/kWh")
|
||||
private BigDecimal availableChargeCapacity;
|
||||
|
||||
/** 堆可放电量/kWh */
|
||||
@Excel(name = "堆可放电量/kWh")
|
||||
private BigDecimal availableDischargeCapacity;
|
||||
|
||||
/** 可用放电时间/min */
|
||||
@Excel(name = "可用放电时间/min")
|
||||
private Long remainingDischargeTime;
|
||||
|
||||
/** 可用充电时间/min */
|
||||
@Excel(name = "可用充电时间/min")
|
||||
private Long remainingChargeTime;
|
||||
|
||||
/** 允许最大放电功率/kW */
|
||||
@Excel(name = "允许最大放电功率/kW")
|
||||
private BigDecimal maxDischargePower;
|
||||
|
||||
/** 允许最大充电功率/kW */
|
||||
@Excel(name = "允许最大充电功率/kW")
|
||||
private BigDecimal maxChargePower;
|
||||
|
||||
/** 允许最大放电电流/A */
|
||||
@Excel(name = "允许最大放电电流/A")
|
||||
private BigDecimal maxDischargeCurrent;
|
||||
|
||||
/** 允许最大充电电流/A */
|
||||
@Excel(name = "允许最大充电电流/A")
|
||||
private BigDecimal maxChargeCurrent;
|
||||
|
||||
/** 当天放电次数 */
|
||||
@Excel(name = "当天放电次数")
|
||||
private Long dailyDischargeCycles;
|
||||
|
||||
/** 当天充电次数 */
|
||||
@Excel(name = "当天充电次数")
|
||||
private Long dailyChargeCycles;
|
||||
|
||||
/** 当天放电电量/kWh */
|
||||
@Excel(name = "当天放电电量/kWh")
|
||||
private BigDecimal dailyDischargeCapacity;
|
||||
|
||||
/** 当天充电电量/kWh */
|
||||
@Excel(name = "当天充电电量/kWh")
|
||||
private BigDecimal dailyChargeCapacity;
|
||||
|
||||
/** 运行温度/℃ */
|
||||
@Excel(name = "运行温度/℃")
|
||||
private BigDecimal operatingTemp;
|
||||
|
||||
/** BMS堆当前状态 */
|
||||
@Excel(name = "BMS堆当前状态")
|
||||
private String bmsStatus;
|
||||
|
||||
/** BMS充放电状态 */
|
||||
@Excel(name = "BMS充放电状态")
|
||||
private String bmsChargeStatus;
|
||||
|
||||
/** 电池堆绝缘电阻/kΩ */
|
||||
@Excel(name = "电池堆绝缘电阻/kΩ")
|
||||
private BigDecimal stackInsulationResistance;
|
||||
|
||||
/** 站点 id */
|
||||
@Excel(name = "站点 id")
|
||||
private String siteId;
|
||||
|
||||
/** 设备id */
|
||||
@Excel(name = "设备id")
|
||||
private String deviceId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
@ -120,122 +228,392 @@ public class EmsBatteryStack extends BaseEntity
|
||||
return emsCommunicationStatus;
|
||||
}
|
||||
|
||||
public void setTotalVoltage(BigDecimal totalVoltage)
|
||||
public void setOperationStatus(String operationStatus)
|
||||
{
|
||||
this.totalVoltage = totalVoltage;
|
||||
this.operationStatus = operationStatus;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalVoltage()
|
||||
public String getOperationStatus()
|
||||
{
|
||||
return totalVoltage;
|
||||
return operationStatus;
|
||||
}
|
||||
|
||||
public void setChargeableCapacity(BigDecimal chargeableCapacity)
|
||||
public void setStackVoltage(BigDecimal stackVoltage)
|
||||
{
|
||||
this.chargeableCapacity = chargeableCapacity;
|
||||
this.stackVoltage = stackVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getChargeableCapacity()
|
||||
public BigDecimal getStackVoltage()
|
||||
{
|
||||
return chargeableCapacity;
|
||||
return stackVoltage;
|
||||
}
|
||||
|
||||
public void setTotalChargedCapacity(BigDecimal totalChargedCapacity)
|
||||
public void setStackCurrent(BigDecimal stackCurrent)
|
||||
{
|
||||
this.totalChargedCapacity = totalChargedCapacity;
|
||||
this.stackCurrent = stackCurrent;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalChargedCapacity()
|
||||
public BigDecimal getStackCurrent()
|
||||
{
|
||||
return totalChargedCapacity;
|
||||
return stackCurrent;
|
||||
}
|
||||
|
||||
public void setTotalCurrent(BigDecimal totalCurrent)
|
||||
public void setStackSoc(BigDecimal stackSoc)
|
||||
{
|
||||
this.totalCurrent = totalCurrent;
|
||||
this.stackSoc = stackSoc;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalCurrent()
|
||||
public BigDecimal getStackSoc()
|
||||
{
|
||||
return totalCurrent;
|
||||
return stackSoc;
|
||||
}
|
||||
|
||||
public void setDischargeableCapacity(BigDecimal dischargeableCapacity)
|
||||
public void setStackSoh(BigDecimal stackSoh)
|
||||
{
|
||||
this.dischargeableCapacity = dischargeableCapacity;
|
||||
this.stackSoh = stackSoh;
|
||||
}
|
||||
|
||||
public BigDecimal getDischargeableCapacity()
|
||||
public BigDecimal getStackSoh()
|
||||
{
|
||||
return dischargeableCapacity;
|
||||
return stackSoh;
|
||||
}
|
||||
|
||||
public void setTotalDischargedCapacity(BigDecimal totalDischargedCapacity)
|
||||
public void setMaxCellVoltage(BigDecimal maxCellVoltage)
|
||||
{
|
||||
this.totalDischargedCapacity = totalDischargedCapacity;
|
||||
this.maxCellVoltage = maxCellVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalDischargedCapacity()
|
||||
public BigDecimal getMaxCellVoltage()
|
||||
{
|
||||
return totalDischargedCapacity;
|
||||
return maxCellVoltage;
|
||||
}
|
||||
|
||||
public void setSoh(BigDecimal soh)
|
||||
public void setMaxVoltageGroupId(Long maxVoltageGroupId)
|
||||
{
|
||||
this.soh = soh;
|
||||
this.maxVoltageGroupId = maxVoltageGroupId;
|
||||
}
|
||||
|
||||
public BigDecimal getSoh()
|
||||
public Long getMaxVoltageGroupId()
|
||||
{
|
||||
return soh;
|
||||
return maxVoltageGroupId;
|
||||
}
|
||||
|
||||
public void setAverageTemperature(BigDecimal averageTemperature)
|
||||
public void setMaxVoltageCellId(Long maxVoltageCellId)
|
||||
{
|
||||
this.averageTemperature = averageTemperature;
|
||||
this.maxVoltageCellId = maxVoltageCellId;
|
||||
}
|
||||
|
||||
public BigDecimal getAverageTemperature()
|
||||
public Long getMaxVoltageCellId()
|
||||
{
|
||||
return averageTemperature;
|
||||
return maxVoltageCellId;
|
||||
}
|
||||
|
||||
public void setInsulationResistance(BigDecimal insulationResistance)
|
||||
public void setMinCellVoltage(BigDecimal minCellVoltage)
|
||||
{
|
||||
this.insulationResistance = insulationResistance;
|
||||
this.minCellVoltage = minCellVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getInsulationResistance()
|
||||
public BigDecimal getMinCellVoltage()
|
||||
{
|
||||
return insulationResistance;
|
||||
return minCellVoltage;
|
||||
}
|
||||
|
||||
public void setCurrentSoc(BigDecimal currentSoc)
|
||||
public void setMinVoltageGroupId(Long minVoltageGroupId)
|
||||
{
|
||||
this.currentSoc = currentSoc;
|
||||
this.minVoltageGroupId = minVoltageGroupId;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentSoc()
|
||||
public Long getMinVoltageGroupId()
|
||||
{
|
||||
return currentSoc;
|
||||
return minVoltageGroupId;
|
||||
}
|
||||
|
||||
public void setSiteId(Long siteId)
|
||||
public void setMinVoltageCellId(Long minVoltageCellId)
|
||||
{
|
||||
this.minVoltageCellId = minVoltageCellId;
|
||||
}
|
||||
|
||||
public Long getMinVoltageCellId()
|
||||
{
|
||||
return minVoltageCellId;
|
||||
}
|
||||
|
||||
public void setMaxCellTemp(BigDecimal maxCellTemp)
|
||||
{
|
||||
this.maxCellTemp = maxCellTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxCellTemp()
|
||||
{
|
||||
return maxCellTemp;
|
||||
}
|
||||
|
||||
public void setMaxTempGroupId(Long maxTempGroupId)
|
||||
{
|
||||
this.maxTempGroupId = maxTempGroupId;
|
||||
}
|
||||
|
||||
public Long getMaxTempGroupId()
|
||||
{
|
||||
return maxTempGroupId;
|
||||
}
|
||||
|
||||
public void setMaxTempCellId(Long maxTempCellId)
|
||||
{
|
||||
this.maxTempCellId = maxTempCellId;
|
||||
}
|
||||
|
||||
public Long getMaxTempCellId()
|
||||
{
|
||||
return maxTempCellId;
|
||||
}
|
||||
|
||||
public void setMinCellTemp(BigDecimal minCellTemp)
|
||||
{
|
||||
this.minCellTemp = minCellTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getMinCellTemp()
|
||||
{
|
||||
return minCellTemp;
|
||||
}
|
||||
|
||||
public void setMinTempGroupId(Long minTempGroupId)
|
||||
{
|
||||
this.minTempGroupId = minTempGroupId;
|
||||
}
|
||||
|
||||
public Long getMinTempGroupId()
|
||||
{
|
||||
return minTempGroupId;
|
||||
}
|
||||
|
||||
public void setMinTempCellId(Long minTempCellId)
|
||||
{
|
||||
this.minTempCellId = minTempCellId;
|
||||
}
|
||||
|
||||
public Long getMinTempCellId()
|
||||
{
|
||||
return minTempCellId;
|
||||
}
|
||||
|
||||
public void setTotalChargeCapacity(BigDecimal totalChargeCapacity)
|
||||
{
|
||||
this.totalChargeCapacity = totalChargeCapacity;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalChargeCapacity()
|
||||
{
|
||||
return totalChargeCapacity;
|
||||
}
|
||||
|
||||
public void setTotalDischargeCapacity(BigDecimal totalDischargeCapacity)
|
||||
{
|
||||
this.totalDischargeCapacity = totalDischargeCapacity;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalDischargeCapacity()
|
||||
{
|
||||
return totalDischargeCapacity;
|
||||
}
|
||||
|
||||
public void setSessionChargeCapacity(BigDecimal sessionChargeCapacity)
|
||||
{
|
||||
this.sessionChargeCapacity = sessionChargeCapacity;
|
||||
}
|
||||
|
||||
public BigDecimal getSessionChargeCapacity()
|
||||
{
|
||||
return sessionChargeCapacity;
|
||||
}
|
||||
|
||||
public void setSessionDischargeCapacity(BigDecimal sessionDischargeCapacity)
|
||||
{
|
||||
this.sessionDischargeCapacity = sessionDischargeCapacity;
|
||||
}
|
||||
|
||||
public BigDecimal getSessionDischargeCapacity()
|
||||
{
|
||||
return sessionDischargeCapacity;
|
||||
}
|
||||
|
||||
public void setAvailableChargeCapacity(BigDecimal availableChargeCapacity)
|
||||
{
|
||||
this.availableChargeCapacity = availableChargeCapacity;
|
||||
}
|
||||
|
||||
public BigDecimal getAvailableChargeCapacity()
|
||||
{
|
||||
return availableChargeCapacity;
|
||||
}
|
||||
|
||||
public void setAvailableDischargeCapacity(BigDecimal availableDischargeCapacity)
|
||||
{
|
||||
this.availableDischargeCapacity = availableDischargeCapacity;
|
||||
}
|
||||
|
||||
public BigDecimal getAvailableDischargeCapacity()
|
||||
{
|
||||
return availableDischargeCapacity;
|
||||
}
|
||||
|
||||
public void setRemainingDischargeTime(Long remainingDischargeTime)
|
||||
{
|
||||
this.remainingDischargeTime = remainingDischargeTime;
|
||||
}
|
||||
|
||||
public Long getRemainingDischargeTime()
|
||||
{
|
||||
return remainingDischargeTime;
|
||||
}
|
||||
|
||||
public void setRemainingChargeTime(Long remainingChargeTime)
|
||||
{
|
||||
this.remainingChargeTime = remainingChargeTime;
|
||||
}
|
||||
|
||||
public Long getRemainingChargeTime()
|
||||
{
|
||||
return remainingChargeTime;
|
||||
}
|
||||
|
||||
public void setMaxDischargePower(BigDecimal maxDischargePower)
|
||||
{
|
||||
this.maxDischargePower = maxDischargePower;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxDischargePower()
|
||||
{
|
||||
return maxDischargePower;
|
||||
}
|
||||
|
||||
public void setMaxChargePower(BigDecimal maxChargePower)
|
||||
{
|
||||
this.maxChargePower = maxChargePower;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxChargePower()
|
||||
{
|
||||
return maxChargePower;
|
||||
}
|
||||
|
||||
public void setMaxDischargeCurrent(BigDecimal maxDischargeCurrent)
|
||||
{
|
||||
this.maxDischargeCurrent = maxDischargeCurrent;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxDischargeCurrent()
|
||||
{
|
||||
return maxDischargeCurrent;
|
||||
}
|
||||
|
||||
public void setMaxChargeCurrent(BigDecimal maxChargeCurrent)
|
||||
{
|
||||
this.maxChargeCurrent = maxChargeCurrent;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxChargeCurrent()
|
||||
{
|
||||
return maxChargeCurrent;
|
||||
}
|
||||
|
||||
public void setDailyDischargeCycles(Long dailyDischargeCycles)
|
||||
{
|
||||
this.dailyDischargeCycles = dailyDischargeCycles;
|
||||
}
|
||||
|
||||
public Long getDailyDischargeCycles()
|
||||
{
|
||||
return dailyDischargeCycles;
|
||||
}
|
||||
|
||||
public void setDailyChargeCycles(Long dailyChargeCycles)
|
||||
{
|
||||
this.dailyChargeCycles = dailyChargeCycles;
|
||||
}
|
||||
|
||||
public Long getDailyChargeCycles()
|
||||
{
|
||||
return dailyChargeCycles;
|
||||
}
|
||||
|
||||
public void setDailyDischargeCapacity(BigDecimal dailyDischargeCapacity)
|
||||
{
|
||||
this.dailyDischargeCapacity = dailyDischargeCapacity;
|
||||
}
|
||||
|
||||
public BigDecimal getDailyDischargeCapacity()
|
||||
{
|
||||
return dailyDischargeCapacity;
|
||||
}
|
||||
|
||||
public void setDailyChargeCapacity(BigDecimal dailyChargeCapacity)
|
||||
{
|
||||
this.dailyChargeCapacity = dailyChargeCapacity;
|
||||
}
|
||||
|
||||
public BigDecimal getDailyChargeCapacity()
|
||||
{
|
||||
return dailyChargeCapacity;
|
||||
}
|
||||
|
||||
public void setOperatingTemp(BigDecimal operatingTemp)
|
||||
{
|
||||
this.operatingTemp = operatingTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getOperatingTemp()
|
||||
{
|
||||
return operatingTemp;
|
||||
}
|
||||
|
||||
public void setBmsStatus(String bmsStatus)
|
||||
{
|
||||
this.bmsStatus = bmsStatus;
|
||||
}
|
||||
|
||||
public String getBmsStatus()
|
||||
{
|
||||
return bmsStatus;
|
||||
}
|
||||
|
||||
public void setBmsChargeStatus(String bmsChargeStatus)
|
||||
{
|
||||
this.bmsChargeStatus = bmsChargeStatus;
|
||||
}
|
||||
|
||||
public String getBmsChargeStatus()
|
||||
{
|
||||
return bmsChargeStatus;
|
||||
}
|
||||
|
||||
public void setStackInsulationResistance(BigDecimal stackInsulationResistance)
|
||||
{
|
||||
this.stackInsulationResistance = stackInsulationResistance;
|
||||
}
|
||||
|
||||
public BigDecimal getStackInsulationResistance()
|
||||
{
|
||||
return stackInsulationResistance;
|
||||
}
|
||||
|
||||
public void setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public Long getSiteId()
|
||||
public String getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId)
|
||||
public void setDeviceId(String deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getDeviceId()
|
||||
public String getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
@ -247,23 +625,49 @@ public class EmsBatteryStack extends BaseEntity
|
||||
.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("operationStatus", getOperationStatus())
|
||||
.append("stackVoltage", getStackVoltage())
|
||||
.append("stackCurrent", getStackCurrent())
|
||||
.append("stackSoc", getStackSoc())
|
||||
.append("stackSoh", getStackSoh())
|
||||
.append("maxCellVoltage", getMaxCellVoltage())
|
||||
.append("maxVoltageGroupId", getMaxVoltageGroupId())
|
||||
.append("maxVoltageCellId", getMaxVoltageCellId())
|
||||
.append("minCellVoltage", getMinCellVoltage())
|
||||
.append("minVoltageGroupId", getMinVoltageGroupId())
|
||||
.append("minVoltageCellId", getMinVoltageCellId())
|
||||
.append("maxCellTemp", getMaxCellTemp())
|
||||
.append("maxTempGroupId", getMaxTempGroupId())
|
||||
.append("maxTempCellId", getMaxTempCellId())
|
||||
.append("minCellTemp", getMinCellTemp())
|
||||
.append("minTempGroupId", getMinTempGroupId())
|
||||
.append("minTempCellId", getMinTempCellId())
|
||||
.append("totalChargeCapacity", getTotalChargeCapacity())
|
||||
.append("totalDischargeCapacity", getTotalDischargeCapacity())
|
||||
.append("sessionChargeCapacity", getSessionChargeCapacity())
|
||||
.append("sessionDischargeCapacity", getSessionDischargeCapacity())
|
||||
.append("availableChargeCapacity", getAvailableChargeCapacity())
|
||||
.append("availableDischargeCapacity", getAvailableDischargeCapacity())
|
||||
.append("remainingDischargeTime", getRemainingDischargeTime())
|
||||
.append("remainingChargeTime", getRemainingChargeTime())
|
||||
.append("maxDischargePower", getMaxDischargePower())
|
||||
.append("maxChargePower", getMaxChargePower())
|
||||
.append("maxDischargeCurrent", getMaxDischargeCurrent())
|
||||
.append("maxChargeCurrent", getMaxChargeCurrent())
|
||||
.append("dailyDischargeCycles", getDailyDischargeCycles())
|
||||
.append("dailyChargeCycles", getDailyChargeCycles())
|
||||
.append("dailyDischargeCapacity", getDailyDischargeCapacity())
|
||||
.append("dailyChargeCapacity", getDailyChargeCapacity())
|
||||
.append("operatingTemp", getOperatingTemp())
|
||||
.append("bmsStatus", getBmsStatus())
|
||||
.append("bmsChargeStatus", getBmsChargeStatus())
|
||||
.append("stackInsulationResistance", getStackInsulationResistance())
|
||||
.append("siteId", getSiteId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -11,13 +11,13 @@ import com.xzzn.common.annotation.Excel;
|
||||
* 冷却系统参数对象 ems_cooling_data
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-25
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
public class EmsCoolingData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 系统名称,如1#液冷 */
|
||||
@ -58,11 +58,11 @@ public class EmsCoolingData extends BaseEntity
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private Long siteId;
|
||||
private String siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
@Excel(name = "设备唯一标识符")
|
||||
private Long deviceId;
|
||||
private String deviceId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
@ -164,22 +164,22 @@ public class EmsCoolingData extends BaseEntity
|
||||
return lowTempAlarmPoint;
|
||||
}
|
||||
|
||||
public void setSiteId(Long siteId)
|
||||
public void setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public Long getSiteId()
|
||||
public String getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId)
|
||||
public void setDeviceId(String deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getDeviceId()
|
||||
public String getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* Modbus设备配置对象 ems_devices_setting
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-24
|
||||
* @date 2025-07-02
|
||||
*/
|
||||
public class EmsDevicesSetting extends BaseEntity
|
||||
{
|
||||
@ -84,12 +84,24 @@ public class EmsDevicesSetting extends BaseEntity
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private Long siteId;
|
||||
private String siteId;
|
||||
|
||||
/** 通信状态 */
|
||||
@Excel(name = "通信状态")
|
||||
/** 通信状态:0-正常 1-通信中断 2-异常 */
|
||||
@Excel(name = "通信状态:0-正常 1-通信中断 2-异常")
|
||||
private String communicationStatus;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
@Excel(name = "设备唯一标识符")
|
||||
private String deviceId;
|
||||
|
||||
/** 上级设备id */
|
||||
@Excel(name = "上级设备id")
|
||||
private String parentId;
|
||||
|
||||
/** 设备类别,例如“STACK/CLUSTER/PCS等” */
|
||||
@Excel(name = "设备类别,例如“STACK/CLUSTER/PCS等”")
|
||||
private String deviceCategory;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
@ -250,12 +262,12 @@ public class EmsDevicesSetting extends BaseEntity
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setSiteId(Long siteId)
|
||||
public void setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public Long getSiteId()
|
||||
public String getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
@ -270,6 +282,36 @@ public class EmsDevicesSetting extends BaseEntity
|
||||
return communicationStatus;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getParentId()
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setDeviceCategory(String deviceCategory)
|
||||
{
|
||||
this.deviceCategory = deviceCategory;
|
||||
}
|
||||
|
||||
public String getDeviceCategory()
|
||||
{
|
||||
return deviceCategory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
@ -291,6 +333,9 @@ public class EmsDevicesSetting extends BaseEntity
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("siteId", getSiteId())
|
||||
.append("communicationStatus", getCommunicationStatus())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("parentId", getParentId())
|
||||
.append("deviceCategory", getDeviceCategory())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,71 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 ems_mqtt_message
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-27
|
||||
*/
|
||||
public class EmsMqttMessage extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String mqttTopic;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String mqttMessage;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setMqttTopic(String mqttTopic)
|
||||
{
|
||||
this.mqttTopic = mqttTopic;
|
||||
}
|
||||
|
||||
public String getMqttTopic()
|
||||
{
|
||||
return mqttTopic;
|
||||
}
|
||||
|
||||
public void setMqttMessage(String mqttMessage)
|
||||
{
|
||||
this.mqttMessage = mqttMessage;
|
||||
}
|
||||
|
||||
public String getMqttMessage()
|
||||
{
|
||||
return mqttMessage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("mqttTopic", getMqttTopic())
|
||||
.append("mqttMessage", getMqttMessage())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -11,13 +11,13 @@ import com.xzzn.common.annotation.Excel;
|
||||
* pcs支路数据对象 ems_pcs_branch_data
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-24
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
public class EmsPcsBranchData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 放电状态 */
|
||||
@ -38,15 +38,95 @@ public class EmsPcsBranchData extends BaseEntity
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private Long siteId;
|
||||
private String siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
@Excel(name = "设备唯一标识符")
|
||||
private Long deviceId;
|
||||
private String deviceId;
|
||||
|
||||
/** 支路id */
|
||||
@Excel(name = "支路id")
|
||||
private Long branchId;
|
||||
private String branchId;
|
||||
|
||||
/** 电网U相电压 */
|
||||
@Excel(name = "电网U相电压")
|
||||
private BigDecimal gridUVoltage;
|
||||
|
||||
/** 电网V相电压 */
|
||||
@Excel(name = "电网V相电压")
|
||||
private BigDecimal gridVVoltage;
|
||||
|
||||
/** 电网W相电压 */
|
||||
@Excel(name = "电网W相电压")
|
||||
private BigDecimal gridWVoltage;
|
||||
|
||||
/** 输出U相电流 */
|
||||
@Excel(name = "输出U相电流")
|
||||
private BigDecimal outputUCurrent;
|
||||
|
||||
/** 输出V相电流 */
|
||||
@Excel(name = "输出V相电流")
|
||||
private BigDecimal outputVCurrent;
|
||||
|
||||
/** 输出W相电流 */
|
||||
@Excel(name = "输出W相电流")
|
||||
private BigDecimal outputWCurrent;
|
||||
|
||||
/** 视在功率 */
|
||||
@Excel(name = "视在功率")
|
||||
private BigDecimal apparentPower;
|
||||
|
||||
/** 有功功率 */
|
||||
@Excel(name = "有功功率")
|
||||
private BigDecimal activePower;
|
||||
|
||||
/** 无功功率 */
|
||||
@Excel(name = "无功功率")
|
||||
private BigDecimal reactivePower;
|
||||
|
||||
/** 功率因数 */
|
||||
@Excel(name = "功率因数")
|
||||
private BigDecimal powerFactor;
|
||||
|
||||
/** 频率 */
|
||||
@Excel(name = "频率")
|
||||
private BigDecimal frequency;
|
||||
|
||||
/** 内部温度 */
|
||||
@Excel(name = "内部温度")
|
||||
private BigDecimal internalTemp;
|
||||
|
||||
/** U相IGBT温度 */
|
||||
@Excel(name = "U相IGBT温度")
|
||||
private BigDecimal uIgbtTemp;
|
||||
|
||||
/** V相IGBT温度 */
|
||||
@Excel(name = "V相IGBT温度")
|
||||
private BigDecimal vIgbtTemp;
|
||||
|
||||
/** W相IGBT温度 */
|
||||
@Excel(name = "W相IGBT温度")
|
||||
private BigDecimal wIgbtTemp;
|
||||
|
||||
/** 并离网状态 */
|
||||
@Excel(name = "并离网状态")
|
||||
private String gridStatus;
|
||||
|
||||
/** 可用功率 */
|
||||
@Excel(name = "可用功率")
|
||||
private BigDecimal availablePower;
|
||||
|
||||
/** 总负载比 */
|
||||
@Excel(name = "总负载比")
|
||||
private BigDecimal totalLoadRatio;
|
||||
|
||||
/** 交流漏电流 */
|
||||
@Excel(name = "交流漏电流")
|
||||
private BigDecimal acLeakageCurrent;
|
||||
|
||||
/** 绝缘阻抗 */
|
||||
@Excel(name = "绝缘阻抗")
|
||||
private BigDecimal insulationResistance;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
@ -98,36 +178,236 @@ public class EmsPcsBranchData extends BaseEntity
|
||||
return dcCurrent;
|
||||
}
|
||||
|
||||
public void setSiteId(Long siteId)
|
||||
public void setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public Long getSiteId()
|
||||
public String getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId)
|
||||
public void setDeviceId(String deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getDeviceId()
|
||||
public String getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setBranchId(Long branchId)
|
||||
public void setBranchId(String branchId)
|
||||
{
|
||||
this.branchId = branchId;
|
||||
}
|
||||
|
||||
public Long getBranchId()
|
||||
public String getBranchId()
|
||||
{
|
||||
return branchId;
|
||||
}
|
||||
|
||||
public void setGridUVoltage(BigDecimal gridUVoltage)
|
||||
{
|
||||
this.gridUVoltage = gridUVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getGridUVoltage()
|
||||
{
|
||||
return gridUVoltage;
|
||||
}
|
||||
|
||||
public void setGridVVoltage(BigDecimal gridVVoltage)
|
||||
{
|
||||
this.gridVVoltage = gridVVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getGridVVoltage()
|
||||
{
|
||||
return gridVVoltage;
|
||||
}
|
||||
|
||||
public void setGridWVoltage(BigDecimal gridWVoltage)
|
||||
{
|
||||
this.gridWVoltage = gridWVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getGridWVoltage()
|
||||
{
|
||||
return gridWVoltage;
|
||||
}
|
||||
|
||||
public void setOutputUCurrent(BigDecimal outputUCurrent)
|
||||
{
|
||||
this.outputUCurrent = outputUCurrent;
|
||||
}
|
||||
|
||||
public BigDecimal getOutputUCurrent()
|
||||
{
|
||||
return outputUCurrent;
|
||||
}
|
||||
|
||||
public void setOutputVCurrent(BigDecimal outputVCurrent)
|
||||
{
|
||||
this.outputVCurrent = outputVCurrent;
|
||||
}
|
||||
|
||||
public BigDecimal getOutputVCurrent()
|
||||
{
|
||||
return outputVCurrent;
|
||||
}
|
||||
|
||||
public void setOutputWCurrent(BigDecimal outputWCurrent)
|
||||
{
|
||||
this.outputWCurrent = outputWCurrent;
|
||||
}
|
||||
|
||||
public BigDecimal getOutputWCurrent()
|
||||
{
|
||||
return outputWCurrent;
|
||||
}
|
||||
|
||||
public void setApparentPower(BigDecimal apparentPower)
|
||||
{
|
||||
this.apparentPower = apparentPower;
|
||||
}
|
||||
|
||||
public BigDecimal getApparentPower()
|
||||
{
|
||||
return apparentPower;
|
||||
}
|
||||
|
||||
public void setActivePower(BigDecimal activePower)
|
||||
{
|
||||
this.activePower = activePower;
|
||||
}
|
||||
|
||||
public BigDecimal getActivePower()
|
||||
{
|
||||
return activePower;
|
||||
}
|
||||
|
||||
public void setReactivePower(BigDecimal reactivePower)
|
||||
{
|
||||
this.reactivePower = reactivePower;
|
||||
}
|
||||
|
||||
public BigDecimal getReactivePower()
|
||||
{
|
||||
return reactivePower;
|
||||
}
|
||||
|
||||
public void setPowerFactor(BigDecimal powerFactor)
|
||||
{
|
||||
this.powerFactor = powerFactor;
|
||||
}
|
||||
|
||||
public BigDecimal getPowerFactor()
|
||||
{
|
||||
return powerFactor;
|
||||
}
|
||||
|
||||
public void setFrequency(BigDecimal frequency)
|
||||
{
|
||||
this.frequency = frequency;
|
||||
}
|
||||
|
||||
public BigDecimal getFrequency()
|
||||
{
|
||||
return frequency;
|
||||
}
|
||||
|
||||
public void setInternalTemp(BigDecimal internalTemp)
|
||||
{
|
||||
this.internalTemp = internalTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getInternalTemp()
|
||||
{
|
||||
return internalTemp;
|
||||
}
|
||||
|
||||
public void setuIgbtTemp(BigDecimal uIgbtTemp)
|
||||
{
|
||||
this.uIgbtTemp = uIgbtTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getuIgbtTemp()
|
||||
{
|
||||
return uIgbtTemp;
|
||||
}
|
||||
|
||||
public void setvIgbtTemp(BigDecimal vIgbtTemp)
|
||||
{
|
||||
this.vIgbtTemp = vIgbtTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getvIgbtTemp()
|
||||
{
|
||||
return vIgbtTemp;
|
||||
}
|
||||
|
||||
public void setwIgbtTemp(BigDecimal wIgbtTemp)
|
||||
{
|
||||
this.wIgbtTemp = wIgbtTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getwIgbtTemp()
|
||||
{
|
||||
return wIgbtTemp;
|
||||
}
|
||||
|
||||
public void setGridStatus(String gridStatus)
|
||||
{
|
||||
this.gridStatus = gridStatus;
|
||||
}
|
||||
|
||||
public String getGridStatus()
|
||||
{
|
||||
return gridStatus;
|
||||
}
|
||||
|
||||
public void setAvailablePower(BigDecimal availablePower)
|
||||
{
|
||||
this.availablePower = availablePower;
|
||||
}
|
||||
|
||||
public BigDecimal getAvailablePower()
|
||||
{
|
||||
return availablePower;
|
||||
}
|
||||
|
||||
public void setTotalLoadRatio(BigDecimal totalLoadRatio)
|
||||
{
|
||||
this.totalLoadRatio = totalLoadRatio;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalLoadRatio()
|
||||
{
|
||||
return totalLoadRatio;
|
||||
}
|
||||
|
||||
public void setAcLeakageCurrent(BigDecimal acLeakageCurrent)
|
||||
{
|
||||
this.acLeakageCurrent = acLeakageCurrent;
|
||||
}
|
||||
|
||||
public BigDecimal getAcLeakageCurrent()
|
||||
{
|
||||
return acLeakageCurrent;
|
||||
}
|
||||
|
||||
public void setInsulationResistance(BigDecimal insulationResistance)
|
||||
{
|
||||
this.insulationResistance = insulationResistance;
|
||||
}
|
||||
|
||||
public BigDecimal getInsulationResistance()
|
||||
{
|
||||
return insulationResistance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
@ -144,6 +424,26 @@ public class EmsPcsBranchData extends BaseEntity
|
||||
.append("siteId", getSiteId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("branchId", getBranchId())
|
||||
.append("gridUVoltage", getGridUVoltage())
|
||||
.append("gridVVoltage", getGridVVoltage())
|
||||
.append("gridWVoltage", getGridWVoltage())
|
||||
.append("outputUCurrent", getOutputUCurrent())
|
||||
.append("outputVCurrent", getOutputVCurrent())
|
||||
.append("outputWCurrent", getOutputWCurrent())
|
||||
.append("apparentPower", getApparentPower())
|
||||
.append("activePower", getActivePower())
|
||||
.append("reactivePower", getReactivePower())
|
||||
.append("powerFactor", getPowerFactor())
|
||||
.append("frequency", getFrequency())
|
||||
.append("internalTemp", getInternalTemp())
|
||||
.append("uIgbtTemp", getuIgbtTemp())
|
||||
.append("vIgbtTemp", getvIgbtTemp())
|
||||
.append("wIgbtTemp", getwIgbtTemp())
|
||||
.append("gridStatus", getGridStatus())
|
||||
.append("availablePower", getAvailablePower())
|
||||
.append("totalLoadRatio", getTotalLoadRatio())
|
||||
.append("acLeakageCurrent", getAcLeakageCurrent())
|
||||
.append("insulationResistance", getInsulationResistance())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* PCS数据对象 ems_pcs_data
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-17
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
public class EmsPcsData extends BaseEntity
|
||||
{
|
||||
@ -22,7 +22,7 @@ public class EmsPcsData extends BaseEntity
|
||||
private Long id;
|
||||
|
||||
/** 数据更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "数据更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date dataUpdateTime;
|
||||
|
||||
@ -124,19 +124,71 @@ public class EmsPcsData extends BaseEntity
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private Long siteId;
|
||||
private String siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
@Excel(name = "设备唯一标识符")
|
||||
private Long deviceId;
|
||||
private String deviceId;
|
||||
|
||||
/** 月 */
|
||||
@Excel(name = "月")
|
||||
private int dateMonth;
|
||||
private Long dateMonth;
|
||||
|
||||
/** 日 */
|
||||
@Excel(name = "日")
|
||||
private int dateDay;
|
||||
private Long dateDay;
|
||||
|
||||
/** 总交流充电量 (kWh) */
|
||||
@Excel(name = "总交流充电量 (kWh)")
|
||||
private BigDecimal totalAcChargeEnergy;
|
||||
|
||||
/** 总交流放电量 (kWh) */
|
||||
@Excel(name = "总交流放电量 (kWh)")
|
||||
private BigDecimal totalAcDischargeEnergy;
|
||||
|
||||
/** 交流侧充电有功功率 */
|
||||
@Excel(name = "交流侧充电有功功率")
|
||||
private BigDecimal acChargeActivePower;
|
||||
|
||||
/** 交流侧容性无功功率 */
|
||||
@Excel(name = "交流侧容性无功功率")
|
||||
private BigDecimal acCapacitiveReactivePower;
|
||||
|
||||
/** 交流侧放电有功功率 */
|
||||
@Excel(name = "交流侧放电有功功率")
|
||||
private BigDecimal acDischargeActivePower;
|
||||
|
||||
/** 交流侧感性无功功率 */
|
||||
@Excel(name = "交流侧感性无功功率")
|
||||
private BigDecimal acInductiveReactivePower;
|
||||
|
||||
/** 最大容性无功能力 */
|
||||
@Excel(name = "最大容性无功能力")
|
||||
private BigDecimal maxCapacitivePowerCapacity;
|
||||
|
||||
/** 最大感性无功能力 */
|
||||
@Excel(name = "最大感性无功能力")
|
||||
private BigDecimal maxInductivePowerCapacity;
|
||||
|
||||
/** 最大可冲功率 */
|
||||
@Excel(name = "最大可冲功率")
|
||||
private BigDecimal maxChargePowerCapacity;
|
||||
|
||||
/** 最大可放功率 */
|
||||
@Excel(name = "最大可放功率")
|
||||
private BigDecimal maxDischargePowerCapacity;
|
||||
|
||||
/** 交流开关状态 */
|
||||
@Excel(name = "交流开关状态")
|
||||
private String acSwitchStatus;
|
||||
|
||||
/** 直流开关状态 */
|
||||
@Excel(name = "直流开关状态")
|
||||
private String dcSwitchStatus;
|
||||
|
||||
/** 远程投退状态 */
|
||||
@Excel(name = "远程投退状态")
|
||||
private String remoteControlStatus;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
@ -398,40 +450,174 @@ public class EmsPcsData extends BaseEntity
|
||||
return dcCurrent;
|
||||
}
|
||||
|
||||
public void setSiteId(Long siteId)
|
||||
public void setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public Long getSiteId()
|
||||
public String getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId)
|
||||
public void setDeviceId(String deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getDeviceId()
|
||||
public String getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public int getDateMonth() {
|
||||
return dateMonth;
|
||||
}
|
||||
|
||||
public void setDateMonth(int dateMonth) {
|
||||
public void setDateMonth(Long dateMonth)
|
||||
{
|
||||
this.dateMonth = dateMonth;
|
||||
}
|
||||
|
||||
public int getDateDay() {
|
||||
public Long getDateMonth()
|
||||
{
|
||||
return dateMonth;
|
||||
}
|
||||
|
||||
public void setDateDay(Long dateDay)
|
||||
{
|
||||
this.dateDay = dateDay;
|
||||
}
|
||||
|
||||
public Long getDateDay()
|
||||
{
|
||||
return dateDay;
|
||||
}
|
||||
|
||||
public void setDateDay(int dateDay) {
|
||||
this.dateDay = dateDay;
|
||||
public void setTotalAcChargeEnergy(BigDecimal totalAcChargeEnergy)
|
||||
{
|
||||
this.totalAcChargeEnergy = totalAcChargeEnergy;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalAcChargeEnergy()
|
||||
{
|
||||
return totalAcChargeEnergy;
|
||||
}
|
||||
|
||||
public void setTotalAcDischargeEnergy(BigDecimal totalAcDischargeEnergy)
|
||||
{
|
||||
this.totalAcDischargeEnergy = totalAcDischargeEnergy;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalAcDischargeEnergy()
|
||||
{
|
||||
return totalAcDischargeEnergy;
|
||||
}
|
||||
|
||||
public void setAcChargeActivePower(BigDecimal acChargeActivePower)
|
||||
{
|
||||
this.acChargeActivePower = acChargeActivePower;
|
||||
}
|
||||
|
||||
public BigDecimal getAcChargeActivePower()
|
||||
{
|
||||
return acChargeActivePower;
|
||||
}
|
||||
|
||||
public void setAcCapacitiveReactivePower(BigDecimal acCapacitiveReactivePower)
|
||||
{
|
||||
this.acCapacitiveReactivePower = acCapacitiveReactivePower;
|
||||
}
|
||||
|
||||
public BigDecimal getAcCapacitiveReactivePower()
|
||||
{
|
||||
return acCapacitiveReactivePower;
|
||||
}
|
||||
|
||||
public void setAcDischargeActivePower(BigDecimal acDischargeActivePower)
|
||||
{
|
||||
this.acDischargeActivePower = acDischargeActivePower;
|
||||
}
|
||||
|
||||
public BigDecimal getAcDischargeActivePower()
|
||||
{
|
||||
return acDischargeActivePower;
|
||||
}
|
||||
|
||||
public void setAcInductiveReactivePower(BigDecimal acInductiveReactivePower)
|
||||
{
|
||||
this.acInductiveReactivePower = acInductiveReactivePower;
|
||||
}
|
||||
|
||||
public BigDecimal getAcInductiveReactivePower()
|
||||
{
|
||||
return acInductiveReactivePower;
|
||||
}
|
||||
|
||||
public void setMaxCapacitivePowerCapacity(BigDecimal maxCapacitivePowerCapacity)
|
||||
{
|
||||
this.maxCapacitivePowerCapacity = maxCapacitivePowerCapacity;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxCapacitivePowerCapacity()
|
||||
{
|
||||
return maxCapacitivePowerCapacity;
|
||||
}
|
||||
|
||||
public void setMaxInductivePowerCapacity(BigDecimal maxInductivePowerCapacity)
|
||||
{
|
||||
this.maxInductivePowerCapacity = maxInductivePowerCapacity;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxInductivePowerCapacity()
|
||||
{
|
||||
return maxInductivePowerCapacity;
|
||||
}
|
||||
|
||||
public void setMaxChargePowerCapacity(BigDecimal maxChargePowerCapacity)
|
||||
{
|
||||
this.maxChargePowerCapacity = maxChargePowerCapacity;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxChargePowerCapacity()
|
||||
{
|
||||
return maxChargePowerCapacity;
|
||||
}
|
||||
|
||||
public void setMaxDischargePowerCapacity(BigDecimal maxDischargePowerCapacity)
|
||||
{
|
||||
this.maxDischargePowerCapacity = maxDischargePowerCapacity;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxDischargePowerCapacity()
|
||||
{
|
||||
return maxDischargePowerCapacity;
|
||||
}
|
||||
|
||||
public void setAcSwitchStatus(String acSwitchStatus)
|
||||
{
|
||||
this.acSwitchStatus = acSwitchStatus;
|
||||
}
|
||||
|
||||
public String getAcSwitchStatus()
|
||||
{
|
||||
return acSwitchStatus;
|
||||
}
|
||||
|
||||
public void setDcSwitchStatus(String dcSwitchStatus)
|
||||
{
|
||||
this.dcSwitchStatus = dcSwitchStatus;
|
||||
}
|
||||
|
||||
public String getDcSwitchStatus()
|
||||
{
|
||||
return dcSwitchStatus;
|
||||
}
|
||||
|
||||
public void setRemoteControlStatus(String remoteControlStatus)
|
||||
{
|
||||
this.remoteControlStatus = remoteControlStatus;
|
||||
}
|
||||
|
||||
public String getRemoteControlStatus()
|
||||
{
|
||||
return remoteControlStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -472,7 +658,19 @@ public class EmsPcsData extends BaseEntity
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("dateMonth", getDateMonth())
|
||||
.append("dateDay", getDateDay())
|
||||
.append("totalAcChargeEnergy", getTotalAcChargeEnergy())
|
||||
.append("totalAcDischargeEnergy", getTotalAcDischargeEnergy())
|
||||
.append("acChargeActivePower", getAcChargeActivePower())
|
||||
.append("acCapacitiveReactivePower", getAcCapacitiveReactivePower())
|
||||
.append("acDischargeActivePower", getAcDischargeActivePower())
|
||||
.append("acInductiveReactivePower", getAcInductiveReactivePower())
|
||||
.append("maxCapacitivePowerCapacity", getMaxCapacitivePowerCapacity())
|
||||
.append("maxInductivePowerCapacity", getMaxInductivePowerCapacity())
|
||||
.append("maxChargePowerCapacity", getMaxChargePowerCapacity())
|
||||
.append("maxDischargePowerCapacity", getMaxDischargePowerCapacity())
|
||||
.append("acSwitchStatus", getAcSwitchStatus())
|
||||
.append("dcSwitchStatus", getDcSwitchStatus())
|
||||
.append("remoteControlStatus", getRemoteControlStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* 站点对象 ems_site_setting
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-20
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
public class EmsSiteSetting extends BaseEntity
|
||||
{
|
||||
@ -30,8 +30,8 @@ public class EmsSiteSetting extends BaseEntity
|
||||
private String siteAddress;
|
||||
|
||||
/** 运营时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "运营时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "运营时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date runningTime;
|
||||
|
||||
/** 纬度 */
|
||||
@ -50,6 +50,10 @@ public class EmsSiteSetting extends BaseEntity
|
||||
@Excel(name = "装机功率")
|
||||
private BigDecimal installPower;
|
||||
|
||||
/** 站点id */
|
||||
@Excel(name = "站点id")
|
||||
private String siteId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
@ -130,6 +134,16 @@ public class EmsSiteSetting extends BaseEntity
|
||||
return installPower;
|
||||
}
|
||||
|
||||
public void setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public String getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
@ -146,6 +160,7 @@ public class EmsSiteSetting extends BaseEntity
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("siteId", getSiteId())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 单站监控-故障告警请求
|
||||
*
|
||||
*/
|
||||
public class AlarmRecordListRequestVo {
|
||||
/** 站点id */
|
||||
private String siteId;
|
||||
|
||||
/** 设备类型 */
|
||||
private String deviceType;
|
||||
|
||||
/** 告警等级 */
|
||||
private String alarmLevel;
|
||||
|
||||
/** 告警发生时间 */
|
||||
private String alarmStartTime;
|
||||
|
||||
/** 告警结束时间 */
|
||||
private String alarmEndTime;
|
||||
|
||||
public String getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setSiteId(String siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public String getDeviceType() {
|
||||
return deviceType;
|
||||
}
|
||||
|
||||
public void setDeviceType(String deviceType) {
|
||||
this.deviceType = deviceType;
|
||||
}
|
||||
|
||||
public String getAlarmLevel() {
|
||||
return alarmLevel;
|
||||
}
|
||||
|
||||
public void setAlarmLevel(String alarmLevel) {
|
||||
this.alarmLevel = alarmLevel;
|
||||
}
|
||||
|
||||
public String getAlarmStartTime() {
|
||||
return alarmStartTime;
|
||||
}
|
||||
|
||||
public void setAlarmStartTime(String alarmStartTime) {
|
||||
this.alarmStartTime = alarmStartTime;
|
||||
}
|
||||
|
||||
public String getAlarmEndTime() {
|
||||
return alarmEndTime;
|
||||
}
|
||||
|
||||
public void setAlarmEndTime(String alarmEndTime) {
|
||||
this.alarmEndTime = alarmEndTime;
|
||||
}
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
|
||||
import com.xzzn.common.annotation.Excel;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 单站监控-故障告警返回
|
||||
*
|
||||
*/
|
||||
public class AlarmRecordListResponseVo {
|
||||
/** 设备名称 */
|
||||
private String deviceName;
|
||||
|
||||
/** 告警等级 */
|
||||
private String alarmLevel;
|
||||
|
||||
/** 告警内容 */
|
||||
private String alarmContent;
|
||||
|
||||
/** 告警发生时间 */
|
||||
private Date alarmStartTime;
|
||||
|
||||
/** 告警结束时间 */
|
||||
private Date alarmEndTime;
|
||||
|
||||
/** 状态 */
|
||||
private String status;
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getAlarmLevel() {
|
||||
return alarmLevel;
|
||||
}
|
||||
|
||||
public void setAlarmLevel(String alarmLevel) {
|
||||
this.alarmLevel = alarmLevel;
|
||||
}
|
||||
|
||||
public String getAlarmContent() {
|
||||
return alarmContent;
|
||||
}
|
||||
|
||||
public void setAlarmContent(String alarmContent) {
|
||||
this.alarmContent = alarmContent;
|
||||
}
|
||||
|
||||
public Date getAlarmStartTime() {
|
||||
return alarmStartTime;
|
||||
}
|
||||
|
||||
public void setAlarmStartTime(Date alarmStartTime) {
|
||||
this.alarmStartTime = alarmStartTime;
|
||||
}
|
||||
|
||||
public Date getAlarmEndTime() {
|
||||
return alarmEndTime;
|
||||
}
|
||||
|
||||
public void setAlarmEndTime(Date alarmEndTime) {
|
||||
this.alarmEndTime = alarmEndTime;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 电表详细数据
|
||||
*/
|
||||
public class AmmeterDataDetailInfo
|
||||
{
|
||||
/** 类别 */
|
||||
private String category;
|
||||
|
||||
/** 总 (kWh) */
|
||||
private BigDecimal totalKwh;
|
||||
|
||||
/** 尖 (kWh) */
|
||||
private BigDecimal sharpKwh;
|
||||
|
||||
/** 峰 (kWh) */
|
||||
private BigDecimal peakKwh;
|
||||
|
||||
/** 平 (kWh) */
|
||||
private BigDecimal flatKwh;
|
||||
|
||||
/** 谷 (kWh) */
|
||||
private BigDecimal valleyKwh;
|
||||
|
||||
/** 总表设备Id */
|
||||
private String deviceId;
|
||||
|
||||
/** 数据更新时间 */
|
||||
private Date updateTime;
|
||||
|
||||
public BigDecimal getValleyKwh() {
|
||||
return valleyKwh;
|
||||
}
|
||||
|
||||
public void setValleyKwh(BigDecimal valleyKwh) {
|
||||
this.valleyKwh = valleyKwh;
|
||||
}
|
||||
|
||||
public BigDecimal getFlatKwh() {
|
||||
return flatKwh;
|
||||
}
|
||||
|
||||
public void setFlatKwh(BigDecimal flatKwh) {
|
||||
this.flatKwh = flatKwh;
|
||||
}
|
||||
|
||||
public BigDecimal getPeakKwh() {
|
||||
return peakKwh;
|
||||
}
|
||||
|
||||
public void setPeakKwh(BigDecimal peakKwh) {
|
||||
this.peakKwh = peakKwh;
|
||||
}
|
||||
|
||||
public BigDecimal getSharpKwh() {
|
||||
return sharpKwh;
|
||||
}
|
||||
|
||||
public void setSharpKwh(BigDecimal sharpKwh) {
|
||||
this.sharpKwh = sharpKwh;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalKwh() {
|
||||
return totalKwh;
|
||||
}
|
||||
|
||||
public void setTotalKwh(BigDecimal totalKwh) {
|
||||
this.totalKwh = totalKwh;
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 电表数据
|
||||
*/
|
||||
public class AmmeterDataVo {
|
||||
|
||||
/** 电表名称 */
|
||||
private String deviceName;
|
||||
|
||||
/** 通信状态 */
|
||||
private String emsCommunicationStatus;
|
||||
|
||||
/** 数据更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date dataUpdateTime;
|
||||
|
||||
private List<AmmeterDataDetailInfo> ammeterDataDetailInfos;
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getEmsCommunicationStatus() {
|
||||
return emsCommunicationStatus;
|
||||
}
|
||||
|
||||
public void setEmsCommunicationStatus(String emsCommunicationStatus) {
|
||||
this.emsCommunicationStatus = emsCommunicationStatus;
|
||||
}
|
||||
|
||||
public Date getDataUpdateTime() {
|
||||
return dataUpdateTime;
|
||||
}
|
||||
|
||||
public void setDataUpdateTime(Date dataUpdateTime) {
|
||||
this.dataUpdateTime = dataUpdateTime;
|
||||
}
|
||||
|
||||
public List<AmmeterDataDetailInfo> getAmmeterDataDetailInfos() {
|
||||
return ammeterDataDetailInfos;
|
||||
}
|
||||
|
||||
public void setAmmeterDataDetailInfos(List<AmmeterDataDetailInfo> ammeterDataDetailInfos) {
|
||||
this.ammeterDataDetailInfos = ammeterDataDetailInfos;
|
||||
}
|
||||
}
|
@ -18,13 +18,13 @@ public class BMSBatteryClusterDataList {
|
||||
private BigDecimal minData;
|
||||
|
||||
/** 单体最小值ID */
|
||||
private Long minDataID;
|
||||
private String minDataID;
|
||||
|
||||
/** 单体最大值 */
|
||||
private BigDecimal maxData;
|
||||
|
||||
/** 单体最大值ID */
|
||||
private Long maxDataID;
|
||||
private String maxDataID;
|
||||
|
||||
public String getDataName() {
|
||||
return dataName;
|
||||
@ -50,11 +50,11 @@ public class BMSBatteryClusterDataList {
|
||||
this.minData = minData;
|
||||
}
|
||||
|
||||
public Long getMinDataID() {
|
||||
public String getMinDataID() {
|
||||
return minDataID;
|
||||
}
|
||||
|
||||
public void setMinDataID(Long minDataID) {
|
||||
public void setMinDataID(String minDataID) {
|
||||
this.minDataID = minDataID;
|
||||
}
|
||||
|
||||
@ -66,11 +66,11 @@ public class BMSBatteryClusterDataList {
|
||||
this.maxData = maxData;
|
||||
}
|
||||
|
||||
public Long getMaxDataID() {
|
||||
public String getMaxDataID() {
|
||||
return maxDataID;
|
||||
}
|
||||
|
||||
public void setMaxDataID(Long maxDataID) {
|
||||
public void setMaxDataID(String maxDataID) {
|
||||
this.maxDataID = maxDataID;
|
||||
}
|
||||
}
|
||||
|
@ -52,10 +52,10 @@ public class BMSBatteryClusterVo {
|
||||
private BigDecimal currentSoc;
|
||||
|
||||
/** 站点id */
|
||||
private Long siteId;
|
||||
private String siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
private Long deviceId;
|
||||
private String deviceId;
|
||||
|
||||
private List<BMSBatteryClusterDataList> batteryDataList;
|
||||
|
||||
@ -171,19 +171,19 @@ public class BMSBatteryClusterVo {
|
||||
this.currentSoc = currentSoc;
|
||||
}
|
||||
|
||||
public Long getSiteId() {
|
||||
public String getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setSiteId(Long siteId) {
|
||||
public void setSiteId(String siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public Long getDeviceId() {
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId) {
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ public class BMSBatteryDataList {
|
||||
/**
|
||||
* 簇号
|
||||
*/
|
||||
private Long clusterId;
|
||||
private String clusterId;
|
||||
|
||||
/** 簇电压 (V) */
|
||||
private BigDecimal clusterVoltage;
|
||||
@ -33,16 +33,16 @@ public class BMSBatteryDataList {
|
||||
private BigDecimal minTemperature;
|
||||
|
||||
/** 换电站id */
|
||||
private Long siteId;
|
||||
private String siteId;
|
||||
|
||||
/** 堆id */
|
||||
private Long stackDeviceId;
|
||||
private String stackDeviceId;
|
||||
|
||||
public Long getClusterId() {
|
||||
public String getClusterId() {
|
||||
return clusterId;
|
||||
}
|
||||
|
||||
public void setClusterId(Long clusterId) {
|
||||
public void setClusterId(String clusterId) {
|
||||
this.clusterId = clusterId;
|
||||
}
|
||||
|
||||
|
@ -22,40 +22,40 @@ public class BMSOverViewVo {
|
||||
private String emsCommunicationStatus;
|
||||
|
||||
/** 电池堆总电压 (V) */
|
||||
private BigDecimal totalVoltage;
|
||||
private BigDecimal stackVoltage;
|
||||
|
||||
/** 可充电量 (kWh) */
|
||||
private BigDecimal chargeableCapacity;
|
||||
private BigDecimal availableChargeCapacity;
|
||||
|
||||
/** 累计充电量 (kWh) */
|
||||
private BigDecimal totalChargedCapacity;
|
||||
private BigDecimal totalChargeCapacity;
|
||||
|
||||
/** 电池堆总电流 (A) */
|
||||
private BigDecimal totalCurrent;
|
||||
private BigDecimal stackCurrent;
|
||||
|
||||
/** 可放电量 (kWh) */
|
||||
private BigDecimal dischargeableCapacity;
|
||||
private BigDecimal availableDischargeCapacity;
|
||||
|
||||
/** 累计放电量 (kWh) */
|
||||
private BigDecimal totalDischargedCapacity;
|
||||
private BigDecimal totalDischargeCapacity;
|
||||
|
||||
/** SOH (%) */
|
||||
private BigDecimal soh;
|
||||
private BigDecimal stackSoh;
|
||||
|
||||
/** 平均温度 (℃) */
|
||||
private BigDecimal averageTemperature;
|
||||
private BigDecimal operatingTemp;
|
||||
|
||||
/** 绝缘电阻 (Ω) */
|
||||
private BigDecimal insulationResistance;
|
||||
private BigDecimal stackInsulationResistance;
|
||||
|
||||
/** 当前SOC (%) */
|
||||
private BigDecimal currentSoc;
|
||||
private BigDecimal stackSoc;
|
||||
|
||||
/** 站点id */
|
||||
private Long siteId;
|
||||
private String siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
private Long deviceId;
|
||||
private String deviceId;
|
||||
|
||||
private List<BMSBatteryDataList> batteryDataList;
|
||||
|
||||
@ -91,102 +91,102 @@ public class BMSOverViewVo {
|
||||
this.emsCommunicationStatus = emsCommunicationStatus;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalVoltage() {
|
||||
return totalVoltage;
|
||||
public BigDecimal getStackVoltage() {
|
||||
return stackVoltage;
|
||||
}
|
||||
|
||||
public void setTotalVoltage(BigDecimal totalVoltage) {
|
||||
this.totalVoltage = totalVoltage;
|
||||
public void setStackVoltage(BigDecimal stackVoltage) {
|
||||
this.stackVoltage = stackVoltage;
|
||||
}
|
||||
|
||||
public BigDecimal getChargeableCapacity() {
|
||||
return chargeableCapacity;
|
||||
public BigDecimal getAvailableChargeCapacity() {
|
||||
return availableChargeCapacity;
|
||||
}
|
||||
|
||||
public void setChargeableCapacity(BigDecimal chargeableCapacity) {
|
||||
this.chargeableCapacity = chargeableCapacity;
|
||||
public void setAvailableChargeCapacity(BigDecimal availableChargeCapacity) {
|
||||
this.availableChargeCapacity = availableChargeCapacity;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalChargedCapacity() {
|
||||
return totalChargedCapacity;
|
||||
public BigDecimal getTotalChargeCapacity() {
|
||||
return totalChargeCapacity;
|
||||
}
|
||||
|
||||
public void setTotalChargedCapacity(BigDecimal totalChargedCapacity) {
|
||||
this.totalChargedCapacity = totalChargedCapacity;
|
||||
public void setTotalChargeCapacity(BigDecimal totalChargeCapacity) {
|
||||
this.totalChargeCapacity = totalChargeCapacity;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalCurrent() {
|
||||
return totalCurrent;
|
||||
public BigDecimal getStackCurrent() {
|
||||
return stackCurrent;
|
||||
}
|
||||
|
||||
public void setTotalCurrent(BigDecimal totalCurrent) {
|
||||
this.totalCurrent = totalCurrent;
|
||||
public void setStackCurrent(BigDecimal stackCurrent) {
|
||||
this.stackCurrent = stackCurrent;
|
||||
}
|
||||
|
||||
public BigDecimal getDischargeableCapacity() {
|
||||
return dischargeableCapacity;
|
||||
public BigDecimal getAvailableDischargeCapacity() {
|
||||
return availableDischargeCapacity;
|
||||
}
|
||||
|
||||
public void setDischargeableCapacity(BigDecimal dischargeableCapacity) {
|
||||
this.dischargeableCapacity = dischargeableCapacity;
|
||||
public void setAvailableDischargeCapacity(BigDecimal availableDischargeCapacity) {
|
||||
this.availableDischargeCapacity = availableDischargeCapacity;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalDischargedCapacity() {
|
||||
return totalDischargedCapacity;
|
||||
public BigDecimal getTotalDischargeCapacity() {
|
||||
return totalDischargeCapacity;
|
||||
}
|
||||
|
||||
public void setTotalDischargedCapacity(BigDecimal totalDischargedCapacity) {
|
||||
this.totalDischargedCapacity = totalDischargedCapacity;
|
||||
public void setTotalDischargeCapacity(BigDecimal totalDischargeCapacity) {
|
||||
this.totalDischargeCapacity = totalDischargeCapacity;
|
||||
}
|
||||
|
||||
public BigDecimal getSoh() {
|
||||
return soh;
|
||||
public BigDecimal getStackSoh() {
|
||||
return stackSoh;
|
||||
}
|
||||
|
||||
public void setSoh(BigDecimal soh) {
|
||||
this.soh = soh;
|
||||
public void setStackSoh(BigDecimal stackSoh) {
|
||||
this.stackSoh = stackSoh;
|
||||
}
|
||||
|
||||
public BigDecimal getAverageTemperature() {
|
||||
return averageTemperature;
|
||||
public BigDecimal getOperatingTemp() {
|
||||
return operatingTemp;
|
||||
}
|
||||
|
||||
public void setAverageTemperature(BigDecimal averageTemperature) {
|
||||
this.averageTemperature = averageTemperature;
|
||||
public void setOperatingTemp(BigDecimal operatingTemp) {
|
||||
this.operatingTemp = operatingTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getInsulationResistance() {
|
||||
return insulationResistance;
|
||||
public BigDecimal getStackInsulationResistance() {
|
||||
return stackInsulationResistance;
|
||||
}
|
||||
|
||||
public void setInsulationResistance(BigDecimal insulationResistance) {
|
||||
this.insulationResistance = insulationResistance;
|
||||
public void setStackInsulationResistance(BigDecimal stackInsulationResistance) {
|
||||
this.stackInsulationResistance = stackInsulationResistance;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrentSoc() {
|
||||
return currentSoc;
|
||||
public BigDecimal getStackSoc() {
|
||||
return stackSoc;
|
||||
}
|
||||
|
||||
public void setCurrentSoc(BigDecimal currentSoc) {
|
||||
this.currentSoc = currentSoc;
|
||||
public void setStackSoc(BigDecimal stackSoc) {
|
||||
this.stackSoc = stackSoc;
|
||||
}
|
||||
|
||||
public Long getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getSiteId() {
|
||||
public String getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setSiteId(Long siteId) {
|
||||
public void setSiteId(String siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public List<BMSBatteryDataList> getBatteryDataList() {
|
||||
return batteryDataList;
|
||||
}
|
||||
|
@ -8,10 +8,10 @@ import java.math.BigDecimal;
|
||||
public class BatteryClusterDataDetailVo {
|
||||
|
||||
/** 设备id */
|
||||
private Long siteId;
|
||||
private String siteId;
|
||||
|
||||
/** 电池簇id */
|
||||
private Long clusterId;
|
||||
private String clusterId;
|
||||
|
||||
/** 电压平均值 */
|
||||
private BigDecimal avgVoltage;
|
||||
@ -40,19 +40,19 @@ public class BatteryClusterDataDetailVo {
|
||||
/** soc最小值 */
|
||||
private BigDecimal minSoc;
|
||||
|
||||
public Long getSiteId() {
|
||||
public String getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setSiteId(Long siteId) {
|
||||
public void setSiteId(String siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public Long getClusterId() {
|
||||
public String getClusterId() {
|
||||
return clusterId;
|
||||
}
|
||||
|
||||
public void setClusterId(Long clusterId) {
|
||||
public void setClusterId(String clusterId) {
|
||||
this.clusterId = clusterId;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,89 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 单站监控-单体电池数据
|
||||
*
|
||||
*/
|
||||
public class BatteryDataStatsListVo {
|
||||
/** 单体电池设备id */
|
||||
private String deviceId;
|
||||
|
||||
/** 电压 (V) */
|
||||
private BigDecimal voltage;
|
||||
|
||||
/** 温度 (℃) */
|
||||
private BigDecimal temperature;
|
||||
|
||||
/** SOC (%) */
|
||||
private BigDecimal soc;
|
||||
|
||||
/** SOH (%) */
|
||||
private BigDecimal soh;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date dataTimestamp;
|
||||
|
||||
/** 簇号 */
|
||||
private String clusterDeviceId;
|
||||
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public BigDecimal getVoltage() {
|
||||
return voltage;
|
||||
}
|
||||
|
||||
public void setVoltage(BigDecimal voltage) {
|
||||
this.voltage = voltage;
|
||||
}
|
||||
|
||||
public BigDecimal getTemperature() {
|
||||
return temperature;
|
||||
}
|
||||
|
||||
public void setTemperature(BigDecimal temperature) {
|
||||
this.temperature = temperature;
|
||||
}
|
||||
|
||||
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 Date getDataTimestamp() {
|
||||
return dataTimestamp;
|
||||
}
|
||||
|
||||
public void setDataTimestamp(Date dataTimestamp) {
|
||||
this.dataTimestamp = dataTimestamp;
|
||||
}
|
||||
|
||||
public String getClusterDeviceId() {
|
||||
return clusterDeviceId;
|
||||
}
|
||||
|
||||
public void setClusterDeviceId(String clusterDeviceId) {
|
||||
this.clusterDeviceId = clusterDeviceId;
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 入参-时间
|
||||
*
|
||||
*/
|
||||
public class DateSearchRequest {
|
||||
|
||||
/** 开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date startDate;
|
||||
|
||||
/** 结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date endDate;
|
||||
|
||||
private String siteId;
|
||||
|
||||
public Date getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setStartDate(Date startDate) {
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public Date getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Date endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setSiteId(String siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 概率统计-电量指标返回
|
||||
*
|
||||
*/
|
||||
public class ElectricDataInfoVo {
|
||||
|
||||
/**
|
||||
* 总充电量
|
||||
*/
|
||||
private BigDecimal totalChargedCap;
|
||||
|
||||
/**
|
||||
* 总放电量
|
||||
*/
|
||||
private BigDecimal totalDisChargedCap;
|
||||
|
||||
/**
|
||||
* 综合效率 = 放电量/充电量
|
||||
*/
|
||||
private BigDecimal efficiency;
|
||||
|
||||
/**
|
||||
* 按天放电统计
|
||||
*/
|
||||
private List<SiteMonitorDataVo> sevenDayDisChargeStats;
|
||||
|
||||
public BigDecimal getTotalChargedCap() {
|
||||
return totalChargedCap;
|
||||
}
|
||||
|
||||
public void setTotalChargedCap(BigDecimal totalChargedCap) {
|
||||
this.totalChargedCap = totalChargedCap;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalDisChargedCap() {
|
||||
return totalDisChargedCap;
|
||||
}
|
||||
|
||||
public void setTotalDisChargedCap(BigDecimal totalDisChargedCap) {
|
||||
this.totalDisChargedCap = totalDisChargedCap;
|
||||
}
|
||||
|
||||
public BigDecimal getEfficiency() {
|
||||
return efficiency;
|
||||
}
|
||||
|
||||
public void setEfficiency(BigDecimal efficiency) {
|
||||
this.efficiency = efficiency;
|
||||
}
|
||||
|
||||
public List<SiteMonitorDataVo> getSevenDayDisChargeStats() {
|
||||
return sevenDayDisChargeStats;
|
||||
}
|
||||
|
||||
public void setSevenDayDisChargeStats(List<SiteMonitorDataVo> sevenDayDisChargeStats) {
|
||||
this.sevenDayDisChargeStats = sevenDayDisChargeStats;
|
||||
}
|
||||
}
|
@ -25,13 +25,13 @@ public class PcsBranchInfo
|
||||
private BigDecimal dcCurrent;
|
||||
|
||||
/** 站点id */
|
||||
private Long siteId;
|
||||
private String siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
private Long deviceId;
|
||||
private String deviceId;
|
||||
|
||||
/** 支路id */
|
||||
private Long branchId;
|
||||
private String branchId;
|
||||
|
||||
public String getDischargeStatus() {
|
||||
return dischargeStatus;
|
||||
@ -65,27 +65,27 @@ public class PcsBranchInfo
|
||||
this.dcCurrent = dcCurrent;
|
||||
}
|
||||
|
||||
public Long getSiteId() {
|
||||
public String getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setSiteId(Long siteId) {
|
||||
public void setSiteId(String siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public Long getDeviceId() {
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId) {
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getBranchId() {
|
||||
public String getBranchId() {
|
||||
return branchId;
|
||||
}
|
||||
|
||||
public void setBranchId(Long branchId) {
|
||||
public void setBranchId(String branchId) {
|
||||
this.branchId = branchId;
|
||||
}
|
||||
}
|
||||
|
@ -81,29 +81,29 @@ public class PcsDetailInfoVo {
|
||||
private BigDecimal acFrequency;
|
||||
|
||||
/** 站点id */
|
||||
private Long siteId;
|
||||
private String siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
private Long deviceId;
|
||||
private String deviceId;
|
||||
|
||||
/** 设备名称 */
|
||||
private String deviceName;
|
||||
|
||||
private List<PcsBranchInfo> pcsBranchInfoList;
|
||||
|
||||
public Long getDeviceId() {
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId) {
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getSiteId() {
|
||||
public String getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setSiteId(Long siteId) {
|
||||
public void setSiteId(String siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
|
@ -51,12 +51,12 @@ public class SingleSiteBaseInfo {
|
||||
/**
|
||||
* 装机功率(MW)
|
||||
*/
|
||||
private BigDecimal installedPower;
|
||||
private BigDecimal installPower;
|
||||
|
||||
/**
|
||||
* 装机容量(MW)
|
||||
*/
|
||||
private BigDecimal installedCap;
|
||||
private BigDecimal installCapacity;
|
||||
|
||||
/**
|
||||
* 七天放电统计
|
||||
@ -79,20 +79,20 @@ public class SingleSiteBaseInfo {
|
||||
this.dayChargedCap = dayChargedCap;
|
||||
}
|
||||
|
||||
public BigDecimal getInstalledCap() {
|
||||
return installedCap;
|
||||
public BigDecimal getInstallPower() {
|
||||
return installPower;
|
||||
}
|
||||
|
||||
public void setInstalledCap(BigDecimal installedCap) {
|
||||
this.installedCap = installedCap;
|
||||
public void setInstallPower(BigDecimal installPower) {
|
||||
this.installPower = installPower;
|
||||
}
|
||||
|
||||
public BigDecimal getInstalledPower() {
|
||||
return installedPower;
|
||||
public BigDecimal getInstallCapacity() {
|
||||
return installCapacity;
|
||||
}
|
||||
|
||||
public void setInstalledPower(BigDecimal installedPower) {
|
||||
this.installedPower = installedPower;
|
||||
public void setInstallCapacity(BigDecimal installCapacity) {
|
||||
this.installCapacity = installCapacity;
|
||||
}
|
||||
|
||||
public String getRunningTime() {
|
||||
|
@ -22,6 +22,8 @@ public class SiteMonitorDataVo {
|
||||
*/
|
||||
private BigDecimal chargedCap;
|
||||
|
||||
private BigDecimal dailyEfficiency;
|
||||
|
||||
public String getAmmeterDate() {
|
||||
return ammeterDate;
|
||||
}
|
||||
@ -45,4 +47,12 @@ public class SiteMonitorDataVo {
|
||||
public void setChargedCap(BigDecimal chargedCap) {
|
||||
this.chargedCap = chargedCap;
|
||||
}
|
||||
|
||||
public BigDecimal getDailyEfficiency() {
|
||||
return dailyEfficiency;
|
||||
}
|
||||
|
||||
public void setDailyEfficiency(BigDecimal dailyEfficiency) {
|
||||
this.dailyEfficiency = dailyEfficiency;
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import java.math.BigDecimal;
|
||||
* 单站监控-设备监控-实时运行头部行数据
|
||||
*
|
||||
*/
|
||||
public class SiteMonitorRuningHeadInfoVo {
|
||||
public class SiteMonitorRunningHeadInfoVo {
|
||||
/**
|
||||
* 实时有功功率
|
||||
*/
|
||||
@ -37,6 +37,11 @@ public class SiteMonitorRuningHeadInfoVo {
|
||||
*/
|
||||
private BigDecimal dayDisChargedCap;
|
||||
|
||||
/**
|
||||
* 站点id
|
||||
*/
|
||||
private String siteId;
|
||||
|
||||
public BigDecimal getTotalActivePower() {
|
||||
return totalActivePower;
|
||||
}
|
||||
@ -84,4 +89,12 @@ public class SiteMonitorRuningHeadInfoVo {
|
||||
public void setDayDisChargedCap(BigDecimal dayDisChargedCap) {
|
||||
this.dayDisChargedCap = dayDisChargedCap;
|
||||
}
|
||||
|
||||
public String getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setSiteId(String siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
}
|
@ -2,9 +2,7 @@ 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;
|
||||
import com.xzzn.ems.domain.vo.*;
|
||||
|
||||
/**
|
||||
* 告警记录Mapper接口
|
||||
@ -66,7 +64,7 @@ public interface EmsAlarmRecordsMapper
|
||||
* 根据站点id获取告警记录
|
||||
*
|
||||
*/
|
||||
public List<SiteMonitorHomeAlarmVo> getAlarmRecordsBySiteId(Long siteId);
|
||||
public List<SiteMonitorHomeAlarmVo> getAlarmRecordsBySiteId(String siteId);
|
||||
|
||||
/**
|
||||
* 获取告警趋势数据
|
||||
@ -79,4 +77,6 @@ public interface EmsAlarmRecordsMapper
|
||||
*
|
||||
*/
|
||||
public List<DeviceAlarmProportionList> getDeviceAlarmPropList();
|
||||
|
||||
public List<AlarmRecordListResponseVo> getAlarmRecordDetailList(AlarmRecordListRequestVo requestVo);
|
||||
}
|
||||
|
@ -0,0 +1,70 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsAmmeterData;
|
||||
import com.xzzn.ems.domain.vo.AmmeterDataDetailInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 总数据Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-27
|
||||
*/
|
||||
public interface EmsAmmeterDataMapper
|
||||
{
|
||||
/**
|
||||
* 查询总数据
|
||||
*
|
||||
* @param id 总数据主键
|
||||
* @return 总数据
|
||||
*/
|
||||
public EmsAmmeterData selectEmsAmmeterDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询总数据列表
|
||||
*
|
||||
* @param emsAmmeterData 总数据
|
||||
* @return 总数据集合
|
||||
*/
|
||||
public List<EmsAmmeterData> selectEmsAmmeterDataList(EmsAmmeterData emsAmmeterData);
|
||||
|
||||
/**
|
||||
* 新增总数据
|
||||
*
|
||||
* @param emsAmmeterData 总数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsAmmeterData(EmsAmmeterData emsAmmeterData);
|
||||
|
||||
/**
|
||||
* 修改总数据
|
||||
*
|
||||
* @param emsAmmeterData 总数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsAmmeterData(EmsAmmeterData emsAmmeterData);
|
||||
|
||||
/**
|
||||
* 删除总数据
|
||||
*
|
||||
* @param id 总数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsAmmeterDataById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除总数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsAmmeterDataByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 获取总表详细数据
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
public List<AmmeterDataDetailInfo> getAmmeterDetailInfo(@Param("siteId")String siteId,@Param("deviceId") String deviceId);
|
||||
}
|
@ -2,7 +2,6 @@ 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;
|
||||
|
||||
@ -62,18 +61,11 @@ public interface EmsBatteryClusterMapper
|
||||
*/
|
||||
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);
|
||||
public List<BMSBatteryDataList> getBmsBatteryData(@Param("siteId")String siteId, @Param("stackDeviceId")String stackDeviceId);
|
||||
}
|
||||
|
@ -4,9 +4,8 @@ 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 com.xzzn.ems.domain.vo.BatteryDataStatsListVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
@ -70,7 +69,7 @@ public interface EmsBatteryDataMapper
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
public EmsBatteryData getBatteryDataBySiteId(Long siteId);
|
||||
public EmsBatteryData getBatteryDataBySiteId(String siteId);
|
||||
|
||||
/**
|
||||
* 根据siteId和簇id获取单体数据
|
||||
@ -78,7 +77,7 @@ public interface EmsBatteryDataMapper
|
||||
* @param clusterDeviceId
|
||||
* @return
|
||||
*/
|
||||
public BatteryClusterDataDetailVo getBatteryDataByClusterId(@Param("siteId")Long siteId, @Param("clusterDeviceId")Long clusterDeviceId);
|
||||
public BatteryClusterDataDetailVo getBatteryDataByClusterId(@Param("siteId")String siteId, @Param("clusterDeviceId")String clusterDeviceId);
|
||||
|
||||
/**
|
||||
* 获取最大最小的单体id
|
||||
@ -86,4 +85,14 @@ public interface EmsBatteryDataMapper
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> getDataIdsMap(BatteryClusterDataDetailVo dataVo);
|
||||
|
||||
/**
|
||||
* 根据电池簇设备id获取下面所有单体电池
|
||||
* @param clusterDeviceId
|
||||
* @return
|
||||
*/
|
||||
public List<BatteryDataStatsListVo> getAllBatteryDataByClusterId(@Param("clusterDeviceId") String clusterDeviceId,@Param("siteId") String siteId);
|
||||
|
||||
|
||||
int insertEmsBatteryDataList(List<EmsBatteryData> emsBatteryDataList);
|
||||
}
|
||||
|
@ -65,5 +65,5 @@ public interface EmsBatteryStackMapper
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
public List<BMSOverViewVo> selectEmsBatteryStackBySiteId(Long siteId);
|
||||
public List<BMSOverViewVo> selectEmsBatteryStackBySiteId(String siteId);
|
||||
}
|
||||
|
@ -64,5 +64,5 @@ public interface EmsCoolingDataMapper
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
public List<EmsCoolingData> getCoolingDataList(Long siteId);
|
||||
public List<EmsCoolingData> getCoolingDataList(String siteId);
|
||||
}
|
||||
|
@ -1,7 +1,10 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.xzzn.ems.domain.EmsDevicesSetting;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* Modbus设备配置Mapper接口
|
||||
@ -58,4 +61,25 @@ public interface EmsDevicesSettingMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsDevicesSettingByIds(Long[] ids);
|
||||
/**
|
||||
* 根据父类设备id获取子设备id
|
||||
* @param parentId
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> getDeviceInfoByParentId(String parentId);
|
||||
/**
|
||||
* 获取该设备下的所有电表
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
public List<EmsDevicesSetting> getAllBatteryDeviceBySiteId(String siteId);
|
||||
|
||||
|
||||
/**
|
||||
* 根据site_id和device_category获取指定设备信息
|
||||
* @param siteId
|
||||
* @param deviceCategory
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> getDeviceInfosBySiteIdAndCategory(@Param("siteId")String siteId, @Param("deviceCategory")String deviceCategory);
|
||||
}
|
||||
|
@ -0,0 +1,62 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import com.xzzn.ems.domain.EmsMqttMessage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-27
|
||||
*/
|
||||
public interface EmsMqttMessageMapper
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public EmsMqttMessage selectEmsMqttMessageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param emsMqttMessage 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<EmsMqttMessage> selectEmsMqttMessageList(EmsMqttMessage emsMqttMessage);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param emsMqttMessage 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsMqttMessage(EmsMqttMessage emsMqttMessage);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param emsMqttMessage 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsMqttMessage(EmsMqttMessage emsMqttMessage);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsMqttMessageById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsMqttMessageByIds(Long[] ids);
|
||||
}
|
@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
* pcs支路数据Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-24
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
public interface EmsPcsBranchDataMapper
|
||||
{
|
||||
@ -67,5 +67,7 @@ public interface EmsPcsBranchDataMapper
|
||||
* @param deviceId
|
||||
* @return
|
||||
*/
|
||||
public List<PcsBranchInfo> getPcsBranchInfoList(@Param("siteId")Long siteId, @Param("deviceId")Long deviceId);
|
||||
public List<PcsBranchInfo> getPcsBranchInfoList(@Param("siteId")String siteId, @Param("deviceId")String deviceId);
|
||||
|
||||
int insertPcsBranchDataList(List<EmsPcsBranchData> list);
|
||||
}
|
||||
|
@ -1,14 +1,13 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
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;
|
||||
import com.xzzn.ems.domain.vo.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* PCS数据Mapper接口
|
||||
@ -71,21 +70,14 @@ public interface EmsPcsDataMapper
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
public List<SiteMonitorDataVo> getPcsDataBySiteId(Long siteId);
|
||||
|
||||
/**
|
||||
* 根据站点获取电网实时功率=sum(总交流有功电率)
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getGridNrtPower(Long siteId);
|
||||
public List<SiteMonitorDataVo> getPcsDataBySiteId(@Param("siteId")String siteId, @Param("limitTime")int limitTime);
|
||||
|
||||
/**
|
||||
* 根据站点获取设备监控的实时运行头信息
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
public SiteMonitorRuningHeadInfoVo getSiteRunningHeadInfo(Long siteId);
|
||||
public SiteMonitorRunningHeadInfoVo getSiteRunningHeadInfo(String siteId);
|
||||
|
||||
/**
|
||||
* 获取每月的充电量和放电量
|
||||
@ -98,11 +90,18 @@ public interface EmsPcsDataMapper
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
public List<PcsDetailInfoVo> getPcsDetailInfoBySiteId(Long siteId);
|
||||
public List<PcsDetailInfoVo> getPcsDetailInfoBySiteId(String siteId);
|
||||
|
||||
/**
|
||||
* 获取总充+总放
|
||||
* @return
|
||||
*/
|
||||
public Map<String, BigDecimal> getPcsTotalChargeData();
|
||||
public Map<String, BigDecimal> getPcsTotalChargeData(String siteId);
|
||||
|
||||
/**
|
||||
* 根据时间按天获取充放电量
|
||||
* @param requestVo
|
||||
* @return
|
||||
*/
|
||||
public List<SiteMonitorDataVo> getPcsDataByDate(DateSearchRequest requestVo);
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.xzzn.ems.mapper;
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsSiteSetting;
|
||||
import com.xzzn.ems.domain.vo.SiteTotalInfoVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 站点Mapper接口
|
||||
@ -65,4 +66,21 @@ public interface EmsSiteSettingMapper
|
||||
* @return
|
||||
*/
|
||||
public SiteTotalInfoVo getSiteTotalInfo();
|
||||
|
||||
/**
|
||||
* 根据站点id获取站点信息
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
public EmsSiteSetting selectEmsSiteSettingBySiteId(String siteId);
|
||||
|
||||
|
||||
/**
|
||||
* 根据站点名称和投运时间获取站点列表
|
||||
* @param siteName
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
public List<EmsSiteSetting> getSiteInfoList(@Param("siteName")String siteName, @Param("startTime")String startTime, @Param("endTime")String endTime);
|
||||
}
|
||||
|
@ -0,0 +1,70 @@
|
||||
package com.xzzn.ems.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsAlarmRecords;
|
||||
import com.xzzn.ems.domain.vo.AlarmRecordListRequestVo;
|
||||
import com.xzzn.ems.domain.vo.AlarmRecordListResponseVo;
|
||||
|
||||
/**
|
||||
* 告警记录Service接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
public interface IEmsAlarmRecordsService
|
||||
{
|
||||
/**
|
||||
* 查询告警记录
|
||||
*
|
||||
* @param id 告警记录主键
|
||||
* @return 告警记录
|
||||
*/
|
||||
public EmsAlarmRecords selectEmsAlarmRecordsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询告警记录列表
|
||||
*
|
||||
* @param emsAlarmRecords 告警记录
|
||||
* @return 告警记录集合
|
||||
*/
|
||||
public List<EmsAlarmRecords> selectEmsAlarmRecordsList(EmsAlarmRecords emsAlarmRecords);
|
||||
|
||||
/**
|
||||
* 新增告警记录
|
||||
*
|
||||
* @param emsAlarmRecords 告警记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsAlarmRecords(EmsAlarmRecords emsAlarmRecords);
|
||||
|
||||
/**
|
||||
* 修改告警记录
|
||||
*
|
||||
* @param emsAlarmRecords 告警记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsAlarmRecords(EmsAlarmRecords emsAlarmRecords);
|
||||
|
||||
/**
|
||||
* 批量删除告警记录
|
||||
*
|
||||
* @param ids 需要删除的告警记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsAlarmRecordsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除告警记录信息
|
||||
*
|
||||
* @param id 告警记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsAlarmRecordsById(Long id);
|
||||
|
||||
/**
|
||||
* 获取故障告警列表
|
||||
* @param requestVo
|
||||
* @return
|
||||
*/
|
||||
public List<AlarmRecordListResponseVo> getAlarmRecordDetailList(AlarmRecordListRequestVo requestVo);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.xzzn.ems.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsBatteryCluster;
|
||||
|
||||
/**
|
||||
* 电池簇数据Service接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
public interface IEmsBatteryClusterService
|
||||
{
|
||||
/**
|
||||
* 查询电池簇数据
|
||||
*
|
||||
* @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 ids 需要删除的电池簇数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsBatteryClusterByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除电池簇数据信息
|
||||
*
|
||||
* @param id 电池簇数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsBatteryClusterById(Long id);
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.xzzn.ems.service;
|
||||
|
||||
import com.xzzn.ems.domain.EmsBatteryData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 单体电池实时数据Service接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-27
|
||||
*/
|
||||
public interface IEmsBatteryDataService
|
||||
{
|
||||
/**
|
||||
* 查询单体电池实时数据
|
||||
*
|
||||
* @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 ids 需要删除的单体电池实时数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsBatteryDataByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除单体电池实时数据信息
|
||||
*
|
||||
* @param id 单体电池实时数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsBatteryDataById(Long id);
|
||||
|
||||
/**
|
||||
* 新增单体电池实时数据
|
||||
*
|
||||
* @param emsBatteryDataList 单体电池实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsBatteryDataList(List<EmsBatteryData> emsBatteryDataList);
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.xzzn.ems.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsBatteryStack;
|
||||
|
||||
/**
|
||||
* 电池堆数据Service接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
public interface IEmsBatteryStackService
|
||||
{
|
||||
/**
|
||||
* 查询电池堆数据
|
||||
*
|
||||
* @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 ids 需要删除的电池堆数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsBatteryStackByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除电池堆数据信息
|
||||
*
|
||||
* @param id 电池堆数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsBatteryStackById(Long id);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.xzzn.ems.service;
|
||||
|
||||
import com.xzzn.ems.domain.EmsMqttMessage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-27
|
||||
*/
|
||||
public interface IEmsMqttMessageService
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public EmsMqttMessage selectEmsMqttMessageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param emsMqttMessage 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<EmsMqttMessage> selectEmsMqttMessageList(EmsMqttMessage emsMqttMessage);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param emsMqttMessage 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsMqttMessage(EmsMqttMessage emsMqttMessage);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param emsMqttMessage 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsMqttMessage(EmsMqttMessage emsMqttMessage);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsMqttMessageByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsMqttMessageById(Long id);
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.xzzn.ems.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsPcsBranchData;
|
||||
|
||||
/**
|
||||
* pcs支路数据Service接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
public interface IEmsPcsBranchDataService
|
||||
{
|
||||
/**
|
||||
* 查询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 ids 需要删除的pcs支路数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsPcsBranchDataByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除pcs支路数据信息
|
||||
*
|
||||
* @param id pcs支路数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsPcsBranchDataById(Long id);
|
||||
|
||||
int insertEmsPcsBranchDataList(List<EmsPcsBranchData> list);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.xzzn.ems.service;
|
||||
|
||||
import com.xzzn.ems.domain.EmsPcsData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* PCS数据Service接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-27
|
||||
*/
|
||||
public interface IEmsPcsDataService
|
||||
{
|
||||
/**
|
||||
* 查询PCS数据
|
||||
*
|
||||
* @param id PCS数据主键
|
||||
* @return PCS数据
|
||||
*/
|
||||
public EmsPcsData selectEmsPcsDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询PCS数据列表
|
||||
*
|
||||
* @param emsPcsData PCS数据
|
||||
* @return PCS数据集合
|
||||
*/
|
||||
public List<EmsPcsData> selectEmsPcsDataList(EmsPcsData emsPcsData);
|
||||
|
||||
/**
|
||||
* 新增PCS数据
|
||||
*
|
||||
* @param emsPcsData PCS数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsPcsData(EmsPcsData emsPcsData);
|
||||
|
||||
/**
|
||||
* 修改PCS数据
|
||||
*
|
||||
* @param emsPcsData PCS数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsPcsData(EmsPcsData emsPcsData);
|
||||
|
||||
/**
|
||||
* 批量删除PCS数据
|
||||
*
|
||||
* @param ids 需要删除的PCS数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsPcsDataByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除PCS数据信息
|
||||
*
|
||||
* @param id PCS数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsPcsDataById(Long id);
|
||||
}
|
@ -4,6 +4,7 @@ import com.xzzn.ems.domain.EmsSiteSetting;
|
||||
import com.xzzn.ems.domain.vo.SiteTotalInfoVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 站点信息 服务层
|
||||
@ -16,4 +17,11 @@ public interface IEmsSiteService
|
||||
|
||||
|
||||
public SiteTotalInfoVo getSiteTotalInfo();
|
||||
|
||||
public List<Map<String,Object>> getAllStackInfo(String siteId);
|
||||
|
||||
public List<Map<String,Object>> getAllClusterInfo(String stackDeviceId);
|
||||
|
||||
|
||||
public List<EmsSiteSetting> getAllSiteInfoList(String siteName, String startTime, String endTime);
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
package com.xzzn.ems.service;
|
||||
|
||||
import com.xzzn.ems.domain.vo.DateSearchRequest;
|
||||
import com.xzzn.ems.domain.vo.ElectricDataInfoVo;;import java.util.Date;
|
||||
|
||||
/**
|
||||
* 统计报表数据Service接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
public interface IEmsStatsReportService
|
||||
{
|
||||
|
||||
public ElectricDataInfoVo getElectricDataResult(DateSearchRequest requestVo);
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package com.xzzn.ems.service;
|
||||
|
||||
public interface IFXXDataProcessService {
|
||||
|
||||
public void handleFxData(String message);
|
||||
|
||||
}
|
@ -13,7 +13,7 @@ public interface IHomePageService
|
||||
|
||||
public SiteTotalInfoVo getSiteTotalInfo();
|
||||
|
||||
public SingleSiteBaseInfo getSingleSiteBaseInfo(Long siteId);
|
||||
public SingleSiteBaseInfo getSingleSiteBaseInfo(String siteId);
|
||||
|
||||
public HomePageDataViewVo getHomePageDataList();
|
||||
}
|
||||
|
@ -12,18 +12,22 @@ import java.util.List;
|
||||
public interface ISingleSiteService
|
||||
{
|
||||
|
||||
public SiteMonitorHomeVo getSiteMonitorDataVo(Long siteId);
|
||||
public SiteMonitorHomeVo getSiteMonitorDataVo(String siteId);
|
||||
|
||||
|
||||
public SiteMonitorRuningHeadInfoVo getSiteRunningHeadInfo(Long siteId);
|
||||
public SiteMonitorRunningHeadInfoVo getSiteRunningHeadInfo(String siteId);
|
||||
|
||||
public SiteMonitorRuningInfoVo getRunningGraph(Long siteId);
|
||||
public SiteMonitorRuningInfoVo getRunningGraph(String siteId);
|
||||
|
||||
public List<PcsDetailInfoVo> getPcsDetailInfo(Long siteId);
|
||||
public List<PcsDetailInfoVo> getPcsDetailInfo(String siteId);
|
||||
|
||||
public List<BMSOverViewVo> getBMSOverView(Long siteId);
|
||||
public List<BMSOverViewVo> getBMSOverView(String siteId);
|
||||
|
||||
public List<BMSBatteryClusterVo> getBMSBatteryCluster(Long siteId);
|
||||
public List<BMSBatteryClusterVo> getBMSBatteryCluster(String siteId);
|
||||
|
||||
public List<EmsCoolingData> getCoolingDataList(Long siteId);
|
||||
public List<EmsCoolingData> getCoolingDataList(String siteId);
|
||||
|
||||
public List<BatteryDataStatsListVo> getClusterDataInfoList(String clusterDeviceId,String siteId);
|
||||
|
||||
public List<AmmeterDataVo> getAmmeterDataList(String siteId);
|
||||
}
|
||||
|
@ -0,0 +1,103 @@
|
||||
package com.xzzn.ems.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.common.utils.DateUtils;
|
||||
import com.xzzn.ems.domain.vo.AlarmRecordListRequestVo;
|
||||
import com.xzzn.ems.domain.vo.AlarmRecordListResponseVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.xzzn.ems.mapper.EmsAlarmRecordsMapper;
|
||||
import com.xzzn.ems.domain.EmsAlarmRecords;
|
||||
import com.xzzn.ems.service.IEmsAlarmRecordsService;
|
||||
|
||||
/**
|
||||
* 告警记录Service业务层处理
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
@Service
|
||||
public class EmsAlarmRecordsServiceImpl implements IEmsAlarmRecordsService
|
||||
{
|
||||
@Autowired
|
||||
private EmsAlarmRecordsMapper emsAlarmRecordsMapper;
|
||||
|
||||
/**
|
||||
* 查询告警记录
|
||||
*
|
||||
* @param id 告警记录主键
|
||||
* @return 告警记录
|
||||
*/
|
||||
@Override
|
||||
public EmsAlarmRecords selectEmsAlarmRecordsById(Long id)
|
||||
{
|
||||
return emsAlarmRecordsMapper.selectEmsAlarmRecordsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询告警记录列表
|
||||
*
|
||||
* @param emsAlarmRecords 告警记录
|
||||
* @return 告警记录
|
||||
*/
|
||||
@Override
|
||||
public List<EmsAlarmRecords> selectEmsAlarmRecordsList(EmsAlarmRecords emsAlarmRecords)
|
||||
{
|
||||
return emsAlarmRecordsMapper.selectEmsAlarmRecordsList(emsAlarmRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增告警记录
|
||||
*
|
||||
* @param emsAlarmRecords 告警记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEmsAlarmRecords(EmsAlarmRecords emsAlarmRecords)
|
||||
{
|
||||
emsAlarmRecords.setCreateTime(DateUtils.getNowDate());
|
||||
return emsAlarmRecordsMapper.insertEmsAlarmRecords(emsAlarmRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改告警记录
|
||||
*
|
||||
* @param emsAlarmRecords 告警记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEmsAlarmRecords(EmsAlarmRecords emsAlarmRecords)
|
||||
{
|
||||
emsAlarmRecords.setUpdateTime(DateUtils.getNowDate());
|
||||
return emsAlarmRecordsMapper.updateEmsAlarmRecords(emsAlarmRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除告警记录
|
||||
*
|
||||
* @param ids 需要删除的告警记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmsAlarmRecordsByIds(Long[] ids)
|
||||
{
|
||||
return emsAlarmRecordsMapper.deleteEmsAlarmRecordsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除告警记录信息
|
||||
*
|
||||
* @param id 告警记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmsAlarmRecordsById(Long id)
|
||||
{
|
||||
return emsAlarmRecordsMapper.deleteEmsAlarmRecordsById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AlarmRecordListResponseVo> getAlarmRecordDetailList(AlarmRecordListRequestVo requestVo) {
|
||||
return emsAlarmRecordsMapper.getAlarmRecordDetailList(requestVo);
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.xzzn.ems.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.xzzn.ems.mapper.EmsBatteryClusterMapper;
|
||||
import com.xzzn.ems.domain.EmsBatteryCluster;
|
||||
import com.xzzn.ems.service.IEmsBatteryClusterService;
|
||||
|
||||
/**
|
||||
* 电池簇数据Service业务层处理
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
@Service
|
||||
public class EmsBatteryClusterServiceImpl implements IEmsBatteryClusterService
|
||||
{
|
||||
@Autowired
|
||||
private EmsBatteryClusterMapper emsBatteryClusterMapper;
|
||||
|
||||
/**
|
||||
* 查询电池簇数据
|
||||
*
|
||||
* @param id 电池簇数据主键
|
||||
* @return 电池簇数据
|
||||
*/
|
||||
@Override
|
||||
public EmsBatteryCluster selectEmsBatteryClusterById(Long id)
|
||||
{
|
||||
return emsBatteryClusterMapper.selectEmsBatteryClusterById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询电池簇数据列表
|
||||
*
|
||||
* @param emsBatteryCluster 电池簇数据
|
||||
* @return 电池簇数据
|
||||
*/
|
||||
@Override
|
||||
public List<EmsBatteryCluster> selectEmsBatteryClusterList(EmsBatteryCluster emsBatteryCluster)
|
||||
{
|
||||
return emsBatteryClusterMapper.selectEmsBatteryClusterList(emsBatteryCluster);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增电池簇数据
|
||||
*
|
||||
* @param emsBatteryCluster 电池簇数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEmsBatteryCluster(EmsBatteryCluster emsBatteryCluster)
|
||||
{
|
||||
emsBatteryCluster.setCreateTime(DateUtils.getNowDate());
|
||||
return emsBatteryClusterMapper.insertEmsBatteryCluster(emsBatteryCluster);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改电池簇数据
|
||||
*
|
||||
* @param emsBatteryCluster 电池簇数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEmsBatteryCluster(EmsBatteryCluster emsBatteryCluster)
|
||||
{
|
||||
emsBatteryCluster.setUpdateTime(DateUtils.getNowDate());
|
||||
return emsBatteryClusterMapper.updateEmsBatteryCluster(emsBatteryCluster);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除电池簇数据
|
||||
*
|
||||
* @param ids 需要删除的电池簇数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmsBatteryClusterByIds(Long[] ids)
|
||||
{
|
||||
return emsBatteryClusterMapper.deleteEmsBatteryClusterByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除电池簇数据信息
|
||||
*
|
||||
* @param id 电池簇数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmsBatteryClusterById(Long id)
|
||||
{
|
||||
return emsBatteryClusterMapper.deleteEmsBatteryClusterById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.xzzn.ems.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.common.utils.DateUtils;
|
||||
import com.xzzn.ems.domain.EmsBatteryData;
|
||||
import com.xzzn.ems.mapper.EmsBatteryDataMapper;
|
||||
import com.xzzn.ems.service.IEmsBatteryDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 单体电池实时数据Service业务层处理
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-27
|
||||
*/
|
||||
@Service
|
||||
public class EmsBatteryDataServiceImpl implements IEmsBatteryDataService
|
||||
{
|
||||
@Autowired
|
||||
private EmsBatteryDataMapper emsBatteryDataMapper;
|
||||
|
||||
/**
|
||||
* 查询单体电池实时数据
|
||||
*
|
||||
* @param id 单体电池实时数据主键
|
||||
* @return 单体电池实时数据
|
||||
*/
|
||||
@Override
|
||||
public EmsBatteryData selectEmsBatteryDataById(Long id)
|
||||
{
|
||||
return emsBatteryDataMapper.selectEmsBatteryDataById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单体电池实时数据列表
|
||||
*
|
||||
* @param emsBatteryData 单体电池实时数据
|
||||
* @return 单体电池实时数据
|
||||
*/
|
||||
@Override
|
||||
public List<EmsBatteryData> selectEmsBatteryDataList(EmsBatteryData emsBatteryData)
|
||||
{
|
||||
return emsBatteryDataMapper.selectEmsBatteryDataList(emsBatteryData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单体电池实时数据
|
||||
*
|
||||
* @param emsBatteryData 单体电池实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEmsBatteryData(EmsBatteryData emsBatteryData)
|
||||
{
|
||||
emsBatteryData.setCreateTime(DateUtils.getNowDate());
|
||||
return emsBatteryDataMapper.insertEmsBatteryData(emsBatteryData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改单体电池实时数据
|
||||
*
|
||||
* @param emsBatteryData 单体电池实时数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEmsBatteryData(EmsBatteryData emsBatteryData)
|
||||
{
|
||||
emsBatteryData.setUpdateTime(DateUtils.getNowDate());
|
||||
return emsBatteryDataMapper.updateEmsBatteryData(emsBatteryData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除单体电池实时数据
|
||||
*
|
||||
* @param ids 需要删除的单体电池实时数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmsBatteryDataByIds(Long[] ids)
|
||||
{
|
||||
return emsBatteryDataMapper.deleteEmsBatteryDataByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单体电池实时数据信息
|
||||
*
|
||||
* @param id 单体电池实时数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmsBatteryDataById(Long id)
|
||||
{
|
||||
return emsBatteryDataMapper.deleteEmsBatteryDataById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertEmsBatteryDataList(List<EmsBatteryData> emsBatteryDataList) {
|
||||
for (EmsBatteryData data : emsBatteryDataList) {
|
||||
data.setCreateTime(DateUtils.getNowDate());
|
||||
}
|
||||
return emsBatteryDataMapper.insertEmsBatteryDataList(emsBatteryDataList);
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.xzzn.ems.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.xzzn.ems.mapper.EmsBatteryStackMapper;
|
||||
import com.xzzn.ems.domain.EmsBatteryStack;
|
||||
import com.xzzn.ems.service.IEmsBatteryStackService;
|
||||
|
||||
/**
|
||||
* 电池堆数据Service业务层处理
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
@Service
|
||||
public class EmsBatteryStackServiceImpl implements IEmsBatteryStackService
|
||||
{
|
||||
@Autowired
|
||||
private EmsBatteryStackMapper emsBatteryStackMapper;
|
||||
|
||||
/**
|
||||
* 查询电池堆数据
|
||||
*
|
||||
* @param id 电池堆数据主键
|
||||
* @return 电池堆数据
|
||||
*/
|
||||
@Override
|
||||
public EmsBatteryStack selectEmsBatteryStackById(Long id)
|
||||
{
|
||||
return emsBatteryStackMapper.selectEmsBatteryStackById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询电池堆数据列表
|
||||
*
|
||||
* @param emsBatteryStack 电池堆数据
|
||||
* @return 电池堆数据
|
||||
*/
|
||||
@Override
|
||||
public List<EmsBatteryStack> selectEmsBatteryStackList(EmsBatteryStack emsBatteryStack)
|
||||
{
|
||||
return emsBatteryStackMapper.selectEmsBatteryStackList(emsBatteryStack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增电池堆数据
|
||||
*
|
||||
* @param emsBatteryStack 电池堆数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEmsBatteryStack(EmsBatteryStack emsBatteryStack)
|
||||
{
|
||||
emsBatteryStack.setCreateTime(DateUtils.getNowDate());
|
||||
return emsBatteryStackMapper.insertEmsBatteryStack(emsBatteryStack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改电池堆数据
|
||||
*
|
||||
* @param emsBatteryStack 电池堆数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEmsBatteryStack(EmsBatteryStack emsBatteryStack)
|
||||
{
|
||||
emsBatteryStack.setUpdateTime(DateUtils.getNowDate());
|
||||
return emsBatteryStackMapper.updateEmsBatteryStack(emsBatteryStack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除电池堆数据
|
||||
*
|
||||
* @param ids 需要删除的电池堆数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmsBatteryStackByIds(Long[] ids)
|
||||
{
|
||||
return emsBatteryStackMapper.deleteEmsBatteryStackByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除电池堆数据信息
|
||||
*
|
||||
* @param id 电池堆数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmsBatteryStackById(Long id)
|
||||
{
|
||||
return emsBatteryStackMapper.deleteEmsBatteryStackById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.xzzn.ems.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.common.utils.DateUtils;
|
||||
import com.xzzn.ems.domain.EmsMqttMessage;
|
||||
import com.xzzn.ems.mapper.EmsMqttMessageMapper;
|
||||
import com.xzzn.ems.service.IEmsMqttMessageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-27
|
||||
*/
|
||||
@Service
|
||||
public class EmsMqttMessageServiceImpl implements IEmsMqttMessageService
|
||||
{
|
||||
@Autowired
|
||||
private EmsMqttMessageMapper emsMqttMessageMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public EmsMqttMessage selectEmsMqttMessageById(Long id)
|
||||
{
|
||||
return emsMqttMessageMapper.selectEmsMqttMessageById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param emsMqttMessage 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<EmsMqttMessage> selectEmsMqttMessageList(EmsMqttMessage emsMqttMessage)
|
||||
{
|
||||
return emsMqttMessageMapper.selectEmsMqttMessageList(emsMqttMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param emsMqttMessage 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEmsMqttMessage(EmsMqttMessage emsMqttMessage)
|
||||
{
|
||||
emsMqttMessage.setCreateTime(DateUtils.getNowDate());
|
||||
return emsMqttMessageMapper.insertEmsMqttMessage(emsMqttMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param emsMqttMessage 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEmsMqttMessage(EmsMqttMessage emsMqttMessage)
|
||||
{
|
||||
emsMqttMessage.setUpdateTime(DateUtils.getNowDate());
|
||||
return emsMqttMessageMapper.updateEmsMqttMessage(emsMqttMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmsMqttMessageByIds(Long[] ids)
|
||||
{
|
||||
return emsMqttMessageMapper.deleteEmsMqttMessageByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmsMqttMessageById(Long id)
|
||||
{
|
||||
return emsMqttMessageMapper.deleteEmsMqttMessageById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.xzzn.ems.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.xzzn.ems.mapper.EmsPcsBranchDataMapper;
|
||||
import com.xzzn.ems.domain.EmsPcsBranchData;
|
||||
import com.xzzn.ems.service.IEmsPcsBranchDataService;
|
||||
|
||||
/**
|
||||
* pcs支路数据Service业务层处理
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
@Service
|
||||
public class EmsPcsBranchDataServiceImpl implements IEmsPcsBranchDataService
|
||||
{
|
||||
@Autowired
|
||||
private EmsPcsBranchDataMapper emsPcsBranchDataMapper;
|
||||
|
||||
/**
|
||||
* 查询pcs支路数据
|
||||
*
|
||||
* @param id pcs支路数据主键
|
||||
* @return pcs支路数据
|
||||
*/
|
||||
@Override
|
||||
public EmsPcsBranchData selectEmsPcsBranchDataById(Long id)
|
||||
{
|
||||
return emsPcsBranchDataMapper.selectEmsPcsBranchDataById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询pcs支路数据列表
|
||||
*
|
||||
* @param emsPcsBranchData pcs支路数据
|
||||
* @return pcs支路数据
|
||||
*/
|
||||
@Override
|
||||
public List<EmsPcsBranchData> selectEmsPcsBranchDataList(EmsPcsBranchData emsPcsBranchData)
|
||||
{
|
||||
return emsPcsBranchDataMapper.selectEmsPcsBranchDataList(emsPcsBranchData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增pcs支路数据
|
||||
*
|
||||
* @param emsPcsBranchData pcs支路数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEmsPcsBranchData(EmsPcsBranchData emsPcsBranchData)
|
||||
{
|
||||
emsPcsBranchData.setCreateTime(DateUtils.getNowDate());
|
||||
return emsPcsBranchDataMapper.insertEmsPcsBranchData(emsPcsBranchData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改pcs支路数据
|
||||
*
|
||||
* @param emsPcsBranchData pcs支路数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEmsPcsBranchData(EmsPcsBranchData emsPcsBranchData)
|
||||
{
|
||||
emsPcsBranchData.setUpdateTime(DateUtils.getNowDate());
|
||||
return emsPcsBranchDataMapper.updateEmsPcsBranchData(emsPcsBranchData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除pcs支路数据
|
||||
*
|
||||
* @param ids 需要删除的pcs支路数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmsPcsBranchDataByIds(Long[] ids)
|
||||
{
|
||||
return emsPcsBranchDataMapper.deleteEmsPcsBranchDataByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除pcs支路数据信息
|
||||
*
|
||||
* @param id pcs支路数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmsPcsBranchDataById(Long id)
|
||||
{
|
||||
return emsPcsBranchDataMapper.deleteEmsPcsBranchDataById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertEmsPcsBranchDataList(List<EmsPcsBranchData> list) {
|
||||
for (EmsPcsBranchData item : list) {
|
||||
item.setCreateTime(DateUtils.getNowDate());
|
||||
}
|
||||
return emsPcsBranchDataMapper.insertPcsBranchDataList(list);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.xzzn.ems.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.common.utils.DateUtils;
|
||||
import com.xzzn.ems.domain.EmsPcsData;
|
||||
import com.xzzn.ems.mapper.EmsPcsDataMapper;
|
||||
import com.xzzn.ems.service.IEmsPcsDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* PCS数据Service业务层处理
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-27
|
||||
*/
|
||||
@Service
|
||||
public class EmsPcsDataServiceImpl implements IEmsPcsDataService
|
||||
{
|
||||
@Autowired
|
||||
private EmsPcsDataMapper emsPcsDataMapper;
|
||||
|
||||
/**
|
||||
* 查询PCS数据
|
||||
*
|
||||
* @param id PCS数据主键
|
||||
* @return PCS数据
|
||||
*/
|
||||
@Override
|
||||
public EmsPcsData selectEmsPcsDataById(Long id)
|
||||
{
|
||||
return emsPcsDataMapper.selectEmsPcsDataById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询PCS数据列表
|
||||
*
|
||||
* @param emsPcsData PCS数据
|
||||
* @return PCS数据
|
||||
*/
|
||||
@Override
|
||||
public List<EmsPcsData> selectEmsPcsDataList(EmsPcsData emsPcsData)
|
||||
{
|
||||
return emsPcsDataMapper.selectEmsPcsDataList(emsPcsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增PCS数据
|
||||
*
|
||||
* @param emsPcsData PCS数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEmsPcsData(EmsPcsData emsPcsData)
|
||||
{
|
||||
emsPcsData.setCreateTime(DateUtils.getNowDate());
|
||||
return emsPcsDataMapper.insertEmsPcsData(emsPcsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改PCS数据
|
||||
*
|
||||
* @param emsPcsData PCS数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEmsPcsData(EmsPcsData emsPcsData)
|
||||
{
|
||||
emsPcsData.setUpdateTime(DateUtils.getNowDate());
|
||||
return emsPcsDataMapper.updateEmsPcsData(emsPcsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除PCS数据
|
||||
*
|
||||
* @param ids 需要删除的PCS数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmsPcsDataByIds(Long[] ids)
|
||||
{
|
||||
return emsPcsDataMapper.deleteEmsPcsDataByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除PCS数据信息
|
||||
*
|
||||
* @param id PCS数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmsPcsDataById(Long id)
|
||||
{
|
||||
return emsPcsDataMapper.deleteEmsPcsDataById(id);
|
||||
}
|
||||
}
|
@ -1,13 +1,16 @@
|
||||
package com.xzzn.ems.service.impl;
|
||||
|
||||
import com.xzzn.common.enums.DeviceCategory;
|
||||
import com.xzzn.ems.domain.EmsSiteSetting;
|
||||
import com.xzzn.ems.domain.vo.SiteTotalInfoVo;
|
||||
import com.xzzn.ems.mapper.EmsDevicesSettingMapper;
|
||||
import com.xzzn.ems.mapper.EmsSiteSettingMapper;
|
||||
import com.xzzn.ems.service.IEmsSiteService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 站点信息 服务层实现
|
||||
@ -19,6 +22,8 @@ public class EmsSiteServiceImpl implements IEmsSiteService
|
||||
|
||||
@Autowired
|
||||
private EmsSiteSettingMapper emsSiteMapper;
|
||||
@Autowired
|
||||
private EmsDevicesSettingMapper emsDevicesMapper;
|
||||
|
||||
@Override
|
||||
public List<EmsSiteSetting> getAllSites() {
|
||||
@ -30,4 +35,36 @@ public class EmsSiteServiceImpl implements IEmsSiteService
|
||||
return emsSiteMapper.getSiteTotalInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据site_id获取所有电池堆
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getAllStackInfo(String siteId) {
|
||||
return emsDevicesMapper.getDeviceInfosBySiteIdAndCategory(siteId, DeviceCategory.STACK.getCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据父类设备id获取子设备id
|
||||
* @param parentId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getAllClusterInfo(String parentId) {
|
||||
return emsDevicesMapper.getDeviceInfoByParentId(parentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取站点列表
|
||||
* @param siteName
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<EmsSiteSetting> getAllSiteInfoList(String siteName, String startTime, String endTime) {
|
||||
return emsSiteMapper.getSiteInfoList(siteName,startTime,endTime);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,77 @@
|
||||
package com.xzzn.ems.service.impl;
|
||||
|
||||
import com.xzzn.common.utils.DateUtils;
|
||||
import com.xzzn.ems.domain.vo.DateSearchRequest;
|
||||
import com.xzzn.ems.domain.vo.ElectricDataInfoVo;
|
||||
import com.xzzn.ems.domain.vo.SiteMonitorDataVo;
|
||||
import com.xzzn.ems.mapper.EmsPcsDataMapper;
|
||||
import com.xzzn.ems.service.IEmsStatsReportService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 统计报表数据Service业务层处理
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-29
|
||||
*/
|
||||
@Service
|
||||
public class EmsStatsReportServiceImpl implements IEmsStatsReportService
|
||||
{
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(EmsStatsReportServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private EmsPcsDataMapper emsPcsDataMapper;
|
||||
|
||||
@Override
|
||||
public ElectricDataInfoVo getElectricDataResult(DateSearchRequest requestVo) {
|
||||
ElectricDataInfoVo electricDataInfoVo = new ElectricDataInfoVo();
|
||||
|
||||
Date startDate = requestVo.getStartDate();
|
||||
Date endDate = requestVo.getEndDate();
|
||||
if (startDate == null && endDate == null) {
|
||||
// 如果没有传时间,默认从今天往前7天
|
||||
LocalDate sevenDaysAgo = LocalDate.now().minusDays(6);
|
||||
startDate = DateUtils.toDate(sevenDaysAgo);
|
||||
requestVo.setStartDate(startDate);
|
||||
}
|
||||
// 根据时间获取每天的充放电量
|
||||
List<SiteMonitorDataVo> dataList = emsPcsDataMapper.getPcsDataByDate(requestVo);
|
||||
if (!CollectionUtils.isEmpty(dataList)){
|
||||
// 总充、总放、效率
|
||||
BigDecimal totalDischarge = new BigDecimal(0);
|
||||
BigDecimal totalCharge = new BigDecimal(0);
|
||||
BigDecimal efficiency = new BigDecimal(0);
|
||||
|
||||
for (SiteMonitorDataVo siteMonitorDataVo : dataList) {
|
||||
totalDischarge = totalDischarge.add(siteMonitorDataVo.getDisChargedCap() == null ? BigDecimal.ZERO : siteMonitorDataVo.getDisChargedCap());
|
||||
totalCharge = totalCharge.add(siteMonitorDataVo.getChargedCap() == null ? BigDecimal.ZERO : siteMonitorDataVo.getChargedCap());
|
||||
|
||||
// 计算单天的效率
|
||||
BigDecimal dailyEfficiency = new BigDecimal(0);
|
||||
if ( siteMonitorDataVo.getDisChargedCap().compareTo(BigDecimal.ZERO)>0){
|
||||
dailyEfficiency = siteMonitorDataVo.getDisChargedCap().divide(siteMonitorDataVo.getChargedCap(), 2, RoundingMode.HALF_UP);
|
||||
}
|
||||
siteMonitorDataVo.setDailyEfficiency(dailyEfficiency);
|
||||
}
|
||||
if ( totalCharge.compareTo(BigDecimal.ZERO)>0){
|
||||
efficiency = totalDischarge.divide(totalCharge, 2, RoundingMode.HALF_UP);
|
||||
}
|
||||
electricDataInfoVo.setSevenDayDisChargeStats(dataList);
|
||||
electricDataInfoVo.setTotalDisChargedCap(totalDischarge);
|
||||
electricDataInfoVo.setTotalChargedCap(totalCharge);
|
||||
electricDataInfoVo.setEfficiency(efficiency);
|
||||
}
|
||||
return electricDataInfoVo;
|
||||
}
|
||||
}
|
@ -0,0 +1,450 @@
|
||||
package com.xzzn.ems.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.alibaba.fastjson2.TypeReference;
|
||||
import com.xzzn.common.constant.RedisKeyConstants;
|
||||
import com.xzzn.common.core.redis.RedisCache;
|
||||
import com.xzzn.common.enums.*;
|
||||
import com.xzzn.common.utils.DateUtils;
|
||||
import com.xzzn.common.utils.StringUtils;
|
||||
import com.xzzn.ems.domain.*;
|
||||
import com.xzzn.ems.mapper.*;
|
||||
import com.xzzn.ems.service.IFXXDataProcessService;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
public class FXXDataProcessServiceImpl implements IFXXDataProcessService {
|
||||
private static final Log log = LogFactory.getLog(FXXDataProcessServiceImpl.class);
|
||||
private static final String SITE_ID = "021_FXX_01";
|
||||
@Autowired
|
||||
private EmsBatteryClusterMapper emsBatteryClusterMapper;
|
||||
|
||||
@Autowired
|
||||
private EmsBatteryStackMapper emsBatteryStackMapper;
|
||||
|
||||
@Autowired
|
||||
private EmsBatteryDataMapper emsBatteryDataMapper;
|
||||
|
||||
@Autowired
|
||||
private EmsPcsDataMapper emsPcsDataMapper;
|
||||
|
||||
@Autowired
|
||||
private EmsPcsBranchDataMapper emsPcsBranchDataMapper;
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Autowired
|
||||
private EmsDevicesSettingMapper emsDevicesSettingMapper;;
|
||||
|
||||
@Override
|
||||
public void handleFxData(String message) {
|
||||
JSONArray arraylist = JSONArray.parseArray(message);
|
||||
|
||||
for (int i = 0; i < arraylist.size(); i++) {
|
||||
JSONObject obj = JSONObject.parseObject(arraylist.get(i).toString());
|
||||
|
||||
String deviceId = obj.get("Device").toString();
|
||||
String jsonData = obj.get("Data").toString();
|
||||
|
||||
log.info("deviceId:" + deviceId);
|
||||
if (deviceId.contains("BMSD")) {
|
||||
batteryStackDataProcess(deviceId, jsonData);
|
||||
|
||||
} else if (deviceId.contains("BMSC")) {
|
||||
log.info("BMSC data:"+ jsonData);
|
||||
batteryCluserDataProcess(deviceId, jsonData);
|
||||
batteryDataProcess(deviceId, jsonData);
|
||||
|
||||
} else if (deviceId.contains("PCS")) {
|
||||
pcsDataProcess(deviceId, jsonData);
|
||||
pcsBranchDataProcess(deviceId, jsonData);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void batteryStackDataProcess(String deviceId, String dataJson) {
|
||||
|
||||
//电池堆
|
||||
Map<String, Object> obj = JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
|
||||
//BMS 电池簇
|
||||
EmsBatteryStack dataStack = new EmsBatteryStack();
|
||||
|
||||
// 其他非 BigDecimal 字段
|
||||
dataStack.setWorkStatus(WorkStatus.NORMAL.getCode()); // 或其他默认值
|
||||
dataStack.setPcsCommunicationStatus(CommunicationStatus.OK.getCode());
|
||||
dataStack.setEmsCommunicationStatus(CommunicationStatus.OK.getCode());
|
||||
|
||||
// 电池堆状态数据设置
|
||||
dataStack.setOperationStatus(StringUtils.getString(obj.get("DCZT")));
|
||||
dataStack.setStackVoltage(StringUtils.getBigDecimal(obj.get("DCDDY")));
|
||||
dataStack.setStackCurrent(StringUtils.getBigDecimal(obj.get("DCDDL")));
|
||||
dataStack.setStackSoc(StringUtils.getBigDecimal(obj.get("DCDSOC")));
|
||||
dataStack.setStackSoh(StringUtils.getBigDecimal(obj.get("DCDSOH")));
|
||||
|
||||
// 电压极值信息
|
||||
dataStack.setMaxCellVoltage(StringUtils.getBigDecimal(obj.get("ZGDCDY")));
|
||||
dataStack.setMaxVoltageGroupId(StringUtils.getLong(obj.get("ZGDCDYZH")));
|
||||
dataStack.setMaxVoltageCellId(StringUtils.getLong(obj.get("ZGDCDYZHDH")));
|
||||
dataStack.setMinCellVoltage(StringUtils.getBigDecimal(obj.get("ZDDCDY")));
|
||||
dataStack.setMinVoltageGroupId(StringUtils.getLong(obj.get("ZDDCDYZH")));
|
||||
dataStack.setMinVoltageCellId(StringUtils.getLong(obj.get("ZDDCDYZHDH")));
|
||||
|
||||
// 温度极值信息
|
||||
dataStack.setMaxCellTemp(StringUtils.getBigDecimal(obj.get("ZGDCWD")));
|
||||
dataStack.setMaxTempGroupId(StringUtils.getLong(obj.get("ZGDCWDZH")));
|
||||
dataStack.setMaxTempCellId(StringUtils.getLong(obj.get("ZGDCWDZHDH")));
|
||||
dataStack.setMinCellTemp(StringUtils.getBigDecimal(obj.get("ZDDCWD")));
|
||||
dataStack.setMinTempGroupId(StringUtils.getLong(obj.get("ZDDCWDZH")));
|
||||
dataStack.setMinTempCellId(StringUtils.getLong(obj.get("ZDDCWDZHDH")));
|
||||
|
||||
// 电量统计信息
|
||||
dataStack.setTotalChargeCapacity(StringUtils.getBigDecimal(obj.get("DLJCDDL")));
|
||||
dataStack.setTotalDischargeCapacity(StringUtils.getBigDecimal(obj.get("DLCFDDL")));
|
||||
dataStack.setSessionChargeCapacity(StringUtils.getBigDecimal(obj.get("DDCLJCDDL")));
|
||||
dataStack.setSessionDischargeCapacity(StringUtils.getBigDecimal(obj.get("DDCLJFDDL")));
|
||||
dataStack.setAvailableChargeCapacity(StringUtils.getBigDecimal(obj.get("DKCDL")));
|
||||
dataStack.setAvailableDischargeCapacity(StringUtils.getBigDecimal(obj.get("DKFDL")));
|
||||
|
||||
// 时间信息
|
||||
dataStack.setRemainingDischargeTime(StringUtils.getLong(obj.get("KYFDSJ")));
|
||||
dataStack.setRemainingChargeTime(StringUtils.getLong(obj.get("KYCDSJ")));
|
||||
|
||||
// 功率/电流限制
|
||||
dataStack.setMaxDischargePower(StringUtils.getBigDecimal(obj.get("YXZDFDGL")));
|
||||
dataStack.setMaxChargePower(StringUtils.getBigDecimal(obj.get("YXZDCDGL")));
|
||||
dataStack.setMaxDischargeCurrent(StringUtils.getBigDecimal(obj.get("YXZDFDDL")));
|
||||
dataStack.setMaxChargeCurrent(StringUtils.getBigDecimal(obj.get("YXZDCDDL")));
|
||||
|
||||
// 当日统计
|
||||
dataStack.setDailyDischargeCycles(StringUtils.getLong(obj.get("DTFDCS")));
|
||||
dataStack.setDailyChargeCycles(StringUtils.getLong(obj.get("DTCDCS")));
|
||||
dataStack.setDailyDischargeCapacity(StringUtils.getBigDecimal(obj.get("DTFDDL")));
|
||||
dataStack.setDailyChargeCapacity(StringUtils.getBigDecimal(obj.get("DTCDDL")));
|
||||
|
||||
// 系统状态
|
||||
dataStack.setOperatingTemp(StringUtils.getBigDecimal(obj.get("YXWD")));
|
||||
dataStack.setBmsStatus(StringUtils.getString(obj.get("BMSDDQZT")));
|
||||
dataStack.setBmsChargeStatus(StringUtils.getString(obj.get("BMSCFDZT")));
|
||||
dataStack.setStackInsulationResistance(StringUtils.getBigDecimal(obj.get("DCDJYDZ")));
|
||||
|
||||
|
||||
dataStack.setCreateBy("system");
|
||||
dataStack.setCreateTime(DateUtils.getNowDate());
|
||||
dataStack.setUpdateBy("system");
|
||||
dataStack.setUpdateTime(DateUtils.getNowDate());
|
||||
dataStack.setSiteId(SITE_ID);
|
||||
dataStack.setDeviceId(deviceId);
|
||||
|
||||
emsBatteryStackMapper.insertEmsBatteryStack(dataStack);
|
||||
|
||||
redisCache.setCacheObject(RedisKeyConstants.STACK + SITE_ID + "_" +deviceId, dataStack);
|
||||
}
|
||||
|
||||
|
||||
private void batteryCluserDataProcess(String deviceId, String dataJson) {
|
||||
|
||||
Map<String, Object> obj = JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
EmsDevicesSetting joken = new EmsDevicesSetting();
|
||||
joken.setDeviceId(deviceId);
|
||||
List<EmsDevicesSetting> up = emsDevicesSettingMapper.selectEmsDevicesSettingList(joken);
|
||||
String stackDeviceId = "";
|
||||
if (up != null && up.size() >0) {
|
||||
stackDeviceId = up.get(0).getParentId();
|
||||
if (stackDeviceId != null || stackDeviceId.isEmpty()) {
|
||||
stackDeviceId = "1";
|
||||
}
|
||||
}
|
||||
//BMS 电池簇
|
||||
EmsBatteryCluster data = new EmsBatteryCluster();
|
||||
// 设置所有 BigDecimal 类型字段为 ZERO
|
||||
data.setChargeableCapacity(StringUtils.getBigDecimal(obj.get("KCDL")));
|
||||
data.setClusterVoltage(StringUtils.getBigDecimal(obj.get("ZDY")));
|
||||
data.setClusterCurrent(StringUtils.getBigDecimal(obj.get("ZDL")));
|
||||
data.setTotalChargedCapacity(StringUtils.getBigDecimal(obj.get("LJCDDL")));
|
||||
data.setDischargeableCapacity(StringUtils.getBigDecimal(obj.get("KFDL")));
|
||||
data.setTotalDischargedCapacity(StringUtils.getBigDecimal(obj.get("LJFDDL")));
|
||||
data.setSoh(StringUtils.getBigDecimal(obj.get("ZSOH")));
|
||||
data.setAverageTemperature(StringUtils.getBigDecimal(obj.get("MKWD")));
|
||||
data.setInsulationResistance(StringUtils.getBigDecimal(obj.get("ZJYDZ")));
|
||||
data.setCurrentSoc(StringUtils.getBigDecimal(obj.get("ZSOC")));
|
||||
data.setMaxAllowedChargePower(StringUtils.getBigDecimal(obj.get("YXCDZDGL")));
|
||||
data.setMaxAllowedDischargePower(StringUtils.getBigDecimal(obj.get("YXFDZDGL")));
|
||||
data.setMaxAllowedChargeVoltage(StringUtils.getBigDecimal(obj.get("YXCDZDDY")));
|
||||
data.setMaxAllowedDischargeVoltage(StringUtils.getBigDecimal(obj.get("YXFDZDDY")));
|
||||
data.setMaxAllowedChargeCurrent(StringUtils.getBigDecimal(obj.get("YXCDZDDL")));
|
||||
data.setMaxAllowedDischargeCurrent(StringUtils.getBigDecimal(obj.get("YXFDZDDL")));
|
||||
data.setBatteryPackVoltage(StringUtils.getBigDecimal(obj.get("ZDY")));
|
||||
data.setBatteryPackCurrent(StringUtils.getBigDecimal(obj.get("ZDL")));
|
||||
data.setBatteryPackTemp(StringUtils.getBigDecimal(obj.get("MKWD")));
|
||||
data.setBatteryPackSoc(StringUtils.getBigDecimal(obj.get("ZSOC")));
|
||||
data.setBatteryPackSoh(StringUtils.getBigDecimal(obj.get("ZSOH")));
|
||||
data.setBatteryPackInsulationResistance(StringUtils.getBigDecimal(obj.get("ZJYDZ")));
|
||||
data.setAvgCellVoltage(StringUtils.getBigDecimal(obj.get("PJDTDY")));
|
||||
data.setAvgCellTemp(StringUtils.getBigDecimal(obj.get("PJDTWD")));
|
||||
data.setMaxCellVoltage(StringUtils.getBigDecimal(obj.get("ZGDTDY")));
|
||||
data.setMinCellVoltage(StringUtils.getBigDecimal(obj.get("ZDDTDY")));
|
||||
data.setMaxCellTemp(StringUtils.getBigDecimal(obj.get("ZGDTWD")));
|
||||
data.setMinCellTemp(StringUtils.getBigDecimal(obj.get("ZDDTWD")));
|
||||
data.setMaxCellSoc(StringUtils.getBigDecimal(obj.get("ZGDTSOC")));
|
||||
data.setMinCellSoc(StringUtils.getBigDecimal(obj.get("ZDDTSOC")));
|
||||
data.setMaxCellSoh(StringUtils.getBigDecimal(obj.get("ZGDTSOH")));
|
||||
data.setMinCellSoh(StringUtils.getBigDecimal(obj.get("ZDDTSOH")));
|
||||
data.setTotalChargeEnergy(StringUtils.getBigDecimal(obj.get("DCLJCDDL")));
|
||||
data.setTotalDischargeEnergy(StringUtils.getBigDecimal(obj.get("DCLJFDDL")));
|
||||
|
||||
// 其他非 BigDecimal 字段
|
||||
data.setWorkStatus(WorkStatus.NORMAL.getCode()); // 或其他默认值
|
||||
data.setPcsCommunicationStatus(CommunicationStatus.OK.getCode());
|
||||
data.setEmsCommunicationStatus(CommunicationStatus.OK.getCode());
|
||||
data.setCreateBy("system");
|
||||
data.setCreateTime(DateUtils.getNowDate());
|
||||
data.setUpdateBy("system");
|
||||
data.setUpdateTime(DateUtils.getNowDate());
|
||||
data.setSiteId(SITE_ID);
|
||||
data.setDeviceId(deviceId);
|
||||
data.setMaxCellVoltageId(StringUtils.getLong(obj.get("ZGDTDYDYD")));
|
||||
data.setMinCellVoltageId(StringUtils.getLong(obj.get("ZDDTDYDYD")));
|
||||
data.setMaxCellTempId(StringUtils.getLong(obj.get("ZGDTWDDYD")));
|
||||
data.setMinCellTempId(StringUtils.getLong(obj.get("ZDDTWDDYD")));
|
||||
data.setMaxCellSocId(StringUtils.getLong(obj.get("ZGDTSOCDYD")));
|
||||
data.setMinCellSocId(StringUtils.getLong(obj.get("ZDDTSOCDYD")));
|
||||
data.setMaxCellSohId(StringUtils.getLong(obj.get("ZGDTSOHDYD")));
|
||||
data.setMinCellSohId(StringUtils.getLong(obj.get("ZDDTSOHDYD")));
|
||||
if (StringUtils.isNotBlank(stackDeviceId)) {
|
||||
data.setStackDeviceId(stackDeviceId);
|
||||
} else {
|
||||
data.setStackDeviceId("1");
|
||||
}
|
||||
emsBatteryClusterMapper.insertEmsBatteryCluster(data);
|
||||
|
||||
redisCache.setCacheObject(RedisKeyConstants.CLUSTER + SITE_ID + "_" +deviceId, data);
|
||||
|
||||
}
|
||||
|
||||
private void batteryDataProcess(String deviceId, String dataJson) {
|
||||
EmsDevicesSetting joken = new EmsDevicesSetting();
|
||||
joken.setDeviceId(deviceId);
|
||||
List<EmsDevicesSetting> up = emsDevicesSettingMapper.selectEmsDevicesSettingList(joken);
|
||||
String stackDeviceId = "";
|
||||
if (up != null && up.size() >0) {
|
||||
stackDeviceId = up.get(0).getParentId();
|
||||
if (stackDeviceId != null || stackDeviceId.isEmpty()) {
|
||||
stackDeviceId = "1";
|
||||
}
|
||||
}
|
||||
//单体电池
|
||||
Map<String, Map<String, Object>> records = processData(JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {}));
|
||||
List<EmsBatteryData> list = new ArrayList<>();
|
||||
//单体电池
|
||||
for (Map.Entry<String, Map<String, Object>> record : records.entrySet()) {
|
||||
String recordId = record.getKey();
|
||||
Map<String, Object> fields = record.getValue();
|
||||
|
||||
EmsBatteryData batteryData = new EmsBatteryData();
|
||||
batteryData.setDeviceId(recordId);
|
||||
batteryData.setBatteryCellId(recordId);
|
||||
batteryData.setSoc(StringUtils.getBigDecimal(fields.get("DTSOC")));
|
||||
batteryData.setSoh(StringUtils.getBigDecimal(fields.get("DTSOH")));
|
||||
batteryData.setTemperature(StringUtils.getBigDecimal(fields.get("DTWD")));
|
||||
batteryData.setVoltage(StringUtils.getBigDecimal(fields.get("DTDY")));
|
||||
|
||||
batteryData.setBatteryCluster(deviceId);
|
||||
batteryData.setBatteryPack(stackDeviceId);
|
||||
|
||||
// 时间戳
|
||||
batteryData.setDataTimestamp(new Date());
|
||||
|
||||
// ID字段
|
||||
batteryData.setSiteId(SITE_ID);
|
||||
batteryData.setClusterDeviceId(deviceId);
|
||||
|
||||
list.add(batteryData);
|
||||
}
|
||||
if (list.size() > 0 ) {
|
||||
emsBatteryDataMapper.insertEmsBatteryDataList(list);
|
||||
|
||||
redisCache.deleteList(RedisKeyConstants.BATTERY + SITE_ID + "_" +deviceId);
|
||||
redisCache.setCacheList(RedisKeyConstants.BATTERY + SITE_ID + "_" +deviceId, list);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void pcsDataProcess(String deviceId, String dataJson) {
|
||||
Map<String, Object> obj = JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
//pcs
|
||||
EmsPcsData pcsData = new EmsPcsData();
|
||||
// 时间与状态类字段
|
||||
pcsData.setDataUpdateTime(new Date());
|
||||
pcsData.setWorkStatus(WorkStatus.NORMAL.getCode());
|
||||
pcsData.setGridStatus(GridStatus.GRID.getCode());
|
||||
pcsData.setDeviceStatus(DeviceStatus.ONLINE.getCode());
|
||||
pcsData.setControlMode(ControlModeStatus.REMOTE.getCode());
|
||||
|
||||
// 功率与能量类字段
|
||||
pcsData.setTotalActivePower(StringUtils.getBigDecimal(obj.get("JLCCDYGGL")));
|
||||
pcsData.setDailyAcChargeEnergy(StringUtils.getBigDecimal(obj.get("RCDL")));
|
||||
pcsData.setTotalReactivePower(StringUtils.getBigDecimal(obj.get("JLCRXWGGL")));
|
||||
pcsData.setDailyAcDischargeEnergy(StringUtils.getBigDecimal(obj.get("RFDL")));
|
||||
pcsData.setTotalApparentPower(StringUtils.getBigDecimal(obj.get("XTSZGL")));
|
||||
pcsData.setTotalPowerFactor(StringUtils.getBigDecimal(obj.get("GLYS")));
|
||||
pcsData.setDcPower(StringUtils.getBigDecimal(obj.get("XTSZGL")));
|
||||
pcsData.setTotalAcChargeEnergy(StringUtils.getBigDecimal(obj.get("ZCDL")));
|
||||
pcsData.setTotalAcDischargeEnergy(StringUtils.getBigDecimal(obj.get("ZFDL")));
|
||||
pcsData.setAcChargeActivePower(StringUtils.getBigDecimal(obj.get("JLCCDYGGL")));
|
||||
pcsData.setAcCapacitiveReactivePower(StringUtils.getBigDecimal(obj.get("JLCRXWGGL")));
|
||||
pcsData.setAcDischargeActivePower(StringUtils.getBigDecimal(obj.get("JLCFDYGGL")));
|
||||
pcsData.setAcInductiveReactivePower(StringUtils.getBigDecimal(obj.get("JLCGXWGGL")));
|
||||
pcsData.setMaxCapacitivePowerCapacity(StringUtils.getBigDecimal(obj.get("ZDRXWGNL")));
|
||||
pcsData.setMaxInductivePowerCapacity(StringUtils.getBigDecimal(obj.get("ZDGXWGNL")));
|
||||
pcsData.setMaxChargePowerCapacity(StringUtils.getBigDecimal(obj.get("ZDKCGL")));
|
||||
pcsData.setMaxDischargePowerCapacity(StringUtils.getBigDecimal(obj.get("ZDKFGL")));
|
||||
|
||||
|
||||
// 温度与环境参数
|
||||
// pcsData.setPcsModuleTemperature(StringUtils.getBigDecimal(obj.get("ChargeableCapacity")));
|
||||
// pcsData.setPcsEnvironmentTemperature(StringUtils.getBigDecimal(obj.get("ChargeableCapacity")));
|
||||
// pcsData.setAcFrequency(StringUtils.getBigDecimal(obj.get("ChargeableCapacity")));
|
||||
|
||||
// 状态指示类
|
||||
pcsData.setBranchStatus(BranchStatus.NORMAL.getCode());
|
||||
pcsData.setDischargeStatus(ChargeStatus.CHARGING.getCode());
|
||||
String acSwitchStatus = StringUtils.getString(obj.get("JLKGZT"));
|
||||
pcsData.setAcSwitchStatus(SwitchStatus.CLOSED.getCode());
|
||||
String dcSwitchStatus = StringUtils.getString(obj.get("ZLKGZT"));
|
||||
pcsData.setDcSwitchStatus(SwitchStatus.CLOSED.getCode());
|
||||
String controlMode = StringUtils.getString(obj.get("YCTT"));
|
||||
pcsData.setRemoteControlStatus(ControlModeStatus.REMOTE.getCode());
|
||||
|
||||
// 直流参数
|
||||
// pcsData.setDcVoltage(StringUtils.getBigDecimal(obj.get("ChargeableCapacity")));
|
||||
// pcsData.setDcCurrent(StringUtils.getBigDecimal(obj.get("ChargeableCapacity")));
|
||||
|
||||
// 系统管理字段
|
||||
pcsData.setCreateBy("system");
|
||||
pcsData.setCreateTime(DateUtils.getNowDate());
|
||||
pcsData.setUpdateBy("system");
|
||||
pcsData.setUpdateTime(DateUtils.getNowDate());
|
||||
pcsData.setSiteId(SITE_ID);
|
||||
pcsData.setDeviceId(deviceId);
|
||||
pcsData.setDateMonth(DateUtils.getNowMonthLong());
|
||||
pcsData.setDateDay(DateUtils.getNowDayLong());
|
||||
|
||||
emsPcsDataMapper.insertEmsPcsData(pcsData);
|
||||
redisCache.setCacheObject(RedisKeyConstants.PCS + SITE_ID + "_" +deviceId, pcsData);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void pcsBranchDataProcess(String deviceId, String dataJson) {
|
||||
|
||||
Map<String, Map<String, Object>> records = processDataPrefix(JSON.parseObject(dataJson, new TypeReference<Map<String, Object>>() {}));
|
||||
List<EmsPcsBranchData> list = new ArrayList<>();
|
||||
|
||||
//PCS支路
|
||||
for (Map.Entry<String, Map<String, Object>> record : records.entrySet()) {
|
||||
String recordId = record.getKey();
|
||||
Map<String, Object> fields = record.getValue();
|
||||
|
||||
EmsPcsBranchData data = new EmsPcsBranchData();
|
||||
data.setDeviceId(deviceId);
|
||||
data.setGridStatus(GridStatus.GRID.getCode());
|
||||
data.setDcPower(StringUtils.getBigDecimal(fields.get("ZLGL")));
|
||||
data.setDcVoltage(StringUtils.getBigDecimal(fields.get("ZLDY")));
|
||||
data.setDcCurrent(StringUtils.getBigDecimal(fields.get("ZLDL")));
|
||||
data.setGridUVoltage(StringUtils.getBigDecimal(fields.get("DWVXDY")));
|
||||
data.setGridVVoltage(StringUtils.getBigDecimal(fields.get("DWUXDY")));
|
||||
data.setGridWVoltage(StringUtils.getBigDecimal(fields.get("DWWXDY")));
|
||||
data.setOutputUCurrent(StringUtils.getBigDecimal(fields.get("SCUXDL")));
|
||||
data.setOutputVCurrent(StringUtils.getBigDecimal(fields.get("SCVXDL")));
|
||||
data.setOutputWCurrent(StringUtils.getBigDecimal(fields.get("SCWXDL")));
|
||||
data.setApparentPower(StringUtils.getBigDecimal(fields.get("SZGL")));
|
||||
data.setActivePower(StringUtils.getBigDecimal(fields.get("YGGL")));
|
||||
data.setReactivePower(StringUtils.getBigDecimal(fields.get("WGGL")));
|
||||
data.setPowerFactor(StringUtils.getBigDecimal(fields.get("GLYS")));
|
||||
data.setFrequency(StringUtils.getBigDecimal(fields.get("PL")));
|
||||
data.setInternalTemp(StringUtils.getBigDecimal(fields.get("DY1WD")));
|
||||
data.setuIgbtTemp(StringUtils.getBigDecimal(fields.get("UXIGBTWD")));
|
||||
data.setvIgbtTemp(StringUtils.getBigDecimal(fields.get("VXIGBTWD")));
|
||||
data.setwIgbtTemp(StringUtils.getBigDecimal(fields.get("WXIGBTWD")));
|
||||
data.setAvailablePower(StringUtils.getBigDecimal(fields.get("KYGL")));
|
||||
data.setTotalLoadRatio(StringUtils.getBigDecimal(fields.get("ZFZB")));
|
||||
data.setAcLeakageCurrent(StringUtils.getBigDecimal(fields.get("JLLDL")));
|
||||
data.setInsulationResistance(StringUtils.getBigDecimal(fields.get("JYZK")));
|
||||
data.setBranchId(recordId);
|
||||
list.add(data);
|
||||
}
|
||||
if (list.size() > 0 ) {
|
||||
emsPcsBranchDataMapper.insertPcsBranchDataList(list);
|
||||
|
||||
redisCache.setCacheObject(RedisKeyConstants.BRANCH + SITE_ID + "_" +deviceId, list);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 数据分组处理
|
||||
private static Map<String, Map<String, Object>> processData(Map<String, Object> rawData) {
|
||||
Map<String, Map<String, Object>> records = new HashMap<>();
|
||||
|
||||
for (Map.Entry<String, Object> entry : rawData.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
// 提取记录ID(最后3位)
|
||||
String recordId = key.substring(key.length() - 3);
|
||||
try {
|
||||
Long.parseLong(recordId);
|
||||
} catch (Exception e) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 提取字段类型(前缀)
|
||||
String fieldType = key.substring(0, key.length() - 3);
|
||||
|
||||
// 初始化记录
|
||||
records.putIfAbsent(recordId, new HashMap<>());
|
||||
// 存入字段值
|
||||
records.get(recordId).put(fieldType, entry.getValue());
|
||||
}
|
||||
return records;
|
||||
}
|
||||
|
||||
private static Map<String, Map<String, Object>> processDataPrefix(Map<String, Object> rawData) {
|
||||
Map<String, Map<String, Object>> records = new HashMap<>();
|
||||
|
||||
for (Map.Entry<String, Object> entry : rawData.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
// 确保键长度足够
|
||||
if (key.length() < 3) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 提取记录ID(前3位)
|
||||
String recordId = key.substring(0, 3);
|
||||
if (!recordId.startsWith("DY")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 提取字段类型(剩余部分)
|
||||
String fieldType = key.substring(3);
|
||||
|
||||
// 初始化记录
|
||||
records.putIfAbsent(recordId, new HashMap<>());
|
||||
// 存入字段值
|
||||
records.get(recordId).put(fieldType, entry.getValue());
|
||||
}
|
||||
return records;
|
||||
}
|
||||
|
||||
}
|
@ -22,6 +22,7 @@ import java.util.*;
|
||||
@Service
|
||||
public class HomePageServiceImpl implements IHomePageService
|
||||
{
|
||||
private static final int LIMIT_TIME = 6;
|
||||
|
||||
@Autowired
|
||||
private IEmsSiteService emsSiteService;
|
||||
@ -37,34 +38,42 @@ public class HomePageServiceImpl implements IHomePageService
|
||||
SiteTotalInfoVo siteTotalInfoVo = new SiteTotalInfoVo();
|
||||
siteTotalInfoVo = emsSiteService.getSiteTotalInfo();
|
||||
// 获取总充+总放
|
||||
Map<String,BigDecimal> pcsMap = new HashMap<>();
|
||||
pcsMap = emsPcsDataMapper.getPcsTotalChargeData();
|
||||
Map<String,BigDecimal> pcsMap = emsPcsDataMapper.getPcsTotalChargeData(null);
|
||||
if(pcsMap != null){
|
||||
siteTotalInfoVo.setTotalChargedCap(pcsMap.get("totalChargedCap"));
|
||||
siteTotalInfoVo.setTotalDischargedCap(pcsMap.get("totalDischargedCap"));
|
||||
}
|
||||
return siteTotalInfoVo;
|
||||
}
|
||||
|
||||
// 单站点基本信息
|
||||
@Override
|
||||
public SingleSiteBaseInfo getSingleSiteBaseInfo(Long siteId) {
|
||||
public SingleSiteBaseInfo getSingleSiteBaseInfo(String siteId) {
|
||||
SingleSiteBaseInfo singleSiteBaseInfo = new SingleSiteBaseInfo();
|
||||
|
||||
if (siteId != null) {
|
||||
if (!StringUtils.isEmpty(siteId)) {
|
||||
// 站点基本信息
|
||||
EmsSiteSetting emsSite = emsSiteMapper.selectEmsSiteSettingById(siteId);
|
||||
EmsSiteSetting emsSite = emsSiteMapper.selectEmsSiteSettingBySiteId(siteId);
|
||||
if (emsSite != null) {
|
||||
// 装机功率+装机容量
|
||||
singleSiteBaseInfo.setSiteName(emsSite.getSiteName());
|
||||
singleSiteBaseInfo.setInstalledCap(emsSite.getInstallCapacity());
|
||||
singleSiteBaseInfo.setInstalledPower(emsSite.getInstallPower());
|
||||
singleSiteBaseInfo.setInstallCapacity(emsSite.getInstallCapacity());
|
||||
singleSiteBaseInfo.setInstallPower(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()));//投运时间
|
||||
singleSiteBaseInfo.setRunningTime(emsSite.getRunningTime() == null ? null :
|
||||
DateUtils.parseDateToStr("yyyy-MM-dd",emsSite.getRunningTime()));//投运时间
|
||||
// 获取单站点的总充+总放
|
||||
Map<String,BigDecimal> pcsMap = emsPcsDataMapper.getPcsTotalChargeData(siteId);
|
||||
if (pcsMap != null) {
|
||||
singleSiteBaseInfo.setTotalChargedCap(pcsMap.get("totalChargedCap"));
|
||||
singleSiteBaseInfo.setTotalDisChargedCap(pcsMap.get("totalDischargedCap"));
|
||||
}
|
||||
// 七天放电数据统计
|
||||
List<SiteMonitorDataVo> siteMonitorDataVoList = emsPcsDataMapper.getPcsDataBySiteId(siteId);
|
||||
List<SiteMonitorDataVo> siteMonitorDataVoList = emsPcsDataMapper.getPcsDataBySiteId(siteId,LIMIT_TIME);
|
||||
singleSiteBaseInfo.setSevenDayDisChargeStats(siteMonitorDataVoList);
|
||||
// 充放电基本数据处理
|
||||
dealSitePCSDate(singleSiteBaseInfo,siteMonitorDataVoList);
|
||||
@ -76,27 +85,15 @@ public class HomePageServiceImpl implements IHomePageService
|
||||
|
||||
private void dealSitePCSDate(SingleSiteBaseInfo singleSiteBaseInfo, List<SiteMonitorDataVo> siteMonitorDataVoList) {
|
||||
if (siteMonitorDataVoList != null && !siteMonitorDataVoList.isEmpty()) {
|
||||
BigDecimal dayChargeCap = new BigDecimal(0);
|
||||
BigDecimal dayDisChargeCap = new BigDecimal(0);
|
||||
BigDecimal totalChargeCap = new BigDecimal(0);
|
||||
BigDecimal totalDisChargeCap = new BigDecimal(0);
|
||||
for (SiteMonitorDataVo sitePcsData : siteMonitorDataVoList) {
|
||||
// 总充电量
|
||||
totalChargeCap = totalChargeCap.add(sitePcsData.getChargedCap());
|
||||
// 总放电量
|
||||
totalDisChargeCap = totalDisChargeCap.add(sitePcsData.getDisChargedCap());
|
||||
// 获取当天的充电量+放电量
|
||||
String pcsDate = sitePcsData.getAmmeterDate();
|
||||
boolean isToday= checkIsToday(pcsDate);
|
||||
if(isToday){
|
||||
dayChargeCap = dayChargeCap.add(sitePcsData.getChargedCap());
|
||||
dayDisChargeCap = dayDisChargeCap.add(sitePcsData.getDisChargedCap());
|
||||
singleSiteBaseInfo.setDayChargedCap(sitePcsData.getChargedCap());
|
||||
singleSiteBaseInfo.setDayDisChargedCap(sitePcsData.getDisChargedCap());
|
||||
}
|
||||
}
|
||||
singleSiteBaseInfo.setDayChargedCap(dayChargeCap);
|
||||
singleSiteBaseInfo.setDayDisChargedCap(dayDisChargeCap);
|
||||
singleSiteBaseInfo.setTotalChargedCap(totalChargeCap);
|
||||
singleSiteBaseInfo.setTotalDisChargedCap(totalDisChargeCap);
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,17 +119,14 @@ public class HomePageServiceImpl implements IHomePageService
|
||||
public HomePageDataViewVo getHomePageDataList() {
|
||||
HomePageDataViewVo homePageDataViewVo = new HomePageDataViewVo();
|
||||
// 电量指标
|
||||
List<ElectricIndexList> electricDataList = new ArrayList();
|
||||
electricDataList = emsPcsDataMapper.getElectDataList();
|
||||
List<ElectricIndexList> electricDataList = emsPcsDataMapper.getElectDataList();
|
||||
homePageDataViewVo.setElecDataList(electricDataList);
|
||||
// 系统效率
|
||||
// 告警趋势
|
||||
List<AlarmTrendList> alarmTrendList = new ArrayList();
|
||||
alarmTrendList = alarmRecordsMapper.getAlarmTrendList();
|
||||
List<AlarmTrendList> alarmTrendList = alarmRecordsMapper.getAlarmTrendList();
|
||||
homePageDataViewVo.setAlarmDataList(alarmTrendList);
|
||||
// 设备告警占比
|
||||
List<DeviceAlarmProportionList> deviceAlarmPropList = new ArrayList();
|
||||
deviceAlarmPropList = alarmRecordsMapper.getDeviceAlarmPropList();
|
||||
List<DeviceAlarmProportionList> deviceAlarmPropList = alarmRecordsMapper.getDeviceAlarmPropList();
|
||||
homePageDataViewVo.setDeviceAlarmList(deviceAlarmPropList);
|
||||
// 告警等级分布
|
||||
return homePageDataViewVo;
|
||||
|
@ -1,19 +1,20 @@
|
||||
package com.xzzn.ems.service.impl;
|
||||
|
||||
import com.xzzn.common.constant.RedisKeyConstants;
|
||||
import com.xzzn.common.core.redis.RedisCache;
|
||||
import com.xzzn.common.enums.DeviceCategory;
|
||||
import com.xzzn.common.utils.StringUtils;
|
||||
import com.xzzn.ems.domain.EmsBatteryData;
|
||||
import com.xzzn.ems.domain.EmsCoolingData;
|
||||
import com.xzzn.ems.domain.*;
|
||||
import com.xzzn.ems.domain.vo.*;
|
||||
import com.xzzn.ems.mapper.*;
|
||||
import com.xzzn.ems.service.ISingleSiteService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 单点监控 服务层实现
|
||||
@ -41,46 +42,46 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
private EmsPcsBranchDataMapper emsPcsBranchDataMapper;
|
||||
@Autowired
|
||||
private EmsCoolingDataMapper emsCoolingDataMapper;
|
||||
@Autowired
|
||||
private EmsAmmeterDataMapper emsAmmeterDataMapper;
|
||||
@Autowired
|
||||
private EmsDevicesSettingMapper emsDevicesSettingMapper;
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Override
|
||||
public SiteMonitorHomeVo getSiteMonitorDataVo(Long siteId) {
|
||||
public SiteMonitorHomeVo getSiteMonitorDataVo(String siteId) {
|
||||
SiteMonitorHomeVo siteMonitorHomeVo = new SiteMonitorHomeVo();
|
||||
|
||||
if (siteId != null) {
|
||||
if (!StringUtils.isEmpty(siteId)) {
|
||||
// 获取单站点的总充+总放+电网实时功率
|
||||
Map<String,BigDecimal> pcsMap = emsPcsDataMapper.getPcsTotalChargeData(siteId);
|
||||
if (pcsMap != null) {
|
||||
siteMonitorHomeVo.setTotalChargedCap(pcsMap.get("totalChargedCap"));
|
||||
siteMonitorHomeVo.setTotalDischargedCap(pcsMap.get("totalDischargedCap"));
|
||||
siteMonitorHomeVo.setGridNrtPower(pcsMap.get("gridNrtPower"));
|
||||
}
|
||||
// 实时告警数据 名称+状态+告警内容
|
||||
List<SiteMonitorHomeAlarmVo> siteMonitorHomeAlarmVo = emsAlarmRecordsMapper.getAlarmRecordsBySiteId(siteId);
|
||||
siteMonitorHomeVo.setSiteMonitorHomeAlarmVo(siteMonitorHomeAlarmVo);
|
||||
// 能量数据
|
||||
List<SiteMonitorDataVo> siteMonitorDataVoList = emsPcsDataMapper.getPcsDataBySiteId(siteId);
|
||||
List<SiteMonitorDataVo> siteMonitorDataVoList = emsPcsDataMapper.getPcsDataBySiteId(siteId,6);
|
||||
if (!CollectionUtils.isEmpty(siteMonitorDataVoList)) {
|
||||
BigDecimal dayChargeCap = new BigDecimal(0);
|
||||
BigDecimal dayDisChargeCap = new BigDecimal(0);
|
||||
BigDecimal totalChargeCap = new BigDecimal(0);
|
||||
BigDecimal totalDisChargeCap = new BigDecimal(0);
|
||||
for (SiteMonitorDataVo sitePcsData : siteMonitorDataVoList) {
|
||||
// 总充电量
|
||||
totalChargeCap = totalChargeCap.add(sitePcsData.getChargedCap());
|
||||
// 总放电量
|
||||
totalDisChargeCap = totalDisChargeCap.add(sitePcsData.getDisChargedCap());
|
||||
// 获取当天的充电量+放电量
|
||||
String pcsDate = sitePcsData.getAmmeterDate();
|
||||
boolean isToday= checkIsToday(pcsDate);
|
||||
if(isToday){
|
||||
dayChargeCap = dayChargeCap.add(sitePcsData.getChargedCap());
|
||||
dayDisChargeCap = dayDisChargeCap.add(sitePcsData.getDisChargedCap());
|
||||
siteMonitorHomeVo.setDayChargedCap(sitePcsData.getChargedCap());
|
||||
siteMonitorHomeVo.setDayDisChargedCap(sitePcsData.getDisChargedCap());
|
||||
}
|
||||
}
|
||||
siteMonitorHomeVo.setDayChargedCap(dayChargeCap);
|
||||
siteMonitorHomeVo.setDayDisChargedCap(dayDisChargeCap);
|
||||
siteMonitorHomeVo.setTotalChargedCap(totalChargeCap);
|
||||
siteMonitorHomeVo.setTotalDischargedCap(totalDisChargeCap);
|
||||
// 储能可用电量
|
||||
BigDecimal energyStorageAvailElec = siteMonitorHomeVo.getTotalDischargedCap().subtract(siteMonitorHomeVo.getTotalChargedCap());
|
||||
siteMonitorHomeVo.setEnergyStorageAvailElec(energyStorageAvailElec);
|
||||
}
|
||||
siteMonitorHomeVo.setSiteMonitorDataVo(siteMonitorDataVoList);
|
||||
// 电网实时功率
|
||||
siteMonitorHomeVo.setGridNrtPower(emsPcsDataMapper.getGridNrtPower(siteId));
|
||||
}
|
||||
|
||||
return siteMonitorHomeVo;
|
||||
@ -103,10 +104,10 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
|
||||
// 获取单站监控实时运行头部数据
|
||||
@Override
|
||||
public SiteMonitorRuningHeadInfoVo getSiteRunningHeadInfo(Long siteId) {
|
||||
SiteMonitorRuningHeadInfoVo siteMonitorRunningHeadInfoVo = new SiteMonitorRuningHeadInfoVo();
|
||||
public SiteMonitorRunningHeadInfoVo getSiteRunningHeadInfo(String siteId) {
|
||||
SiteMonitorRunningHeadInfoVo siteMonitorRunningHeadInfoVo = new SiteMonitorRunningHeadInfoVo();
|
||||
|
||||
if (siteId != null) {
|
||||
if (!StringUtils.isEmpty(siteId)) {
|
||||
// 实时有功功率/实时无功功率/今日充电量/今日放电量
|
||||
siteMonitorRunningHeadInfoVo = emsPcsDataMapper.getSiteRunningHeadInfo(siteId);
|
||||
// 电池簇SOC
|
||||
@ -123,9 +124,9 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
|
||||
// 获取单站监控实时运行曲线图数据
|
||||
@Override
|
||||
public SiteMonitorRuningInfoVo getRunningGraph(Long siteId) {
|
||||
public SiteMonitorRuningInfoVo getRunningGraph(String siteId) {
|
||||
SiteMonitorRuningInfoVo siteMonitorRuningInfoVo = new SiteMonitorRuningInfoVo();
|
||||
if (siteId != null) {
|
||||
if (!StringUtils.isEmpty(siteId)) {
|
||||
//储能功率list
|
||||
//pcs平均温度list
|
||||
//电池平均soclist
|
||||
@ -136,44 +137,70 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
|
||||
// 根据site_id获取pcs详细数据+支路数据
|
||||
@Override
|
||||
public List<PcsDetailInfoVo> getPcsDetailInfo(Long siteId) {
|
||||
public List<PcsDetailInfoVo> getPcsDetailInfo(String 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);
|
||||
if (!StringUtils.isEmpty(siteId)) {
|
||||
// 获取该设备下所有pcs的id
|
||||
List<Map<String, Object>> pcsIds = emsDevicesSettingMapper.getDeviceInfosBySiteIdAndCategory(siteId, DeviceCategory.PCS.getCode());
|
||||
|
||||
for (Map<String, Object> pcsDevice : pcsIds) {
|
||||
PcsDetailInfoVo pcsDetailInfoVo = new PcsDetailInfoVo();
|
||||
pcsDetailInfoVo.setDeviceName(pcsDevice.get("deviceName").toString());
|
||||
pcsDetailInfoVo.setCommunicationStatus(pcsDevice.get("communicationStatus").toString());
|
||||
// 从redis取pcs单个详细数据
|
||||
String pcsId = pcsDevice.get("id").toString();
|
||||
EmsPcsData pcsData = redisCache.getCacheObject(RedisKeyConstants.PCS +siteId+"_"+pcsId);
|
||||
if (pcsData != null) {
|
||||
BeanUtils.copyProperties(pcsData, pcsDetailInfoVo);
|
||||
}
|
||||
// 支路信息数据
|
||||
List<PcsBranchInfo> pcsBranchInfoList = new ArrayList<>();
|
||||
processBranchDataInfo(siteId,pcsId,pcsBranchInfoList);
|
||||
pcsDetailInfoVo.setPcsBranchInfoList(pcsBranchInfoList);
|
||||
}
|
||||
}
|
||||
|
||||
pcsDetailInfoVoList.add(pcsDetailInfoVo);
|
||||
}
|
||||
}
|
||||
return pcsDetailInfoVoList;
|
||||
}
|
||||
|
||||
private void processBranchDataInfo(String siteId, String pcsId, List<PcsBranchInfo> pcsBranchInfoList) {
|
||||
if (!StringUtils.isEmpty(pcsId)) {
|
||||
List<EmsPcsBranchData> pcsBranchData = redisCache.getCacheObject(RedisKeyConstants.BRANCH +siteId+"_"+pcsId);
|
||||
if (pcsBranchData != null) {
|
||||
for(EmsPcsBranchData emsPcsBranchData : pcsBranchData) {
|
||||
PcsBranchInfo pcsBranchInfo = new PcsBranchInfo();
|
||||
BeanUtils.copyProperties(emsPcsBranchData, pcsBranchInfo);
|
||||
pcsBranchInfoList.add(pcsBranchInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 获取BMS总览数据
|
||||
@Override
|
||||
public List<BMSOverViewVo> getBMSOverView(Long siteId) {
|
||||
public List<BMSOverViewVo> getBMSOverView(String 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);
|
||||
// 获取所有电池堆
|
||||
if (!StringUtils.isEmpty(siteId)) {
|
||||
List<Map<String, Object>> stackIds = emsDevicesSettingMapper.getDeviceInfosBySiteIdAndCategory(siteId, DeviceCategory.STACK.getCode());
|
||||
for (Map<String, Object> stackDevice : stackIds) {
|
||||
BMSOverViewVo bmsOverViewVo = new BMSOverViewVo();
|
||||
bmsOverViewVo.setDeviceName(stackDevice.get("deviceName").toString());
|
||||
// 从redis取堆单个详细数据
|
||||
String stackId = stackDevice.get("id").toString();
|
||||
EmsBatteryStack stackData = redisCache.getCacheObject(RedisKeyConstants.STACK +siteId+"_"+stackId);
|
||||
if (stackData != null) {
|
||||
BeanUtils.copyProperties(stackData, bmsOverViewVo);
|
||||
}
|
||||
// 列表数据
|
||||
if (!StringUtils.isEmpty(stackId)) {
|
||||
List<BMSBatteryDataList> batteryDataList = emsBatteryClusterMapper.getBmsBatteryData(siteId,stackId);
|
||||
bmsOverViewVo.setBatteryDataList(batteryDataList);
|
||||
}
|
||||
}
|
||||
bmsOverViewVoList.add(bmsOverViewVo);
|
||||
}
|
||||
}
|
||||
return bmsOverViewVoList;
|
||||
@ -181,81 +208,133 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
|
||||
|
||||
// 获取BMS电池簇数据
|
||||
@Override
|
||||
public List<BMSBatteryClusterVo> getBMSBatteryCluster(Long siteId) {
|
||||
public List<BMSBatteryClusterVo> getBMSBatteryCluster(String 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();
|
||||
if (!StringUtils.isEmpty(siteId)) {
|
||||
// 获取所有设备下的电池簇id
|
||||
List<Map<String, Object>> clusterIds = emsDevicesSettingMapper.getDeviceInfosBySiteIdAndCategory(siteId, DeviceCategory.CLUSTER.getCode());
|
||||
for (Map<String, Object> clusterDevice : clusterIds) {
|
||||
BMSBatteryClusterVo bmsBatteryClusterVo = new BMSBatteryClusterVo();
|
||||
bmsBatteryClusterVo.setDeviceName(clusterDevice.get("deviceName").toString());
|
||||
// 从redis取单个簇详细数据
|
||||
String clusterId = clusterDevice.get("id").toString();
|
||||
EmsBatteryCluster clusterData = redisCache.getCacheObject(RedisKeyConstants.CLUSTER +siteId+"_"+clusterId);
|
||||
if (clusterData != null) {
|
||||
BeanUtils.copyProperties(clusterData, bmsBatteryClusterVo);
|
||||
// 处理单体电池数据-平均/最大/最小
|
||||
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);
|
||||
}
|
||||
dealWithBatteryClusterData(clusterData,clusterDataList);
|
||||
bmsBatteryClusterVo.setBatteryDataList(clusterDataList);
|
||||
}
|
||||
}
|
||||
|
||||
bmsBatteryClusterVoList.add(bmsBatteryClusterVo);
|
||||
}
|
||||
}
|
||||
return bmsBatteryClusterVoList;
|
||||
}
|
||||
|
||||
private void dealWithBatteryClusterData(EmsBatteryCluster clusterData, List<BMSBatteryClusterDataList> clusterDataList) {
|
||||
BMSBatteryClusterDataList voltageData = new BMSBatteryClusterDataList();
|
||||
BMSBatteryClusterDataList tempData = new BMSBatteryClusterDataList();
|
||||
BMSBatteryClusterDataList socData = new BMSBatteryClusterDataList();
|
||||
|
||||
// 设值
|
||||
voltageData.setDataName(CLUSTER_DATA_VOLTAGE);
|
||||
voltageData.setAvgData(clusterData.getAvgCellVoltage());
|
||||
voltageData.setMaxData(clusterData.getMaxCellVoltage());
|
||||
voltageData.setMaxDataID(clusterData.getMaxCellVoltageId().toString());
|
||||
voltageData.setMinData(clusterData.getMinCellVoltage());
|
||||
voltageData.setMinDataID(clusterData.getMinCellVoltageId().toString());
|
||||
tempData.setDataName(CLUSTER_DATA_TEP);
|
||||
tempData.setAvgData(clusterData.getAvgCellTemp());
|
||||
tempData.setMaxData(clusterData.getMaxCellTemp());
|
||||
tempData.setMaxDataID(clusterData.getMaxCellTempId().toString());
|
||||
tempData.setMinData(clusterData.getMinCellTemp());
|
||||
tempData.setMinDataID(clusterData.getMinCellTempId().toString());
|
||||
socData.setDataName(CLUSTER_DATA_SOC);
|
||||
socData.setAvgData(clusterData.getCurrentSoc());
|
||||
socData.setMaxData(clusterData.getMaxCellSoc());
|
||||
socData.setMaxDataID(clusterData.getMaxCellSocId().toString());
|
||||
socData.setMinData(clusterData.getMinCellSoc());
|
||||
socData.setMinDataID(clusterData.getMinCellSocId().toString());
|
||||
|
||||
clusterDataList.add(voltageData);
|
||||
clusterDataList.add(tempData);
|
||||
clusterDataList.add(socData);
|
||||
}
|
||||
|
||||
// 获取液冷设备参数
|
||||
@Override
|
||||
public List<EmsCoolingData> getCoolingDataList(Long siteId) {
|
||||
public List<EmsCoolingData> getCoolingDataList(String siteId) {
|
||||
List<EmsCoolingData> emsCoolingDataList = new ArrayList<>();
|
||||
if (siteId != null) {
|
||||
if (!StringUtils.isEmpty(siteId)) {
|
||||
emsCoolingDataList = emsCoolingDataMapper.getCoolingDataList(siteId);
|
||||
}
|
||||
return emsCoolingDataList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据电池堆获取单体电池数据
|
||||
* @param clusterDeviceId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<BatteryDataStatsListVo> getClusterDataInfoList(String clusterDeviceId,String siteId) {
|
||||
List<BatteryDataStatsListVo> batteryDataStatsListVo = new ArrayList<>();
|
||||
List<Map<String, Object>> clusterIds = new ArrayList<>();
|
||||
if (StringUtils.isEmpty(clusterDeviceId)) {
|
||||
clusterIds = emsDevicesSettingMapper.getDeviceInfosBySiteIdAndCategory(siteId, DeviceCategory.CLUSTER.getCode());
|
||||
} else {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("id", clusterDeviceId);
|
||||
clusterIds.add(map);
|
||||
}
|
||||
for (Map<String, Object> clusterDevice : clusterIds) {
|
||||
// 从redis取单个簇详细数据
|
||||
String clusterId = clusterDevice.get("id").toString();
|
||||
List<EmsBatteryData> batteryDataList = redisCache.getCacheList(RedisKeyConstants.BATTERY + siteId + "_" + clusterId);
|
||||
if (batteryDataList != null) {
|
||||
for (EmsBatteryData batteryData : batteryDataList) {
|
||||
BatteryDataStatsListVo batteryDataStatsVo = new BatteryDataStatsListVo();
|
||||
BeanUtils.copyProperties(batteryData, batteryDataStatsVo);
|
||||
batteryDataStatsListVo.add(batteryDataStatsVo);
|
||||
}
|
||||
}
|
||||
}
|
||||
return batteryDataStatsListVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 电表数据信息
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<AmmeterDataVo> getAmmeterDataList(String siteId) {
|
||||
List<AmmeterDataVo> ammeterDataVos = new ArrayList<>();
|
||||
|
||||
if (!StringUtils.isEmpty(siteId)) {
|
||||
// 先获取所有电表设备
|
||||
List<EmsDevicesSetting> devicesList = emsDevicesSettingMapper.getAllBatteryDeviceBySiteId(siteId);
|
||||
if (!CollectionUtils.isEmpty(devicesList)) {
|
||||
for (EmsDevicesSetting devicesSetting : devicesList) {
|
||||
AmmeterDataVo ammeterDataVo = new AmmeterDataVo();
|
||||
ammeterDataVo.setDeviceName(devicesSetting.getDeviceName());
|
||||
ammeterDataVo.setEmsCommunicationStatus(devicesSetting.getCommunicationStatus());
|
||||
String deviceId = devicesSetting.getDeviceId();
|
||||
// 获取类别数据
|
||||
List<AmmeterDataDetailInfo> ammeterDataDetailInfos = emsAmmeterDataMapper.getAmmeterDetailInfo(siteId,deviceId);
|
||||
ammeterDataVo.setAmmeterDataDetailInfos(ammeterDataDetailInfos);
|
||||
// 数据更新时间
|
||||
ammeterDataVo.setDataUpdateTime(ammeterDataDetailInfos.get(0).getUpdateTime());
|
||||
|
||||
ammeterDataVos.add(ammeterDataVo);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ammeterDataVos;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -35,8 +35,8 @@
|
||||
<if test="alarmStartTime != null "> and alarm_start_time = #{alarmStartTime}</if>
|
||||
<if test="alarmEndTime != null "> and alarm_end_time = #{alarmEndTime}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="siteId != null "> and site_id = #{siteId}</if>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
<if test="siteId != null and siteId != ''"> and site_id = #{siteId}</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
@ -61,7 +61,7 @@
|
||||
<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="deviceId != null and deviceId != ''">device_id,</if>
|
||||
<if test="deviceName != null and deviceName != ''">device_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
@ -77,7 +77,7 @@
|
||||
<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="deviceId != null and deviceId != ''">#{deviceId},</if>
|
||||
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
@ -97,7 +97,7 @@
|
||||
<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="deviceId != null and deviceId != ''">device_id = #{deviceId},</if>
|
||||
<if test="deviceName != null and deviceName != ''">device_name = #{deviceName},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
@ -114,7 +114,7 @@
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getAlarmRecordsBySiteId" parameterType="Long" resultType="com.xzzn.ems.domain.vo.SiteMonitorHomeAlarmVo">
|
||||
<select id="getAlarmRecordsBySiteId" parameterType="String" resultType="com.xzzn.ems.domain.vo.SiteMonitorHomeAlarmVo">
|
||||
select device_name as deviceName,
|
||||
status,alarm_content as alarmContent
|
||||
from ems_alarm_records
|
||||
@ -132,4 +132,22 @@
|
||||
from ems_alarm_records
|
||||
group by device_type
|
||||
</select>
|
||||
|
||||
<select id="getAlarmRecordDetailList" parameterType="AlarmRecordListRequestVo" resultType="com.xzzn.ems.domain.vo.AlarmRecordListResponseVo">
|
||||
select t.device_name as deviceName,t.alarm_level as alarmLevel,
|
||||
t.alarm_content as alarmContent,t.status as status,
|
||||
t.alarm_start_time as alarmStartTime,t.alarm_end_time as alarmEndTime
|
||||
from ems_alarm_records t
|
||||
where t.site_id = #{siteId}
|
||||
<if test="deviceType != null and deviceType != ''">
|
||||
AND t.device_type = #{deviceType}
|
||||
</if>
|
||||
<if test="alarmLevel != null and alarmLevel != ''">
|
||||
AND t.alarm_level = #{alarmLevel}
|
||||
</if>
|
||||
<if test="alarmStartTime != null and alarmStartTime != null and alarmEndTime != null and alarmEndTime != ''">
|
||||
AND (date_format(t.alarm_start_time,'%Y%m%d') BETWEEN date_format(#{alarmStartTime},'%Y%m%d') and date_format(#{alarmEndTime},'%Y%m%d')
|
||||
or date_format(t.alarm_end_time,'%Y%m%d') BETWEEN date_format(#{alarmStartTime},'%Y%m%d') and date_format(#{alarmEndTime},'%Y%m%d') )
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,137 @@
|
||||
<?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.EmsAmmeterDataMapper">
|
||||
|
||||
<resultMap type="EmsAmmeterData" id="EmsAmmeterDataResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="dataUpdateTime" column="data_update_time" />
|
||||
<result property="category" column="category" />
|
||||
<result property="totalKwh" column="total_kwh" />
|
||||
<result property="sharpKwh" column="sharp_kwh" />
|
||||
<result property="peakKwh" column="peak_kwh" />
|
||||
<result property="flatKwh" column="flat_kwh" />
|
||||
<result property="valleyKwh" column="valley_kwh" />
|
||||
<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="selectEmsAmmeterDataVo">
|
||||
select id, data_update_time, category, total_kwh, sharp_kwh, peak_kwh, flat_kwh, valley_kwh, create_by, create_time, update_by, update_time, remark, site_id, device_id from ems_ammeter_data
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsAmmeterDataList" parameterType="EmsAmmeterData" resultMap="EmsAmmeterDataResult">
|
||||
<include refid="selectEmsAmmeterDataVo"/>
|
||||
<where>
|
||||
<if test="dataUpdateTime != null "> and data_update_time = #{dataUpdateTime}</if>
|
||||
<if test="category != null and category != ''"> and category = #{category}</if>
|
||||
<if test="totalKwh != null "> and total_kwh = #{totalKwh}</if>
|
||||
<if test="sharpKwh != null "> and sharp_kwh = #{sharpKwh}</if>
|
||||
<if test="peakKwh != null "> and peak_kwh = #{peakKwh}</if>
|
||||
<if test="flatKwh != null "> and flat_kwh = #{flatKwh}</if>
|
||||
<if test="valleyKwh != null "> and valley_kwh = #{valleyKwh}</if>
|
||||
<if test="siteId != null and siteId != ''"> and site_id = #{siteId}</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEmsAmmeterDataById" parameterType="Long" resultMap="EmsAmmeterDataResult">
|
||||
<include refid="selectEmsAmmeterDataVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmsAmmeterData" parameterType="EmsAmmeterData" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ems_ammeter_data
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="dataUpdateTime != null">data_update_time,</if>
|
||||
<if test="category != null">category,</if>
|
||||
<if test="totalKwh != null">total_kwh,</if>
|
||||
<if test="sharpKwh != null">sharp_kwh,</if>
|
||||
<if test="peakKwh != null">peak_kwh,</if>
|
||||
<if test="flatKwh != null">flat_kwh,</if>
|
||||
<if test="valleyKwh != null">valley_kwh,</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 and deviceId != ''">device_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="dataUpdateTime != null">#{dataUpdateTime},</if>
|
||||
<if test="category != null">#{category},</if>
|
||||
<if test="totalKwh != null">#{totalKwh},</if>
|
||||
<if test="sharpKwh != null">#{sharpKwh},</if>
|
||||
<if test="peakKwh != null">#{peakKwh},</if>
|
||||
<if test="flatKwh != null">#{flatKwh},</if>
|
||||
<if test="valleyKwh != null">#{valleyKwh},</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 and deviceId != ''">#{deviceId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmsAmmeterData" parameterType="EmsAmmeterData">
|
||||
update ems_ammeter_data
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="dataUpdateTime != null">data_update_time = #{dataUpdateTime},</if>
|
||||
<if test="category != null">category = #{category},</if>
|
||||
<if test="totalKwh != null">total_kwh = #{totalKwh},</if>
|
||||
<if test="sharpKwh != null">sharp_kwh = #{sharpKwh},</if>
|
||||
<if test="peakKwh != null">peak_kwh = #{peakKwh},</if>
|
||||
<if test="flatKwh != null">flat_kwh = #{flatKwh},</if>
|
||||
<if test="valleyKwh != null">valley_kwh = #{valleyKwh},</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 and deviceId != ''">device_id = #{deviceId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmsAmmeterDataById" parameterType="Long">
|
||||
delete from ems_ammeter_data where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmsAmmeterDataByIds" parameterType="String">
|
||||
delete from ems_ammeter_data where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getAmmeterDetailInfo" resultType="com.xzzn.ems.domain.vo.AmmeterDataDetailInfo">
|
||||
SELECT t.category as category,
|
||||
t.total_kwh as totalKwh,
|
||||
t.sharp_kwh as sharpKwh,
|
||||
t.flat_kwh as flatKwh,
|
||||
t.peak_kwh as peakKwh,
|
||||
t.device_id as deviceId,
|
||||
t.valley_kwh as valleyKwh,
|
||||
Max(t.data_update_time) as updateTime
|
||||
FROM ems_ammeter_data t
|
||||
INNER JOIN (
|
||||
SELECT p.site_id, p.device_id,p.category,MAX(p.data_update_time) AS max_update_time
|
||||
FROM ems_ammeter_data p
|
||||
WHERE p.site_id = #{siteId} and p.device_id = #{deviceId}
|
||||
GROUP BY p.site_id,p.device_id,p.category
|
||||
) latest on t.device_id = latest.device_id and t.data_update_time = latest.max_update_time
|
||||
WHERE t.site_id = #{siteId} and t.device_id = #{deviceId}
|
||||
group by t.category,t.total_kwh,t.sharp_kwh,t.flat_kwh,t.peak_kwh,t.valley_kwh,t.device_id
|
||||
order by updateTime desc
|
||||
</select>
|
||||
</mapper>
|
@ -26,10 +26,43 @@
|
||||
<result property="remark" column="remark" />
|
||||
<result property="siteId" column="site_id" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="stackDeviceId" column="stack_device_id" />
|
||||
<result property="maxAllowedChargePower" column="max_allowed_charge_power" />
|
||||
<result property="maxAllowedDischargePower" column="max_allowed_discharge_power" />
|
||||
<result property="maxAllowedChargeVoltage" column="max_allowed_charge_voltage" />
|
||||
<result property="maxAllowedDischargeVoltage" column="max_allowed_discharge_voltage" />
|
||||
<result property="maxAllowedChargeCurrent" column="max_allowed_charge_current" />
|
||||
<result property="maxAllowedDischargeCurrent" column="max_allowed_discharge_current" />
|
||||
<result property="batteryPackVoltage" column="battery_pack_voltage" />
|
||||
<result property="batteryPackCurrent" column="battery_pack_current" />
|
||||
<result property="batteryPackTemp" column="battery_pack_temp" />
|
||||
<result property="batteryPackSoc" column="battery_pack_soc" />
|
||||
<result property="batteryPackSoh" column="battery_pack_soh" />
|
||||
<result property="batteryPackInsulationResistance" column="battery_pack_insulation_resistance" />
|
||||
<result property="avgCellVoltage" column="avg_cell_voltage" />
|
||||
<result property="avgCellTemp" column="avg_cell_temp" />
|
||||
<result property="maxCellVoltage" column="max_cell_voltage" />
|
||||
<result property="maxCellVoltageId" column="max_cell_voltage_id" />
|
||||
<result property="minCellVoltage" column="min_cell_voltage" />
|
||||
<result property="minCellVoltageId" column="min_cell_voltage_id" />
|
||||
<result property="maxCellTemp" column="max_cell_temp" />
|
||||
<result property="maxCellTempId" column="max_cell_temp_id" />
|
||||
<result property="minCellTemp" column="min_cell_temp" />
|
||||
<result property="minCellTempId" column="min_cell_temp_id" />
|
||||
<result property="maxCellSoc" column="max_cell_soc" />
|
||||
<result property="maxCellSocId" column="max_cell_soc_id" />
|
||||
<result property="minCellSoc" column="min_cell_soc" />
|
||||
<result property="minCellSocId" column="min_cell_soc_id" />
|
||||
<result property="maxCellSoh" column="max_cell_soh" />
|
||||
<result property="maxCellSohId" column="max_cell_soh_id" />
|
||||
<result property="minCellSoh" column="min_cell_soh" />
|
||||
<result property="minCellSohId" column="min_cell_soh_id" />
|
||||
<result property="totalChargeEnergy" column="total_charge_energy" />
|
||||
<result property="totalDischargeEnergy" column="total_discharge_energy" />
|
||||
</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
|
||||
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, stack_device_id, max_allowed_charge_power, max_allowed_discharge_power, max_allowed_charge_voltage, max_allowed_discharge_voltage, max_allowed_charge_current, max_allowed_discharge_current, battery_pack_voltage, battery_pack_current, battery_pack_temp, battery_pack_soc, battery_pack_soh, battery_pack_insulation_resistance, avg_cell_voltage, avg_cell_temp, max_cell_voltage, max_cell_voltage_id, min_cell_voltage, min_cell_voltage_id, max_cell_temp, max_cell_temp_id, min_cell_temp, min_cell_temp_id, max_cell_soc, max_cell_soc_id, min_cell_soc, min_cell_soc_id, max_cell_soh, max_cell_soh_id, min_cell_soh, min_cell_soh_id, total_charge_energy, total_discharge_energy from ems_battery_cluster
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsBatteryClusterList" parameterType="EmsBatteryCluster" resultMap="EmsBatteryClusterResult">
|
||||
@ -48,8 +81,41 @@
|
||||
<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>
|
||||
<if test="siteId != null and siteId != ''"> and site_id = #{siteId}</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
<if test="stackDeviceId != null and stackDeviceId != ''"> and stack_device_id = #{stackDeviceId}</if>
|
||||
<if test="maxAllowedChargePower != null "> and max_allowed_charge_power = #{maxAllowedChargePower}</if>
|
||||
<if test="maxAllowedDischargePower != null "> and max_allowed_discharge_power = #{maxAllowedDischargePower}</if>
|
||||
<if test="maxAllowedChargeVoltage != null "> and max_allowed_charge_voltage = #{maxAllowedChargeVoltage}</if>
|
||||
<if test="maxAllowedDischargeVoltage != null "> and max_allowed_discharge_voltage = #{maxAllowedDischargeVoltage}</if>
|
||||
<if test="maxAllowedChargeCurrent != null "> and max_allowed_charge_current = #{maxAllowedChargeCurrent}</if>
|
||||
<if test="maxAllowedDischargeCurrent != null "> and max_allowed_discharge_current = #{maxAllowedDischargeCurrent}</if>
|
||||
<if test="batteryPackVoltage != null "> and battery_pack_voltage = #{batteryPackVoltage}</if>
|
||||
<if test="batteryPackCurrent != null "> and battery_pack_current = #{batteryPackCurrent}</if>
|
||||
<if test="batteryPackTemp != null "> and battery_pack_temp = #{batteryPackTemp}</if>
|
||||
<if test="batteryPackSoc != null "> and battery_pack_soc = #{batteryPackSoc}</if>
|
||||
<if test="batteryPackSoh != null "> and battery_pack_soh = #{batteryPackSoh}</if>
|
||||
<if test="batteryPackInsulationResistance != null "> and battery_pack_insulation_resistance = #{batteryPackInsulationResistance}</if>
|
||||
<if test="avgCellVoltage != null "> and avg_cell_voltage = #{avgCellVoltage}</if>
|
||||
<if test="avgCellTemp != null "> and avg_cell_temp = #{avgCellTemp}</if>
|
||||
<if test="maxCellVoltage != null "> and max_cell_voltage = #{maxCellVoltage}</if>
|
||||
<if test="maxCellVoltageId != null "> and max_cell_voltage_id = #{maxCellVoltageId}</if>
|
||||
<if test="minCellVoltage != null "> and min_cell_voltage = #{minCellVoltage}</if>
|
||||
<if test="minCellVoltageId != null "> and min_cell_voltage_id = #{minCellVoltageId}</if>
|
||||
<if test="maxCellTemp != null "> and max_cell_temp = #{maxCellTemp}</if>
|
||||
<if test="maxCellTempId != null "> and max_cell_temp_id = #{maxCellTempId}</if>
|
||||
<if test="minCellTemp != null "> and min_cell_temp = #{minCellTemp}</if>
|
||||
<if test="minCellTempId != null "> and min_cell_temp_id = #{minCellTempId}</if>
|
||||
<if test="maxCellSoc != null "> and max_cell_soc = #{maxCellSoc}</if>
|
||||
<if test="maxCellSocId != null "> and max_cell_soc_id = #{maxCellSocId}</if>
|
||||
<if test="minCellSoc != null "> and min_cell_soc = #{minCellSoc}</if>
|
||||
<if test="minCellSocId != null "> and min_cell_soc_id = #{minCellSocId}</if>
|
||||
<if test="maxCellSoh != null "> and max_cell_soh = #{maxCellSoh}</if>
|
||||
<if test="maxCellSohId != null "> and max_cell_soh_id = #{maxCellSohId}</if>
|
||||
<if test="minCellSoh != null "> and min_cell_soh = #{minCellSoh}</if>
|
||||
<if test="minCellSohId != null "> and min_cell_soh_id = #{minCellSohId}</if>
|
||||
<if test="totalChargeEnergy != null "> and total_charge_energy = #{totalChargeEnergy}</if>
|
||||
<if test="totalDischargeEnergy != null "> and total_discharge_energy = #{totalDischargeEnergy}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -80,7 +146,40 @@
|
||||
<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="deviceId != null and deviceId != ''">device_id,</if>
|
||||
<if test="stackDeviceId != null and stackDeviceId != ''">stack_device_id,</if>
|
||||
<if test="maxAllowedChargePower != null">max_allowed_charge_power,</if>
|
||||
<if test="maxAllowedDischargePower != null">max_allowed_discharge_power,</if>
|
||||
<if test="maxAllowedChargeVoltage != null">max_allowed_charge_voltage,</if>
|
||||
<if test="maxAllowedDischargeVoltage != null">max_allowed_discharge_voltage,</if>
|
||||
<if test="maxAllowedChargeCurrent != null">max_allowed_charge_current,</if>
|
||||
<if test="maxAllowedDischargeCurrent != null">max_allowed_discharge_current,</if>
|
||||
<if test="batteryPackVoltage != null">battery_pack_voltage,</if>
|
||||
<if test="batteryPackCurrent != null">battery_pack_current,</if>
|
||||
<if test="batteryPackTemp != null">battery_pack_temp,</if>
|
||||
<if test="batteryPackSoc != null">battery_pack_soc,</if>
|
||||
<if test="batteryPackSoh != null">battery_pack_soh,</if>
|
||||
<if test="batteryPackInsulationResistance != null">battery_pack_insulation_resistance,</if>
|
||||
<if test="avgCellVoltage != null">avg_cell_voltage,</if>
|
||||
<if test="avgCellTemp != null">avg_cell_temp,</if>
|
||||
<if test="maxCellVoltage != null">max_cell_voltage,</if>
|
||||
<if test="maxCellVoltageId != null">max_cell_voltage_id,</if>
|
||||
<if test="minCellVoltage != null">min_cell_voltage,</if>
|
||||
<if test="minCellVoltageId != null">min_cell_voltage_id,</if>
|
||||
<if test="maxCellTemp != null">max_cell_temp,</if>
|
||||
<if test="maxCellTempId != null">max_cell_temp_id,</if>
|
||||
<if test="minCellTemp != null">min_cell_temp,</if>
|
||||
<if test="minCellTempId != null">min_cell_temp_id,</if>
|
||||
<if test="maxCellSoc != null">max_cell_soc,</if>
|
||||
<if test="maxCellSocId != null">max_cell_soc_id,</if>
|
||||
<if test="minCellSoc != null">min_cell_soc,</if>
|
||||
<if test="minCellSocId != null">min_cell_soc_id,</if>
|
||||
<if test="maxCellSoh != null">max_cell_soh,</if>
|
||||
<if test="maxCellSohId != null">max_cell_soh_id,</if>
|
||||
<if test="minCellSoh != null">min_cell_soh,</if>
|
||||
<if test="minCellSohId != null">min_cell_soh_id,</if>
|
||||
<if test="totalChargeEnergy != null">total_charge_energy,</if>
|
||||
<if test="totalDischargeEnergy != null">total_discharge_energy,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="workStatus != null">#{workStatus},</if>
|
||||
@ -102,7 +201,40 @@
|
||||
<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="deviceId != null and deviceId != ''">#{deviceId},</if>
|
||||
<if test="stackDeviceId != null and stackDeviceId != ''">#{stackDeviceId},</if>
|
||||
<if test="maxAllowedChargePower != null">#{maxAllowedChargePower},</if>
|
||||
<if test="maxAllowedDischargePower != null">#{maxAllowedDischargePower},</if>
|
||||
<if test="maxAllowedChargeVoltage != null">#{maxAllowedChargeVoltage},</if>
|
||||
<if test="maxAllowedDischargeVoltage != null">#{maxAllowedDischargeVoltage},</if>
|
||||
<if test="maxAllowedChargeCurrent != null">#{maxAllowedChargeCurrent},</if>
|
||||
<if test="maxAllowedDischargeCurrent != null">#{maxAllowedDischargeCurrent},</if>
|
||||
<if test="batteryPackVoltage != null">#{batteryPackVoltage},</if>
|
||||
<if test="batteryPackCurrent != null">#{batteryPackCurrent},</if>
|
||||
<if test="batteryPackTemp != null">#{batteryPackTemp},</if>
|
||||
<if test="batteryPackSoc != null">#{batteryPackSoc},</if>
|
||||
<if test="batteryPackSoh != null">#{batteryPackSoh},</if>
|
||||
<if test="batteryPackInsulationResistance != null">#{batteryPackInsulationResistance},</if>
|
||||
<if test="avgCellVoltage != null">#{avgCellVoltage},</if>
|
||||
<if test="avgCellTemp != null">#{avgCellTemp},</if>
|
||||
<if test="maxCellVoltage != null">#{maxCellVoltage},</if>
|
||||
<if test="maxCellVoltageId != null">#{maxCellVoltageId},</if>
|
||||
<if test="minCellVoltage != null">#{minCellVoltage},</if>
|
||||
<if test="minCellVoltageId != null">#{minCellVoltageId},</if>
|
||||
<if test="maxCellTemp != null">#{maxCellTemp},</if>
|
||||
<if test="maxCellTempId != null">#{maxCellTempId},</if>
|
||||
<if test="minCellTemp != null">#{minCellTemp},</if>
|
||||
<if test="minCellTempId != null">#{minCellTempId},</if>
|
||||
<if test="maxCellSoc != null">#{maxCellSoc},</if>
|
||||
<if test="maxCellSocId != null">#{maxCellSocId},</if>
|
||||
<if test="minCellSoc != null">#{minCellSoc},</if>
|
||||
<if test="minCellSocId != null">#{minCellSocId},</if>
|
||||
<if test="maxCellSoh != null">#{maxCellSoh},</if>
|
||||
<if test="maxCellSohId != null">#{maxCellSohId},</if>
|
||||
<if test="minCellSoh != null">#{minCellSoh},</if>
|
||||
<if test="minCellSohId != null">#{minCellSohId},</if>
|
||||
<if test="totalChargeEnergy != null">#{totalChargeEnergy},</if>
|
||||
<if test="totalDischargeEnergy != null">#{totalDischargeEnergy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -128,7 +260,40 @@
|
||||
<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="deviceId != null and deviceId != ''">device_id = #{deviceId},</if>
|
||||
<if test="stackDeviceId != null and stackDeviceId != ''">stack_device_id = #{stackDeviceId},</if>
|
||||
<if test="maxAllowedChargePower != null">max_allowed_charge_power = #{maxAllowedChargePower},</if>
|
||||
<if test="maxAllowedDischargePower != null">max_allowed_discharge_power = #{maxAllowedDischargePower},</if>
|
||||
<if test="maxAllowedChargeVoltage != null">max_allowed_charge_voltage = #{maxAllowedChargeVoltage},</if>
|
||||
<if test="maxAllowedDischargeVoltage != null">max_allowed_discharge_voltage = #{maxAllowedDischargeVoltage},</if>
|
||||
<if test="maxAllowedChargeCurrent != null">max_allowed_charge_current = #{maxAllowedChargeCurrent},</if>
|
||||
<if test="maxAllowedDischargeCurrent != null">max_allowed_discharge_current = #{maxAllowedDischargeCurrent},</if>
|
||||
<if test="batteryPackVoltage != null">battery_pack_voltage = #{batteryPackVoltage},</if>
|
||||
<if test="batteryPackCurrent != null">battery_pack_current = #{batteryPackCurrent},</if>
|
||||
<if test="batteryPackTemp != null">battery_pack_temp = #{batteryPackTemp},</if>
|
||||
<if test="batteryPackSoc != null">battery_pack_soc = #{batteryPackSoc},</if>
|
||||
<if test="batteryPackSoh != null">battery_pack_soh = #{batteryPackSoh},</if>
|
||||
<if test="batteryPackInsulationResistance != null">battery_pack_insulation_resistance = #{batteryPackInsulationResistance},</if>
|
||||
<if test="avgCellVoltage != null">avg_cell_voltage = #{avgCellVoltage},</if>
|
||||
<if test="avgCellTemp != null">avg_cell_temp = #{avgCellTemp},</if>
|
||||
<if test="maxCellVoltage != null">max_cell_voltage = #{maxCellVoltage},</if>
|
||||
<if test="maxCellVoltageId != null">max_cell_voltage_id = #{maxCellVoltageId},</if>
|
||||
<if test="minCellVoltage != null">min_cell_voltage = #{minCellVoltage},</if>
|
||||
<if test="minCellVoltageId != null">min_cell_voltage_id = #{minCellVoltageId},</if>
|
||||
<if test="maxCellTemp != null">max_cell_temp = #{maxCellTemp},</if>
|
||||
<if test="maxCellTempId != null">max_cell_temp_id = #{maxCellTempId},</if>
|
||||
<if test="minCellTemp != null">min_cell_temp = #{minCellTemp},</if>
|
||||
<if test="minCellTempId != null">min_cell_temp_id = #{minCellTempId},</if>
|
||||
<if test="maxCellSoc != null">max_cell_soc = #{maxCellSoc},</if>
|
||||
<if test="maxCellSocId != null">max_cell_soc_id = #{maxCellSocId},</if>
|
||||
<if test="minCellSoc != null">min_cell_soc = #{minCellSoc},</if>
|
||||
<if test="minCellSocId != null">min_cell_soc_id = #{minCellSocId},</if>
|
||||
<if test="maxCellSoh != null">max_cell_soh = #{maxCellSoh},</if>
|
||||
<if test="maxCellSohId != null">max_cell_soh_id = #{maxCellSohId},</if>
|
||||
<if test="minCellSoh != null">min_cell_soh = #{minCellSoh},</if>
|
||||
<if test="minCellSohId != null">min_cell_soh_id = #{minCellSohId},</if>
|
||||
<if test="totalChargeEnergy != null">total_charge_energy = #{totalChargeEnergy},</if>
|
||||
<if test="totalDischargeEnergy != null">total_discharge_energy = #{totalDischargeEnergy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -144,17 +309,20 @@
|
||||
</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 id="getBmsBatteryData" resultType="com.xzzn.ems.domain.vo.BMSBatteryDataList">
|
||||
SELECT t.cluster_voltage as clusterVoltage,t.cluster_current as clusterCurrent,
|
||||
t.current_soc as currentSoc,t.site_id as siteId,t.device_id as clusterId,
|
||||
t.max_cell_voltage as maxVoltage,t.min_cell_voltage as minVoltage,
|
||||
t.max_cell_temp as maxTemperature,t.min_cell_temp as minTemperature
|
||||
FROM ems_battery_cluster t
|
||||
INNER JOIN (
|
||||
SELECT p.site_id, p.device_id, MAX(p.update_time) AS max_update_time
|
||||
FROM ems_battery_cluster p
|
||||
WHERE p.site_id = #{siteId} and p.stack_device_id = #{stackDeviceId}
|
||||
GROUP BY p.site_id,p.device_id
|
||||
) latest on t.device_id = latest.device_id and t.update_time = latest.max_update_time
|
||||
where t.site_id = #{siteId} and t.stack_device_id = #{stackDeviceId}
|
||||
group by t.cluster_voltage,t.cluster_current,t.current_soc,t.site_id,t.device_id,t.max_cell_voltage,t.min_cell_voltage,
|
||||
t.max_cell_temp,t.min_cell_temp
|
||||
</select>
|
||||
</mapper>
|
@ -21,10 +21,11 @@
|
||||
<result property="remark" column="remark" />
|
||||
<result property="siteId" column="site_id" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="clusterDeviceId" column="cluster_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
|
||||
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, cluster_device_id from ems_battery_data
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsBatteryDataList" parameterType="EmsBatteryData" resultMap="EmsBatteryDataResult">
|
||||
@ -38,8 +39,9 @@
|
||||
<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>
|
||||
<if test="siteId != null and siteId != ''"> and site_id = #{siteId}</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
<if test="clusterDeviceId != null and clusterDeviceId != ''"> and cluster_device_id = #{clusterDeviceId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -65,7 +67,8 @@
|
||||
<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="deviceId != null and deviceId != ''">device_id,</if>
|
||||
<if test="clusterDeviceId != null and clusterDeviceId != ''">cluster_device_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="batteryPack != null">#{batteryPack},</if>
|
||||
@ -82,7 +85,8 @@
|
||||
<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="deviceId != null and deviceId != ''">#{deviceId},</if>
|
||||
<if test="clusterDeviceId != null and clusterDeviceId != ''">#{clusterDeviceId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -103,7 +107,8 @@
|
||||
<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="deviceId != null and deviceId != ''">device_id = #{deviceId},</if>
|
||||
<if test="clusterDeviceId != null and clusterDeviceId != ''">cluster_device_id = #{clusterDeviceId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -119,9 +124,94 @@
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getBatteryDataBySiteId" parameterType="Long" resultMap="EmsBatteryDataResult">
|
||||
<select id="getBatteryDataBySiteId" parameterType="String" resultMap="EmsBatteryDataResult">
|
||||
<include refid="selectEmsBatteryDataVo"/>
|
||||
where site_id = #{siteId}
|
||||
and DATE(data_timestamp) = DATE(NOW())
|
||||
WHERE site_id = #{siteId} AND data_timestamp >= CURDATE()
|
||||
ORDER BY data_timestamp desc limit 1
|
||||
</select>
|
||||
|
||||
<select id="getBatteryDataByClusterId" resultType="com.xzzn.ems.domain.vo.BatteryClusterDataDetailVo">
|
||||
select t.site_id as siteId,t.cluster_device_id as clusterId,
|
||||
AVG(t.voltage) as avgVoltage,MAX(t.voltage) as maxVoltage,MIN(t.voltage) as minVoltage,
|
||||
AVG(t.temperature) as avgTemp,MAX(t.temperature) as maxTemp,MIN(t.temperature) as minTemp,
|
||||
AVG(t.soc) as avgSoc,MAX(t.soc) as maxSoc,MIN(t.soc) as minSoc
|
||||
from ems_battery_data t
|
||||
where t.site_id = #{siteId}
|
||||
and t.cluster_device_id = #{clusterDeviceId}
|
||||
and t.update_time = (select MAX(update_time) FROM ems_battery_data where site_id = t.site_id
|
||||
and device_id = t.device_id and cluster_device_id = t.cluster_device_id)
|
||||
group by t.site_id,t.cluster_device_id
|
||||
</select>
|
||||
|
||||
<select id="getDataIdsMap" parameterType="com.xzzn.ems.domain.vo.BatteryClusterDataDetailVo" resultType="java.util.Map">
|
||||
<if test="maxVoltage != null">
|
||||
select 'maxVoltageId' as type, t.device_id from ems_battery_data t
|
||||
where t.site_id = #{siteId} and t.cluster_device_id = #{clusterId} and t.voltage = #{maxVoltage}
|
||||
union all
|
||||
</if>
|
||||
<if test="minVoltage != null">
|
||||
select 'minVoltageId' as type, t.device_id from ems_battery_data t
|
||||
where t.site_id = #{siteId} and t.cluster_device_id = #{clusterId} and t.voltage = #{minVoltage}
|
||||
union all
|
||||
</if>
|
||||
<if test="maxTemp != null">
|
||||
select 'maxTempId' as type, t.device_id from ems_battery_data t
|
||||
where t.site_id = #{siteId} and t.cluster_device_id = #{clusterId} and t.temperature = #{maxTemp}
|
||||
union all
|
||||
</if>
|
||||
<if test="minTemp != null">
|
||||
select 'minTempId' as type, t.device_id from ems_battery_data t
|
||||
where t.site_id = #{siteId} and t.cluster_device_id = #{clusterId} and t.temperature = #{minTemp}
|
||||
union all
|
||||
</if>
|
||||
<if test="maxSoc != null">
|
||||
select 'maxSocId' as type, t.device_id from ems_battery_data t
|
||||
where t.site_id = #{siteId} and t.cluster_device_id = #{clusterId} and t.soc = #{maxSoc}
|
||||
union all
|
||||
</if>
|
||||
<if test="minSoc != null">
|
||||
select 'minSocId' as type, t.device_id from ems_battery_data t
|
||||
where t.site_id = #{siteId} and t.cluster_device_id = #{clusterId} and t.soc = #{minSoc}
|
||||
union all
|
||||
</if>
|
||||
SELECT NULL AS type, NULL AS device_id FROM DUAL WHERE 1=0
|
||||
</select>
|
||||
|
||||
<select id="getAllBatteryDataByClusterId" resultType="com.xzzn.ems.domain.vo.BatteryDataStatsListVo">
|
||||
SELECT t.data_timestamp as updateTime, t.voltage, t.temperature,
|
||||
t.soc, t.soh, t.device_id as deviceId,t.cluster_device_id as clusterDeviceId
|
||||
FROM ems_battery_data t
|
||||
INNER JOIN ( SELECT device_id, cluster_device_id, MAX(data_timestamp) AS max_update_time
|
||||
FROM ems_battery_data
|
||||
WHERE site_id = #{siteId}
|
||||
and data_timestamp >= CURDATE()
|
||||
<if test="clusterDeviceId != null and clusterDeviceId != ''">
|
||||
and cluster_device_id = #{clusterDeviceId}
|
||||
</if>
|
||||
GROUP BY device_id, cluster_device_id
|
||||
) latest ON t.device_id = latest.device_id AND t.data_timestamp = latest.max_update_time
|
||||
AND t.cluster_device_id = latest.cluster_device_id
|
||||
WHERE t.site_id = #{siteId}
|
||||
<if test="clusterDeviceId != null and clusterDeviceId != ''">
|
||||
and t.cluster_device_id = #{clusterDeviceId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertEmsBatteryDataList" parameterType="java.util.List">
|
||||
INSERT INTO ems_battery_data (
|
||||
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, cluster_device_id
|
||||
) VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.batteryPack}, #{item.batteryCluster}, #{item.batteryCellId},
|
||||
#{item.voltage}, #{item.temperature}, #{item.soc}, #{item.soh}, #{item.dataTimestamp},
|
||||
#{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime},
|
||||
#{item.remark}, #{item.siteId}, #{item.deviceId}, #{item.clusterDeviceId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -9,27 +9,53 @@
|
||||
<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="operationStatus" column="operation_status" />
|
||||
<result property="stackVoltage" column="stack_voltage" />
|
||||
<result property="stackCurrent" column="stack_current" />
|
||||
<result property="stackSoc" column="stack_soc" />
|
||||
<result property="stackSoh" column="stack_soh" />
|
||||
<result property="maxCellVoltage" column="max_cell_voltage" />
|
||||
<result property="maxVoltageGroupId" column="max_voltage_group_id" />
|
||||
<result property="maxVoltageCellId" column="max_voltage_cell_id" />
|
||||
<result property="minCellVoltage" column="min_cell_voltage" />
|
||||
<result property="minVoltageGroupId" column="min_voltage_group_id" />
|
||||
<result property="minVoltageCellId" column="min_voltage_cell_id" />
|
||||
<result property="maxCellTemp" column="max_cell_temp" />
|
||||
<result property="maxTempGroupId" column="max_temp_group_id" />
|
||||
<result property="maxTempCellId" column="max_temp_cell_id" />
|
||||
<result property="minCellTemp" column="min_cell_temp" />
|
||||
<result property="minTempGroupId" column="min_temp_group_id" />
|
||||
<result property="minTempCellId" column="min_temp_cell_id" />
|
||||
<result property="totalChargeCapacity" column="total_charge_capacity" />
|
||||
<result property="totalDischargeCapacity" column="total_discharge_capacity" />
|
||||
<result property="sessionChargeCapacity" column="session_charge_capacity" />
|
||||
<result property="sessionDischargeCapacity" column="session_discharge_capacity" />
|
||||
<result property="availableChargeCapacity" column="available_charge_capacity" />
|
||||
<result property="availableDischargeCapacity" column="available_discharge_capacity" />
|
||||
<result property="remainingDischargeTime" column="remaining_discharge_time" />
|
||||
<result property="remainingChargeTime" column="remaining_charge_time" />
|
||||
<result property="maxDischargePower" column="max_discharge_power" />
|
||||
<result property="maxChargePower" column="max_charge_power" />
|
||||
<result property="maxDischargeCurrent" column="max_discharge_current" />
|
||||
<result property="maxChargeCurrent" column="max_charge_current" />
|
||||
<result property="dailyDischargeCycles" column="daily_discharge_cycles" />
|
||||
<result property="dailyChargeCycles" column="daily_charge_cycles" />
|
||||
<result property="dailyDischargeCapacity" column="daily_discharge_capacity" />
|
||||
<result property="dailyChargeCapacity" column="daily_charge_capacity" />
|
||||
<result property="operatingTemp" column="operating_temp" />
|
||||
<result property="bmsStatus" column="bms_status" />
|
||||
<result property="bmsChargeStatus" column="bms_charge_status" />
|
||||
<result property="stackInsulationResistance" column="stack_insulation_resistance" />
|
||||
<result property="siteId" column="site_id" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
</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
|
||||
select id, work_status, pcs_communication_status, ems_communication_status, operation_status, stack_voltage, stack_current, stack_soc, stack_soh, max_cell_voltage, max_voltage_group_id, max_voltage_cell_id, min_cell_voltage, min_voltage_group_id, min_voltage_cell_id, max_cell_temp, max_temp_group_id, max_temp_cell_id, min_cell_temp, min_temp_group_id, min_temp_cell_id, total_charge_capacity, total_discharge_capacity, session_charge_capacity, session_discharge_capacity, available_charge_capacity, available_discharge_capacity, remaining_discharge_time, remaining_charge_time, max_discharge_power, max_charge_power, max_discharge_current, max_charge_current, daily_discharge_cycles, daily_charge_cycles, daily_discharge_capacity, daily_charge_capacity, operating_temp, bms_status, bms_charge_status, stack_insulation_resistance, site_id, device_id, create_time, create_by, update_time, update_by from ems_battery_stack
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsBatteryStackList" parameterType="EmsBatteryStack" resultMap="EmsBatteryStackResult">
|
||||
@ -38,18 +64,45 @@
|
||||
<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>
|
||||
<if test="operationStatus != null and operationStatus != ''"> and operation_status = #{operationStatus}</if>
|
||||
<if test="stackVoltage != null "> and stack_voltage = #{stackVoltage}</if>
|
||||
<if test="stackCurrent != null "> and stack_current = #{stackCurrent}</if>
|
||||
<if test="stackSoc != null "> and stack_soc = #{stackSoc}</if>
|
||||
<if test="stackSoh != null "> and stack_soh = #{stackSoh}</if>
|
||||
<if test="maxCellVoltage != null "> and max_cell_voltage = #{maxCellVoltage}</if>
|
||||
<if test="maxVoltageGroupId != null "> and max_voltage_group_id = #{maxVoltageGroupId}</if>
|
||||
<if test="maxVoltageCellId != null "> and max_voltage_cell_id = #{maxVoltageCellId}</if>
|
||||
<if test="minCellVoltage != null "> and min_cell_voltage = #{minCellVoltage}</if>
|
||||
<if test="minVoltageGroupId != null "> and min_voltage_group_id = #{minVoltageGroupId}</if>
|
||||
<if test="minVoltageCellId != null "> and min_voltage_cell_id = #{minVoltageCellId}</if>
|
||||
<if test="maxCellTemp != null "> and max_cell_temp = #{maxCellTemp}</if>
|
||||
<if test="maxTempGroupId != null "> and max_temp_group_id = #{maxTempGroupId}</if>
|
||||
<if test="maxTempCellId != null "> and max_temp_cell_id = #{maxTempCellId}</if>
|
||||
<if test="minCellTemp != null "> and min_cell_temp = #{minCellTemp}</if>
|
||||
<if test="minTempGroupId != null "> and min_temp_group_id = #{minTempGroupId}</if>
|
||||
<if test="minTempCellId != null "> and min_temp_cell_id = #{minTempCellId}</if>
|
||||
<if test="totalChargeCapacity != null "> and total_charge_capacity = #{totalChargeCapacity}</if>
|
||||
<if test="totalDischargeCapacity != null "> and total_discharge_capacity = #{totalDischargeCapacity}</if>
|
||||
<if test="sessionChargeCapacity != null "> and session_charge_capacity = #{sessionChargeCapacity}</if>
|
||||
<if test="sessionDischargeCapacity != null "> and session_discharge_capacity = #{sessionDischargeCapacity}</if>
|
||||
<if test="availableChargeCapacity != null "> and available_charge_capacity = #{availableChargeCapacity}</if>
|
||||
<if test="availableDischargeCapacity != null "> and available_discharge_capacity = #{availableDischargeCapacity}</if>
|
||||
<if test="remainingDischargeTime != null "> and remaining_discharge_time = #{remainingDischargeTime}</if>
|
||||
<if test="remainingChargeTime != null "> and remaining_charge_time = #{remainingChargeTime}</if>
|
||||
<if test="maxDischargePower != null "> and max_discharge_power = #{maxDischargePower}</if>
|
||||
<if test="maxChargePower != null "> and max_charge_power = #{maxChargePower}</if>
|
||||
<if test="maxDischargeCurrent != null "> and max_discharge_current = #{maxDischargeCurrent}</if>
|
||||
<if test="maxChargeCurrent != null "> and max_charge_current = #{maxChargeCurrent}</if>
|
||||
<if test="dailyDischargeCycles != null "> and daily_discharge_cycles = #{dailyDischargeCycles}</if>
|
||||
<if test="dailyChargeCycles != null "> and daily_charge_cycles = #{dailyChargeCycles}</if>
|
||||
<if test="dailyDischargeCapacity != null "> and daily_discharge_capacity = #{dailyDischargeCapacity}</if>
|
||||
<if test="dailyChargeCapacity != null "> and daily_charge_capacity = #{dailyChargeCapacity}</if>
|
||||
<if test="operatingTemp != null "> and operating_temp = #{operatingTemp}</if>
|
||||
<if test="bmsStatus != null and bmsStatus != ''"> and bms_status = #{bmsStatus}</if>
|
||||
<if test="bmsChargeStatus != null and bmsChargeStatus != ''"> and bms_charge_status = #{bmsChargeStatus}</if>
|
||||
<if test="stackInsulationResistance != null "> and stack_insulation_resistance = #{stackInsulationResistance}</if>
|
||||
<if test="siteId != null and siteId != ''"> and site_id = #{siteId}</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -64,45 +117,97 @@
|
||||
<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="operationStatus != null">operation_status,</if>
|
||||
<if test="stackVoltage != null">stack_voltage,</if>
|
||||
<if test="stackCurrent != null">stack_current,</if>
|
||||
<if test="stackSoc != null">stack_soc,</if>
|
||||
<if test="stackSoh != null">stack_soh,</if>
|
||||
<if test="maxCellVoltage != null">max_cell_voltage,</if>
|
||||
<if test="maxVoltageGroupId != null">max_voltage_group_id,</if>
|
||||
<if test="maxVoltageCellId != null">max_voltage_cell_id,</if>
|
||||
<if test="minCellVoltage != null">min_cell_voltage,</if>
|
||||
<if test="minVoltageGroupId != null">min_voltage_group_id,</if>
|
||||
<if test="minVoltageCellId != null">min_voltage_cell_id,</if>
|
||||
<if test="maxCellTemp != null">max_cell_temp,</if>
|
||||
<if test="maxTempGroupId != null">max_temp_group_id,</if>
|
||||
<if test="maxTempCellId != null">max_temp_cell_id,</if>
|
||||
<if test="minCellTemp != null">min_cell_temp,</if>
|
||||
<if test="minTempGroupId != null">min_temp_group_id,</if>
|
||||
<if test="minTempCellId != null">min_temp_cell_id,</if>
|
||||
<if test="totalChargeCapacity != null">total_charge_capacity,</if>
|
||||
<if test="totalDischargeCapacity != null">total_discharge_capacity,</if>
|
||||
<if test="sessionChargeCapacity != null">session_charge_capacity,</if>
|
||||
<if test="sessionDischargeCapacity != null">session_discharge_capacity,</if>
|
||||
<if test="availableChargeCapacity != null">available_charge_capacity,</if>
|
||||
<if test="availableDischargeCapacity != null">available_discharge_capacity,</if>
|
||||
<if test="remainingDischargeTime != null">remaining_discharge_time,</if>
|
||||
<if test="remainingChargeTime != null">remaining_charge_time,</if>
|
||||
<if test="maxDischargePower != null">max_discharge_power,</if>
|
||||
<if test="maxChargePower != null">max_charge_power,</if>
|
||||
<if test="maxDischargeCurrent != null">max_discharge_current,</if>
|
||||
<if test="maxChargeCurrent != null">max_charge_current,</if>
|
||||
<if test="dailyDischargeCycles != null">daily_discharge_cycles,</if>
|
||||
<if test="dailyChargeCycles != null">daily_charge_cycles,</if>
|
||||
<if test="dailyDischargeCapacity != null">daily_discharge_capacity,</if>
|
||||
<if test="dailyChargeCapacity != null">daily_charge_capacity,</if>
|
||||
<if test="operatingTemp != null">operating_temp,</if>
|
||||
<if test="bmsStatus != null">bms_status,</if>
|
||||
<if test="bmsChargeStatus != null">bms_charge_status,</if>
|
||||
<if test="stackInsulationResistance != null">stack_insulation_resistance,</if>
|
||||
<if test="siteId != null and siteId != ''">site_id,</if>
|
||||
<if test="deviceId != null and deviceId != ''">device_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createBy != null">create_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="updateBy != null">update_by,</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="operationStatus != null">#{operationStatus},</if>
|
||||
<if test="stackVoltage != null">#{stackVoltage},</if>
|
||||
<if test="stackCurrent != null">#{stackCurrent},</if>
|
||||
<if test="stackSoc != null">#{stackSoc},</if>
|
||||
<if test="stackSoh != null">#{stackSoh},</if>
|
||||
<if test="maxCellVoltage != null">#{maxCellVoltage},</if>
|
||||
<if test="maxVoltageGroupId != null">#{maxVoltageGroupId},</if>
|
||||
<if test="maxVoltageCellId != null">#{maxVoltageCellId},</if>
|
||||
<if test="minCellVoltage != null">#{minCellVoltage},</if>
|
||||
<if test="minVoltageGroupId != null">#{minVoltageGroupId},</if>
|
||||
<if test="minVoltageCellId != null">#{minVoltageCellId},</if>
|
||||
<if test="maxCellTemp != null">#{maxCellTemp},</if>
|
||||
<if test="maxTempGroupId != null">#{maxTempGroupId},</if>
|
||||
<if test="maxTempCellId != null">#{maxTempCellId},</if>
|
||||
<if test="minCellTemp != null">#{minCellTemp},</if>
|
||||
<if test="minTempGroupId != null">#{minTempGroupId},</if>
|
||||
<if test="minTempCellId != null">#{minTempCellId},</if>
|
||||
<if test="totalChargeCapacity != null">#{totalChargeCapacity},</if>
|
||||
<if test="totalDischargeCapacity != null">#{totalDischargeCapacity},</if>
|
||||
<if test="sessionChargeCapacity != null">#{sessionChargeCapacity},</if>
|
||||
<if test="sessionDischargeCapacity != null">#{sessionDischargeCapacity},</if>
|
||||
<if test="availableChargeCapacity != null">#{availableChargeCapacity},</if>
|
||||
<if test="availableDischargeCapacity != null">#{availableDischargeCapacity},</if>
|
||||
<if test="remainingDischargeTime != null">#{remainingDischargeTime},</if>
|
||||
<if test="remainingChargeTime != null">#{remainingChargeTime},</if>
|
||||
<if test="maxDischargePower != null">#{maxDischargePower},</if>
|
||||
<if test="maxChargePower != null">#{maxChargePower},</if>
|
||||
<if test="maxDischargeCurrent != null">#{maxDischargeCurrent},</if>
|
||||
<if test="maxChargeCurrent != null">#{maxChargeCurrent},</if>
|
||||
<if test="dailyDischargeCycles != null">#{dailyDischargeCycles},</if>
|
||||
<if test="dailyChargeCycles != null">#{dailyChargeCycles},</if>
|
||||
<if test="dailyDischargeCapacity != null">#{dailyDischargeCapacity},</if>
|
||||
<if test="dailyChargeCapacity != null">#{dailyChargeCapacity},</if>
|
||||
<if test="operatingTemp != null">#{operatingTemp},</if>
|
||||
<if test="bmsStatus != null">#{bmsStatus},</if>
|
||||
<if test="bmsChargeStatus != null">#{bmsChargeStatus},</if>
|
||||
<if test="stackInsulationResistance != null">#{stackInsulationResistance},</if>
|
||||
<if test="siteId != null and siteId != ''">#{siteId},</if>
|
||||
<if test="deviceId != null and deviceId != ''">#{deviceId},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createBy != null">#{createBy},</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="updateBy != null">#{updateBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -112,23 +217,49 @@
|
||||
<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="operationStatus != null">operation_status = #{operationStatus},</if>
|
||||
<if test="stackVoltage != null">stack_voltage = #{stackVoltage},</if>
|
||||
<if test="stackCurrent != null">stack_current = #{stackCurrent},</if>
|
||||
<if test="stackSoc != null">stack_soc = #{stackSoc},</if>
|
||||
<if test="stackSoh != null">stack_soh = #{stackSoh},</if>
|
||||
<if test="maxCellVoltage != null">max_cell_voltage = #{maxCellVoltage},</if>
|
||||
<if test="maxVoltageGroupId != null">max_voltage_group_id = #{maxVoltageGroupId},</if>
|
||||
<if test="maxVoltageCellId != null">max_voltage_cell_id = #{maxVoltageCellId},</if>
|
||||
<if test="minCellVoltage != null">min_cell_voltage = #{minCellVoltage},</if>
|
||||
<if test="minVoltageGroupId != null">min_voltage_group_id = #{minVoltageGroupId},</if>
|
||||
<if test="minVoltageCellId != null">min_voltage_cell_id = #{minVoltageCellId},</if>
|
||||
<if test="maxCellTemp != null">max_cell_temp = #{maxCellTemp},</if>
|
||||
<if test="maxTempGroupId != null">max_temp_group_id = #{maxTempGroupId},</if>
|
||||
<if test="maxTempCellId != null">max_temp_cell_id = #{maxTempCellId},</if>
|
||||
<if test="minCellTemp != null">min_cell_temp = #{minCellTemp},</if>
|
||||
<if test="minTempGroupId != null">min_temp_group_id = #{minTempGroupId},</if>
|
||||
<if test="minTempCellId != null">min_temp_cell_id = #{minTempCellId},</if>
|
||||
<if test="totalChargeCapacity != null">total_charge_capacity = #{totalChargeCapacity},</if>
|
||||
<if test="totalDischargeCapacity != null">total_discharge_capacity = #{totalDischargeCapacity},</if>
|
||||
<if test="sessionChargeCapacity != null">session_charge_capacity = #{sessionChargeCapacity},</if>
|
||||
<if test="sessionDischargeCapacity != null">session_discharge_capacity = #{sessionDischargeCapacity},</if>
|
||||
<if test="availableChargeCapacity != null">available_charge_capacity = #{availableChargeCapacity},</if>
|
||||
<if test="availableDischargeCapacity != null">available_discharge_capacity = #{availableDischargeCapacity},</if>
|
||||
<if test="remainingDischargeTime != null">remaining_discharge_time = #{remainingDischargeTime},</if>
|
||||
<if test="remainingChargeTime != null">remaining_charge_time = #{remainingChargeTime},</if>
|
||||
<if test="maxDischargePower != null">max_discharge_power = #{maxDischargePower},</if>
|
||||
<if test="maxChargePower != null">max_charge_power = #{maxChargePower},</if>
|
||||
<if test="maxDischargeCurrent != null">max_discharge_current = #{maxDischargeCurrent},</if>
|
||||
<if test="maxChargeCurrent != null">max_charge_current = #{maxChargeCurrent},</if>
|
||||
<if test="dailyDischargeCycles != null">daily_discharge_cycles = #{dailyDischargeCycles},</if>
|
||||
<if test="dailyChargeCycles != null">daily_charge_cycles = #{dailyChargeCycles},</if>
|
||||
<if test="dailyDischargeCapacity != null">daily_discharge_capacity = #{dailyDischargeCapacity},</if>
|
||||
<if test="dailyChargeCapacity != null">daily_charge_capacity = #{dailyChargeCapacity},</if>
|
||||
<if test="operatingTemp != null">operating_temp = #{operatingTemp},</if>
|
||||
<if test="bmsStatus != null">bms_status = #{bmsStatus},</if>
|
||||
<if test="bmsChargeStatus != null">bms_charge_status = #{bmsChargeStatus},</if>
|
||||
<if test="stackInsulationResistance != null">stack_insulation_resistance = #{stackInsulationResistance},</if>
|
||||
<if test="siteId != null and siteId != ''">site_id = #{siteId},</if>
|
||||
<if test="deviceId != null and deviceId != ''">device_id = #{deviceId},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</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="updateBy != null">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -143,18 +274,4 @@
|
||||
#{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>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user