2021-04-07 18:01:56 +05:00
|
|
|
|
using AsbCloudApp.Data;
|
2022-04-08 13:10:06 +05:00
|
|
|
|
using AsbCloudApp.Data.SAUB;
|
2021-10-15 15:35:18 +05:00
|
|
|
|
using System;
|
2021-09-29 10:12:54 +05:00
|
|
|
|
using System.Collections.Generic;
|
2021-10-15 12:24:04 +05:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
2021-04-07 18:01:56 +05:00
|
|
|
|
|
|
|
|
|
namespace AsbCloudApp.Services
|
|
|
|
|
{
|
|
|
|
|
public interface ITelemetryService
|
|
|
|
|
{
|
2022-01-05 17:50:45 +05:00
|
|
|
|
ITimezoneService TimeZoneService { get; }
|
2021-11-22 16:02:15 +05:00
|
|
|
|
ITelemetryTracker TelemetryTracker { get; }
|
2021-12-07 15:55:11 +05:00
|
|
|
|
int? GetIdWellByTelemetryUid(string uid);
|
|
|
|
|
int GetOrCreateTelemetryIdByUid(string uid);
|
2022-01-05 17:50:45 +05:00
|
|
|
|
SimpleTimezoneDto GetTimezone(int idTelemetry);
|
2021-12-17 12:48:58 +05:00
|
|
|
|
IEnumerable<TelemetryDto> GetTransmittingTelemetries();
|
2022-01-05 17:50:45 +05:00
|
|
|
|
DateTime GetLastTelemetryDate(int idTelemetry, bool useUtc = false);
|
2021-12-17 12:48:58 +05:00
|
|
|
|
int? GetIdTelemetryByIdWell(int idWell);
|
2022-01-05 17:50:45 +05:00
|
|
|
|
DatesRangeDto GetDatesRange(int idTelemetry);
|
2021-12-17 12:48:58 +05:00
|
|
|
|
Task UpdateInfoAsync(string uid, TelemetryInfoDto info, CancellationToken token);
|
2022-01-05 17:50:45 +05:00
|
|
|
|
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);
|
2021-12-30 17:05:44 +05:00
|
|
|
|
void SaveRequestDate(string uid, DateTimeOffset remoteDate);
|
2021-04-07 18:01:56 +05:00
|
|
|
|
}
|
2021-12-07 15:55:11 +05:00
|
|
|
|
}
|