Commit 5c749827 authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.开发间开优化结果统计功能,创建间开优化效果统计表,生成对应代码;
2.修改15天,10天,3天,1天间开优化功能,修改代码结构;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent d6a2425d
...@@ -234,9 +234,7 @@ public class SpaceOptimizeBaseService { ...@@ -234,9 +234,7 @@ public class SpaceOptimizeBaseService {
.endTime(optimizeDate.toString(BusinessConstant.DATE_FORMAT_DAY)) .endTime(optimizeDate.toString(BusinessConstant.DATE_FORMAT_DAY))
.dateType(dateType) .dateType(dateType)
.build()); .build());
powerGenerationList = powerList.stream() powerGenerationList = this.powerGenerationList(rangeToList, powerList);
.map(DynamicQueryPlantPredictedPowerOutput::getPower)
.collect(Collectors.toList());
this.setUnOptimizeWellheadConfig(durationDTOList, unOptimizeDurationList, wellheadDTOList, this.setUnOptimizeWellheadConfig(durationDTOList, unOptimizeDurationList, wellheadDTOList,
unOptimizeWellhead, durationMap.get(detail.getId()), periodId, recordTime); unOptimizeWellhead, durationMap.get(detail.getId()), periodId, recordTime);
Integer tundraStrategy = detail.getTundraStrategy(); Integer tundraStrategy = detail.getTundraStrategy();
...@@ -3847,4 +3845,27 @@ public class SpaceOptimizeBaseService { ...@@ -3847,4 +3845,27 @@ public class SpaceOptimizeBaseService {
} }
return electricityCostList; return electricityCostList;
} }
/**
* 发电列表
*
* @param rangeToList 要列出范围
* @param powerList 电源列表
* @return {@link List }<{@link BigDecimal }>
*/
private List<BigDecimal> powerGenerationList(List<DateTime> rangeToList, List<DynamicQueryPlantPredictedPowerOutput> powerList) {
List<BigDecimal> electricityCostList = new ArrayList<>();
DateTime dateTime;
BigDecimal result = null;
for (int i = 1; i < rangeToList.size(); i++) {
dateTime = rangeToList.get(i);
for (DynamicQueryPlantPredictedPowerOutput power : powerList) {
if (DateUtil.compare(dateTime, power.getCreateTime()) == 0) {
result = power.getPower();
}
}
electricityCostList.add(ObjectUtil.defaultIfNull(result, BigDecimal.ZERO));
}
return electricityCostList;
}
} }
\ No newline at end of file
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