feat(all): ! Критические изменения логики работы всех сервисорв, База Данных имееет неокончательную версию. Template, Scheduler переведены на работу с Unit+Job+JobGroup вместо Host+ApplicationsInWork
This commit is contained in:
@@ -71,11 +71,11 @@ namespace PARR.API.Controllers.V1
|
||||
case RobotsEnum.TemplateOrder:
|
||||
// шаблоны
|
||||
query = query.Include(t => t.Template)
|
||||
.ThenInclude(t => t!.Host).ThenInclude(t => t!.ResponseArea)
|
||||
.ThenInclude(t => t!.Hosts).ThenInclude(t => t.WorkGroup).ThenInclude(t => t!.ResponseArea)
|
||||
.ThenInclude(t => t!.Unit)
|
||||
//.ThenInclude(t => t!.Hosts).ThenInclude(t => t.WorkGroup).ThenInclude(t => t!.ResponseArea)
|
||||
.Include(t => t.Template)
|
||||
.ThenInclude(a => a!.ApplicationsInWork)
|
||||
.ThenInclude(w => w!.Work)
|
||||
.ThenInclude(a => a!.Job)
|
||||
//.ThenInclude(w => w!.Work)
|
||||
.ThenInclude(t => t!.Tnk)
|
||||
.ThenInclude(s => s!.Subprocess)
|
||||
.ThenInclude(p => p!.Process);
|
||||
@@ -84,10 +84,12 @@ namespace PARR.API.Controllers.V1
|
||||
//расписание
|
||||
// тут не делаем AsSplitQuery, не может подтянуть все таблицы
|
||||
query = query.Include(t => t.Template)
|
||||
.ThenInclude(t => t!.Host).ThenInclude(t => t!.ResponseArea)
|
||||
.ThenInclude(t => t!.Hosts).ThenInclude(t => t.WorkGroup)
|
||||
.ThenInclude(t => t!.Unit)//.ThenInclude(t => t!.ResponseArea)
|
||||
//.ThenInclude(t => t!.Hosts).ThenInclude(t => t.WorkGroup)
|
||||
.Include(t => t.Template)
|
||||
.ThenInclude(t => t!.ApplicationsInWork)
|
||||
.ThenInclude(t => t!.Job)
|
||||
.ThenInclude(t => t!.Group)
|
||||
//.ThenInclude(t => t!.ApplicationsInWork)
|
||||
.ThenInclude(t => t!.EsppSchValues)
|
||||
.ThenInclude(t => t!.EsppSchTypeConfig)
|
||||
.ThenInclude(t => t!.EsppSchTypeSchedule);
|
||||
@@ -169,7 +171,7 @@ namespace PARR.API.Controllers.V1
|
||||
// передаем LastRun, если его нет, то NextRun
|
||||
//var nextRun = await esppScheduleTransformService.GetNextDateAsync(task.Template!.ApplicationInWorkId, task.Template.ApplicationsInWork!.LastRun ?? task.Template.ApplicationsInWork.NextRun);
|
||||
// всегда считаем по nextRun
|
||||
var nextRun = await esppScheduleTransformService.GetNextDateAsync(template.ApplicationInWorkId, template.NextRun);
|
||||
var nextRun = await esppScheduleTransformService.GetNextDateAsync(template.Job!.GroupId, template.NextRun);
|
||||
|
||||
if (nextRun != template.NextRun)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user