DD.WellWorkover.Cloud/AsbCloudWebApi/Controllers/SAUB/TelemetryDataWellWorkoverController.cs

39 lines
1.3 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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);
}
}