DD.WellWorkover.Cloud/AsbCloudApp/Services/ITelemetryService.cs

40 lines
1.6 KiB
C#
Raw Normal View History

2021-04-07 18:01:56 +05:00
using AsbCloudApp.Data;
using System;
2021-09-29 10:12:54 +05:00
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
2021-04-07 18:01:56 +05:00
namespace AsbCloudApp.Services
{
public interface ITelemetryService
{
2021-11-22 11:30:08 +05:00
ITimeZoneService TimeZoneService { get; }
ITelemetryTracker TelemetryTracker { get; }
2021-11-22 11:30:08 +05:00
int? GetIdWellByTelemetryUid(string uid);
int GetOrCreateTelemetryIdByUid(string uid);
double GetTimezoneOffsetByTelemetryId(int idTelemetry);
Task<double?> GetTelemetryTimeZoneOffsetAsync(int idTelemetry, CancellationToken token);
2021-12-17 12:48:58 +05:00
IEnumerable<TelemetryDto> GetTransmittingTelemetries();
DateTime GetLastTelemetryDate(string telemetryUid);
DateTime GetLastTelemetryDate(int telemetryId);
int? GetIdTelemetryByIdWell(int idWell);
2021-12-17 12:48:58 +05:00
Task UpdateInfoAsync(string uid, TelemetryInfoDto info, CancellationToken token);
Task<DatesRangeDto> DatesRangeToTelemetryTimeZoneAsync(int telemetryId, DatesRangeDto result,
CancellationToken token);
Task UpdateTimeZoneAsync(string uid, TelemetryTimeZoneDto telemetryTimeZoneInfo, CancellationToken token);
2021-12-17 12:48:58 +05:00
/// <summary>
/// Слить данные телеметрии в одну
/// </summary>
/// <param name="from">старая (исходная)</param>
/// <param name="to">новая</param>
/// <returns></returns>
Task<int> MergeAsync(int from, int to, CancellationToken token);
void SaveRequestDate(string uid, DateTime remoteDate);
Task<DatesRangeDto> GetDatesRangeAsync(int idWell, bool isUtc, CancellationToken token = default);
2021-04-07 18:01:56 +05:00
}
}