From 3b55f3d05328fa7ec93779abfc27b19d6936454b Mon Sep 17 00:00:00 2001 From: mashili Date: Fri, 11 Jul 2025 19:47:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=96=E7=95=A5=E9=85=8D=E7=BD=AE-=E7=AD=96?= =?UTF-8?q?=E7=95=A5=E8=AF=A6=E6=83=85=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ems/EmsStrategyCurveController.java | 102 +++++++++ .../ems/EmsStrategyTempController.java | 110 ++++++++++ .../ems/EmsStrategyTimeConfigController.java | 101 +++++++++ .../controller/ems/EmsTicketController.java | 2 +- .../com/xzzn/ems/domain/EmsStrategyCurve.java | 136 ++++++++++++ .../com/xzzn/ems/domain/EmsStrategyTemp.java | 194 ++++++++++++++++++ .../ems/domain/EmsStrategyTimeConfig.java | 102 +++++++++ .../ems/mapper/EmsStrategyCurveMapper.java | 61 ++++++ .../ems/mapper/EmsStrategyTempMapper.java | 64 ++++++ .../mapper/EmsStrategyTimeConfigMapper.java | 61 ++++++ .../ems/service/IEmsStrategyCurveService.java | 61 ++++++ .../ems/service/IEmsStrategyTempService.java | 63 ++++++ .../IEmsStrategyTimeConfigService.java | 61 ++++++ .../impl/EmsStrategyCurveServiceImpl.java | 96 +++++++++ .../impl/EmsStrategyTempServiceImpl.java | 101 +++++++++ .../EmsStrategyTimeConfigServiceImpl.java | 96 +++++++++ .../mapper/ems/EmsStrategyCurveMapper.xml | 101 +++++++++ .../mapper/ems/EmsStrategyTempMapper.xml | 128 ++++++++++++ .../ems/EmsStrategyTimeConfigMapper.xml | 92 +++++++++ 19 files changed, 1731 insertions(+), 1 deletion(-) create mode 100644 ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsStrategyCurveController.java create mode 100644 ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsStrategyTempController.java create mode 100644 ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsStrategyTimeConfigController.java create mode 100644 ems-system/src/main/java/com/xzzn/ems/domain/EmsStrategyCurve.java create mode 100644 ems-system/src/main/java/com/xzzn/ems/domain/EmsStrategyTemp.java create mode 100644 ems-system/src/main/java/com/xzzn/ems/domain/EmsStrategyTimeConfig.java create mode 100644 ems-system/src/main/java/com/xzzn/ems/mapper/EmsStrategyCurveMapper.java create mode 100644 ems-system/src/main/java/com/xzzn/ems/mapper/EmsStrategyTempMapper.java create mode 100644 ems-system/src/main/java/com/xzzn/ems/mapper/EmsStrategyTimeConfigMapper.java create mode 100644 ems-system/src/main/java/com/xzzn/ems/service/IEmsStrategyCurveService.java create mode 100644 ems-system/src/main/java/com/xzzn/ems/service/IEmsStrategyTempService.java create mode 100644 ems-system/src/main/java/com/xzzn/ems/service/IEmsStrategyTimeConfigService.java create mode 100644 ems-system/src/main/java/com/xzzn/ems/service/impl/EmsStrategyCurveServiceImpl.java create mode 100644 ems-system/src/main/java/com/xzzn/ems/service/impl/EmsStrategyTempServiceImpl.java create mode 100644 ems-system/src/main/java/com/xzzn/ems/service/impl/EmsStrategyTimeConfigServiceImpl.java create mode 100644 ems-system/src/main/resources/mapper/ems/EmsStrategyCurveMapper.xml create mode 100644 ems-system/src/main/resources/mapper/ems/EmsStrategyTempMapper.xml create mode 100644 ems-system/src/main/resources/mapper/ems/EmsStrategyTimeConfigMapper.xml diff --git a/ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsStrategyCurveController.java b/ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsStrategyCurveController.java new file mode 100644 index 0000000..f66bcc1 --- /dev/null +++ b/ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsStrategyCurveController.java @@ -0,0 +1,102 @@ +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.EmsStrategyCurve; +import com.xzzn.ems.service.IEmsStrategyCurveService; +import com.xzzn.common.utils.poi.ExcelUtil; +import com.xzzn.common.core.page.TableDataInfo; + +/** + * 策曲线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 list = emsStrategyCurveService.selectEmsStrategyCurveList(emsStrategyCurve); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsStrategyTempController.java b/ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsStrategyTempController.java new file mode 100644 index 0000000..647c943 --- /dev/null +++ b/ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsStrategyTempController.java @@ -0,0 +1,110 @@ +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.EmsStrategyTemp; +import com.xzzn.ems.service.IEmsStrategyTempService; +import com.xzzn.common.utils.poi.ExcelUtil; + +/** + * 模板Controller + * + * @author xzzn + * @date 2025-07-11 + */ +@RestController +@RequestMapping("/strategy/temp") +public class EmsStrategyTempController extends BaseController +{ + @Autowired + private IEmsStrategyTempService emsStrategyTempService; + + /** + * 查询模板列表 + */ + @PreAuthorize("@ss.hasPermi('system:temp:list')") + @GetMapping("/list") + public AjaxResult list(EmsStrategyTemp emsStrategyTemp) + { + return success(emsStrategyTempService.selectEmsStrategyTempList(emsStrategyTemp)); + } + + /** + * 导出模板列表 + */ + @PreAuthorize("@ss.hasPermi('system:temp:export')") + @Log(title = "模板", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EmsStrategyTemp emsStrategyTemp) + { + List list = emsStrategyTempService.selectEmsStrategyTempList(emsStrategyTemp); + ExcelUtil util = new ExcelUtil(EmsStrategyTemp.class); + util.exportExcel(response, list, "模板数据"); + } + + /** + * 获取模板详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:temp:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(emsStrategyTempService.selectEmsStrategyTempById(id)); + } + + /** + * 新增模板 + */ + @PreAuthorize("@ss.hasPermi('system:temp:add')") + @Log(title = "模板", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EmsStrategyTemp emsStrategyTemp) + { + return toAjax(emsStrategyTempService.insertEmsStrategyTemp(emsStrategyTemp)); + } + + /** + * 修改模板 + */ + @PreAuthorize("@ss.hasPermi('system:temp:edit')") + @Log(title = "模板", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EmsStrategyTemp emsStrategyTemp) + { + return toAjax(emsStrategyTempService.updateEmsStrategyTemp(emsStrategyTemp)); + } + + /** + * 删除模板 + */ + @PreAuthorize("@ss.hasPermi('system:temp:remove')") + @Log(title = "模板", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(emsStrategyTempService.deleteEmsStrategyTempByIds(ids)); + } + + /** + * 根据策略id站点id获取所有模板名称 + */ + @GetMapping("/getTempNameList") + public AjaxResult getTempNameList(Long strategyId, String siteId) + { + return success(emsStrategyTempService.getTempNameList(strategyId, siteId)); + } +} diff --git a/ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsStrategyTimeConfigController.java b/ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsStrategyTimeConfigController.java new file mode 100644 index 0000000..1267d36 --- /dev/null +++ b/ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsStrategyTimeConfigController.java @@ -0,0 +1,101 @@ +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; +import com.xzzn.common.utils.poi.ExcelUtil; + +/** + * 时间配置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.selectEmsStrategyTimeConfigList(emsStrategyTimeConfig)); + } + + /** + * 导出时间配置列表 + */ + @PreAuthorize("@ss.hasPermi('system:config:export')") + @Log(title = "时间配置", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EmsStrategyTimeConfig emsStrategyTimeConfig) + { + List list = emsStrategyTimeConfigService.selectEmsStrategyTimeConfigList(emsStrategyTimeConfig); + ExcelUtil util = new ExcelUtil(EmsStrategyTimeConfig.class); + util.exportExcel(response, list, "时间配置数据"); + } + + /** + * 获取时间配置详细信息 + */ + @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 EmsStrategyTimeConfig emsStrategyTimeConfig) + { + return toAjax(emsStrategyTimeConfigService.insertEmsStrategyTimeConfig(emsStrategyTimeConfig)); + } + + /** + * 修改时间配置 + */ + @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)); + } +} diff --git a/ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsTicketController.java b/ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsTicketController.java index 754cac1..f1c26d9 100644 --- a/ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsTicketController.java +++ b/ems-admin/src/main/java/com/xzzn/web/controller/ems/EmsTicketController.java @@ -112,6 +112,6 @@ public class EmsTicketController extends BaseController @PostMapping("/drop") public AjaxResult drop(@RequestBody EmsTicket emsTicket) { - return toAjax(emsTicketService.dropEmsTicketById(emsTicket.getTicketNo())); + return toAjax(emsTicketService.dropEmsTicketById(emsTicket.getId())); } } diff --git a/ems-system/src/main/java/com/xzzn/ems/domain/EmsStrategyCurve.java b/ems-system/src/main/java/com/xzzn/ems/domain/EmsStrategyCurve.java new file mode 100644 index 0000000..dff611c --- /dev/null +++ b/ems-system/src/main/java/com/xzzn/ems/domain/EmsStrategyCurve.java @@ -0,0 +1,136 @@ +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; + + 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; + } + + @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()) + .toString(); + } +} diff --git a/ems-system/src/main/java/com/xzzn/ems/domain/EmsStrategyTemp.java b/ems-system/src/main/java/com/xzzn/ems/domain/EmsStrategyTemp.java new file mode 100644 index 0000000..20d8064 --- /dev/null +++ b/ems-system/src/main/java/com/xzzn/ems/domain/EmsStrategyTemp.java @@ -0,0 +1,194 @@ +package com.xzzn.ems.domain; + +import java.math.BigDecimal; +import java.time.LocalTime; +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-11 + */ +public class EmsStrategyTemp extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 关联的策略ID */ + @Excel(name = "关联的策略ID") + private Long strategyId; + + /** 模板名称,如“模板一” */ + @Excel(name = "模板名称,如“模板一”") + private String templateName; + + /** SDC限制 (%) */ + @Excel(name = "SDC限制 (%)") + private BigDecimal sdcLimit; + + /** SDC下限 (%) */ + @Excel(name = "SDC下限 (%)") + private BigDecimal sdcDown; + + /** SDC上限 (%) */ + @Excel(name = "SDC上限 (%)") + private BigDecimal sdcUp; + + /** 开始时间 */ + @JsonFormat(pattern = "HH:mm:ss") + @Excel(name = "开始时间", width = 30, dateFormat = "HH:mm:ss") + private LocalTime startTime; + + /** 结束时间 */ + @JsonFormat(pattern = "HH:mm:ss") + @Excel(name = "结束时间", width = 30, dateFormat = "HH:mm:ss") + private LocalTime endTime; + + /** 充放功率 (kW) */ + @Excel(name = "充放功率 (kW)") + private BigDecimal chargeDischargePower; + + /** 充电状态,如“1-充电”、“2-待机” */ + @Excel(name = "充电状态,如“1-充电”、“2-待机”") + private String chargeStatus; + + /** 站点id */ + @Excel(name = "站点id") + private String siteId; + + 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(BigDecimal sdcLimit) + { + this.sdcLimit = sdcLimit; + } + + public BigDecimal 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 LocalTime getStartTime() { + return startTime; + } + + public void setStartTime(LocalTime startTime) { + this.startTime = startTime; + } + + public LocalTime getEndTime() { + return endTime; + } + + public void setEndTime(LocalTime endTime) { + this.endTime = 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; + } + + @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()) + .toString(); + } +} diff --git a/ems-system/src/main/java/com/xzzn/ems/domain/EmsStrategyTimeConfig.java b/ems-system/src/main/java/com/xzzn/ems/domain/EmsStrategyTimeConfig.java new file mode 100644 index 0000000..250f68f --- /dev/null +++ b/ems-system/src/main/java/com/xzzn/ems/domain/EmsStrategyTimeConfig.java @@ -0,0 +1,102 @@ +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-11 + */ +public class EmsStrategyTimeConfig extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + 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; + + 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; + } + + @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()) + .toString(); + } +} diff --git a/ems-system/src/main/java/com/xzzn/ems/mapper/EmsStrategyCurveMapper.java b/ems-system/src/main/java/com/xzzn/ems/mapper/EmsStrategyCurveMapper.java new file mode 100644 index 0000000..9776cd1 --- /dev/null +++ b/ems-system/src/main/java/com/xzzn/ems/mapper/EmsStrategyCurveMapper.java @@ -0,0 +1,61 @@ +package com.xzzn.ems.mapper; + +import java.util.List; +import com.xzzn.ems.domain.EmsStrategyCurve; + +/** + * 策曲线Mapper接口 + * + * @author xzzn + * @date 2025-07-11 + */ +public interface EmsStrategyCurveMapper +{ + /** + * 查询策曲线 + * + * @param id 策曲线主键 + * @return 策曲线 + */ + public EmsStrategyCurve selectEmsStrategyCurveById(Long id); + + /** + * 查询策曲线列表 + * + * @param emsStrategyCurve 策曲线 + * @return 策曲线集合 + */ + public List 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); +} diff --git a/ems-system/src/main/java/com/xzzn/ems/mapper/EmsStrategyTempMapper.java b/ems-system/src/main/java/com/xzzn/ems/mapper/EmsStrategyTempMapper.java new file mode 100644 index 0000000..4ee49b1 --- /dev/null +++ b/ems-system/src/main/java/com/xzzn/ems/mapper/EmsStrategyTempMapper.java @@ -0,0 +1,64 @@ +package com.xzzn.ems.mapper; + +import java.util.List; +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 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); + + public List getTempNameList(@Param("strategyId")Long strategyId, @Param("siteId")String siteId); +} diff --git a/ems-system/src/main/java/com/xzzn/ems/mapper/EmsStrategyTimeConfigMapper.java b/ems-system/src/main/java/com/xzzn/ems/mapper/EmsStrategyTimeConfigMapper.java new file mode 100644 index 0000000..2662826 --- /dev/null +++ b/ems-system/src/main/java/com/xzzn/ems/mapper/EmsStrategyTimeConfigMapper.java @@ -0,0 +1,61 @@ +package com.xzzn.ems.mapper; + +import java.util.List; +import com.xzzn.ems.domain.EmsStrategyTimeConfig; + +/** + * 时间配置Mapper接口 + * + * @author xzzn + * @date 2025-07-11 + */ +public interface EmsStrategyTimeConfigMapper +{ + /** + * 查询时间配置 + * + * @param id 时间配置主键 + * @return 时间配置 + */ + public EmsStrategyTimeConfig selectEmsStrategyTimeConfigById(Long id); + + /** + * 查询时间配置列表 + * + * @param emsStrategyTimeConfig 时间配置 + * @return 时间配置集合 + */ + public List 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); +} diff --git a/ems-system/src/main/java/com/xzzn/ems/service/IEmsStrategyCurveService.java b/ems-system/src/main/java/com/xzzn/ems/service/IEmsStrategyCurveService.java new file mode 100644 index 0000000..74e883a --- /dev/null +++ b/ems-system/src/main/java/com/xzzn/ems/service/IEmsStrategyCurveService.java @@ -0,0 +1,61 @@ +package com.xzzn.ems.service; + +import java.util.List; +import com.xzzn.ems.domain.EmsStrategyCurve; + +/** + * 策曲线Service接口 + * + * @author xzzn + * @date 2025-07-11 + */ +public interface IEmsStrategyCurveService +{ + /** + * 查询策曲线 + * + * @param id 策曲线主键 + * @return 策曲线 + */ + public EmsStrategyCurve selectEmsStrategyCurveById(Long id); + + /** + * 查询策曲线列表 + * + * @param emsStrategyCurve 策曲线 + * @return 策曲线集合 + */ + public List selectEmsStrategyCurveList(EmsStrategyCurve emsStrategyCurve); + + /** + * 新增策曲线 + * + * @param emsStrategyCurve 策曲线 + * @return 结果 + */ + public int insertEmsStrategyCurve(EmsStrategyCurve emsStrategyCurve); + + /** + * 修改策曲线 + * + * @param emsStrategyCurve 策曲线 + * @return 结果 + */ + public int updateEmsStrategyCurve(EmsStrategyCurve emsStrategyCurve); + + /** + * 批量删除策曲线 + * + * @param ids 需要删除的策曲线主键集合 + * @return 结果 + */ + public int deleteEmsStrategyCurveByIds(Long[] ids); + + /** + * 删除策曲线信息 + * + * @param id 策曲线主键 + * @return 结果 + */ + public int deleteEmsStrategyCurveById(Long id); +} diff --git a/ems-system/src/main/java/com/xzzn/ems/service/IEmsStrategyTempService.java b/ems-system/src/main/java/com/xzzn/ems/service/IEmsStrategyTempService.java new file mode 100644 index 0000000..21e2fd7 --- /dev/null +++ b/ems-system/src/main/java/com/xzzn/ems/service/IEmsStrategyTempService.java @@ -0,0 +1,63 @@ +package com.xzzn.ems.service; + +import java.util.List; +import com.xzzn.ems.domain.EmsStrategyTemp; + +/** + * 模板Service接口 + * + * @author xzzn + * @date 2025-07-11 + */ +public interface IEmsStrategyTempService +{ + /** + * 查询模板 + * + * @param id 模板主键 + * @return 模板 + */ + public EmsStrategyTemp selectEmsStrategyTempById(Long id); + + /** + * 查询模板列表 + * + * @param emsStrategyTemp 模板 + * @return 模板集合 + */ + public List selectEmsStrategyTempList(EmsStrategyTemp emsStrategyTemp); + + /** + * 新增模板 + * + * @param emsStrategyTemp 模板 + * @return 结果 + */ + public int insertEmsStrategyTemp(EmsStrategyTemp emsStrategyTemp); + + /** + * 修改模板 + * + * @param emsStrategyTemp 模板 + * @return 结果 + */ + public int updateEmsStrategyTemp(EmsStrategyTemp emsStrategyTemp); + + /** + * 批量删除模板 + * + * @param ids 需要删除的模板主键集合 + * @return 结果 + */ + public int deleteEmsStrategyTempByIds(Long[] ids); + + /** + * 删除模板信息 + * + * @param id 模板主键 + * @return 结果 + */ + public int deleteEmsStrategyTempById(Long id); + + public List getTempNameList(Long strategyId, String siteId); +} diff --git a/ems-system/src/main/java/com/xzzn/ems/service/IEmsStrategyTimeConfigService.java b/ems-system/src/main/java/com/xzzn/ems/service/IEmsStrategyTimeConfigService.java new file mode 100644 index 0000000..dd658d6 --- /dev/null +++ b/ems-system/src/main/java/com/xzzn/ems/service/IEmsStrategyTimeConfigService.java @@ -0,0 +1,61 @@ +package com.xzzn.ems.service; + +import java.util.List; +import com.xzzn.ems.domain.EmsStrategyTimeConfig; + +/** + * 时间配置Service接口 + * + * @author xzzn + * @date 2025-07-11 + */ +public interface IEmsStrategyTimeConfigService +{ + /** + * 查询时间配置 + * + * @param id 时间配置主键 + * @return 时间配置 + */ + public EmsStrategyTimeConfig selectEmsStrategyTimeConfigById(Long id); + + /** + * 查询时间配置列表 + * + * @param emsStrategyTimeConfig 时间配置 + * @return 时间配置集合 + */ + public List selectEmsStrategyTimeConfigList(EmsStrategyTimeConfig emsStrategyTimeConfig); + + /** + * 新增时间配置 + * + * @param emsStrategyTimeConfig 时间配置 + * @return 结果 + */ + public int insertEmsStrategyTimeConfig(EmsStrategyTimeConfig emsStrategyTimeConfig); + + /** + * 修改时间配置 + * + * @param emsStrategyTimeConfig 时间配置 + * @return 结果 + */ + public int updateEmsStrategyTimeConfig(EmsStrategyTimeConfig emsStrategyTimeConfig); + + /** + * 批量删除时间配置 + * + * @param ids 需要删除的时间配置主键集合 + * @return 结果 + */ + public int deleteEmsStrategyTimeConfigByIds(Long[] ids); + + /** + * 删除时间配置信息 + * + * @param id 时间配置主键 + * @return 结果 + */ + public int deleteEmsStrategyTimeConfigById(Long id); +} diff --git a/ems-system/src/main/java/com/xzzn/ems/service/impl/EmsStrategyCurveServiceImpl.java b/ems-system/src/main/java/com/xzzn/ems/service/impl/EmsStrategyCurveServiceImpl.java new file mode 100644 index 0000000..62a0bb2 --- /dev/null +++ b/ems-system/src/main/java/com/xzzn/ems/service/impl/EmsStrategyCurveServiceImpl.java @@ -0,0 +1,96 @@ +package com.xzzn.ems.service.impl; + +import java.util.List; +import com.xzzn.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.xzzn.ems.mapper.EmsStrategyCurveMapper; +import com.xzzn.ems.domain.EmsStrategyCurve; +import com.xzzn.ems.service.IEmsStrategyCurveService; + +/** + * 策曲线Service业务层处理 + * + * @author xzzn + * @date 2025-07-11 + */ +@Service +public class EmsStrategyCurveServiceImpl implements IEmsStrategyCurveService +{ + @Autowired + private EmsStrategyCurveMapper emsStrategyCurveMapper; + + /** + * 查询策曲线 + * + * @param id 策曲线主键 + * @return 策曲线 + */ + @Override + public EmsStrategyCurve selectEmsStrategyCurveById(Long id) + { + return emsStrategyCurveMapper.selectEmsStrategyCurveById(id); + } + + /** + * 查询策曲线列表 + * + * @param emsStrategyCurve 策曲线 + * @return 策曲线 + */ + @Override + public List selectEmsStrategyCurveList(EmsStrategyCurve emsStrategyCurve) + { + return emsStrategyCurveMapper.selectEmsStrategyCurveList(emsStrategyCurve); + } + + /** + * 新增策曲线 + * + * @param emsStrategyCurve 策曲线 + * @return 结果 + */ + @Override + public int insertEmsStrategyCurve(EmsStrategyCurve emsStrategyCurve) + { + emsStrategyCurve.setCreateTime(DateUtils.getNowDate()); + return emsStrategyCurveMapper.insertEmsStrategyCurve(emsStrategyCurve); + } + + /** + * 修改策曲线 + * + * @param emsStrategyCurve 策曲线 + * @return 结果 + */ + @Override + public int updateEmsStrategyCurve(EmsStrategyCurve emsStrategyCurve) + { + emsStrategyCurve.setUpdateTime(DateUtils.getNowDate()); + return emsStrategyCurveMapper.updateEmsStrategyCurve(emsStrategyCurve); + } + + /** + * 批量删除策曲线 + * + * @param ids 需要删除的策曲线主键 + * @return 结果 + */ + @Override + public int deleteEmsStrategyCurveByIds(Long[] ids) + { + return emsStrategyCurveMapper.deleteEmsStrategyCurveByIds(ids); + } + + /** + * 删除策曲线信息 + * + * @param id 策曲线主键 + * @return 结果 + */ + @Override + public int deleteEmsStrategyCurveById(Long id) + { + return emsStrategyCurveMapper.deleteEmsStrategyCurveById(id); + } +} diff --git a/ems-system/src/main/java/com/xzzn/ems/service/impl/EmsStrategyTempServiceImpl.java b/ems-system/src/main/java/com/xzzn/ems/service/impl/EmsStrategyTempServiceImpl.java new file mode 100644 index 0000000..8e426fe --- /dev/null +++ b/ems-system/src/main/java/com/xzzn/ems/service/impl/EmsStrategyTempServiceImpl.java @@ -0,0 +1,101 @@ +package com.xzzn.ems.service.impl; + +import java.util.List; +import com.xzzn.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.xzzn.ems.mapper.EmsStrategyTempMapper; +import com.xzzn.ems.domain.EmsStrategyTemp; +import com.xzzn.ems.service.IEmsStrategyTempService; + +/** + * 模板Service业务层处理 + * + * @author xzzn + * @date 2025-07-11 + */ +@Service +public class EmsStrategyTempServiceImpl implements IEmsStrategyTempService +{ + @Autowired + private EmsStrategyTempMapper emsStrategyTempMapper; + + /** + * 查询模板 + * + * @param id 模板主键 + * @return 模板 + */ + @Override + public EmsStrategyTemp selectEmsStrategyTempById(Long id) + { + return emsStrategyTempMapper.selectEmsStrategyTempById(id); + } + + /** + * 查询模板列表 + * + * @param emsStrategyTemp 模板 + * @return 模板 + */ + @Override + public List selectEmsStrategyTempList(EmsStrategyTemp emsStrategyTemp) + { + return emsStrategyTempMapper.selectEmsStrategyTempList(emsStrategyTemp); + } + + /** + * 新增模板 + * + * @param emsStrategyTemp 模板 + * @return 结果 + */ + @Override + public int insertEmsStrategyTemp(EmsStrategyTemp emsStrategyTemp) + { + emsStrategyTemp.setCreateTime(DateUtils.getNowDate()); + return emsStrategyTempMapper.insertEmsStrategyTemp(emsStrategyTemp); + } + + /** + * 修改模板 + * + * @param emsStrategyTemp 模板 + * @return 结果 + */ + @Override + public int updateEmsStrategyTemp(EmsStrategyTemp emsStrategyTemp) + { + emsStrategyTemp.setUpdateTime(DateUtils.getNowDate()); + return emsStrategyTempMapper.updateEmsStrategyTemp(emsStrategyTemp); + } + + /** + * 批量删除模板 + * + * @param ids 需要删除的模板主键 + * @return 结果 + */ + @Override + public int deleteEmsStrategyTempByIds(Long[] ids) + { + return emsStrategyTempMapper.deleteEmsStrategyTempByIds(ids); + } + + /** + * 删除模板信息 + * + * @param id 模板主键 + * @return 结果 + */ + @Override + public int deleteEmsStrategyTempById(Long id) + { + return emsStrategyTempMapper.deleteEmsStrategyTempById(id); + } + + @Override + public List getTempNameList(Long strategyId, String siteId) { + return emsStrategyTempMapper.getTempNameList(strategyId, siteId); + } +} diff --git a/ems-system/src/main/java/com/xzzn/ems/service/impl/EmsStrategyTimeConfigServiceImpl.java b/ems-system/src/main/java/com/xzzn/ems/service/impl/EmsStrategyTimeConfigServiceImpl.java new file mode 100644 index 0000000..fb35ed4 --- /dev/null +++ b/ems-system/src/main/java/com/xzzn/ems/service/impl/EmsStrategyTimeConfigServiceImpl.java @@ -0,0 +1,96 @@ +package com.xzzn.ems.service.impl; + +import java.util.List; +import com.xzzn.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.xzzn.ems.mapper.EmsStrategyTimeConfigMapper; +import com.xzzn.ems.domain.EmsStrategyTimeConfig; +import com.xzzn.ems.service.IEmsStrategyTimeConfigService; + +/** + * 时间配置Service业务层处理 + * + * @author xzzn + * @date 2025-07-11 + */ +@Service +public class EmsStrategyTimeConfigServiceImpl implements IEmsStrategyTimeConfigService +{ + @Autowired + private EmsStrategyTimeConfigMapper emsStrategyTimeConfigMapper; + + /** + * 查询时间配置 + * + * @param id 时间配置主键 + * @return 时间配置 + */ + @Override + public EmsStrategyTimeConfig selectEmsStrategyTimeConfigById(Long id) + { + return emsStrategyTimeConfigMapper.selectEmsStrategyTimeConfigById(id); + } + + /** + * 查询时间配置列表 + * + * @param emsStrategyTimeConfig 时间配置 + * @return 时间配置 + */ + @Override + public List selectEmsStrategyTimeConfigList(EmsStrategyTimeConfig emsStrategyTimeConfig) + { + return emsStrategyTimeConfigMapper.selectEmsStrategyTimeConfigList(emsStrategyTimeConfig); + } + + /** + * 新增时间配置 + * + * @param emsStrategyTimeConfig 时间配置 + * @return 结果 + */ + @Override + public int insertEmsStrategyTimeConfig(EmsStrategyTimeConfig emsStrategyTimeConfig) + { + emsStrategyTimeConfig.setCreateTime(DateUtils.getNowDate()); + return emsStrategyTimeConfigMapper.insertEmsStrategyTimeConfig(emsStrategyTimeConfig); + } + + /** + * 修改时间配置 + * + * @param emsStrategyTimeConfig 时间配置 + * @return 结果 + */ + @Override + public int updateEmsStrategyTimeConfig(EmsStrategyTimeConfig emsStrategyTimeConfig) + { + emsStrategyTimeConfig.setUpdateTime(DateUtils.getNowDate()); + return emsStrategyTimeConfigMapper.updateEmsStrategyTimeConfig(emsStrategyTimeConfig); + } + + /** + * 批量删除时间配置 + * + * @param ids 需要删除的时间配置主键 + * @return 结果 + */ + @Override + public int deleteEmsStrategyTimeConfigByIds(Long[] ids) + { + return emsStrategyTimeConfigMapper.deleteEmsStrategyTimeConfigByIds(ids); + } + + /** + * 删除时间配置信息 + * + * @param id 时间配置主键 + * @return 结果 + */ + @Override + public int deleteEmsStrategyTimeConfigById(Long id) + { + return emsStrategyTimeConfigMapper.deleteEmsStrategyTimeConfigById(id); + } +} diff --git a/ems-system/src/main/resources/mapper/ems/EmsStrategyCurveMapper.xml b/ems-system/src/main/resources/mapper/ems/EmsStrategyCurveMapper.xml new file mode 100644 index 0000000..21666b5 --- /dev/null +++ b/ems-system/src/main/resources/mapper/ems/EmsStrategyCurveMapper.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + select id, strategy_id, task_number, start_date, end_date, power_data, create_by, create_time, update_by, update_time, remark, site_id from ems_strategy_curve + + + + + + + + insert into ems_strategy_curve + + strategy_id, + task_number, + start_date, + end_date, + power_data, + create_by, + create_time, + update_by, + update_time, + remark, + site_id, + + + #{strategyId}, + #{taskNumber}, + #{startDate}, + #{endDate}, + #{powerData}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{siteId}, + + + + + update ems_strategy_curve + + strategy_id = #{strategyId}, + task_number = #{taskNumber}, + start_date = #{startDate}, + end_date = #{endDate}, + power_data = #{powerData}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + site_id = #{siteId}, + + where id = #{id} + + + + delete from ems_strategy_curve where id = #{id} + + + + delete from ems_strategy_curve where id in + + #{id} + + + \ No newline at end of file diff --git a/ems-system/src/main/resources/mapper/ems/EmsStrategyTempMapper.xml b/ems-system/src/main/resources/mapper/ems/EmsStrategyTempMapper.xml new file mode 100644 index 0000000..886c4a0 --- /dev/null +++ b/ems-system/src/main/resources/mapper/ems/EmsStrategyTempMapper.xml @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select id, strategy_id, template_name, sdc_limit, sdc_down, sdc_up, start_time, end_time, charge_discharge_power, charge_status, create_by, create_time, update_by, update_time, remark, site_id from ems_strategy_temp + + + + + + + + insert into ems_strategy_temp + + strategy_id, + template_name, + sdc_limit, + sdc_down, + sdc_up, + start_time, + end_time, + charge_discharge_power, + charge_status, + create_by, + create_time, + update_by, + update_time, + remark, + site_id, + + + #{strategyId}, + #{templateName}, + #{sdcLimit}, + #{sdcDown}, + #{sdcUp}, + #{startTime}, + #{endTime}, + #{chargeDischargePower}, + #{chargeStatus}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{siteId}, + + + + + update ems_strategy_temp + + strategy_id = #{strategyId}, + template_name = #{templateName}, + sdc_limit = #{sdcLimit}, + sdc_down = #{sdcDown}, + sdc_up = #{sdcUp}, + start_time = #{startTime}, + end_time = #{endTime}, + charge_discharge_power = #{chargeDischargePower}, + charge_status = #{chargeStatus}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + site_id = #{siteId}, + + where id = #{id} + + + + delete from ems_strategy_temp where id = #{id} + + + + delete from ems_strategy_temp where id in + + #{id} + + + + + \ No newline at end of file diff --git a/ems-system/src/main/resources/mapper/ems/EmsStrategyTimeConfigMapper.xml b/ems-system/src/main/resources/mapper/ems/EmsStrategyTimeConfigMapper.xml new file mode 100644 index 0000000..6408e38 --- /dev/null +++ b/ems-system/src/main/resources/mapper/ems/EmsStrategyTimeConfigMapper.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + select id, strategy_id, month, charge_discharge_mode, create_by, create_time, update_by, update_time, remark, site_id from ems_strategy_time_config + + + + + + + + insert into ems_strategy_time_config + + strategy_id, + month, + charge_discharge_mode, + create_by, + create_time, + update_by, + update_time, + remark, + site_id, + + + #{strategyId}, + #{month}, + #{chargeDischargeMode}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{siteId}, + + + + + update ems_strategy_time_config + + strategy_id = #{strategyId}, + month = #{month}, + charge_discharge_mode = #{chargeDischargeMode}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + site_id = #{siteId}, + + where id = #{id} + + + + delete from ems_strategy_time_config where id = #{id} + + + + delete from ems_strategy_time_config where id in + + #{id} + + + \ No newline at end of file