From da9f1ff60784714c03da07d9a28945380450103f Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 17 Mar 2022 18:19: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 | 40 +++++++++++++------ 1 file changed, 27 insertions(+), 13 deletions(-) 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) {