Commit 74ec2db2 authored by ZWT's avatar ZWT

feat(零碳): 长庆

1.修复登录页面登录接口验证码输入后不需要验证直接能登录的问题;
2.长庆演示,首页展示大屏功能修改,修改线路详情接口,增加查询日平均用电量逻辑,同时重构查询日产液量和日发电量逻辑,更新接口文档并完成接口冒烟测试,同时生成用例;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent c8d36336
...@@ -265,9 +265,7 @@ public class SpaceOptimizeShortPeriodService extends SpaceOptimizeBaseService { ...@@ -265,9 +265,7 @@ public class SpaceOptimizeShortPeriodService extends SpaceOptimizeBaseService {
weightList.add(lastWeight); weightList.add(lastWeight);
} }
//排序 //排序
weightList = weightList.stream() weightList.sort(Comparator.comparing(SpaceOptimizeWeight::getSort));
.sorted(Comparator.comparing(SpaceOptimizeWeight::getSort))
.collect(Collectors.toList());
SpaceOptimizeWeight weight; SpaceOptimizeWeight weight;
//测试用 ====== start ----------------------------------------------- //测试用 ====== start -----------------------------------------------
int dayOpen = 15; int dayOpen = 15;
...@@ -310,9 +308,8 @@ public class SpaceOptimizeShortPeriodService extends SpaceOptimizeBaseService { ...@@ -310,9 +308,8 @@ public class SpaceOptimizeShortPeriodService extends SpaceOptimizeBaseService {
next.setSort(next.getSort() + endWeight.getSort()); next.setSort(next.getSort() + endWeight.getSort());
} }
} }
weightList = weightList.stream() //按索引排序
.sorted(Comparator.comparing(SpaceOptimizeWeight::getSort)) weightList.sort(Comparator.comparing(SpaceOptimizeWeight::getSort));
.collect(Collectors.toList());
//分级取时间段 //分级取时间段
List<SpaceOptimizeWeightDuration> weightDurationList = new ArrayList<>(32); List<SpaceOptimizeWeightDuration> weightDurationList = new ArrayList<>(32);
long between; long between;
...@@ -348,9 +345,7 @@ public class SpaceOptimizeShortPeriodService extends SpaceOptimizeBaseService { ...@@ -348,9 +345,7 @@ public class SpaceOptimizeShortPeriodService extends SpaceOptimizeBaseService {
} }
} }
//时间处理并排序(处理后第一次开井时间的索引位置为0) //时间处理并排序(处理后第一次开井时间的索引位置为0)
weightDurationList = weightDurationList.stream() weightDurationList.sort(Comparator.comparing(SpaceOptimizeWeightDuration::getOpenTime));
.sorted(Comparator.comparing(SpaceOptimizeWeightDuration::getOpenTime))
.collect(Collectors.toList());
List<SpaceOptimizeDurationDTO> optimizeDurationDTOList = new ArrayList<>(32); List<SpaceOptimizeDurationDTO> optimizeDurationDTOList = new ArrayList<>(32);
//从前往后算时间 //从前往后算时间
SpaceOptimizeWeightDuration weightDuration; SpaceOptimizeWeightDuration weightDuration;
...@@ -557,9 +552,26 @@ public class SpaceOptimizeShortPeriodService extends SpaceOptimizeBaseService { ...@@ -557,9 +552,26 @@ public class SpaceOptimizeShortPeriodService extends SpaceOptimizeBaseService {
} }
} }
} }
replenishList.add(
SpaceOptimizeWeightDuration.builder()
.weight(1)
.build()
);
replenishList.add(
SpaceOptimizeWeightDuration.builder()
.weight(3)
.build()
);
//按权重优先级排序补时间 //按权重优先级排序补时间
if (CollUtil.isNotEmpty(replenishList)) { if (CollUtil.isNotEmpty(replenishList)) {
//按照权重降序排序
replenishList.sort((o1, o2) -> o2.getWeight() - o1.getWeight());
//计算需要补的时长
long subMinute = dayOpenMinute - sumOpenTime; long subMinute = dayOpenMinute - sumOpenTime;
System.out.println(); System.out.println();
} else { } else {
//todo : 没法补时间 //todo : 没法补时间
......
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