forked from ddrilling/AsbCloudServer
39 lines
1.3 KiB
C#
39 lines
1.3 KiB
C#
using AsbCloudApp.Data.SAUB;
|
||
using AsbCloudApp.Services;
|
||
using AsbCloudWebApi.SignalR;
|
||
using AsbCloudWebApi.SignalR.Clients;
|
||
using Microsoft.AspNetCore.Http;
|
||
using Microsoft.AspNetCore.Mvc;
|
||
using Microsoft.AspNetCore.SignalR;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Threading;
|
||
using System.Threading.Tasks;
|
||
|
||
namespace AsbCloudWebApi.Controllers.SAUB;
|
||
|
||
/// <summary>
|
||
/// Данные ТКРС
|
||
/// </summary>
|
||
[Route("api/[controller]")]
|
||
[ApiController]
|
||
public class TelemetryDataWellWorkoverController : TelemetryDataBaseController<TelemetryDataWellWorkoverDto>
|
||
{
|
||
public TelemetryDataWellWorkoverController(
|
||
ITelemetryService telemetryService,
|
||
ITelemetryDataService<TelemetryDataWellWorkoverDto> telemetryDataWellWorkoverService,
|
||
IWellService wellService,
|
||
IHubContext<TelemetryHub, ITelemetryHubClient> telemetryHubContext)
|
||
: base(
|
||
telemetryService,
|
||
telemetryDataWellWorkoverService,
|
||
wellService,
|
||
telemetryHubContext)
|
||
{ }
|
||
|
||
protected override Task SignalRNotifyAsync(int idWell, IEnumerable<TelemetryDataWellWorkoverDto> dtos, CancellationToken token)
|
||
{
|
||
return telemetryHubContext.Clients.Group($"well_{idWell}").ReceiveDataWellWorkover(dtos, token);
|
||
}
|
||
}
|