forked from ddrilling/AsbCloudServer
#8103063 BuildQuery
This commit is contained in:
parent
e2948782fa
commit
1f80e38c10
@ -29,7 +29,7 @@ namespace AsbCloudApp.Services
|
|||||||
/// <param name="request"></param>
|
/// <param name="request"></param>
|
||||||
/// <param name="token"></param>
|
/// <param name="token"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<IEnumerable<ProcessMapDto>?> GetByRequesProcessMaplAsync(List<ProcessMapRequest> request, CancellationToken token);
|
Task<IEnumerable<ProcessMapDto>?> GetByRequesProcessMaplAsync(IEnumerable<ProcessMapRequest> request, CancellationToken token);
|
||||||
}
|
}
|
||||||
#nullable disable
|
#nullable disable
|
||||||
}
|
}
|
@ -49,7 +49,7 @@ namespace AsbCloudInfrastructure.Repository
|
|||||||
return dtos;
|
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)
|
var entities = await BuildQuery(request)
|
||||||
.ToListAsync(token)
|
.ToListAsync(token)
|
||||||
|
@ -54,14 +54,14 @@ namespace AsbCloudInfrastructure.Repository
|
|||||||
public async Task<IEnumerable<ProcessMapDto>?> GetCompositeProcessMap(int idWell, CancellationToken token)
|
public async Task<IEnumerable<ProcessMapDto>?> GetCompositeProcessMap(int idWell, CancellationToken token)
|
||||||
{
|
{
|
||||||
var dtos = await GetAsync(idWell, token);
|
var dtos = await GetAsync(idWell, token);
|
||||||
var idWells = dtos.Select(c => c.IdWellSrc);
|
var request = new List<ProcessMapRequest>(dtos.Count());
|
||||||
var idWellSectionTypes = dtos.Select(c => c.IdWellSectionType);
|
foreach(var dto in dtos)
|
||||||
|
|
||||||
var request = new List<ProcessMapRequest>
|
|
||||||
{
|
{
|
||||||
new ProcessMapRequest {
|
request.Add(new ProcessMapRequest
|
||||||
IdWell = idWell
|
{
|
||||||
}
|
IdWell = dto.IdWellSrc,
|
||||||
|
IdWellSectionTypes = dto.IdWellSectionType
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var processMap = (await processMapRepository.GetByRequesProcessMaplAsync(request, token));
|
var processMap = (await processMapRepository.GetByRequesProcessMaplAsync(request, token));
|
||||||
|
Loading…
Reference in New Issue
Block a user