Compare commits

...

140 Commits

Author SHA1 Message Date
44baca6c45 revert 2025-08-06 22:26:04 +08:00
f59eeab0d0 本地ems不订阅mqtt 2025-08-06 22:23:48 +08:00
f52f253344 误提交-回退 2025-08-04 16:33:45 +08:00
90315d8e2c DDS页面数据设置 2025-08-04 16:23:04 +08:00
97c667bd77 获取堆下面的簇列表入参+站点id 2025-07-29 18:38:21 +08:00
a12f7820cf DDS监控逻辑修改 2025-07-29 18:28:17 +08:00
8fd2f45e18 DDS数据同步 2025-07-29 15:58:26 +08:00
9da5047148 DDS数据同步 2025-07-27 17:34:38 +08:00
281e0f57c4 modbus轮询修改 2025-07-27 13:49:36 +08:00
7ea52a8972 策略曲线图修改 2025-07-22 22:49:54 +08:00
e3e3dc1d96 策略曲线图修改 2025-07-22 22:27:12 +08:00
b4cbf0b34e 电量指标-修改 2025-07-22 13:54:07 +08:00
cbcaaaffb6 DDS数据同步修改-load 2025-07-21 11:01:22 +08:00
c51c4be498 优化sql 2025-07-18 20:14:38 +08:00
51e6936d77 设备列表-返回新增parentId 2025-07-18 10:35:32 +08:00
b25f5310e1 DDS监听数据结构修改 2025-07-18 01:45:09 +08:00
34c2647495 单体电池每日最新数据处理 2025-07-18 01:38:30 +08:00
41af74b33a jar包替換 2025-07-17 17:12:44 +08:00
9125ce735c 策略数据下发大概逻辑 2025-07-17 15:58:08 +08:00
a4338b3995 单个单体电池数据曲线图 2025-07-17 13:31:25 +08:00
1da9867372 modbus协议轮询设备信息 2025-07-17 10:13:19 +08:00
e2663b18d5 工单管理-工单列表入参 2025-07-16 16:18:35 +08:00
587e9f86b1 工单管理-工单详情新增返回字段 2025-07-15 19:31:07 +08:00
161c54b6ef 工单管理-新增字段 2025-07-15 17:59:57 +08:00
af32d62c80 Mqtt数据插入 2025-07-15 15:34:13 +08:00
1e970c9d19 单体电池-按deviceId排序 2025-07-15 13:37:58 +08:00
e6d6f806e4 策略配置-曲线图模型修改 2025-07-15 12:57:00 +08:00
d22a71739f Merge remote-tracking branch 'origin/dev' into dev 2025-07-14 16:16:19 +08:00
bf1d70c953 修改 mqtt 源数据存储 2025-07-14 16:16:14 +08:00
cceafdca92 log级别修改 2025-07-14 10:53:36 +08:00
3e6cd1b6ed 策略配置-模板配置修改 2025-07-13 16:27:31 +08:00
41656581ca 策略配置-模板配置修改 2025-07-13 15:42:47 +08:00
9fcc81fbac 策略配置-时间配置字段修改 2025-07-13 15:27:38 +08:00
a0b83fc8a4 策略配置-时间配置字段修改 2025-07-13 15:02:00 +08:00
819e4cd3a7 策略配置-字段修改 2025-07-13 14:14:07 +08:00
7b798f8323 策略配置-策略模板修改 2025-07-13 11:58:40 +08:00
acf2164c1c 策略配置-策略时间配置 2025-07-13 00:42:43 +08:00
23f7e70df6 策略配置-策略运行修改 2025-07-12 23:17:41 +08:00
7bd6341c9b 策略配置-模板修改 2025-07-12 22:36:34 +08:00
aa751464b4 策略配置-模板修改&模板时间配置 2025-07-12 18:51:23 +08:00
eafb0ec2c6 设备列表-上传设备图像 2025-07-12 14:54:18 +08:00
118be05c8a 设备列表-设备增删改查 2025-07-12 14:48:35 +08:00
7dc664446e 设备列表-不分页 2025-07-11 20:58:55 +08:00
3b55f3d053 策略配置-策略详情信息 2025-07-11 19:47:15 +08:00
84757ab358 工单管理-字段类型修改 2025-07-11 16:43:47 +08:00
05a2af8c92 工单管理-改动 2025-07-11 15:04:46 +08:00
020d145a1f 策略配置-策略运行 2025-07-10 22:30:56 +08:00
d6ec98eab9 工单管理优化 2025-07-10 17:47:19 +08:00
21ce358638 增加 dds 数据解析 2025-07-10 17:03:07 +08:00
8ce403eff2 问题优化 2025-07-10 12:57:06 +08:00
d37fb949e1 问题优化 2025-07-10 12:42:04 +08:00
406cc59b25 统计报表-功率曲线 2025-07-09 22:41:14 +08:00
53f515ad6c 统计报表-电表报表 2025-07-09 19:15:59 +08:00
29c5ffc15c 首页-数据概览 2025-07-09 16:57:41 +08:00
3eb8636e53 统计报表-sql优化 2025-07-09 14:36:11 +08:00
84d77c2d33 统计报表-获取pcs列表 2025-07-08 20:13:24 +08:00
b0264ebe46 统计报表-电池温度数据 2025-07-08 16:43:33 +08:00
13266bdbd5 统计报表-电池堆曲线 2025-07-08 14:46:42 +08:00
7d1f1836d8 统计报表-pcs曲线 2025-07-07 22:15:01 +08:00
11a95c19fd pcs表新增字段 2025-07-07 15:32:30 +08:00
b2a964cb82 实时运行逻辑 2025-07-07 15:00:59 +08:00
733afa99bd 电表类别-枚举 2025-07-05 23:24:46 +08:00
6a5504434d 电量指标-时间筛选数据 2025-07-05 23:24:13 +08:00
f42e8549b1 单站监控-电表取数逻辑修改 2025-07-04 13:51:42 +08:00
4bb23a7c75 奉贤电表数据接入 2025-07-04 12:37:18 +08:00
126b637932 BMS总览-获取堆下面簇数据 2025-07-03 16:12:19 +08:00
7bf4baf85f 设备列表接口 2025-07-03 15:40:27 +08:00
9dae47934f Merge remote-tracking branch 'origin/dev' into dev 2025-07-03 14:47:33 +08:00
0e726a214d 删除无用代码 2025-07-03 14:47:27 +08:00
7964806b94 站点配置-获取站点列表 2025-07-02 19:43:17 +08:00
b4302edd8a redis key常量 2025-07-02 17:34:09 +08:00
88fee64f46 redis key常量 2025-07-02 17:32:17 +08:00
8081e38d5e 本地调试-回退 2025-07-02 16:10:22 +08:00
8415e2749e 从redis取数 2025-07-02 16:08:50 +08:00
170bae19f8 修正部分参数 2025-07-02 12:26:09 +08:00
37fd07b0c8 修正部分参数 2025-07-02 12:10:46 +08:00
f73ba23b52 修正部分参数 2025-07-02 11:40:23 +08:00
a3f77113c9 字段值修改 2025-07-01 22:09:16 +08:00
a7e33afb19 修正部分参数 2025-07-01 22:03:43 +08:00
2c5d4ddd1b 修正部分参数 2025-07-01 21:58:26 +08:00
9efb87ed24 修正部分参数 2025-07-01 21:50:54 +08:00
4d5f2adef4 修正部分参数 2025-07-01 21:39:32 +08:00
0318b2455d Merge remote-tracking branch 'origin/dev' into dev 2025-07-01 21:28:30 +08:00
b2c624f452 修正部分参数 2025-07-01 21:28:25 +08:00
b207208623 Merge remote-tracking branch 'origin/dev' into dev 2025-07-01 21:22:18 +08:00
259784f525 概率统计-电量指标默认7天 2025-07-01 21:21:55 +08:00
5eb8de692c 修正部分参数 2025-07-01 21:21:20 +08:00
ed025d2750 概率统计-电量指标 2025-07-01 16:25:23 +08:00
d24da5363a 单体电池-增加簇号 2025-07-01 13:28:50 +08:00
342439e3a9 单体电池修改 2025-06-30 23:01:41 +08:00
8663ab8325 单体电池添加入参site_id 2025-06-30 22:22:47 +08:00
93bd88b94c 修正部分参数 2025-06-30 22:08:15 +08:00
7e265e21b1 修正部分参数 2025-06-30 21:54:51 +08:00
d0db9e137a 修正部分参数 2025-06-30 21:47:39 +08:00
790e4ca716 修正部分参数 2025-06-30 21:38:17 +08:00
62e4608a7a Merge remote-tracking branch 'origin/dev' into dev 2025-06-30 21:15:23 +08:00
9fbc6dc6b8 修改 mqtt 密码 2025-06-30 21:15:20 +08:00
3d71b9caba 枚举 2025-06-30 20:33:57 +08:00
a6af1397e9 枚举 2025-06-30 20:01:55 +08:00
2a5ac78394 Merge remote-tracking branch 'origin/dev' into dev 2025-06-30 18:59:00 +08:00
f2e5e07857 紧急修改 siteid 2025-06-30 18:58:53 +08:00
fbab6ea631 电表逻辑修改 2025-06-30 18:14:24 +08:00
337599d1c6 增加工单配置文件 2025-06-30 13:39:51 +08:00
cebd845af1 sql优化 2025-06-30 13:11:05 +08:00
49a3ce2c11 增加mqtt账号密码 2025-06-30 09:46:31 +08:00
551ae90155 删除 lombok 2025-06-29 21:21:37 +08:00
d0b98a0a8a 奉贤数据单独控制 2025-06-29 16:20:13 +08:00
aaacafc0c3 Merge remote-tracking branch 'origin/dev' into dev 2025-06-29 15:41:29 +08:00
c6fc7c00cc 奉贤数据单独控制 2025-06-29 15:41:24 +08:00
ae59143771 单站监控-故障告警 2025-06-29 15:38:31 +08:00
1225559c36 pcs 支路 2025-06-29 15:19:01 +08:00
324beeaa69 优化 2025-06-29 14:45:20 +08:00
aed3f830f5 Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
#	ems-system/src/main/java/com/xzzn/ems/mapper/EmsBatteryDataMapper.java
#	ems-system/src/main/resources/mapper/ems/EmsBatteryDataMapper.xml
2025-06-29 14:04:55 +08:00
747ce8a08d 数据分次提交改成一次性提交 2025-06-29 14:03:24 +08:00
d2824b6087 单站监控-单体电池列表分页 2025-06-29 13:40:37 +08:00
bb0f972f55 奉贤数据单独使用 job处理 2025-06-29 13:13:23 +08:00
d1aa8dbd2c 修改site_id & device_id 2025-06-29 10:55:05 +08:00
177e235c0e 修改 device id 2025-06-28 23:07:49 +08:00
1a56bd6526 修改 device id 2025-06-28 21:16:48 +08:00
38e93c9681 修改 device id 2025-06-28 21:11:23 +08:00
73f62c8fa5 单站监控-电表 2025-06-28 14:56:22 +08:00
365dd819b5 奉贤数据接入 2025-06-27 17:08:26 +08:00
31dc8e72c6 mqtt配置 2025-06-27 14:07:45 +08:00
da894c26d1 Merge remote-tracking branch 'origin/dev' into dev 2025-06-27 12:50:58 +08:00
f439228432 mqtt配置 2025-06-27 12:49:14 +08:00
3609b03deb 单体电池-框架 2025-06-27 10:14:15 +08:00
0544929d07 Merge pull request 'work init' (#1) from main into dev
Reviewed-on: #1
2025-06-26 08:22:37 +00:00
5eb42bec84 work init 2025-06-26 16:13:07 +08:00
e7b3a21c6d BMS总览+电池簇列表取数逻辑 2025-06-26 14:43:38 +08:00
4a69027f63 单站监控-实时运行液冷数据 2025-06-25 14:32:26 +08:00
0d6b712e46 首页-装机容量+功率 2025-06-25 12:40:04 +08:00
46e0b94571 PCS+BMS总览+电池簇抽数逻辑 2025-06-25 11:27:53 +08:00
7b64e193fc PCS抽数逻辑 2025-06-24 17:04:59 +08:00
7134bc03f8 PCS+BMS总览+BMS电池簇-框架 2025-06-24 01:18:07 +08:00
a2d8b6876d 首页看板-数据概览-数据筛选 2025-06-21 09:50:10 +08:00
53c1093f65 首页看板-数据概览 2025-06-21 09:42:31 +08:00
490261bc1f 站点地图修改 2025-06-20 12:17:04 +08:00
43237b4a93 设备监控-实时运行头数据 2025-06-19 19:00:33 +08:00
dd6fe0668d Merge branch 'dev' of http://101.43.41.9:13000/xzzn/emsback into dev
# Conflicts:
#	ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsHomePageController.java
#	ems-system/src/main/java/com/xzzn/ems/domain/EmsPcsData.java
#	ems-system/src/main/java/com/xzzn/ems/mapper/EmsSiteMapper.java
#	ems-system/src/main/java/com/xzzn/ems/service/IEmsSiteService.java
#	ems-system/src/main/java/com/xzzn/ems/service/IHomePageService.java
#	ems-system/src/main/java/com/xzzn/ems/service/ISingleSiteService.java
#	ems-system/src/main/java/com/xzzn/ems/service/impl/EmsSiteServiceImpl.java
#	ems-system/src/main/java/com/xzzn/ems/service/impl/HomePageServiceImpl.java
#	ems-system/src/main/java/com/xzzn/ems/service/impl/SingleSiteServiceImpl.java
#	ems-system/src/main/resources/mapper/ems/EmsPcsDataMapper.xml
#	ems-system/src/main/resources/mapper/ems/EmsSiteMapper.xml
2025-06-19 15:47:41 +08:00
9064c3e786 站点地图 2025-06-19 15:37:02 +08:00
201 changed files with 25147 additions and 259 deletions

View File

@ -0,0 +1,58 @@
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.common.utils.StringUtils;
import com.xzzn.ems.domain.EmsAlarmRecords;
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);
}
/**
* 生成工单
*/
@PostMapping("/createTicketNo")
public AjaxResult createTicketNo(@RequestBody EmsAlarmRecords emsAlarmRecords)
{
Long id = emsAlarmRecords.getId();
if (id == null) {
return error("告警id不能为空");
}
String ticketNo= iEmsAlarmRecordsService.createTicketNo(id,getUserId());
if (StringUtils.isNotEmpty(ticketNo) && ticketNo.contains("T")) {
return AjaxResult.success("操作成功", ticketNo);
} else {
return error(ticketNo);
}
}
}

View File

@ -21,13 +21,26 @@ public class EmsHomePageController extends BaseController{
@Autowired @Autowired
private IEmsSiteService emsSiteService; private IEmsSiteService emsSiteService;
/**
* 获取站点总信息
*/
@GetMapping("/getSiteTotalInfo")
public AjaxResult getSiteTotalInfo()
{
return success(homePageService.getSiteTotalInfo());
}
/** /**
* 首页看板数据 * 首页看板数据
*/ */
@GetMapping("/dataList") @GetMapping("/dataList")
public AjaxResult list() public AjaxResult list() throws Exception
{ {
return success(homePageService.getSiteVo()); try {
return success(homePageService.getHomePageDataList());
} catch (Exception e) {
return error(e.getMessage());
}
} }
/** /**
@ -40,4 +53,5 @@ public class EmsHomePageController extends BaseController{
} }
} }

View File

@ -0,0 +1,139 @@
package com.xzzn.web.controller.ems;
import com.xzzn.common.config.RuoYiConfig;
import com.xzzn.common.core.controller.BaseController;
import com.xzzn.common.core.domain.AjaxResult;
import com.xzzn.common.core.page.TableDataInfo;
import com.xzzn.common.utils.file.FileUploadUtils;
import com.xzzn.common.utils.file.MimeTypeUtils;
import com.xzzn.ems.domain.EmsDevicesSetting;
import com.xzzn.ems.domain.EmsSiteSetting;
import com.xzzn.ems.domain.vo.SiteDeviceListVo;
import com.xzzn.ems.service.IEmsDeviceSettingService;
import com.xzzn.ems.service.IEmsSiteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
*
* 站点配置
*
*/
@RestController
@RequestMapping("/ems/siteConfig")
public class EmsSiteConfigController extends BaseController{
@Autowired
private IEmsSiteService iEmsSiteService;
@Autowired
private IEmsDeviceSettingService iEmsDeviceSettingService;
/**
* 获取站点列表
*/
@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);
}
/**
* 获取设备列表-分页
*/
@GetMapping("/getDeviceInfoList")
public TableDataInfo getDeviceInfoList(@RequestParam String siteId)
{
startPage();
List<SiteDeviceListVo> list = iEmsSiteService.getAllDeviceList(siteId);
return getDataTable(list);
}
/**
* 获取设备详细信息
*/
@GetMapping("/getDeviceDetailInfo")
public AjaxResult getDeviceDetailInfo(@RequestParam Long id)
{
return success(iEmsDeviceSettingService.getDeviceDetailInfo(id));
}
/**
* 获取设备列表-不分页
*/
@GetMapping("/getDeviceList")
public AjaxResult getDeviceInfoList2(@RequestParam String siteId)
{
return success(iEmsSiteService.getAllDeviceList(siteId));
}
/**
* 获取所有设备类别
*/
@GetMapping("/getDeviceCategory")
public AjaxResult getDeviceCategory()
{
return success(iEmsDeviceSettingService.getDeviceCategory());
}
/**
* 新增设备
*/
@PostMapping("/addDevice")
public AjaxResult addDevice(@RequestBody EmsDevicesSetting devicesSetting)
{
int result = iEmsDeviceSettingService.addDevice(devicesSetting);
if (result > 0) {
return AjaxResult.success(result);
} else {
return AjaxResult.error("该设备已存在");
}
}
/**
* 上传设备图片
*/
@PostMapping("/uploadDeviceImg")
public AjaxResult uploadDeviceImg(@RequestParam("avatarfile") MultipartFile file) throws Exception
{
if (!file.isEmpty()) {
String avatar = FileUploadUtils.upload(RuoYiConfig.getDevicePath(), file, MimeTypeUtils.IMAGE_EXTENSION);
AjaxResult ajax = AjaxResult.success();
ajax.put("imgUrl", avatar);
return ajax;
}
return error("上传图片异常,请联系管理员");
}
/**
* 修改Modbus设备配置
*/
@PostMapping("/updateDevice")
public AjaxResult updateDevice(@RequestBody EmsDevicesSetting emsDevicesSetting)
{
int result = iEmsDeviceSettingService.updateDevice(emsDevicesSetting);
if (result > 0) {
return AjaxResult.success(result);
} else if (result == -1) {
return AjaxResult.error("数据不存在");
} else if (result == -2) {
return AjaxResult.error("该设备已存在");
}
return AjaxResult.success(result);
}
/**
* 删除Modbus设备配置
*/
@DeleteMapping("/deleteService/{id}")
public AjaxResult deleteService(@PathVariable Long id)
{
return toAjax(iEmsDeviceSettingService.deleteEmsDevicesSettingById(id));
}
}

