Commit 3d7878f7 authored by ZWT's avatar ZWT

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

1.开发间开优化定期校准定时任务,配置表达式修改定时任务配置文件,创建cloud模块方法;
2.开发间开优化定期校准定时任务,完成业务逻辑开发;
3.修改间开制度管理模块定期校准新增功能,增加初始化校准历史业务逻辑;
4.开发间开优化短期间开优化定时任务,配置表达式修改定时任务配置文件,创建cloud模块方法;
5.修改长期间开优化定时任务,添加离网型线路数据处理逻辑;
6.创建储能预测电量数据(模拟数据测试用)表,生成对应代码,添加条件查询各时段储能预测数据Cloud模块接口;
7.修改长期间开优化定时任务,增加离网型算法计算储能可用时长逻辑;
8.修改长期间开优化定时任务,优化部分sql查询语句查询逻辑,优化代码结构;
9.光伏预测Cloud模块查询预测发电量接口修改,增加查询长期发电量逻辑;
10.修改中短期间开优化定时任务,添加离网型优化逻辑;
11.修改长期/中短期间开优化定时任务,优化代码结构;
12.修改基础间开配置模块设为基础间开制度及重新优化接口,增加并网型优化逻辑;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 5e29c267
......@@ -266,7 +266,6 @@ public class SpaceOptimizeBaseService {
if (d == 0) {
//第一口井的启动时间
if (isFirstWellhead) {
firstStartTime = startTime;
//计算开井时间
for (int a = 0, avgPowerSize = avgPowerList.size(); a < avgPowerSize; a++) {
DynamicQueryPlantPredictedPowerOutput predictedPower = avgPowerList.get(a);
......@@ -278,6 +277,7 @@ public class SpaceOptimizeBaseService {
}
DynamicQueryPlantPredictedPowerOutput start = avgPowerList.get(firstIndex);
DateTime startTimeOptimize = DateUtil.date(start.getCreateTime());
firstStartTime = startTimeOptimize;
//计算第一次关井时间,按照间开时间段顺延
int startDuration = (int) startTime.between(endTime, DateUnit.MINUTE);
DateTime endTimeOptimize = startTime.offset(DateField.MINUTE, startDuration);
......@@ -321,7 +321,7 @@ public class SpaceOptimizeBaseService {
}
//计算偏移
this.createDurationOffGridPeriod(offGridPeriodList, wellheadId, offset,
DateUtil.date(duration.getCloseTime()).offset(DateField.MINUTE, between)
endTime.offset(DateField.MINUTE, between)
);
}
}
......@@ -501,14 +501,12 @@ public class SpaceOptimizeBaseService {
}
for (int d = 0, durationSize = durationConfigList.size(); d < durationSize; d++) {
SpaceInstitutionDurationEnt duration = durationConfigList.get(d);
String openWellTime = duration.getOpenWellTime();
DateTime startTime = DateUtil.parse(openWellTime + BusinessConstant.INITIALIZATION_SECOND, BusinessConstant.TIME_FORMAT);
DateTime endTime = DateUtil.parse(duration.getCloseWellTime() + BusinessConstant.INITIALIZATION_SECOND, BusinessConstant.TIME_FORMAT);
DateTime startTime = DateUtil.date(duration.getOpenTime());
DateTime endTime = DateUtil.date(duration.getCloseTime());
//第一次启动
if (d == 0) {
//第一口井的启动时间
if (isFirstWellhead) {
firstStartTime = startTime;
//计算开井时间
int startIndex = 0;
for (int a = 0, avgPowerSize = avgPowerList.size(); a < avgPowerSize; a++) {
......@@ -520,16 +518,15 @@ public class SpaceOptimizeBaseService {
}
}
DynamicQueryPlantPredictedPowerOutput start = avgPowerList.get(startIndex);
String startTimeString = start.getHourTime() + start.getMinTime();
DateTime startTimeOptimize = DateUtil.date(start.getCreateTime());
//计算第一次关井时间,按照间开时间段顺延
int startDuration = (int) startTime.between(endTime, DateUnit.MINUTE);
DateTime endTimeOptimize = startTime.offset(DateField.MINUTE, startDuration);
this.createOptimizeDuration(durationDTOList, periodId, recordId, wellheadId, null,
StringUtils.substringBeforeLast(startTimeString, BusinessConstant.INITIALIZATION_SECOND), endTimeOptimize.toString(BusinessConstant.MINUTES_FORMAT)
startTimeOptimize.toString(BusinessConstant.MINUTES_FORMAT), endTimeOptimize.toString(BusinessConstant.MINUTES_FORMAT)
);
//计算时间偏移
DateTime startTimeOptimize = DateUtil.parse(startTimeString, BusinessConstant.TIME_FORMAT);
//取时间间隔(分钟)
firstStartTime = startTimeOptimize;
//计算时间偏移,取时间间隔(分钟)
between = BaseUtils.getTimeDifferenceMinute(startTimeOptimize, startTime);
}
//其它井口的第一次启动时间
......@@ -550,7 +547,7 @@ public class SpaceOptimizeBaseService {
}
if (startIndex > -1) {
DynamicQueryPlantPredictedPowerOutput start = avgPowerList.get(startIndex);
DateTime startTimeOptimize = DateUtil.parse(start.getHourTime() + start.getMinTime(), BusinessConstant.TIME_FORMAT);
DateTime startTimeOptimize = DateUtil.date(start.getCreateTime());
//计算未优化启动间隔
int openDuration = (int) startTime.between(endTime, DateUnit.MINUTE);
DateTime endTimeOptimize = startTimeOptimize.offset(DateField.MINUTE, openDuration);
......@@ -572,8 +569,7 @@ public class SpaceOptimizeBaseService {
//计算偏移
this.createOptimizeDuration(durationDTOList, periodId, recordId, wellheadId, null,
offset.toString(BusinessConstant.MINUTES_FORMAT),
BaseUtils.getEndTimeString(DateUtil.parse(duration.getCloseWellTime() + BusinessConstant.INITIALIZATION_SECOND, BusinessConstant.TIME_FORMAT)
.offset(DateField.MINUTE, between))
BaseUtils.getEndTimeString(endTime.offset(DateField.MINUTE, between))
);
}
}
......@@ -649,9 +645,8 @@ public class SpaceOptimizeBaseService {
}
for (int d = 0, durationSize = durationConfigList.size(); d < durationSize; d++) {
SpaceInstitutionDurationEnt duration = durationConfigList.get(d);
String openWellTime = duration.getOpenWellTime();
DateTime startTime = DateUtil.parse(openWellTime + BusinessConstant.INITIALIZATION_SECOND, BusinessConstant.TIME_FORMAT);
DateTime endTime = DateUtil.parse(duration.getCloseWellTime() + BusinessConstant.INITIALIZATION_SECOND, BusinessConstant.TIME_FORMAT);
DateTime startTime = DateUtil.date(duration.getOpenTime());
DateTime endTime = DateUtil.date(duration.getCloseTime());
//第一次启动
if (d == 0) {
//第一口井的启动时间
......@@ -685,8 +680,7 @@ public class SpaceOptimizeBaseService {
}
this.createOptimizeDuration(durationDTOList, periodId, recordId, wellheadId, null,
offset.toString(BusinessConstant.MINUTES_FORMAT), BaseUtils.getEndTimeString(
DateUtil.parse(duration.getCloseWellTime() + BusinessConstant.INITIALIZATION_SECOND, BusinessConstant.TIME_FORMAT)
.offset(DateField.MINUTE, between)
endTime.offset(DateField.MINUTE, 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