Commit 1190c3e0 authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.排查并修复各时段间开优化功能执行异常导致未执行间开优化问题;
2.排查并修复15天间开优化功能执行后,优化结果时间段展示错乱问题;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 9f070353
...@@ -250,8 +250,11 @@ public class SpaceOptimizeBaseService { ...@@ -250,8 +250,11 @@ public class SpaceOptimizeBaseService {
.sorted(Comparator.comparing(SpaceInstitutionWellheadView::getStartSeq)) .sorted(Comparator.comparing(SpaceInstitutionWellheadView::getStartSeq))
.collect( .collect(
Collectors.partitioningBy(w -> Collectors.partitioningBy(w ->
//待优化井口:小间开,间抽井,(最小开井时间!=每日运行时间)
CharSequenceUtil.equals(BusinessConstant.INTERVAL_PUMPING_WELL, w.getRunTypeKey()) && CharSequenceUtil.equals(BusinessConstant.INTERVAL_PUMPING_WELL, w.getRunTypeKey()) &&
CharSequenceUtil.equals("0", w.getIntervalTypeKey()) CharSequenceUtil.equals("0", w.getIntervalTypeKey()) &&
w.getRunDuration().compareTo(w.getMinOpen()) > 0 &&
!(w.getMinOpen().compareTo(BigDecimal.ZERO) == 0 && w.getRunDuration().compareTo(w.getMaxOpen()) == 0)
) )
); );
//取待优化井口并遍历 //取待优化井口并遍历
...@@ -1667,7 +1670,7 @@ public class SpaceOptimizeBaseService { ...@@ -1667,7 +1670,7 @@ public class SpaceOptimizeBaseService {
switch (wellhead.getIntervalTypeKey()) { switch (wellhead.getIntervalTypeKey()) {
//小间开(不优化) //小间开(不优化)
case "0": case "0":
if (!durationMap.containsKey(wellheadId)) { if (CollUtil.isEmpty(durationMap) || !durationMap.containsKey(wellheadId)) {
continue; continue;
} }
//初始化未优化间开 //初始化未优化间开
...@@ -2426,6 +2429,9 @@ public class SpaceOptimizeBaseService { ...@@ -2426,6 +2429,9 @@ public class SpaceOptimizeBaseService {
//找索引开始/结束位置 //找索引开始/结束位置
int firstBeginIndex = (int) DateUtil.between(beginTime, firstCloseTime, DateUnit.MINUTE) / 30; int firstBeginIndex = (int) DateUtil.between(beginTime, firstCloseTime, DateUnit.MINUTE) / 30;
int firstEndIndex = (int) DateUtil.between(beginTime, DateUtil.offsetMinute(firstCloseTime, optimizeMinute), DateUnit.MINUTE) / 30; int firstEndIndex = (int) DateUtil.between(beginTime, DateUtil.offsetMinute(firstCloseTime, optimizeMinute), DateUnit.MINUTE) / 30;
if (firstEndIndex >= weightList.size()) {
firstEndIndex = weightList.size() - 1;
}
//累加权重 //累加权重
int weightSum = 0; int weightSum = 0;
int endIndex = firstBeginIndex; int endIndex = firstBeginIndex;
......
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