From 13696e4f5535623ec5fc0b6f37310e78c2c383c5 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期五, 19 十二月 2025 15:02:18 +0800
Subject: [PATCH] 1

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
index 7638deb..3855414 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
@@ -277,7 +277,7 @@
                 result.OutboundOrder = outboundOrder;
                 result.SelectedDetails = selectedDetails;
 
-                if (outboundOrder.IsBatch == 0 && request.DetailIds.Count > 1)
+                if (outboundOrder.IsBatch == 0 || request.DetailIds.Count > 1)
                 {
                     // 澶氭槑缁嗗嚭搴擄細鎸夌墿鏂欏垎缁勫鐞�
                     result.MaterielCalculations = CalcMaterielOutboundQuantities(outboundOrder, selectedDetails.ToList());
@@ -429,6 +429,8 @@
                 throw new Exception($"鐗╂枡 {materielCalc.MaterielCode} 鍙敤搴撳瓨 {totalAvailableStock} 涓嶈冻鍑哄簱鏁伴噺 {materielCalc.UnallocatedQuantity}");
             }
 
+            //decimal remainingQuantity = Math.Min(totalAvailableStock, materielCalc.UnallocatedQuantity);
+
             // 闇�鍒嗛厤鏁伴噺
             decimal remainingQuantity = materielCalc.UnallocatedQuantity;
 

--
Gitblit v1.9.3