2023-07-24 11:14:07 +05:00
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using AsbCloudApp.Data;
|
|
|
|
|
using AsbCloudApp.Data.AutogeneratedDailyReport;
|
|
|
|
|
using AsbCloudApp.Requests;
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudApp.Services.AutoGeneratedDailyReports;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Сервис для работы с авто-генерируемыми суточными отчётами
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IAutoGeneratedDailyReportService
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Список файлов суточных отчётов
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
|
|
/// <returns></returns>
|
2023-07-25 17:07:50 +05:00
|
|
|
|
Task<PaginationContainer<AutoGeneratedDailyReportInfoDto>> GetListAsync(int idWell,
|
2023-07-24 11:14:07 +05:00
|
|
|
|
AutoGeneratedDailyReportRequest request,
|
|
|
|
|
CancellationToken cancellationToken);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Генерация файла с отчётом
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="reportDate"></param>
|
|
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
|
|
/// <returns></returns>
|
2023-08-14 11:54:30 +05:00
|
|
|
|
Task<(string fileName, Stream stream)> GenerateAsync(int idWell, DateOnly reportDate,
|
2023-07-24 11:14:07 +05:00
|
|
|
|
CancellationToken cancellationToken);
|
2023-08-14 11:54:30 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получение диапазона дат
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<DatesRangeDto?> GetDatesRangeAsync(int idWell, CancellationToken cancellationToken);
|
2023-07-24 11:14:07 +05:00
|
|
|
|
}
|