2022-07-25 18:02:39 +05:00
|
|
|
|
using AsbCloudApp.Data.DailyReport;
|
2022-04-26 16:45:52 +05:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudApp.Services
|
|
|
|
|
{
|
2022-08-05 17:16:11 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Суточный рапорт (сводка)
|
|
|
|
|
/// </summary>
|
2022-04-26 16:45:52 +05:00
|
|
|
|
public interface IDailyReportService
|
2022-08-05 17:16:11 +05:00
|
|
|
|
{
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// получить список сформированных рапортов по скважине за период времени
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="v1"></param>
|
|
|
|
|
/// <param name="v2"></param>
|
|
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-05-05 10:06:15 +05:00
|
|
|
|
Task<IEnumerable<DailyReportDto>> GetListAsync(int idWell, DateTime? v1, DateTime? v2, CancellationToken cancellationToken);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// получить из БД или генерировать данные для суточного рапорта за указанную дату
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="date"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-04-29 15:39:12 +05:00
|
|
|
|
Task<DailyReportDto> GetOrGenerateAsync(int idWell, DateTime date, CancellationToken token);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Добавить новый рапорт
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
2023-03-06 16:30:36 +05:00
|
|
|
|
/// <param name="startDate"></param>
|
2022-08-09 11:10:01 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2023-03-06 16:30:36 +05:00
|
|
|
|
Task<int> AddAsync(int idWell, DateTime startDate, CancellationToken token = default);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// изменить данные для суточного рапорта
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="date"></param>
|
|
|
|
|
/// <param name="dto"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-04-26 16:45:52 +05:00
|
|
|
|
Task<int> UpdateAsync(int idWell, DateTime date, DailyReportDto dto, CancellationToken token = default);
|
2022-08-09 11:10:01 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Сформировать файл рапорта
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="date"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2023-02-27 12:12:55 +05:00
|
|
|
|
Task<Stream?> MakeReportAsync(int idWell, DateTime date, CancellationToken token = default);
|
2023-03-06 16:30:36 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// изменить блок данных для суточного рапорта
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="Tdto"></typeparam>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="date"></param>
|
|
|
|
|
/// <param name="dto"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> UpdateBlockAsync<Tdto>(int idWell, DateTime date, Tdto dto, CancellationToken token);
|
2022-04-26 16:45:52 +05:00
|
|
|
|
}
|
|
|
|
|
}
|