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="token"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<ProcessMapDto>?> GetByRequesProcessMaplAsync(List<ProcessMapRequest> request, CancellationToken token);
|
||||
Task<IEnumerable<ProcessMapDto>?> GetByRequesProcessMaplAsync(IEnumerable<ProcessMapRequest> request, CancellationToken token);
|
||||
}
|
||||
#nullable disable
|
||||
}
|
@ -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)
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user