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

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)
{
var result = await query
.GroupBy(o => o.IdSubsystem)
.Select(g => new DatesRangeDto
{
From = g.Min(o => o.DateStart).DateTime,
To = g.Max(o => o.DateEnd).DateTime
})
.FirstOrDefaultAsync(token);
.GroupBy(o => o.IdTelemetry)
.Select(g => new DatesRangeDto
{
From = g.Min(o => o.DateStart).DateTime,
To = g.Max(o => o.DateEnd).DateTime
})
.FirstOrDefaultAsync(token);
return result;
}
return null;