forked from ddrilling/AsbCloudServer
100 lines
3.7 KiB
C#
100 lines
3.7 KiB
C#
using AsbCloudApp.Data;
|
||
using AsbCloudApp.Requests;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Threading;
|
||
using System.Threading.Tasks;
|
||
|
||
namespace AsbCloudApp.Repositories
|
||
{
|
||
/// <summary>
|
||
/// сервис операций по скважине
|
||
/// </summary>
|
||
public interface IWellOperationRepository
|
||
{
|
||
/// <summary>
|
||
/// список названий операций
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
IEnumerable<WellOperationCategoryDto> GetCategories(bool includeParents);
|
||
|
||
/// <summary>
|
||
/// Список секций
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
IDictionary<int, string> GetSectionTypes();
|
||
|
||
/// <summary>
|
||
/// список плановых операций для сопоставления
|
||
/// <param name="idWell"></param>
|
||
/// <param name="token"></param>
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
Task<IEnumerable<WellOperationDto>> GetOperationsPlanAsync(int idWell, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// дата/время первой операции по скважине
|
||
/// </summary>
|
||
/// <param name="idWell"></param>
|
||
/// <returns></returns>
|
||
DateTimeOffset? FirstOperationDate(int idWell);
|
||
|
||
/// <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>
|
||
/// Получить операцию по id
|
||
/// </summary>
|
||
/// <param name="id"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<WellOperationDto?> GetOrDefaultAsync(int id, 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="wellOperationDtos"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<int> InsertRangeAsync(IEnumerable<WellOperationDto> wellOperationDtos, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Обновить существующую операцию
|
||
/// </summary>
|
||
/// <param name="dto"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<int> UpdateAsync(WellOperationDto dto, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Удалить операции по id
|
||
/// </summary>
|
||
/// <param name="ids"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<int> DeleteAsync(IEnumerable<int> ids, CancellationToken token);
|
||
}
|
||
} |