View File

@ -0,0 +1,34 @@
package com.xzzn.web.controller.ems;
import com.xzzn.common.core.controller.BaseController;
import com.xzzn.common.core.domain.AjaxResult;
import com.xzzn.ems.service.IEmsSiteService;
import com.xzzn.ems.service.IHomePageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
*
// * 站点地图
*
*/
@RestController
@RequestMapping("/ems/siteMap")
public class EmsSiteMapController extends BaseController{
@Autowired
private IHomePageService homePageService;
/**
* 获取某个站点基本信息
*/
@GetMapping("/getSingleSiteBaseInfo")
public AjaxResult getSingleSiteBaseInfo(@RequestParam String siteId)
{
return success(homePageService.getSingleSiteBaseInfo(siteId));
}
}

View File

@ -2,10 +2,17 @@ package com.xzzn.web.controller.ems;
import com.xzzn.common.core.controller.BaseController; import com.xzzn.common.core.controller.BaseController;
import com.xzzn.common.core.domain.AjaxResult; 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.domain.vo.DateSearchRequest;
import com.xzzn.ems.service.IEmsSiteService;
import com.xzzn.ems.service.IEmsStatsReportService;
import com.xzzn.ems.service.ISingleSiteService; import com.xzzn.ems.service.ISingleSiteService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List;
/** /**
* *
* 单站监控 * 单站监控
@ -17,13 +24,145 @@ public class EmsSiteMonitorController extends BaseController{
@Autowired @Autowired
private ISingleSiteService iSingleSiteService; private ISingleSiteService iSingleSiteService;
@Autowired
private IEmsSiteService iEmsSiteService;
@Autowired
private IEmsStatsReportService iemsStatsReportService;
/** /**
* 获取单站首页数据 * 获取单站首页数据
*/ */
@GetMapping("/homeView") @GetMapping("/homeView")
public AjaxResult getSingleSiteViewInfo(@RequestParam Long siteId) public AjaxResult getSingleSiteViewInfo(@RequestParam String siteId)
{ {
return success(iSingleSiteService.getSiteMonitorDataVo(siteId)); return success(iSingleSiteService.getSiteMonitorDataVo(siteId));
} }
/**
* 单站监控-设备监控-实时运行头部数据
*/
@GetMapping("/runningHeadInfo")
public AjaxResult getRunningHeadInfo(@RequestParam String siteId)
{
return success(iSingleSiteService.getSiteRunningHeadInfo(siteId));
}
/**
* 单站监控-设备监控-实时运行曲线图数据
*/
@GetMapping("/runningGraph/storagePower")
public AjaxResult getRunningGraphStorage(@RequestParam String siteId)
{
return success(iSingleSiteService.getRunningGraphStorage(siteId));
}
@GetMapping("/runningGraph/stackAveTemp")
public AjaxResult getRunningGraphStackTemp(@RequestParam String siteId)
{
return success(iSingleSiteService.getRunningGraphStackTemp(siteId));
}
@GetMapping("/runningGraph/batteryAveSoc")
public AjaxResult getRunningGraphBatterySoc(@RequestParam String siteId)
{
return success(iSingleSiteService.getRunningGraphBatterySoc(siteId));
}
@GetMapping("/runningGraph/batteryAveTemp")
public AjaxResult getRunningGraphBatteryTemp(@RequestParam String siteId)
{
return success(iSingleSiteService.getRunningGraphBatteryTemp(siteId));
}
/**
* 单站监控-设备监控-PCS
*/
@GetMapping("/getPcsDetailInfo")
public AjaxResult getPcsDetailInfo(@RequestParam String siteId)
{
return success(iSingleSiteService.getPcsDetailInfo(siteId));
}
/**
* 单站监控-设备监控-BMS总览
*/
@GetMapping("/getBMSOverView")
public AjaxResult getBMSOverView(@RequestParam String siteId)
{
return success(iSingleSiteService.getBMSOverView(siteId));
}
/**
* 单站监控-设备监控-BMS电池簇
*/
@GetMapping("/getBMSBatteryCluster")
public AjaxResult getBMSBatteryCluster(@RequestParam String siteId)
{
return success(iSingleSiteService.getBMSBatteryCluster(siteId));
}
/**
* 获取所有电池堆
*/
@GetMapping("/getStackNameList")
public AjaxResult getStackNameList(@RequestParam String siteId)
{
return success(iEmsSiteService.getAllStackInfo(siteId));
}
/**
* 获取所有pcs
*/
@GetMapping("/getPcsNameList")
public AjaxResult getPcsNameList(@RequestParam String siteId)
{
return success(iEmsSiteService.getAllPcsInfo(siteId));
}
/**
* 获取所有电池簇
*/
@GetMapping("/getClusterNameList")
public AjaxResult getClusterNameList(@RequestParam String siteId, @RequestParam String stackDeviceId)
{
return success(iEmsSiteService.getAllClusterInfo(siteId, stackDeviceId));
}
/**
* 液冷设备参数
*/
@GetMapping("/getCoolingDataList")
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("/getSingleBatteryData")
public AjaxResult getSingleBatteryData(DateSearchRequest requestVo)
{
return success(iemsStatsReportService.getSingleBatteryData(requestVo));
}
/**
* 电表数据
*/
@GetMapping("/getAmmeterDataList")
public AjaxResult getAmmeterDataList(@RequestParam String siteId)
{
return success(iSingleSiteService.getAmmeterDataList(siteId));
}
} }

View File

@ -0,0 +1,143 @@
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.common.utils.StringUtils;
import com.xzzn.ems.domain.vo.ClusterStatisListVo;
import com.xzzn.ems.domain.vo.DateSearchRequest;
import com.xzzn.ems.domain.vo.StatisAmmeterDateRequest;
import com.xzzn.ems.domain.vo.StatisClusterDateRequest;
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;
import java.util.ArrayList;
import java.util.List;
/**
* 单站监控-统计报表
*
* @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必传");
}
}
/**
* 概率统计-PCS曲线
*/
@GetMapping("/getPCSData")
public AjaxResult getPCSData(DateSearchRequest requestVo)
{
if (!StringUtils.isEmpty(requestVo.getSiteId()) &&
!StringUtils.isEmpty(requestVo.getDeviceId()) &&
!StringUtils.isEmpty(requestVo.getDataType())) {
return success(ieEmsStatsReportService.getPCSDataResult(requestVo));
} else {
return error("缺少必传项");
}
}
/**
* 概率统计-电池堆曲线
*/
@GetMapping("/getStackData")
public AjaxResult getStackData(DateSearchRequest requestVo)
{
if (!StringUtils.isEmpty(requestVo.getSiteId()) &&
!StringUtils.isEmpty(requestVo.getDeviceId()) &&
!StringUtils.isEmpty(requestVo.getDataType())) {
return success(ieEmsStatsReportService.getStackDataResult(requestVo));
} else {
return error("缺少必传项");
}
}
/**
* 概率统计-电池温度等数据
*/
@GetMapping("/getClusterData")
public TableDataInfo getClusterData(StatisClusterDateRequest requestVo)
{
startPage();
List<ClusterStatisListVo> dataList = new ArrayList<>();
if (!StringUtils.isEmpty(requestVo.getStackId()) &&
!StringUtils.isEmpty(requestVo.getClusterId())) {
dataList = ieEmsStatsReportService.getClusterDataResult(requestVo);
return getDataTable(dataList);
} else {
return getDataTable(dataList);
}
}
/**
* 概率统计-获取总表
*/
@GetMapping("/getLoadNameList")
public AjaxResult getLoadNameList(String siteId)
{
if (!StringUtils.isEmpty(siteId)) {
return success(ieEmsStatsReportService.getLoadNameList(siteId));
} else {
return error("缺少必传项");
}
}
/**
* 概率统计-电表报表
*/
@GetMapping("/getAmmeterData")
public AjaxResult getAmmeterData(StatisAmmeterDateRequest requestVo)
{
if (!StringUtils.isEmpty(requestVo.getDeviceId())) {
return success(ieEmsStatsReportService.getAmmeterDataResult(requestVo));
} else {
return error("缺少必传项");
}
}
/**
* 概率统计-功率曲线
*/
@GetMapping("/getPowerData")
public AjaxResult getPowerData(DateSearchRequest requestVo)
{
if (!StringUtils.isEmpty(requestVo.getSiteId())
&& !StringUtils.isEmpty(requestVo.getDeviceId())
&& !StringUtils.isEmpty(requestVo.getDataType())) {
return success(ieEmsStatsReportService.getPowerDataList(requestVo));
} else {
return error("缺少必传项");
}
}
}

View File

@ -0,0 +1,76 @@
package com.xzzn.web.controller.ems;
import com.xzzn.common.utils.StringUtils;
import com.xzzn.ems.domain.EmsStrategyRunning;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.xzzn.common.core.controller.BaseController;
import com.xzzn.common.core.domain.AjaxResult;
import com.xzzn.ems.service.IEmsStrategyService;
/**
* 策略Controller
*
* @author xzzn
* @date 2025-07-10
*/
@RestController
@RequestMapping("/system/strategyRunning")
public class EmsStrategyController extends BaseController
{
@Autowired
private IEmsStrategyService emsStrategyService;
/**
* 获取站点策略配置
*/
@GetMapping("/list")
public AjaxResult list(String siteId) {
return success(emsStrategyService.selectEmsStrategyRunningList(siteId));
}
/**
* 停止策略
*/
@GetMapping(value = "/stop")
public AjaxResult stop(Long id)
{
return toAjax(emsStrategyService.stopRunningStrategy(id));
}
/**
* 获取主策略列表
*/
@GetMapping(value = "/getMainStrategyList")
public AjaxResult getMainStrategyList()
{
return success(emsStrategyService.getMainStrategyList());
}
/**
* 获取辅助策略列表
*/
@GetMapping(value = "/getAuxStrategyList")
public AjaxResult getAuxStrategyList()
{
return success(emsStrategyService.getAuxStrategyList());
}
/**
* 配置策略
*/
@PostMapping(value = "/configStrategy")
public AjaxResult configStrategy(@RequestBody EmsStrategyRunning emsStrategyRunning)
{
if (emsStrategyRunning.getMainStrategyId() == null
|| StringUtils.isEmpty(emsStrategyRunning.getSiteId())){
return error("缺少必填字段");
}
emsStrategyRunning.setCreateBy(getUsername());
emsStrategyRunning.setUpdateBy(getUsername());
int result = emsStrategyService.configStrategy(emsStrategyRunning);
if (result == -1){
return error("不支持重复添加");
}
return success(result);
}
}

View File

@ -0,0 +1,113 @@
package com.xzzn.web.controller.ems;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.xzzn.ems.domain.EmsStrategyTemp;
import com.xzzn.ems.domain.EmsStrategyTimeConfig;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.xzzn.common.annotation.Log;
import com.xzzn.common.core.controller.BaseController;
import com.xzzn.common.core.domain.AjaxResult;
import com.xzzn.common.enums.BusinessType;
import com.xzzn.ems.domain.EmsStrategyCurve;
import com.xzzn.ems.service.IEmsStrategyCurveService;
import com.xzzn.common.utils.poi.ExcelUtil;
/**
* 策曲线Controller
*
* @author xzzn
* @date 2025-07-11
*/
@RestController
@RequestMapping("/strategy/curve")
public class EmsStrategyCurveController extends BaseController
{
@Autowired
private IEmsStrategyCurveService emsStrategyCurveService;
/**
* 查询策曲线列表
*/
@PreAuthorize("@ss.hasPermi('system:curve:list')")
@GetMapping("/list")
public AjaxResult list(EmsStrategyCurve emsStrategyCurve)
{
return success(emsStrategyCurveService.selectEmsStrategyCurveList(emsStrategyCurve));
}
/**
* 导出策曲线列表
*/
@PreAuthorize("@ss.hasPermi('system:curve:export')")
@Log(title = "策曲线", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EmsStrategyCurve emsStrategyCurve)
{
List<EmsStrategyCurve> list = emsStrategyCurveService.selectEmsStrategyCurveList(emsStrategyCurve);
ExcelUtil<EmsStrategyCurve> util = new ExcelUtil<EmsStrategyCurve>(EmsStrategyCurve.class);
util.exportExcel(response, list, "策曲线数据");
}
/**
* 获取策曲线详细信息
*/
@PreAuthorize("@ss.hasPermi('system:curve:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(emsStrategyCurveService.selectEmsStrategyCurveById(id));
}
/**
* 新增策曲线
*/
@PreAuthorize("@ss.hasPermi('system:curve:add')")
@Log(title = "策曲线", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EmsStrategyCurve emsStrategyCurve)
{
return toAjax(emsStrategyCurveService.insertEmsStrategyCurve(emsStrategyCurve));
}
/**
* 修改策曲线
*/
@PreAuthorize("@ss.hasPermi('system:curve:edit')")
@Log(title = "策曲线", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EmsStrategyCurve emsStrategyCurve)
{
return toAjax(emsStrategyCurveService.updateEmsStrategyCurve(emsStrategyCurve));
}
/**
* 删除策曲线
*/
@PreAuthorize("@ss.hasPermi('system:curve:remove')")
@Log(title = "策曲线", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(emsStrategyCurveService.deleteEmsStrategyCurveByIds(ids));
}
/**
* 获取策略曲线图数据
*/
@GetMapping("/curveList")
public AjaxResult getCurveList(EmsStrategyTemp tempConfig)
{
return success(emsStrategyCurveService.getStrategyCurveList(tempConfig));
}
}

View File

@ -0,0 +1,94 @@
package com.xzzn.web.controller.ems;
import com.xzzn.ems.domain.vo.StrategyTempConfigRequest;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.xzzn.common.annotation.Log;
import com.xzzn.common.core.controller.BaseController;
import com.xzzn.common.core.domain.AjaxResult;
import com.xzzn.common.enums.BusinessType;
import com.xzzn.ems.service.IEmsStrategyTempService;
/**
* 模板Controller
*
* @author xzzn
* @date 2025-07-11
*/
@RestController
@RequestMapping("/strategy/temp")
public class EmsStrategyTempController extends BaseController
{
@Autowired
private IEmsStrategyTempService emsStrategyTempService;
/**
* 根据策略id站点id获取所有模板名称
*/
@GetMapping("/getTempNameList")
public AjaxResult getTempNameList(Long strategyId, String siteId)
{
return success(emsStrategyTempService.getTempNameList(strategyId, siteId));
}
/**
* 获取单个模板时间配置详细信息
*/
@PreAuthorize("@ss.hasPermi('system:temp:list')")
@GetMapping("/list")
public AjaxResult list(String templateId)
{
return success(emsStrategyTempService.selectEmsStrategyTempList(templateId));
}
/**
* 新增模板及时间配置
*/
@PreAuthorize("@ss.hasPermi('system:temp:add')")
@Log(title = "模板", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody StrategyTempConfigRequest requestVo)
{
boolean result = emsStrategyTempService.addNewTempAndTimeConfig(requestVo);
if (result) {
return success();
} else {
return AjaxResult.error("新增失败请重试!");
}
}
/**
* 修改模板
*/
@PreAuthorize("@ss.hasPermi('system:temp:edit')")
@Log(title = "模板", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody StrategyTempConfigRequest requestVo)
{
boolean result = emsStrategyTempService.updateEmsStrategyTemp(requestVo);
if (result) {
return success();
} else {
return AjaxResult.error("更新失败,请重试!");
}
}
/**
* 删除模板
*/
@PreAuthorize("@ss.hasPermi('system:temp:remove')")
@Log(title = "模板", businessType = BusinessType.DELETE)
@DeleteMapping("/{templateId}")
public AjaxResult remove(@PathVariable String templateId)
{
return success(emsStrategyTempService.deleteStrategyTempById(templateId));
}
}

View File

@ -0,0 +1,93 @@
package com.xzzn.web.controller.ems;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.xzzn.common.annotation.Log;
import com.xzzn.common.core.controller.BaseController;
import com.xzzn.common.core.domain.AjaxResult;
import com.xzzn.common.enums.BusinessType;
import com.xzzn.ems.domain.EmsStrategyTimeConfig;
import com.xzzn.ems.service.IEmsStrategyTimeConfigService;
/**
* 时间配置Controller
*
* @author xzzn
* @date 2025-07-11
*/
@RestController
@RequestMapping("/strategy/timeConfig")
public class EmsStrategyTimeConfigController extends BaseController
{
@Autowired
private IEmsStrategyTimeConfigService emsStrategyTimeConfigService;
/**
* 查询时间配置列表
*/
@PreAuthorize("@ss.hasPermi('system:config:list')")
@GetMapping("/list")
public AjaxResult list(EmsStrategyTimeConfig emsStrategyTimeConfig)
{
return success(emsStrategyTimeConfigService.getStrategyTimeList(emsStrategyTimeConfig));
}
/**
* 获取时间配置详细信息
*/
@PreAuthorize("@ss.hasPermi('system:config:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(emsStrategyTimeConfigService.selectEmsStrategyTimeConfigById(id));
}
/**
* 新增时间配置
*/
@PreAuthorize("@ss.hasPermi('system:config:add')")
@Log(title = "时间配置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody List<EmsStrategyTimeConfig> emsStrategyTimeConfigList)
{
boolean result = emsStrategyTimeConfigService.insertEmsStrategyTimeConfig(emsStrategyTimeConfigList);
if (result){
return success();
}else {
return error("编辑失败请重试!");
}
}
/**
* 修改时间配置
*/
@PreAuthorize("@ss.hasPermi('system:config:edit')")
@Log(title = "时间配置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EmsStrategyTimeConfig emsStrategyTimeConfig)
{
return toAjax(emsStrategyTimeConfigService.updateEmsStrategyTimeConfig(emsStrategyTimeConfig));
}
/**
* 删除时间配置
*/
@PreAuthorize("@ss.hasPermi('system:config:remove')")
@Log(title = "时间配置", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(emsStrategyTimeConfigService.deleteEmsStrategyTimeConfigByIds(ids));
}
}

View File

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

View File

@ -0,0 +1,119 @@
package com.xzzn.web.controller.ems;
import com.xzzn.ems.domain.EmsMqttMessage;
import com.xzzn.ems.service.IDDSDataProcessService;
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
private IDDSDataProcessService dDSDataProcessService;
@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);
// 订阅电动所系统状态主题
subscribe("021_DDS_01_UP", 1, this::handleDeviceData);
subscribe("021_DDS_01_RECALL", 1, this::handleDeviceData);
subscribe("021_DDS_01_DOWN", 1, this::handleDeviceData);
subscribe("021_DDS_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 {
emsMqttMessageService.insertMqttOriginalMessage(topic,payload);
} 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 {
// 业务处理逻辑
if (topic.startsWith("021_DDS")) {
dDSDataProcessService.handleDdsData(payload);
} else if (topic.startsWith("021_FXX")) {
fXXDataProcessService.handleFxData(payload);
}
emsMqttMessageService.insertMqttOriginalMessage(topic,payload);
} 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);
}
}
}

