forked from ddrilling/AsbCloudServer
DetectedOperationExportService fix comment
This commit is contained in:
parent
2ceac00a4f
commit
371083bd38
@ -6,12 +6,10 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using AsbCloudInfrastructure.Services.DetectOperations.Detectors;
|
using AsbCloudInfrastructure.Services.DetectOperations.Detectors;
|
||||||
using AsbCloudApp.Repositories;
|
using AsbCloudApp.Repositories;
|
||||||
using AsbCloudInfrastructure.Repository;
|
|
||||||
|
|
||||||
namespace AsbCloudInfrastructure.Services.DetectOperations;
|
namespace AsbCloudInfrastructure.Services.DetectOperations;
|
||||||
|
|
||||||
@ -69,8 +67,7 @@ public class DetectedOperationExportService
|
|||||||
if (!well.IdTelemetry.HasValue)
|
if (!well.IdTelemetry.HasValue)
|
||||||
throw new ArgumentNullException(nameof(well));
|
throw new ArgumentNullException(nameof(well));
|
||||||
|
|
||||||
var operations = await DetectOperationsAsync(well.IdTelemetry.Value, new DateTime(2023, 10, 14)
|
var operations = await DetectOperationsAsync(well.IdTelemetry.Value, DateTime.UnixEpoch, cancellationToken);
|
||||||
.ToUtcDateTimeOffset(well.Timezone.Hours), cancellationToken);
|
|
||||||
|
|
||||||
return await GenerateExcelFileStreamAsync(well, idDomain, operations, cancellationToken);
|
return await GenerateExcelFileStreamAsync(well, idDomain, operations, cancellationToken);
|
||||||
}
|
}
|
||||||
@ -200,19 +197,15 @@ public class DetectedOperationExportService
|
|||||||
{
|
{
|
||||||
case WellOperationCategory.IdRotor:
|
case WellOperationCategory.IdRotor:
|
||||||
case WellOperationCategory.IdSlide:
|
case WellOperationCategory.IdSlide:
|
||||||
{
|
var comment = "";
|
||||||
var avgRotorSpeed = operation.ExtraData[DetectorDrilling.ExtraDataKeyAvgRotorSpeed];
|
if (operation.ExtraData.TryGetValue(DetectorDrilling.ExtraDataKeyAvgRotorSpeed, out object? oAvgRotorSpeed))
|
||||||
var dispersionOfNormalizedRotorSpeed = operation.ExtraData[DetectorDrilling.ExtraDataKeyDispersionOfNormalizedRotorSpeed];
|
comment += $"Средняя скорость оборотов ротора: {oAvgRotorSpeed}\r\n";
|
||||||
var isAfbEnabledObject = operation.ExtraData[DetectorDrilling.ExtraDataKeyIsAfbEnabled];
|
|
||||||
var AfbState = "";
|
if (operation.ExtraData.TryGetValue(DetectorDrilling.ExtraDataKeyDispersionOfNormalizedRotorSpeed, out object? oDispersionOfNormalizedRotorSpeed))
|
||||||
if (isAfbEnabledObject is bool isAfbEnabled && isAfbEnabled)
|
comment += $"Дисперсия нормированных оборотов ротора: {oDispersionOfNormalizedRotorSpeed}";
|
||||||
AfbState = "АКБ - вкл";
|
|
||||||
|
|
||||||
var comment = $"Средняя скорость оборотов ротора: {avgRotorSpeed}\r\n" +
|
|
||||||
$"Дисперсия нормированных оборотов ротора: {dispersionOfNormalizedRotorSpeed} \r\n" +
|
|
||||||
$"{AfbState}";
|
|
||||||
return comment;
|
return comment;
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user