From d5d6697f13c2883cad2d180ed86c3b76cc69b47f Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期五, 05 十二月 2025 09:03:32 +0800
Subject: [PATCH] 提交

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 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/OutboundPickingService.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/OutboundPickingService.cs"
index 193040f..5345170 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/OutboundPickingService.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/OutboundPickingService.cs"
@@ -1687,10 +1687,18 @@
                 WarehouseId = originalTask.WarehouseId
 
             };
-            // 淇濆瓨鍥炲簱浠诲姟
-            var insertcount = await _taskRepository.Db.Insertable(returnTask).ExecuteCommandAsync();
-            if (insertcount <= 0)
+            try
             {
+                // 淇濆瓨鍥炲簱浠诲姟
+                var insertcount = await _taskRepository.Db.Insertable(returnTask).ExecuteCommandAsync();
+                if (insertcount <= 0)
+                {
+                    throw new Exception("鍒涘缓浠诲姟澶辫触锛�");
+                }
+            }
+            catch (Exception ex) 
+            {
+                _logger.LogInformation($"CreateReturnTaskAndHandleESS 鍒涘缓浠诲姟澶辫触: {orderNo} 锛� {palletCode}");
                 throw new Exception("鍒涘缓浠诲姟澶辫触锛�");
             }
             var targetAddress = originalTask.TargetAddress;

--
Gitblit v1.9.3