View File

@ -3,6 +3,8 @@ package com.xzzn.web.controller.system;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.xzzn.system.service.impl.SysUserServiceImpl;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
@ -52,6 +54,8 @@ public class SysUserController extends BaseController
@Autowired @Autowired
private ISysPostService postService; private ISysPostService postService;
@Autowired
private SysUserServiceImpl sysUserServiceImpl;
/** /**
* 获取用户列表 * 获取用户列表
@ -253,4 +257,13 @@ public class SysUserController extends BaseController
{ {
return success(deptService.selectDeptTreeList(dept)); return success(deptService.selectDeptTreeList(dept));
} }
/**
* 获取所有用户
*/
@GetMapping("/getAllUser")
public AjaxResult getAllUser(SysUser user)
{
return success(userService.selectUserList(user));
}
} }

View File

@ -34,7 +34,7 @@ server:
# 日志配置 # 日志配置
logging: logging:
level: level:
com.xzzn: debug com.xzzn: info
org.springframework: warn org.springframework: warn
# 用户配置 # 用户配置
@ -127,3 +127,21 @@ xss:
excludes: /system/notice excludes: /system/notice
# 匹配链接 # 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/* 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
modbus:
pool:
max-total: 20
max-idle: 10
min-idle: 3
poll:
interval: "0 */5 * * * *" # 5分钟间隔
timeout: 30000 # 30秒超时

View File

@ -119,4 +119,12 @@ public class RuoYiConfig
{ {
return getProfile() + "/upload"; return getProfile() + "/upload";
} }
/**
* 获取头像上传路径
*/
public static String getDevicePath()
{
return getProfile() + "/device";
}
} }

View File

@ -0,0 +1,54 @@
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_";
/**
* 电表数据 redis key
*/
public static final String AMMETER = "AMMETER_";
/**
* 动环数据 redis key
*/
public static final String DH = "DH_";
/**
* 电池组 redis key
*/
public static final String GROUP = "GROUP_";
/**
* BMSD原始数据 redis key
*/
public static final String ORIGINAL_BMSD = "BMSD_";
}

View File

@ -1,6 +1,8 @@
package com.xzzn.common.core.controller; package com.xzzn.common.core.controller;
import java.beans.PropertyEditorSupport; import java.beans.PropertyEditorSupport;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -199,4 +201,35 @@ public class BaseController
{ {
return getLoginUser().getUsername(); 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;
}
} }

View File

@ -265,4 +265,15 @@ public class RedisCache
{ {
return redisTemplate.keys(pattern); return redisTemplate.keys(pattern);
} }
/**
* 删除list
*
* @param key Redis键
* @return 对象列表
*/
public boolean deleteList(final String key)
{
return redisTemplate.delete(key);
}
} }

View File

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

View File

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

View File

@ -0,0 +1,34 @@
package com.xzzn.common.enums;
/**
* ammeter-电表数据类别
*
* @author xzzn
*/
public enum AmmeterCategory
{
CURRENT_COMB_ACTIVE("1", "当前组合有功电能"),
CURRENT_COMB_REACTIVE("2", "当前组合无功电能"),
A_POWER("3", "A相功率"),
B_POWER("4", "B相功率"),
C_POWER("5", "C相功率");
private final String code;
private final String info;
AmmeterCategory(String code, String info)
{
this.code = code;
this.info = info;
}
public String getCode()
{
return code;
}
public String getInfo()
{
return info;
}
}

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,36 @@
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", "电表"),
COOLING("COOLING", "冷液体");
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;
}
}

View File

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

View File

@ -0,0 +1,20 @@
package com.xzzn.common.enums;
/**
* device-设备类型
*
* @author xzzn
*/
public enum DeviceType
{
/**
* 网络设备
*/
TCP,
/**
* 串口设备
*/
RTU
}

View File

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

View File

@ -0,0 +1,30 @@
package com.xzzn.common.enums;
/**
* strategy模板-sdc限制
*
* @author xzzn
*/
public enum SdcLimitType
{
OFF("0", ""), ON("1", "");
private final String code;
private final String info;
SdcLimitType(String code, String info)
{
this.code = code;
this.info = info;
}
public String getCode()
{
return code;
}
public String getInfo()
{
return info;
}
}

View File

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

View File

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

View File

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

View File

@ -8,6 +8,7 @@ import java.time.LocalDateTime;
import java.time.LocalTime; import java.time.LocalTime;
import java.time.ZoneId; import java.time.ZoneId;
import java.time.ZonedDateTime; import java.time.ZonedDateTime;
import java.util.Calendar;
import java.util.Date; import java.util.Date;
import org.apache.commons.lang3.time.DateFormatUtils; 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()); ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault());
return Date.from(zdt.toInstant()); 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;
}
} }

View File

@ -1,5 +1,6 @@
package com.xzzn.common.utils; package com.xzzn.common.utils;
import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.HashSet; import java.util.HashSet;
@ -719,4 +720,35 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
} }
return sb.toString(); 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;
}
} }

View File

@ -46,7 +46,24 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.paho</groupId>
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
</dependency>
<!-- 轮询 -->
<dependency>
<groupId>net.wimpi</groupId>
<artifactId>j2mod</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-annotations</artifactId>
</dependency>
<!-- 获取系统信息 --> <!-- 获取系统信息 -->
<dependency> <dependency>
<groupId>com.github.oshi</groupId> <groupId>com.github.oshi</groupId>
@ -60,5 +77,4 @@
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -25,7 +25,7 @@ import com.xzzn.common.utils.ip.IpUtils;
* @author xzzn * @author xzzn
*/ */
@Aspect @Aspect
@Component @Component("customRateLimiterAspect")
public class RateLimiterAspect public class RateLimiterAspect
{ {
private static final Logger log = LoggerFactory.getLogger(RateLimiterAspect.class); private static final Logger log = LoggerFactory.getLogger(RateLimiterAspect.class);

View File

@ -0,0 +1,49 @@
/*
package com.xzzn.framework.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;
@Configuration
@EnableAsync
public class AsyncConfig {
@Bean("modbusTaskExecutor")
public Executor taskExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(5);
executor.setMaxPoolSize(10);
executor.setQueueCapacity(100);
executor.setKeepAliveSeconds(300);
executor.setThreadNamePrefix("ModbusPoller-");
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
executor.initialize();
return executor;
}
*/
/**
* 策略下方定时任务
*//*
*/
/*@Bean("strategyTaskExecutor")
public Executor strategyTaskExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(5);
executor.setMaxPoolSize(10);
executor.setQueueCapacity(100);
executor.setKeepAliveSeconds(300);
executor.setThreadNamePrefix("StrategyPoller-");
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
executor.initialize();
return executor;
}*//*
}
*/

View File

@ -0,0 +1,38 @@
package com.xzzn.framework.config;
import com.xzzn.framework.manager.ModbusConnectionManager;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
@Configuration
public class ModbusConfig {
@Value("${modbus.pool.max-total:20}")
private int maxTotal;
@Value("${modbus.pool.max-idle:10}")
private int maxIdle;
@Value("${modbus.pool.min-idle:3}")
private int minIdle;
@Value("${modbus.pool.max-wait:3000}")
private long maxWaitMillis;
@Value("${modbus.pool.time-between-eviction-runs:30000}")
private long timeBetweenEvictionRunsMillis;
@Value("${modbus.pool.min-evictable-idle-time:60000}")
private long minEvictableIdleTimeMillis;
public ModbusConnectionManager modbusConnectionManager() {
ModbusConnectionManager manager = new ModbusConnectionManager();
manager.setMaxTotal(maxTotal);
manager.setMaxIdle(maxIdle);
manager.setMinIdle(minIdle);
manager.setMaxWaitMillis(maxWaitMillis);
manager.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis);
manager.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis);
return manager;
}
}

View File

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

View File

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

View File

@ -0,0 +1,254 @@
package com.xzzn.framework.manager;
import com.ghgande.j2mod.modbus.net.TCPMasterConnection;
import com.xzzn.ems.domain.EmsDevicesSetting;
import com.xzzn.ems.mapper.EmsDevicesSettingMapper;
import org.apache.commons.pool2.impl.GenericObjectPool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
import javax.annotation.PreDestroy;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.*;
import java.util.stream.Collectors;
@Component
public class ModbusConnectionManager implements ApplicationRunner {
private static final Logger logger = LoggerFactory.getLogger(ModbusConnectionManager.class);
private final Map<Integer, ModbusConnectionWrapper> connectionPool = new ConcurrentHashMap<>();
// 连接池配置参数
private int maxTotal = 20;
private int maxIdle = 10;
private int minIdle = 3;
private long maxWaitMillis = 3000;
private long timeBetweenEvictionRunsMillis = 30000;
private long minEvictableIdleTimeMillis = 60000;
private ScheduledExecutorService scheduler;
@Autowired
private EmsDevicesSettingMapper deviceRepo;
@Override
public void run(ApplicationArguments args) throws Exception {
init();
}
public void init() {
// 启动心跳检测线程
scheduler = Executors.newSingleThreadScheduledExecutor();
scheduler.scheduleAtFixedRate(this::heartbeatCheck, 1, 5, TimeUnit.MINUTES);
logger.info("Modbus连接管理器已初始化");
}
/**
* 获取连接(带自动创建和缓存)
*/
public ModbusConnectionWrapper getConnection(EmsDevicesSetting device) throws Exception {
return connectionPool.compute(Math.toIntExact(device.getId()), (id, wrapper) -> {
try {
if (wrapper == null || !wrapper.isActive()) {
if (connectionPool.size() >= maxTotal) {
evictIdleConnection();
}
logger.info("创建新连接: {}", device);
return new ModbusConnectionWrapper(createRawConnection(device));
}
wrapper.updateLastAccess();
return wrapper;
} catch (Exception e) {
throw new RuntimeException("连接创建失败: " + device.getId(), e);
}
});
}
/**
* 创建原始Modbus连接
*/
private TCPMasterConnection createRawConnection(EmsDevicesSetting device) throws Exception {
try {
InetAddress addr = InetAddress.getByName("192.168.80.100");
TCPMasterConnection connection = new TCPMasterConnection(addr);
connection.setPort(502);
connection.setTimeout(5000);
connection.connect();
return connection;
} catch (Exception e) {
logger.error("创建Modbus连接失败: {}", device, e);
throw e;
}
}
/**
* 心跳检测
*/
private void heartbeatCheck() {
logger.info("开始监控Modbus连接池状态当前连接数: {}", connectionPool.size());
// 步骤1获取所有活跃设备列表与轮询逻辑共用同一批设备
List<EmsDevicesSetting> activeDevices = null;
if (activeDevices == null || activeDevices.isEmpty()) {
logger.warn("无活跃设备,心跳检测仅清理无效连接");
}
// 步骤2清理无效连接遍历连接池移除已失效的连接
List<Integer> invalidDeviceIds = new ArrayList<>();
connectionPool.forEach((deviceId, wrapper) -> {
try {
if (!wrapper.isActive()) {
logger.info("连接{}已失效,移除连接", deviceId);
invalidDeviceIds.add(deviceId);
wrapper.close();
}
} catch (Exception e) {
logger.error("心跳检测异常: {}", deviceId, e);
}
});
// 批量移除无效连接(避免边遍历边修改)
invalidDeviceIds.forEach(connectionPool::remove);
logger.debug("移除无效连接后,连接池大小: {}", connectionPool.size());
// 步骤3补充关键设备的连接优先保障活跃设备的连接存在
if (!activeDevices.isEmpty()) {
// 3.1 先为所有活跃设备预加载连接(确保需要轮询的设备有连接)
preloadCriticalConnection(activeDevices);
// 3.2 若连接数仍不足minIdle补充额外连接可选避免连接池过小
int currentSize = connectionPool.size();
if (currentSize < minIdle) {
logger.info("连接数{}不足最小空闲数{},补充额外连接", currentSize, minIdle);
// 从活跃设备中选未创建连接的设备补充(避免重复创建)
List<EmsDevicesSetting> needMoreDevices = activeDevices.stream()
.filter(device -> !connectionPool.containsKey(Math.toIntExact(device.getId())))
.limit(minIdle - currentSize) // 只补充差额
.collect(Collectors.toList());
preloadCriticalConnection(needMoreDevices); // 复用预加载方法
}
}
}
/**
* 预加载关键连接
*/
private void preloadCriticalConnection(List<EmsDevicesSetting> devices) {
// 简化示例,不实现具体逻辑
logger.info("预加载连接: 连接池当前大小={}, 最小空闲={}", connectionPool.size(), minIdle);
devices.forEach(device -> {
try {
Integer deviceId = Math.toIntExact(device.getId());
if (!connectionPool.containsKey(deviceId)) {
getConnection(device); // 复用已有创建逻辑
}
} catch (Exception e) {
logger.warn("预加载设备{}连接失败", device.getId(), e);
}
});
}
/**
* 移除最久未使用的空闲连接
*/
private void evictIdleConnection() {
if (connectionPool.isEmpty()) {
return;
}
ModbusConnectionWrapper oldestWrapper = null;
long oldestAccessTime = Long.MAX_VALUE;
for (ModbusConnectionWrapper wrapper : connectionPool.values()) {
if (wrapper.isActive() && wrapper.getLastAccessTime() < oldestAccessTime) {
oldestAccessTime = wrapper.getLastAccessTime();
oldestWrapper = wrapper;
}
}
if (oldestWrapper != null) {
logger.info("移除空闲连接: {}", oldestWrapper.getConnection());
connectionPool.values().remove(oldestWrapper);
oldestWrapper.close();
}
}
// 移除指定设备连接
public void removeConnection(Integer deviceId) {
ModbusConnectionWrapper wrapper = connectionPool.remove(deviceId);
if (wrapper != null) {
wrapper.close(); // 双重保障,确保连接关闭
logger.info("连接池主动移除设备{}的连接", deviceId);
}
}
/**
* 判断是否应该移除空连接池
*/
private boolean shouldRemoveEmptyPool(GenericObjectPool<?> pool) {
// 可根据配置或逻辑决定是否移除空连接池
// 这里简单实现为当连接池数量超过最大值时移除
return connectionPool.size() > maxTotal;
}
/**
* 关闭连接
*/
private void closeConnection(TCPMasterConnection connection) {
try {
if (connection != null && connection.isConnected()) {
connection.close();
}
} catch (Exception e) {
logger.error("关闭Modbus连接失败", e);
}
}
// 容器销毁时关闭线程池
@PreDestroy
public void destroy() {
if (scheduler != null) {
scheduler.shutdown();
try {
if (!scheduler.awaitTermination(5, TimeUnit.SECONDS)) {
scheduler.shutdownNow();
}
} catch (InterruptedException e) {
scheduler.shutdownNow();
}
}
}
// Getters and Setters
public void setMaxTotal(int maxTotal) {
this.maxTotal = maxTotal;
}
public void setMaxIdle(int maxIdle) {
this.maxIdle = maxIdle;
}
public void setMinIdle(int minIdle) {
this.minIdle = minIdle;
}
public void setMaxWaitMillis(long maxWaitMillis) {
this.maxWaitMillis = maxWaitMillis;
}
public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis) {
this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
}
public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis) {
this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
}
}

View File

@ -0,0 +1,81 @@
package com.xzzn.framework.manager;
import com.ghgande.j2mod.modbus.net.SerialConnection;
import com.ghgande.j2mod.modbus.net.TCPMasterConnection;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.concurrent.atomic.AtomicInteger;
public class ModbusConnectionWrapper {
private static final Logger logger = LoggerFactory.getLogger(ModbusConnectionWrapper.class);
private static final AtomicInteger COUNTER = new AtomicInteger(0);
private final Object connection;
private final int connectionId;
private volatile long lastAccessTime;
private volatile boolean active = true;
public ModbusConnectionWrapper(Object connection) {
this.connection = connection;
this.connectionId = COUNTER.incrementAndGet();
this.lastAccessTime = System.currentTimeMillis();
logger.info("创建连接包装: {}", this);
}
public boolean isActive() {
if (!active) return false;
try {
// 检查连接是否物理上有效
if (connection instanceof TCPMasterConnection) {
return ((TCPMasterConnection) connection).isConnected();
} else if (connection instanceof SerialConnection) {
return ((SerialConnection) connection).isOpen();
}
} catch (Exception e) {
logger.error("连接状态检查失败: {}", connectionId, e);
return false;
}
// 默认检查空闲时间
return System.currentTimeMillis() - lastAccessTime < 300000; // 5分钟
}
public void updateLastAccess() {
this.lastAccessTime = System.currentTimeMillis();
}
public Object getConnection() {
return connection;
}
public void close() {
try {
logger.info("关闭连接: {}", this);
if (connection instanceof TCPMasterConnection) {
((TCPMasterConnection) connection).close();
} else if (connection instanceof SerialConnection) {
((SerialConnection) connection).close();
}
} catch (Exception e) {
logger.error("关闭连接失败: {}", connectionId, e);
} finally {
this.active = false;
}
}
public long getLastAccessTime() {
return lastAccessTime;
}
@Override
public String toString() {
return "ModbusConnectionWrapper{" +
"connectionId=" + connectionId +
", active=" + active +
", lastAccessTime=" + lastAccessTime +
'}';
}
}

View File

@ -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 = true;
// 存储订阅关系: 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;
}
}
}

View File

