From 1ca9cd85c30da4092b468553c2dfa591d349ecfe Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Wed, 18 Sep 2024 13:12:19 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D0=B7=D1=80=D0=B5=D1=88=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BD=D1=84=D0=BB=D0=B8=D0=BA?= =?UTF-8?q?=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudApp/Services/ITelemetryService.cs | 6 ------ .../Services/SAUB/TelemetryService.cs | 21 ------------------- 2 files changed, 27 deletions(-) diff --git a/AsbCloudApp/Services/ITelemetryService.cs b/AsbCloudApp/Services/ITelemetryService.cs index 0ef66332..7b20c53b 100644 --- a/AsbCloudApp/Services/ITelemetryService.cs +++ b/AsbCloudApp/Services/ITelemetryService.cs @@ -54,12 +54,6 @@ public interface ITelemetryService /// TelemetryBaseDto? GetOrDefaultTelemetryByIdWell(int idWell); - /// - /// получить список телеметрии по ключам скважин - /// - /// ключи скважин - /// - IEnumerable GetOrDefaultTelemetriesByIdsWells(IEnumerable idsWells); /// /// получить диапазон дат за которые есть данные /// diff --git a/AsbCloudInfrastructure/Services/SAUB/TelemetryService.cs b/AsbCloudInfrastructure/Services/SAUB/TelemetryService.cs index 850de377..8c5f1783 100644 --- a/AsbCloudInfrastructure/Services/SAUB/TelemetryService.cs +++ b/AsbCloudInfrastructure/Services/SAUB/TelemetryService.cs @@ -184,27 +184,6 @@ public class TelemetryService : ITelemetryService return dto; } - public IEnumerable GetOrDefaultTelemetriesByIdsWells(IEnumerable idsWells) - { - var entities = GetTelemetryCache() - .Where(t => t.Well != null) - .Where(t => idsWells.Contains(t.Well!.Id)) - .Select(t => { - t.TimeZone = t.TimeZone.Hours != t.Well!.Timezone.Hours ? t.Well.Timezone : t.TimeZone; - - return t; - }); - - var dtos = entities.Select(t => { - var dto = t.Adapt(); - dto.IdWell = t.Well?.Id; - - return dto; - }); - - return dtos; - } - private Well? GetWellByTelemetryUid(string uid) { var telemetry = GetOrDefaultTelemetryByUid(uid);