Commit 1f36ccac authored by ZWT's avatar ZWT

feat(零碳): 长庆

1.修改极短期间开预测定时任务逻辑,解决优化后部分优化结果时间段过短问题;
2.修改心知天气气象数据获取及接收定时任务,解决天气数据通过邮件下载后,部分数据精度丢失问题;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 4124e07a
......@@ -349,35 +349,6 @@ public class SpaceOptimizeShortPeriodService extends SpaceOptimizeBaseService {
.multiply(BusinessConstant.SIXTY)
.intValue();
SpaceOptimizeWeight weight;
// //取权重最高的开始位置
// int maxIndex = 0;
// int weightNum = 0;
// for (int i1 = 0; i1 < weightList.size(); i1++) {
// if (weightList.get(i1).getWeight() > weightNum) {
// weightNum = weightList.get(i1).getWeight();
// maxIndex = i1;
// }
// }
// //时间处理,重构时间段
// if (maxIndex > 0) {
// //取最后一段时间
// SpaceOptimizeWeight endWeight = weightList.get(weightList.size() - 1);
// Iterator<SpaceOptimizeWeight> iterator = weightList.iterator();
// int index = 0;
// while (iterator.hasNext() && index < maxIndex) {
// index++;
// SpaceOptimizeWeight next = iterator.next();
// DateTime offsetDay = DateUtil.offsetDay(next.getTimestamp(), 1);
// if (endWeight.getTimestamp().equals(offsetDay)) {
// iterator.remove();
// continue;
// }
// next.setTimestamp(offsetDay);
// next.setSort(next.getSort() + endWeight.getSort());
// }
// }
// //按索引排序
// weightList.sort(Comparator.comparing(SpaceOptimizeWeight::getSort));
//分级取时间段
List<SpaceOptimizeWeightDuration> weightDurationList = new ArrayList<>(32);
long between;
......
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