@ -0,0 +1,126 @@
package com.xzzn.framework.scheduler;
import com.xzzn.ems.domain.EmsDevicesSetting;
import com.xzzn.ems.mapper.EmsDevicesSettingMapper;
import com.xzzn.ems.mapper.EmsMqttMessageMapper;
import com.xzzn.framework.manager.ModbusConnectionManager;
import com.xzzn.framework.manager.ModbusConnectionWrapper;
import com.xzzn.framework.manager.MqttLifecycleManager;
import com.xzzn.framework.web.service.ModbusService;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
@EnableScheduling
public class ModbusPoller {
private static final Logger logger = LoggerFactory.getLogger(ModbusPoller.class);
private final MqttLifecycleManager mqttLifecycleManager;
@Autowired
private ModbusConnectionManager connectionManager;
@Autowired
private ModbusService modbusService;
@Autowired
private EmsDevicesSettingMapper deviceRepo;
@Autowired
private EmsMqttMessageMapper emsMqttMessageMapper;
@Autowired
public ModbusPoller(MqttLifecycleManager mqttLifecycleManager) {
this.mqttLifecycleManager = mqttLifecycleManager;
}
// 每5分钟触发支持cron表达式动态配置
@Scheduled(cron = "${modbus.poll.interval}")
@Async("modbusTaskExecutor")
public void pollAllDevices() {
logger.info("开始执行Modbus设备轮询...");
List<EmsDevicesSetting> activeDevices = deviceRepo.selectEmsDevicesSettingList(null);
EmsDevicesSetting device = activeDevices.get(0);
try {
processData(device,null);
} catch (Exception e) {
logger.error("调度设备{}任务失败", device.getId(), e);
}
/*
try {
pollSingleDevice(device);
} catch (Exception e) {
logger.error("调度设备{}任务失败", device.getId(), e);
}*/
/*activeDevices.forEach(device -> {
try {
CompletableFuture.runAsync(() -> pollSingleDevice(device))
.exceptionally(e -> {
logger.error("设备{}轮询异常", device.getId(), e);
return null;
});
} catch (Exception e) {
logger.error("调度设备{}任务失败", device.getId(), e);
}
});*/
}
private void pollSingleDevice(EmsDevicesSetting device) {
logger.debug("开始轮询设备: {}", device.getSiteId(), device.getDeviceName(), device.getId());
ModbusConnectionWrapper wrapper = null;
try {
// 获取连接
wrapper = connectionManager.getConnection(device);
// 读取保持寄存器
int[] data = modbusService.readHoldingRegisters(
wrapper.getConnection(),
1, //从站ID
10 // 寄存器数量
);
// 处理读取到的数据
processData(device, data);
} catch (Exception e) {
logger.error("轮询设备{}失败: {}", device.getId(), e.getMessage());
// 标记连接为无效
if (wrapper != null) {
wrapper.close();
connectionManager.removeConnection(Integer.parseInt(device.getDeviceId()));
}
throw new RuntimeException("轮询设备失败", e);
}
}
// 处理获取到的数据发到mqtt服务上
private void processData(EmsDevicesSetting device, int[] data) throws MqttException {
/*if (data == null || data.length == 0) {
logger.warn("设备{}返回空数据", device.getId());
return;
}*/
/*// 数据处理逻辑
StringBuilder sb = new StringBuilder();
sb.append("设备[").append(device.getDeviceName()).append("]数据: ");
for (int i = 0; i < data.length; i++) {
sb.append("R").append(i).append("=").append(data[i]).append(" ");
}
logger.info(sb.toString());*/
// 测试发送mqtt
/* EmsMqttMessage msg = emsMqttMessageMapper.selectEmsMqttMessageById(1L);
String dataJson = msg.getMqttMessage();
String topic = msg.getMqttTopic();
logger.info("topic" + topic);
logger.info("dataJson" + dataJson);
// 将设备数据下发到mqtt服务器上
mqttLifecycleManager.publish(topic, dataJson, 0);*/
}
}

View File

@ -0,0 +1,170 @@
package com.xzzn.framework.scheduler;
import com.alibaba.fastjson2.JSON;
import com.xzzn.common.utils.DateUtils;
import com.xzzn.common.utils.StringUtils;
import com.xzzn.ems.domain.EmsStrategyCurve;
import com.xzzn.ems.domain.EmsStrategyTemp;
import com.xzzn.ems.domain.EmsStrategyTimeConfig;
import com.xzzn.ems.domain.vo.StrategyPowerDataVo;
import com.xzzn.ems.domain.vo.StrategyRunningVo;
import com.xzzn.ems.mapper.*;
import com.xzzn.framework.manager.ModbusConnectionManager;
import com.xzzn.framework.manager.MqttLifecycleManager;
import com.xzzn.framework.web.service.ModbusService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.time.LocalDate;
import java.time.YearMonth;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
@Component
@EnableScheduling
public class StrategyPoller {
private static final Logger logger = LoggerFactory.getLogger(StrategyPoller.class);
private final MqttLifecycleManager mqttLifecycleManager;
@Autowired
private ModbusConnectionManager connectionManager;
@Autowired
private ModbusService modbusService;
@Autowired
private EmsDevicesSettingMapper deviceRepo;
@Autowired
private EmsMqttMessageMapper emsMqttMessageMapper;
@Autowired
private EmsStrategyRunningMapper emsStrategyRunningMapper;
@Autowired
private EmsStrategyTempMapper emsStrategyTempMapper;
@Autowired
private EmsStrategyTimeConfigMapper emsStrategyTimeConfigMapper;
@Autowired
private EmsStrategyCurveMapper emsStrategyCurveMapper;
@Autowired
public StrategyPoller(MqttLifecycleManager mqttLifecycleManager) {
this.mqttLifecycleManager = mqttLifecycleManager;
}
// 每1分钟触发支持cron表达式动态配置
@Scheduled(cron = "0 */1 * * * *")
@Async("strategyTaskExecutor")
public void pollAllDevices() {
logger.info("开始执行策略数据轮询...");
List<StrategyRunningVo> strategyRunningVoList = emsStrategyRunningMapper.getRunningList(null);
strategyRunningVoList.forEach(strategyVo -> {
try {
CompletableFuture.runAsync(() -> {
processData(strategyVo);
})
.exceptionally(e -> {
logger.error("策略{}轮询异常", strategyVo.getId(), e);
return null;
});
} catch (Exception e) {
logger.error("策略下方{}任务失败", strategyVo.getId(), e);
}
});
}
// 处理获取到的数据发到mqtt服务上
private void processData(StrategyRunningVo strategyVo) {
logger.info("策略下发数据处理开始");
// 根据运行策略获取主副策略的模板数据
Long mainStrategyId = strategyVo.getMainStrategyId();
Long auxStrategyId = strategyVo.getAuxStrategyId();
String siteId = strategyVo.getSiteId();
// 处理主策略数据
if (mainStrategyId != null && StringUtils.isNotBlank(siteId)) {
dealStrategyCurveData(mainStrategyId, siteId);
}
// 处理副策略数据
if (auxStrategyId != null && StringUtils.isNotBlank(siteId)) {
dealStrategyCurveData(auxStrategyId, siteId);
}
// 策略数据下发-下方格式暂无
logger.info("策略下发结束");
}
private void dealStrategyCurveData(Long mainStrategyId, String siteId) {
// 获取当前策略的所有模板
List<Map<String, String>> temps = emsStrategyTempMapper.getTempNameList(mainStrategyId,siteId);
if (temps != null && temps.size() > 0) {
for (Map<String, String> temp : temps) {
String tempId = temp.get("templateId");
List<EmsStrategyTimeConfig> timeConfigs = emsStrategyTimeConfigMapper.getAllTimeConfigByTempId(tempId);
if (timeConfigs != null && timeConfigs.size() > 0) {
for (EmsStrategyTimeConfig timeConfig : timeConfigs) {
EmsStrategyCurve curve = new EmsStrategyCurve();
curve.setStrategyId(mainStrategyId);
curve.setSiteId(siteId);
curve.setTemplateId(tempId);
curve.setCreateBy("system");
curve.setCreateTime(DateUtils.getNowDate());
curve.setUpdateBy("system");
curve.setUpdateTime(DateUtils.getNowDate());
// 时间设置
int month = Integer.parseInt(timeConfig.getMonth().toString());
String[] dateList= dealWithMonth(month);
curve.setMonth(Long.valueOf(month));
curve.setStartDate(DateUtils.dateTime(DateUtils.YYYY_MM_DD,dateList[0]));
curve.setEndDate(DateUtils.dateTime(DateUtils.YYYY_MM_DD,dateList[1]));
// powerData-存json格式
List<EmsStrategyTemp> powerConfig = emsStrategyTempMapper.selectStrategyTempByTempId(tempId);
List<StrategyPowerDataVo> powerDataVoList = new ArrayList<>();
for (int i = 0; i < powerConfig.size(); i++) {
EmsStrategyTemp powerTemp = powerConfig.get(i);
StrategyPowerDataVo powerDataVo = new StrategyPowerDataVo();
powerDataVo.setPowerData(powerTemp.getChargeDischargePower());
powerDataVo.setEndTime(DateUtils.parseDateToStr("HH:mm:ss",powerTemp.getEndTime()));
powerDataVo.setStartTime(DateUtils.parseDateToStr("HH:mm:ss",powerTemp.getStartTime()));
powerDataVoList.add(powerDataVo);
}
curve.setPowerData(powerDataVoList !=null ? JSON.toJSON(powerDataVoList).toString() : "");
// 记录推送记录
emsStrategyCurveMapper.insertEmsStrategyCurve(curve);
// 设置已下发
timeConfig.setIsPost(0);
emsStrategyTimeConfigMapper.updateEmsStrategyTimeConfig(timeConfig);
}
}
}
}
}
private String[] dealWithMonth(int month) {
// 获取当前年份
int currentYear = LocalDate.now().getYear();
// 创建YearMonth对象表示当年指定的月份
YearMonth yearMonth = YearMonth.of(currentYear, month);
// 获取当月的第一天和最后一天
LocalDate firstDay = yearMonth.atDay(1);
LocalDate lastDay = yearMonth.atEndOfMonth();
// 定义日期格式(年月日)
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
// 格式化日期
return new String[]{
firstDay.format(formatter),
lastDay.format(formatter)
};
}
}

View File

@ -0,0 +1,101 @@
package com.xzzn.framework.web.service;
import com.ghgande.j2mod.modbus.ModbusException;
import com.ghgande.j2mod.modbus.ModbusIOException;
import com.ghgande.j2mod.modbus.io.ModbusTCPTransaction;
import com.ghgande.j2mod.modbus.msg.ReadInputRegistersRequest;
import com.ghgande.j2mod.modbus.msg.ReadInputRegistersResponse;
import com.ghgande.j2mod.modbus.net.SerialConnection;
import com.ghgande.j2mod.modbus.net.TCPMasterConnection;
import io.github.resilience4j.circuitbreaker.annotation.CircuitBreaker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.retry.annotation.Backoff;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
/**
* Modbus操作服务添加重试机制
*/
@Service
public class ModbusService {
private static final Logger logger = LoggerFactory.getLogger(ModbusService.class);
@Retryable(
value = {ModbusException.class}, // 仅对自定义Modbus异常重试
maxAttempts = 3, // 最大重试3次1次原始调用 + 2次重试
backoff = @Backoff(delay = 1000, multiplier = 2) // 退避策略1s → 2s → 4s
)
@CircuitBreaker(name = "modbusOperation", fallbackMethod = "readRegistersFallback")
public int[] readHoldingRegisters(Object connection, int startAddr, int count) throws ModbusException {
try {
if (connection instanceof TCPMasterConnection) {
return readTcpRegisters((TCPMasterConnection) connection, startAddr, count);
} else if (connection instanceof SerialConnection) {
return readRtuRegisters((SerialConnection) connection, startAddr, count);
}
throw new IllegalArgumentException("不支持的连接类型: " + connection.getClass().getName());
} catch (ModbusIOException e) {
throw new ModbusException("通信故障", e);
} catch (Exception e) {
throw new ModbusException("系统错误", e);
}
}
private int[] readRtuRegisters(SerialConnection connection, int startAddr, int count) {
return null;
}
private int[] readTcpRegisters(TCPMasterConnection conn, int start, int count) throws ModbusException {
// 验证连接是否已建立
if (!conn.isConnected()) {
throw new ModbusIOException("TCP连接未建立");
}
// 使用正确的功能码03 - 读取保持寄存器ReadHoldingRegistersRequest
ReadInputRegistersRequest request = new ReadInputRegistersRequest(start, count);
ModbusTCPTransaction transaction = new ModbusTCPTransaction(conn);
transaction.setRequest(request);
// 设置超时避免长时间阻塞
transaction.setRetries(2);
try {
transaction.execute();
ReadInputRegistersResponse response = (ReadInputRegistersResponse) transaction.getResponse();
if (response == null) {
throw new ModbusException("Modbus异常响应: " + response.getMessage());
}
// 正确解析寄存器值
return parseRegisters(response);
} catch (ModbusException e) {
// 记录详细错误信息
logger.error("读取TCP寄存器失败: {}", e.getMessage());
throw e;
}
}
/**
* 解析Modbus响应中的寄存器值
*/
private int[] parseRegisters(ReadInputRegistersResponse response) {
int byteCount = response.getByteCount();
int[] result = new int[byteCount / 2];
for (int i = 0; i < result.length; i++) {
// 转换为无符号整数
result[i] = response.getRegisterValue(i) & 0xFFFF;
}
return result;
}
/**
* 熔断降级方法
*/
public int[] readRegistersFallback(Object connection, int startAddr, int count, Exception e) {
logger.warn("Modbus操作降级原因: {}),返回空数据", e.getMessage());
return new int[0];
}
}

View File

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

View File

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

View File

@ -22,6 +22,10 @@
<groupId>com.xzzn</groupId> <groupId>com.xzzn</groupId>
<artifactId>ems-common</artifactId> <artifactId>ems-common</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
</dependencies> </dependencies>

View File

@ -11,7 +11,7 @@ import com.xzzn.common.annotation.Excel;
* 告警记录对象 ems_alarm_records * 告警记录对象 ems_alarm_records
* *
* @author xzzn * @author xzzn
* @date 2025-06-17 * @date 2025-06-29
*/ */
public class EmsAlarmRecords extends BaseEntity public class EmsAlarmRecords extends BaseEntity
{ {
@ -48,16 +48,20 @@ public class EmsAlarmRecords extends BaseEntity
/** 站点id */ /** 站点id */
@Excel(name = "站点id") @Excel(name = "站点id")
private Long siteId; private String siteId;
/** 设备唯一标识符 */ /** 设备唯一标识符 */
@Excel(name = "设备唯一标识符") @Excel(name = "设备唯一标识符")
private Long deviceId; private String deviceId;
/** 设备名称,用于标识设备 */ /** 设备名称,用于标识设备 */
@Excel(name = "设备名称,用于标识设备") @Excel(name = "设备名称,用于标识设备")
private String deviceName; private String deviceName;
/** 工单号规则T+日期+6位随机 */
@Excel(name = "工单号", readConverterExp = "规=则T+日期+6位随机")
private String ticketNo;
public void setId(Long id) public void setId(Long id)
{ {
this.id = id; this.id = id;
@ -128,22 +132,22 @@ public class EmsAlarmRecords extends BaseEntity
return status; return status;
} }
public void setSiteId(Long siteId) public void setSiteId(String siteId)
{ {
this.siteId = siteId; this.siteId = siteId;
} }
public Long getSiteId() public String getSiteId()
{ {
return siteId; return siteId;
} }
public void setDeviceId(Long deviceId) public void setDeviceId(String deviceId)
{ {
this.deviceId = deviceId; this.deviceId = deviceId;
} }
public Long getDeviceId() public String getDeviceId()
{ {
return deviceId; return deviceId;
} }
@ -158,6 +162,14 @@ public class EmsAlarmRecords extends BaseEntity
return deviceName; return deviceName;
} }
public String getTicketNo() {
return ticketNo;
}
public void setTicketNo(String ticketNo) {
this.ticketNo = ticketNo;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -176,6 +188,7 @@ public class EmsAlarmRecords extends BaseEntity
.append("siteId", getSiteId()) .append("siteId", getSiteId())
.append("deviceId", getDeviceId()) .append("deviceId", getDeviceId())
.append("deviceName", getDeviceName()) .append("deviceName", getDeviceName())
.append("ticketNo", getTicketNo())
.toString(); .toString();
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,764 @@
package com.xzzn.ems.domain;
import java.math.BigDecimal;
import com.xzzn.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xzzn.common.annotation.Excel;
/**
* 电池簇数据对象 ems_battery_cluster
*
* @author xzzn
* @date 2025-07-29
*/
public class EmsBatteryCluster extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 工作状态0-正常 1-异常 2-停止 */
@Excel(name = "工作状态0-正常 1-异常 2-停止")
private String workStatus;
/** 与PCS通信状态0-正常 1-通信中断 2-异常 */
@Excel(name = "与PCS通信状态0-正常 1-通信中断 2-异常")
private String pcsCommunicationStatus;
/** 与EMS通信状态0-正常 1-通信中断 2-异常 */
@Excel(name = "与EMS通信状态0-正常 1-通信中断 2-异常")
private String emsCommunicationStatus;
/** 簇电压 (V) */
@Excel(name = "簇电压 (V)")
private BigDecimal clusterVoltage;
/** 可充电量 (kWh) */
@Excel(name = "可充电量 (kWh)")
private BigDecimal chargeableCapacity;
/** 累计充电量 (kWh) */
@Excel(name = "累计充电量 (kWh)")
private BigDecimal totalChargedCapacity;
/** 簇电流 (A) */
@Excel(name = "簇电流 (A)")
private BigDecimal clusterCurrent;
/** 可放电量 (kWh) */
@Excel(name = "可放电量 (kWh)")
private BigDecimal dischargeableCapacity;
/** 累计放电量 (kWh) */
@Excel(name = "累计放电量 (kWh)")
private BigDecimal totalDischargedCapacity;
/** SOH (%) */
@Excel(name = "SOH (%)")
private BigDecimal soh;
/** 平均温度 (℃) */
@Excel(name = "平均温度 (℃)")
private BigDecimal averageTemperature;
/** 绝缘电阻 (Ω) */
@Excel(name = "绝缘电阻 (Ω)")
private BigDecimal insulationResistance;
/** 当前SOC (%) */
@Excel(name = "当前SOC (%)")
private BigDecimal currentSoc;
/** 站点id */
@Excel(name = "站点id")
private String siteId;
/** 设备唯一标识符 */
@Excel(name = "设备唯一标识符")
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)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setWorkStatus(String workStatus)
{
this.workStatus = workStatus;
}
public String getWorkStatus()
{
return workStatus;
}
public void setPcsCommunicationStatus(String pcsCommunicationStatus)
{
this.pcsCommunicationStatus = pcsCommunicationStatus;
}
public String getPcsCommunicationStatus()
{
return pcsCommunicationStatus;
}
public void setEmsCommunicationStatus(String emsCommunicationStatus)
{
this.emsCommunicationStatus = emsCommunicationStatus;
}
public String getEmsCommunicationStatus()
{
return emsCommunicationStatus;
}
public void setClusterVoltage(BigDecimal clusterVoltage)
{
this.clusterVoltage = clusterVoltage;
}
public BigDecimal getClusterVoltage()
{
return clusterVoltage;
}
public void setChargeableCapacity(BigDecimal chargeableCapacity)
{
this.chargeableCapacity = chargeableCapacity;
}
public BigDecimal getChargeableCapacity()
{
return chargeableCapacity;
}
public void setTotalChargedCapacity(BigDecimal totalChargedCapacity)
{
this.totalChargedCapacity = totalChargedCapacity;
}
public BigDecimal getTotalChargedCapacity()
{
return totalChargedCapacity;
}
public void setClusterCurrent(BigDecimal clusterCurrent)
{
this.clusterCurrent = clusterCurrent;
}
public BigDecimal getClusterCurrent()
{
return clusterCurrent;
}
public void setDischargeableCapacity(BigDecimal dischargeableCapacity)
{
this.dischargeableCapacity = dischargeableCapacity;
}
public BigDecimal getDischargeableCapacity()
{
return dischargeableCapacity;
}
public void setTotalDischargedCapacity(BigDecimal totalDischargedCapacity)
{
this.totalDischargedCapacity = totalDischargedCapacity;
}
public BigDecimal getTotalDischargedCapacity()
{
return totalDischargedCapacity;
}
public void setSoh(BigDecimal soh)
{
this.soh = soh;
}
public BigDecimal getSoh()
{
return soh;
}
public void setAverageTemperature(BigDecimal averageTemperature)
{
this.averageTemperature = averageTemperature;
}
public BigDecimal getAverageTemperature()
{
return averageTemperature;
}
public void setInsulationResistance(BigDecimal insulationResistance)
{
this.insulationResistance = insulationResistance;
}
public BigDecimal getInsulationResistance()
{
return insulationResistance;
}
public void setCurrentSoc(BigDecimal currentSoc)
{
this.currentSoc = currentSoc;
}
public BigDecimal getCurrentSoc()
{
return currentSoc;
}
public void setSiteId(String siteId)
{
this.siteId = siteId;
}
public String getSiteId()
{
return siteId;
}
public void setDeviceId(String deviceId)
{
this.deviceId = deviceId;
}
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)
.append("id", getId())
.append("workStatus", getWorkStatus())
.append("pcsCommunicationStatus", getPcsCommunicationStatus())
.append("emsCommunicationStatus", getEmsCommunicationStatus())
.append("clusterVoltage", getClusterVoltage())
.append("chargeableCapacity", getChargeableCapacity())
.append("totalChargedCapacity", getTotalChargedCapacity())
.append("clusterCurrent", getClusterCurrent())
.append("dischargeableCapacity", getDischargeableCapacity())
.append("totalDischargedCapacity", getTotalDischargedCapacity())
.append("soh", getSoh())
.append("averageTemperature", getAverageTemperature())
.append("insulationResistance", getInsulationResistance())
.append("currentSoc", getCurrentSoc())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("siteId", getSiteId())
.append("deviceId", getDeviceId())
.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();
}
}

