From 753361f589444455fe1b20476c658201ccd92c38 Mon Sep 17 00:00:00 2001
From: helongyang <647556386@qq.com>
Date: 星期三, 30 七月 2025 09:53:19 +0800
Subject: [PATCH] 更新优化

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs"
index 9ea6759..833e973 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs"
@@ -95,7 +95,7 @@
                 }
                 else if (outOrderDTO.OType==2)
                 {
-                    warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA101.ToString());
+                    warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA71.ToString());
                 }
                 List<Dt_ProOutOrderDetail> proOutOrderDetails = new List<Dt_ProOutOrderDetail>();
                 Dictionary<string,string> keyValuePairs =new Dictionary<string, string>();
@@ -804,20 +804,20 @@
                             
                             //鏇存柊鍑哄簱鏄庣粏鍗曟暟閲�
                             proOutOrderDetail.OverQtyPcs += item.Quantity;
-                            item.Quantity -= item.Quantity;
-                            float Range = itemOut.StockPcsQty / itemOut.SETQty;
+                            int Range = (int)itemOut.StockPcsQty / (int)itemOut.SETQty;
                             if (Range == 0)
                             {
-                                return content.Error($"{itemOut.BagNo}鍗曞厓鏁伴噺杞崲澶辫触,璇锋鏌�");
+                                return content.Error($"{itemOut.BagNo}鍗曞厓鏁伴噺杞崲澶辫触,璇锋鏌�,Range:{Range}");
                             }
-                            int outSet = (int)(item.Quantity / Range);
+                            int outSet =item.Quantity / Range;
                             if (outSet == 0)
                             {
-                                return content.Error($"{itemOut.BagNo}鍗曞厓鏁伴噺杞崲澶辫触,璇锋鏌�");
+                                return content.Error($"{itemOut.BagNo}鍗曞厓鏁伴噺杞崲澶辫触,璇锋鏌�,outSet:{outSet}");
                             }
                             itemOut.SETQty -= outSet;
                             
                             itemOut.StockPcsQty -= item.Quantity;
+                            item.Quantity = 0;
                             if (proOutOrderDetail.OverQtyPcs > proOutOrderDetail.QtyPcs)
                             {
                                 return content.Error($"鍑哄簱鍗晎proOutOrder.ProOutOrderNo}閿�鍞鍗晎item.SoNumber}鏁伴噺婧㈠嚭{proOutOrderDetail.OverQtyPcs - proOutOrderDetail.QtyPcs}");

--
Gitblit v1.9.3