diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs index b61d74ff..d147e491 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs @@ -69,10 +69,24 @@ namespace Win.Sfs.SettleAccount.Bases //[Route("detailquery")] public virtual async Task> DetailQueryAsync(TRequestDetailInput input) { + List filters = new List(); + filters.Add("ParentBillNum"); + filters.Add("InvBillNum"); + filters.Add("IsReturn"); + var ls = input.Filters.Where(p =>filters.Contains( p.Column )).ToList(); + if (ls.Count > 0) + { + foreach (var itm in ls) + { + input.Filters.Remove(itm); + } + } var entitys = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount).ConfigureAwait(false); var totalCount = await _detailRepository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false); var dtos = ObjectMapper.Map, List>(entitys); + + return new PagedResultDto(totalCount, dtos); } @@ -85,21 +99,28 @@ namespace Win.Sfs.SettleAccount.Bases //[Route("export")] public virtual async Task ExportAsync(TRequestDetailInput input) { - IExporter _csv = new CsvExporter(); - IExporter _excel = new ExcelExporter(); - var entities = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true).ConfigureAwait(false); - var dtoDetails = ObjectMapper.Map, List>(entities); - - - - - - + var entities = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true).ConfigureAwait(false); + List filters = new List(); + filters.Add("ParentBillNum"); + filters.Add("InvBillNum"); + filters.Add("IsReturn"); + var ls = input.Filters.Where(p => filters.Contains(p.Column)).ToList(); + if (ls.Count > 0) + { + foreach (var itm in ls) + { + input.Filters.Remove(itm); + } + } + IExporter _csv = new CsvExporter(); + IExporter _excel = new ExcelExporter(); + + var dtoDetails = ObjectMapper.Map, List>(entities); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs index 3549647d..d28fefda 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs @@ -301,8 +301,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ { try { - var bbacSaDelItems = await GetBBACSaDelItemsAsync(id).ConfigureAwait(false); + var bbacSaDelItems = await GetBBACSaDelItemsAsync(id).ConfigureAwait(false); bbacSas.AddRange(bbacSaDelItems.bbacSas); bbacSaDetails.AddRange(bbacSaDelItems.bbacSaDetails); bbacCanSas.AddRange(bbacSaDelItems.bbacCanSas);