forked from ddrilling/AsbCloudServer
Фильтрация статистики ртк не по глубине, а по датам
This commit is contained in:
commit
29cf09f9bf
@ -84,7 +84,7 @@ public class ProcessMapReportDataSaubStatDto
|
||||
/// <summary>
|
||||
/// Обороты ВСП, об/мин
|
||||
/// </summary>
|
||||
public ProcessMapReportDataSaubStatParamsDto Turnover { get; set; } = new();
|
||||
public ProcessMapReportDataSaubStatParamsDto TopDriveSpeed { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Расход, л/с
|
||||
|
@ -14,8 +14,8 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ProcessMaps.Report
|
||||
{
|
||||
namespace AsbCloudInfrastructure.Services.ProcessMaps.Report;
|
||||
|
||||
public class ProcessMapReportDataSaubStatService : IProcessMapReportDataSaubStatService
|
||||
{
|
||||
private readonly IWellService wellService;
|
||||
@ -152,7 +152,7 @@ namespace AsbCloudInfrastructure.Services.ProcessMaps.Report
|
||||
return list;
|
||||
}
|
||||
|
||||
private bool IsModeMatchOperationCategory(int idMode, int idCategory)
|
||||
private static bool IsModeMatchOperationCategory(int idMode, int idCategory)
|
||||
{
|
||||
return (idMode == 1 && idCategory == 5003) || (idMode == 2 && idCategory == 5002);
|
||||
}
|
||||
@ -169,7 +169,6 @@ namespace AsbCloudInfrastructure.Services.ProcessMaps.Report
|
||||
|
||||
var deltaDepth = lastElemInInterval.DepthEnd - firstElemInInterval.DepthStart;
|
||||
|
||||
|
||||
var aggregatedValues = CalcAggregate(span);
|
||||
|
||||
return new ProcessMapReportDataSaubStatDto()
|
||||
@ -213,7 +212,7 @@ namespace AsbCloudInfrastructure.Services.ProcessMaps.Report
|
||||
FactWavg = deltaDepth / aggregatedValues.DrilledTime,
|
||||
SetpointUsage = aggregatedValues.SetpointUsageRopPlan
|
||||
},
|
||||
Turnover = new ProcessMapReportDataSaubStatParamsDto
|
||||
TopDriveSpeed = new ProcessMapReportDataSaubStatParamsDto
|
||||
{
|
||||
SetpointPlan = processMapPlanFilteredByDepth?.TopDriveSpeedPlan,
|
||||
FactWavg = aggregatedValues.RotorSpeed,
|
||||
@ -315,20 +314,6 @@ namespace AsbCloudInfrastructure.Services.ProcessMaps.Report
|
||||
);
|
||||
}
|
||||
|
||||
private double CalcRopPlan(ProcessMapPlanDrillingDto[] processMapPlanFilteredByDepth)
|
||||
{
|
||||
var sumRopPlan = 0.0;
|
||||
var diffDepthTotal = 0.0;
|
||||
|
||||
for (var i = 0; i < processMapPlanFilteredByDepth.Length; i++)
|
||||
{
|
||||
var diffDepth = processMapPlanFilteredByDepth[i].DepthEnd - processMapPlanFilteredByDepth[i].DepthStart;
|
||||
sumRopPlan += diffDepth * processMapPlanFilteredByDepth[i].RopPlan;
|
||||
diffDepthTotal += diffDepth;
|
||||
}
|
||||
return sumRopPlan / diffDepthTotal;
|
||||
}
|
||||
|
||||
private bool IsNewInterval(DataSaubStatDto currentElem, DataSaubStatDto firstElem, DataSaubStatRequest request)
|
||||
{
|
||||
bool isNewElemBySpeed(double currentSpeed, double firstSpeed)
|
||||
@ -355,4 +340,3 @@ namespace AsbCloudInfrastructure.Services.ProcessMaps.Report
|
||||
return isNewElem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user