feat(api): JobGroupResponse, TemplateResponse - отображение настроек автораспределения
This commit is contained in:
@@ -86,7 +86,9 @@ namespace PARR.API.Controllers.V1
|
||||
query = query.Where(t => t.GroupName.ToLower().Contains(filter.Name.ToLower()));
|
||||
|
||||
if (filter.IsFull)
|
||||
query = query.Include(t => t.Jobs).ThenInclude(t => t.Tnk);
|
||||
query = query
|
||||
.Include(t => t.Jobs).ThenInclude(t => t.Tnk)
|
||||
.Include(t => t.DistributionConfig).ThenInclude(t => t.DistributionPeriod);
|
||||
|
||||
var jobGroups = await groupService.GetPage(query, paginationFilter).ToListAsync();
|
||||
|
||||
@@ -119,6 +121,7 @@ namespace PARR.API.Controllers.V1
|
||||
.Include(t => t.GroupingUnitField)
|
||||
.Include(t => t.ScheduleExcludeType)
|
||||
.Include(t => t.ScheduleExcludeTypeCalendar)
|
||||
.Include(t => t.DistributionConfig).ThenInclude(t => t.DistributionPeriod)
|
||||
.FirstOrDefaultAsync(t => t.Id == id);
|
||||
|
||||
if (jobGroup == null)
|
||||
@@ -187,6 +190,7 @@ namespace PARR.API.Controllers.V1
|
||||
.Include(t => t.GroupingUnitField)
|
||||
.Include(t => t.ScheduleExcludeType)
|
||||
.Include(t => t.ScheduleExcludeTypeCalendar)
|
||||
.Include(t => t.DistributionConfig).ThenInclude(t => t.DistributionPeriod)
|
||||
.FirstAsync(t => t.Id == jobGroup.Id);
|
||||
|
||||
var locationUri = uriService.GetUri(ApiRoutes.JobGroup.Get, ApiRoutes.JobGroup.getParam, createdJobGroup.Id);
|
||||
@@ -290,6 +294,7 @@ namespace PARR.API.Controllers.V1
|
||||
.Include(t => t.GroupingUnitField)
|
||||
.Include(t => t.ScheduleExcludeType)
|
||||
.Include(t => t.ScheduleExcludeTypeCalendar)
|
||||
.Include(t => t.DistributionConfig).ThenInclude(t => t.DistributionPeriod)
|
||||
.FirstAsync(t => t.Id == orig.Id);
|
||||
|
||||
var response = mapper.Map<JobGroupResponse>(updatedJobGroup);
|
||||
|
||||
Reference in New Issue
Block a user