Commit 8fc5cf92 authored by ZWT's avatar ZWT

feat(吉林演示): 松原

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

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent c6a84a04
...@@ -117,15 +117,15 @@ public class SpaceOptimizeBaseService { ...@@ -117,15 +117,15 @@ public class SpaceOptimizeBaseService {
} else { } else {
strategyMap = Collections.emptyMap(); strategyMap = Collections.emptyMap();
} }
//线路ID/峰谷策略ID Map //线路 Map
Map<String, String> lineStrategyMap; Map<String, DynamicQueryBasePowerLineOutput> lineMap;
//取线路列表 //取线路列表
List<DynamicQueryBasePowerLineOutput> powerLineList = ServiceUtil.getPowerLineList(context, new DynamicQueryBasePowerLineInput()); List<DynamicQueryBasePowerLineOutput> powerLineList = ServiceUtil.getPowerLineList(context, new DynamicQueryBasePowerLineInput());
if (CollUtil.isNotEmpty(powerLineList)) { if (CollUtil.isNotEmpty(powerLineList)) {
lineStrategyMap = powerLineList.stream() lineMap = powerLineList.stream()
.collect(Collectors.toMap(DynamicQueryBasePowerLineOutput::getId, DynamicQueryBasePowerLineOutput::getStrategyId)); .collect(Collectors.toMap(DynamicQueryBasePowerLineOutput::getId, Function.identity()));
} else { } else {
lineStrategyMap = Collections.emptyMap(); lineMap = Collections.emptyMap();
} }
//线路ID/电站ID LIST Map //线路ID/电站ID LIST Map
Map<String, List<String>> plantIdsMap; Map<String, List<String>> plantIdsMap;
...@@ -154,6 +154,7 @@ public class SpaceOptimizeBaseService { ...@@ -154,6 +154,7 @@ public class SpaceOptimizeBaseService {
DateTime begin; DateTime begin;
Map<Date, List<SpaceOptimizeWellheadDTO>> wellDateMap; Map<Date, List<SpaceOptimizeWellheadDTO>> wellDateMap;
List<SpaceOptimizeWellheadDTO> optimizeWellList; List<SpaceOptimizeWellheadDTO> optimizeWellList;
DynamicQueryBasePowerLineOutput line;
List<String> plantIds; List<String> plantIds;
List<DynamicQueryPlantPredictedPowerOutput> powerList; List<DynamicQueryPlantPredictedPowerOutput> powerList;
String monthBaseOne; String monthBaseOne;
...@@ -162,18 +163,21 @@ public class SpaceOptimizeBaseService { ...@@ -162,18 +163,21 @@ public class SpaceOptimizeBaseService {
BigDecimal serviceRating; BigDecimal serviceRating;
List<SpaceOptimizeWeight> weightList; List<SpaceOptimizeWeight> weightList;
for (SpaceOptimizePeriodDTO period : periodDTOList) { for (SpaceOptimizePeriodDTO period : periodDTOList) {
//取线路
if (!lineMap.containsKey(period.getLineId())) {
continue;
}
line = lineMap.get(period.getLineId());
//取电站ID列表 //取电站ID列表
plantIds = plantIdsMap.get(period.getLineId()); plantIds = plantIdsMap.get(period.getLineId());
for (int d = 0; d <= offset; d++) { for (int d = 0; d <= offset; d++) {
begin = DateUtil.offsetDay(now, d); begin = DateUtil.offsetDay(now, d);
//取市电峰谷 //取市电峰谷
if (lineStrategyMap.containsKey(period.getLineId())) { monthBaseOne = String.valueOf(begin.monthBaseOne());
monthBaseOne = String.valueOf(begin.monthBaseOne()); if (strategyMap.containsKey(monthBaseOne)) {
if (strategyMap.containsKey(monthBaseOne)) { monthStrategyMap = strategyMap.get(monthBaseOne);
monthStrategyMap = strategyMap.get(monthBaseOne); if (monthStrategyMap.containsKey(line.getStrategyId())) {
if (monthStrategyMap.containsKey(lineStrategyMap.get(period.getLineId()))) { monthStrategyList = monthStrategyMap.get(line.getStrategyId());
monthStrategyList = monthStrategyMap.get(lineStrategyMap.get(period.getLineId()));
}
} }
} }
if (CollUtil.isEmpty(monthStrategyList)) { if (CollUtil.isEmpty(monthStrategyList)) {
......
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