Commit 8cb593a5 authored by ZWT's avatar ZWT

feat(零碳): 长庆演示系统新增功能

1.修改第三方日累计数据推送表表结构,增加日累计储能放电量字段,同时修改代码对应实体及mapper文件,修改相关接口增加储能日累计放电量接收逻辑;
2.修改首页井场收益分析模块接口,修改获取储能累计放电量逻辑;
3.设计并创建井口日用电趋势表,生成对应实体类及mapper文件;
4.统计分析模块,新增本月累计节电经济效益查询接口,添加线上接口文档并完成接口冒烟测试;
5.统计分析模块,新增本月累计减碳量查询接口,添加线上接口文档并完成接口冒烟测试;
6.统计分析模块,新增光伏发电趋势查询接口,添加线上接口文档并完成接口冒烟测试;
7.统计分析模块,新增月度总览查询接口,添加线上接口文档并完成接口冒烟测试;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent bc433554
......@@ -2185,7 +2185,8 @@ public class SpaceOptimizeBaseService {
private List<SpaceOptimizeWeight> calculateWeightList(BigDecimal serviceRating, List<DateTime> rangeToList, List<DynamicQueryPlantPredictedPowerOutput> powerList, List<GetBasePriceStrategyDetailOutput> strategyList) {
int rangeListSize = rangeToList.size();
int powerListSize = powerList.size();
int strategyListSize = strategyList.size();
boolean empty = CollUtil.isEmpty(strategyList);
int strategyListSize = empty ? 0 : strategyList.size();
int rangeIndex = 0;
int powerIndex = 0;
int strategyIndex = 0;
......@@ -2210,19 +2211,25 @@ public class SpaceOptimizeBaseService {
}
powerIndex++;
}
firstStrategy = strategyList.get(strategyIndex);
Date closeTime = ObjectUtil.isEmpty(firstStrategy.getCloseTime()) && CharSequenceUtil.equals(BusinessConstant.END_OF_DAY_TIME, firstStrategy.getStartTime()) ? BusinessConstant.DATE_FLAG : firstStrategy.getCloseTime();
//在市电峰谷时段内,且未满足运行功率,设置权重
if (DateUtil.isIn(firstTime, firstStrategy.getOpenTime(), closeTime)) {
if (CharSequenceUtil.equals(firstStrategy.getPeriodTypeKey(), "RUSH")) {
//尖峰时段要停井
firstWeight.setWeight(0);
} else if (!powerFlag) {
firstWeight.setWeight(this.getWeightByPeriodTypeKey(firstStrategy.getPeriodTypeKey()));
if (empty) {
if (!powerFlag) {
firstWeight.setWeight(1);
}
} else {
firstStrategy = strategyList.get(strategyIndex);
Date closeTime = ObjectUtil.isEmpty(firstStrategy.getCloseTime()) && CharSequenceUtil.equals(BusinessConstant.END_OF_DAY_TIME, firstStrategy.getStartTime()) ? BusinessConstant.DATE_FLAG : firstStrategy.getCloseTime();
//在市电峰谷时段内,且未满足运行功率,设置权重
if (DateUtil.isIn(firstTime, firstStrategy.getOpenTime(), closeTime)) {
if (CharSequenceUtil.equals(firstStrategy.getPeriodTypeKey(), "RUSH")) {
//尖峰时段要停井
firstWeight.setWeight(0);
} else if (!powerFlag) {
firstWeight.setWeight(this.getWeightByPeriodTypeKey(firstStrategy.getPeriodTypeKey()));
}
}
if (firstTime.compareTo(firstStrategy.getCloseTime()) >= 0) {
strategyIndex++;
}
}
if (firstTime.compareTo(firstStrategy.getCloseTime()) >= 0) {
strategyIndex++;
}
weightList.add(firstWeight);
rangeIndex++;
......@@ -2247,19 +2254,25 @@ public class SpaceOptimizeBaseService {
}
powerListSize--;
}
lastStrategy = strategyList.get(strategyListSize - 1);
closeTime = ObjectUtil.isEmpty(lastStrategy.getCloseTime()) && CharSequenceUtil.equals(BusinessConstant.END_OF_DAY_TIME, lastStrategy.getEndTime()) ? BusinessConstant.DATE_FLAG : lastStrategy.getCloseTime();
//在市电峰谷时段内,且未满足运行功率,设置权重
if (DateUtil.isIn(lastTime, lastStrategy.getOpenTime(), closeTime)) {
if (CharSequenceUtil.equals(lastStrategy.getPeriodTypeKey(), "RUSH")) {
//尖峰时段要停井
lastWeight.setWeight(0);
} else if (!powerFlag) {
lastWeight.setWeight(this.getWeightByPeriodTypeKey(lastStrategy.getPeriodTypeKey()));
if (empty) {
if (!powerFlag) {
lastWeight.setWeight(1);
}
} else {
lastStrategy = strategyList.get(strategyListSize - 1);
Date closeTime = ObjectUtil.isEmpty(lastStrategy.getCloseTime()) && CharSequenceUtil.equals(BusinessConstant.END_OF_DAY_TIME, lastStrategy.getEndTime()) ? BusinessConstant.DATE_FLAG : lastStrategy.getCloseTime();
//在市电峰谷时段内,且未满足运行功率,设置权重
if (DateUtil.isIn(lastTime, lastStrategy.getOpenTime(), closeTime)) {
if (CharSequenceUtil.equals(lastStrategy.getPeriodTypeKey(), "RUSH")) {
//尖峰时段要停井
lastWeight.setWeight(0);
} else if (!powerFlag) {
lastWeight.setWeight(this.getWeightByPeriodTypeKey(lastStrategy.getPeriodTypeKey()));
}
}
if (lastTime.compareTo(lastStrategy.getOpenTime()) <= 0) {
strategyListSize--;
}
}
if (lastTime.compareTo(lastStrategy.getOpenTime()) <= 0) {
strategyListSize--;
}
weightList.add(lastWeight);
}
......
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