forked from ddrilling/AsbCloudServer
Fix SubsystemService.GetStatAsync(..)
This commit is contained in:
parent
1c7423aaab
commit
e0ddd26278
@ -227,19 +227,17 @@ internal class SubsystemService : ISubsystemService
|
||||
|
||||
var request = new DetectedOperationRequest
|
||||
{
|
||||
IdsTelemetries = idsTelemetries,
|
||||
IdWell = well.Id,
|
||||
IdsCategories = WellOperationCategory.MechanicalDrillingSubIds,
|
||||
GeDateStart = geDateStartUtc,
|
||||
LeDateEnd = leDateUtc,
|
||||
};
|
||||
|
||||
var operations = await detectedOperationService
|
||||
var telemetryOperations = await detectedOperationService
|
||||
.GetOperationsAsync(request, token);
|
||||
|
||||
var wellStat = new SubsystemActiveWellStatDto { Well = well };
|
||||
|
||||
var telemetryOperations = operations.Where(o => o.IdTelemetry == well.IdTelemetry);
|
||||
|
||||
if (!telemetryOperations.Any())
|
||||
continue;
|
||||
|
||||
@ -250,6 +248,7 @@ internal class SubsystemService : ISubsystemService
|
||||
|
||||
wellStat.SubsystemAPD = subsystemStat.FirstOrDefault(s => s.IdSubsystem == IdSubsystemAPD);
|
||||
wellStat.SubsystemOscillation = subsystemStat.FirstOrDefault(s => s.IdSubsystem == IdSubsystemOscillation);
|
||||
wellsStat.Add(wellStat);
|
||||
}
|
||||
|
||||
return wellsStat;
|
||||
|
Loading…
Reference in New Issue
Block a user