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

34 lines
1.4 KiB
C#
Raw Normal View History

2021-04-07 18:01:56 +05:00
using AsbCloudApp.Data;
2022-04-08 13:10:06 +05:00
using AsbCloudApp.Data.SAUB;
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
{
ITimezoneService TimeZoneService { get; }
ITelemetryTracker TelemetryTracker { get; }
int? GetIdWellByTelemetryUid(string uid);
int GetOrCreateTelemetryIdByUid(string uid);
SimpleTimezoneDto GetTimezone(int idTelemetry);
2021-12-17 12:48:58 +05:00
IEnumerable<TelemetryDto> GetTransmittingTelemetries();
DateTime GetLastTelemetryDate(int idTelemetry, bool useUtc = false);
2021-12-17 12:48:58 +05:00
int? GetIdTelemetryByIdWell(int idWell);
DatesRangeDto GetDatesRange(int idTelemetry);
2021-12-17 12:48:58 +05:00
Task UpdateInfoAsync(string uid, TelemetryInfoDto info, CancellationToken token);
Task UpdateTimezoneAsync(string uid, SimpleTimezoneDto telemetryTimeZoneInfo, CancellationToken token);
2021-12-17 12:48:58 +05:00
/// <summary>
/// Слить данные телеметрии в одну
/// </summary>
/// <param name="from">старая (исходная)</param>
/// <param name="to">новая</param>
2022-06-02 12:35:51 +05:00
/// <param name="token"></param>
2021-12-17 12:48:58 +05:00
/// <returns></returns>
Task<int> MergeAsync(int from, int to, CancellationToken token);
void SaveRequestDate(string uid, DateTimeOffset remoteDate);
2021-04-07 18:01:56 +05:00
}
}