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
|
var request = new DetectedOperationRequest
|
||||||
{
|
{
|
||||||
IdsTelemetries = idsTelemetries,
|
IdWell = well.Id,
|
||||||
IdsCategories = WellOperationCategory.MechanicalDrillingSubIds,
|
IdsCategories = WellOperationCategory.MechanicalDrillingSubIds,
|
||||||
GeDateStart = geDateStartUtc,
|
GeDateStart = geDateStartUtc,
|
||||||
LeDateEnd = leDateUtc,
|
LeDateEnd = leDateUtc,
|
||||||
};
|
};
|
||||||
|
|
||||||
var operations = await detectedOperationService
|
var telemetryOperations = await detectedOperationService
|
||||||
.GetOperationsAsync(request, token);
|
.GetOperationsAsync(request, token);
|
||||||
|
|
||||||
var wellStat = new SubsystemActiveWellStatDto { Well = well };
|
var wellStat = new SubsystemActiveWellStatDto { Well = well };
|
||||||
|
|
||||||
var telemetryOperations = operations.Where(o => o.IdTelemetry == well.IdTelemetry);
|
|
||||||
|
|
||||||
if (!telemetryOperations.Any())
|
if (!telemetryOperations.Any())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -250,6 +248,7 @@ internal class SubsystemService : ISubsystemService
|
|||||||
|
|
||||||
wellStat.SubsystemAPD = subsystemStat.FirstOrDefault(s => s.IdSubsystem == IdSubsystemAPD);
|
wellStat.SubsystemAPD = subsystemStat.FirstOrDefault(s => s.IdSubsystem == IdSubsystemAPD);
|
||||||
wellStat.SubsystemOscillation = subsystemStat.FirstOrDefault(s => s.IdSubsystem == IdSubsystemOscillation);
|
wellStat.SubsystemOscillation = subsystemStat.FirstOrDefault(s => s.IdSubsystem == IdSubsystemOscillation);
|
||||||
|
wellsStat.Add(wellStat);
|
||||||
}
|
}
|
||||||
|
|
||||||
return wellsStat;
|
return wellsStat;
|
||||||
|
Loading…
Reference in New Issue
Block a user