This commit is contained in:
ai.astrakhantsev 2023-02-02 11:04:53 +05:00
parent e2948782fa
commit 1f80e38c10
3 changed files with 9 additions and 9 deletions

View File

@ -29,7 +29,7 @@ namespace AsbCloudApp.Services
/// <param name="request"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<IEnumerable<ProcessMapDto>?> GetByRequesProcessMaplAsync(List<ProcessMapRequest> request, CancellationToken token);
Task<IEnumerable<ProcessMapDto>?> GetByRequesProcessMaplAsync(IEnumerable<ProcessMapRequest> request, CancellationToken token);
}
#nullable disable
}

View File

@ -49,7 +49,7 @@ namespace AsbCloudInfrastructure.Repository
return dtos;
}
public async Task<IEnumerable<ProcessMapDto>?> GetByRequesProcessMaplAsync(List<ProcessMapRequest> request, CancellationToken token)
public async Task<IEnumerable<ProcessMapDto>?> GetByRequesProcessMaplAsync(IEnumerable<ProcessMapRequest> request, CancellationToken token)
{
var entities = await BuildQuery(request)
.ToListAsync(token)

View File

@ -54,14 +54,14 @@ namespace AsbCloudInfrastructure.Repository
public async Task<IEnumerable<ProcessMapDto>?> GetCompositeProcessMap(int idWell, CancellationToken token)
{
var dtos = await GetAsync(idWell, token);
var idWells = dtos.Select(c => c.IdWellSrc);
var idWellSectionTypes = dtos.Select(c => c.IdWellSectionType);
var request = new List<ProcessMapRequest>
var request = new List<ProcessMapRequest>(dtos.Count());
foreach(var dto in dtos)
{
new ProcessMapRequest {
IdWell = idWell
}
request.Add(new ProcessMapRequest
{
IdWell = dto.IdWellSrc,
IdWellSectionTypes = dto.IdWellSectionType
});
};
var processMap = (await processMapRepository.GetByRequesProcessMaplAsync(request, token));