From 0fdd0687f116ac43f7432227dfaa2ebc2f696575 Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期日, 04 八月 2024 17:21:11 +0800
Subject: [PATCH] 增加扩展信息绑定工序

---
 Tiger.Business.MES/Transaction/TestNode.cs |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/Tiger.Business.MES/Transaction/TestNode.cs b/Tiger.Business.MES/Transaction/TestNode.cs
index 1b72e3d..6d34732 100644
--- a/Tiger.Business.MES/Transaction/TestNode.cs
+++ b/Tiger.Business.MES/Transaction/TestNode.cs
@@ -152,7 +152,8 @@
             }
             catch (Exception ex)
             {
-                action.CatchExceptionWithLog(ex, $"娴嬭瘯宸ュ簭锛氭彁浜ゆ搷浣滄暟鎹紓甯�");
+                //action.CatchExceptionWithLog(ex, $"娴嬭瘯宸ュ簭锛氭彁浜ゆ搷浣滄暟鎹紓甯�");
+                action.CatchExceptionWithLog(ex, Biz.L("MES.Transaction.TestNode.SubmitException"));
             }
             return action;
         }
@@ -165,9 +166,9 @@
         /// <returns></returns>
         public ApiAction<SubmitOutput> NodeSubmit(ApiAction<SubmitOutput> action, SubmitInput input)
         {
+            var curNode = CurBatch.GetNode(PostCode);
             try
             {
-                var curNode = CurBatch.GetNode(PostCode);
                 //鍒ゆ柇宸ュ崟瀹炴椂鐘舵�佸垽鏂槸鍚﹀彲浠ョ敓浜�
                 var woStatus = CurBatch.CheckCanProduce(curNode);
                 if (!woStatus.IsSuccessed)
@@ -292,7 +293,16 @@
                     //鏈夐渶瑕佺敤鎴锋彁浜や俊鎭垯娣诲姞宸ュ簭鑺傜偣鐨勫叾浠栧伐姝�
 
                     //鏈�鍚庢坊鍔犲綋鍓嶅伐搴忕殑琛屼负宸ユ
-                    GenerateSteps(curStep);
+                    try
+                    {
+                        GenerateSteps(curStep);
+                    }
+                    catch (System.Exception ex)
+                    {
+                        ResetNode();
+                        //action.CatchExceptionWithLog(ex, $"{curNode.NODE_NAME}锛氬伐搴忚涓哄伐姝ョ敓鎴愬紓甯革紝璇锋鏌ュ伐搴忚涓鸿缃�");
+                        action.CatchExceptionWithLog(ex, Biz.L("MES.Transaction.TestNode.NodeSubmit.GenerateStepsException", curNode.NODE_NAME));
+                    }
 
                     //瀹屾垚绗竴涓伐搴忚妭鐐瑰伐姝�
                     curStep.IsFinished = true;
@@ -349,7 +359,8 @@
             catch (Exception ex)
             {
                 ResetNode();
-                action.CatchExceptionWithLog(ex, $"娴嬭瘯宸ュ簭锛氬伐搴忚妭鐐瑰伐姝ユ彁浜ゆ暟鎹紓甯�");
+                //action.CatchExceptionWithLog(ex, $"{curNode.NODE_NAME}锛氬伐搴忚妭鐐瑰伐姝ユ彁浜ゆ暟鎹紓甯革紝璇锋鏌ュ伐搴忚妭鐐硅缃�");
+                action.CatchExceptionWithLog(ex, Biz.L("MES.Transaction.TestNode.NodeSubmitException", curNode.NODE_NAME));
             }
             return action;
         }

--
Gitblit v1.9.3