|
|
@ -287,13 +287,28 @@ namespace Win.Sfs.SettleAccount.Bases |
|
|
|
//[Route("mainquery")]
|
|
|
|
public virtual async Task<PagedResultDto<TEntityDto>> MainQueryAsync(TRequestMainInput input) |
|
|
|
{ |
|
|
|
var invs= await _invRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount).ConfigureAwait(false); |
|
|
|
var invbills = invs.Select(p => p.InvbillNum).ToList(); |
|
|
|
|
|
|
|
var entitys = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount).ConfigureAwait(false); |
|
|
|
|
|
|
|
entitys=entitys.Where(p => invbills.Contains(p.BillNum)).ToList(); |
|
|
|
|
|
|
|
var totalCount = await _repository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false); |
|
|
|
var dtos = ObjectMapper.Map<List<TEntity>, List<TEntityDto>>(entitys); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dtos = dtos.Where(p => invbills.Contains(p.BillNum)).ToList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var entity= entitys.FirstOrDefault(); |
|
|
|
var invoices =entitys.Select(p => p.BillNum); |
|
|
|
var entities=_invRepository.Where(p => invoices.Contains(p.InvbillNum)).ToList(); |
|
|
|
|
|
|
|
|
|
|
|
foreach (var itm in dtos) |
|
|
|
{ |
|
|
|
var pd = entities.FirstOrDefault(p => p.InvbillNum == itm.BillNum); |
|
|
|