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; /// /// Контроллер для построения страницы "Качество" /// [Route("api/[controller]")] [ApiController] [Authorize] public class DrillingQualityController : ControllerBase { private readonly IDataSaubStatDrillingQualityService dataSaubStatDrillingQualityService; public DrillingQualityController(IDataSaubStatDrillingQualityService dataSaubStatDrillingQualityService) { this.dataSaubStatDrillingQualityService = dataSaubStatDrillingQualityService; } /// /// Возвращает данные для страницы "Качество" /// /// Параметры запроса /// Токен отмены задачи /// [HttpGet] [Permission] [ProducesResponseType(typeof(IEnumerable), (int)System.Net.HttpStatusCode.OK)] public async Task GetDataSaubStatDrillingQualityAsync( [FromQuery] DrillingQualityRequest request, CancellationToken token) { var result = await dataSaubStatDrillingQualityService.GetStatAsync(request, token); return Ok(result); } }