View File

@ -0,0 +1,226 @@
package com.xzzn.ems.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xzzn.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xzzn.common.annotation.Excel;
/**
* 单体电池实时数据对象 ems_battery_data
*
* @author xzzn
* @date 2025-07-29
*/
public class EmsBatteryData extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 电池堆 */
@Excel(name = "电池堆")
private String batteryPack;
/** 电池簇 */
@Excel(name = "电池簇")
private String batteryCluster;
/** 单体编号 */
@Excel(name = "单体编号")
private String batteryCellId;
/** 电压 (V) */
@Excel(name = "电压 (V)")
private BigDecimal voltage;
/** 温度 (℃) */
@Excel(name = "温度 (℃)")
private BigDecimal temperature;
/** SOC (%) */
@Excel(name = "SOC (%)")
private BigDecimal soc;
/** SOH (%) */
@Excel(name = "SOH (%)")
private BigDecimal soh;
/** 数据采集时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "数据采集时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date dataTimestamp;
/** 站点id */
@Excel(name = "站点id")
private String siteId;
/** 设备唯一标识符 */
@Excel(name = "设备唯一标识符")
private String deviceId;
/** 簇设备id */
@Excel(name = "簇设备id")
private String clusterDeviceId;
/** 单体电池内阻 */
@Excel(name = "单体电池内阻")
private BigDecimal interResistance;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setBatteryPack(String batteryPack)
{
this.batteryPack = batteryPack;
}
public String getBatteryPack()
{
return batteryPack;
}
public void setBatteryCluster(String batteryCluster)
{
this.batteryCluster = batteryCluster;
}
public String getBatteryCluster()
{
return batteryCluster;
}
public void setBatteryCellId(String batteryCellId)
{
this.batteryCellId = batteryCellId;
}
public String getBatteryCellId()
{
return batteryCellId;
}
public void setVoltage(BigDecimal voltage)
{
this.voltage = voltage;
}
public BigDecimal getVoltage()
{
return voltage;
}
public void setTemperature(BigDecimal temperature)
{
this.temperature = temperature;
}
public BigDecimal getTemperature()
{
return temperature;
}
public void setSoc(BigDecimal soc)
{
this.soc = soc;
}
public BigDecimal getSoc()
{
return soc;
}
public void setSoh(BigDecimal soh)
{
this.soh = soh;
}
public BigDecimal getSoh()
{
return soh;
}
public void setDataTimestamp(Date dataTimestamp)
{
this.dataTimestamp = dataTimestamp;
}
public Date getDataTimestamp()
{
return dataTimestamp;
}
public void setSiteId(String siteId)
{
this.siteId = siteId;
}
public String getSiteId()
{
return siteId;
}
public void setDeviceId(String deviceId)
{
this.deviceId = deviceId;
}
public String getDeviceId()
{
return deviceId;
}
public void setClusterDeviceId(String clusterDeviceId)
{
this.clusterDeviceId = clusterDeviceId;
}
public String getClusterDeviceId()
{
return clusterDeviceId;
}
public void setInterResistance(BigDecimal interResistance)
{
this.interResistance = interResistance;
}
public BigDecimal getInterResistance()
{
return interResistance;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("batteryPack", getBatteryPack())
.append("batteryCluster", getBatteryCluster())
.append("batteryCellId", getBatteryCellId())
.append("voltage", getVoltage())
.append("temperature", getTemperature())
.append("soc", getSoc())
.append("soh", getSoh())
.append("dataTimestamp", getDataTimestamp())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("siteId", getSiteId())
.append("deviceId", getDeviceId())
.append("clusterDeviceId", getClusterDeviceId())
.append("interResistance", getInterResistance())
.toString();
}
}

View File

@ -0,0 +1,213 @@
package com.xzzn.ems.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xzzn.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xzzn.common.annotation.Excel;
/**
* 单体电池每日最新数据对象 ems_battery_data_daily_latest
*
* @author xzzn
* @date 2025-07-17
*/
public class EmsBatteryDataDailyLatest extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 电池堆 */
@Excel(name = "电池堆")
private String batteryPack;
/** 电池簇 */
@Excel(name = "电池簇")
private String batteryCluster;
/** 单体编号 */
@Excel(name = "单体编号")
private String batteryCellId;
/** 电压 (V) */
@Excel(name = "电压 (V)")
private BigDecimal voltage;
/** 温度 (℃) */
@Excel(name = "温度 (℃)")
private BigDecimal temperature;
/** SOC (%) */
@Excel(name = "SOC (%)")
private BigDecimal soc;
/** SOH (%) */
@Excel(name = "SOH (%)")
private BigDecimal soh;
/** 日期yyyy-MM-dd */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "日期yyyy-MM-dd", width = 30, dateFormat = "yyyy-MM-dd")
private Date dateDay;
/** 数据采集时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "数据采集时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date dataTimestamp;
/** 站点id */
@Excel(name = "站点id")
private String siteId;
/** 设备唯一标识符 */
@Excel(name = "设备唯一标识符")
private String deviceId;
/** 簇设备id */
@Excel(name = "簇设备id")
private String clusterDeviceId;
public void setBatteryPack(String batteryPack)
{
this.batteryPack = batteryPack;
}
public String getBatteryPack()
{
return batteryPack;
}
public void setBatteryCluster(String batteryCluster)
{
this.batteryCluster = batteryCluster;
}
public String getBatteryCluster()
{
return batteryCluster;
}
public void setBatteryCellId(String batteryCellId)
{
this.batteryCellId = batteryCellId;
}
public String getBatteryCellId()
{
return batteryCellId;
}
public void setVoltage(BigDecimal voltage)
{
this.voltage = voltage;
}
public BigDecimal getVoltage()
{
return voltage;
}
public void setTemperature(BigDecimal temperature)
{
this.temperature = temperature;
}
public BigDecimal getTemperature()
{
return temperature;
}
public void setSoc(BigDecimal soc)
{
this.soc = soc;
}
public BigDecimal getSoc()
{
return soc;
}
public void setSoh(BigDecimal soh)
{
this.soh = soh;
}
public BigDecimal getSoh()
{
return soh;
}
public void setDateDay(Date dateDay)
{
this.dateDay = dateDay;
}
public Date getDateDay()
{
return dateDay;
}
public void setDataTimestamp(Date dataTimestamp)
{
this.dataTimestamp = dataTimestamp;
}
public Date getDataTimestamp()
{
return dataTimestamp;
}
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;
}
public void setClusterDeviceId(String clusterDeviceId)
{
this.clusterDeviceId = clusterDeviceId;
}
public String getClusterDeviceId()
{
return clusterDeviceId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("batteryPack", getBatteryPack())
.append("batteryCluster", getBatteryCluster())
.append("batteryCellId", getBatteryCellId())
.append("voltage", getVoltage())
.append("temperature", getTemperature())
.append("soc", getSoc())
.append("soh", getSoh())
.append("dateDay", getDateDay())
.append("dataTimestamp", getDataTimestamp())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("siteId", getSiteId())
.append("deviceId", getDeviceId())
.append("clusterDeviceId", getClusterDeviceId())
.toString();
}
}

View File

@ -0,0 +1,164 @@
package com.xzzn.ems.domain;
import java.math.BigDecimal;
import com.xzzn.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xzzn.common.annotation.Excel;
/**
* 电池组数据对象 ems_battery_group
*
* @author xzzn
* @date 2025-07-29
*/
public class EmsBatteryGroup extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 电池组状态 */
@Excel(name = "电池组状态")
private String status;
/** 电压 (V) */
@Excel(name = "电压 (V)")
private BigDecimal voltage;
/** 电流 (A) */
@Excel(name = "电流 (A)")
private BigDecimal current;
/** SOC (%) */
@Excel(name = "SOC (%)")
private BigDecimal soc;
/** SOH (%) */
@Excel(name = "SOH (%)")
private BigDecimal soh;
/** 备电预估时长 */
@Excel(name = "备电预估时长")
private BigDecimal estimatedBackupDuration;
/** 站点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 setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setVoltage(BigDecimal voltage)
{
this.voltage = voltage;
}
public BigDecimal getVoltage()
{
return voltage;
}
public void setCurrent(BigDecimal current)
{
this.current = current;
}
public BigDecimal getCurrent()
{
return current;
}
public void setSoc(BigDecimal soc)
{
this.soc = soc;
}
public BigDecimal getSoc()
{
return soc;
}
public void setSoh(BigDecimal soh)
{
this.soh = soh;
}
public BigDecimal getSoh()
{
return soh;
}
public void setEstimatedBackupDuration(BigDecimal estimatedBackupDuration)
{
this.estimatedBackupDuration = estimatedBackupDuration;
}
public BigDecimal getEstimatedBackupDuration()
{
return estimatedBackupDuration;
}
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("status", getStatus())
.append("voltage", getVoltage())
.append("current", getCurrent())
.append("soc", getSoc())
.append("soh", getSoh())
.append("estimatedBackupDuration", getEstimatedBackupDuration())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("siteId", getSiteId())
.append("deviceId", getDeviceId())
.toString();
}
}

View File

@ -0,0 +1,883 @@
package com.xzzn.ems.domain;
import java.math.BigDecimal;
import com.xzzn.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xzzn.common.annotation.Excel;
/**
* 电池堆数据对象 ems_battery_stack
*
* @author xzzn
* @date 2025-07-02
*/
public class EmsBatteryStack extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 工作状态0-正常 1-异常 2-停止 */
@Excel(name = "工作状态0-正常 1-异常 2-停止")
private String workStatus;
/** 与PCS通信状态0-正常 1-通信中断 2-异常 */
@Excel(name = "与PCS通信状态0-正常 1-通信中断 2-异常")
private String pcsCommunicationStatus;
/** 与EMS通信状态0-正常 1-通信中断 2-异常 */
@Excel(name = "与EMS通信状态0-正常 1-通信中断 2-异常")
private String emsCommunicationStatus;
/** 电操状态 */
@Excel(name = "电操状态")
private String operationStatus;
/** 电池堆电压/V */
@Excel(name = "电池堆电压/V")
private BigDecimal stackVoltage;
/** 电池堆电流/A */
@Excel(name = "电池堆电流/A")
private BigDecimal stackCurrent;
/** 电池堆SOC/% */
@Excel(name = "电池堆SOC/%")
private BigDecimal stackSoc;
/** 电池堆SOH/% */
@Excel(name = "电池堆SOH/%")
private BigDecimal stackSoh;
/** 最高电池电压/V */
@Excel(name = "最高电池电压/V")
private BigDecimal maxCellVoltage;
/** 最高电池电压组号 */
@Excel(name = "最高电池电压组号")
private Long maxVoltageGroupId;
/** 高电压电池所在组中的点号 */
@Excel(name = "高电压电池所在组中的点号")
private Long maxVoltageCellId;
/** 最低电池电压/V */
@Excel(name = "最低电池电压/V")
private BigDecimal minCellVoltage;
/** 最低电池电压组号 */
@Excel(name = "最低电池电压组号")
private Long minVoltageGroupId;
/** 最低电压电池所在组中的点号 */
@Excel(name = "最低电压电池所在组中的点号")
private Long minVoltageCellId;
/** 最高电池温度/℃ */
@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;
/** 单体个数 */
@Excel(name = "单体个数")
private Long batteryNumber;
/** 单体平均电压 */
@Excel(name = "单体平均电压")
private BigDecimal batteryAvgVoltage;
/** 单体电池压差 */
@Excel(name = "单体电池压差")
private BigDecimal batteryDifferentPressure;
/** 平均温度 */
@Excel(name = "平均温度")
private BigDecimal avgTemperature;
/** 单体电池温度差 */
@Excel(name = "单体电池温度差")
private BigDecimal batteryDifferentTemperature;
/** 最大单体内阻 */
@Excel(name = "最大单体内阻")
private BigDecimal maxInternalResistance;
/** 最小单体内阻 */
@Excel(name = "最小单体内阻")
private BigDecimal minInternalResistance;
/** 平均单体内阻 */
@Excel(name = "平均单体内阻")
private BigDecimal avgInternalResistance;
/** 单体内阻差 */
@Excel(name = "单体内阻差")
private BigDecimal batteryDefferentResistance;
/** 最大单体内阻编号 */
@Excel(name = "最大单体内阻编号")
private Long maxResistanceCellId;
/** 最小单体内阻编号 */
@Excel(name = "最小单体内阻编号")
private Long minResistanceCellId;
/** 环境温度 */
@Excel(name = "环境温度")
private BigDecimal environmentTemperature;
/** 环境湿度 */
@Excel(name = "环境湿度")
private BigDecimal environmentHumidity;
/** 断路器状态 */
@Excel(name = "断路器状态")
private String circuitBreakerStatus;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setWorkStatus(String workStatus)
{
this.workStatus = workStatus;
}
public String getWorkStatus()
{
return workStatus;
}
public void setPcsCommunicationStatus(String pcsCommunicationStatus)
{
this.pcsCommunicationStatus = pcsCommunicationStatus;
}
public String getPcsCommunicationStatus()
{
return pcsCommunicationStatus;
}
public void setEmsCommunicationStatus(String emsCommunicationStatus)
{
this.emsCommunicationStatus = emsCommunicationStatus;
}
public String getEmsCommunicationStatus()
{
return emsCommunicationStatus;
}
public void setOperationStatus(String operationStatus)
{
this.operationStatus = operationStatus;
}
public String getOperationStatus()
{
return operationStatus;
}
public void setStackVoltage(BigDecimal stackVoltage)
{
this.stackVoltage = stackVoltage;
}
public BigDecimal getStackVoltage()
{
return stackVoltage;
}
public void setStackCurrent(BigDecimal stackCurrent)
{
this.stackCurrent = stackCurrent;
}
public BigDecimal getStackCurrent()
{
return stackCurrent;
}
public void setStackSoc(BigDecimal stackSoc)
{
this.stackSoc = stackSoc;
}
public BigDecimal getStackSoc()
{
return stackSoc;
}
public void setStackSoh(BigDecimal stackSoh)
{
this.stackSoh = stackSoh;
}
public BigDecimal getStackSoh()
{
return stackSoh;
}
public void setMaxCellVoltage(BigDecimal maxCellVoltage)
{
this.maxCellVoltage = maxCellVoltage;
}
public BigDecimal getMaxCellVoltage()
{
return maxCellVoltage;
}
public void setMaxVoltageGroupId(Long maxVoltageGroupId)
{
this.maxVoltageGroupId = maxVoltageGroupId;
}
public Long getMaxVoltageGroupId()
{
return maxVoltageGroupId;
}
public void setMaxVoltageCellId(Long maxVoltageCellId)
{
this.maxVoltageCellId = maxVoltageCellId;
}
public Long getMaxVoltageCellId()
{
return maxVoltageCellId;
}
public void setMinCellVoltage(BigDecimal minCellVoltage)
{
this.minCellVoltage = minCellVoltage;
}
public BigDecimal getMinCellVoltage()
{
return minCellVoltage;
}
public void setMinVoltageGroupId(Long minVoltageGroupId)
{
this.minVoltageGroupId = minVoltageGroupId;
}
public Long getMinVoltageGroupId()
{
return minVoltageGroupId;
}
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 String getSiteId()
{
return siteId;
}
public void setDeviceId(String deviceId)
{
this.deviceId = deviceId;
}
public String getDeviceId()
{
return deviceId;
}
public void setBatteryNumber(Long batteryNumber)
{
this.batteryNumber = batteryNumber;
}
public Long getBatteryNumber()
{
return batteryNumber;
}
public void setBatteryAvgVoltage(BigDecimal batteryAvgVoltage)
{
this.batteryAvgVoltage = batteryAvgVoltage;
}
public BigDecimal getBatteryAvgVoltage()
{
return batteryAvgVoltage;
}
public void setBatteryDifferentPressure(BigDecimal batteryDifferentPressure)
{
this.batteryDifferentPressure = batteryDifferentPressure;
}
public BigDecimal getBatteryDifferentPressure()
{
return batteryDifferentPressure;
}
public void setAvgTemperature(BigDecimal avgTemperature)
{
this.avgTemperature = avgTemperature;
}
public BigDecimal getAvgTemperature()
{
return avgTemperature;
}
public void setBatteryDifferentTemperature(BigDecimal batteryDifferentTemperature)
{
this.batteryDifferentTemperature = batteryDifferentTemperature;
}
public BigDecimal getBatteryDifferentTemperature()
{
return batteryDifferentTemperature;
}
public void setMaxInternalResistance(BigDecimal maxInternalResistance)
{
this.maxInternalResistance = maxInternalResistance;
}
public BigDecimal getMaxInternalResistance()
{
return maxInternalResistance;
}
public void setMinInternalResistance(BigDecimal minInternalResistance)
{
this.minInternalResistance = minInternalResistance;
}
public BigDecimal getMinInternalResistance()
{
return minInternalResistance;
}
public void setAvgInternalResistance(BigDecimal avgInternalResistance)
{
this.avgInternalResistance = avgInternalResistance;
}
public BigDecimal getAvgInternalResistance()
{
return avgInternalResistance;
}
public void setBatteryDefferentResistance(BigDecimal batteryDefferentResistance)
{
this.batteryDefferentResistance = batteryDefferentResistance;
}
public BigDecimal getBatteryDefferentResistance()
{
return batteryDefferentResistance;
}
public void setMaxResistanceCellId(Long maxResistanceCellId)
{
this.maxResistanceCellId = maxResistanceCellId;
}
public Long getMaxResistanceCellId()
{
return maxResistanceCellId;
}
public void setMinResistanceCellId(Long minResistanceCellId)
{
this.minResistanceCellId = minResistanceCellId;
}
public Long getMinResistanceCellId()
{
return minResistanceCellId;
}
public void setEnvironmentTemperature(BigDecimal environmentTemperature)
{
this.environmentTemperature = environmentTemperature;
}
public BigDecimal getEnvironmentTemperature()
{
return environmentTemperature;
}
public void setEnvironmentHumidity(BigDecimal environmentHumidity)
{
this.environmentHumidity = environmentHumidity;
}
public BigDecimal getEnvironmentHumidity()
{
return environmentHumidity;
}
public void setCircuitBreakerStatus(String circuitBreakerStatus)
{
this.circuitBreakerStatus = circuitBreakerStatus;
}
public String getCircuitBreakerStatus()
{
return circuitBreakerStatus;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("workStatus", getWorkStatus())
.append("pcsCommunicationStatus", getPcsCommunicationStatus())
.append("emsCommunicationStatus", getEmsCommunicationStatus())
.append("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())
.append("batteryNumber", getBatteryNumber())
.append("batteryAvgVoltage", getBatteryAvgVoltage())
.append("batteryDifferentPressure", getBatteryDifferentPressure())
.append("avgTemperature", getAvgTemperature())
.append("batteryDifferentTemperature", getBatteryDifferentTemperature())
.append("maxInternalResistance", getMaxInternalResistance())
.append("minInternalResistance", getMinInternalResistance())
.append("avgInternalResistance", getAvgInternalResistance())
.append("batteryDefferentResistance", getBatteryDefferentResistance())
.append("maxResistanceCellId", getMaxResistanceCellId())
.append("minResistanceCellId", getMinResistanceCellId())
.append("environmentTemperature", getEnvironmentTemperature())
.append("environmentHumidity", getEnvironmentHumidity())
.append("circuitBreakerStatus", getCircuitBreakerStatus())
.toString();
}
}

