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

70 lines
2.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using AsbCloudApp.Data;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace AsbCloudApp.Services
{
/// <summary>
/// Сервис рапортов
/// </summary>
public interface IReportService
{
/// <summary>
/// категория рапорта
/// </summary>
int ReportCategoryId { get; }
/// <summary>
/// Поставить рапорт в очередь на формирование
/// </summary>
/// <param name="idWell"></param>
/// <param name="idUser"></param>
/// <param name="stepSeconds"></param>
/// <param name="format"></param>
/// <param name="begin"></param>
/// <param name="end"></param>
/// <param name="handleReportProgress"></param>
/// <returns></returns>
string EnqueueCreateReportWork(int idWell, int idUser, int stepSeconds,
int format, DateTime begin, DateTime end,
Action<object, string> handleReportProgress);
/// <summary>
/// Получить предполагаемый список страниц рапорта
/// </summary>
/// <param name="idWell"></param>
/// <param name="begin"></param>
/// <param name="end"></param>
/// <param name="stepSeconds"></param>
/// <param name="format"></param>
/// <returns></returns>
int GetReportPagesCount(int idWell, DateTime begin, DateTime end,
int stepSeconds, int format);
/// <summary>
/// получить диапазон дат за которые есть данные
/// </summary>
/// <param name="idWell"></param>
/// <returns></returns>
DatesRangeDto? GetDatesRangeOrDefault(int idWell);
/// <summary>
/// Список готовых рапортов
/// </summary>
/// <param name="idWell"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<IEnumerable<ReportPropertiesDto>> GetAllReportsByWellAsync(int idWell, CancellationToken token);
/// <summary>
/// Удаление отчетов, с момента загрузки которых прошло n дней
/// </summary>
/// <param name="lifetime">период хранения на сервере скачанных отчетов</param>
/// <param name="token"></param>
/// <returns></returns>
Task<int> DeleteAllOldReportsAsync(TimeSpan lifetime, CancellationToken token);
}
}