fix(API,DAL): Восстановлена работа контроллеров RobotTask, TemplateActivator, Template
This commit is contained in:
@@ -35,15 +35,6 @@ namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
//Формирует расписание в нормальном понятном виде из БД
|
||||
|
||||
var test = await dataContext.EsppSchValues
|
||||
//.Include(t => t.JobGroup)
|
||||
//.Include(t => t.EsppSchTypeConfig)
|
||||
// .ThenInclude(t => t!.EsppSchTypeSchedule)
|
||||
//.Include(t => t.EsppSchTypeConfig)
|
||||
// .ThenInclude(t => t.EsppSchType)
|
||||
//.Include(t => t.EsppSchTypeValue)
|
||||
.ToListAsync();
|
||||
|
||||
var schValues = await dataContext.EsppSchValues
|
||||
.Include(t => t.EsppSchTypeConfig)
|
||||
.ThenInclude(t => t!.EsppSchTypeSchedule)
|
||||
|
||||
@@ -38,7 +38,10 @@ namespace PARR.DAL.Services.Implementations
|
||||
.Include(a => a.Job)
|
||||
.ThenInclude(t => t!.Tnk)
|
||||
.ThenInclude(s => s!.Subprocess)
|
||||
.ThenInclude(p => p!.Process);
|
||||
.ThenInclude(p => p!.Process)
|
||||
.Include(t=>t.Job)
|
||||
.ThenInclude(t=>t!.Group);
|
||||
|
||||
//return Get()
|
||||
// .Include(h => h.Host)
|
||||
// .ThenInclude(t => t!.ResponseArea)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Common;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.DomainModels;
|
||||
@@ -13,8 +12,6 @@ namespace PARR.DAL.TransformServices
|
||||
internal class EsppScheduleTransformService : IEsppScheduleTransformService
|
||||
{
|
||||
private readonly IEsppSchTypeConfigService esppSchTypeConfigService;
|
||||
private readonly IApplicationsInWorkService applicationsInWorkService;
|
||||
private readonly IWeekendDayService weekendDayService;
|
||||
private readonly INextRunModifierService nextRunModifierService;
|
||||
private readonly IJobGroupService jobGroupService;
|
||||
private readonly ILogger<EsppScheduleTransformService> logger;
|
||||
@@ -59,15 +56,12 @@ namespace PARR.DAL.TransformServices
|
||||
public EsppScheduleTransformService(
|
||||
ILogger<EsppScheduleTransformService> logger,
|
||||
IEsppSchTypeConfigService esppSchTypeConfigService,
|
||||
IApplicationsInWorkService applicationsInWorkService,
|
||||
IWeekendDayService weekendDayService,
|
||||
INextRunModifierService nextRunModifierService,
|
||||
IJobGroupService jobGroupService
|
||||
)
|
||||
{
|
||||
this.esppSchTypeConfigService = esppSchTypeConfigService;
|
||||
this.applicationsInWorkService = applicationsInWorkService;
|
||||
this.weekendDayService = weekendDayService;
|
||||
this.nextRunModifierService = nextRunModifierService;
|
||||
this.jobGroupService = jobGroupService;
|
||||
this.logger = logger;
|
||||
@@ -167,13 +161,8 @@ namespace PARR.DAL.TransformServices
|
||||
if (lastRun > DateTimeOffset.UtcNow)
|
||||
return await nextRunModifierService.GetWorkDayAsync(lastRun);
|
||||
|
||||
//var appInWork = await applicationsInWorkService.Get()
|
||||
// .Include(aiw => aiw.EsppSchValues)
|
||||
// .ThenInclude(esv => esv.EsppSchTypeValue)
|
||||
// .ThenInclude(etv => etv!.DistributionPeriod)
|
||||
// .FirstOrDefaultAsync(t => t.Id == applicationInWorkId);
|
||||
var jobGroup = await jobGroupService.Get()
|
||||
.Include(t=>t.EsppSchValues)
|
||||
var jobGroup = await jobGroupService.Get().AsTracking()
|
||||
.Include(t => t.EsppSchValues)
|
||||
.ThenInclude(esv => esv.EsppSchTypeValue)
|
||||
.ThenInclude(etv => etv!.DistributionPeriod)
|
||||
.FirstOrDefaultAsync(t => t.Id == jobGroupId);
|
||||
|
||||
Reference in New Issue
Block a user