feat(api,dal): статистика распределения. Список рабочих и выходных формируется в зависимости от времени МСК

This commit is contained in:
Mikhail Trubnikov
2026-01-28 14:40:40 +10:00
parent e60fbfdc3a
commit 76bd6aa111
9 changed files with 209 additions and 26 deletions

View File

@@ -6,20 +6,23 @@ namespace PARR.Test.NextRun
{
internal class NextRunTest
{
//private readonly ITemplateDistributor templateDistributor;
private readonly ITemplateDistributor templateDistributor;
private readonly INextRunService nextRunService;
public NextRunTest(/*ITemplateDistributor templateDistributor,*/ INextRunService nextRunService)
public NextRunTest(ITemplateDistributor templateDistributor, INextRunService nextRunService)
{
//this.templateDistributor = templateDistributor;
this.templateDistributor = templateDistributor;
this.nextRunService = nextRunService;
}
int periodDays = 10;
DateTimeOffset referenceDate = new DateTimeOffset(2025, 1, 20, 5, 0, 0, TimeSpan.Zero);
DateTimeOffset referenceDate = new DateTimeOffset(2025, 1, 20, 3, 0, 0, TimeSpan.Zero);
public async Task Test()
{
// GetWorkDaysTESTAsync
var aaa = await templateDistributor.GetWorkDaysTESTAsync(GetDateStart(), GetDateStart().AddDays(periodDays), true, referenceDate);
//await DistributeTemplatesAsync();
//await GetValidNextRunForTemplateAsync();

View File

@@ -35,6 +35,9 @@ namespace PARR.Test
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
//var aaa = DateTimeOffset.UtcNow;
//var bbb = aaa.ToOffset(new TimeSpan(3, 0, 0));
#region NextRunTest