forked from ddrilling/AsbCloudServer
Add ProcessMapReportDto.UsagePlan;
Fix % (mult 100);
This commit is contained in:
parent
5e8df2e29f
commit
577b699663
@ -82,9 +82,14 @@ namespace AsbCloudApp.Data.ProcessMap
|
||||
public ProcessMapReportParamsDto SpeedLimit { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Процент использования системы АПД, %
|
||||
/// Процент использования системы АПД план, %
|
||||
/// </summary>
|
||||
public double Usage { get; set; }
|
||||
public double UsagePlan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Процент использования системы АПД факт, %
|
||||
/// </summary>
|
||||
public double UsageFact { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Фактическая механическая скорость, м/ч
|
||||
|
@ -129,10 +129,10 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
||||
FillIntervalModeDataSpeed(sheet, modeData.SpeedLimit, columnSpeed, row);
|
||||
|
||||
sheet.Cell(row, columnUsagePlan)
|
||||
.SetVal(100);
|
||||
.SetVal(modeData.UsagePlan);
|
||||
|
||||
sheet.Cell(row, columnUsageFact)
|
||||
.SetVal(modeData.Usage);
|
||||
.SetVal(modeData.UsageFact);
|
||||
|
||||
sheet.Cell(row, columnRop)
|
||||
.SetVal(modeData.Rop);
|
||||
|
@ -171,7 +171,8 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
||||
SpeedLimit = telemetryStat.BlockSpeed.MakeParams(processMapByMode?.RopPlan),
|
||||
|
||||
Rop = telemetryStat.Rop,
|
||||
Usage = telemetryStat.UsageSaub,
|
||||
UsagePlan = processMapByMode?.UsageSaub ?? telemetryStat.UsagePredictPlan,
|
||||
UsageFact = telemetryStat.UsageSaub,
|
||||
};
|
||||
return result;
|
||||
}
|
||||
@ -300,7 +301,7 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
||||
{
|
||||
result.SetpointFact = DivideValByDepth(spWSum);
|
||||
result.Limit = (getterLimitMax is not null) ? DivideValByDepth(limitMaxWSum) : null;
|
||||
result.SetpointUsage = deltaDepthSum > 0d ? SpUsageDepth / spUsageTotal : null;
|
||||
result.SetpointUsage = deltaDepthSum > 0d ? 100d * SpUsageDepth / spUsageTotal : null;
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -327,13 +328,13 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
||||
public double? Rop => hoursSum == 0d ? null : depthSum / hoursSum;
|
||||
|
||||
private double depthWithSaub = 0d;
|
||||
public double UsageSaub { get; private set; }
|
||||
|
||||
public DateTime DateStart { get; private set; }
|
||||
public float DeltaDepth { get; private set; }
|
||||
public int IdMode { get; private set; }
|
||||
public string ModeName { get; private set; }
|
||||
public double MechDrillingHours { get; private set; }
|
||||
public double UsageSaub { get; }
|
||||
public double UsagePredictPlan { get; }
|
||||
public DateTime DateStart { get; }
|
||||
public float DeltaDepth { get; }
|
||||
public int IdMode { get; }
|
||||
public string ModeName { get; }
|
||||
public double MechDrillingHours { get; }
|
||||
|
||||
public TelemetryStat(Span<TelemetryDataSaubStatDto> telemetry)
|
||||
{
|
||||
@ -354,7 +355,8 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
||||
for (int i = 0; i < telemetry.Length; i++)
|
||||
UpdateStat(telemetry[i]);
|
||||
|
||||
UsageSaub = depthWithSaub / depthSum;
|
||||
UsageSaub = 100d * depthWithSaub / depthSum;
|
||||
UsagePredictPlan = IdMode != 0 ? 100d : 0d;
|
||||
}
|
||||
|
||||
private void UpdateStat(TelemetryDataSaubStatDto current)
|
||||
|
Loading…
Reference in New Issue
Block a user