DD.WellWorkover.Cloud/AsbCloudApp/Services/IDetectedOperationService.cs

92 lines
3.9 KiB
C#
Raw Normal View History

using System;
using AsbCloudApp.Data.DetectedOperation;
2022-04-28 15:04:13 +05:00
using AsbCloudApp.Requests;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using AsbCloudApp.Data.WellOperation;
2022-04-28 15:04:13 +05:00
namespace AsbCloudApp.Services
{
2022-08-05 17:16:11 +05:00
/// <summary>
/// Сервис автоматически определенных по телеметрии операций
/// </summary>
2022-04-28 15:04:13 +05:00
public interface IDetectedOperationService
{
/// <summary>
/// Добавление операций
/// </summary>
/// <param name="idEditor"></param>
/// <param name="idWell"></param>
/// <param name="dtos"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<int> InsertRangeManualAsync(int idEditor, int idWell, IEnumerable<DetectedOperationDto> dtos, CancellationToken token);
/// <summary>
/// Редактирование операций
/// </summary>
/// <param name="idEditor"></param>
/// <param name="idWell"></param>
/// <param name="dtos"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<int> UpdateRangeManualAsync(int idEditor, int idWell, IEnumerable<DetectedOperationDto> dtos, CancellationToken token);
2022-08-05 17:16:11 +05:00
/// <summary>
/// Список названий операций.
/// Если указан idWell, то возвращается список названий операций найденных на указанной скважине.
/// </summary>
/// <param name="idWell"></param>
/// <param name="token"></param>
/// <returns></returns>
2024-02-08 11:38:25 +05:00
Task<IEnumerable<WellOperationCategoryDto>> GetCategoriesAsync(int? idWell, CancellationToken token);
2022-08-05 17:16:11 +05:00
/// <summary>
/// Получить автоматически определенные по телеметрии операции с анализом по бурильщикам
/// </summary>
/// <param name="request"></param>
/// <param name="token"></param>
/// <returns></returns>
2024-02-08 11:38:25 +05:00
Task<DetectedOperationListDto> GetAsync(DetectedOperationByWellRequest request, CancellationToken token);
/// <summary>
/// Получить автоматически определенные по телеметрии операции
/// </summary>
/// <param name="request"></param>
/// <param name="token"></param>
/// <returns></returns>
2024-02-08 11:38:25 +05:00
Task<IEnumerable<DetectedOperationWithDrillerDto>> GetOperationsAsync(DetectedOperationByWellRequest request, CancellationToken token);
2022-08-05 17:16:11 +05:00
/// <summary>
/// Удалить операции
/// </summary>
/// <param name="request"></param>
/// <param name="token"></param>
/// <returns></returns>
2024-02-08 11:38:25 +05:00
Task<int> DeleteAsync(DetectedOperationByWellRequest request, CancellationToken token);
2022-08-05 17:16:11 +05:00
/// <summary>
/// Статистика по операциям
/// </summary>
/// <param name="request"></param>
/// <param name="token"></param>
/// <returns></returns>
[Obsolete]
2024-02-08 11:38:25 +05:00
Task<IEnumerable<DetectedOperationStatDto>> GetOperationsStatAsync(DetectedOperationByWellRequest request, CancellationToken token);
/// <summary>
/// Определение операций
/// </summary>
/// <param name="idTelemetry"></param>
/// <param name="request"></param>
/// <param name="lastDetectedOperation"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<(DateTimeOffset LastDate, IEnumerable<DetectedOperationDto> Items)> DetectOperationsAsync(int idTelemetry,
TelemetryDataRequest request,
DetectedOperationDto? lastDetectedOperation,
CancellationToken token);
2022-04-28 15:04:13 +05:00
}
}