feat(dal, TemplateDistributorWorker): NextRunServiceV2 - реализован метод распределения шаблонов. Обновлен TemplateDistributorWorker для использования новой логики.

This commit is contained in:
Mikhail Trubnikov
2026-02-13 15:39:21 +10:00
parent 858dd8c31c
commit 89b6cdf731
7 changed files with 234 additions and 46 deletions

View File

@@ -540,7 +540,7 @@ namespace PARR.DAL.NextRunServices.Subservices
var updatedTemplates = new List<TemplateNextRunResultDto>(templatesToKeep);
foreach (var template in templatesToReassign)
foreach (var template in templatesToReassign.OrderBy(t => t.NextRun))
{
var nextRunInTargetTz = FindNextAvailableDateWithLoad(currentDailyLoad, workDays, referenceDateInTargetTz, expectedDailyLoad, targetOffset);
if (nextRunInTargetTz.HasValue)