diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs index c7408f87..2b0c1b11 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdFeedingService.cs @@ -466,9 +466,13 @@ namespace Tnb.ProductionMgr if (detail.feeding_num + num < detail.num) { + if (wmsCarryCode.codeqty < num) + { + throw new Exception("条码数量小于签收数量"); + } await db.Updateable() .SetColumns(x => x.codeqty == x.codeqty - num) - .Where(x => x.carry_id == detail.member_carry_id) + .Where(x => x.carry_id == carry.id) .ExecuteCommandAsync(); } else