forked from ddrilling/AsbCloudServer
6c2feefff9
1. Добавлен сервис для суточных отчётов 2. Добавлены юнит тесты для сервиса с суточными отчётами
60 lines
2.1 KiB
C#
60 lines
2.1 KiB
C#
using System;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using AsbCloudApp.Data;
|
|
using AsbCloudApp.Data.DailyReport;
|
|
using AsbCloudApp.Data.DailyReport.Blocks;
|
|
using AsbCloudApp.Requests;
|
|
|
|
namespace AsbCloudApp.Services.DailyReport;
|
|
|
|
public interface IDailyReportService
|
|
{
|
|
/// <summary>
|
|
/// Создать отчёт
|
|
/// </summary>
|
|
/// <param name="idWell"></param>
|
|
/// <param name="dateStart"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<int> InsertAsync(int idWell, DateTime dateStart, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Обновить блок
|
|
/// </summary>
|
|
/// <param name="idDailyReport"></param>
|
|
/// <param name="idUser"></param>
|
|
/// <param name="editableBlock"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <typeparam name="TBlock"></typeparam>
|
|
/// <returns></returns>
|
|
Task<int> UpdateBlockAsync<TBlock>(int idDailyReport, int idUser, TBlock editableBlock, CancellationToken cancellationToken)
|
|
where TBlock : EditableBlock;
|
|
|
|
/// <summary>
|
|
/// Получить сформированный суточный отчёт
|
|
/// </summary>
|
|
/// <param name="idWell"></param>
|
|
/// <param name="dateStart"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<DailyReportDto> GetAsync(int idWell, DateTime dateStart, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Получить список суточных отчётов по скважине
|
|
/// </summary>
|
|
/// <param name="idWell"></param>
|
|
/// <param name="request"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<PaginationContainer<DailyReportDto>> GetAsync(int idWell, FileReportRequest request,
|
|
CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Получить диапазон дат по которым возможно сформировать суточный отчёты
|
|
/// </summary>
|
|
/// <param name="idWell"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<DatesRangeDto?> GetDatesRangeAsync(int idWell, CancellationToken cancellationToken);
|
|
} |