forked from ddrilling/AsbCloudServer
108 lines
3.5 KiB
C#
108 lines
3.5 KiB
C#
using AsbCloudApp.Data;
|
||
using AsbCloudApp.Requests;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Threading;
|
||
using System.Threading.Tasks;
|
||
|
||
namespace AsbCloudApp.Services;
|
||
|
||
/// <summary>
|
||
/// сервис скважин
|
||
/// </summary>
|
||
public interface IWellService : ICrudRepository<WellDto>
|
||
{
|
||
/// <summary>
|
||
/// сервис телеметрии
|
||
/// </summary>
|
||
ITelemetryService TelemetryService { get; }
|
||
|
||
/// <summary>
|
||
/// Список скважин доступных компании
|
||
/// </summary>
|
||
/// <param name="request"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<IEnumerable<WellDto>> GetAsync(WellRequest request, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Статистика по скважине
|
||
/// </summary>
|
||
/// <param name="idWell"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<WellMapInfoWithTelemetryStat?> GetOrDefaultStatAsync(int idWell, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// проверяет доступ к скважине для компании
|
||
/// </summary>
|
||
/// <param name="idCompany"></param>
|
||
/// <param name="idWell"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<bool> IsCompanyInvolvedInWellAsync(int idCompany, int idWell, CancellationToken token);
|
||
|
||
//TODO: remove that
|
||
/// <summary>
|
||
/// получить название скважины по id
|
||
/// </summary>
|
||
/// <param name="idWell"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<string> GetWellCaptionByIdAsync(int idWell, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// список компаний участвующих в скважине
|
||
/// </summary>
|
||
/// <param name="idWell"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<IEnumerable<CompanyDto>> GetCompaniesAsync(int idWell, CancellationToken token);
|
||
|
||
//TODO: remove that
|
||
/// <summary>
|
||
///
|
||
/// </summary>
|
||
/// <param name="state"></param>
|
||
/// <returns></returns>
|
||
string GetStateText(int state);
|
||
|
||
/// <summary>
|
||
/// дата получения последних данных от панели
|
||
/// </summary>
|
||
/// <param name="idWell"></param>
|
||
/// <returns></returns>
|
||
DateTimeOffset GetLastTelemetryDate(int idWell);
|
||
|
||
//TODO: выяснить и удалить отсюда
|
||
/// <summary>
|
||
/// получение списка скважин куста в котором находится указанная скважина
|
||
/// </summary>
|
||
/// <param name="idWell"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<IEnumerable<int>> GetClusterWellsIdsAsync(int idWell, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// часовой пояс скважины
|
||
/// </summary>
|
||
/// <param name="idWell"></param>
|
||
/// <returns></returns>
|
||
SimpleTimezoneDto GetTimezone(int idWell);
|
||
|
||
/// <summary>
|
||
/// диапазон дат с данными телеметрии
|
||
/// </summary>
|
||
/// <param name="idWell"></param>
|
||
/// <returns></returns>
|
||
DatesRangeDto GetDatesRange(int idWell);
|
||
|
||
/// <summary>
|
||
/// ВРЕМЕННЫЙ метод
|
||
/// </summary>
|
||
/// <param name="idCompany"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<IEnumerable<DepositBranchDto>> GetWellTreeAsync(int idCompany, CancellationToken token);
|
||
}
|