From 4fb449fa207bdda7911f7220573d2ffc703d99a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Thu, 2 Nov 2023 16:09:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=AF=E7=94=A8=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/Prices/PriceListAppService.cs | 2 -- .../Entities/Prices/PriceListAppServiceBJ.cs | 19 +++++++++++++++++++ .../Prices/PriceListAppServiceYinDu.cs | 18 ++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs index 4fec848c..dd6d14fa 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs @@ -238,8 +238,6 @@ namespace Win.Sfs.SettleAccount.Entities.Prices input.Filters.Remove(entiy); } - - var entities = await _priceListRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false); var totalCount = await _priceListRepository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false); var dtos = ObjectMapper.Map, List>(entities); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs index 49f3407d..b52dad85 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs @@ -17,6 +17,7 @@ using Win.Sfs.SettleAccount.Constant; using Win.Sfs.SettleAccount.Entities.BQ.Dtos; using Win.Sfs.SettleAccount.ExcelImporter; using Win.Sfs.SettleAccount.ExportReports; +using Win.Sfs.Shared.Filter; using Win.Sfs.Shared.RepositoryBase; namespace Win.Sfs.SettleAccount.Entities.Prices @@ -206,6 +207,24 @@ namespace Win.Sfs.SettleAccount.Entities.Prices [HttpPost] public async Task> GetListAsync(RequestDto input) { + var ls = input.Filters.Where(p => p.Column == "codeType").ToList(); + if (ls.Count > 0) + { + var entiy = input.Filters.Where(p => p.Column == "codeType").FirstOrDefault(); + var value = entiy.Value; + if (value == "03") + { + input.Filters.Add(new Shared.Filter.FilterCondition() { Column = "iscancel", Action = EnumFilterAction.Equal, Logic = EnumFilterLogic.And, Value = "true" }); + } + else + { + input.Filters.Add(new Shared.Filter.FilterCondition() { Column = "iscancel", Action = EnumFilterAction.Equal, Logic = EnumFilterLogic.And, Value = "false" }); + } + input.Filters.Remove(entiy); + } + + + var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false); var totalCount = await _repository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false); var dtos = ObjectMapper.Map, List>(entities); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceYinDu.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceYinDu.cs index 02194e6f..970c38bf 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceYinDu.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceYinDu.cs @@ -17,6 +17,7 @@ using Win.Sfs.SettleAccount.Constant; using Win.Sfs.SettleAccount.Entities.BQ.Dtos; using Win.Sfs.SettleAccount.ExcelImporter; using Win.Sfs.SettleAccount.ExportReports; +using Win.Sfs.Shared.Filter; using Win.Sfs.Shared.RepositoryBase; namespace Win.Sfs.SettleAccount.Entities.Prices @@ -201,6 +202,23 @@ namespace Win.Sfs.SettleAccount.Entities.Prices [HttpPost] public async Task> GetListAsync(RequestDto input) { + var ls = input.Filters.Where(p => p.Column == "codeType").ToList(); + if (ls.Count > 0) + { + var entiy = input.Filters.Where(p => p.Column == "codeType").FirstOrDefault(); + var value = entiy.Value; + if (value == "03") + { + input.Filters.Add(new Shared.Filter.FilterCondition() { Column = "iscancel", Action = EnumFilterAction.Equal, Logic = EnumFilterLogic.And, Value = "true" }); + } + else + { + input.Filters.Add(new Shared.Filter.FilterCondition() { Column = "iscancel", Action = EnumFilterAction.Equal, Logic = EnumFilterLogic.And, Value = "false" }); + } + input.Filters.Remove(entiy); + } + + var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false); var totalCount = await _repository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false); var dtos = ObjectMapper.Map, List>(entities);