|
|
@ -30,6 +30,7 @@ using Win.Sfs.SettleAccount.CommonManagers; |
|
|
|
using Win.Sfs.SettleAccount.Constant; |
|
|
|
using Win.Sfs.SettleAccount.Entities.BQ; |
|
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Dtos; |
|
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ; |
|
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Syncs; |
|
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; |
|
|
|
using Win.Sfs.SettleAccount.Entities.TaskJobs; |
|
|
@ -43,7 +44,7 @@ namespace Win.Sfs.SettleAccount.Bases |
|
|
|
public class PD_SERVICE<TEntity, TEntityDto, TEntityDetail, TEntityDetailDto, TRequestMainInput, TRequestDetailInput, TEntityDetailExportDto> : BASE_SERVICE |
|
|
|
where TEntity : PD_BASE_MAIN |
|
|
|
where TEntityDetail : PD_BASE |
|
|
|
where TEntityDto : class, IEntityDto<Guid>, new() |
|
|
|
where TEntityDto : PD_DTO, new() |
|
|
|
where TEntityDetailDto : class, IEntityDto<Guid>, new() |
|
|
|
where TRequestMainInput : RequestInputBase |
|
|
|
where TRequestDetailInput : RequestInputBase |
|
|
@ -290,6 +291,18 @@ namespace Win.Sfs.SettleAccount.Bases |
|
|
|
var entitys = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount).ConfigureAwait(false); |
|
|
|
var totalCount = await _repository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false); |
|
|
|
var dtos = ObjectMapper.Map<List<TEntity>, List<TEntityDto>>(entitys); |
|
|
|
|
|
|
|
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); |
|
|
|
if (pd != null) |
|
|
|
{ |
|
|
|
itm.InvState = pd.State; |
|
|
|
} |
|
|
|
} |
|
|
|
return new PagedResultDto<TEntityDto>(totalCount, dtos); |
|
|
|
} |
|
|
|
|
|
|
|