View File

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

View File

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

View File

@ -0,0 +1,104 @@
package com.xzzn.ems.domain;
import java.math.BigDecimal;
import com.xzzn.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xzzn.common.annotation.Excel;
/**
* 动环数据对象 ems_dh_data
*
* @author xzzn
* @date 2025-07-28
*/
public class EmsDhData extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 湿度 */
@Excel(name = "湿度")
private BigDecimal humidity;
/** 温度 */
@Excel(name = "温度")
private BigDecimal temperature;
/** 站点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 setHumidity(BigDecimal humidity)
{
this.humidity = humidity;
}
public BigDecimal getHumidity()
{
return humidity;
}
public void setTemperature(BigDecimal temperature)
{
this.temperature = temperature;
}
public BigDecimal getTemperature()
{
return temperature;
}
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("humidity", getHumidity())
.append("temperature", getTemperature())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("siteId", getSiteId())
.append("deviceId", getDeviceId())
.toString();
}
}

View File

@ -6,21 +6,25 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import com.xzzn.common.annotation.Excel; import com.xzzn.common.annotation.Excel;
/** /**
* 站点对象 site * 请填写功能名称对象 ems_mqtt_message
* *
* @author xzzn * @author xzzn
* @date 2025-06-16 * @date 2025-06-27
*/ */
public class EmsSite extends BaseEntity public class EmsMqttMessage extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 自增主键 */ /** 主键 */
private Long id; private Long id;
/** 站点名称 */ /** $column.columnComment */
@Excel(name = "站点名称") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String siteName; private String mqttTopic;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String mqttMessage;
public void setId(Long id) public void setId(Long id)
{ {
@ -32,25 +36,35 @@ public class EmsSite extends BaseEntity
return id; return id;
} }
public void setSiteName(String siteName) public void setMqttTopic(String mqttTopic)
{ {
this.siteName = siteName; this.mqttTopic = mqttTopic;
} }
public String getSiteName() public String getMqttTopic()
{ {
return siteName; return mqttTopic;
}
public void setMqttMessage(String mqttMessage)
{
this.mqttMessage = mqttMessage;
}
public String getMqttMessage()
{
return mqttMessage;
} }
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("siteName", getSiteName()) .append("mqttTopic", getMqttTopic())
.append("remark", getRemark()) .append("mqttMessage", getMqttMessage())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.toString(); .toString();
} }

View File

@ -0,0 +1,449 @@
package com.xzzn.ems.domain;
import java.math.BigDecimal;
import com.xzzn.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xzzn.common.annotation.Excel;
/**
* pcs支路数据对象 ems_pcs_branch_data
*
* @author xzzn
* @date 2025-06-29
*/
public class EmsPcsBranchData extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 放电状态 */
@Excel(name = "放电状态")
private String dischargeStatus;
/** 直流功率 (kW) */
@Excel(name = "直流功率 (kW)")
private BigDecimal dcPower;
/** 直流电压 (V) */
@Excel(name = "直流电压 (V)")
private BigDecimal dcVoltage;
/** 直流电流 (A) */
@Excel(name = "直流电流 (A)")
private BigDecimal dcCurrent;
/** 站点id */
@Excel(name = "站点id")
private String siteId;
/** 设备唯一标识符 */
@Excel(name = "设备唯一标识符")
private String deviceId;
/** 支路id */
@Excel(name = "支路id")
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)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDischargeStatus(String dischargeStatus)
{
this.dischargeStatus = dischargeStatus;
}
public String getDischargeStatus()
{
return dischargeStatus;
}
public void setDcPower(BigDecimal dcPower)
{
this.dcPower = dcPower;
}
public BigDecimal getDcPower()
{
return dcPower;
}
public void setDcVoltage(BigDecimal dcVoltage)
{
this.dcVoltage = dcVoltage;
}
public BigDecimal getDcVoltage()
{
return dcVoltage;
}
public void setDcCurrent(BigDecimal dcCurrent)
{
this.dcCurrent = dcCurrent;
}
public BigDecimal getDcCurrent()
{
return dcCurrent;
}
public void setSiteId(String siteId)
{
this.siteId = siteId;
}
public String getSiteId()
{
return siteId;
}
public void setDeviceId(String deviceId)
{
this.deviceId = deviceId;
}
public String getDeviceId()
{
return deviceId;
}
public void setBranchId(String branchId)
{
this.branchId = branchId;
}
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)
.append("id", getId())
.append("dischargeStatus", getDischargeStatus())
.append("dcPower", getDcPower())
.append("dcVoltage", getDcVoltage())
.append("dcCurrent", getDcCurrent())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("siteId", getSiteId())
.append("deviceId", getDeviceId())
.append("branchId", getBranchId())
.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();
}
}

View File

@ -12,7 +12,7 @@ import com.xzzn.common.annotation.Excel;
* PCS数据对象 ems_pcs_data * PCS数据对象 ems_pcs_data
* *
* @author xzzn * @author xzzn
* @date 2025-06-17 * @date 2025-07-07
*/ */
public class EmsPcsData extends BaseEntity public class EmsPcsData extends BaseEntity
{ {
@ -22,24 +22,24 @@ public class EmsPcsData extends BaseEntity
private Long id; private Long id;
/** 数据更新时间 */ /** 数据更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "数据更新时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "数据更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date dataUpdateTime; private Date dataUpdateTime;
/** 工作状态 */ /** 工作状态0-正常 1-异常 2-停止 */
@Excel(name = "工作状态") @Excel(name = "工作状态0-正常 1-异常 2-停止")
private String workStatus; private String workStatus;
/** 并网状态 */ /** 并网状态0-并网 1-未并网 */
@Excel(name = "并网状态") @Excel(name = "并网状态0-并网 1-未并网")
private String gridStatus; private String gridStatus;
/** 设备状态 */ /** 设备状态0-在线 1-离线 2-维修中 */
@Excel(name = "设备状态") @Excel(name = "设备状态0-在线 1-离线 2-维修中")
private String deviceStatus; private String deviceStatus;
/** 控制模式 */ /** 控制模式0-远程 1-本地 */
@Excel(name = "控制模式") @Excel(name = "控制模式0-远程 1-本地")
private String controlMode; private String controlMode;
/** 总交流有功电率 (kW) */ /** 总交流有功电率 (kW) */
@ -102,12 +102,12 @@ public class EmsPcsData extends BaseEntity
@Excel(name = "交流频率 (Hz)") @Excel(name = "交流频率 (Hz)")
private BigDecimal acFrequency; private BigDecimal acFrequency;
/** 支路状态 */ /** 支路状态0-备用 1-正常 2-切换中 */
@Excel(name = "支路状态") @Excel(name = "支路状态0-备用 1-正常 2-切换中")
private String branchStatus; private String branchStatus;
/** 放电状态 */ /** 放电状态0-充电中 1-待机 */
@Excel(name = "放电状态") @Excel(name = "放电状态0-充电中 1-待机")
private String dischargeStatus; private String dischargeStatus;
/** 直流功率 (kW) */ /** 直流功率 (kW) */
@ -124,11 +124,87 @@ public class EmsPcsData extends BaseEntity
/** 站点id */ /** 站点id */
@Excel(name = "站点id") @Excel(name = "站点id")
private Long siteId; private String siteId;
/** 设备唯一标识符 */ /** 设备唯一标识符 */
@Excel(name = "设备唯一标识符") @Excel(name = "设备唯一标识符")
private Long deviceId; private String deviceId;
/** 月 */
@Excel(name = "")
private Long dateMonth;
/** 日 */
@Excel(name = "")
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;
/** 系统输出U相电流 */
@Excel(name = "系统输出U相电流")
private BigDecimal sysUCurrent;
/** 系统输出V相电流 */
@Excel(name = "系统输出V相电流")
private BigDecimal sysVCurrent;
/** 系统输出W相电流 */
@Excel(name = "系统输出W相电流")
private BigDecimal sysWCurrent;
/** 电网频率 */
@Excel(name = "电网频率")
private BigDecimal dwFrequency;
public void setId(Long id) public void setId(Long id)
{ {
@ -390,26 +466,216 @@ public class EmsPcsData extends BaseEntity
return dcCurrent; return dcCurrent;
} }
public void setSiteId(Long siteId) public void setSiteId(String siteId)
{ {
this.siteId = siteId; this.siteId = siteId;
} }
public Long getSiteId() public String getSiteId()
{ {
return siteId; return siteId;
} }
public void setDeviceId(Long deviceId) public void setDeviceId(String deviceId)
{ {
this.deviceId = deviceId; this.deviceId = deviceId;
} }
public Long getDeviceId() public String getDeviceId()
{ {
return deviceId; return deviceId;
} }
public void setDateMonth(Long dateMonth)
{
this.dateMonth = dateMonth;
}
public Long getDateMonth()
{
return dateMonth;
}
public void setDateDay(Long dateDay)
{
this.dateDay = dateDay;
}
public Long getDateDay()
{
return 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;
}
public void setSysUCurrent(BigDecimal sysUCurrent)
{
this.sysUCurrent = sysUCurrent;
}
public BigDecimal getSysUCurrent()
{
return sysUCurrent;
}
public void setSysVCurrent(BigDecimal sysVCurrent)
{
this.sysVCurrent = sysVCurrent;
}
public BigDecimal getSysVCurrent()
{
return sysVCurrent;
}
public void setSysWCurrent(BigDecimal sysWCurrent)
{
this.sysWCurrent = sysWCurrent;
}
public BigDecimal getSysWCurrent()
{
return sysWCurrent;
}
public void setDwFrequency(BigDecimal dwFrequency)
{
this.dwFrequency = dwFrequency;
}
public BigDecimal getDwFrequency()
{
return dwFrequency;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -446,6 +712,25 @@ public class EmsPcsData extends BaseEntity
.append("remark", getRemark()) .append("remark", getRemark())
.append("siteId", getSiteId()) .append("siteId", getSiteId())
.append("deviceId", getDeviceId()) .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())
.append("sysUCurrent", getSysUCurrent())
.append("sysVCurrent", getSysVCurrent())
.append("sysWCurrent", getSysWCurrent())
.append("dwFrequency", getDwFrequency())
.toString(); .toString();
} }
} }

View File

@ -0,0 +1,166 @@
package com.xzzn.ems.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xzzn.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xzzn.common.annotation.Excel;
/**
* 站点对象 ems_site_setting
*
* @author xzzn
* @date 2025-06-29
*/
public class EmsSiteSetting extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 自增主键 */
private Long id;
/** 站点名称 */
@Excel(name = "站点名称")
private String siteName;
/** 站点地址 */
@Excel(name = "站点地址")
private String siteAddress;
/** 运营时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "运营时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date runningTime;
/** 纬度 */
@Excel(name = "纬度")
private BigDecimal latitude;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
/** 装机容量 */
@Excel(name = "装机容量")
private BigDecimal installCapacity;
/** 装机功率 */
@Excel(name = "装机功率")
private BigDecimal installPower;
/** 站点id */
@Excel(name = "站点id")
private String siteId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setSiteName(String siteName)
{
this.siteName = siteName;
}
public String getSiteName()
{
return siteName;
}
public void setSiteAddress(String siteAddress)
{
this.siteAddress = siteAddress;
}
public String getSiteAddress()
{
return siteAddress;
}
public void setRunningTime(Date runningTime)
{
this.runningTime = runningTime;
}
public Date getRunningTime()
{
return runningTime;
}
public void setLatitude(BigDecimal latitude)
{
this.latitude = latitude;
}
public BigDecimal getLatitude()
{
return latitude;
}
public void setLongitude(BigDecimal longitude)
{
this.longitude = longitude;
}
public BigDecimal getLongitude()
{
return longitude;
}
public void setInstallCapacity(BigDecimal installCapacity)
{
this.installCapacity = installCapacity;
}
public BigDecimal getInstallCapacity()
{
return installCapacity;
}
public void setInstallPower(BigDecimal installPower)
{
this.installPower = installPower;
}
public BigDecimal getInstallPower()
{
return installPower;
}
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)
.append("id", getId())
.append("siteName", getSiteName())
.append("siteAddress", getSiteAddress())
.append("runningTime", getRunningTime())
.append("latitude", getLatitude())
.append("longitude", getLongitude())
.append("installCapacity", getInstallCapacity())
.append("installPower", getInstallPower())
.append("remark", getRemark())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("siteId", getSiteId())
.toString();
}
}

View File

@ -0,0 +1,114 @@
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_strategy
*
* @author xzzn
* @date 2025-07-10
*/
public class EmsStrategy extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 策略名称,如“削峰填谷” */
@Excel(name = "策略名称,如“削峰填谷”")
private String strategyName;
/** 策略类型1 - 主策略2 - 辅助策略 */
@Excel(name = "策略类型1 - 主策略2 - 辅助策略")
private Long strategyType;
/** 策略状态0-未启用 1-已运行 2-已暂停 3-禁用 4-删除 */
@Excel(name = "策略状态0-未启用 1-已运行 2-已暂停 3-禁用 4-删除")
private String status;
/** 描述 */
@Excel(name = "描述")
private String description;
/** 主策略id */
@Excel(name = "主策略id")
private Long mainStrategy;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setStrategyName(String strategyName)
{
this.strategyName = strategyName;
}
public String getStrategyName()
{
return strategyName;
}
public void setStrategyType(Long strategyType)
{
this.strategyType = strategyType;
}
public Long getStrategyType()
{
return strategyType;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setDescription(String description)
{
this.description = description;
}
public String getDescription()
{
return description;
}
public void setMainStrategy(Long mainStrategy)
{
this.mainStrategy = mainStrategy;
}
public Long getMainStrategy()
{
return mainStrategy;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("strategyName", getStrategyName())
.append("strategyType", getStrategyType())
.append("status", getStatus())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("description", getDescription())
.append("mainStrategy", getMainStrategy())
.toString();
}
}

View File

@ -0,0 +1,175 @@
package com.xzzn.ems.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xzzn.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xzzn.common.annotation.Excel;
/**
* 策曲线对象 ems_strategy_curve
*
* @author xzzn
* @date 2025-07-11
*/
public class EmsStrategyCurve extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 关联的策略ID */
@Excel(name = "关联的策略ID")
private Long strategyId;
/** 任务编号 */
@Excel(name = "任务编号")
private Long taskNumber;
/** 开始日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "开始日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date startDate;
/** 结束日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "结束日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date endDate;
/** 功率数据可以是JSON格式存储曲线数据 */
@Excel(name = "功率数据可以是JSON格式存储曲线数据")
private String powerData;
/** 站点id */
@Excel(name = "站点id")
private String siteId;
/** 模板id */
@Excel(name = "模板id")
private String templateId;
/** 月份1-12 */
@Excel(name = "月份1-12")
private Long month;
/** 是否删除 0-已删除 1-未删除 */
@Excel(name = "是否删除 0-已删除 1-未删除")
private Long isDelete;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setStrategyId(Long strategyId)
{
this.strategyId = strategyId;
}
public Long getStrategyId()
{
return strategyId;
}
public void setTaskNumber(Long taskNumber)
{
this.taskNumber = taskNumber;
}
public Long getTaskNumber()
{
return taskNumber;
}
public void setStartDate(Date startDate)
{
this.startDate = startDate;
}
public Date getStartDate()
{
return startDate;
}
public void setEndDate(Date endDate)
{
this.endDate = endDate;
}
public Date getEndDate()
{
return endDate;
}
public void setPowerData(String powerData)
{
this.powerData = powerData;
}
public String getPowerData()
{
return powerData;
}
public void setSiteId(String siteId)
{
this.siteId = siteId;
}
public String getSiteId()
{
return siteId;
}
public String getTemplateId() {
return templateId;
}
public void setTemplateId(String templateId) {
this.templateId = templateId;
}
public Long getMonth() {
return month;
}
public void setMonth(Long month) {
this.month = month;
}
public Long getIsDelete() {
return isDelete;
}
public void setIsDelete(Long isDelete) {
this.isDelete = isDelete;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("strategyId", getStrategyId())
.append("taskNumber", getTaskNumber())
.append("startDate", getStartDate())
.append("endDate", getEndDate())
.append("powerData", getPowerData())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("siteId", getSiteId())
.append("templateId", getTemplateId())
.append("month", getMonth())
.append("isDelete", getIsDelete())
.toString();
}
}

