forked from ddrilling/AsbCloudServer
42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
|
using AsbCloudApp.Data;
|
|||
|
using AsbCloudApp.Services;
|
|||
|
using Microsoft.AspNetCore.Authorization;
|
|||
|
using Microsoft.AspNetCore.Mvc;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace AsbCloudWebApi.Controllers
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// Контроллер сбора данных от буровых
|
|||
|
/// </summary>
|
|||
|
[Route("api/well")]
|
|||
|
[ApiController]
|
|||
|
[Authorize]
|
|||
|
public class DataController : ControllerBase
|
|||
|
{
|
|||
|
private readonly ITelemetryDataService telemetryDataService;
|
|||
|
|
|||
|
public DataController(ITelemetryDataService telemetryDataService)
|
|||
|
{
|
|||
|
this.telemetryDataService = telemetryDataService;
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Возвращает данные САУБ по скважине
|
|||
|
/// </summary>
|
|||
|
/// <param name="wellId"></param>
|
|||
|
/// <param name=""></param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpGet]
|
|||
|
[Route("{wellId}/data")]
|
|||
|
[ProducesResponseType(typeof(IEnumerable<DataSaubBaseDto>), (int)System.Net.HttpStatusCode.OK)]
|
|||
|
public IActionResult Get(int wellId)
|
|||
|
{
|
|||
|
return Ok(telemetryDataService.Get(wellId));
|
|||
|
}
|
|||
|
}
|
|||
|
}
|