2021-09-10 11:28:57 +05:00
|
|
|
|
using AsbCloudApp.Data;
|
2022-12-21 18:02:22 +05:00
|
|
|
|
using AsbCloudApp.Requests;
|
2021-09-10 11:28:57 +05:00
|
|
|
|
using System;
|
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;
|
|
|
|
|
|
2022-12-28 17:38:53 +05:00
|
|
|
|
namespace AsbCloudApp.Repositories
|
2021-08-13 17:25:06 +05:00
|
|
|
|
{
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// сервис операций по скважине
|
|
|
|
|
/// </summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
public interface IWellOperationRepository
|
2021-08-13 17:25:06 +05:00
|
|
|
|
{
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// список названий операций
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
2023-02-15 18:02:36 +05:00
|
|
|
|
IEnumerable<WellOperationCategoryDto> GetCategories(bool includeParents);
|
2021-08-16 14:19:43 +05:00
|
|
|
|
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// Список секций
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
2023-07-19 16:39:17 +05:00
|
|
|
|
IEnumerable<WellSectionTypeDto> GetSectionTypes();
|
2021-08-16 14:19:43 +05:00
|
|
|
|
|
2023-02-15 17:02:43 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// список плановых операций для сопоставления
|
|
|
|
|
/// <param name="idWell"></param>
|
2023-02-20 15:17:49 +05:00
|
|
|
|
/// <param name="currentDate"></param>
|
2023-02-16 09:51:55 +05:00
|
|
|
|
/// <param name="token"></param>
|
2023-02-15 17:02:43 +05:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
2023-02-21 16:15:36 +05:00
|
|
|
|
Task<WellOperationPlanDto> GetOperationsPlanAsync(int idWell, DateTime? currentDate, CancellationToken token);
|
2023-02-15 17:02:43 +05:00
|
|
|
|
|
2022-12-02 15:54:55 +05:00
|
|
|
|
/// <summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// дата/время первой операции по скважине
|
2022-12-02 15:54:55 +05:00
|
|
|
|
/// </summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// <param name="idWell"></param>
|
2022-12-02 15:54:55 +05:00
|
|
|
|
/// <returns></returns>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
DateTimeOffset? FirstOperationDate(int idWell);
|
2022-12-02 15:54:55 +05:00
|
|
|
|
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// Получить страницу списка операций
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// </summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// <param name="request"></param>
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
Task<IEnumerable<WellOperationDto>> GetAsync(WellOperationRequest request, CancellationToken token);
|
2021-08-16 14:19:43 +05:00
|
|
|
|
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// Получить страницу списка операций
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// </summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// <param name="request"></param>
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
Task<PaginationContainer<WellOperationDto>> GetPageAsync(WellOperationRequest request, CancellationToken token);
|
2021-08-16 14:19:43 +05:00
|
|
|
|
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// Получить операцию по id
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// </summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// <param name="id"></param>
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
Task<WellOperationDto?> GetOrDefaultAsync(int id, CancellationToken token);
|
2021-08-16 14:19:43 +05:00
|
|
|
|
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// Получить статистику операции по скважине с группировкой по категориям
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// </summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// <param name="request"></param>
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
Task<IEnumerable<WellGroupOpertionDto>> GetGroupOperationsStatAsync(
|
|
|
|
|
WellOperationRequest request,
|
|
|
|
|
CancellationToken token);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// Добавить несколько операций за один раз
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// </summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// <param name="wellOperationDtos"></param>
|
|
|
|
|
/// <param name="token"></param>
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <returns></returns>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
Task<int> InsertRangeAsync(IEnumerable<WellOperationDto> wellOperationDtos, CancellationToken token);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// Обновить существующую операцию
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// </summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// <param name="dto"></param>
|
|
|
|
|
/// <param name="token"></param>
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <returns></returns>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
Task<int> UpdateAsync(WellOperationDto dto, CancellationToken token);
|
2022-12-27 14:30:52 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// Удалить операции по id
|
2022-12-27 14:30:52 +05:00
|
|
|
|
/// </summary>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
/// <param name="ids"></param>
|
2022-12-27 14:30:52 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-12-28 17:38:53 +05:00
|
|
|
|
Task<int> DeleteAsync(IEnumerable<int> ids, CancellationToken token);
|
2023-10-06 15:19:02 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить секции скважин из операций ГГД. Секцие поделены на плановые и фактические.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idsWells"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IEnumerable<SectionByOperationsDto>> GetSectionsAsync(IEnumerable<int> idsWells, CancellationToken token);
|
2021-08-13 17:25:06 +05:00
|
|
|
|
}
|
2022-12-28 17:38:53 +05:00
|
|
|
|
}
|