forked from ddrilling/AsbCloudServer
Фиксы возвращаемого типа
This commit is contained in:
parent
2898b8064c
commit
c0f5120d3a
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using AsbCloudApp.Data;
|
using AsbCloudApp.Data;
|
||||||
@ -147,8 +148,7 @@ public abstract class ProcessMapBaseController<T> : ControllerBase
|
|||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[ProducesResponseType(typeof(int), StatusCodes.Status200OK)]
|
public async Task<ActionResult<IEnumerable<T>>> GetAsync(int idWell, CancellationToken cancellationToken)
|
||||||
public async Task<IActionResult> GetAsync(int idWell, CancellationToken cancellationToken)
|
|
||||||
{
|
{
|
||||||
var processMaps = await repository.GetByIdWellAsync(idWell, cancellationToken);
|
var processMaps = await repository.GetByIdWellAsync(idWell, cancellationToken);
|
||||||
|
|
||||||
@ -163,9 +163,9 @@ public abstract class ProcessMapBaseController<T> : ControllerBase
|
|||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("/api/[controller]/telemetry/{uid}")]
|
[HttpGet("/api/[controller]/telemetry/{uid}")]
|
||||||
[ProducesResponseType(typeof(int), StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
|
[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
|
||||||
public async Task<IActionResult> GetProcessMapPlanByTelemetry(string uid, DateTime updateFrom, CancellationToken cancellationToken)
|
public async Task<ActionResult<IEnumerable<T>>> GetProcessMapPlanByTelemetry(string uid, DateTime updateFrom, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var idWell = telemetryService.GetIdWellByTelemetryUid(uid);
|
var idWell = telemetryService.GetIdWellByTelemetryUid(uid);
|
||||||
|
|
||||||
@ -198,11 +198,11 @@ public abstract class ProcessMapBaseController<T> : ControllerBase
|
|||||||
|
|
||||||
protected async Task NotifyUsersBySignalR(int idWell, CancellationToken cancellationToken)
|
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
|
await telemetryHubContext.Clients
|
||||||
.Group($"{SignalRMethod}_{idWell}")
|
.Group($"{SignalRMethod}_{idWell}")
|
||||||
.SendAsync("UpdateProcessMap", wellDrillingProcessMaps, cancellationToken);
|
.SendAsync("UpdateProcessMap", dtos, cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task CheckIsExistsWellSectionTypeAsync(int idWellSectionType, CancellationToken cancellationToken)
|
private async Task CheckIsExistsWellSectionTypeAsync(int idWellSectionType, CancellationToken cancellationToken)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -46,7 +47,7 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController<Process
|
|||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("report")]
|
[HttpGet("report")]
|
||||||
[ProducesResponseType(typeof(ProcessMapPlanWellDrillingDto), StatusCodes.Status200OK)]
|
[ProducesResponseType(typeof(IEnumerable<ProcessMapPlanWellDrillingDto>), StatusCodes.Status200OK)]
|
||||||
public async Task<IActionResult> GetReportAsync(int idWell, CancellationToken cancellationToken)
|
public async Task<IActionResult> GetReportAsync(int idWell, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var report = await processMapReportWellDrillingService.GetAsync(idWell, cancellationToken);
|
var report = await processMapReportWellDrillingService.GetAsync(idWell, cancellationToken);
|
||||||
|
Loading…
Reference in New Issue
Block a user