Правка багов, обнаруженных после попытки интеграции с фронтом

This commit is contained in:
Olga Nemt 2024-09-17 10:22:21 +05:00
parent 1b3cba8809
commit bb47dd2333
2 changed files with 11 additions and 1 deletions

View File

@ -68,6 +68,14 @@ public class MessageRequest : MessageRequestBase
/// </summary>
public IEnumerable<int> IdsWell { get; set; } = null!;
/// <summary>
/// <inheritdoc/>
/// </summary>
public MessageRequest()
{
}
/// <summary>
/// параметры для запроса списка сообщений (с ids скважин)
/// </summary>

View File

@ -43,7 +43,9 @@ public class MessageService : IMessageService
var telemetryMessages = await messageRepository.GetMessagesAsync(messageTelemetryRequest, token);
var groupedMessages = telemetryMessages.GroupBy(x => new { x.IdTelemetry, x.IdEvent });
var events = messageTelemetryRequest.Events.ToDictionary(e => e.Id);
var events = messageTelemetryRequest.Events
.GroupBy(e => e.Id)
.ToDictionary(e => e.Key, e => e.FirstOrDefault());
var idsWellsDict = messageTelemetryRequest.Telemetries.ToDictionary(e => e.Id, e => e.IdWell);