feat(api): в ApplicationInWork добавлена информация о статусах AutoControl

This commit is contained in:
Mikhail Trubnikov
2024-09-11 14:59:37 +10:00
parent a8416564c2
commit 295a95c22a
4 changed files with 21 additions and 14 deletions

View File

@@ -74,7 +74,8 @@ namespace PARR.API.Controllers.V1
query = query
.Include(t => t.Work)
//.Include(t => t.Templates) - большой запрос, делаем его отдельно
.Include(t => t.WorkGroups).ThenInclude(t => t.WorkGroup);
.Include(t => t.WorkGroups).ThenInclude(t => t.WorkGroup)
.Include(t => t.JobAutoControl);
}
query = query.OrderBy(t => t.ShortDescription).ThenBy(t => t.Application!.Name);
@@ -123,6 +124,7 @@ namespace PARR.API.Controllers.V1
.Include(t => t.Work)
//.Include(t => t.Templates)
.Include(t => t.WorkGroups).ThenInclude(t => t.WorkGroup)
.Include(t => t.JobAutoControl)
.FirstOrDefaultAsync(t => t.Id == id);
if (applicationInWork == null)
@@ -206,6 +208,7 @@ namespace PARR.API.Controllers.V1
.Include(t => t.Work)
//.Include(t => t.Templates)
.Include(t => t.WorkGroups).ThenInclude(t => t.WorkGroup)
.Include(t => t.JobAutoControl)
.FirstAsync(t => t.Id == applicationInWork.Id);
var locationUri = uriService.GetUri(ApiRoutes.Job.Get, ApiRoutes.Job.getParam, createdApplicationInWork.Id);
@@ -320,6 +323,7 @@ namespace PARR.API.Controllers.V1
.Include(t => t.Work)
//.Include(t => t.Templates)
.Include(t => t.WorkGroups).ThenInclude(t => t.WorkGroup)
.Include(t => t.JobAutoControl)
.FirstAsync(t => t.Id == orig.Id);
var response = mapper.Map<ApplicationInWorkResponse>(updatedApplicationInWork);