From 67238bdfbeb1f06b9870133c9b9e86c45013fad2 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期五, 11 十月 2024 00:36:52 +0800
Subject: [PATCH] 一些已知更改

---
 Tiger.Business.MES/WorkAction/WipExtInfo.cs |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/Tiger.Business.MES/WorkAction/WipExtInfo.cs b/Tiger.Business.MES/WorkAction/WipExtInfo.cs
index e8df4f9..6f3aa22 100644
--- a/Tiger.Business.MES/WorkAction/WipExtInfo.cs
+++ b/Tiger.Business.MES/WorkAction/WipExtInfo.cs
@@ -58,6 +58,9 @@
                     });
                 }
             }
+
+            CurStep.Message = Biz.L("鎵弿瑕佺粦瀹氱殑鏍囩");
+            CurStep.Status = StepStatus.Normal;
         }
 
         /// <summary>
@@ -82,6 +85,8 @@
             action.LocaleMsg = GetBeginMsg();
 
             //濡傛灉杩斿洖鎴愬姛鍒欒涓哄綋鍓嶈涓哄彲浠ュ紑濮嬫墽琛岋紝鍚﹀垯杩斿洖澶辫触
+            CurStep.Message = Biz.L("缁戝畾寮�濮�");
+            CurStep.Status = StepStatus.Normal;
             action.IsSuccessed = true;
             action.Data.ShortMsg = new("缁戝畾寮�濮�", ShortMessage.Types.Success);
             return action;
@@ -116,6 +121,8 @@
                 //楠岃瘉鎵弿鐨勬潯鐮佹槸鍚N鐨勬墿灞曚俊鎭殑鏍囩
                 if (input.SN.IsNullOrEmpty())
                 {
+                    CurStep.Message = Biz.L("缁戝畾澶辫触");
+                    CurStep.Status = StepStatus.Error;
                     action.Data.ShortMsg = new("缁戝畾澶辫触", ShortMessage.Types.Failed);
                     action.IsSuccessed = isOK = false;
                     //action.LocaleMsg = new Locale($"閿欒锛歔{ExtInfo.FIELD_NAME}]鏍囩鏉$爜涓嶈兘涓虹┖锛岃閲嶆柊鎵弿");
@@ -123,6 +130,8 @@
                 }
                 if (CurPosition.CurWipSNs.Any(w => w.SN == input.SN))
                 {
+                    CurStep.Message = Biz.L("缁戝畾澶辫触");
+                    CurStep.Status = StepStatus.Error;
                     action.Data.ShortMsg = new("缁戝畾澶辫触", ShortMessage.Types.Failed);
                     action.IsSuccessed = isOK = false;
                     //action.LocaleMsg = new Locale($"閿欒锛氭壂鎻忓埌浜у搧鏉$爜[{input.SN}]锛岃閲嶆柊鎵弿[{ExtInfo.FIELD_NAME}]鏍囩鏉$爜");
@@ -140,6 +149,8 @@
             }
             catch (System.Exception ex)
             {
+                CurStep.Message = Biz.L("缁戝畾寮傚父");
+                CurStep.Status = StepStatus.Error;
                 action.Data.ShortMsg = new("缁戝畾寮傚父", ShortMessage.Types.Exception);
                 action.CatchExceptionWithLog(ex, $"鎵╁睍淇℃伅缁戝畾琛屼负锛氫骇鍝乕{CurPosition.CurSN}]缁戝畾[{ExtInfo.FIELD_NAME}]鏍囩鏉$爜[{input.SN}]淇濆瓨寮傚父");
                 action.IsSuccessed = false;
@@ -197,6 +208,7 @@
                     ACT_SN = wipSn.SN,
                     ACT_VALUE_1 = CurWipExt.ToJson(),
                     ACT_RESULT = "Y",
+                    ELAPSED_TIME = CurStep.GetElapsedTime().TotalMilliseconds.ToInt64(),
                     TRACE_INFO = $"浜у搧[{CurPosition.CurSN}]缁戝畾[{ExtInfo.FIELD_NAME}]鏍囩鏉$爜[{CurWipExt.GetType().GetProperty($"FIELD_{ExtInfo.SEQ.ToString("00")}")?.GetValue(CurWipExt)?.ToString()}]淇濆瓨鎴愬姛",
                 };
                 wipActs.Add(wipAct);
@@ -214,6 +226,7 @@
             };
 
             IsFinished = true;
+            CurStep.Message = Biz.L("缁戝畾瀹屾垚");
             CurStep.Status = StepStatus.Finished;
             action.Data.ShortMsg = new("缁戝畾瀹屾垚", ShortMessage.Types.Success);
             //action.LocaleMsg = new($"浜у搧[{CurPosition.CurWipSN.SN}]缁戝畾[{ExtInfo.FIELD_NAME}]鏍囩鏉$爜[{CurWipExt.GetType().GetProperty($"FIELD_{ExtInfo.SEQ.ToString("00")}")?.GetValue(CurWipExt)?.ToString()}]淇濆瓨鎴愬姛");

--
Gitblit v1.9.3