From c3fa41a4ec97b23032f9fad5f8783905fb39c27d Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期二, 09 十二月 2025 10:46:03 +0800
Subject: [PATCH] 提交

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 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_InboundService/InboundOrderService.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_InboundService/InboundOrderService.cs"
index 72f08a3..cbb1f79 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_InboundService/InboundOrderService.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_InboundService/InboundOrderService.cs"
@@ -681,8 +681,10 @@
                         return WebResponseContent.Instance.Error($"鎵樼洏{palletCode}涓嬫湭鎵惧埌鏉$爜{barcode}鐨勬槑缁嗚褰�");
                     }
 
+                    ResetInboundOrderStatus(new List<string> { targetDetail.OrderNo},new List<string> { targetDetail.Barcode});
                     // 鍒犻櫎鎸囧畾鏄庣粏
                     _stockDetailRepository.DeleteData(targetDetail);
+
 
                     // 閲嶆柊鏌ヨ鍓╀綑鏄庣粏锛堜繚璇佹暟鎹噯纭�э級
                     var remainingDetails = _stockDetailRepository.Db.Queryable<Dt_StockInfoDetail>()
@@ -748,8 +750,13 @@
 
                 if (inboundOrder == null) continue;
 
-                inboundOrder.OrderStatus = 0;
-                _inboundOrderRepository.UpdateData(inboundOrder);
+                bool isSingleBarcode = barcodes != null && barcodes.Count == 1;
+                if (!isSingleBarcode)
+                {
+                    // 闈炲崟涓潯鐮侊紙鏁村崟/澶氫釜鏉$爜锛夛細閲嶇疆涓昏〃鐘舵�佷负0
+                    inboundOrder.OrderStatus = 0;
+                    _inboundOrderRepository.UpdateData(inboundOrder);
+                }
 
                 // 閲嶇疆鍏ュ簱鍗曟槑缁嗙姸鎬�
                 if (inboundOrder.Details == null || !inboundOrder.Details.Any()) continue;

--
Gitblit v1.9.3