From 28d9e74e456e62ddace2abfb6e955d6e522003f3 Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Thu, 23 May 2024 12:25:37 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BF?= =?UTF-8?q?=D0=BE=20=D1=80=D0=B5=D0=B7=D1=83=D0=BB=D1=8C=D1=82=D0=B0=D1=82?= =?UTF-8?q?=D0=B0=D0=BC=20=D1=80=D0=B5=D0=B2=D1=8C=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudApp/Data/ChangeLogDto.cs | 7 +--- .../Repositories/IChangeLogRepository.cs | 41 +++++++++---------- AsbCloudApp/Requests/ProcessMapPlanRequest.cs | 24 ----------- .../Repository/WellCompositeRepository.cs | 10 +---- 4 files changed, 22 insertions(+), 60 deletions(-) delete mode 100644 AsbCloudApp/Requests/ProcessMapPlanRequest.cs diff --git a/AsbCloudApp/Data/ChangeLogDto.cs b/AsbCloudApp/Data/ChangeLogDto.cs index c9b94508..7d47be9c 100644 --- a/AsbCloudApp/Data/ChangeLogDto.cs +++ b/AsbCloudApp/Data/ChangeLogDto.cs @@ -6,18 +6,13 @@ namespace AsbCloudApp.Data; /// /// Часть записи описывающая изменение /// -public class ChangeLogDto +public class ChangeLogDto where T: IId { /// /// Запись /// public required T Item { get; set; } - /// - /// ИД записи - /// - public int Id { get; set; } - /// /// Автор /// diff --git a/AsbCloudApp/Repositories/IChangeLogRepository.cs b/AsbCloudApp/Repositories/IChangeLogRepository.cs index 7509a15d..bcadce47 100644 --- a/AsbCloudApp/Repositories/IChangeLogRepository.cs +++ b/AsbCloudApp/Repositories/IChangeLogRepository.cs @@ -1,10 +1,9 @@ -using System; +using AsbCloudApp.Data; +using AsbCloudApp.Requests; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using AsbCloudApp.Data; -using AsbCloudApp.Data.ProcessMaps; -using AsbCloudApp.Requests; namespace AsbCloudApp.Repositories; @@ -12,26 +11,26 @@ namespace AsbCloudApp.Repositories; /// Репозиторий для записей с историей /// public interface IChangeLogRepository - where TDto : ProcessMapPlanBaseDto + where TDto : IId where TRequest : ChangeLogBaseRequest { - /// - /// Добавление записей - /// - /// - /// - /// - /// - Task InsertRange(int idUser, IEnumerable dtos, CancellationToken token); + /// + /// Добавление записей + /// + /// + /// + /// + /// + Task InsertRange(int idUser, IEnumerable dtos, CancellationToken token); - /// - /// Редактирование записей - /// - /// - /// - /// - /// - Task UpdateRange(int idUser, IEnumerable dtos, CancellationToken token); + /// + /// Редактирование записей + /// + /// + /// + /// + /// + Task UpdateRange(int idUser, IEnumerable dtos, CancellationToken token); /// /// Добавляет Dto у которых id == 0, изменяет dto у которых id != 0 diff --git a/AsbCloudApp/Requests/ProcessMapPlanRequest.cs b/AsbCloudApp/Requests/ProcessMapPlanRequest.cs deleted file mode 100644 index b3247ce2..00000000 --- a/AsbCloudApp/Requests/ProcessMapPlanRequest.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; - -namespace AsbCloudApp.Requests; - -/// -/// Запрос для получения РТК план -/// -public class ProcessMapPlanRequest -{ - /// - /// Идентификатор скважины - /// - public int IdWell { get; set; } - - /// - /// Тип секции - /// - public int? IdWellSectionType { get; set; } - - /// - /// Дата обновления - /// - public DateTimeOffset? UpdateFrom { get; set; } -} \ No newline at end of file diff --git a/AsbCloudInfrastructure/Repository/WellCompositeRepository.cs b/AsbCloudInfrastructure/Repository/WellCompositeRepository.cs index b4c3bae9..2a06cf9c 100644 --- a/AsbCloudInfrastructure/Repository/WellCompositeRepository.cs +++ b/AsbCloudInfrastructure/Repository/WellCompositeRepository.cs @@ -53,15 +53,7 @@ public class WellCompositeRepository : IWellCompositeRepository /// public async Task> GetCompositeProcessMap(int idWell, CancellationToken token) { - var dtos = await GetAsync(idWell, token); - - var requests = dtos.Select(x => new ProcessMapPlanRequest { - IdWell = x.IdWellSrc, - IdWellSectionType = x.IdWellSectionType - }); - - //var result = await processMapPlanDrillingRepository.GetAsync(requests, token); - return Enumerable.Empty(); + return await Task.FromResult(Enumerable.Empty()); } private static WellComposite Convert(int idWell, WellCompositeDto dto)