правка багов получения статистики качества

This commit is contained in:
Olga Nemt 2024-10-25 15:02:25 +05:00
parent 31cf44653c
commit 1889e378e7

View File

@ -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;