From 05c238737da406985dd21e623548fd4a62f3e30c Mon Sep 17 00:00:00 2001 From: ngfrolov Date: Tue, 24 Jan 2023 15:21:49 +0500 Subject: [PATCH] fix SubsystemOperationTimeService. WelOperationCategories use valid constants. --- .../Services/Subsystems/SubsystemOperationTimeService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AsbCloudInfrastructure/Services/Subsystems/SubsystemOperationTimeService.cs b/AsbCloudInfrastructure/Services/Subsystems/SubsystemOperationTimeService.cs index 16a48b56..a5ed9e49 100644 --- a/AsbCloudInfrastructure/Services/Subsystems/SubsystemOperationTimeService.cs +++ b/AsbCloudInfrastructure/Services/Subsystems/SubsystemOperationTimeService.cs @@ -94,8 +94,8 @@ namespace AsbCloudInfrastructure.Services.Subsystems var detectedOperationsRequest = new DetectedOperationRequest() { IdWell = request.IdWell, - IdsCategories = new List() { - 1,3 + IdsCategories = new int[] { + WellOperationCategory.IdRotor, WellOperationCategory.IdSlide, }, LtDate = request.LtDate, GtDate = request.GtDate, @@ -158,9 +158,9 @@ namespace AsbCloudInfrastructure.Services.Subsystems } private static (double depthIntervalRotor, double depthIntervalSlide) GetDepthInterval (IEnumerable detectedOperations) { - var depthIntervalRotor = detectedOperations.Where(o => o.IdCategory == 1) + var depthIntervalRotor = detectedOperations.Where(o => o.IdCategory == WellOperationCategory.IdRotor) .Sum(o => o.DepthEnd - o.DepthStart); - var depthIntervalSlide = detectedOperations.Where(o => o.IdCategory == 3) + var depthIntervalSlide = detectedOperations.Where(o => o.IdCategory == WellOperationCategory.IdSlide) .Sum(o => o.DepthEnd - o.DepthStart); var depthInterval = (depthIntervalRotor, depthIntervalSlide);