From 1889e378e7f58338b0089c5019c99b968957f6a7 Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Fri, 25 Oct 2024 15:02:25 +0500 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B0=20=D0=B1?= =?UTF-8?q?=D0=B0=D0=B3=D0=BE=D0=B2=20=D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D1=81=D1=82=D0=B0=D1=82=D0=B8=D1=81=D1=82?= =?UTF-8?q?=D0=B8=D0=BA=D0=B8=20=D0=BA=D0=B0=D1=87=D0=B5=D1=81=D1=82=D0=B2?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DataSaubStatDrillingQualityService.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/AsbCloudInfrastructure/Services/DataSaubStatDrillingQualityService.cs b/AsbCloudInfrastructure/Services/DataSaubStatDrillingQualityService.cs index f83932db..b8b11639 100644 --- a/AsbCloudInfrastructure/Services/DataSaubStatDrillingQualityService.cs +++ b/AsbCloudInfrastructure/Services/DataSaubStatDrillingQualityService.cs @@ -126,20 +126,20 @@ public class DataSaubStatDrillingQualityService : IDataSaubStatDrillingQualitySe while (indexEnd < dataSaub.Count() - 1) { - indexStart = Array.FindIndex(dataSaub, indexEnd, t => t.IdFeedRegulator == idFeedRegulator); - if (indexStart < 0) - break; + indexStart = Array.FindIndex(dataSaub, indexEnd, t => t.IdFeedRegulator == idFeedRegulator); + if (indexStart < 0 || indexStart == dataSaub.Count() - 1) + break; - indexEnd = FindIndexEnd(indexStart, idFeedRegulator, dataSaub); + indexEnd = FindIndexEnd(indexStart, idFeedRegulator, dataSaub); - var length = indexEnd - indexStart + 1; - var subset = dataSaub.AsSpan(indexStart, length); + var length = indexEnd - indexStart + 1; + var subset = dataSaub.AsSpan(indexStart, length); - if ((subset[^1].WellDepth - subset[0].WellDepth) < 0.15) - continue; // мелкие выборки не учитываем. + if ((subset[^1].WellDepth - subset[0].WellDepth) < 0.15) + continue; // мелкие выборки не учитываем. - var stats = CalcStatsDrillingQuality(idFeedRegulator, subset, checkQuality); - result.Add(stats); + var stats = CalcStatsDrillingQuality(idFeedRegulator, subset, checkQuality); + result.Add(stats); } return result;