Commit 25eec319 authored by ZWT's avatar ZWT

feat(零碳): 长庆

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

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent ca4e8e42
......@@ -377,7 +377,7 @@ public class SpaceOptimizeBaseService {
for (int w = 0, wellheadSize = wellheadViewList.size(); w < wellheadSize; w++) {
SpaceInstitutionWellheadView wellhead = wellheadViewList.get(w);
String wellheadId = wellhead.getWellheadId();
String recordId = this.createOptimizeWellhead(wellheadDTOList, periodId, wellheadId, wellhead.getWellNumber(), wellhead.getStartSeq(), optimizeDate);
String recordId = this.createOptimizeWellhead(wellheadDTOList, periodId, wellheadId, wellhead.getWellNumber(), wellhead.getStartSeq(), optimizeDate, BusinessConstant.ONE);
//取当前井口最大发电量
BigDecimal serviceRating = wellhead.getServiceRating();
List<SpaceInstitutionDurationEnt> durationConfigList = durationMap.get(wellheadId);
......@@ -717,10 +717,11 @@ public class SpaceOptimizeBaseService {
* @param wellNumber 井号
* @param startSeq 开始seq
* @param optimizeDate 优化日期
* @param frostproofWell 防冻井
* @return {@link String}
*/
public String createOptimizeWellhead(List<SpaceOptimizeWellheadDTO> wellheadDTOList, String periodId,
String wellheadId, String wellNumber, Integer startSeq, DateTime optimizeDate) {
public String createOptimizeWellhead(List<SpaceOptimizeWellheadDTO> wellheadDTOList, String periodId, String wellheadId,
String wellNumber, Integer startSeq, DateTime optimizeDate, Integer frostproofWell) {
SpaceOptimizeWellheadDTO wellheadDTO = new SpaceOptimizeWellheadDTO();
BaseUtils.setBaseModelDefaultForJob(wellheadDTO);
wellheadDTO.setPeriodId(periodId);
......@@ -728,6 +729,7 @@ public class SpaceOptimizeBaseService {
wellheadDTO.setWellNumber(wellNumber);
wellheadDTO.setStartSeq(startSeq);
wellheadDTO.setOptimizeDate(optimizeDate);
wellheadDTO.setFrostproofWell(frostproofWell);
wellheadDTOList.add(wellheadDTO);
return wellheadDTO.getId();
}
......@@ -1015,7 +1017,7 @@ public class SpaceOptimizeBaseService {
for (int w = 0, wellheadSize = wellheadViewList.size(); w < wellheadSize; w++) {
SpaceInstitutionWellheadView wellhead = wellheadViewList.get(w);
String wellheadId = wellhead.getWellheadId();
String recordId = this.createOptimizeWellhead(wellheadDTOList, periodId, wellheadId, wellhead.getWellNumber(), wellhead.getStartSeq(), optimizeDate);
String recordId = this.createOptimizeWellhead(wellheadDTOList, periodId, wellheadId, wellhead.getWellNumber(), wellhead.getStartSeq(), optimizeDate, BusinessConstant.ONE);
//取当前井口最大发电量
BigDecimal serviceRating = wellhead.getServiceRating();
List<SpaceInstitutionDurationEnt> durationConfigList = durationMap.get(wellheadId);
......@@ -1171,7 +1173,7 @@ public class SpaceOptimizeBaseService {
for (int w = 0, wellheadSize = wellheadViewList.size(); w < wellheadSize; w++) {
SpaceInstitutionWellheadView wellhead = wellheadViewList.get(w);
String wellheadId = wellhead.getWellheadId();
String recordId = this.createOptimizeWellhead(wellheadDTOList, periodId, wellheadId, wellhead.getWellNumber(), wellhead.getStartSeq(), optimizeDate);
String recordId = this.createOptimizeWellhead(wellheadDTOList, periodId, wellheadId, wellhead.getWellNumber(), wellhead.getStartSeq(), optimizeDate, BusinessConstant.ONE);
List<SpaceInstitutionDurationEnt> durationConfigList = durationMap.get(wellheadId);
if (CollUtil.isEmpty(durationConfigList)) {
//没有设置时间段,无法优化
......@@ -1309,7 +1311,7 @@ public class SpaceOptimizeBaseService {
if (CollUtil.isNotEmpty(unOptimizeWellheadList)) {
for (SpaceInstitutionWellheadView wellhead : unOptimizeWellheadList) {
String wellheadId = wellhead.getWellheadId();
String recordId = this.createOptimizeWellhead(wellheadDTOList, periodId, wellheadId, wellhead.getWellNumber(), wellhead.getStartSeq(), optimizeDate);
String recordId = this.createOptimizeWellhead(wellheadDTOList, periodId, wellheadId, wellhead.getWellNumber(), wellhead.getStartSeq(), optimizeDate, BusinessConstant.ONE);
switch (wellhead.getIntervalTypeKey()) {
//小间开(不优化)
case "0":
......
......@@ -203,7 +203,7 @@ public class SpaceOptimizeShortPeriodService extends SpaceOptimizeBaseService {
if (wellheadList.size() == 1) {
SpaceInstitutionWellheadView wellhead = wellheadList.get(0);
String wellheadId = wellhead.getWellheadId();
String recordId = this.createOptimizeWellhead(wellheadDTOList, periodId, wellheadId, wellhead.getWellNumber(), wellhead.getStartSeq(), startDate);
String recordId = this.createOptimizeWellhead(wellheadDTOList, periodId, wellheadId, wellhead.getWellNumber(), wellhead.getStartSeq(), startDate, BusinessConstant.ZERO);
//保存间开原始记录
for (SpaceInstitutionDurationEnt durationEnt : durationMap.get(detail.getId()).get(wellheadId)) {
this.createUnOptimizeDuration(unOptimizeDurationList, durationEnt, periodId, recordId, wellheadId, startDate);
......@@ -238,7 +238,7 @@ public class SpaceOptimizeShortPeriodService extends SpaceOptimizeBaseService {
for (int i = 0; i < wellheadList.size(); i++) {
wellhead = wellheadList.get(i);
String wellheadId = wellhead.getWellheadId();
String recordId = this.createOptimizeWellhead(wellheadDTOList, periodId, wellheadId, wellhead.getWellNumber(), wellhead.getStartSeq(), startDate);
String recordId = this.createOptimizeWellhead(wellheadDTOList, periodId, wellheadId, wellhead.getWellNumber(), wellhead.getStartSeq(), startDate, BusinessConstant.ONE);
//保存间开原始记录
for (SpaceInstitutionDurationEnt durationEnt : durationMap.get(detail.getId()).get(wellheadId)) {
this.createUnOptimizeDuration(unOptimizeDurationList, durationEnt, periodId, recordId, wellheadId, startDate);
......@@ -358,7 +358,7 @@ public class SpaceOptimizeShortPeriodService extends SpaceOptimizeBaseService {
List<SpaceOptimizeWeightDuration> weightDurationList = this.weightListProcessing(ladder, weightList, minOpenMinute);
//创建优化记录
String wellheadId = tundraStrategyWellhead.getWellheadId();
String recordId = this.createOptimizeWellhead(wellheadDTOList, periodId, wellheadId, tundraStrategyWellhead.getWellNumber(), tundraStrategyWellhead.getStartSeq(), startDate);
String recordId = this.createOptimizeWellhead(wellheadDTOList, periodId, wellheadId, tundraStrategyWellhead.getWellNumber(), tundraStrategyWellhead.getStartSeq(), startDate, BusinessConstant.ZERO);
//保存间开原始记录
for (SpaceInstitutionDurationEnt durationEnt : durationMap.get(detail.getId()).get(wellheadId)) {
this.createUnOptimizeDuration(unOptimizeDurationList, durationEnt, periodId, recordId, wellheadId, startDate);
......
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