forked from ddrilling/AsbCloudServer
70 lines
2.5 KiB
C#
70 lines
2.5 KiB
C#
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>
|
|
/// Удаление отчетов, если превышен их период хранения
|
|
/// </summary>
|
|
/// <param name="lifetime">период хранения отчетов</param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<int> DeleteAllOldReportsAsync(TimeSpan lifetime, CancellationToken token);
|
|
}
|
|
}
|