fix(API,DAL): Восстановлена работа контроллеров RobotTask, TemplateActivator, Template

This commit is contained in:
Mikhail Kuznetsov
2025-06-27 13:42:13 +10:00
parent 03c7852378
commit 91ddd2ae96
12 changed files with 71 additions and 65 deletions

View File

@@ -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);