2024-07-04 11:02:45 +05:00
|
|
|
using AsbCloudApp.Data;
|
2024-05-08 10:47:31 +05:00
|
|
|
using AsbCloudApp.Data.WellOperation;
|
|
|
|
using AsbCloudApp.Requests;
|
2021-08-18 16:57:20 +05:00
|
|
|
using System.Collections.Generic;
|
2021-08-16 14:19:43 +05:00
|
|
|
using System.Threading;
|
2021-08-13 17:25:06 +05:00
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
namespace AsbCloudApp.Repositories;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// сервис операций по скважине
|
|
|
|
/// </summary>
|
|
|
|
public interface IWellOperationRepository
|
2021-08-13 17:25:06 +05:00
|
|
|
{
|
2022-08-09 11:10:01 +05:00
|
|
|
/// <summary>
|
2024-08-19 10:01:07 +05:00
|
|
|
/// Список секций
|
2022-08-09 11:10:01 +05:00
|
|
|
/// </summary>
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <returns></returns>
|
|
|
|
IEnumerable<WellSectionTypeDto> GetSectionTypes();
|
2024-05-08 10:47:31 +05:00
|
|
|
|
2022-08-09 11:10:01 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Добавить несколько операций
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="dtos"></param>
|
|
|
|
/// <param name="deleteBeforeInsert"></param>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task<int> InsertRangeAsync(IEnumerable<WellOperationBaseDto> dtos, bool deleteBeforeInsert, CancellationToken token);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Обновить существующую операцию
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="dtos"></param>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task<int> UpdateRangeAsync(IEnumerable<WellOperationBaseDto> dtos, CancellationToken token);
|
2022-12-27 14:30:52 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Удалить операции по id
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="ids"></param>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task<int> DeleteRangeAsync(IEnumerable<int> ids, CancellationToken token);
|
2023-10-06 15:19:02 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Получить секции скважин из операций ГГД. Секцие поделены на плановые и фактические.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="idsWells"></param>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task<IEnumerable<SectionByOperationsDto>> GetSectionsAsync(IEnumerable<int> idsWells, CancellationToken token);
|
2023-12-11 10:58:03 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Получить диапазон дат выполнения операций
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
/// <param name="idType"></param>
|
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task<DatesRangeDto?> GetDatesRangeAsync(int idWell, int idType, CancellationToken cancellationToken);
|
2024-05-08 10:47:31 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Возвращает первую и последнюю фактическую операцию
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
(WellOperationBaseDto First, WellOperationBaseDto Last)? GetFirstAndLastFact(int idWell);
|
2024-08-14 12:24:54 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Получить список операций по запросу
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="request"></param>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task<IEnumerable<WellOperationBaseDto>> GetAll(WellOperationRequest request, CancellationToken token);
|
2024-08-15 17:46:04 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Получить список операций по запросу
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="request"></param>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task<IEnumerable<WellOperationBaseDto>> GetAll(WellOperationRepositoryRequest request, CancellationToken token);
|
2024-08-15 17:46:04 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Получить список операций по ключу скважины
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task<IEnumerable<WellOperationBaseDto>> GetAll(int idWell, CancellationToken token);
|
2022-12-28 17:38:53 +05:00
|
|
|
}
|