Commit 7b7dd44b authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.排查并修复各时段间开优化功能执行异常导致未执行间开优化问题;
2.排查并修复15天间开优化功能执行后,优化结果时间段展示错乱问题;
3.排查并修复光伏功率预测展示功能,实际功率未展示问题;
4.排查并修复天气数据获取服务,数据处理后入库缺少数据问题;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 2d6d8f1e
...@@ -30,7 +30,6 @@ import pps.cloud.prediction.service.data.plant_predicted_power_data.DynamicQuery ...@@ -30,7 +30,6 @@ import pps.cloud.prediction.service.data.plant_predicted_power_data.DynamicQuery
import pps.core.common.constant.BusinessConstant; import pps.core.common.constant.BusinessConstant;
import pps.core.common.entity.BaseModel; import pps.core.common.entity.BaseModel;
import pps.core.common.utils.BaseUtils; import pps.core.common.utils.BaseUtils;
import pps.core.common.utils.CollectorsUtil;
import pps.core.space.entity.*; import pps.core.space.entity.*;
import pps.core.space.enums.BusinessError; import pps.core.space.enums.BusinessError;
import pps.core.space.mapper.*; import pps.core.space.mapper.*;
...@@ -97,21 +96,19 @@ public class SpaceOptimizeBaseService { ...@@ -97,21 +96,19 @@ public class SpaceOptimizeBaseService {
output.setStrategyDetailList(Collections.emptyList()); output.setStrategyDetailList(Collections.emptyList());
} }
//查功率预测信息 //查功率预测信息
List<DynamicQueryPlantPredictedPowerOutput> powerList = this.getAveragePowerGeneration15List(context, DynamicQueryPlantPredictedPowerInput.builder() List<DynamicQueryPlantPredictedPowerOutput> powerList = this.getAveragePowerGenerationList(context, DynamicQueryPlantPredictedPowerInput.builder()
.plantIds(this.getOptimizeLineRelation(context, CollUtil.newArrayList(detailEnt)) .plantIds(this.getOptimizeLineRelation(context, CollUtil.newArrayList(detailEnt))
.getPlantIdsByLineIdMap() .getPlantIdsByLineIdMap()
.get(detailEnt.getLineId())) .get(detailEnt.getLineId()))
.startTime(optimizeDate.toString()) .startTime(optimizeDate.toString())
.endTime(DateUtil.offsetDay(optimizeDate, 1).toString()) .endTime(DateUtil.offsetDay(optimizeDate, 1).toString())
.dateType(dateType) .dateType(dateType)
.formatType(1)
.build()); .build());
Map<String, BigDecimal> collect; Map<String, BigDecimal> collect;
if (CollUtil.isNotEmpty(powerList)) { if (CollUtil.isNotEmpty(powerList)) {
collect = powerList.stream() collect = powerList.stream()
.collect( .collect(Collectors.toMap(DynamicQueryPlantPredictedPowerOutput::getHourTime, DynamicQueryPlantPredictedPowerOutput::getPower));
Collectors.groupingBy(DynamicQueryPlantPredictedPowerOutput::getHourTime,
CollectorsUtil.averagingBigDecimal(DynamicQueryPlantPredictedPowerOutput::getPower, 2, 0))
);
} else { } else {
collect = Collections.emptyMap(); collect = Collections.emptyMap();
} }
...@@ -677,6 +674,7 @@ public class SpaceOptimizeBaseService { ...@@ -677,6 +674,7 @@ public class SpaceOptimizeBaseService {
.startTime(startDate.toString(BusinessConstant.DATE_FORMAT_DAY)) .startTime(startDate.toString(BusinessConstant.DATE_FORMAT_DAY))
.endTime(optimizeDate.toString(BusinessConstant.DATE_FORMAT_DAY)) .endTime(optimizeDate.toString(BusinessConstant.DATE_FORMAT_DAY))
.dateType(dateType) .dateType(dateType)
.formatType(0)
.build(); .build();
switch (detail.getGridTypeKey()) { switch (detail.getGridTypeKey()) {
//并网型优化 //并网型优化
...@@ -783,7 +781,7 @@ public class SpaceOptimizeBaseService { ...@@ -783,7 +781,7 @@ public class SpaceOptimizeBaseService {
DynamicQueryPlantPredictedPowerInput plantPowerInput, DateTime optimizeDate) { DynamicQueryPlantPredictedPowerInput plantPowerInput, DateTime optimizeDate) {
//获取当前制度对应的光伏预测数据列表 //获取当前制度对应的光伏预测数据列表
Map<String, List<SpaceInstitutionDurationEnt>> durationMap = this.getDurationMap(context, detail.getId()); Map<String, List<SpaceInstitutionDurationEnt>> durationMap = this.getDurationMap(context, detail.getId());
List<DynamicQueryPlantPredictedPowerOutput> avgPowerList = this.getAveragePowerGeneration15List(context, plantPowerInput); List<DynamicQueryPlantPredictedPowerOutput> avgPowerList = this.getAveragePowerGenerationList(context, plantPowerInput);
if (CollUtil.isEmpty(avgPowerList)) { if (CollUtil.isEmpty(avgPowerList)) {
//没有预测数据都不优化 //没有预测数据都不优化
this.setUnOptimizeWellheadConfig(durationDTOList, unOptimizeDurationList, wellheadDTOList, this.setUnOptimizeWellheadConfig(durationDTOList, unOptimizeDurationList, wellheadDTOList,
...@@ -858,7 +856,7 @@ public class SpaceOptimizeBaseService { ...@@ -858,7 +856,7 @@ public class SpaceOptimizeBaseService {
//获取井口间开时间段 //获取井口间开时间段
Map<String, List<SpaceInstitutionDurationEnt>> durationMap = this.getDurationMap(context, detail.getId()); Map<String, List<SpaceInstitutionDurationEnt>> durationMap = this.getDurationMap(context, detail.getId());
//获取当前制度对应的光伏预测数据列表 //获取当前制度对应的光伏预测数据列表
List<DynamicQueryPlantPredictedPowerOutput> avgPowerList = this.getAveragePowerGeneration15List(context, plantPowerInput); List<DynamicQueryPlantPredictedPowerOutput> avgPowerList = this.getAveragePowerGenerationList(context, plantPowerInput);
if (CollUtil.isEmpty(avgPowerList)) { if (CollUtil.isEmpty(avgPowerList)) {
//没有预测数据都不优化 //没有预测数据都不优化
this.setUnOptimizeWellheadConfig(durationDTOList, unOptimizeDurationList, wellheadDTOList, this.setUnOptimizeWellheadConfig(durationDTOList, unOptimizeDurationList, wellheadDTOList,
...@@ -1033,13 +1031,13 @@ public class SpaceOptimizeBaseService { ...@@ -1033,13 +1031,13 @@ public class SpaceOptimizeBaseService {
} }
/** /**
* 获取每15分钟发电量列表 * 获取每分钟发电量列表
* *
* @param context 上下文 * @param context 上下文
* @param input 输入 * @param input 输入
* @return {@link List}<{@link DynamicQueryPlantPredictedPowerOutput}> * @return {@link List}<{@link DynamicQueryPlantPredictedPowerOutput}>
*/ */
public List<DynamicQueryPlantPredictedPowerOutput> getAveragePowerGeneration15List(XContext context, DynamicQueryPlantPredictedPowerInput input) { public List<DynamicQueryPlantPredictedPowerOutput> getAveragePowerGenerationList(XContext context, DynamicQueryPlantPredictedPowerInput input) {
IPlantPredictedPowerCloudService cloudService = context.getBean(IPlantPredictedPowerCloudService.class); IPlantPredictedPowerCloudService cloudService = context.getBean(IPlantPredictedPowerCloudService.class);
XListResult<DynamicQueryPlantPredictedPowerOutput> result = cloudService.queryAveragePowerGenerationListByParam(context, input); XListResult<DynamicQueryPlantPredictedPowerOutput> result = cloudService.queryAveragePowerGenerationListByParam(context, input);
result.throwIfFail(); result.throwIfFail();
...@@ -2159,7 +2157,6 @@ public class SpaceOptimizeBaseService { ...@@ -2159,7 +2157,6 @@ public class SpaceOptimizeBaseService {
} else if (begin != -1) { } else if (begin != -1) {
//如果开井时间不满足最小开井时间则舍弃 //如果开井时间不满足最小开井时间则舍弃
between = DateUtil.between(weightList.get(begin).getTimestamp(), weightList.get(i2).getTimestamp(), DateUnit.MINUTE); between = DateUtil.between(weightList.get(begin).getTimestamp(), weightList.get(i2).getTimestamp(), DateUnit.MINUTE);
if (minOpenMinute <= between) {
//创建区间 //创建区间
weightDurationList.add( weightDurationList.add(
SpaceOptimizeWeightDuration.builder() SpaceOptimizeWeightDuration.builder()
...@@ -2171,7 +2168,6 @@ public class SpaceOptimizeBaseService { ...@@ -2171,7 +2168,6 @@ public class SpaceOptimizeBaseService {
.weight(BusinessConstant.LADDER[i1]) .weight(BusinessConstant.LADDER[i1])
.build() .build()
); );
}
begin = -1; begin = -1;
} }
} }
......
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