forked from ddrilling/AsbCloudServer
94 lines
3.4 KiB
C#
94 lines
3.4 KiB
C#
using AsbCloudApp.Data;
|
|
using AsbCloudApp.Data.WellOperation;
|
|
using AsbCloudApp.Requests;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AsbCloudApp.Repositories;
|
|
|
|
/// <summary>
|
|
/// сервис операций по скважине
|
|
/// </summary>
|
|
public interface IWellOperationRepository
|
|
{
|
|
/// <summary>
|
|
/// Список секций
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
IEnumerable<WellSectionTypeDto> GetSectionTypes();
|
|
|
|
|
|
/// <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);
|
|
|
|
/// <summary>
|
|
/// Обновить существующую операцию
|
|
/// </summary>
|
|
/// <param name="dtos"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<int> UpdateRangeAsync(IEnumerable<WellOperationBaseDto> dtos, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Удалить операции по id
|
|
/// </summary>
|
|
/// <param name="ids"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<int> DeleteRangeAsync(IEnumerable<int> ids, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Получить секции скважин из операций ГГД. Секцие поделены на плановые и фактические.
|
|
/// </summary>
|
|
/// <param name="idsWells"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<IEnumerable<SectionByOperationsDto>> GetSectionsAsync(IEnumerable<int> idsWells, CancellationToken token);
|
|
|
|
/// <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);
|
|
|
|
/// <summary>
|
|
/// Возвращает первую и последнюю фактическую операцию
|
|
/// </summary>
|
|
/// <param name="idWell"></param>
|
|
/// <returns></returns>
|
|
(WellOperationBaseDto First, WellOperationBaseDto Last)? GetFirstAndLastFact(int idWell);
|
|
|
|
/// <summary>
|
|
/// Получить список операций по запросу
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<IEnumerable<WellOperationBaseDto>> GetAll(WellOperationRequest request, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Получить список операций по запросу
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<IEnumerable<WellOperationBaseDto>> GetAll(WellOperationRepositoryRequest request, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Получить список операций по ключу скважины
|
|
/// </summary>
|
|
/// <param name="idWell"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<IEnumerable<WellOperationBaseDto>> GetAll(int idWell, CancellationToken token);
|
|
} |