fix SubsystemOperationTimeService. WelOperationCategories use valid constants.

This commit is contained in:
ngfrolov 2023-01-24 15:21:49 +05:00
parent bce61f97da
commit 05c238737d
Signed by untrusted user who does not match committer: ng.frolov
GPG Key ID: E99907A0357B29A7

View File

@ -94,8 +94,8 @@ namespace AsbCloudInfrastructure.Services.Subsystems
var detectedOperationsRequest = new DetectedOperationRequest()
{
IdWell = request.IdWell,
IdsCategories = new List<int>() {
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<DetectedOperationDto> 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);