forked from ddrilling/AsbCloudServer
87 lines
3.4 KiB
C#
87 lines
3.4 KiB
C#
using AsbCloudApp.Data;
|
||
using System.Collections.Generic;
|
||
using System.Threading;
|
||
using System.Threading.Tasks;
|
||
using AsbCloudApp.Data.WellOperation;
|
||
using AsbCloudApp.Requests;
|
||
|
||
namespace AsbCloudApp.Repositories
|
||
{
|
||
/// <summary>
|
||
/// сервис операций по скважине
|
||
/// </summary>
|
||
public interface IWellOperationRepository
|
||
{
|
||
/// <summary>
|
||
/// Список секций
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
IEnumerable<WellSectionTypeDto> GetSectionTypes();
|
||
|
||
/// <summary>
|
||
/// Получить страницу списка операций
|
||
/// </summary>
|
||
/// <param name="request"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<IEnumerable<WellOperationDto>> GetAsync(WellOperationRequest request, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Получить страницу списка операций
|
||
/// </summary>
|
||
/// <param name="request"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<PaginationContainer<WellOperationDto>> GetPageAsync(WellOperationRequest request, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Получить статистику операции по скважине с группировкой по категориям
|
||
/// </summary>
|
||
/// <param name="request"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<IEnumerable<WellGroupOpertionDto>> GetGroupOperationsStatAsync(WellOperationRequest request, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Добавить несколько операций
|
||
/// </summary>
|
||
/// <param name="dtos"></param>
|
||
/// <param name="deleteBeforeInsert"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<int> InsertRangeAsync(IEnumerable<WellOperationDto> dtos, bool deleteBeforeInsert, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Обновить существующую операцию
|
||
/// </summary>
|
||
/// <param name="dto"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<int> UpdateRangeAsync(IEnumerable<WellOperationDto> 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);
|
||
}
|
||
} |