From 47b023f84e9fedc2b3a965b4d2ef5372a97fa800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Wed, 27 Sep 2023 15:40:11 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D1=80=D0=B0=D1=81?= =?UTF-8?q?=D1=81=D1=87=D1=91=D1=82=D0=B0=20=D0=BE=D1=82=D0=BA=D0=BB=D0=BE?= =?UTF-8?q?=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BF=D0=BE=20=D0=93=D0=93?= =?UTF-8?q?=D0=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/WellOperationService/OperationsStatService.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs b/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs index edd8df56..004ce863 100644 --- a/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs +++ b/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs @@ -216,10 +216,8 @@ public class OperationsStatService : IOperationsStatService if (lastCorrespondingPlanOperation is null) return null; - var lastFactOperation = factOperations.Last(); - - var factEnd = lastFactOperation.DateStart.AddHours(lastFactOperation.DurationHours); - var planEnd = lastCorrespondingFactOperation.DateStart.AddHours(lastCorrespondingFactOperation.DurationHours); + var factEnd = lastCorrespondingFactOperation.DateStart.AddHours(lastCorrespondingFactOperation.DurationHours); + var planEnd = lastCorrespondingPlanOperation.DateStart.AddHours(lastCorrespondingPlanOperation.DurationHours); var lagDays = (planEnd - factEnd).TotalDays; return lagDays;