63 lines
2.7 KiB
C#
63 lines
2.7 KiB
C#
using PARR.Constants;
|
|
using PARR.DAL.DomainModels;
|
|
|
|
namespace PARR.DAL.TransformServices
|
|
{
|
|
/// <summary>
|
|
/// Сервис трансформации расписания ЕСПП в дату/расписание
|
|
/// </summary>
|
|
public interface IEsppScheduleTransformService
|
|
{
|
|
/// <summary>
|
|
/// Получить следующую дату согласно расписания
|
|
/// </summary>
|
|
/// <param name="esppSchedule"></param>
|
|
/// <param name="lastRun"></param>
|
|
/// <returns></returns>
|
|
DateTimeOffset GetNextDate(EsppScheduleDto esppSchedule, DateTimeOffset lastRun);
|
|
|
|
///// <summary>
|
|
///// Получить расписание
|
|
///// </summary>
|
|
///// <param name="esppSchedule"></param>
|
|
///// <param name="lastRun"></param>
|
|
///// <returns></returns>
|
|
//List<DateTimeOffset> GetNextSchedule(EsppScheduleDto esppSchedule, DateTimeOffset lastRun);
|
|
|
|
/// <summary>
|
|
/// Получить следующую дату по applicationInWorkId
|
|
/// </summary>
|
|
/// <param name="applicationInWorkId"></param>
|
|
/// <param name="lastRun"></param>
|
|
/// <returns></returns>
|
|
Task<DateTimeOffset> GetNextDateAsync(Guid applicationInWorkId, DateTimeOffset lastRun);
|
|
|
|
/// <summary>
|
|
/// Получить расписание по applicationInWorkId
|
|
/// </summary>
|
|
/// <param name="applicationInWorkId"></param>
|
|
/// <param name="lastRun"></param>
|
|
/// <returns></returns>
|
|
Task<List<DateTimeOffset>> GetNextScheduleAsync(Guid applicationInWorkId, DateTimeOffset lastRun);
|
|
|
|
|
|
/// <summary>
|
|
/// Получить следующую дату срабатывания в указанном периоде
|
|
/// </summary>
|
|
/// <param name="lastRun"></param>
|
|
/// <param name="periodType"></param>
|
|
/// <param name="distributionPeriod"></param>
|
|
/// <returns></returns>
|
|
DateTimeOffset GetNextDateForDistributionRun(DateTimeOffset lastRun, DistributionPeriodTypeEnum periodType, string distributionPeriod);
|
|
|
|
|
|
/// <summary>
|
|
/// Получить дату начала периода распределения относительно опорной даты (Reference Date)
|
|
/// </summary>
|
|
/// <param name="applicationInWorkId"></param>
|
|
/// <param name="date"></param>
|
|
/// <returns></returns>
|
|
Task<DateOnly> GetStartPeriodForDateAsync(Guid applicationInWorkId, DateTimeOffset date, DateTimeOffset refrenceDate, DistributionPeriodTypeEnum periodType, string distributionPeriod);
|
|
}
|
|
}
|