fix(API,DAL): Восстановлена работа контроллеров RobotTask, TemplateActivator, Template
This commit is contained in:
@@ -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