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 25210685..cdf3721c 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs @@ -161,23 +161,37 @@ namespace Win.Sfs.SettleAccount.Entities.WMS [UnitOfWork(false)] virtual public async Task OutputAsync(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.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.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 }); - } - //input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); + //if (!string.IsNullOrEmpty(input.MaterialGroup)) + //{ + // input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "MaterialGroup", Logic = EnumFilterLogic.And, Value = input.MaterialGroup }); + //} + + + + + + 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, int.MaxValue, 0, true); + + var count = entities.GroupBy(p => new { p.MaterialGroupCode, p.Type, p.ClientCode }).Count(); + + if (count > 1) + { + throw new BusinessException("8989", "记录不在同一物料组车型、出库类型、客户编码"); + return false; + } + List _ls = new List(); if (entities.Count() > 0) {