Compare commits
69 Commits
7964806b94
...
prod
| Author | SHA1 | Date | |
|---|---|---|---|
| 44baca6c45 | |||
| f59eeab0d0 | |||
| f52f253344 | |||
| 90315d8e2c | |||
| 97c667bd77 | |||
| a12f7820cf | |||
| 8fd2f45e18 | |||
| 9da5047148 | |||
| 281e0f57c4 | |||
| 7ea52a8972 | |||
| e3e3dc1d96 | |||
| b4cbf0b34e | |||
| cbcaaaffb6 | |||
| c51c4be498 | |||
| 51e6936d77 | |||
| b25f5310e1 | |||
| 34c2647495 | |||
| 41af74b33a | |||
| 9125ce735c | |||
| a4338b3995 | |||
| 1da9867372 | |||
| e2663b18d5 | |||
| 587e9f86b1 | |||
| 161c54b6ef | |||
| af32d62c80 | |||
| 1e970c9d19 | |||
| e6d6f806e4 | |||
| d22a71739f | |||
| bf1d70c953 | |||
| cceafdca92 | |||
| 3e6cd1b6ed | |||
| 41656581ca | |||
| 9fcc81fbac | |||
| a0b83fc8a4 | |||
| 819e4cd3a7 | |||
| 7b798f8323 | |||
| acf2164c1c | |||
| 23f7e70df6 | |||
| 7bd6341c9b | |||
| aa751464b4 | |||
| eafb0ec2c6 | |||
| 118be05c8a | |||
| 7dc664446e | |||
| 3b55f3d053 | |||
| 84757ab358 | |||
| 05a2af8c92 | |||
| 020d145a1f | |||
| d6ec98eab9 | |||
| 21ce358638 | |||
| 8ce403eff2 | |||
| d37fb949e1 | |||
| 406cc59b25 | |||
| 53f515ad6c | |||
| 29c5ffc15c | |||
| 3eb8636e53 | |||
| 84d77c2d33 | |||
| b0264ebe46 | |||
| 13266bdbd5 | |||
| 7d1f1836d8 | |||
| 11a95c19fd | |||
| b2a964cb82 | |||
| 733afa99bd | |||
| 6a5504434d | |||
| f42e8549b1 | |||
| 4bb23a7c75 | |||
| 126b637932 | |||
| 7bf4baf85f | |||
| 9dae47934f | |||
| 0e726a214d |
@ -1,7 +1,10 @@
|
||||
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;
|
||||
@ -34,4 +37,22 @@ public class EmsAlarmRecordsController extends BaseController
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -34,9 +34,13 @@ public class EmsHomePageController extends BaseController{
|
||||
* 首页看板数据
|
||||
*/
|
||||
@GetMapping("/dataList")
|
||||
public AjaxResult list()
|
||||
public AjaxResult list() throws Exception
|
||||
{
|
||||
return success(homePageService.getHomePageDataList());
|
||||
try {
|
||||
return success(homePageService.getHomePageDataList());
|
||||
} catch (Exception e) {
|
||||
return error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,14 +1,19 @@
|
||||
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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -24,6 +29,9 @@ public class EmsSiteConfigController extends BaseController{
|
||||
@Autowired
|
||||
private IEmsSiteService iEmsSiteService;
|
||||
|
||||
@Autowired
|
||||
private IEmsDeviceSettingService iEmsDeviceSettingService;
|
||||
|
||||
/**
|
||||
* 获取站点列表
|
||||
*/
|
||||
@ -35,4 +43,97 @@ public class EmsSiteConfigController extends BaseController{
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,9 @@ import com.xzzn.common.core.controller.BaseController;
|
||||
import com.xzzn.common.core.domain.AjaxResult;
|
||||
import com.xzzn.common.core.page.TableDataInfo;
|
||||
import com.xzzn.ems.domain.vo.BatteryDataStatsListVo;
|
||||
import com.xzzn.ems.domain.vo.DateSearchRequest;
|
||||
import com.xzzn.ems.service.IEmsSiteService;
|
||||
import com.xzzn.ems.service.IEmsStatsReportService;
|
||||
import com.xzzn.ems.service.ISingleSiteService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -24,6 +26,8 @@ public class EmsSiteMonitorController extends BaseController{
|
||||
private ISingleSiteService iSingleSiteService;
|
||||
@Autowired
|
||||
private IEmsSiteService iEmsSiteService;
|
||||
@Autowired
|
||||
private IEmsStatsReportService iemsStatsReportService;
|
||||
|
||||
/**
|
||||
* 获取单站首页数据
|
||||
@ -46,10 +50,28 @@ public class EmsSiteMonitorController extends BaseController{
|
||||
/**
|
||||
* 单站监控-设备监控-实时运行曲线图数据
|
||||
*/
|
||||
@GetMapping("/runningGraph")
|
||||
public AjaxResult getRunningGraph(@RequestParam String siteId)
|
||||
@GetMapping("/runningGraph/storagePower")
|
||||
public AjaxResult getRunningGraphStorage(@RequestParam String siteId)
|
||||
{
|
||||
return success(iSingleSiteService.getRunningGraph(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));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -88,13 +110,22 @@ public class EmsSiteMonitorController extends BaseController{
|
||||
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 stackDeviceId)
|
||||
public AjaxResult getClusterNameList(@RequestParam String siteId, @RequestParam String stackDeviceId)
|
||||
{
|
||||
return success(iEmsSiteService.getAllClusterInfo(stackDeviceId));
|
||||
return success(iEmsSiteService.getAllClusterInfo(siteId, stackDeviceId));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -117,6 +148,15 @@ public class EmsSiteMonitorController extends BaseController{
|
||||
return getDataTable2(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 单个单体电池曲线图
|
||||
*/
|
||||
@GetMapping("/getSingleBatteryData")
|
||||
public AjaxResult getSingleBatteryData(DateSearchRequest requestVo)
|
||||
{
|
||||
return success(iemsStatsReportService.getSingleBatteryData(requestVo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 电表数据
|
||||
*/
|
||||
|
||||
@ -2,14 +2,21 @@ 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;
|
||||
|
||||
/**
|
||||
* 单站监控-统计报表
|
||||
*
|
||||
@ -45,4 +52,92 @@ public class EmsStatisticalReportController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 概率统计-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("缺少必传项");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
@ -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));
|
||||
}
|
||||
}
|
||||
@ -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));
|
||||
}
|
||||
}
|
||||
@ -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));
|
||||
}
|
||||
}
|
||||
@ -5,6 +5,7 @@ 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;
|
||||
@ -40,10 +41,10 @@ public class EmsTicketController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:ticket:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EmsTicket emsTicket)
|
||||
public TableDataInfo list(Long[] status)
|
||||
{
|
||||
startPage();
|
||||
List<EmsTicket> list = emsTicketService.selectEmsTicketList(emsTicket);
|
||||
List<TicketListVo> list = emsTicketService.getAllTicketList(status);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ -102,4 +103,15 @@ public class EmsTicketController extends BaseController
|
||||
{
|
||||
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()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
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;
|
||||
@ -31,6 +32,8 @@ public class MqttMessageController implements MqttPublisher, MqttSubscriber {
|
||||
@Autowired
|
||||
private IFXXDataProcessService fXXDataProcessService;
|
||||
|
||||
@Autowired
|
||||
private IDDSDataProcessService dDSDataProcessService;
|
||||
@Autowired
|
||||
public MqttMessageController(MqttLifecycleManager mqttLifecycleManager) {
|
||||
this.mqttLifecycleManager = mqttLifecycleManager;
|
||||
@ -38,12 +41,18 @@ public class MqttMessageController implements MqttPublisher, MqttSubscriber {
|
||||
|
||||
@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);
|
||||
|
||||
}
|
||||
|
||||
// 处理系统状态消息
|
||||
@ -52,15 +61,8 @@ public class MqttMessageController implements MqttPublisher, MqttSubscriber {
|
||||
System.out.println("[SYSTEM] Status update: " + payload);
|
||||
|
||||
try {
|
||||
// 业务处理逻辑
|
||||
EmsMqttMessage mqttMessage = new EmsMqttMessage();
|
||||
mqttMessage.setMqttTopic(topic);
|
||||
mqttMessage.setMqttMessage(payload);
|
||||
mqttMessage.setCreateTime(new java.util.Date());
|
||||
mqttMessage.setUpdateTime(new java.util.Date());
|
||||
mqttMessage.setCreateBy("system");
|
||||
mqttMessage.setUpdateBy("system");
|
||||
emsMqttMessageService.insertEmsMqttMessage(mqttMessage);
|
||||
emsMqttMessageService.insertMqttOriginalMessage(topic,payload);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to process system status message: " + e.getMessage(), e);
|
||||
}
|
||||
@ -72,17 +74,13 @@ public class MqttMessageController implements MqttPublisher, MqttSubscriber {
|
||||
System.out.println("[DEVICE] data: " + payload);
|
||||
try {
|
||||
// 业务处理逻辑
|
||||
fXXDataProcessService.handleFxData(payload);
|
||||
if (topic.startsWith("021_DDS")) {
|
||||
dDSDataProcessService.handleDdsData(payload);
|
||||
} else if (topic.startsWith("021_FXX")) {
|
||||
fXXDataProcessService.handleFxData(payload);
|
||||
}
|
||||
|
||||
|
||||
EmsMqttMessage mqttMessage = new EmsMqttMessage();
|
||||
mqttMessage.setMqttTopic(topic);
|
||||
mqttMessage.setMqttMessage(payload);
|
||||
mqttMessage.setCreateTime(new java.util.Date());
|
||||
mqttMessage.setUpdateTime(new java.util.Date());
|
||||
mqttMessage.setCreateBy("system");
|
||||
mqttMessage.setUpdateBy("system");
|
||||
emsMqttMessageService.insertEmsMqttMessage(mqttMessage);
|
||||
emsMqttMessageService.insertMqttOriginalMessage(topic,payload);
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to process system status message: " + e.getMessage(), e);
|
||||
}
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
package com.xzzn.web.controller.ems.data;
|
||||
|
||||
public class FXDataProcess {
|
||||
|
||||
|
||||
|
||||
public void batteryClusterProcess(String data) {
|
||||
}
|
||||
|
||||
public void batteryStackProcess(String data) {
|
||||
}
|
||||
|
||||
public void batteryDataProcess(String data) {
|
||||
}
|
||||
|
||||
public void pcsProcess(String data) {
|
||||
}
|
||||
|
||||
public void pcsBranchProcess(String data) {
|
||||
}
|
||||
|
||||
|
||||
public void coolingProcess(String data) {
|
||||
}
|
||||
|
||||
|
||||
public void ameterProcess(String data) {
|
||||
}
|
||||
}
|
||||
@ -3,6 +3,8 @@ package com.xzzn.web.controller.system;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.xzzn.system.service.impl.SysUserServiceImpl;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -52,6 +54,8 @@ public class SysUserController extends BaseController
|
||||
|
||||
@Autowired
|
||||
private ISysPostService postService;
|
||||
@Autowired
|
||||
private SysUserServiceImpl sysUserServiceImpl;
|
||||
|
||||
/**
|
||||
* 获取用户列表
|
||||
@ -253,4 +257,13 @@ public class SysUserController extends BaseController
|
||||
{
|
||||
return success(deptService.selectDeptTreeList(dept));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有用户
|
||||
*/
|
||||
@GetMapping("/getAllUser")
|
||||
public AjaxResult getAllUser(SysUser user)
|
||||
{
|
||||
return success(userService.selectUserList(user));
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ server:
|
||||
# 日志配置
|
||||
logging:
|
||||
level:
|
||||
com.xzzn: debug
|
||||
com.xzzn: info
|
||||
org.springframework: warn
|
||||
|
||||
# 用户配置
|
||||
@ -135,4 +135,13 @@ mqtt:
|
||||
password: qwer1234
|
||||
connection-timeout: 15
|
||||
keep-alive-interval: 30
|
||||
automatic-reconnect: true
|
||||
automatic-reconnect: true
|
||||
|
||||
modbus:
|
||||
pool:
|
||||
max-total: 20
|
||||
max-idle: 10
|
||||
min-idle: 3
|
||||
poll:
|
||||
interval: "0 */5 * * * *" # 5分钟间隔
|
||||
timeout: 30000 # 30秒超时
|
||||
|
||||
@ -119,4 +119,12 @@ public class RuoYiConfig
|
||||
{
|
||||
return getProfile() + "/upload";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取头像上传路径
|
||||
*/
|
||||
public static String getDevicePath()
|
||||
{
|
||||
return getProfile() + "/device";
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,4 +31,24 @@ public class RedisKeyConstants
|
||||
* 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_";
|
||||
}
|
||||
|
||||
@ -5,14 +5,18 @@ package com.xzzn.common.enums;
|
||||
*
|
||||
* @author xzzn
|
||||
*/
|
||||
public enum AmmeterCategoryStatus
|
||||
public enum AmmeterCategory
|
||||
{
|
||||
TOTAL_CHARGE("1", "累计充电量"), TOTAL_DISCHARGE("2", "累计放电量"), DAILY_CHARGE("3", "日充电量"), DAILY_DISCHARGE("4", "日放电量");
|
||||
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;
|
||||
|
||||
AmmeterCategoryStatus(String code, String info)
|
||||
AmmeterCategory(String code, String info)
|
||||
{
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
@ -12,7 +12,8 @@ public enum DeviceCategory
|
||||
STACK("STACK", "电池堆"),
|
||||
CLUSTER("CLUSTER", "电池簇"),
|
||||
BATTERY("BATTERY", "单体电池"),
|
||||
AMMETER("AMMETER", "电表");
|
||||
AMMETER("AMMETER", "电表"),
|
||||
COOLING("COOLING", "冷液体");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -50,6 +50,20 @@
|
||||
<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>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
@ -63,5 +77,4 @@
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@ -25,7 +25,7 @@ import com.xzzn.common.utils.ip.IpUtils;
|
||||
* @author xzzn
|
||||
*/
|
||||
@Aspect
|
||||
@Component
|
||||
@Component("customRateLimiterAspect")
|
||||
public class RateLimiterAspect
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(RateLimiterAspect.class);
|
||||
|
||||
@ -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;
|
||||
}*//*
|
||||
|
||||
}
|
||||
*/
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -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 +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -17,7 +17,7 @@ public class MqttLifecycleManager implements ApplicationRunner, SmartLifecycle,
|
||||
|
||||
private final MqttConnectOptions connectOptions;
|
||||
private MqttClient mqttClient;
|
||||
private volatile boolean running = false;
|
||||
private volatile boolean running = true;
|
||||
|
||||
// 存储订阅关系: topic -> (listener, qos)
|
||||
private final ConcurrentHashMap<String, SubscriptionInfo> subscriptions = new ConcurrentHashMap<>();
|
||||
|
||||
@ -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);*/
|
||||
}
|
||||
}
|
||||
@ -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)
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -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];
|
||||
}
|
||||
|
||||
}
|
||||
@ -22,6 +22,10 @@
|
||||
<groupId>com.xzzn</groupId>
|
||||
<artifactId>ems-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@ -58,6 +58,10 @@ public class EmsAlarmRecords extends BaseEntity
|
||||
@Excel(name = "设备名称,用于标识设备")
|
||||
private String deviceName;
|
||||
|
||||
/** 工单号(规则:T+日期+6位随机) */
|
||||
@Excel(name = "工单号", readConverterExp = "规=则:T+日期+6位随机")
|
||||
private String ticketNo;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
@ -158,6 +162,14 @@ public class EmsAlarmRecords extends BaseEntity
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public String getTicketNo() {
|
||||
return ticketNo;
|
||||
}
|
||||
|
||||
public void setTicketNo(String ticketNo) {
|
||||
this.ticketNo = ticketNo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
@ -176,6 +188,7 @@ public class EmsAlarmRecords extends BaseEntity
|
||||
.append("siteId", getSiteId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("deviceName", getDeviceName())
|
||||
.append("ticketNo", getTicketNo())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* 电池簇数据对象 ems_battery_cluster
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-29
|
||||
* @date 2025-07-29
|
||||
*/
|
||||
public class EmsBatteryCluster extends BaseEntity
|
||||
{
|
||||
@ -20,16 +20,16 @@ public class EmsBatteryCluster extends BaseEntity
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 工作状态 */
|
||||
@Excel(name = "工作状态")
|
||||
/** 工作状态:0-正常 1-异常 2-停止 */
|
||||
@Excel(name = "工作状态:0-正常 1-异常 2-停止")
|
||||
private String workStatus;
|
||||
|
||||
/** 与PCS通信状态 */
|
||||
@Excel(name = "与PCS通信状态")
|
||||
/** 与PCS通信状态:0-正常 1-通信中断 2-异常 */
|
||||
@Excel(name = "与PCS通信状态:0-正常 1-通信中断 2-异常")
|
||||
private String pcsCommunicationStatus;
|
||||
|
||||
/** 与EMS通信状态 */
|
||||
@Excel(name = "与EMS通信状态")
|
||||
/** 与EMS通信状态:0-正常 1-通信中断 2-异常 */
|
||||
@Excel(name = "与EMS通信状态:0-正常 1-通信中断 2-异常")
|
||||
private String emsCommunicationStatus;
|
||||
|
||||
/** 簇电压 (V) */
|
||||
|
||||
@ -12,7 +12,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* 单体电池实时数据对象 ems_battery_data
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-29
|
||||
* @date 2025-07-29
|
||||
*/
|
||||
public class EmsBatteryData extends BaseEntity
|
||||
{
|
||||
@ -66,6 +66,10 @@ public class EmsBatteryData extends BaseEntity
|
||||
@Excel(name = "簇设备id")
|
||||
private String clusterDeviceId;
|
||||
|
||||
/** 单体电池内阻 */
|
||||
@Excel(name = "单体电池内阻")
|
||||
private BigDecimal interResistance;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
@ -186,6 +190,16 @@ public class EmsBatteryData extends BaseEntity
|
||||
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)
|
||||
@ -206,6 +220,7 @@ public class EmsBatteryData extends BaseEntity
|
||||
.append("siteId", getSiteId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("clusterDeviceId", getClusterDeviceId())
|
||||
.append("interResistance", getInterResistance())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
@ -188,6 +188,62 @@ public class EmsBatteryStack extends BaseEntity
|
||||
@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;
|
||||
@ -618,6 +674,146 @@ public class EmsBatteryStack extends BaseEntity
|
||||
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)
|
||||
@ -668,6 +864,20 @@ public class EmsBatteryStack extends BaseEntity
|
||||
.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();
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* Modbus设备配置对象 ems_devices_setting
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-02
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
public class EmsDevicesSetting extends BaseEntity
|
||||
{
|
||||
@ -102,6 +102,10 @@ public class EmsDevicesSetting extends BaseEntity
|
||||
@Excel(name = "设备类别,例如“STACK/CLUSTER/PCS等”")
|
||||
private String deviceCategory;
|
||||
|
||||
/** 设备图像地址 */
|
||||
@Excel(name = "设备图像地址")
|
||||
private String pictureUrl;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
@ -312,6 +316,16 @@ public class EmsDevicesSetting extends BaseEntity
|
||||
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)
|
||||
@ -336,6 +350,7 @@ public class EmsDevicesSetting extends BaseEntity
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("parentId", getParentId())
|
||||
.append("deviceCategory", getDeviceCategory())
|
||||
.append("pictureUrl", getPictureUrl())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
104
ems-system/src/main/java/com/xzzn/ems/domain/EmsDhData.java
Normal file
104
ems-system/src/main/java/com/xzzn/ems/domain/EmsDhData.java
Normal 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();
|
||||
}
|
||||
}
|
||||
@ -12,7 +12,7 @@ import com.xzzn.common.annotation.Excel;
|
||||
* PCS数据对象 ems_pcs_data
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-29
|
||||
* @date 2025-07-07
|
||||
*/
|
||||
public class EmsPcsData extends BaseEntity
|
||||
{
|
||||
@ -22,24 +22,24 @@ public class EmsPcsData extends BaseEntity
|
||||
private Long id;
|
||||
|
||||
/** 数据更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "数据更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "数据更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date dataUpdateTime;
|
||||
|
||||
/** 工作状态 */
|
||||
@Excel(name = "工作状态")
|
||||
/** 工作状态:0-正常 1-异常 2-停止 */
|
||||
@Excel(name = "工作状态:0-正常 1-异常 2-停止")
|
||||
private String workStatus;
|
||||
|
||||
/** 并网状态 */
|
||||
@Excel(name = "并网状态")
|
||||
/** 并网状态:0-并网 1-未并网 */
|
||||
@Excel(name = "并网状态:0-并网 1-未并网")
|
||||
private String gridStatus;
|
||||
|
||||
/** 设备状态 */
|
||||
@Excel(name = "设备状态")
|
||||
/** 设备状态:0-在线 1-离线 2-维修中 */
|
||||
@Excel(name = "设备状态:0-在线 1-离线 2-维修中")
|
||||
private String deviceStatus;
|
||||
|
||||
/** 控制模式 */
|
||||
@Excel(name = "控制模式")
|
||||
/** 控制模式:0-远程 1-本地 */
|
||||
@Excel(name = "控制模式:0-远程 1-本地")
|
||||
private String controlMode;
|
||||
|
||||
/** 总交流有功电率 (kW) */
|
||||
@ -102,12 +102,12 @@ public class EmsPcsData extends BaseEntity
|
||||
@Excel(name = "交流频率 (Hz)")
|
||||
private BigDecimal acFrequency;
|
||||
|
||||
/** 支路状态 */
|
||||
@Excel(name = "支路状态")
|
||||
/** 支路状态:0-备用 1-正常 2-切换中 */
|
||||
@Excel(name = "支路状态:0-备用 1-正常 2-切换中")
|
||||
private String branchStatus;
|
||||
|
||||
/** 放电状态 */
|
||||
@Excel(name = "放电状态")
|
||||
/** 放电状态:0-充电中 1-待机 */
|
||||
@Excel(name = "放电状态:0-充电中 1-待机")
|
||||
private String dischargeStatus;
|
||||
|
||||
/** 直流功率 (kW) */
|
||||
@ -190,6 +190,22 @@ public class EmsPcsData extends BaseEntity
|
||||
@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)
|
||||
{
|
||||
this.id = id;
|
||||
@ -620,6 +636,46 @@ public class EmsPcsData extends BaseEntity
|
||||
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
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
@ -671,6 +727,10 @@ public class EmsPcsData extends BaseEntity
|
||||
.append("acSwitchStatus", getAcSwitchStatus())
|
||||
.append("dcSwitchStatus", getDcSwitchStatus())
|
||||
.append("remoteControlStatus", getRemoteControlStatus())
|
||||
.append("sysUCurrent", getSysUCurrent())
|
||||
.append("sysVCurrent", getSysVCurrent())
|
||||
.append("sysWCurrent", getSysWCurrent())
|
||||
.append("dwFrequency", getDwFrequency())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
114
ems-system/src/main/java/com/xzzn/ems/domain/EmsStrategy.java
Normal file
114
ems-system/src/main/java/com/xzzn/ems/domain/EmsStrategy.java
Normal 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();
|
||||
}
|
||||
}
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
@ -9,15 +9,15 @@ import com.xzzn.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* 工单主对象 ems_ticket
|
||||
*
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-26
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public class EmsTicket extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
/** */
|
||||
private String id;
|
||||
|
||||
/** 工单号(规则:T+日期+6位随机) */
|
||||
@ -26,7 +26,7 @@ public class EmsTicket extends BaseEntity
|
||||
|
||||
/** 提交用户ID */
|
||||
@Excel(name = "提交用户ID")
|
||||
private String userId;
|
||||
private Long userId;
|
||||
|
||||
/** 工单标题 */
|
||||
@Excel(name = "工单标题")
|
||||
@ -44,121 +44,152 @@ public class EmsTicket extends BaseEntity
|
||||
@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")
|
||||
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date completeTime;
|
||||
|
||||
/** 处理人ID */
|
||||
@Excel(name = "处理人ID")
|
||||
private Long workUserId;
|
||||
|
||||
public void setId(String id)
|
||||
/** 0-已废弃 1-有效 */
|
||||
@Excel(name = "0-已废弃 1-有效")
|
||||
private Long isDelete;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setTicketNo(String ticketNo)
|
||||
public void setTicketNo(String ticketNo)
|
||||
{
|
||||
this.ticketNo = ticketNo;
|
||||
}
|
||||
|
||||
public String getTicketNo()
|
||||
public String getTicketNo()
|
||||
{
|
||||
return ticketNo;
|
||||
}
|
||||
|
||||
public void setUserId(String userId)
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserId()
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setTitle(String title)
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setContent(String content)
|
||||
public void setContent(String content)
|
||||
{
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getContent()
|
||||
public String getContent()
|
||||
{
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setImages(String images)
|
||||
public void setImages(String images)
|
||||
{
|
||||
this.images = images;
|
||||
}
|
||||
|
||||
public String getImages()
|
||||
public String getImages()
|
||||
{
|
||||
return images;
|
||||
}
|
||||
|
||||
public void setStatus(Long status)
|
||||
public void setStatus(Long status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus()
|
||||
public Long getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setCompleteTime(Date completeTime)
|
||||
public void setExpectedCompleteTime(Date expectedCompleteTime)
|
||||
{
|
||||
this.expectedCompleteTime = expectedCompleteTime;
|
||||
}
|
||||
|
||||
public Date getExpectedCompleteTime()
|
||||
{
|
||||
return expectedCompleteTime;
|
||||
}
|
||||
|
||||
public void setCompleteTime(Date completeTime)
|
||||
{
|
||||
this.completeTime = completeTime;
|
||||
}
|
||||
|
||||
public Date getCompleteTime()
|
||||
public Date getCompleteTime()
|
||||
{
|
||||
return completeTime;
|
||||
}
|
||||
|
||||
public void setWorkUserId(Long workUserId)
|
||||
public void setWorkUserId(Long workUserId)
|
||||
{
|
||||
this.workUserId = workUserId;
|
||||
}
|
||||
|
||||
public Long getWorkUserId()
|
||||
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("createTime", getCreateTime())
|
||||
.append("completeTime", getCompleteTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("workUserId", getWorkUserId())
|
||||
.toString();
|
||||
.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();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 首页看板数据概览-告警等级分布
|
||||
*/
|
||||
@ -7,39 +9,39 @@ public class AlarmGradeList {
|
||||
/**
|
||||
* 告警等级
|
||||
*/
|
||||
private String grade;
|
||||
private String level;
|
||||
|
||||
/**
|
||||
* 数据一
|
||||
*/
|
||||
private int num1;
|
||||
private int dataNum;
|
||||
|
||||
/**
|
||||
* 数据三
|
||||
* 数据占比
|
||||
*/
|
||||
private int num2;
|
||||
private BigDecimal percent;
|
||||
|
||||
public String getGrade() {
|
||||
return grade;
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setGrade(String grade) {
|
||||
this.grade = grade;
|
||||
public void setLevel(String level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public int getNum1() {
|
||||
return num1;
|
||||
public int getDataNum() {
|
||||
return dataNum;
|
||||
}
|
||||
|
||||
public void setNum1(int num1) {
|
||||
this.num1 = num1;
|
||||
public void setDataNum(int dataNum) {
|
||||
this.dataNum = dataNum;
|
||||
}
|
||||
|
||||
public int getNum2() {
|
||||
return num2;
|
||||
public BigDecimal getPercent() {
|
||||
return percent;
|
||||
}
|
||||
|
||||
public void setNum2(int num2) {
|
||||
this.num2 = num2;
|
||||
public void setPercent(BigDecimal percent) {
|
||||
this.percent = percent;
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,6 +28,12 @@ public class AlarmRecordListResponseVo {
|
||||
/** 状态 */
|
||||
private String status;
|
||||
|
||||
/** 工单号 */
|
||||
private String ticketNo;
|
||||
|
||||
/** 告警唯一标识 */
|
||||
private String id;
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
@ -75,4 +81,20 @@ public class AlarmRecordListResponseVo {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -6,9 +6,9 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 电表数据
|
||||
* 电表-总表数据
|
||||
*/
|
||||
public class AmmeterDataVo {
|
||||
public class AmmeterLoadDataVo {
|
||||
|
||||
/** 电表名称 */
|
||||
private String deviceName;
|
||||
@ -20,7 +20,8 @@ public class AmmeterDataVo {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date dataUpdateTime;
|
||||
|
||||
private List<AmmeterDataDetailInfo> ammeterDataDetailInfos;
|
||||
/** 总表数据信息 */
|
||||
private List<LoadDataDetailInfo> loadDataDetailInfo;
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
@ -46,11 +47,11 @@ public class AmmeterDataVo {
|
||||
this.dataUpdateTime = dataUpdateTime;
|
||||
}
|
||||
|
||||
public List<AmmeterDataDetailInfo> getAmmeterDataDetailInfos() {
|
||||
return ammeterDataDetailInfos;
|
||||
public List<LoadDataDetailInfo> getLoadDataDetailInfo() {
|
||||
return loadDataDetailInfo;
|
||||
}
|
||||
|
||||
public void setAmmeterDataDetailInfos(List<AmmeterDataDetailInfo> ammeterDataDetailInfos) {
|
||||
this.ammeterDataDetailInfos = ammeterDataDetailInfos;
|
||||
public void setLoadDataDetailInfo(List<LoadDataDetailInfo> loadDataDetailInfo) {
|
||||
this.loadDataDetailInfo = loadDataDetailInfo;
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -21,16 +21,16 @@ public class BMSBatteryDataList {
|
||||
private BigDecimal currentSoc;
|
||||
|
||||
/** 单体最高电压 (V) */
|
||||
private BigDecimal maxVoltage;
|
||||
private BigDecimal maxCellVoltage;
|
||||
|
||||
/** 单体最低电压 (V) */
|
||||
private BigDecimal minVoltage;
|
||||
private BigDecimal minCellVoltage;
|
||||
|
||||
/** 单体最高温度 (℃) */
|
||||
private BigDecimal maxTemperature;
|
||||
private BigDecimal maxCellTemp;
|
||||
|
||||
/** 单体最低温度 (℃) */
|
||||
private BigDecimal minTemperature;
|
||||
private BigDecimal minCellTemp;
|
||||
|
||||
/** 换电站id */
|
||||
private String siteId;
|
||||
@ -46,36 +46,52 @@ public class BMSBatteryDataList {
|
||||
this.clusterId = clusterId;
|
||||
}
|
||||
|
||||
public BigDecimal getMinTemperature() {
|
||||
return minTemperature;
|
||||
public String getStackDeviceId() {
|
||||
return stackDeviceId;
|
||||
}
|
||||
|
||||
public void setMinTemperature(BigDecimal minTemperature) {
|
||||
this.minTemperature = minTemperature;
|
||||
public void setStackDeviceId(String stackDeviceId) {
|
||||
this.stackDeviceId = stackDeviceId;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxTemperature() {
|
||||
return maxTemperature;
|
||||
public String getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setMaxTemperature(BigDecimal maxTemperature) {
|
||||
this.maxTemperature = maxTemperature;
|
||||
public void setSiteId(String siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public BigDecimal getMinVoltage() {
|
||||
return minVoltage;
|
||||
public BigDecimal getMinCellTemp() {
|
||||
return minCellTemp;
|
||||
}
|
||||
|
||||
public void setMinVoltage(BigDecimal minVoltage) {
|
||||
this.minVoltage = minVoltage;
|
||||
public void setMinCellTemp(BigDecimal minCellTemp) {
|
||||
this.minCellTemp = minCellTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxVoltage() {
|
||||
return maxVoltage;
|
||||
public BigDecimal getMaxCellTemp() {
|
||||
return maxCellTemp;
|
||||
}
|
||||
|
||||
public void setMaxVoltage(BigDecimal maxVoltage) {
|
||||
this.maxVoltage = maxVoltage;
|
||||
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() {
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 实时运行-电池平均SOC数据
|
||||
@ -8,26 +9,21 @@ import java.math.BigDecimal;
|
||||
*/
|
||||
public class BatteryAveSOCVo {
|
||||
/**
|
||||
* 月份 月+日
|
||||
* 数据时间
|
||||
*/
|
||||
private String monthDay;
|
||||
private Date createDate;
|
||||
|
||||
/**
|
||||
* 实时SOC
|
||||
*/
|
||||
private BigDecimal batterySOC;
|
||||
|
||||
/**
|
||||
* 昨日SOC
|
||||
*/
|
||||
private BigDecimal ytdBatterySOC;
|
||||
|
||||
public String getMonthDay() {
|
||||
return monthDay;
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setMonthDay(String monthDay) {
|
||||
this.monthDay = monthDay;
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public BigDecimal getBatterySOC() {
|
||||
@ -37,12 +33,4 @@ public class BatteryAveSOCVo {
|
||||
public void setBatterySOC(BigDecimal batterySOC) {
|
||||
this.batterySOC = batterySOC;
|
||||
}
|
||||
|
||||
public BigDecimal getYtdBatterySOC() {
|
||||
return ytdBatterySOC;
|
||||
}
|
||||
|
||||
public void setYtdBatterySOC(BigDecimal ytdBatterySOC) {
|
||||
this.ytdBatterySOC = ytdBatterySOC;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 实时运行-电池平均温度数据
|
||||
@ -8,27 +9,21 @@ import java.math.BigDecimal;
|
||||
*/
|
||||
public class BatteryAveTempVo {
|
||||
/**
|
||||
* 月份 月+日
|
||||
* 数据时间
|
||||
*/
|
||||
private String monthDay;
|
||||
private Date createDate;
|
||||
|
||||
/**
|
||||
* 实时温度
|
||||
*/
|
||||
private BigDecimal batteryTemp;
|
||||
|
||||
/**
|
||||
* 昨日温度
|
||||
*/
|
||||
private BigDecimal batteryYtdTemp;
|
||||
|
||||
|
||||
public String getMonthDay() {
|
||||
return monthDay;
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setMonthDay(String monthDay) {
|
||||
this.monthDay = monthDay;
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public BigDecimal getBatteryTemp() {
|
||||
@ -38,12 +33,4 @@ public class BatteryAveTempVo {
|
||||
public void setBatteryTemp(BigDecimal batteryTemp) {
|
||||
this.batteryTemp = batteryTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getBatteryYtdTemp() {
|
||||
return batteryYtdTemp;
|
||||
}
|
||||
|
||||
public void setBatteryYtdTemp(BigDecimal batteryYtdTemp) {
|
||||
this.batteryYtdTemp = batteryYtdTemp;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -21,6 +21,12 @@ public class DateSearchRequest {
|
||||
|
||||
private String siteId;
|
||||
|
||||
private String deviceId;
|
||||
|
||||
private String dataType;
|
||||
|
||||
private String clusterDeviceId;
|
||||
|
||||
public Date getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
@ -44,4 +50,28 @@ public class DateSearchRequest {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,11 @@ import java.util.List;
|
||||
*/
|
||||
public class ElectricDataInfoVo {
|
||||
|
||||
/**
|
||||
* 显示时间单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 总充电量
|
||||
*/
|
||||
@ -29,6 +34,14 @@ public class ElectricDataInfoVo {
|
||||
*/
|
||||
private List<SiteMonitorDataVo> sevenDayDisChargeStats;
|
||||
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalChargedCap() {
|
||||
return totalChargedCap;
|
||||
}
|
||||
|
||||
@ -3,13 +3,13 @@ package com.xzzn.ems.domain.vo;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 首页看板数据概览-电量指标
|
||||
* 数据统计-电量指标
|
||||
*/
|
||||
public class ElectricIndexList {
|
||||
/**
|
||||
* 月份
|
||||
*/
|
||||
private int dateMonth;
|
||||
private String dateMonth;
|
||||
|
||||
/**
|
||||
* 充电量
|
||||
@ -21,11 +21,11 @@ public class ElectricIndexList {
|
||||
*/
|
||||
private BigDecimal disChargeEnergy;
|
||||
|
||||
public int getDateMonth() {
|
||||
public String getDateMonth() {
|
||||
return dateMonth;
|
||||
}
|
||||
|
||||
public void setDateMonth(int dateMonth) {
|
||||
public void setDateMonth(String dateMonth) {
|
||||
this.dateMonth = dateMonth;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 实时运行-储能功率数据
|
||||
@ -8,9 +9,10 @@ import java.math.BigDecimal;
|
||||
*/
|
||||
public class EnergyStoragePowVo {
|
||||
/**
|
||||
* 月份 月+日
|
||||
* 显示日期
|
||||
*/
|
||||
private String monthDay;
|
||||
|
||||
private Date createDate;
|
||||
|
||||
/**
|
||||
* pcs实时有功功率
|
||||
@ -22,22 +24,13 @@ public class EnergyStoragePowVo {
|
||||
*/
|
||||
private BigDecimal pcsTotalReactivePower;
|
||||
|
||||
/**
|
||||
* pcs昨日有功功率
|
||||
*/
|
||||
private BigDecimal pcsYtdActPower;
|
||||
|
||||
/**
|
||||
* pcs昨日无功功率
|
||||
*/
|
||||
private BigDecimal pcsYtdReactivePower;
|
||||
|
||||
public String getMonthDay() {
|
||||
return monthDay;
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setMonthDay(String monthDay) {
|
||||
this.monthDay = monthDay;
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public BigDecimal getPcsTotalActPower() {
|
||||
@ -55,20 +48,4 @@ public class EnergyStoragePowVo {
|
||||
public void setPcsTotalReactivePower(BigDecimal pcsTotalReactivePower) {
|
||||
this.pcsTotalReactivePower = pcsTotalReactivePower;
|
||||
}
|
||||
|
||||
public BigDecimal getPcsYtdActPower() {
|
||||
return pcsYtdActPower;
|
||||
}
|
||||
|
||||
public void setPcsYtdActPower(BigDecimal pcsYtdActPower) {
|
||||
this.pcsYtdActPower = pcsYtdActPower;
|
||||
}
|
||||
|
||||
public BigDecimal getPcsYtdReactivePower() {
|
||||
return pcsYtdReactivePower;
|
||||
}
|
||||
|
||||
public void setPcsYtdReactivePower(BigDecimal pcsYtdReactivePower) {
|
||||
this.pcsYtdReactivePower = pcsYtdReactivePower;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,36 +1,30 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 电表详细数据
|
||||
* 电表-总表数据展示
|
||||
*/
|
||||
public class AmmeterDataDetailInfo
|
||||
public class LoadDataDetailInfo
|
||||
{
|
||||
/** 类别 */
|
||||
private String category;
|
||||
|
||||
/** 总 (kWh) */
|
||||
private BigDecimal totalKwh;
|
||||
private BigDecimal totalKwh = BigDecimal.ZERO;
|
||||
|
||||
/** 尖 (kWh) */
|
||||
private BigDecimal sharpKwh;
|
||||
private BigDecimal peakKwh = BigDecimal.ZERO;
|
||||
|
||||
/** 峰 (kWh) */
|
||||
private BigDecimal peakKwh;
|
||||
private BigDecimal highKwh = BigDecimal.ZERO;
|
||||
|
||||
/** 平 (kWh) */
|
||||
private BigDecimal flatKwh;
|
||||
private BigDecimal flatKwh = BigDecimal.ZERO;
|
||||
|
||||
/** 谷 (kWh) */
|
||||
private BigDecimal valleyKwh;
|
||||
private BigDecimal valleyKwh = BigDecimal.ZERO;
|
||||
|
||||
/** 总表设备Id */
|
||||
private String deviceId;
|
||||
|
||||
/** 数据更新时间 */
|
||||
private Date updateTime;
|
||||
|
||||
public BigDecimal getValleyKwh() {
|
||||
return valleyKwh;
|
||||
@ -56,12 +50,12 @@ public class AmmeterDataDetailInfo
|
||||
this.peakKwh = peakKwh;
|
||||
}
|
||||
|
||||
public BigDecimal getSharpKwh() {
|
||||
return sharpKwh;
|
||||
public BigDecimal getHighKwh() {
|
||||
return highKwh;
|
||||
}
|
||||
|
||||
public void setSharpKwh(BigDecimal sharpKwh) {
|
||||
this.sharpKwh = sharpKwh;
|
||||
public void setHighKwh(BigDecimal highKwh) {
|
||||
this.highKwh = highKwh;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalKwh() {
|
||||
@ -79,20 +73,4 @@ public class AmmeterDataDetailInfo
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,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;
|
||||
}
|
||||
}
|
||||
@ -1,48 +0,0 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 实时运行-pcs平均温度数据
|
||||
*
|
||||
*/
|
||||
public class PCSAveTempVo {
|
||||
/**
|
||||
* 月份 月+日
|
||||
*/
|
||||
private String monthDay;
|
||||
|
||||
/**
|
||||
* 实时温度
|
||||
*/
|
||||
private BigDecimal pcsTemp;
|
||||
|
||||
/**
|
||||
* 昨日同时段温度(到分)
|
||||
*/
|
||||
private BigDecimal pcsYtdTemp;
|
||||
|
||||
public String getMonthDay() {
|
||||
return monthDay;
|
||||
}
|
||||
|
||||
public void setMonthDay(String monthDay) {
|
||||
this.monthDay = monthDay;
|
||||
}
|
||||
|
||||
public BigDecimal getPcsTemp() {
|
||||
return pcsTemp;
|
||||
}
|
||||
|
||||
public void setPcsTemp(BigDecimal pcsTemp) {
|
||||
this.pcsTemp = pcsTemp;
|
||||
}
|
||||
|
||||
public BigDecimal getPcsYtdTemp() {
|
||||
return pcsYtdTemp;
|
||||
}
|
||||
|
||||
public void setPcsYtdTemp(BigDecimal pcsYtdTemp) {
|
||||
this.pcsYtdTemp = pcsYtdTemp;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,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;
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,108 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
/**
|
||||
* 站点管理-站点设备列表
|
||||
*
|
||||
*/
|
||||
public class SiteDeviceListVo {
|
||||
/** 站点id */
|
||||
private String siteId;
|
||||
/** 站点名称 */
|
||||
private String siteName;
|
||||
/** 设备id */
|
||||
private String deviceId;
|
||||
/** 设备名称 */
|
||||
private String deviceName;
|
||||
/** 设备类型 */
|
||||
private String deviceType;
|
||||
/** 通信状态 */
|
||||
private String communicationStatus;
|
||||
/** 设备类型 */
|
||||
private String deviceCategory;
|
||||
/** 设备类型 */
|
||||
private String pictureUrl;
|
||||
/** 唯一标识 */
|
||||
private String id;
|
||||
/** 父类id */
|
||||
private String parentId;
|
||||
|
||||
public String getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setSiteId(String siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public String getSiteName() {
|
||||
return siteName;
|
||||
}
|
||||
|
||||
public void setSiteName(String siteName) {
|
||||
this.siteName = siteName;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDeviceType() {
|
||||
return deviceType;
|
||||
}
|
||||
|
||||
public void setDeviceType(String deviceType) {
|
||||
this.deviceType = deviceType;
|
||||
}
|
||||
|
||||
public String getCommunicationStatus() {
|
||||
return communicationStatus;
|
||||
}
|
||||
|
||||
public void setCommunicationStatus(String communicationStatus) {
|
||||
this.communicationStatus = communicationStatus;
|
||||
}
|
||||
|
||||
public String getDeviceCategory() {
|
||||
return deviceCategory;
|
||||
}
|
||||
|
||||
public void setDeviceCategory(String deviceCategory) {
|
||||
this.deviceCategory = deviceCategory;
|
||||
}
|
||||
|
||||
public String getPictureUrl() {
|
||||
return pictureUrl;
|
||||
}
|
||||
|
||||
public void setPictureUrl(String pictureUrl) {
|
||||
this.pictureUrl = pictureUrl;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
}
|
||||
@ -20,6 +20,14 @@ public class SiteMonitorHomeAlarmVo {
|
||||
*/
|
||||
private String alarmContent;
|
||||
|
||||
/**
|
||||
* 工单号
|
||||
*/
|
||||
private String ticketNo;
|
||||
|
||||
/** 告警唯一标识 */
|
||||
private String id;
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
@ -43,4 +51,20 @@ public class SiteMonitorHomeAlarmVo {
|
||||
public void setStatus(int 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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ public class SiteMonitorRuningInfoVo {
|
||||
/**
|
||||
* pcs平均温度list
|
||||
*/
|
||||
private List<PCSAveTempVo> pcsAveTempList;
|
||||
private List<StackAveTempVo> stackAveTempList;
|
||||
|
||||
/**
|
||||
* 电池平均soclist
|
||||
@ -35,12 +35,12 @@ public class SiteMonitorRuningInfoVo {
|
||||
this.energyStoragePowList = energyStoragePowList;
|
||||
}
|
||||
|
||||
public List<PCSAveTempVo> getPcsAveTempList() {
|
||||
return pcsAveTempList;
|
||||
public List<StackAveTempVo> getStackAveTempList() {
|
||||
return stackAveTempList;
|
||||
}
|
||||
|
||||
public void setPcsAveTempList(List<PCSAveTempVo> pcsAveTempList) {
|
||||
this.pcsAveTempList = pcsAveTempList;
|
||||
public void setStackAveTempList(List<StackAveTempVo> stackAveTempList) {
|
||||
this.stackAveTempList = stackAveTempList;
|
||||
}
|
||||
|
||||
public List<BatteryAveSOCVo> getBatteryAveSOCList() {
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 实时运行-堆平均温度数据
|
||||
*
|
||||
*/
|
||||
public class StackAveTempVo {
|
||||
/**
|
||||
* 数据时间
|
||||
*/
|
||||
private Date createDate;
|
||||
|
||||
/**
|
||||
* 实时温度
|
||||
*/
|
||||
private BigDecimal temp;
|
||||
|
||||
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public BigDecimal getTemp() {
|
||||
return temp;
|
||||
}
|
||||
|
||||
public void setTemp(BigDecimal temp) {
|
||||
this.temp = temp;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 数据统计-堆曲线-通用对象
|
||||
*/
|
||||
public class StackStatisListVo {
|
||||
/**
|
||||
* 数据日期
|
||||
*/
|
||||
private String statisDate;
|
||||
|
||||
/**
|
||||
* 有功
|
||||
*/
|
||||
private BigDecimal temp;
|
||||
|
||||
/**
|
||||
* 无功
|
||||
*/
|
||||
private BigDecimal voltage;
|
||||
|
||||
/**
|
||||
* u电流
|
||||
*/
|
||||
private BigDecimal current;
|
||||
|
||||
/**
|
||||
* v电流
|
||||
*/
|
||||
private BigDecimal soc;
|
||||
|
||||
public String getStatisDate() {
|
||||
return statisDate;
|
||||
}
|
||||
|
||||
public void setStatisDate(String statisDate) {
|
||||
this.statisDate = statisDate;
|
||||
}
|
||||
|
||||
public BigDecimal getTemp() {
|
||||
return temp;
|
||||
}
|
||||
|
||||
public void setTemp(BigDecimal temp) {
|
||||
this.temp = temp;
|
||||
}
|
||||
|
||||
public BigDecimal getVoltage() {
|
||||
return voltage;
|
||||
}
|
||||
|
||||
public void setVoltage(BigDecimal voltage) {
|
||||
this.voltage = voltage;
|
||||
}
|
||||
|
||||
public BigDecimal getCurrent() {
|
||||
return current;
|
||||
}
|
||||
|
||||
public void setCurrent(BigDecimal current) {
|
||||
this.current = current;
|
||||
}
|
||||
|
||||
public BigDecimal getSoc() {
|
||||
return soc;
|
||||
}
|
||||
|
||||
public void setSoc(BigDecimal soc) {
|
||||
this.soc = soc;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 报表统计-电表报表入参
|
||||
*
|
||||
*/
|
||||
public class StatisAmmeterDateRequest {
|
||||
|
||||
/**
|
||||
* 筛选时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date dateTime;
|
||||
|
||||
private String siteId;
|
||||
|
||||
private String deviceId;
|
||||
|
||||
public Date getDateTime() {
|
||||
return dateTime;
|
||||
}
|
||||
|
||||
public void setDateTime(Date dateTime) {
|
||||
this.dateTime = dateTime;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 电池簇-电池温度等数据入参
|
||||
*
|
||||
*/
|
||||
public class StatisClusterDateRequest {
|
||||
|
||||
/**
|
||||
* 筛选时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date dateTime;
|
||||
|
||||
private String stackId;
|
||||
|
||||
private String clusterId;
|
||||
|
||||
private String siteId;
|
||||
|
||||
public Date getDateTime() {
|
||||
return dateTime;
|
||||
}
|
||||
|
||||
public void setDateTime(Date dateTime) {
|
||||
this.dateTime = dateTime;
|
||||
}
|
||||
|
||||
public String getStackId() {
|
||||
return stackId;
|
||||
}
|
||||
|
||||
public void setStackId(String stackId) {
|
||||
this.stackId = stackId;
|
||||
}
|
||||
|
||||
public String getClusterId() {
|
||||
return clusterId;
|
||||
}
|
||||
|
||||
public void setClusterId(String clusterId) {
|
||||
this.clusterId = clusterId;
|
||||
}
|
||||
|
||||
public String getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setSiteId(String siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,82 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import com.xzzn.common.annotation.Excel;
|
||||
import com.xzzn.ems.domain.EmsStrategyCurve;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*策略模块曲线图
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-13
|
||||
*/
|
||||
public class StrategyCurveVo
|
||||
{
|
||||
|
||||
/** 站点id */
|
||||
private String siteId;
|
||||
|
||||
/** 关联的策略ID */
|
||||
private Long strategyId;
|
||||
|
||||
/** 模板名称 */
|
||||
private String templateName;
|
||||
|
||||
/** 模板id */
|
||||
private String templateId;
|
||||
|
||||
/** 月份 */
|
||||
private Long month;
|
||||
|
||||
/** 模板时间功率 */
|
||||
List<StrategyPowerDataVo> powerList;
|
||||
|
||||
public String getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setSiteId(String siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public Long getStrategyId() {
|
||||
return strategyId;
|
||||
}
|
||||
|
||||
public void setStrategyId(Long strategyId) {
|
||||
this.strategyId = strategyId;
|
||||
}
|
||||
|
||||
public String getTemplateName() {
|
||||
return templateName;
|
||||
}
|
||||
|
||||
public void setTemplateName(String templateName) {
|
||||
this.templateName = templateName;
|
||||
}
|
||||
|
||||
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 List<StrategyPowerDataVo> getPowerList() {
|
||||
return powerList;
|
||||
}
|
||||
|
||||
public void setPowerList(List<StrategyPowerDataVo> powerList) {
|
||||
this.powerList = powerList;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
/**
|
||||
* 策略运行对象
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public class StrategyRunningVo
|
||||
{
|
||||
/** 策略状态:0-未启用 1-已运行 2-已暂停 3-禁用 4-删除 */
|
||||
private String status;
|
||||
|
||||
/** 主策略名称 */
|
||||
private String mainStrategyName;
|
||||
|
||||
/** 辅助策略名称 */
|
||||
private String auxStrategyName;
|
||||
|
||||
/** 站点id */
|
||||
private String siteId;
|
||||
|
||||
/** 设备唯一标识符 */
|
||||
private String deviceId;
|
||||
|
||||
/** 策略运行id */
|
||||
private Long id;
|
||||
|
||||
/** 主策略id */
|
||||
private Long mainStrategyId;
|
||||
|
||||
/** 辅助策略id */
|
||||
private Long auxStrategyId;
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public String getMainStrategyName() {
|
||||
return mainStrategyName;
|
||||
}
|
||||
|
||||
public void setMainStrategyName(String mainStrategyName) {
|
||||
this.mainStrategyName = mainStrategyName;
|
||||
}
|
||||
|
||||
public String getAuxStrategyName() {
|
||||
return auxStrategyName;
|
||||
}
|
||||
|
||||
public void setAuxStrategyName(String auxStrategyName) {
|
||||
this.auxStrategyName = auxStrategyName;
|
||||
}
|
||||
|
||||
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 Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getAuxStrategyId() {
|
||||
return auxStrategyId;
|
||||
}
|
||||
|
||||
public void setAuxStrategyId(Long auxStrategyId) {
|
||||
this.auxStrategyId = auxStrategyId;
|
||||
}
|
||||
|
||||
public Long getMainStrategyId() {
|
||||
return mainStrategyId;
|
||||
}
|
||||
|
||||
public void setMainStrategyId(Long mainStrategyId) {
|
||||
this.mainStrategyId = mainStrategyId;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,115 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import com.xzzn.ems.domain.EmsStrategyTempTimeConfig;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 新增模板+模板时间数据
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
public class StrategyTempConfigRequest
|
||||
{
|
||||
|
||||
/** 模板id */
|
||||
private String templateId;
|
||||
/** 站点id */
|
||||
private String siteId;
|
||||
|
||||
/** 关联的策略ID */
|
||||
private Long strategyId;
|
||||
|
||||
/** 模板名称,如“模板一” */
|
||||
private String templateName;
|
||||
|
||||
/** SDC限制 (%) 1 = 开,0 = 关 */
|
||||
private Integer sdcLimit;
|
||||
|
||||
/** SDC下限 (%) */
|
||||
private BigDecimal sdcDown;
|
||||
|
||||
/** SDC上限 (%) */
|
||||
private BigDecimal sdcUp;
|
||||
|
||||
/** 模板时间 */
|
||||
private List<EmsStrategyTempTimeConfig> timeConfigList;
|
||||
|
||||
public String getTemplateId() {
|
||||
return templateId;
|
||||
}
|
||||
|
||||
public void setTemplateId(String templateId) {
|
||||
this.templateId = templateId;
|
||||
}
|
||||
|
||||
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 setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public String getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public List<EmsStrategyTempTimeConfig> getTimeConfigList() {
|
||||
return timeConfigList;
|
||||
}
|
||||
|
||||
public void setTimeConfigList(List<EmsStrategyTempTimeConfig> timeConfigList) {
|
||||
this.timeConfigList = timeConfigList;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,152 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 模板+模板时间数据
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
public class StrategyTempTimeConfigVo
|
||||
{
|
||||
/** 模版id */
|
||||
private Long id;
|
||||
|
||||
/** 关联的策略ID */
|
||||
private Long strategyId;
|
||||
|
||||
/** 模板名称,如“模板一” */
|
||||
private String templateName;
|
||||
|
||||
/** SDC限制 (%) 1 = 开,0 = 关 */
|
||||
private Integer sdcLimit;
|
||||
|
||||
/** SDC下限 (%) */
|
||||
private BigDecimal sdcDown;
|
||||
|
||||
/** SDC上限 (%) */
|
||||
private BigDecimal sdcUp;
|
||||
|
||||
/** 站点id */
|
||||
private String siteId;
|
||||
|
||||
/** 开始时间 */
|
||||
@JsonFormat(pattern = "HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
@JsonFormat(pattern = "HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
/** 充放功率 (kW) */
|
||||
private BigDecimal chargeDischargePower;
|
||||
|
||||
/** 充电状态,如“1-充电”、“2-待机” */
|
||||
private String chargeStatus;
|
||||
|
||||
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 setSiteId(String siteId)
|
||||
{
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public String getSiteId()
|
||||
{
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public Date getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Date startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Date getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Date endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public BigDecimal getChargeDischargePower() {
|
||||
return chargeDischargePower;
|
||||
}
|
||||
|
||||
public void setChargeDischargePower(BigDecimal chargeDischargePower) {
|
||||
this.chargeDischargePower = chargeDischargePower;
|
||||
}
|
||||
|
||||
public String getChargeStatus() {
|
||||
return chargeStatus;
|
||||
}
|
||||
|
||||
public void setChargeStatus(String chargeStatus) {
|
||||
this.chargeStatus = chargeStatus;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
/**
|
||||
* 时间配置显示对象
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
public class StrategyTimeConfigVo
|
||||
{
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 关联的策略ID */
|
||||
private Long strategyId;
|
||||
|
||||
/** 月份,1-12 */
|
||||
private Long month;
|
||||
|
||||
/** 站点id */
|
||||
private String siteId;
|
||||
|
||||
/** 充放电模式 */
|
||||
private String chargeDischargeMode;
|
||||
|
||||
/** 模板id */
|
||||
private String templateId;
|
||||
|
||||
/** 模板名称 */
|
||||
private String templateName;
|
||||
|
||||
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 String getTemplateName() {
|
||||
return templateName;
|
||||
}
|
||||
|
||||
public void setTemplateName(String templateName) {
|
||||
this.templateName = templateName;
|
||||
}
|
||||
}
|
||||
@ -9,18 +9,18 @@ public class SystemEfficiencyList {
|
||||
/**
|
||||
* 月份
|
||||
*/
|
||||
private int dateMonth;
|
||||
private String dateMonth;
|
||||
|
||||
/**
|
||||
* 系统效率
|
||||
*/
|
||||
private BigDecimal systemEfficiency;
|
||||
|
||||
public int getDateMonth() {
|
||||
public String getDateMonth() {
|
||||
return dateMonth;
|
||||
}
|
||||
|
||||
public void setDateMonth(int dateMonth) {
|
||||
public void setDateMonth(String dateMonth) {
|
||||
this.dateMonth = dateMonth;
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
package com.xzzn.ems.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xzzn.common.annotation.Excel;
|
||||
import com.xzzn.common.core.domain.BaseEntity;
|
||||
import com.xzzn.ems.domain.EmsTicket;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 工单列表对象
|
||||
*
|
||||
*/
|
||||
public class TicketListVo extends EmsTicket
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 提交人姓名
|
||||
private String userName;
|
||||
// 处理人姓名
|
||||
private String workName;
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getWorkName() {
|
||||
return workName;
|
||||
}
|
||||
|
||||
public void setWorkName(String workName) {
|
||||
this.workName = workName;
|
||||
}
|
||||
}
|
||||
@ -78,5 +78,12 @@ public interface EmsAlarmRecordsMapper
|
||||
*/
|
||||
public List<DeviceAlarmProportionList> getDeviceAlarmPropList();
|
||||
|
||||
/**
|
||||
* 获取设备等级分布
|
||||
*
|
||||
*/
|
||||
public List<AlarmGradeList> getAlarmGradeList();
|
||||
|
||||
|
||||
public List<AlarmRecordListResponseVo> getAlarmRecordDetailList(AlarmRecordListRequestVo requestVo);
|
||||
}
|
||||
|
||||
@ -2,14 +2,14 @@ package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsAmmeterData;
|
||||
import com.xzzn.ems.domain.vo.AmmeterDataDetailInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.xzzn.ems.domain.vo.AmmeterStatisListVo;
|
||||
import com.xzzn.ems.domain.vo.StatisAmmeterDateRequest;
|
||||
|
||||
/**
|
||||
* 总数据Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-06-27
|
||||
* @date 2025-07-03
|
||||
*/
|
||||
public interface EmsAmmeterDataMapper
|
||||
{
|
||||
@ -62,9 +62,9 @@ public interface EmsAmmeterDataMapper
|
||||
public int deleteEmsAmmeterDataByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 获取总表详细数据
|
||||
* @param siteId
|
||||
* 按小时获取当天电表曲线数据
|
||||
* @param requestVo
|
||||
* @return
|
||||
*/
|
||||
public List<AmmeterDataDetailInfo> getAmmeterDetailInfo(@Param("siteId")String siteId,@Param("deviceId") String deviceId);
|
||||
public List<AmmeterStatisListVo> getLoadDataByHour(StatisAmmeterDateRequest requestVo);
|
||||
}
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsBatteryCluster;
|
||||
import com.xzzn.ems.domain.vo.BMSBatteryDataList;
|
||||
import com.xzzn.ems.domain.vo.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
@ -68,4 +69,18 @@ public interface EmsBatteryClusterMapper
|
||||
* @return
|
||||
*/
|
||||
public List<BMSBatteryDataList> getBmsBatteryData(@Param("siteId")String siteId, @Param("stackDeviceId")String stackDeviceId);
|
||||
|
||||
/**
|
||||
* 实时运行-平均soc+平均温度
|
||||
* @param siteId
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
public List<BatteryAveSOCVo> getAveSocList(@Param("siteId")String siteId, @Param("startDate") Date startDate, @Param("endDate")Date endDate);
|
||||
|
||||
public List<BatteryAveTempVo> getBatteryAveTempList(@Param("siteId")String siteId, @Param("startDate")Date startDate, @Param("endDate")Date endDate);
|
||||
|
||||
/** 堆电池温度数据-获取当天每小时簇 */
|
||||
public List<ClusterStatisListVo> getClusterDataByHour(StatisClusterDateRequest requestVo);
|
||||
}
|
||||
|
||||
@ -0,0 +1,68 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsBatteryDataDailyLatest;
|
||||
import com.xzzn.ems.domain.vo.BatteryDataStatsListVo;
|
||||
import com.xzzn.ems.domain.vo.DateSearchRequest;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 单体电池每日最新数据Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-18
|
||||
*/
|
||||
public interface EmsBatteryDailyLatestMapper
|
||||
{
|
||||
/**
|
||||
* 查询单体电池每日最新数据
|
||||
*
|
||||
* @param batteryPack 单体电池每日最新数据主键
|
||||
* @return 单体电池每日最新数据
|
||||
*/
|
||||
public EmsBatteryDataDailyLatest selectEmsBatteryDataDailyLatestByBatteryPack(String batteryPack);
|
||||
|
||||
/**
|
||||
* 查询单体电池每日最新数据列表
|
||||
*
|
||||
* @param emsBatteryDataDailyLatest 单体电池每日最新数据
|
||||
* @return 单体电池每日最新数据集合
|
||||
*/
|
||||
public List<EmsBatteryDataDailyLatest> selectEmsBatteryDataDailyLatestList(EmsBatteryDataDailyLatest emsBatteryDataDailyLatest);
|
||||
|
||||
/**
|
||||
* 新增单体电池每日最新数据
|
||||
*
|
||||
* @param emsBatteryDataDailyLatest 单体电池每日最新数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsBatteryDataDailyLatest(EmsBatteryDataDailyLatest emsBatteryDataDailyLatest);
|
||||
|
||||
/**
|
||||
* 修改单体电池每日最新数据
|
||||
*
|
||||
* @param emsBatteryDataDailyLatest 单体电池每日最新数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsBatteryDataDailyLatest(EmsBatteryDataDailyLatest emsBatteryDataDailyLatest);
|
||||
|
||||
/**
|
||||
* 删除单体电池每日最新数据
|
||||
*
|
||||
* @param batteryPack 单体电池每日最新数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsBatteryDataDailyLatestByBatteryPack(String batteryPack);
|
||||
|
||||
/**
|
||||
* 批量删除单体电池每日最新数据
|
||||
*
|
||||
* @param batteryPacks 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsBatteryDataDailyLatestByBatteryPacks(String[] batteryPacks);
|
||||
|
||||
public void batchUpsert(@Param("list") List<EmsBatteryDataDailyLatest> dataList);
|
||||
|
||||
public List<BatteryDataStatsListVo> getBatteryDailyLatest(DateSearchRequest requestVo);
|
||||
}
|
||||
@ -6,6 +6,7 @@ import java.util.Map;
|
||||
import com.xzzn.ems.domain.EmsBatteryData;
|
||||
import com.xzzn.ems.domain.vo.BatteryClusterDataDetailVo;
|
||||
import com.xzzn.ems.domain.vo.BatteryDataStatsListVo;
|
||||
import com.xzzn.ems.domain.vo.DateSearchRequest;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
@ -95,4 +96,5 @@ public interface EmsBatteryDataMapper
|
||||
|
||||
|
||||
int insertEmsBatteryDataList(List<EmsBatteryData> emsBatteryDataList);
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,64 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsBatteryGroup;
|
||||
|
||||
/**
|
||||
* 电池组数据Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-29
|
||||
*/
|
||||
public interface EmsBatteryGroupMapper
|
||||
{
|
||||
/**
|
||||
* 查询电池组数据
|
||||
*
|
||||
* @param id 电池组数据主键
|
||||
* @return 电池组数据
|
||||
*/
|
||||
public EmsBatteryGroup selectEmsBatteryGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询电池组数据列表
|
||||
*
|
||||
* @param emsBatteryGroup 电池组数据
|
||||
* @return 电池组数据集合
|
||||
*/
|
||||
public List<EmsBatteryGroup> selectEmsBatteryGroupList(EmsBatteryGroup emsBatteryGroup);
|
||||
|
||||
/**
|
||||
* 新增电池组数据
|
||||
*
|
||||
* @param emsBatteryGroup 电池组数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsBatteryGroup(EmsBatteryGroup emsBatteryGroup);
|
||||
|
||||
/**
|
||||
* 修改电池组数据
|
||||
*
|
||||
* @param emsBatteryGroup 电池组数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsBatteryGroup(EmsBatteryGroup emsBatteryGroup);
|
||||
|
||||
/**
|
||||
* 删除电池组数据
|
||||
*
|
||||
* @param id 电池组数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsBatteryGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除电池组数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsBatteryGroupByIds(Long[] ids);
|
||||
|
||||
// 批量插入
|
||||
void batchInsertGroupData(List<EmsBatteryGroup> emsBatteryGroups);
|
||||
}
|
||||
@ -1,8 +1,12 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsBatteryStack;
|
||||
import com.xzzn.ems.domain.vo.BMSOverViewVo;
|
||||
import com.xzzn.ems.domain.vo.DateSearchRequest;
|
||||
import com.xzzn.ems.domain.vo.StackAveTempVo;
|
||||
import com.xzzn.ems.domain.vo.StackStatisListVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 电池堆数据Mapper接口
|
||||
@ -61,9 +65,24 @@ public interface EmsBatteryStackMapper
|
||||
public int deleteEmsBatteryStackByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 获取电池堆信息
|
||||
* 获取实时运行-堆平均温度
|
||||
* @param siteId
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
public List<BMSOverViewVo> selectEmsBatteryStackBySiteId(String siteId);
|
||||
public List<StackAveTempVo> getStackAveTempList(@Param("siteId")String siteId, @Param("startDate") Date startDate, @Param("endDate")Date endDate);
|
||||
|
||||
/**
|
||||
* 堆曲线数据-按小时区分
|
||||
* @param requestVo
|
||||
* @return
|
||||
*/
|
||||
public List<StackStatisListVo> getStackDataByHour(DateSearchRequest requestVo);
|
||||
|
||||
public List<StackStatisListVo> getStackDataByDay(DateSearchRequest requestVo);
|
||||
|
||||
public List<StackStatisListVo> getStackDataByMonth(DateSearchRequest requestVo);
|
||||
|
||||
public EmsBatteryStack getSiteSumStackInfo(String siteId);
|
||||
}
|
||||
|
||||
@ -66,14 +66,7 @@ public interface EmsDevicesSettingMapper
|
||||
* @param parentId
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> getDeviceInfoByParentId(String parentId);
|
||||
/**
|
||||
* 获取该设备下的所有电表
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
public List<EmsDevicesSetting> getAllBatteryDeviceBySiteId(String siteId);
|
||||
|
||||
public List<Map<String, Object>> getDeviceInfoByParentId(@Param("siteId")String siteId, @Param("parentId")String parentId);
|
||||
|
||||
/**
|
||||
* 根据site_id和device_category获取指定设备信息
|
||||
@ -82,4 +75,13 @@ public interface EmsDevicesSettingMapper
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> getDeviceInfosBySiteIdAndCategory(@Param("siteId")String siteId, @Param("deviceCategory")String deviceCategory);
|
||||
|
||||
/**
|
||||
* 获取该设备下的总表
|
||||
* @param siteId
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> getLoadNameList(String siteId);
|
||||
|
||||
public EmsDevicesSetting getDeviceBySiteAndDeviceId(@Param("deviceId")String deviceId, @Param("siteId")String siteId);
|
||||
}
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsDhData;
|
||||
|
||||
/**
|
||||
* 动环数据Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-28
|
||||
*/
|
||||
public interface EmsDhDataMapper
|
||||
{
|
||||
/**
|
||||
* 查询动环数据
|
||||
*
|
||||
* @param id 动环数据主键
|
||||
* @return 动环数据
|
||||
*/
|
||||
public EmsDhData selectEmsDhDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询动环数据列表
|
||||
*
|
||||
* @param emsDhData 动环数据
|
||||
* @return 动环数据集合
|
||||
*/
|
||||
public List<EmsDhData> selectEmsDhDataList(EmsDhData emsDhData);
|
||||
|
||||
/**
|
||||
* 新增动环数据
|
||||
*
|
||||
* @param emsDhData 动环数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsDhData(EmsDhData emsDhData);
|
||||
|
||||
/**
|
||||
* 修改动环数据
|
||||
*
|
||||
* @param emsDhData 动环数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsDhData(EmsDhData emsDhData);
|
||||
|
||||
/**
|
||||
* 删除动环数据
|
||||
*
|
||||
* @param id 动环数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsDhDataById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除动环数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsDhDataByIds(Long[] ids);
|
||||
}
|
||||
@ -100,8 +100,57 @@ public interface EmsPcsDataMapper
|
||||
|
||||
/**
|
||||
* 根据时间按天获取充放电量
|
||||
* @param siteId
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
public List<SiteMonitorDataVo> getPcsDataByDay(@Param("siteId")String siteId, @Param("startDate")Date startDate, @Param("endDate")Date endDate);
|
||||
/**
|
||||
* 根据时间按月获取充放电量
|
||||
* @param siteId
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
public List<SiteMonitorDataVo> getPcsDataByMonth(@Param("siteId")String siteId, @Param("startDate")Date startDate, @Param("endDate")Date endDate);
|
||||
/**
|
||||
* 根据时间按小时获取充放电量
|
||||
* @param siteId
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
public List<SiteMonitorDataVo> getPcsDataByHour(@Param("siteId")String siteId, @Param("startDate")Date startDate, @Param("endDate")Date endDate);
|
||||
|
||||
/**
|
||||
* 获取实时运行-储能功率
|
||||
* @param siteId
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
public List<EnergyStoragePowVo> getStoragePowerList(@Param("siteId")String siteId, @Param("startDate")Date startDate, @Param("endDate")Date endDate);
|
||||
|
||||
/**
|
||||
* pcs曲线运行数据
|
||||
* @param requestVo
|
||||
* @return
|
||||
*/
|
||||
public List<SiteMonitorDataVo> getPcsDataByDate(DateSearchRequest requestVo);
|
||||
public List<PcsStatisListVo> getPcsActivePowerByDay(DateSearchRequest requestVo);
|
||||
|
||||
public List<PcsStatisListVo> getPcsActivePowerByHour(DateSearchRequest requestVo);
|
||||
|
||||
public List<PcsStatisListVo> getPcsActivePowerByMonth(DateSearchRequest requestVo);
|
||||
|
||||
/**
|
||||
* 获取pcs功率曲线数据
|
||||
* @param requestVo
|
||||
* @return
|
||||
*/
|
||||
public List<PowerStatisListVo> getPowerDataByHour(DateSearchRequest requestVo);
|
||||
|
||||
public List<PowerStatisListVo> getPowerDataByDay(DateSearchRequest requestVo);
|
||||
|
||||
public List<PowerStatisListVo> getPowerDataByMonth(DateSearchRequest requestVo);
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsSiteSetting;
|
||||
import com.xzzn.ems.domain.vo.SiteDeviceListVo;
|
||||
import com.xzzn.ems.domain.vo.SiteTotalInfoVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -83,4 +84,10 @@ public interface EmsSiteSettingMapper
|
||||
* @return
|
||||
*/
|
||||
public List<EmsSiteSetting> getSiteInfoList(@Param("siteName")String siteName, @Param("startTime")String startTime, @Param("endTime")String endTime);
|
||||
|
||||
/**
|
||||
* 获取站点的设备列表
|
||||
* @return
|
||||
*/
|
||||
public List<SiteDeviceListVo> getAllSiteDeviceList(String siteId);
|
||||
}
|
||||
|
||||
@ -0,0 +1,73 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsStrategyCurve;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 策曲线Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface EmsStrategyCurveMapper
|
||||
{
|
||||
/**
|
||||
* 查询策曲线
|
||||
*
|
||||
* @param id 策曲线主键
|
||||
* @return 策曲线
|
||||
*/
|
||||
public EmsStrategyCurve selectEmsStrategyCurveById(Long id);
|
||||
|
||||
/**
|
||||
* 查询策曲线列表
|
||||
*
|
||||
* @param emsStrategyCurve 策曲线
|
||||
* @return 策曲线集合
|
||||
*/
|
||||
public List<EmsStrategyCurve> selectEmsStrategyCurveList(EmsStrategyCurve emsStrategyCurve);
|
||||
|
||||
/**
|
||||
* 新增策曲线
|
||||
*
|
||||
* @param emsStrategyCurve 策曲线
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsStrategyCurve(EmsStrategyCurve emsStrategyCurve);
|
||||
|
||||
/**
|
||||
* 修改策曲线
|
||||
*
|
||||
* @param emsStrategyCurve 策曲线
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsStrategyCurve(EmsStrategyCurve emsStrategyCurve);
|
||||
|
||||
/**
|
||||
* 删除策曲线
|
||||
*
|
||||
* @param id 策曲线主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsStrategyCurveById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除策曲线
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsStrategyCurveByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据模板id获取曲线图数据
|
||||
* @param templateId
|
||||
* @return
|
||||
*/
|
||||
public List<EmsStrategyCurve> getTemplateCurve(String templateId);
|
||||
|
||||
public void physicalDeleteCurve(@Param("strategyId")Long strategyId,@Param("siteId")String siteId);
|
||||
// 根据模版id 删除推送的曲线图数据
|
||||
public void physicalDeleteByTemplateId(String templateId);
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsStrategy;
|
||||
|
||||
/**
|
||||
* 策略Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public interface EmsStrategyMapper
|
||||
{
|
||||
/**
|
||||
* 查询策略
|
||||
*
|
||||
* @param id 策略主键
|
||||
* @return 策略
|
||||
*/
|
||||
public EmsStrategy selectEmsStrategyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询策略列表
|
||||
*
|
||||
* @param emsStrategy 策略
|
||||
* @return 策略集合
|
||||
*/
|
||||
public List<EmsStrategy> selectEmsStrategyList(EmsStrategy emsStrategy);
|
||||
|
||||
/**
|
||||
* 新增策略
|
||||
*
|
||||
* @param emsStrategy 策略
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsStrategy(EmsStrategy emsStrategy);
|
||||
|
||||
/**
|
||||
* 修改策略
|
||||
*
|
||||
* @param emsStrategy 策略
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsStrategy(EmsStrategy emsStrategy);
|
||||
|
||||
/**
|
||||
* 删除策略
|
||||
*
|
||||
* @param id 策略主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsStrategyById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除策略
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsStrategyByIds(Long[] ids);
|
||||
|
||||
public List<EmsStrategy> getStrategyListByType(Long type);
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsStrategyRunning;
|
||||
import com.xzzn.ems.domain.vo.StrategyRunningVo;
|
||||
|
||||
/**
|
||||
* 策略运行Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public interface EmsStrategyRunningMapper
|
||||
{
|
||||
/**
|
||||
* 查询策略运行
|
||||
*
|
||||
* @param id 策略运行主键
|
||||
* @return 策略运行
|
||||
*/
|
||||
public EmsStrategyRunning selectEmsStrategyRunningById(Long id);
|
||||
|
||||
/**
|
||||
* 查询策略运行列表
|
||||
*
|
||||
* @param emsStrategyRunning 策略运行
|
||||
* @return 策略运行集合
|
||||
*/
|
||||
public List<EmsStrategyRunning> selectEmsStrategyRunningList(EmsStrategyRunning emsStrategyRunning);
|
||||
|
||||
/**
|
||||
* 新增策略运行
|
||||
*
|
||||
* @param emsStrategyRunning 策略运行
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsStrategyRunning(EmsStrategyRunning emsStrategyRunning);
|
||||
|
||||
/**
|
||||
* 修改策略运行
|
||||
*
|
||||
* @param emsStrategyRunning 策略运行
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsStrategyRunning(EmsStrategyRunning emsStrategyRunning);
|
||||
|
||||
/**
|
||||
* 删除策略运行
|
||||
*
|
||||
* @param id 策略运行主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsStrategyRunningById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除策略运行
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsStrategyRunningByIds(Long[] ids);
|
||||
|
||||
// 获取站点运行策略列表
|
||||
public List<StrategyRunningVo> getRunningList(String siteId);
|
||||
|
||||
// 停止策略
|
||||
public int stopEmsStrategyRunning(Long id);
|
||||
|
||||
// 根据主策略id、辅助策略id、siteId 获取运行策略
|
||||
public EmsStrategyRunning selectEmsStrategyRunning(EmsStrategyRunning emsStrategyRunning);
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.xzzn.ems.domain.EmsStrategyTemp;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 模板Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface EmsStrategyTempMapper
|
||||
{
|
||||
/**
|
||||
* 查询模板
|
||||
*
|
||||
* @param id 模板主键
|
||||
* @return 模板
|
||||
*/
|
||||
public EmsStrategyTemp selectEmsStrategyTempById(Long id);
|
||||
|
||||
/**
|
||||
* 查询模板列表
|
||||
*
|
||||
* @param emsStrategyTemp 模板
|
||||
* @return 模板集合
|
||||
*/
|
||||
public List<EmsStrategyTemp> selectEmsStrategyTempList(EmsStrategyTemp emsStrategyTemp);
|
||||
|
||||
/**
|
||||
* 新增模板
|
||||
*
|
||||
* @param emsStrategyTemp 模板
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsStrategyTemp(EmsStrategyTemp emsStrategyTemp);
|
||||
|
||||
/**
|
||||
* 修改模板
|
||||
*
|
||||
* @param emsStrategyTemp 模板
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsStrategyTemp(EmsStrategyTemp emsStrategyTemp);
|
||||
|
||||
/**
|
||||
* 删除模板
|
||||
*
|
||||
* @param id 模板主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsStrategyTempById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除模板
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsStrategyTempByIds(Long[] ids);
|
||||
|
||||
// 获取模板名称和id
|
||||
public List<Map<String,String>> getTempNameList(@Param("strategyId")Long strategyId, @Param("siteId")String siteId);
|
||||
|
||||
// 根据模板id获取模板所有的时间配置
|
||||
public List<EmsStrategyTemp> selectStrategyTempByTempId(String templateId);
|
||||
|
||||
// 根据模板id全部删除
|
||||
public int deleteTempByTempId(String templateId);
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsStrategyTimeConfig;
|
||||
import com.xzzn.ems.domain.vo.StrategyTimeConfigVo;
|
||||
|
||||
/**
|
||||
* 时间配置Mapper接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface EmsStrategyTimeConfigMapper
|
||||
{
|
||||
/**
|
||||
* 查询时间配置
|
||||
*
|
||||
* @param id 时间配置主键
|
||||
* @return 时间配置
|
||||
*/
|
||||
public EmsStrategyTimeConfig selectEmsStrategyTimeConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询时间配置列表
|
||||
*
|
||||
* @param emsStrategyTimeConfig 时间配置
|
||||
* @return 时间配置集合
|
||||
*/
|
||||
public List<EmsStrategyTimeConfig> selectEmsStrategyTimeConfigList(EmsStrategyTimeConfig emsStrategyTimeConfig);
|
||||
|
||||
/**
|
||||
* 新增时间配置
|
||||
*
|
||||
* @param emsStrategyTimeConfig 时间配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsStrategyTimeConfig(EmsStrategyTimeConfig emsStrategyTimeConfig);
|
||||
|
||||
/**
|
||||
* 修改时间配置
|
||||
*
|
||||
* @param emsStrategyTimeConfig 时间配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsStrategyTimeConfig(EmsStrategyTimeConfig emsStrategyTimeConfig);
|
||||
|
||||
/**
|
||||
* 删除时间配置
|
||||
*
|
||||
* @param id 时间配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsStrategyTimeConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除时间配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsStrategyTimeConfigByIds(Long[] ids);
|
||||
|
||||
// 获取该策略下的时间配置
|
||||
public List<StrategyTimeConfigVo> getStrategyTimeList(EmsStrategyTimeConfig emsStrategyTimeConfig);
|
||||
|
||||
// 清空该月的模板信息
|
||||
public void cleanTemplateId(String templateId);
|
||||
|
||||
// 获取该策略下的时间配置
|
||||
List<EmsStrategyTimeConfig> getAllTimeConfigByTempId(String templateId);
|
||||
|
||||
// 设置该模版的时间配置为待下发
|
||||
public void updateTimeConfigWaitingPost(String templateId);
|
||||
}
|
||||
@ -1,6 +1,8 @@
|
||||
package com.xzzn.ems.mapper;
|
||||
|
||||
import com.xzzn.ems.domain.EmsTicket;
|
||||
import com.xzzn.ems.domain.vo.TicketListVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -59,4 +61,25 @@ public interface EmsTicketMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsTicketByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 废弃工单-isDelete=0
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public int dropEmsTicketById(String id);
|
||||
|
||||
/**
|
||||
* 获取工单列表
|
||||
* @param statusList
|
||||
* @return
|
||||
*/
|
||||
public List<TicketListVo> getAllTicketList(@Param("statusList")Long[] statusList);
|
||||
|
||||
/**
|
||||
* 工单详情
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public TicketListVo getTicketDetailInfo(String id);
|
||||
}
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
package com.xzzn.ems.service;
|
||||
|
||||
public interface IDDSDataProcessService {
|
||||
|
||||
public void handleDdsData(String message);
|
||||
|
||||
}
|
||||
@ -67,4 +67,13 @@ public interface IEmsAlarmRecordsService
|
||||
* @return
|
||||
*/
|
||||
public List<AlarmRecordListResponseVo> getAlarmRecordDetailList(AlarmRecordListRequestVo requestVo);
|
||||
|
||||
/**
|
||||
* 生产工单号
|
||||
*
|
||||
* @param id
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
public String createTicketNo(Long id, Long userId);
|
||||
}
|
||||
|
||||
@ -0,0 +1,67 @@
|
||||
package com.xzzn.ems.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.xzzn.ems.domain.EmsBatteryDataDailyLatest;
|
||||
|
||||
/**
|
||||
* 单体电池每日最新数据Service接口
|
||||
*
|
||||
* @author xzzn
|
||||
* @date 2025-07-18
|
||||
*/
|
||||
public interface IEmsBatteryDailyLatestService
|
||||
{
|
||||
/**
|
||||
* 查询单体电池每日最新数据
|
||||
*
|
||||
* @param batteryPack 单体电池每日最新数据主键
|
||||
* @return 单体电池每日最新数据
|
||||
*/
|
||||
public EmsBatteryDataDailyLatest selectEmsBatteryDataDailyLatestByBatteryPack(String batteryPack);
|
||||
|
||||
/**
|
||||
* 查询单体电池每日最新数据列表
|
||||
*
|
||||
* @param emsBatteryDataDailyLatest 单体电池每日最新数据
|
||||
* @return 单体电池每日最新数据集合
|
||||
*/
|
||||
public List<EmsBatteryDataDailyLatest> selectEmsBatteryDataDailyLatestList(EmsBatteryDataDailyLatest emsBatteryDataDailyLatest);
|
||||
|
||||
/**
|
||||
* 新增单体电池每日最新数据
|
||||
*
|
||||
* @param emsBatteryDataDailyLatest 单体电池每日最新数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmsBatteryDataDailyLatest(EmsBatteryDataDailyLatest emsBatteryDataDailyLatest);
|
||||
|
||||
/**
|
||||
* 修改单体电池每日最新数据
|
||||
*
|
||||
* @param emsBatteryDataDailyLatest 单体电池每日最新数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmsBatteryDataDailyLatest(EmsBatteryDataDailyLatest emsBatteryDataDailyLatest);
|
||||
|
||||
/**
|
||||
* 批量删除单体电池每日最新数据
|
||||
*
|
||||
* @param batteryPacks 需要删除的单体电池每日最新数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsBatteryDataDailyLatestByBatteryPacks(String[] batteryPacks);
|
||||
|
||||
/**
|
||||
* 删除单体电池每日最新数据信息
|
||||
*
|
||||
* @param batteryPack 单体电池每日最新数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmsBatteryDataDailyLatestByBatteryPack(String batteryPack);
|
||||
|
||||
/**
|
||||
* 批量处理每日数据
|
||||
* @param dailyList
|
||||
*/
|
||||
public void batchProcessBatteryData(List<EmsBatteryDataDailyLatest> dailyList);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user