forked from ddrilling/AsbCloudServer
Merge branch 'dev' into RefactorRoles
This commit is contained in:
commit
7487dfb342
@ -33,6 +33,11 @@ namespace AsbCloudApp.Data
|
||||
/// </summary>
|
||||
public double DepthEnd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Кол-во дней от даты начала первой плановой (а если её нет, то фактической) операции
|
||||
/// </summary>
|
||||
public double Day { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Дата начала операции
|
||||
/// </summary>
|
||||
|
@ -413,6 +413,8 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
|
||||
|
||||
var merged = MergeArraysBySections(sectionsIds, wellOperationsPlan, wellOperationsFact);
|
||||
var tvd = new List<PlanFactPredictBase<WellOperationDto>>(merged.Count);
|
||||
var firstPoint = merged.First();
|
||||
var dateStart = firstPoint.Item1?.DateStart ?? firstPoint.Item2.DateStart;
|
||||
int iLastMatch = 0;
|
||||
int iLastFact = 0;
|
||||
for (int i = 0; i < merged.Count; i++)
|
||||
@ -426,6 +428,12 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
|
||||
Predict = null,
|
||||
};
|
||||
|
||||
if(planFactPredict.Plan is not null)
|
||||
planFactPredict.Plan.Day = (planFactPredict.Plan.DateStart - dateStart).TotalDays;
|
||||
|
||||
if (planFactPredict.Fact is not null)
|
||||
planFactPredict.Fact.Day = (planFactPredict.Fact.DateStart - dateStart).TotalDays;
|
||||
|
||||
tvd.Add(planFactPredict);
|
||||
if ((item.Item1 is not null) && (item.Item2 is not null))
|
||||
iLastMatch = i;
|
||||
@ -451,7 +459,9 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
|
||||
tvd[i].Predict = merged[i].Item1.Adapt<WellOperationDto>();
|
||||
tvd[i].Predict.IdType = 2;
|
||||
tvd[i].Predict.DateStart = tvd[i].Predict.DateStart + startOffset;
|
||||
tvd[i].Predict.Day = (tvd[i].Predict.DateStart - dateStart).TotalDays;
|
||||
}
|
||||
|
||||
return tvd;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user