DD.WellWorkover.Cloud/AsbCloudApp/Services/ITelemetryService.cs
2021-12-17 12:48:58 +05:00

40 lines
1.6 KiB
C#

using AsbCloudApp.Data;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace AsbCloudApp.Services
{
public interface ITelemetryService
{
ITimeZoneService TimeZoneService { get; }
ITelemetryTracker TelemetryTracker { get; }
int? GetIdWellByTelemetryUid(string uid);
int GetOrCreateTelemetryIdByUid(string uid);
double GetTimezoneOffsetByTelemetryId(int idTelemetry);
Task<double?> GetTelemetryTimeZoneOffsetAsync(int idTelemetry, CancellationToken token);
IEnumerable<(string Key, int[] Ids)> GetDuplicateRemoteUids();
IEnumerable<TelemetryDto> GetTransmittingTelemetries();
DateTime GetLastTelemetryDate(string telemetryUid);
DateTime GetLastTelemetryDate(int telemetryId);
int? GetIdTelemetryByIdWell(int idWell);
Task UpdateInfoAsync(string uid, TelemetryInfoDto info, CancellationToken token);
Task<DatesRangeDto> FixDatesRangeByTimeZoneAsync(int telemetryId, DatesRangeDto result,
CancellationToken token);
Task UpdateTimeZoneAsync(string uid, TelemetryTimeZoneDto telemetryTimeZoneInfo, CancellationToken token);
/// <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);
}
}