View File

@ -0,0 +1,115 @@
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_strategy_running
*
* @author xzzn
* @date 2025-07-10
*/
public class EmsStrategyRunning extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 主要策略 */
@Excel(name = "主要策略")
private Long mainStrategyId;
/** 辅助策略 */
@Excel(name = "辅助策略")
private Long auxiliaryStrategyId;
/** 策略状态0-未启用 1-已运行 2-已暂停 3-禁用 4-删除 */
@Excel(name = "策略状态0-未启用 1-已运行 2-已暂停 3-禁用 4-删除")
private String status;
/** 站点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 setMainStrategyId(Long mainStrategyId)
{
this.mainStrategyId = mainStrategyId;
}
public Long getMainStrategyId()
{
return mainStrategyId;
}
public void setAuxiliaryStrategyId(Long auxiliaryStrategyId)
{
this.auxiliaryStrategyId = auxiliaryStrategyId;
}
public Long getAuxiliaryStrategyId()
{
return auxiliaryStrategyId;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
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("mainStrategyId", getMainStrategyId())
.append("auxiliaryStrategyId", getAuxiliaryStrategyId())
.append("status", getStatus())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("siteId", getSiteId())
.append("deviceId", getDeviceId())
.append("remark", getRemark())
.toString();
}
}

View File

@ -0,0 +1,212 @@
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_strategy_temp
*
* @author xzzn
* @date 2025-07-13
*/
public class EmsStrategyTemp extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 关联的策略ID */
@Excel(name = "关联的策略ID")
private Long strategyId;
/** 模板名称,如“模板一” */
@Excel(name = "模板名称,如“模板一”")
private String templateName;
/** SDC限制 (%) 1 = 开0 = 关 */
@Excel(name = "SDC限制 (%) 1 = 开0 = 关")
private Integer sdcLimit;
/** SDC下限 (%) */
@Excel(name = "SDC下限 (%)")
private BigDecimal sdcDown;
/** SDC上限 (%) */
@Excel(name = "SDC上限 (%)")
private BigDecimal sdcUp;
/** 开始时间 */
@JsonFormat(pattern = "HH:mm")
@Excel(name = "开始时间", width = 30, dateFormat = "HH:mm")
private Date startTime;
/** 结束时间 */
@JsonFormat(pattern = "HH:mm")
@Excel(name = "结束时间", width = 30, dateFormat = "HH:mm")
private Date endTime;
/** 充放功率 (kW) */
@Excel(name = "充放功率 (kW)")
private BigDecimal chargeDischargePower;
/** 充电状态如“1-充电”、“2-待机” */
@Excel(name = "充电状态如“1-充电”、“2-待机”")
private String chargeStatus;
/** 站点id */
@Excel(name = "站点id")
private String siteId;
/** 模板id */
@Excel(name = "模板id")
private String templateId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setStrategyId(Long strategyId)
{
this.strategyId = strategyId;
}
public Long getStrategyId()
{
return strategyId;
}
public void setTemplateName(String templateName)
{
this.templateName = templateName;
}
public String getTemplateName()
{
return templateName;
}
public void setSdcLimit(Integer sdcLimit)
{
this.sdcLimit = sdcLimit;
}
public Integer getSdcLimit()
{
return sdcLimit;
}
public void setSdcDown(BigDecimal sdcDown)
{
this.sdcDown = sdcDown;
}
public BigDecimal getSdcDown()
{
return sdcDown;
}
public void setSdcUp(BigDecimal sdcUp)
{
this.sdcUp = sdcUp;
}
public BigDecimal getSdcUp()
{
return sdcUp;
}
public void setStartTime(Date startTime)
{
this.startTime = startTime;
}
public Date getStartTime()
{
return startTime;
}
public void setEndTime(Date endTime)
{
this.endTime = endTime;
}
public Date getEndTime()
{
return endTime;
}
public void setChargeDischargePower(BigDecimal chargeDischargePower)
{
this.chargeDischargePower = chargeDischargePower;
}
public BigDecimal getChargeDischargePower()
{
return chargeDischargePower;
}
public void setChargeStatus(String chargeStatus)
{
this.chargeStatus = chargeStatus;
}
public String getChargeStatus()
{
return chargeStatus;
}
public void setSiteId(String siteId)
{
this.siteId = siteId;
}
public String getSiteId()
{
return siteId;
}
public void setTemplateId(String templateId)
{
this.templateId = templateId;
}
public String getTemplateId()
{
return templateId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("strategyId", getStrategyId())
.append("templateName", getTemplateName())
.append("sdcLimit", getSdcLimit())
.append("sdcDown", getSdcDown())
.append("sdcUp", getSdcUp())
.append("startTime", getStartTime())
.append("endTime", getEndTime())
.append("chargeDischargePower", getChargeDischargePower())
.append("chargeStatus", getChargeStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("siteId", getSiteId())
.append("templateId", getTemplateId())
.toString();
}
}

View File

@ -0,0 +1,122 @@
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_strategy_temp_time_config
*
* @author xzzn
* @date 2025-07-12
*/
public class EmsStrategyTempTimeConfig extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 开始时间 */
@JsonFormat(pattern = "HH:mm")
@Excel(name = "开始时间", width = 30, dateFormat = "HH:mm")
private Date startTime;
/** 结束时间 */
@JsonFormat(pattern = "HH:mm")
@Excel(name = "结束时间", width = 30, dateFormat = "HH:mm")
private Date endTime;
/** 充放功率 (kW) */
@Excel(name = "充放功率 (kW)")
private BigDecimal chargeDischargePower;
/** 充电状态如“1-充电”、“2-待机” */
@Excel(name = "充电状态如“1-充电”、“2-待机”")
private String chargeStatus;
/** 模板id */
@Excel(name = "模板id")
private String templateId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setStartTime(Date startTime)
{
this.startTime = startTime;
}
public Date getStartTime()
{
return startTime;
}
public void setEndTime(Date endTime)
{
this.endTime = endTime;
}
public Date getEndTime()
{
return endTime;
}
public void setChargeDischargePower(BigDecimal chargeDischargePower)
{
this.chargeDischargePower = chargeDischargePower;
}
public BigDecimal getChargeDischargePower()
{
return chargeDischargePower;
}
public void setChargeStatus(String chargeStatus)
{
this.chargeStatus = chargeStatus;
}
public String getChargeStatus()
{
return chargeStatus;
}
public void setTemplateId(String templateId)
{
this.templateId = templateId;
}
public String getTemplateId()
{
return templateId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("startTime", getStartTime())
.append("endTime", getEndTime())
.append("chargeDischargePower", getChargeDischargePower())
.append("chargeStatus", getChargeStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("templateId", getTemplateId())
.toString();
}
}

View File

@ -0,0 +1,130 @@
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_strategy_time_config
*
* @author xzzn
* @date 2025-07-12
*/
public class EmsStrategyTimeConfig extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 关联的策略ID */
@Excel(name = "关联的策略ID")
private Long strategyId;
/** 月份1-12 */
@Excel(name = "月份1-12")
private Long month;
/** 充放电模式,如“两充两放” */
@Excel(name = "充放电模式,如“两充两放”")
private String chargeDischargeMode;
/** 站点id */
@Excel(name = "站点id")
private String siteId;
/** 模版id */
@Excel(name = "模版id")
private String templateId;
/** 是否下发 0-已下发 1-未下发 */
@Excel(name = "是否下发 0-已下发 1-未下发")
private int isPost;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setStrategyId(Long strategyId)
{
this.strategyId = strategyId;
}
public Long getStrategyId()
{
return strategyId;
}
public void setMonth(Long month)
{
this.month = month;
}
public Long getMonth()
{
return month;
}
public void setChargeDischargeMode(String chargeDischargeMode)
{
this.chargeDischargeMode = chargeDischargeMode;
}
public String getChargeDischargeMode()
{
return chargeDischargeMode;
}
public void setSiteId(String siteId)
{
this.siteId = siteId;
}
public String getSiteId()
{
return siteId;
}
public void setTemplateId(String templateId)
{
this.templateId = templateId;
}
public String getTemplateId()
{
return templateId;
}
public int getIsPost() {
return isPost;
}
public void setIsPost(int isPost) {
this.isPost = isPost;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("strategyId", getStrategyId())
.append("month", getMonth())
.append("chargeDischargeMode", getChargeDischargeMode())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("siteId", getSiteId())
.append("templateId", getTemplateId())
.append("isPost", getIsPost())
.toString();
}
}

View File

@ -0,0 +1,195 @@
package com.xzzn.ems.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xzzn.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xzzn.common.annotation.Excel;
/**
* 工单主对象 ems_ticket
*
* @author xzzn
* @date 2025-07-15
*/
public class EmsTicket extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private String id;
/** 工单号规则T+日期+6位随机 */
@Excel(name = "工单号", readConverterExp = "规=则T+日期+6位随机")
private String ticketNo;
/** 提交用户ID */
@Excel(name = "提交用户ID")
private Long userId;
/** 工单标题 */
@Excel(name = "工单标题")
private String title;
/** 问题描述 */
@Excel(name = "问题描述")
private String content;
/** 图片URL数组 */
@Excel(name = "图片URL数组")
private String images;
/** 1待处理 2处理中 3已完成 */
@Excel(name = "1待处理 2处理中 3已完成")
private Long status;
/** 期望完成时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "期望完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date expectedCompleteTime;
/** 完成时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date completeTime;
/** 处理人ID */
@Excel(name = "处理人ID")
private Long workUserId;
/** 0-已废弃 1-有效 */
@Excel(name = "0-已废弃 1-有效")
private Long isDelete;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setTicketNo(String ticketNo)
{
this.ticketNo = ticketNo;
}
public String getTicketNo()
{
return ticketNo;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setContent(String content)
{
this.content = content;
}
public String getContent()
{
return content;
}
public void setImages(String images)
{
this.images = images;
}
public String getImages()
{
return images;
}
public void setStatus(Long status)
{
this.status = status;
}
public Long getStatus()
{
return status;
}
public void setExpectedCompleteTime(Date expectedCompleteTime)
{
this.expectedCompleteTime = expectedCompleteTime;
}
public Date getExpectedCompleteTime()
{
return expectedCompleteTime;
}
public void setCompleteTime(Date completeTime)
{
this.completeTime = completeTime;
}
public Date getCompleteTime()
{
return completeTime;
}
public void setWorkUserId(Long workUserId)
{
this.workUserId = workUserId;
}
public Long getWorkUserId()
{
return workUserId;
}
public void setIsDelete(Long isDelete)
{
this.isDelete = isDelete;
}
public Long getIsDelete()
{
return isDelete;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("ticketNo", getTicketNo())
.append("userId", getUserId())
.append("title", getTitle())
.append("content", getContent())
.append("images", getImages())
.append("status", getStatus())
.append("expectedCompleteTime", getExpectedCompleteTime())
.append("completeTime", getCompleteTime())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("workUserId", getWorkUserId())
.append("isDelete", getIsDelete())
.toString();
}
}

View File

@ -0,0 +1,47 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
/**
* 首页看板数据概览-告警等级分布
*/
public class AlarmGradeList {
/**
* 告警等级
*/
private String level;
/**
* 数据一
*/
private int dataNum;
/**
* 数据占比
*/
private BigDecimal percent;
public String getLevel() {
return level;
}
public void setLevel(String level) {
this.level = level;
}
public int getDataNum() {
return dataNum;
}
public void setDataNum(int dataNum) {
this.dataNum = dataNum;
}
public BigDecimal getPercent() {
return percent;
}
public void setPercent(BigDecimal percent) {
this.percent = percent;
}
}

View File

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

View File

@ -0,0 +1,100 @@
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;
/** 工单号 */
private String ticketNo;
/** 告警唯一标识 */
private String id;
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;
}
public String getTicketNo() {
return ticketNo;
}
public void setTicketNo(String ticketNo) {
this.ticketNo = ticketNo;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}

View File

@ -0,0 +1,32 @@
package com.xzzn.ems.domain.vo;
/**
* 首页看板数据概览-告警趋势
*/
public class AlarmTrendList {
/**
* 月份
*/
private int dateMonth;
/**
* 报警数
*/
private int alarmNum;
public int getDateMonth() {
return dateMonth;
}
public void setDateMonth(int dateMonth) {
this.dateMonth = dateMonth;
}
public int getAlarmNum() {
return alarmNum;
}
public void setAlarmNum(int alarmNum) {
this.alarmNum = alarmNum;
}
}

View File

@ -0,0 +1,31 @@
package com.xzzn.ems.domain.vo;
import java.util.List;
/**
* 电表数据
*/
public class AmmeterDataResponse {
/** 总表信息 */
private AmmeterLoadDataVo ammeterLoadData;
/** 储能表信息 */
private AmmeterMeteDataVo ammeterMeteData;
public AmmeterLoadDataVo getAmmeterLoadData() {
return ammeterLoadData;
}
public void setAmmeterLoadDataVoList(AmmeterLoadDataVo ammeterLoadData) {
this.ammeterLoadData = ammeterLoadData;
}
public AmmeterMeteDataVo getAmmeterMeteData() {
return ammeterMeteData;
}
public void setAmmeterMeteDataVoList(AmmeterMeteDataVo ammeterMeteData) {
this.ammeterMeteData = ammeterMeteData;
}
}

View File

@ -0,0 +1,57 @@
package com.xzzn.ems.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import java.util.List;
/**
* 电表-总表数据
*/
public class AmmeterLoadDataVo {
/** 电表名称 */
private String deviceName;
/** 通信状态 */
private String emsCommunicationStatus;
/** 数据更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date dataUpdateTime;
/** 总表数据信息 */
private List<LoadDataDetailInfo> loadDataDetailInfo;
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<LoadDataDetailInfo> getLoadDataDetailInfo() {
return loadDataDetailInfo;
}
public void setLoadDataDetailInfo(List<LoadDataDetailInfo> loadDataDetailInfo) {
this.loadDataDetailInfo = loadDataDetailInfo;
}
}

View File

@ -0,0 +1,57 @@
package com.xzzn.ems.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import java.util.List;
/**
* 电表-总表数据
*/
public class AmmeterMeteDataVo {
/** 电表名称 */
private String deviceName;
/** 通信状态 */
private String emsCommunicationStatus;
/** 数据更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date dataUpdateTime;
/** 储能表数据信息 */
private List<MeteDataDetailInfo> meteDataDetailInfo;
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<MeteDataDetailInfo> getMeteDataDetailInfo() {
return meteDataDetailInfo;
}
public void setMeteDataDetailInfo(List<MeteDataDetailInfo> meteDataDetailInfo) {
this.meteDataDetailInfo = meteDataDetailInfo;
}
}

View File

@ -0,0 +1,142 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
/**
* 电表数据
*/
public class AmmeterStatisListVo {
/** 类别 */
private String dataTime;
/** 组合有功-总 (kWh) */
private BigDecimal activeTotalKwh = BigDecimal.ZERO;
/** 组合有功-尖 (kWh) */
private BigDecimal activePeakKwh = BigDecimal.ZERO;
/** 组合有功-峰 (kWh) */
private BigDecimal activeHighKwh = BigDecimal.ZERO;
/** 组合有功-平 (kWh) */
private BigDecimal activeFlatKwh = BigDecimal.ZERO;
/** 组合有功-谷 (kWh) */
private BigDecimal activeValleyKwh = BigDecimal.ZERO;
/** 组合无功-总 (kWh) */
private BigDecimal reActiveTotalKwh = BigDecimal.ZERO;
/** 组合无功-尖 (kWh) */
private BigDecimal reActivePeakKwh = BigDecimal.ZERO;
/** 组合无功-峰 (kWh) */
private BigDecimal reActiveHighKwh = BigDecimal.ZERO;
/** 组合无功-平 (kWh) */
private BigDecimal reActiveFlatKwh = BigDecimal.ZERO;
/** 组合无功-谷 (kWh) */
private BigDecimal reActiveValleyKwh = BigDecimal.ZERO;
/** 效率-有功总/无功总 */
private BigDecimal effect = BigDecimal.ZERO;
public String getDataTime() {
return dataTime;
}
public void setDataTime(String dataTime) {
this.dataTime = dataTime;
}
public BigDecimal getActiveTotalKwh() {
return activeTotalKwh;
}
public void setActiveTotalKwh(BigDecimal activeTotalKwh) {
this.activeTotalKwh = activeTotalKwh;
}
public BigDecimal getActivePeakKwh() {
return activePeakKwh;
}
public void setActivePeakKwh(BigDecimal activePeakKwh) {
this.activePeakKwh = activePeakKwh;
}
public BigDecimal getActiveHighKwh() {
return activeHighKwh;
}
public void setActiveHighKwh(BigDecimal activeHighKwh) {
this.activeHighKwh = activeHighKwh;
}
public BigDecimal getActiveFlatKwh() {
return activeFlatKwh;
}
public void setActiveFlatKwh(BigDecimal activeFlatKwh) {
this.activeFlatKwh = activeFlatKwh;
}
public BigDecimal getActiveValleyKwh() {
return activeValleyKwh;
}
public void setActiveValleyKwh(BigDecimal activeValleyKwh) {
this.activeValleyKwh = activeValleyKwh;
}
public BigDecimal getReActiveTotalKwh() {
return reActiveTotalKwh;
}
public void setReActiveTotalKwh(BigDecimal reActiveTotalKwh) {
this.reActiveTotalKwh = reActiveTotalKwh;
}
public BigDecimal getReActivePeakKwh() {
return reActivePeakKwh;
}
public void setReActivePeakKwh(BigDecimal reActivePeakKwh) {
this.reActivePeakKwh = reActivePeakKwh;
}
public BigDecimal getReActiveHighKwh() {
return reActiveHighKwh;
}
public void setReActiveHighKwh(BigDecimal reActiveHighKwh) {
this.reActiveHighKwh = reActiveHighKwh;
}
public BigDecimal getReActiveFlatKwh() {
return reActiveFlatKwh;
}
public void setReActiveFlatKwh(BigDecimal reActiveFlatKwh) {
this.reActiveFlatKwh = reActiveFlatKwh;
}
public BigDecimal getReActiveValleyKwh() {
return reActiveValleyKwh;
}
public void setReActiveValleyKwh(BigDecimal reActiveValleyKwh) {
this.reActiveValleyKwh = reActiveValleyKwh;
}
public BigDecimal getEffect() {
return effect;
}
public void setEffect(BigDecimal effect) {
this.effect = effect;
}
}

