From 515978fab272cec55342103182af68c1dcddbfea Mon Sep 17 00:00:00 2001 From: chengsc <Demo@DESKTOP-CPA90BF> Date: 星期三, 13 十一月 2024 11:38:47 +0800 Subject: [PATCH] 修改问题 --- Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs index 70cb1b5..1ffa2f4 100644 --- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs +++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs @@ -127,8 +127,9 @@ } if (qty > d.Qty - q1) { - q1 += d.Qty - q1; dic.Add(stocks.First().Id, d.Qty - q1); + + q1 += d.Qty - q1; } else { @@ -149,10 +150,11 @@ } var q2 = demo.Qty - demo.LockQty - demo.FrozenQty; - if (q2 > d.Qty - q1) + if (q2 >= d.Qty - q1) { - q1 += d.Qty - q1; dic.Add(demo.Id, d.Qty - q1); + + q1 += d.Qty - q1; } else { @@ -161,7 +163,7 @@ } } - if (d.Qty >= q1) + if (d.Qty > q1) { stocks = stockList.Where(s => s.SkuNo == d.SkuNo && string.IsNullOrWhiteSpace(s.LotNo)).ToList(); if (stocks.Count == 0) @@ -169,10 +171,11 @@ throw new Exception($"鎬诲簱瀛樹腑鍑哄簱鐗╂枡淇℃伅:{d.SkuNo}搴撳瓨鏁伴噺涓嶈冻"); } var q2 = stocks.First().Qty - stocks.First().LockQty - stocks.First().FrozenQty; - if (q2 > d.Qty - q1) + if (q2 >= d.Qty - q1) { - q1 += d.Qty - q1; dic.Add(stocks.First().Id, d.Qty - q1); + + q1 += d.Qty - q1; } else { -- Gitblit v1.8.0