Commit 45be9b6d authored by ZWT's avatar ZWT

feat(能源管理系统): 间开优化定时任务

1.开发间开优化长期间开优化定时任务,完成并网流程绿电消纳优先策略;
2.开发间开优化长期间开优化定时任务,完成并网流程消峰平谷策略;
3.开发间开优化中短期间开优化定时任务,创建定时任务并添加配置;
4.抽取间开优化定时任务逻辑处理父类,对长期间开优化定时任务/中短期间开优化定时任务代码结构进行优化;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 40eb2ee9
...@@ -182,6 +182,20 @@ public class SpaceOptimizeBaseService { ...@@ -182,6 +182,20 @@ public class SpaceOptimizeBaseService {
); );
} }
/**
* 获取井口Map通过最大功率区分
*
* @param wellheadViewList 井口视图列表
* @param powerMax 最大功率
* @return {@link Map}<{@link Boolean}, {@link List}<{@link SpaceInstitutionWellheadView}>>
*/
public Map<Boolean, List<SpaceInstitutionWellheadView>> getWellheadViewMapByPower(List<SpaceInstitutionWellheadView> wellheadViewList, BigDecimal powerMax) {
return wellheadViewList.stream()
.collect(
Collectors.partitioningBy(w -> powerMax.compareTo(w.getServiceRating()) >= BusinessConstant.ZERO)
);
}
/*-----------------------------------private-----------------------------------*/ /*-----------------------------------private-----------------------------------*/
/** /**
......
...@@ -27,7 +27,6 @@ import xstartup.helper.XTransactionHelper; ...@@ -27,7 +27,6 @@ import xstartup.helper.XTransactionHelper;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* 长期间开优化Cloud模块 * 长期间开优化Cloud模块
...@@ -108,12 +107,7 @@ public class SpaceOptimizeLongCloudServiceImpl extends SpaceOptimizeBaseService ...@@ -108,12 +107,7 @@ public class SpaceOptimizeLongCloudServiceImpl extends SpaceOptimizeBaseService
wellheadViewList, avgPowerList, durationMap, detail, longPeriodId); wellheadViewList, avgPowerList, durationMap, detail, longPeriodId);
} else { } else {
//遍历井口,按发电功率大于等于光伏出力峰值条件分组 //遍历井口,按发电功率大于等于光伏出力峰值条件分组
Map<Boolean, List<SpaceInstitutionWellheadView>> collect = spaceWellheadList.stream() Map<Boolean, List<SpaceInstitutionWellheadView>> collect = super.getWellheadViewMapByPower(wellheadViewList, powerMax);
.filter(w ->
StringUtils.equals(detailId, w.getInstitutionId())
)
.collect(Collectors.partitioningBy(w -> powerMax.compareTo(w.getServiceRating()) >= BusinessConstant.ZERO));
List<SpaceInstitutionWellheadView> lowWellheadList = collect.get(false); List<SpaceInstitutionWellheadView> lowWellheadList = collect.get(false);
int size = spaceWellheadList.size(); int size = spaceWellheadList.size();
int lowWellheadListSize = lowWellheadList.size(); int lowWellheadListSize = lowWellheadList.size();
......
...@@ -24,7 +24,6 @@ import xstartup.helper.XTransactionHelper; ...@@ -24,7 +24,6 @@ import xstartup.helper.XTransactionHelper;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* 中短期间开优化Cloud模块 * 中短期间开优化Cloud模块
...@@ -100,11 +99,7 @@ public class SpaceOptimizeMidCloudServiceImpl extends SpaceOptimizeBaseService i ...@@ -100,11 +99,7 @@ public class SpaceOptimizeMidCloudServiceImpl extends SpaceOptimizeBaseService i
wellheadViewList, avgPowerList, durationMap, detail, midPeriodId); wellheadViewList, avgPowerList, durationMap, detail, midPeriodId);
} else { } else {
//遍历井口,按发电功率大于等于光伏出力峰值条件分组 //遍历井口,按发电功率大于等于光伏出力峰值条件分组
Map<Boolean, List<SpaceInstitutionWellheadView>> collect = spaceWellheadList.stream() Map<Boolean, List<SpaceInstitutionWellheadView>> collect = super.getWellheadViewMapByPower(wellheadViewList,powerMax);
.filter(w ->
StringUtils.equals(detailId, w.getInstitutionId())
)
.collect(Collectors.partitioningBy(w -> powerMax.compareTo(w.getServiceRating()) >= BusinessConstant.ZERO));
List<SpaceInstitutionWellheadView> lowWellheadList = collect.get(false); List<SpaceInstitutionWellheadView> lowWellheadList = collect.get(false);
int size = spaceWellheadList.size(); int size = spaceWellheadList.size();
int lowWellheadListSize = lowWellheadList.size(); int lowWellheadListSize = lowWellheadList.size();
......
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