View File

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

View File

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

View File

@ -0,0 +1,120 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
/**
* BMS总览-电池堆电池簇单体数据
*/
public class BMSBatteryDataList {
/**
* 簇号
*/
private String clusterId;
/** 簇电压 (V) */
private BigDecimal clusterVoltage;
/** 簇电流 (A) */
private BigDecimal clusterCurrent;
/** 簇SOC (%) */
private BigDecimal currentSoc;
/** 单体最高电压 (V) */
private BigDecimal maxCellVoltage;
/** 单体最低电压 (V) */
private BigDecimal minCellVoltage;
/** 单体最高温度 (℃) */
private BigDecimal maxCellTemp;
/** 单体最低温度 (℃) */
private BigDecimal minCellTemp;
/** 换电站id */
private String siteId;
/** 堆id */
private String stackDeviceId;
public String getClusterId() {
return clusterId;
}
public void setClusterId(String clusterId) {
this.clusterId = clusterId;
}
public String getStackDeviceId() {
return stackDeviceId;
}
public void setStackDeviceId(String stackDeviceId) {
this.stackDeviceId = stackDeviceId;
}
public String getSiteId() {
return siteId;
}
public void setSiteId(String siteId) {
this.siteId = siteId;
}
public BigDecimal getMinCellTemp() {
return minCellTemp;
}
public void setMinCellTemp(BigDecimal minCellTemp) {
this.minCellTemp = minCellTemp;
}
public BigDecimal getMaxCellTemp() {
return maxCellTemp;
}
public void setMaxCellTemp(BigDecimal maxCellTemp) {
this.maxCellTemp = maxCellTemp;
}
public BigDecimal getMinCellVoltage() {
return minCellVoltage;
}
public void setMinCellVoltage(BigDecimal minCellVoltage) {
this.minCellVoltage = minCellVoltage;
}
public BigDecimal getMaxCellVoltage() {
return maxCellVoltage;
}
public void setMaxCellVoltage(BigDecimal maxCellVoltage) {
this.maxCellVoltage = maxCellVoltage;
}
public BigDecimal getCurrentSoc() {
return currentSoc;
}
public void setCurrentSoc(BigDecimal currentSoc) {
this.currentSoc = currentSoc;
}
public BigDecimal getClusterCurrent() {
return clusterCurrent;
}
public void setClusterCurrent(BigDecimal clusterCurrent) {
this.clusterCurrent = clusterCurrent;
}
public BigDecimal getClusterVoltage() {
return clusterVoltage;
}
public void setClusterVoltage(BigDecimal clusterVoltage) {
this.clusterVoltage = clusterVoltage;
}
}

View File

@ -0,0 +1,197 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
import java.util.List;
/**
* BMS总览数据
*
*/
public class BMSOverViewVo {
/** 设备名称 */
private String deviceName;
/** 工作状态 */
private String workStatus;
/** 与PCS通信状态 */
private String pcsCommunicationStatus;
/** 与EMS通信状态 */
private String emsCommunicationStatus;
/** 电池堆总电压 (V) */
private BigDecimal stackVoltage;
/** 可充电量 (kWh) */
private BigDecimal availableChargeCapacity;
/** 累计充电量 (kWh) */
private BigDecimal totalChargeCapacity;
/** 电池堆总电流 (A) */
private BigDecimal stackCurrent;
/** 可放电量 (kWh) */
private BigDecimal availableDischargeCapacity;
/** 累计放电量 (kWh) */
private BigDecimal totalDischargeCapacity;
/** SOH (%) */
private BigDecimal stackSoh;
/** 平均温度 (℃) */
private BigDecimal operatingTemp;
/** 绝缘电阻 (Ω) */
private BigDecimal stackInsulationResistance;
/** 当前SOC (%) */
private BigDecimal stackSoc;
/** 站点id */
private String siteId;
/** 设备唯一标识符 */
private String deviceId;
private List<BMSBatteryDataList> batteryDataList;
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public String getWorkStatus() {
return workStatus;
}
public void setWorkStatus(String workStatus) {
this.workStatus = workStatus;
}
public String getPcsCommunicationStatus() {
return pcsCommunicationStatus;
}
public void setPcsCommunicationStatus(String pcsCommunicationStatus) {
this.pcsCommunicationStatus = pcsCommunicationStatus;
}
public String getEmsCommunicationStatus() {
return emsCommunicationStatus;
}
public void setEmsCommunicationStatus(String emsCommunicationStatus) {
this.emsCommunicationStatus = emsCommunicationStatus;
}
public BigDecimal getStackVoltage() {
return stackVoltage;
}
public void setStackVoltage(BigDecimal stackVoltage) {
this.stackVoltage = stackVoltage;
}
public BigDecimal getAvailableChargeCapacity() {
return availableChargeCapacity;
}
public void setAvailableChargeCapacity(BigDecimal availableChargeCapacity) {
this.availableChargeCapacity = availableChargeCapacity;
}
public BigDecimal getTotalChargeCapacity() {
return totalChargeCapacity;
}
public void setTotalChargeCapacity(BigDecimal totalChargeCapacity) {
this.totalChargeCapacity = totalChargeCapacity;
}
public BigDecimal getStackCurrent() {
return stackCurrent;
}
public void setStackCurrent(BigDecimal stackCurrent) {
this.stackCurrent = stackCurrent;
}
public BigDecimal getAvailableDischargeCapacity() {
return availableDischargeCapacity;
}
public void setAvailableDischargeCapacity(BigDecimal availableDischargeCapacity) {
this.availableDischargeCapacity = availableDischargeCapacity;
}
public BigDecimal getTotalDischargeCapacity() {
return totalDischargeCapacity;
}
public void setTotalDischargeCapacity(BigDecimal totalDischargeCapacity) {
this.totalDischargeCapacity = totalDischargeCapacity;
}
public BigDecimal getStackSoh() {
return stackSoh;
}
public void setStackSoh(BigDecimal stackSoh) {
this.stackSoh = stackSoh;
}
public BigDecimal getOperatingTemp() {
return operatingTemp;
}
public void setOperatingTemp(BigDecimal operatingTemp) {
this.operatingTemp = operatingTemp;
}
public BigDecimal getStackInsulationResistance() {
return stackInsulationResistance;
}
public void setStackInsulationResistance(BigDecimal stackInsulationResistance) {
this.stackInsulationResistance = stackInsulationResistance;
}
public BigDecimal getStackSoc() {
return stackSoc;
}
public void setStackSoc(BigDecimal stackSoc) {
this.stackSoc = stackSoc;
}
public String getSiteId() {
return 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;
}
public void setBatteryDataList(List<BMSBatteryDataList> batteryDataList) {
this.batteryDataList = batteryDataList;
}
}

View File

@ -0,0 +1,36 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
import java.util.Date;
/**
* 实时运行-电池平均SOC数据
*
*/
public class BatteryAveSOCVo {
/**
* 数据时间
*/
private Date createDate;
/**
* 实时SOC
*/
private BigDecimal batterySOC;
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public BigDecimal getBatterySOC() {
return batterySOC;
}
public void setBatterySOC(BigDecimal batterySOC) {
this.batterySOC = batterySOC;
}
}

View File

@ -0,0 +1,36 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
import java.util.Date;
/**
* 实时运行-电池平均温度数据
*
*/
public class BatteryAveTempVo {
/**
* 数据时间
*/
private Date createDate;
/**
* 实时温度
*/
private BigDecimal batteryTemp;
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public BigDecimal getBatteryTemp() {
return batteryTemp;
}
public void setBatteryTemp(BigDecimal batteryTemp) {
this.batteryTemp = batteryTemp;
}
}

View File

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

View File

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

View File

@ -0,0 +1,109 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
/**
* 电池簇-电池温度等数据入参
*
*/
public class ClusterStatisListVo {
/** 统计时间 */
private String statisDate;
/** 最高温度 */
private BigDecimal maxTemp;
/** 最高温度单体ID */
private String maxTempId;
/** 最低温度 */
private BigDecimal minTemp;
/** 最低温度单体ID */
private String minTempId;
/** 最高电压 */
private BigDecimal maxVoltage;
/** 最高电压单体ID */
private String maxVoltageId;
/** 最低电压 */
private BigDecimal minVoltage;
/** 最低电压单体ID */
private String minVoltageId;
public String getStatisDate() {
return statisDate;
}
public void setStatisDate(String statisDate) {
this.statisDate = statisDate;
}
public BigDecimal getMaxTemp() {
return maxTemp;
}
public void setMaxTemp(BigDecimal maxTemp) {
this.maxTemp = maxTemp;
}
public String getMaxTempId() {
return maxTempId;
}
public void setMaxTempId(String maxTempId) {
this.maxTempId = maxTempId;
}
public BigDecimal getMinTemp() {
return minTemp;
}
public void setMinTemp(BigDecimal minTemp) {
this.minTemp = minTemp;
}
public String getMinTempId() {
return minTempId;
}
public void setMinTempId(String minTempId) {
this.minTempId = minTempId;
}
public BigDecimal getMaxVoltage() {
return maxVoltage;
}
public void setMaxVoltage(BigDecimal maxVoltage) {
this.maxVoltage = maxVoltage;
}
public String getMaxVoltageId() {
return maxVoltageId;
}
public void setMaxVoltageId(String maxVoltageId) {
this.maxVoltageId = maxVoltageId;
}
public BigDecimal getMinVoltage() {
return minVoltage;
}
public void setMinVoltage(BigDecimal minVoltage) {
this.minVoltage = minVoltage;
}
public String getMinVoltageId() {
return minVoltageId;
}
public void setMinVoltageId(String minVoltageId) {
this.minVoltageId = minVoltageId;
}
}

View File

@ -0,0 +1,77 @@
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;
private String deviceId;
private String dataType;
private String clusterDeviceId;
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;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public String getClusterDeviceId() {
return clusterDeviceId;
}
public void setClusterDeviceId(String clusterDeviceId) {
this.clusterDeviceId = clusterDeviceId;
}
}

View File

@ -0,0 +1,32 @@
package com.xzzn.ems.domain.vo;
/**
* 首页看板数据概览-设备告警占比
*/
public class DeviceAlarmProportionList {
/**
* 类型
*/
private String type;
/**
* 数量
*/
private int alarmNum;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public int getAlarmNum() {
return alarmNum;
}
public void setAlarmNum(int alarmNum) {
this.alarmNum = alarmNum;
}
}

View File

@ -0,0 +1,76 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
import java.util.List;
/**
* 概率统计-电量指标返回
*
*/
public class ElectricDataInfoVo {
/**
* 显示时间单位
*/
private String unit;
/**
* 总充电量
*/
private BigDecimal totalChargedCap;
/**
* 总放电量
*/
private BigDecimal totalDisChargedCap;
/**
* 综合效率 = 放电量/充电量
*/
private BigDecimal efficiency;
/**
* 按天放电统计
*/
private List<SiteMonitorDataVo> sevenDayDisChargeStats;
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
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;
}
}

View File

@ -0,0 +1,47 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
/**
* 数据统计-电量指标
*/
public class ElectricIndexList {
/**
* 月份
*/
private String dateMonth;
/**
* 充电量
*/
private BigDecimal chargeEnergy;
/**
* 放电量
*/
private BigDecimal disChargeEnergy;
public String getDateMonth() {
return dateMonth;
}
public void setDateMonth(String dateMonth) {
this.dateMonth = dateMonth;
}
public BigDecimal getChargeEnergy() {
return chargeEnergy;
}
public void setChargeEnergy(BigDecimal chargeEnergy) {
this.chargeEnergy = chargeEnergy;
}
public BigDecimal getDisChargeEnergy() {
return disChargeEnergy;
}
public void setDisChargeEnergy(BigDecimal disChargeEnergy) {
this.disChargeEnergy = disChargeEnergy;
}
}

View File

@ -0,0 +1,51 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
import java.util.Date;
/**
* 实时运行-储能功率数据
*
*/
public class EnergyStoragePowVo {
/**
* 显示日期
*/
private Date createDate;
/**
* pcs实时有功功率
*/
private BigDecimal pcsTotalActPower;
/**
* pcs实时无功功率
*/
private BigDecimal pcsTotalReactivePower;
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public BigDecimal getPcsTotalActPower() {
return pcsTotalActPower;
}
public void setPcsTotalActPower(BigDecimal pcsTotalActPower) {
this.pcsTotalActPower = pcsTotalActPower;
}
public BigDecimal getPcsTotalReactivePower() {
return pcsTotalReactivePower;
}
public void setPcsTotalReactivePower(BigDecimal pcsTotalReactivePower) {
this.pcsTotalReactivePower = pcsTotalReactivePower;
}
}

View File

@ -0,0 +1,74 @@
package com.xzzn.ems.domain.vo;
import java.util.List;
/**
* 首页看板-数据概览
*
*/
public class HomePageDataViewVo {
/**
* 电量指标
*/
private List<ElectricIndexList> elecDataList;
/**
* 系统效率
*/
private List<SystemEfficiencyList> sysEfficList;
/**
* 告警趋势
*/
private List<AlarmTrendList> alarmDataList;
/**
* 设备告警占比
*/
private List<DeviceAlarmProportionList> deviceAlarmList;
/**
* 告警等级分布
*/
private List<AlarmGradeList> alarmLevelList;
public List<ElectricIndexList> getElecDataList() {
return elecDataList;
}
public void setElecDataList(List<ElectricIndexList> elecDataList) {
this.elecDataList = elecDataList;
}
public List<SystemEfficiencyList> getSysEfficList() {
return sysEfficList;
}
public void setSysEfficList(List<SystemEfficiencyList> sysEfficList) {
this.sysEfficList = sysEfficList;
}
public List<AlarmTrendList> getAlarmDataList() {
return alarmDataList;
}
public void setAlarmDataList(List<AlarmTrendList> alarmDataList) {
this.alarmDataList = alarmDataList;
}
public List<DeviceAlarmProportionList> getDeviceAlarmList() {
return deviceAlarmList;
}
public void setDeviceAlarmList(List<DeviceAlarmProportionList> deviceAlarmList) {
this.deviceAlarmList = deviceAlarmList;
}
public List<AlarmGradeList> getAlarmLevelList() {
return alarmLevelList;
}
public void setAlarmLevelList(List<AlarmGradeList> alarmLevelList) {
this.alarmLevelList = alarmLevelList;
}
}

View File

@ -0,0 +1,76 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
/**
* 电表-总表数据展示
*/
public class LoadDataDetailInfo
{
/** 类别 */
private String category;
/** 总 (kWh) */
private BigDecimal totalKwh = BigDecimal.ZERO;
/** 尖 (kWh) */
private BigDecimal peakKwh = BigDecimal.ZERO;
/** 峰 (kWh) */
private BigDecimal highKwh = BigDecimal.ZERO;
/** 平 (kWh) */
private BigDecimal flatKwh = BigDecimal.ZERO;
/** 谷 (kWh) */
private BigDecimal valleyKwh = BigDecimal.ZERO;
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 getHighKwh() {
return highKwh;
}
public void setHighKwh(BigDecimal highKwh) {
this.highKwh = highKwh;
}
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;
}
}

View File

@ -0,0 +1,42 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
/**
* 电表-储能表数据展示
*/
public class MeteDataDetailInfo
{
/** 类别A相 B相 C相*/
private String category;
/** 有功功率 */
private BigDecimal activePower = BigDecimal.ZERO;
/** 无功功率 */
private BigDecimal reactivePower = BigDecimal.ZERO;
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public BigDecimal getActivePower() {
return activePower;
}
public void setActivePower(BigDecimal activePower) {
this.activePower = activePower;
}
public BigDecimal getReactivePower() {
return reactivePower;
}
public void setReactivePower(BigDecimal reactivePower) {
this.reactivePower = reactivePower;
}
}

View File

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

View File

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

View File

@ -0,0 +1,86 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
/**
* 数据统计-pcs曲线-通用对象
*/
public class PcsStatisListVo {
/**
* 数据日期
*/
private String statisDate;
/**
* 有功
*/
private BigDecimal activePower;
/**
* 无功
*/
private BigDecimal reactivePower;
/**
* u电流
*/
private BigDecimal uCurrent;
/**
* v电流
*/
private BigDecimal vCurrent;
/**
* w电流
*/
private BigDecimal wCurrent;
public String getStatisDate() {
return statisDate;
}
public void setStatisDate(String statisDate) {
this.statisDate = statisDate;
}
public BigDecimal getActivePower() {
return activePower;
}
public void setActivePower(BigDecimal activePower) {
this.activePower = activePower;
}
public BigDecimal getReactivePower() {
return reactivePower;
}
public void setReactivePower(BigDecimal reactivePower) {
this.reactivePower = reactivePower;
}
public BigDecimal getuCurrent() {
return uCurrent;
}
public void setuCurrent(BigDecimal uCurrent) {
this.uCurrent = uCurrent;
}
public BigDecimal getvCurrent() {
return vCurrent;
}
public void setvCurrent(BigDecimal vCurrent) {
this.vCurrent = vCurrent;
}
public BigDecimal getwCurrent() {
return wCurrent;
}
public void setwCurrent(BigDecimal wCurrent) {
this.wCurrent = wCurrent;
}
}

View File

@ -0,0 +1,73 @@
package com.xzzn.ems.domain.vo;
import java.math.BigDecimal;
/**
* 数据统计-功率曲线
*/
public class PowerStatisListVo {
/**
* 数据日期
*/
private String statisDate;
/**
* 电网功率-total_apparent_power总交流视在功率
*/
private BigDecimal gridPower;
/**
* 负载功率-total_active_power总交流有功电率
*/
private BigDecimal loadPower;
/**
* 储能功率-max_discharge_power_capacity最大可放功率
*/
private BigDecimal storagePower;
/**
* 光伏功率-ac_capacitive_reactive_power交流侧容性无功功率
*/
private BigDecimal pvPower;
public String getStatisDate() {
return statisDate;
}
public void setStatisDate(String statisDate) {
this.statisDate = statisDate;
}
public BigDecimal getGridPower() {
return gridPower;
}
public void setGridPower(BigDecimal gridPower) {
this.gridPower = gridPower;
}
public BigDecimal getLoadPower() {
return loadPower;
}
public void setLoadPower(BigDecimal loadPower) {
this.loadPower = loadPower;
}
public BigDecimal getStoragePower() {
return storagePower;
}
public void setStoragePower(BigDecimal storagePower) {
this.storagePower = storagePower;
}
public BigDecimal getPvPower() {
return pvPower;
}
public void setPvPower(BigDecimal pvPower) {
this.pvPower = pvPower;
}
}

Some files were not shown because too many files have changed in this diff Show More