forked from ddrilling/AsbCloudServer
65 lines
2.5 KiB
C#
65 lines
2.5 KiB
C#
using AsbCloudApp.Data.DailyReport;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AsbCloudApp.Services
|
|
{
|
|
/// <summary>
|
|
/// Суточный рапорт (сводка)
|
|
/// </summary>
|
|
public interface IDailyReportService
|
|
{
|
|
/// <summary>
|
|
/// получить список сформированных рапортов по скважине за период времени
|
|
/// </summary>
|
|
/// <param name="idWell"></param>
|
|
/// <param name="v1"></param>
|
|
/// <param name="v2"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<IEnumerable<DailyReportDto>> GetListAsync(int idWell, DateTime? v1, DateTime? v2, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Добавить новый рапорт
|
|
/// </summary>
|
|
/// <param name="idWell"></param>
|
|
/// <param name="startDate"></param>
|
|
/// <param name="idUser"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<int> AddAsync(int idWell, DateTime startDate, int idUser, CancellationToken token = default);
|
|
|
|
/// <summary>
|
|
/// изменить данные для суточного рапорта
|
|
/// </summary>
|
|
/// <param name="idWell"></param>
|
|
/// <param name="date"></param>
|
|
/// <param name="dto"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<int> UpdateAsync(int idWell, DateTime date, DailyReportDto dto, CancellationToken token = default);
|
|
|
|
/// <summary>
|
|
/// Сформировать файл рапорта
|
|
/// </summary>
|
|
/// <param name="idWell"></param>
|
|
/// <param name="date"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<Stream?> MakeReportAsync(int idWell, DateTime date, CancellationToken token = default);
|
|
|
|
/// <summary>
|
|
/// изменить блок данных для суточного рапорта
|
|
/// </summary>
|
|
/// <param name="idWell"></param>
|
|
/// <param name="startDate"></param>
|
|
/// <param name="dto"></param>
|
|
/// <param name="token"></param>
|
|
/// <returns></returns>
|
|
Task<int> UpdateBlockAsync(int idWell, DateTime startDate, ItemInfoDto dto, CancellationToken token);
|
|
}
|
|
}
|