forked from ddrilling/AsbCloudServer
правка багов получения статистики качества
This commit is contained in:
parent
31cf44653c
commit
1889e378e7
@ -126,20 +126,20 @@ public class DataSaubStatDrillingQualityService : IDataSaubStatDrillingQualitySe
|
|||||||
|
|
||||||
while (indexEnd < dataSaub.Count() - 1)
|
while (indexEnd < dataSaub.Count() - 1)
|
||||||
{
|
{
|
||||||
indexStart = Array.FindIndex(dataSaub, indexEnd, t => t.IdFeedRegulator == idFeedRegulator);
|
indexStart = Array.FindIndex(dataSaub, indexEnd, t => t.IdFeedRegulator == idFeedRegulator);
|
||||||
if (indexStart < 0)
|
if (indexStart < 0 || indexStart == dataSaub.Count() - 1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
indexEnd = FindIndexEnd(indexStart, idFeedRegulator, dataSaub);
|
indexEnd = FindIndexEnd(indexStart, idFeedRegulator, dataSaub);
|
||||||
|
|
||||||
var length = indexEnd - indexStart + 1;
|
var length = indexEnd - indexStart + 1;
|
||||||
var subset = dataSaub.AsSpan(indexStart, length);
|
var subset = dataSaub.AsSpan(indexStart, length);
|
||||||
|
|
||||||
if ((subset[^1].WellDepth - subset[0].WellDepth) < 0.15)
|
if ((subset[^1].WellDepth - subset[0].WellDepth) < 0.15)
|
||||||
continue; // мелкие выборки не учитываем.
|
continue; // мелкие выборки не учитываем.
|
||||||
|
|
||||||
var stats = CalcStatsDrillingQuality(idFeedRegulator, subset, checkQuality);
|
var stats = CalcStatsDrillingQuality(idFeedRegulator, subset, checkQuality);
|
||||||
result.Add(stats);
|
result.Add(stats);
|
||||||
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user