diff --git a/AsbCloudApp/Data/WellOperationDto.cs b/AsbCloudApp/Data/WellOperationDto.cs
index 35fa5007..765c021f 100644
--- a/AsbCloudApp/Data/WellOperationDto.cs
+++ b/AsbCloudApp/Data/WellOperationDto.cs
@@ -33,6 +33,11 @@ namespace AsbCloudApp.Data
///
public double DepthEnd { get; set; }
+ ///
+ /// Кол-во дней от даты начала первой плановой (а если её нет, то фактической) операции
+ ///
+ public double Day { get; set; }
+
///
/// Дата начала операции
///
diff --git a/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs b/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs
index 480aaebb..effeeae2 100644
--- a/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs
+++ b/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs
@@ -413,6 +413,8 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
var merged = MergeArraysBySections(sectionsIds, wellOperationsPlan, wellOperationsFact);
var tvd = new List>(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();
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;
}