2021-04-02 17:28:07 +05:00
|
|
|
|
using AsbCloudApp.Data;
|
2023-02-15 17:57:32 +05:00
|
|
|
|
using AsbCloudApp.Requests;
|
2021-10-20 12:52:31 +05:00
|
|
|
|
using System;
|
2021-04-02 17:28:07 +05:00
|
|
|
|
using System.Collections.Generic;
|
2021-08-11 16:54:42 +05:00
|
|
|
|
using System.Threading;
|
2021-08-11 12:11:21 +05:00
|
|
|
|
using System.Threading.Tasks;
|
2021-04-02 17:28:07 +05:00
|
|
|
|
|
|
|
|
|
namespace AsbCloudApp.Services
|
|
|
|
|
{
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// сервис скважин
|
|
|
|
|
/// </summary>
|
2022-12-01 15:56:11 +05:00
|
|
|
|
public interface IWellService : ICrudRepository<WellDto>
|
2021-04-02 17:28:07 +05:00
|
|
|
|
{
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// сервис телеметрии
|
|
|
|
|
/// </summary>
|
2021-12-30 17:05:44 +05:00
|
|
|
|
ITelemetryService TelemetryService { get; }
|
|
|
|
|
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Список скважин доступных компании
|
|
|
|
|
/// </summary>
|
2023-02-15 17:57:32 +05:00
|
|
|
|
/// <param name="request"></param>
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2023-02-15 17:57:32 +05:00
|
|
|
|
Task<IEnumerable<WellDto>> GetAsync(WellRequest request, CancellationToken token);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
2023-07-05 16:00:06 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Статистика по скважине
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<WellMapInfoWithTelemetryStat?> GetOrDefaultStatAsync(int idWell, CancellationToken token);
|
|
|
|
|
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// проверяет доступ к скважине для компании
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idCompany"></param>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2021-08-11 16:54:42 +05:00
|
|
|
|
Task<bool> IsCompanyInvolvedInWellAsync(int idCompany, int idWell, CancellationToken token);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
2023-07-05 16:00:06 +05:00
|
|
|
|
//TODO: remove that
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// получить название скважины по id
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2021-08-25 11:13:56 +05:00
|
|
|
|
Task<string> GetWellCaptionByIdAsync(int idWell, CancellationToken token);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2022-08-12 12:36:11 +05:00
|
|
|
|
/// список компаний участвующих в скважине
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-04-11 18:00:34 +05:00
|
|
|
|
Task<IEnumerable<CompanyDto>> GetCompaniesAsync(int idWell, CancellationToken token);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
|
|
|
|
//TODO: remove that
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="state"></param>
|
|
|
|
|
/// <returns></returns>
|
2021-10-20 12:52:31 +05:00
|
|
|
|
string GetStateText(int state);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// дата получения последних данных от панели
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <returns></returns>
|
2023-05-19 17:57:07 +05:00
|
|
|
|
DateTime GetLastTelemetryDate(int idWell);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
|
|
|
|
//TODO: выяснить и удалить отсюда
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// получение списка скважин куста в котором находится указанная скважина
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2021-11-22 17:29:19 +05:00
|
|
|
|
Task<IEnumerable<int>> GetClusterWellsIdsAsync(int idWell, CancellationToken token);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// часовой пояс скважины
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-01-05 17:50:45 +05:00
|
|
|
|
SimpleTimezoneDto GetTimezone(int idWell);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// диапазон дат с данными телеметрии
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-01-05 17:50:45 +05:00
|
|
|
|
DatesRangeDto GetDatesRange(int idWell);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Проверить задан ли у скважины часовой пояс и задать его если он не задан
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-06-06 15:43:47 +05:00
|
|
|
|
Task EnshureTimezonesIsSetAsync(CancellationToken token);
|
2023-02-15 17:57:32 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ВРЕМЕННЫЙ метод
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idCompany"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IEnumerable<DepositBranchDto>> GetWellTreeAsync(int idCompany, CancellationToken token);
|
2021-04-02 17:28:07 +05:00
|
|
|
|
}
|
|
|
|
|
}
|