From 513da724807c2fed2d4ec772b31d054a550d391a Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期三, 28 一月 2026 14:13:55 +0800
Subject: [PATCH] 1
---
WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/OutboundOrderDetailService.cs | 46 ++++++++++++++++++++++------------------------
1 files changed, 22 insertions(+), 24 deletions(-)
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/OutboundOrderDetailService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/OutboundOrderDetailService.cs
index 23849ff..191af24 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/OutboundOrderDetailService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/OutboundOrderDetailService.cs
@@ -673,15 +673,15 @@
return WebResponseContent.Instance.Error("璇ュ嚭搴撳崟鎹潪ERP鎺ㄩ�侊紝鏃犳硶鍙栨秷");
}
string ids ="";
- foreach (var item in outboundOrderDetails)
+ try
{
- ids = item.LinId;
- var postContent = new MultipartFormDataContent();
- postContent.Add(new StringContent(ids), "ids");
- string result = string.Empty;
- HttpClient client = null;
- try
+ foreach (var item in outboundOrderDetails)
{
+ ids = item.LinId;
+ var postContent = new MultipartFormDataContent();
+ postContent.Add(new StringContent(ids), "ids");
+ string result = string.Empty;
+ HttpClient client = null;
using (client = new HttpClient())
{
// 2. 鍙戦�佽姹�
@@ -708,26 +708,24 @@
_outboundRepository.OutboundOrderRepository.DeleteAndMoveIntoHty(outboundOrder, OperateType.浜哄伐鍙栨秷);
}
_unitOfWorkManage.CommitTran();
- // 鍋囪ERP杩斿洖鎴愬姛鏃惰繑鍥炴垚鍔熷搷搴�
- return WebResponseContent.Instance.OK(result);
-
}
- catch (HttpRequestException ex)
- {
- _unitOfWorkManage.RollbackTran();
- // 澶勭悊HTTP璇锋眰鐩稿叧寮傚父
- return WebResponseContent.Instance.Error($"HTTP璇锋眰閿欒: {ex.Message}");
-
- }
- catch (Exception ex)
- {
- _unitOfWorkManage.RollbackTran();
- // 澶勭悊鍏朵粬寮傚父
- return WebResponseContent.Instance.Error($"澶勭悊澶辫触: {ex.Message}");
- }
+ // 鍋囪ERP杩斿洖鎴愬姛鏃惰繑鍥炴垚鍔熷搷搴�
+ return WebResponseContent.Instance.OK();
}
- return WebResponseContent.Instance.OK();
+ catch (HttpRequestException ex)
+ {
+ _unitOfWorkManage.RollbackTran();
+ // 澶勭悊HTTP璇锋眰鐩稿叧寮傚父
+ return WebResponseContent.Instance.Error($"HTTP璇锋眰閿欒: {ex.Message}");
+
+ }
+ catch (Exception ex)
+ {
+ _unitOfWorkManage.RollbackTran();
+ // 澶勭悊鍏朵粬寮傚父
+ return WebResponseContent.Instance.Error($"澶勭悊澶辫触: {ex.Message}");
+ }
}
}
--
Gitblit v1.9.3