Commit 708e97a1 authored by ZWT's avatar ZWT

feat(能源管理系统): 系统开发

1.删除deploy-pps-task模块错误依赖项,解决pom文件依赖引用异常导致项目编译失败问题;
2.参照原型,设计并创建基础信息配置模块所需要的表:base_wellhead
井口配置表,base_photovoltaic_plant
光伏电站表,base_diesel_generator
柴发设备表,base_energy_storage_device
储能设备表,base_price_strategy
市电峰谷表,base_price_strategy_month
市电峰谷月配置表,base_price_strategy_detail
市电峰谷当月明细配置表,base_power_line
输电线路配置,base_power_line_wellhead
输电线路井口配置,base_power_line_plant
输电线路光伏配置,base_power_line_storage
输电线路储能配置,base_power_line_diesel
输电线路柴发设备配置;
3.通过使用代码生成工具根据基础信息配置模块新建数据表生成entity,mapper及service包对应代码,同时导入系统base模块,解决代码导入后编译失败问题,项目编译通过后提交代码;
4.开发基础信息配置-市电峰谷配置模块新增功能,完成接口冒烟测试并生成接口文档;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent fe76795d
package pps.core.base.entity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 市电峰谷当月明细配置
*
* @author ZWT
* @date 2023/08/24
*/
@Data
@TableName("base_price_strategy_detail")
public class BasePriceStrategyDetailEnt implements Serializable {
@XText("ID")
@TableId(type = IdType.AUTO)
@TableId(type = IdType.ASSIGN_UUID)
private String id;
@XText("是否删除(0_是;1_否)")
......@@ -47,9 +56,10 @@ public class BasePriceStrategyDetailEnt implements Serializable {
@TableField
private String strategyId;
@XText("市电峰谷月ID")
@XText("市电峰谷月")
@TableField
private String strategyMonthId;
private Integer strategyMonth;
;
@XText("时段类型key(字典获取)")
@TableField
......@@ -70,125 +80,4 @@ public class BasePriceStrategyDetailEnt implements Serializable {
@XText("内部结算价")
@TableField
private BigDecimal internalSettlementPrice;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public Integer getIsDeleted() {
return this.isDeleted;
}
public void setIsDeleted(Integer value) {
this.isDeleted = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public String getStrategyId() {
return this.strategyId;
}
public void setStrategyId(String value) {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
}
public String getPeriodTypeKey() {
return this.periodTypeKey;
}
public void setPeriodTypeKey(String value) {
this.periodTypeKey = value;
}
public Date getStartTime() {
return this.startTime;
}
public void setStartTime(Date value) {
this.startTime = value;
}
public Date getEndTime() {
return this.endTime;
}
public void setEndTime(Date value) {
this.endTime = value;
}
public BigDecimal getElectrovalence() {
return this.electrovalence;
}
public void setElectrovalence(BigDecimal value) {
this.electrovalence = value;
}
public BigDecimal getInternalSettlementPrice() {
return this.internalSettlementPrice;
}
public void setInternalSettlementPrice(BigDecimal value) {
this.internalSettlementPrice = value;
}
}
package pps.core.base.entity;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class BasePriceStrategyDetailView implements Serializable {
@XText("ID")
@TableField
......@@ -43,9 +46,10 @@ public class BasePriceStrategyDetailView implements Serializable {
@TableField
private String strategyId;
@XText("市电峰谷月ID")
@XText("市电峰谷月")
@TableField
private String strategyMonthId;
private Integer strategyMonth;
;
@XText("时段类型key(字典获取)")
@TableField
......@@ -66,125 +70,4 @@ public class BasePriceStrategyDetailView implements Serializable {
@XText("内部结算价")
@TableField
private BigDecimal internalSettlementPrice;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public Integer getIsDeleted() {
return this.isDeleted;
}
public void setIsDeleted(Integer value) {
this.isDeleted = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public String getStrategyId() {
return this.strategyId;
}
public void setStrategyId(String value) {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
}
public String getPeriodTypeKey() {
return this.periodTypeKey;
}
public void setPeriodTypeKey(String value) {
this.periodTypeKey = value;
}
public Date getStartTime() {
return this.startTime;
}
public void setStartTime(Date value) {
this.startTime = value;
}
public Date getEndTime() {
return this.endTime;
}
public void setEndTime(Date value) {
this.endTime = value;
}
public BigDecimal getElectrovalence() {
return this.electrovalence;
}
public void setElectrovalence(BigDecimal value) {
this.electrovalence = value;
}
public BigDecimal getInternalSettlementPrice() {
return this.internalSettlementPrice;
}
public void setInternalSettlementPrice(BigDecimal value) {
this.internalSettlementPrice = value;
}
}
package pps.core.base.entity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 市电峰谷策略
*
* @author ZWT
* @date 2023/08/24
*/
@Data
@TableName("base_price_strategy")
public class BasePriceStrategyEnt implements Serializable {
@XText("ID")
@TableId(type = IdType.AUTO)
@TableId(type = IdType.ASSIGN_UUID)
private String id;
@XText("是否删除(0_是;1_否)")
......@@ -62,109 +72,4 @@ public class BasePriceStrategyEnt implements Serializable {
@XText("固定电价")
@TableField
private BigDecimal fixedElectricityPrice;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public Integer getIsDeleted() {
return this.isDeleted;
}
public void setIsDeleted(Integer value) {
this.isDeleted = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public String getPolicyName() {
return this.policyName;
}
public void setPolicyName(String value) {
this.policyName = value;
}
public String getAreaCode() {
return this.areaCode;
}
public void setAreaCode(String value) {
this.areaCode = value;
}
public Integer getStrategyYear() {
return this.strategyYear;
}
public void setStrategyYear(Integer value) {
this.strategyYear = value;
}
public Integer getIsFixedPrice() {
return this.isFixedPrice;
}
public void setIsFixedPrice(Integer value) {
this.isFixedPrice = value;
}
public BigDecimal getFixedElectricityPrice() {
return this.fixedElectricityPrice;
}
public void setFixedElectricityPrice(BigDecimal value) {
this.fixedElectricityPrice = value;
}
}
package pps.core.base.entity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
/**
* 市电峰谷月配置表
*
* @author ZWT
* @date 2023/08/24
*/
@Data
@TableName("base_price_strategy_month")
public class BasePriceStrategyMonthEnt implements Serializable {
@XText("ID")
@TableId(type = IdType.AUTO)
@TableId(type = IdType.ASSIGN_UUID)
private String id;
@XText("是否删除(0_是;1_否)")
......@@ -50,85 +58,4 @@ public class BasePriceStrategyMonthEnt implements Serializable {
@XText("市电峰谷月(1-12)")
@TableField
private Integer strategyMonth;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public Integer getIsDeleted() {
return this.isDeleted;
}
public void setIsDeleted(Integer value) {
this.isDeleted = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public String getStrategyId() {
return this.strategyId;
}
public void setStrategyId(String value) {
this.strategyId = value;
}
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
}
......@@ -4,6 +4,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import pps.core.base.entity.BasePriceStrategyDetailEnt;
@Repository(value="pps.core.base.mapper.BasePriceStrategyDetailMapper")
/**
* 市电峰谷当月明细配置
*
* @author ZWT
* @date 2023/08/24
*/
@Repository(value = "pps.core.base.mapper.BasePriceStrategyDetailMapper")
public interface BasePriceStrategyDetailMapper extends BaseMapper<BasePriceStrategyDetailEnt> {
}
package pps.core.base.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import pps.core.base.entity.BasePriceStrategyDetailView;
import java.util.List;
@Repository(value="pps.core.base.mapper.BasePriceStrategyDetailViewMapper")
/**
* 市电峰谷当月明细配置
*
* @author ZWT
* @date 2023/08/24
*/
@Repository(value = "pps.core.base.mapper.BasePriceStrategyDetailViewMapper")
public interface BasePriceStrategyDetailViewMapper {
BasePriceStrategyDetailView selectOne(BasePriceStrategyDetailView record);
List<BasePriceStrategyDetailView> selectList(BasePriceStrategyDetailView record);
}
......@@ -4,6 +4,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import pps.core.base.entity.BasePriceStrategyEnt;
@Repository(value="pps.core.base.mapper.BasePriceStrategyMapper")
/**
* 市电峰谷策略
*
* @author ZWT
* @date 2023/08/24
*/
@Repository(value = "pps.core.base.mapper.BasePriceStrategyMapper")
public interface BasePriceStrategyMapper extends BaseMapper<BasePriceStrategyEnt> {
}
......@@ -4,6 +4,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import pps.core.base.entity.BasePriceStrategyMonthEnt;
@Repository(value="pps.core.base.mapper.BasePriceStrategyMonthMapper")
/**
* 市电峰谷月配置
*
* @author ZWT
* @date 2023/08/24
*/
@Repository(value = "pps.core.base.mapper.BasePriceStrategyMonthMapper")
public interface BasePriceStrategyMonthMapper extends BaseMapper<BasePriceStrategyMonthEnt> {
}
......@@ -9,6 +9,7 @@ import pps.core.base.mapper.BasePowerLineMapper;
import pps.core.base.mapper.BasePowerLineViewMapper;
import pps.core.base.service.data.base_power_line.*;
import xstartup.annotation.XService;
import xstartup.annotation.XText;
import xstartup.base.XContext;
import xstartup.base.data.CustomQueryInput;
import xstartup.base.util.XCopyUtils;
......@@ -23,7 +24,14 @@ import xstartup.feature.mybatis.helper.XMapperHelper;
import java.util.List;
/**
* 输电线路配置模块
*
* @author ZWT
* @date 2023/08/24
*/
@XService
@XText("输电线路配置模块")
public class BasePowerLineService {
@XApiAnonymous
@XApiPost
......
package pps.core.base.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import pps.core.base.entity.BasePriceStrategyDetailEnt;
import pps.core.base.entity.BasePriceStrategyDetailView;
import pps.core.base.mapper.BasePriceStrategyDetailMapper;
import pps.core.base.mapper.BasePriceStrategyDetailViewMapper;
import pps.core.base.service.data.base_price_strategy_detail.*;
import xstartup.annotation.XService;
import xstartup.base.XContext;
import xstartup.base.data.CustomQueryInput;
import xstartup.base.util.XCopyUtils;
import xstartup.data.XPageResult;
import xstartup.data.XServiceResult;
import xstartup.data.XSingleResult;
import xstartup.error.XError;
import xstartup.feature.api.annotation.XApiAnonymous;
import xstartup.feature.api.annotation.XApiGet;
import xstartup.feature.api.annotation.XApiPost;
import xstartup.feature.mybatis.helper.XMapperHelper;
import java.util.List;
@XService
public class BasePriceStrategyDetailService {
@XApiAnonymous
@XApiPost
public XServiceResult createBasePriceStrategyDetail(XContext context, CreateBasePriceStrategyDetailInput input) {
BasePriceStrategyDetailMapper mapper = context.getBean(BasePriceStrategyDetailMapper.class);
BasePriceStrategyDetailEnt entity = new BasePriceStrategyDetailEnt();
XCopyUtils.copyObject(input, entity);
mapper.insert(entity);
return XServiceResult.OK;
}
@XApiAnonymous
@XApiPost
public XServiceResult updateBasePriceStrategyDetail(XContext context, UpdateBasePriceStrategyDetailInput input) {
BasePriceStrategyDetailMapper mapper = context.getBean(BasePriceStrategyDetailMapper.class);
QueryWrapper<BasePriceStrategyDetailEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BasePriceStrategyDetailEnt::getId, input.getId());
BasePriceStrategyDetailEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XServiceResult.error(context, XError.NotFound);
}
XCopyUtils.copyObject(input, entity);
mapper.updateById(entity);
return XServiceResult.OK;
}
@XApiAnonymous
@XApiPost
public XServiceResult deleteBasePriceStrategyDetail(XContext context, DeleteBasePriceStrategyDetailInput input) {
BasePriceStrategyDetailMapper mapper = context.getBean(BasePriceStrategyDetailMapper.class);
QueryWrapper<BasePriceStrategyDetailEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BasePriceStrategyDetailEnt::getId, input.getId());
BasePriceStrategyDetailEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XServiceResult.error(context, XError.NotFound);
}
mapper.deleteById(entity);
return XServiceResult.OK;
}
@XApiAnonymous
@XApiGet
public XSingleResult<GetBasePriceStrategyDetailOutput> getBasePriceStrategyDetail(XContext context, GetBasePriceStrategyDetailInput input) {
BasePriceStrategyDetailMapper mapper = context.getBean(BasePriceStrategyDetailMapper.class);
QueryWrapper<BasePriceStrategyDetailEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BasePriceStrategyDetailEnt::getId, input.getId());
BasePriceStrategyDetailEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XSingleResult.error(context, XError.NotFound);
}
GetBasePriceStrategyDetailOutput output = new GetBasePriceStrategyDetailOutput();
XCopyUtils.copyObject(entity, output);
return XSingleResult.success(output);
}
@XApiAnonymous
@XApiGet
public XPageResult<QueryBasePriceStrategyDetailOutput> queryBasePriceStrategyDetail(XContext context, QueryBasePriceStrategyDetailInput input) {
BasePriceStrategyDetailMapper mapper = context.getBean(BasePriceStrategyDetailMapper.class);
QueryWrapper<BasePriceStrategyDetailEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().like(BasePriceStrategyDetailEnt::getId, input.getId())
.eq(BasePriceStrategyDetailEnt::getIsDeleted, input.getIsDeleted())
.like(BasePriceStrategyDetailEnt::getCreateById, input.getCreateById())
.like(BasePriceStrategyDetailEnt::getCreateByName, input.getCreateByName())
.eq(BasePriceStrategyDetailEnt::getCreateTime, input.getCreateTime())
.like(BasePriceStrategyDetailEnt::getModifyById, input.getModifyById())
.like(BasePriceStrategyDetailEnt::getModifyByName, input.getModifyByName())
.eq(BasePriceStrategyDetailEnt::getModifyTime, input.getModifyTime())
.like(BasePriceStrategyDetailEnt::getStrategyId, input.getStrategyId())
.like(BasePriceStrategyDetailEnt::getStrategyMonthId, input.getStrategyMonthId())
.like(BasePriceStrategyDetailEnt::getPeriodTypeKey, input.getPeriodTypeKey())
.eq(BasePriceStrategyDetailEnt::getStartTime, input.getStartTime())
.eq(BasePriceStrategyDetailEnt::getEndTime, input.getEndTime())
.eq(BasePriceStrategyDetailEnt::getElectrovalence, input.getElectrovalence())
.eq(BasePriceStrategyDetailEnt::getInternalSettlementPrice, input.getInternalSettlementPrice());
return XMapperHelper.query(mapper, input, queryWrapper, QueryBasePriceStrategyDetailOutput.class);
}
@XApiAnonymous
@XApiGet
public XPageResult<QueryBasePriceStrategyDetailOutput> dynamicQueryBasePriceStrategyDetail(XContext context, CustomQueryInput input) {
BasePriceStrategyDetailMapper mapper = context.getBean(BasePriceStrategyDetailMapper.class);
return XMapperHelper.query(mapper, input, BasePriceStrategyDetailEnt.class, QueryBasePriceStrategyDetailOutput.class);
}
@XApiAnonymous
@XApiGet
public XSingleResult<GetBasePriceStrategyDetailViewOutput> getBasePriceStrategyDetailView(XContext context, GetBasePriceStrategyDetailViewInput input) {
BasePriceStrategyDetailViewMapper mapper = context.getBean(BasePriceStrategyDetailViewMapper.class);
BasePriceStrategyDetailView record = new BasePriceStrategyDetailView();
XCopyUtils.copyObject(input, record);
BasePriceStrategyDetailView view = mapper.selectOne(record);
if (view == null) {
return XSingleResult.error(context, XError.NotFound);
}
GetBasePriceStrategyDetailViewOutput output = new GetBasePriceStrategyDetailViewOutput();
XCopyUtils.copyObject(view, output);
return XSingleResult.success(output);
}
@XApiAnonymous
@XApiGet
public XPageResult<QueryBasePriceStrategyDetailViewOutput> queryBasePriceStrategyDetailView(XContext context, QueryBasePriceStrategyDetailViewInput input) {
BasePriceStrategyDetailViewMapper mapper = context.getBean(BasePriceStrategyDetailViewMapper.class);
BasePriceStrategyDetailView record = new BasePriceStrategyDetailView();
XCopyUtils.copyObject(input, record);
PageHelper.startPage(input.getPage(), input.getLimit());
List<BasePriceStrategyDetailView> list = mapper.selectList(record);
PageInfo<BasePriceStrategyDetailView> pageInfo = new PageInfo<>(list);
List<QueryBasePriceStrategyDetailViewOutput> outputs = XCopyUtils.copyNewList(pageInfo.getList(), QueryBasePriceStrategyDetailViewOutput.class);
return XPageResult.success(outputs, input, pageInfo.getTotal());
}
}
package pps.core.base.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import pps.core.base.entity.BasePriceStrategyMonthEnt;
import pps.core.base.entity.BasePriceStrategyMonthView;
import pps.core.base.mapper.BasePriceStrategyMonthMapper;
import pps.core.base.mapper.BasePriceStrategyMonthViewMapper;
import pps.core.base.service.data.base_price_strategy_month.*;
import xstartup.annotation.XService;
import xstartup.base.XContext;
import xstartup.base.data.CustomQueryInput;
import xstartup.base.util.XCopyUtils;
import xstartup.data.XPageResult;
import xstartup.data.XServiceResult;
import xstartup.data.XSingleResult;
import xstartup.error.XError;
import xstartup.feature.api.annotation.XApiAnonymous;
import xstartup.feature.api.annotation.XApiGet;
import xstartup.feature.api.annotation.XApiPost;
import xstartup.feature.mybatis.helper.XMapperHelper;
import java.util.List;
@XService
public class BasePriceStrategyMonthService {
@XApiAnonymous
@XApiPost
public XServiceResult createBasePriceStrategyMonth(XContext context, CreateBasePriceStrategyMonthInput input) {
BasePriceStrategyMonthMapper mapper = context.getBean(BasePriceStrategyMonthMapper.class);
BasePriceStrategyMonthEnt entity = new BasePriceStrategyMonthEnt();
XCopyUtils.copyObject(input, entity);
mapper.insert(entity);
return XServiceResult.OK;
}
@XApiAnonymous
@XApiPost
public XServiceResult updateBasePriceStrategyMonth(XContext context, UpdateBasePriceStrategyMonthInput input) {
BasePriceStrategyMonthMapper mapper = context.getBean(BasePriceStrategyMonthMapper.class);
QueryWrapper<BasePriceStrategyMonthEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BasePriceStrategyMonthEnt::getId, input.getId());
BasePriceStrategyMonthEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XServiceResult.error(context, XError.NotFound);
}
XCopyUtils.copyObject(input, entity);
mapper.updateById(entity);
return XServiceResult.OK;
}
@XApiAnonymous
@XApiPost
public XServiceResult deleteBasePriceStrategyMonth(XContext context, DeleteBasePriceStrategyMonthInput input) {
BasePriceStrategyMonthMapper mapper = context.getBean(BasePriceStrategyMonthMapper.class);
QueryWrapper<BasePriceStrategyMonthEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BasePriceStrategyMonthEnt::getId, input.getId());
BasePriceStrategyMonthEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XServiceResult.error(context, XError.NotFound);
}
mapper.deleteById(entity);
return XServiceResult.OK;
}
@XApiAnonymous
@XApiGet
public XSingleResult<GetBasePriceStrategyMonthOutput> getBasePriceStrategyMonth(XContext context, GetBasePriceStrategyMonthInput input) {
BasePriceStrategyMonthMapper mapper = context.getBean(BasePriceStrategyMonthMapper.class);
QueryWrapper<BasePriceStrategyMonthEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BasePriceStrategyMonthEnt::getId, input.getId());
BasePriceStrategyMonthEnt entity = mapper.selectOne(queryWrapper);
if (entity == null) {
return XSingleResult.error(context, XError.NotFound);
}
GetBasePriceStrategyMonthOutput output = new GetBasePriceStrategyMonthOutput();
XCopyUtils.copyObject(entity, output);
return XSingleResult.success(output);
}
@XApiAnonymous
@XApiGet
public XPageResult<QueryBasePriceStrategyMonthOutput> queryBasePriceStrategyMonth(XContext context, QueryBasePriceStrategyMonthInput input) {
BasePriceStrategyMonthMapper mapper = context.getBean(BasePriceStrategyMonthMapper.class);
QueryWrapper<BasePriceStrategyMonthEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().like(BasePriceStrategyMonthEnt::getId, input.getId())
.eq(BasePriceStrategyMonthEnt::getIsDeleted, input.getIsDeleted())
.like(BasePriceStrategyMonthEnt::getCreateById, input.getCreateById())
.like(BasePriceStrategyMonthEnt::getCreateByName, input.getCreateByName())
.eq(BasePriceStrategyMonthEnt::getCreateTime, input.getCreateTime())
.like(BasePriceStrategyMonthEnt::getModifyById, input.getModifyById())
.like(BasePriceStrategyMonthEnt::getModifyByName, input.getModifyByName())
.eq(BasePriceStrategyMonthEnt::getModifyTime, input.getModifyTime())
.like(BasePriceStrategyMonthEnt::getStrategyId, input.getStrategyId())
.eq(BasePriceStrategyMonthEnt::getStrategyMonth, input.getStrategyMonth());
return XMapperHelper.query(mapper, input, queryWrapper, QueryBasePriceStrategyMonthOutput.class);
}
@XApiAnonymous
@XApiGet
public XPageResult<QueryBasePriceStrategyMonthOutput> dynamicQueryBasePriceStrategyMonth(XContext context, CustomQueryInput input) {
BasePriceStrategyMonthMapper mapper = context.getBean(BasePriceStrategyMonthMapper.class);
return XMapperHelper.query(mapper, input, BasePriceStrategyMonthEnt.class, QueryBasePriceStrategyMonthOutput.class);
}
@XApiAnonymous
@XApiGet
public XSingleResult<GetBasePriceStrategyMonthViewOutput> getBasePriceStrategyMonthView(XContext context, GetBasePriceStrategyMonthViewInput input) {
BasePriceStrategyMonthViewMapper mapper = context.getBean(BasePriceStrategyMonthViewMapper.class);
BasePriceStrategyMonthView record = new BasePriceStrategyMonthView();
XCopyUtils.copyObject(input, record);
BasePriceStrategyMonthView view = mapper.selectOne(record);
if (view == null) {
return XSingleResult.error(context, XError.NotFound);
}
GetBasePriceStrategyMonthViewOutput output = new GetBasePriceStrategyMonthViewOutput();
XCopyUtils.copyObject(view, output);
return XSingleResult.success(output);
}
@XApiAnonymous
@XApiGet
public XPageResult<QueryBasePriceStrategyMonthViewOutput> queryBasePriceStrategyMonthView(XContext context, QueryBasePriceStrategyMonthViewInput input) {
BasePriceStrategyMonthViewMapper mapper = context.getBean(BasePriceStrategyMonthViewMapper.class);
BasePriceStrategyMonthView record = new BasePriceStrategyMonthView();
XCopyUtils.copyObject(input, record);
PageHelper.startPage(input.getPage(), input.getLimit());
List<BasePriceStrategyMonthView> list = mapper.selectList(record);
PageInfo<BasePriceStrategyMonthView> pageInfo = new PageInfo<>(list);
List<QueryBasePriceStrategyMonthViewOutput> outputs = XCopyUtils.copyNewList(pageInfo.getList(), QueryBasePriceStrategyMonthViewOutput.class);
return XPageResult.success(outputs, input, pageInfo.getTotal());
}
}
......@@ -3,14 +3,24 @@ package pps.core.base.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import pps.core.base.entity.BasePriceStrategyDetailEnt;
import pps.core.base.entity.BasePriceStrategyEnt;
import pps.core.base.entity.BasePriceStrategyMonthEnt;
import pps.core.base.entity.BasePriceStrategyView;
import pps.core.base.mapper.BasePriceStrategyDetailMapper;
import pps.core.base.mapper.BasePriceStrategyMapper;
import pps.core.base.mapper.BasePriceStrategyMonthMapper;
import pps.core.base.mapper.BasePriceStrategyViewMapper;
import pps.core.base.service.data.base_price_strategy.*;
import pps.core.base.service.data.base_price_strategy_detail.CreateBasePriceStrategyDetailInput;
import pps.core.base.service.data.base_price_strategy_month.CreateBasePriceStrategyMonthInput;
import pps.core.common.session.PpsUserSession;
import xstartup.annotation.XService;
import xstartup.annotation.XText;
import xstartup.base.XContext;
import xstartup.base.data.CustomQueryInput;
import xstartup.base.exception.XServiceException;
import xstartup.base.util.XCopyUtils;
import xstartup.data.XPageResult;
import xstartup.data.XServiceResult;
......@@ -20,19 +30,131 @@ import xstartup.feature.api.annotation.XApiAnonymous;
import xstartup.feature.api.annotation.XApiGet;
import xstartup.feature.api.annotation.XApiPost;
import xstartup.feature.mybatis.helper.XMapperHelper;
import xstartup.helper.XTransactionHelper;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
/**
* 市电峰谷配置模块
*
* @author ZWT
* @date 2023/08/24
*/
@XService
@XText("市电峰谷配置模块")
public class BasePriceStrategyService {
/**
* 创建市电峰谷策略
*
* @param context 上下文
* @param input 输入
* @return {@link XServiceResult}
*/
@XApiAnonymous
@XApiPost
@XText("创建市电峰谷策略")
public XServiceResult createBasePriceStrategy(XContext context, CreateBasePriceStrategyInput input) {
// PpsUserSession session = context.getSession(PpsUserSession.class);
PpsUserSession session = new PpsUserSession();
session.setId("123");
session.setUserName("ceshi");
return XTransactionHelper.begin(context, () -> {
BasePriceStrategyMapper mapper = context.getBean(BasePriceStrategyMapper.class);
BasePriceStrategyEnt entity = new BasePriceStrategyEnt();
XCopyUtils.copyObject(input, entity);
this.setBasePriceStrategyEntDefault(entity, session);
mapper.insert(entity);
String strategyId = entity.getId();
List<CreateBasePriceStrategyDetailInput> inputDetails = input.getDetails();
List<CreateBasePriceStrategyMonthInput> inputMonths = input.getMonths();
if (!inputMonths.isEmpty()) {
BasePriceStrategyMonthMapper monthMapper = context.getBean(BasePriceStrategyMonthMapper.class);
BasePriceStrategyDetailMapper detailMapper = context.getBean(BasePriceStrategyDetailMapper.class);
List<BasePriceStrategyMonthEnt> monthList = new ArrayList<>(16);
List<BasePriceStrategyDetailEnt> detailList = new ArrayList<>(32);
XCopyUtils.copyList(inputMonths, monthList, BasePriceStrategyMonthEnt.class);
XCopyUtils.copyList(inputDetails, detailList, BasePriceStrategyDetailEnt.class);
Integer strategyMonth;
for (BasePriceStrategyMonthEnt monthEnt : monthList) {
this.setBasePriceStrategyMonthEntDefault(monthEnt, strategyId, session);
monthMapper.insert(monthEnt);
strategyMonth = monthEnt.getStrategyMonth();
for (BasePriceStrategyDetailEnt detailEnt : detailList) {
this.setBasePriceStrategyDetailEntDefault(detailEnt, strategyId, strategyMonth, session);
detailMapper.insert(detailEnt);
}
}
} else {
if (!inputDetails.isEmpty()) {
throw new XServiceException("请选择月份");
}
}
return XServiceResult.OK;
});
}
/**
* 设置市电峰谷当月明细配置默认值
*
* @param entity 实体
* @param strategyId 战略id
* @param strategyMonth 战略月
* @param session 会话
*/
private void setBasePriceStrategyDetailEntDefault(BasePriceStrategyDetailEnt entity, String strategyId, Integer strategyMonth, PpsUserSession session) {
Date now = new Date();
entity.setId(UUID.randomUUID().toString());
entity.setStrategyId(strategyId);
entity.setStrategyMonth(strategyMonth);
entity.setCreateById(session.getId());
entity.setCreateByName(session.getUserName());
entity.setCreateTime(now);
entity.setModifyById(session.getId());
entity.setModifyByName(session.getUserName());
entity.setModifyTime(now);
}
/**
* 设置市电峰谷月配置默认值
*
* @param entity 实体
* @param strategyId 战略id
* @param session 会话
*/
private void setBasePriceStrategyMonthEntDefault(BasePriceStrategyMonthEnt entity, String strategyId, PpsUserSession session) {
Date now = new Date();
entity.setStrategyId(strategyId);
entity.setCreateById(session.getId());
entity.setCreateByName(session.getUserName());
entity.setCreateTime(now);
entity.setModifyById(session.getId());
entity.setModifyByName(session.getUserName());
entity.setModifyTime(now);
}
/**
* 设置市电峰谷策略默认值
*
* @param entity 实体
* @param session 会话
*/
private void setBasePriceStrategyEntDefault(BasePriceStrategyEnt entity, PpsUserSession session) {
String id = entity.getId();
Date now = new Date();
String userId = session.getId();
String userName = session.getUserName();
if (StringUtils.isEmpty(id)) {
entity.setCreateById(userId);
entity.setCreateByName(userName);
entity.setCreateTime(now);
}
entity.setModifyById(userId);
entity.setModifyByName(userName);
entity.setModifyTime(now);
}
@XApiAnonymous
......
package pps.core.base.service.data.base_price_strategy;
import jakarta.validation.Valid;
import lombok.Data;
import pps.core.base.service.data.base_price_strategy_detail.CreateBasePriceStrategyDetailInput;
import pps.core.base.service.data.base_price_strategy_month.CreateBasePriceStrategyMonthInput;
import xstartup.annotation.XText;
import java.util.Date;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* 市电峰谷配置入参
*
* @author ZWT
* @date 2023/08/24
*/
@Data
public class CreateBasePriceStrategyInput {
@XText("ID")
private String id;
......@@ -44,108 +58,15 @@ public class CreateBasePriceStrategyInput {
@XText("固定电价")
private BigDecimal fixedElectricityPrice;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public Integer getIsDeleted() {
return this.isDeleted;
}
public void setIsDeleted(Integer value) {
this.isDeleted = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public String getPolicyName() {
return this.policyName;
}
public void setPolicyName(String value) {
this.policyName = value;
}
public String getAreaCode() {
return this.areaCode;
}
public void setAreaCode(String value) {
this.areaCode = value;
}
public Integer getStrategyYear() {
return this.strategyYear;
}
public void setStrategyYear(Integer value) {
this.strategyYear = value;
}
public Integer getIsFixedPrice() {
return this.isFixedPrice;
}
public void setIsFixedPrice(Integer value) {
this.isFixedPrice = value;
}
public BigDecimal getFixedElectricityPrice() {
return this.fixedElectricityPrice;
}
public void setFixedElectricityPrice(BigDecimal value) {
this.fixedElectricityPrice = value;
}
/**
* 月份入参
*/
@Valid
private List<CreateBasePriceStrategyMonthInput> months;
/**
* 策略明细入参
*/
@Valid
private List<CreateBasePriceStrategyDetailInput> details;
}
package pps.core.base.service.data.base_price_strategy_detail;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import xstartup.annotation.XText;
import java.util.Date;
import java.math.BigDecimal;
import java.util.Date;
/**
* 策略明细入参
*
* @author ZWT
* @date 2023/08/24
*/
@Data
public class CreateBasePriceStrategyDetailInput {
@XText("ID")
private String id;
......@@ -32,16 +43,19 @@ public class CreateBasePriceStrategyDetailInput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;;
@XText("时段类型key(字典获取)")
@NotBlank(message = "时段类型不能为空")
private String periodTypeKey;
@XText("开始时间")
@NotNull(message = "开始时间不能为空")
private Date startTime;
@XText("结束时间")
@NotNull(message = "结束时间不能为空")
private Date endTime;
@XText("电价")
......@@ -49,125 +63,4 @@ public class CreateBasePriceStrategyDetailInput {
@XText("内部结算价")
private BigDecimal internalSettlementPrice;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public Integer getIsDeleted() {
return this.isDeleted;
}
public void setIsDeleted(Integer value) {
this.isDeleted = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public String getStrategyId() {
return this.strategyId;
}
public void setStrategyId(String value) {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
}
public String getPeriodTypeKey() {
return this.periodTypeKey;
}
public void setPeriodTypeKey(String value) {
this.periodTypeKey = value;
}
public Date getStartTime() {
return this.startTime;
}
public void setStartTime(Date value) {
this.startTime = value;
}
public Date getEndTime() {
return this.endTime;
}
public void setEndTime(Date value) {
this.endTime = value;
}
public BigDecimal getElectrovalence() {
return this.electrovalence;
}
public void setElectrovalence(BigDecimal value) {
this.electrovalence = value;
}
public BigDecimal getInternalSettlementPrice() {
return this.internalSettlementPrice;
}
public void setInternalSettlementPrice(BigDecimal value) {
this.internalSettlementPrice = value;
}
}
......@@ -32,8 +32,8 @@ public class CreateBasePriceStrategyDetailOutput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;
@XText("时段类型key(字典获取)")
private String periodTypeKey;
......@@ -122,12 +122,12 @@ public class CreateBasePriceStrategyDetailOutput {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
public String getPeriodTypeKey() {
......
......@@ -32,8 +32,8 @@ public class DeleteBasePriceStrategyDetailInput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;
@XText("时段类型key(字典获取)")
private String periodTypeKey;
......@@ -122,12 +122,12 @@ public class DeleteBasePriceStrategyDetailInput {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
public String getPeriodTypeKey() {
......
......@@ -32,8 +32,8 @@ public class DeleteBasePriceStrategyDetailOutput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;
@XText("时段类型key(字典获取)")
private String periodTypeKey;
......@@ -122,12 +122,12 @@ public class DeleteBasePriceStrategyDetailOutput {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
public String getPeriodTypeKey() {
......
......@@ -32,8 +32,8 @@ public class DynamicQueryBasePriceStrategyDetailInput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;
@XText("时段类型key(字典获取)")
private String periodTypeKey;
......@@ -122,12 +122,12 @@ public class DynamicQueryBasePriceStrategyDetailInput {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
public String getPeriodTypeKey() {
......
......@@ -32,8 +32,8 @@ public class DynamicQueryBasePriceStrategyDetailOutput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;
@XText("时段类型key(字典获取)")
private String periodTypeKey;
......@@ -122,12 +122,12 @@ public class DynamicQueryBasePriceStrategyDetailOutput {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
public String getPeriodTypeKey() {
......
......@@ -32,8 +32,8 @@ public class DynamicQueryBasePriceStrategyDetailViewOutput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;
@XText("时段类型key(字典获取)")
private String periodTypeKey;
......@@ -122,12 +122,12 @@ public class DynamicQueryBasePriceStrategyDetailViewOutput {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
public String getPeriodTypeKey() {
......
......@@ -32,8 +32,8 @@ public class GetBasePriceStrategyDetailInput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;
@XText("时段类型key(字典获取)")
private String periodTypeKey;
......@@ -122,12 +122,12 @@ public class GetBasePriceStrategyDetailInput {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
public String getPeriodTypeKey() {
......
......@@ -32,8 +32,8 @@ public class GetBasePriceStrategyDetailOutput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;
@XText("时段类型key(字典获取)")
private String periodTypeKey;
......@@ -122,12 +122,12 @@ public class GetBasePriceStrategyDetailOutput {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
public String getPeriodTypeKey() {
......
......@@ -32,8 +32,8 @@ public class GetBasePriceStrategyDetailViewInput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;
@XText("时段类型key(字典获取)")
private String periodTypeKey;
......@@ -122,12 +122,12 @@ public class GetBasePriceStrategyDetailViewInput {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
public String getPeriodTypeKey() {
......
......@@ -32,8 +32,8 @@ public class GetBasePriceStrategyDetailViewOutput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;
@XText("时段类型key(字典获取)")
private String periodTypeKey;
......@@ -122,12 +122,12 @@ public class GetBasePriceStrategyDetailViewOutput {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
public String getPeriodTypeKey() {
......
......@@ -33,8 +33,8 @@ public class QueryBasePriceStrategyDetailInput extends XPageInput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;
@XText("时段类型key(字典获取)")
private String periodTypeKey;
......@@ -123,12 +123,12 @@ public class QueryBasePriceStrategyDetailInput extends XPageInput {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
public String getPeriodTypeKey() {
......
......@@ -33,8 +33,8 @@ public class QueryBasePriceStrategyDetailOutput extends XPageInput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;
@XText("时段类型key(字典获取)")
private String periodTypeKey;
......@@ -123,12 +123,12 @@ public class QueryBasePriceStrategyDetailOutput extends XPageInput {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
public String getPeriodTypeKey() {
......
......@@ -33,8 +33,8 @@ public class QueryBasePriceStrategyDetailViewInput extends XPageInput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;
@XText("时段类型key(字典获取)")
private String periodTypeKey;
......@@ -123,12 +123,12 @@ public class QueryBasePriceStrategyDetailViewInput extends XPageInput {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
public String getPeriodTypeKey() {
......
......@@ -33,8 +33,8 @@ public class QueryBasePriceStrategyDetailViewOutput extends XPageInput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;
@XText("时段类型key(字典获取)")
private String periodTypeKey;
......@@ -123,12 +123,12 @@ public class QueryBasePriceStrategyDetailViewOutput extends XPageInput {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
public String getPeriodTypeKey() {
......
......@@ -32,8 +32,8 @@ public class UpdateBasePriceStrategyDetailInput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;
@XText("时段类型key(字典获取)")
private String periodTypeKey;
......@@ -122,12 +122,12 @@ public class UpdateBasePriceStrategyDetailInput {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
public String getPeriodTypeKey() {
......
......@@ -32,8 +32,8 @@ public class UpdateBasePriceStrategyDetailOutput {
@XText("市电峰谷配置ID")
private String strategyId;
@XText("市电峰谷月ID")
private String strategyMonthId;
@XText("市电峰谷月")
private Integer strategyMonth;
@XText("时段类型key(字典获取)")
private String periodTypeKey;
......@@ -122,12 +122,12 @@ public class UpdateBasePriceStrategyDetailOutput {
this.strategyId = value;
}
public String getStrategyMonthId() {
return this.strategyMonthId;
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonthId(String value) {
this.strategyMonthId = value;
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
public String getPeriodTypeKey() {
......
package pps.core.base.service.data.base_price_strategy_month;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import xstartup.annotation.XText;
import java.util.Date;
import java.math.BigDecimal;
/**
* 月份入参
*
* @author ZWT
* @date 2023/08/24
*/
@Data
public class CreateBasePriceStrategyMonthInput {
@XText("ID")
private String id;
......@@ -33,86 +42,6 @@ public class CreateBasePriceStrategyMonthInput {
private String strategyId;
@XText("市电峰谷月(1-12)")
@NotNull(message = "月份不能为空")
private Integer strategyMonth;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public Integer getIsDeleted() {
return this.isDeleted;
}
public void setIsDeleted(Integer value) {
this.isDeleted = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public String getStrategyId() {
return this.strategyId;
}
public void setStrategyId(String value) {
this.strategyId = value;
}
public Integer getStrategyMonth() {
return this.strategyMonth;
}
public void setStrategyMonth(Integer value) {
this.strategyMonth = value;
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment