2021-09-10 11:28:57 +05:00
|
|
|
|
using AsbCloudApp.Data;
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudApp.Services
|
|
|
|
|
{
|
2022-12-06 22:34:10 +05:00
|
|
|
|
#nullable enable
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// сервис операций по скважине
|
|
|
|
|
/// </summary>
|
2021-08-13 17:25:06 +05:00
|
|
|
|
public interface IWellOperationService
|
|
|
|
|
{
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// список названий операций
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
2021-08-18 14:52:52 +05:00
|
|
|
|
IEnumerable<WellOperationCategoryDto> GetCategories();
|
2021-08-16 14:19:43 +05:00
|
|
|
|
|
2022-08-09 11:10:01 +05:00
|
|
|
|
// TODO: объединить параметры в объект запроса
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить список операций
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="operationType"></param>
|
|
|
|
|
/// <param name="sectionTypeIds"></param>
|
|
|
|
|
/// <param name="operationCategoryIds"></param>
|
|
|
|
|
/// <param name="begin"></param>
|
|
|
|
|
/// <param name="end"></param>
|
|
|
|
|
/// <param name="minDepth"></param>
|
|
|
|
|
/// <param name="maxDepth"></param>
|
|
|
|
|
/// <param name="skip"></param>
|
|
|
|
|
/// <param name="take"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2021-08-18 16:57:20 +05:00
|
|
|
|
Task<PaginationContainer<WellOperationDto>> GetOperationsAsync(
|
|
|
|
|
int idWell,
|
2021-12-07 18:27:52 +05:00
|
|
|
|
int? operationType = null,
|
2022-12-06 22:34:10 +05:00
|
|
|
|
IEnumerable<int>? sectionTypeIds = null,
|
|
|
|
|
IEnumerable<int>? operationCategoryIds = null,
|
2021-08-18 16:57:20 +05:00
|
|
|
|
DateTime begin = default,
|
|
|
|
|
DateTime end = default,
|
2021-08-23 16:59:26 +05:00
|
|
|
|
double minDepth = double.MinValue,
|
|
|
|
|
double maxDepth = double.MaxValue,
|
2021-08-18 16:57:20 +05:00
|
|
|
|
int skip = 0,
|
|
|
|
|
int take = 32,
|
|
|
|
|
CancellationToken token = default);
|
2021-08-16 14:19:43 +05:00
|
|
|
|
|
2022-12-02 15:54:55 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить статистику операции по скважине с группировкой по категориям
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="operationType"></param>
|
|
|
|
|
/// <param name="sectionTypeIds"></param>
|
|
|
|
|
/// <param name="operationCategoryIds"></param>
|
|
|
|
|
/// <param name="begin"></param>
|
|
|
|
|
/// <param name="end"></param>
|
|
|
|
|
/// <param name="minDepth"></param>
|
|
|
|
|
/// <param name="maxDepth"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IEnumerable<WellGroupOpertionDto>> GetGroupOperationsStatAsync(
|
|
|
|
|
int idWell,
|
|
|
|
|
int? operationType = null,
|
2022-12-06 22:34:10 +05:00
|
|
|
|
IEnumerable<int>? sectionTypeIds = null,
|
|
|
|
|
IEnumerable<int>? operationCategoryIds = null,
|
2022-12-02 15:54:55 +05:00
|
|
|
|
DateTime begin = default,
|
|
|
|
|
DateTime end = default,
|
|
|
|
|
double minDepth = double.MinValue,
|
|
|
|
|
double maxDepth = double.MaxValue,
|
|
|
|
|
CancellationToken token = default);
|
|
|
|
|
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить операцию по id
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-12-06 22:34:10 +05:00
|
|
|
|
Task<WellOperationDto?> GetAsync(int id, CancellationToken token);
|
2021-08-16 14:19:43 +05:00
|
|
|
|
|
2022-08-09 11:10:01 +05:00
|
|
|
|
//todo: idWell Не нужен
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Добавить несколько операций за один раз
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="wellOperationDtos"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2021-08-16 14:19:43 +05:00
|
|
|
|
Task<int> InsertRangeAsync(int idWell,
|
|
|
|
|
IEnumerable<WellOperationDto> wellOperationDtos, CancellationToken token);
|
|
|
|
|
|
2022-08-09 11:10:01 +05:00
|
|
|
|
//todo: id Не нужны
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Обновить существующую операцию
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="idOperation"></param>
|
|
|
|
|
/// <param name="item"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2021-09-10 11:28:57 +05:00
|
|
|
|
Task<int> UpdateAsync(int idWell, int idOperation, WellOperationDto item,
|
2021-08-16 14:19:43 +05:00
|
|
|
|
CancellationToken token);
|
|
|
|
|
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Удалить операции по id
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ids"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2021-08-16 14:19:43 +05:00
|
|
|
|
Task<int> DeleteAsync(IEnumerable<int> ids, CancellationToken token);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Список секций
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
2021-12-22 17:09:26 +05:00
|
|
|
|
IDictionary<int, string> GetSectionTypes();
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// дата/время первой операции по скважине
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-05-06 16:35:16 +05:00
|
|
|
|
DateTimeOffset? FirstOperationDate(int idWell);
|
2021-08-13 17:25:06 +05:00
|
|
|
|
}
|
2022-12-06 22:34:10 +05:00
|
|
|
|
#nullable disable
|
2021-08-13 17:25:06 +05:00
|
|
|
|
}
|