From 43217d86c9849d70da0482f075c549abfcd9ba6e 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: Thu, 5 Sep 2024 14:00:37 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=B8=D0=B7=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D0=BB=D0=B0=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D1=8B=D0=B9/=D1=84=D0=B0=D0=BA=D1=82=D0=B8=D1=87?= =?UTF-8?q?=D0=B5=D1=81=D0=BA=D0=B8=D1=85=20=D0=B4=D0=BD=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/WellReport/WellReportService.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/AsbCloudInfrastructure/Services/WellReport/WellReportService.cs b/AsbCloudInfrastructure/Services/WellReport/WellReportService.cs index d196e55a..5d34fa14 100644 --- a/AsbCloudInfrastructure/Services/WellReport/WellReportService.cs +++ b/AsbCloudInfrastructure/Services/WellReport/WellReportService.cs @@ -76,8 +76,6 @@ public class WellReportService : IWellReportService var drillerReports = await GetDrillerReportsAsync(idWell, token); var firstFactOperation = factWellOperations.MinByOrDefault(x => x.DateStart); - var lastFactOperation = factWellOperations.MaxByOrDefault(x => x.DateStart); - var lastPlanOperation = planWellOperations.MaxByOrDefault(x => x.DateStart); var planTrajectories = await trajectoryPlanRepository.GetAsync(idWell, token); @@ -92,8 +90,8 @@ public class WellReportService : IWellReportService DateTo = lastPlanOperation?.DateStart.AddHours(lastPlanOperation.DurationHours), Days = new PlanFactDto { - Plan = lastPlanOperation?.Day, - Fact = lastFactOperation?.Day + Plan = planWellOperations.Sum(x => x.DurationHours) / 24, + Fact = factWellOperations.Sum(x => x.DurationHours) / 24 }, WellBoreDepth = new PlanFactDto {