From c0f5120d3ad58ab113c437d9c1bdd3f165e23853 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: Mon, 16 Oct 2023 15:14:31 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=D1=8B=20=D0=B2=D0=BE?= =?UTF-8?q?=D0=B7=D0=B2=D1=80=D0=B0=D1=89=D0=B0=D0=B5=D0=BC=D0=BE=D0=B3?= =?UTF-8?q?=D0=BE=20=D1=82=D0=B8=D0=BF=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProcessMaps/ProcessMapBaseController.cs | 12 ++++++------ .../ProcessMaps/ProcessMapWellDrillingController.cs | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapBaseController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapBaseController.cs index 1377a15a..14a669f2 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapBaseController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapBaseController.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using AsbCloudApp.Data; @@ -147,8 +148,7 @@ public abstract class ProcessMapBaseController : ControllerBase /// /// [HttpGet] - [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] - public async Task GetAsync(int idWell, CancellationToken cancellationToken) + public async Task>> GetAsync(int idWell, CancellationToken cancellationToken) { var processMaps = await repository.GetByIdWellAsync(idWell, cancellationToken); @@ -163,9 +163,9 @@ public abstract class ProcessMapBaseController : ControllerBase /// /// [HttpGet("/api/[controller]/telemetry/{uid}")] - [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - public async Task GetProcessMapPlanByTelemetry(string uid, DateTime updateFrom, CancellationToken cancellationToken) + public async Task>> GetProcessMapPlanByTelemetry(string uid, DateTime updateFrom, CancellationToken cancellationToken) { var idWell = telemetryService.GetIdWellByTelemetryUid(uid); @@ -198,11 +198,11 @@ public abstract class ProcessMapBaseController : ControllerBase protected async Task NotifyUsersBySignalR(int idWell, CancellationToken cancellationToken) { - var wellDrillingProcessMaps = await repository.GetByIdWellAsync(idWell, cancellationToken); + var dtos = await repository.GetByIdWellAsync(idWell, cancellationToken); await telemetryHubContext.Clients .Group($"{SignalRMethod}_{idWell}") - .SendAsync("UpdateProcessMap", wellDrillingProcessMaps, cancellationToken); + .SendAsync("UpdateProcessMap", dtos, cancellationToken); } private async Task CheckIsExistsWellSectionTypeAsync(int idWellSectionType, CancellationToken cancellationToken) diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapWellDrillingController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapWellDrillingController.cs index d37869e3..d1b2ba6e 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapWellDrillingController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapWellDrillingController.cs @@ -1,4 +1,5 @@ -using System.ComponentModel.DataAnnotations; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.IO; using System.Threading; using System.Threading.Tasks; @@ -46,7 +47,7 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController /// [HttpGet("report")] - [ProducesResponseType(typeof(ProcessMapPlanWellDrillingDto), StatusCodes.Status200OK)] + [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] public async Task GetReportAsync(int idWell, CancellationToken cancellationToken) { var report = await processMapReportWellDrillingService.GetAsync(idWell, cancellationToken);