From 84cd0ec3faaf3da239bf27c5947ea3132071eb1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Thu, 19 Oct 2023 10:31:28 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=A0=D0=A2=D0=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Поправлены комментарии 2. Добавлен атрибут [AllowAnonymous] для метода получения РТК по телеметрии --- .../ProcessMaps/ProcessMapBaseController.cs | 43 +++++++++---------- .../ProcessMapWellDrillingController.cs | 13 +++--- .../ProcessMapWellReamController.cs | 5 ++- 3 files changed, 33 insertions(+), 28 deletions(-) diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapBaseController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapBaseController.cs index c3c6413f..9bb52f33 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapBaseController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapBaseController.cs @@ -27,6 +27,25 @@ public abstract class ProcessMapBaseController : ControllerBase { private readonly IHubContext telemetryHubContext; private readonly ITelemetryService telemetryService; + private readonly IWellService wellService; + private readonly IUserRepository userRepository; + private readonly ICrudRepository wellSectionRepository; + private readonly IProcessMapPlanRepository repository; + + protected ProcessMapBaseController(IWellService wellService, + IProcessMapPlanRepository repository, + IUserRepository userRepository, + ICrudRepository wellSectionRepository, + IHubContext telemetryHubContext, + ITelemetryService telemetryService) + { + this.wellService = wellService; + this.repository = repository; + this.userRepository = userRepository; + this.wellSectionRepository = wellSectionRepository; + this.telemetryHubContext = telemetryHubContext; + this.telemetryService = telemetryService; + } public abstract string SignalRMethod { get; } @@ -42,28 +61,7 @@ public abstract class ProcessMapBaseController : ControllerBase return idUser.Value; } } - - private readonly IWellService wellService; - private readonly IUserRepository userRepository; - private readonly ICrudRepository wellSectionRepository; - - protected readonly IProcessMapPlanRepository repository; - - protected ProcessMapBaseController(IWellService wellService, - IProcessMapPlanRepository repository, - IUserRepository userRepository, - ICrudRepository wellSectionRepository, - IHubContext telemetryHubContext, - ITelemetryService telemetryService) - { - this.wellService = wellService; - this.repository = repository; - this.userRepository = userRepository; - this.wellSectionRepository = wellSectionRepository; - this.telemetryHubContext = telemetryHubContext; - this.telemetryService = telemetryService; - } - + /// /// Создание плановой РТК /// @@ -163,6 +161,7 @@ public abstract class ProcessMapBaseController : ControllerBase /// /// [HttpGet("/api/telemetry/{uid}/[controller]")] + [AllowAnonymous] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] public async Task>> GetProcessMapPlanByTelemetry(string uid, DateTime updateFrom, CancellationToken cancellationToken) diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapWellDrillingController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapWellDrillingController.cs index d1b2ba6e..89963cfb 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapWellDrillingController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapWellDrillingController.cs @@ -16,6 +16,9 @@ using Microsoft.AspNetCore.SignalR; namespace AsbCloudWebApi.Controllers.ProcessMaps; +/// +/// РТК бурение +/// public class ProcessMapWellDrillingController : ProcessMapBaseController { private readonly IProcessMapReportWellDrillingService processMapReportWellDrillingService; @@ -41,7 +44,7 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController - /// Получение отчета РТК бурение + /// Получение данных для отчета РТК бурение /// /// Id /// @@ -75,7 +78,7 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController - /// Импорт РТК бурение + /// Импорт РТК бурение план /// /// Id скважины /// @@ -104,8 +107,8 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController - /// Экспорт РТК бурение + /// Экспорт РТК бурение план /// /// Id скважины /// diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapWellReamController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapWellReamController.cs index 1d69041c..f0f48e74 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapWellReamController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapWellReamController.cs @@ -7,6 +7,9 @@ using Microsoft.AspNetCore.SignalR; namespace AsbCloudWebApi.Controllers.ProcessMaps; +/// +/// РТК проработки скважины +/// public class ProcessMapWellReamController : ProcessMapBaseController { public ProcessMapWellReamController(IWellService wellService, @@ -19,5 +22,5 @@ public class ProcessMapWellReamController : ProcessMapBaseController "ProccessMapWellReam"; + public override string SignalRMethod => "ProccessMapWellReam"; } \ No newline at end of file