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