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);