From 354e848a5800999e3b56754e0cc3ec3d1fb798b8 Mon Sep 17 00:00:00 2001 From: Administrator Date: Tue, 22 Mar 2022 09:35:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/WMS/WmsUnInterface.cs | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs index e0f985c8..4aa36846 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs @@ -172,7 +172,28 @@ namespace Win.Sfs.SettleAccount.Entities.WMS virtual public async Task> GetListAsync(WmsRequestDetailReportDto input) { + if (!string.IsNullOrEmpty(input.Client)) + { + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Client", Logic = EnumFilterLogic.And, Value = input.Client }); + } + + if (!string.IsNullOrEmpty(input.Type)) + { + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Type", Logic = EnumFilterLogic.And, Value = input.Type }); + } + + if (!string.IsNullOrEmpty(input.MaterialGroup)) + { + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "MaterialGroup", Logic = EnumFilterLogic.And, Value = input.MaterialGroup }); + } + + if (!string.IsNullOrEmpty(input.BillNum)) + { + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum }); + } + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); + var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true); var totalCount = await GetCountAsync(input); @@ -198,6 +219,26 @@ namespace Win.Sfs.SettleAccount.Entities.WMS private async Task GetCountAsync(WmsRequestDetailReportDto input) { + if (!string.IsNullOrEmpty(input.Client)) + { + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Client", Logic = EnumFilterLogic.And, Value = input.Client }); + } + + if (!string.IsNullOrEmpty(input.Type)) + { + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Type", Logic = EnumFilterLogic.And, Value = input.Type }); + } + + if (!string.IsNullOrEmpty(input.MaterialGroup)) + { + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "MaterialGroup", Logic = EnumFilterLogic.And, Value = input.MaterialGroup }); + } + + if (!string.IsNullOrEmpty(input.BillNum)) + { + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum }); + } + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); // input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum }); return await _wmsRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);