Исправление группировки по подсистемам

This commit is contained in:
eugeniy_ivanov 2022-10-25 22:18:28 +05:00
parent 17c7392542
commit 22136824ac

View File

@ -192,13 +192,13 @@ namespace AsbCloudInfrastructure.Services.Subsystems
if (query is not null) if (query is not null)
{ {
var result = await query var result = await query
.GroupBy(o => o.IdSubsystem) .GroupBy(o => o.IdTelemetry)
.Select(g => new DatesRangeDto .Select(g => new DatesRangeDto
{ {
From = g.Min(o => o.DateStart).DateTime, From = g.Min(o => o.DateStart).DateTime,
To = g.Max(o => o.DateEnd).DateTime To = g.Max(o => o.DateEnd).DateTime
}) })
.FirstOrDefaultAsync(token); .FirstOrDefaultAsync(token);
return result; return result;
} }
return null; return null;