forked from ddrilling/AsbCloudServer
44 lines
1.5 KiB
C#
44 lines
1.5 KiB
C#
using AsbCloudApp.Data;
|
|
using AsbCloudApp.Repositories;
|
|
using AsbCloudApp.Requests;
|
|
using AsbCloudApp.Services;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AsbCloudWebApi.Controllers;
|
|
|
|
/// <summary>
|
|
/// Контроллер для построения страницы "Качество"
|
|
/// </summary>
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
[Authorize]
|
|
public class DrillingQualityController : ControllerBase
|
|
{
|
|
private readonly IDataSaubStatDrillingQualityService dataSaubStatDrillingQualityService;
|
|
|
|
public DrillingQualityController(IDataSaubStatDrillingQualityService dataSaubStatDrillingQualityService)
|
|
{
|
|
this.dataSaubStatDrillingQualityService = dataSaubStatDrillingQualityService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Возвращает данные для страницы "Качество"
|
|
/// </summary>
|
|
/// <param name="request">Параметры запроса</param>
|
|
/// <param name="token"> Токен отмены задачи </param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Permission]
|
|
[ProducesResponseType(typeof(IEnumerable<DrillingQualityDto>), (int)System.Net.HttpStatusCode.OK)]
|
|
public async Task<IActionResult> GetDataSaubStatDrillingQualityAsync(
|
|
[FromQuery] DrillingQualityRequest request, CancellationToken token)
|
|
{
|
|
var result = await dataSaubStatDrillingQualityService.GetStatAsync(request, token);
|
|
return Ok(result);
|
|
}
|
|
}
|