feat(templateDistributor): заготовка основных методов

This commit is contained in:
Mikhail Kuznetsov
2024-07-02 15:04:23 +10:00
parent a486149017
commit cf5a465546
4 changed files with 43 additions and 7 deletions

View File

@@ -14,16 +14,23 @@ namespace PARR.TemplateDistributor
}
//TODO: AppInWorkId - перераспределение, очередь
//public async Task
// распределить?
// не распределить, NextRun = appInWork.ReferenceDate
public async Task UpdateScheduleAsync(Guid applicationInWorkId)
{
// все шаблоны по applicationInWorkId
// группирует по РР
// -> DistributeTemplateForPeriodAsync
// сохранить в БД
}
public async Task<List<Template>> DistributeTemplateForPeriodAsync(List<Template> templates, Guid applicationInWorkId)
public async Task<List<Template>> DistributeTemplateAsync(List<Template> templates, Guid applicationInWorkId)
{
//TODO: ЗАГУЛШКА переделать!
// распределить?
// не распределить, NextRun = appInWork.ReferenceDate
var appInWork = await applicationsInWorkService.Get().FirstOrDefaultAsync(t => t.Id == applicationInWorkId);
if (appInWork == null)
{