forked from ddrilling/AsbCloudServer
mark legacy as Obsolete. till panels full update.
This commit is contained in:
parent
dc156154b0
commit
eb3668a8ba
@ -6,6 +6,8 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudApp.Services
|
||||
{
|
||||
|
||||
[Obsolete]
|
||||
public interface IDataService
|
||||
{
|
||||
Task<IEnumerable<TelemetryDataSaubDto>> GetAsync(int idWell, DateTime dateBegin = default,
|
||||
|
@ -13,6 +13,7 @@ using System.Threading.Tasks;
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
{
|
||||
//TODO: delete this
|
||||
[Obsolete]
|
||||
public class DataService : IDataService
|
||||
{
|
||||
private readonly IAsbCloudDbContext db;
|
||||
|
@ -35,7 +35,6 @@ namespace AsbCloudWebApi.Controllers
|
||||
/// Создает отчет по скважине с указанными параметрами
|
||||
/// </summary>
|
||||
/// <param name="idWell">id скважины</param>
|
||||
/// <param name="idUser">id пользователя</param>
|
||||
/// <param name="stepSeconds">шаг интервала</param>
|
||||
/// <param name="format">формат отчета (0-PDF, 1-LAS)</param>
|
||||
/// <param name="begin">дата начала интервала</param>
|
||||
|
@ -3,6 +3,7 @@ using AsbCloudApp.Services;
|
||||
using AsbCloudWebApi.SignalR;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
@ -67,6 +68,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
/// <param name="token">Токен для отмены задачи</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Obsolete]
|
||||
[Route("{uid}/data")]
|
||||
public async Task<IActionResult> PostDataAsync(string uid, [FromBody] IEnumerable<TelemetryDataSaubDto> dtos,
|
||||
CancellationToken token = default)
|
||||
|
@ -53,9 +53,9 @@ namespace AsbCloudWebApi.Controllers
|
||||
public virtual async Task<IActionResult> PostDataAsync(string uid, [FromBody] IEnumerable<TDto> dtos,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var idWell = telemetryService.GetidWellByTelemetryUid(uid);
|
||||
await telemetryDataService.UpdateDataAsync(uid, dtos, token).ConfigureAwait(false);
|
||||
|
||||
var idWell = telemetryService.GetidWellByTelemetryUid(uid);
|
||||
if (idWell != null && dtos.Any())
|
||||
await Task.Run(() => telemetryHubContext.Clients.Group($"well_{idWell}")
|
||||
.SendAsync(SirnalRMethodGetDataName, dtos), token).ConfigureAwait(false);
|
||||
|
Loading…
Reference in New Issue
Block a user