From 545bc1c267a939cf3259afcda1ba60feedd7e7eb Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期五, 11 十月 2024 20:15:25 +0800
Subject: [PATCH] 更新工序自动更新工单状态

---
 Tiger.Business.MES/WorkAction/PackingAction.cs |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Tiger.Business.MES/WorkAction/PackingAction.cs b/Tiger.Business.MES/WorkAction/PackingAction.cs
index a8fbe4d..b296a5a 100644
--- a/Tiger.Business.MES/WorkAction/PackingAction.cs
+++ b/Tiger.Business.MES/WorkAction/PackingAction.cs
@@ -219,6 +219,7 @@
                 CurCmd = data;
                 PrintTimes++;
                 CurStep?.SetStatusMessage(StepStatus.Normal, Biz.L("鎵撳嵃鏍囩"));
+                action.IsSuccessed = true;
                 action.Data.Data = data;
                 action.Data.ShortMsg = new("鎵撳嵃鏍囩", ShortMessage.Types.Normal);
                 //action.LocaleMsg = new Locale($"寮�濮嬬{PrintTimes}娆℃墦鍗扮{min.PKG_LEVEL}灞傚寘瑁匸{min.PkgType.PKG_NAME}]鐨勬爣绛綶{LabelDic[min.PKG_LEVEL]?.LABEL_CODE}: {LabelDic[min.PKG_LEVEL].LABEL_NAME}]");
@@ -226,7 +227,7 @@
             }
 
             //濡傛灉杩斿洖鎴愬姛鍒欒涓哄綋鍓嶈涓哄彲浠ュ紑濮嬫墽琛岋紝鍚﹀垯杩斿洖澶辫触
-            action.IsSuccessed = true;
+            //action.IsSuccessed = true;
             return action;
         }
 
@@ -254,6 +255,7 @@
                             action.IsSuccessed = false;
                             //action.LocaleMsg = new($"鏉$爜鎵弿澶辫触锛岃閲嶆柊鎵弿绗瑊dtl.PKG_LEVEL}灞傚寘瑁匸{dtl.PkgType.PKG_NAME}]鐨勬爣绛炬潯鐮�");
                             action.LocaleMsg = new("MES.WorkAction.PackingAction.ScanFail", dtl.PKG_LEVEL, dtl.PkgType.PKG_NAME);
+                            CurPosition.ResetNode();
                             return action;
                         }
                         //楠岃瘉褰撳墠鍖呰鏉$爜鏄惁宸茬粡琚壂鎻忚繃
@@ -265,6 +267,7 @@
                             action.IsSuccessed = false;
                             //action.LocaleMsg = new($"鏉$爜[{pInput.PkgSN}]鏃犻渶閲嶅鎵弿锛岃鎵弿绗瑊dtl.PKG_LEVEL}灞傚寘瑁匸{dtl.PkgType.PKG_NAME}]鐨勬爣绛炬潯鐮�");
                             action.LocaleMsg = new("MES.WorkAction.PackingAction.ScanRepeat", pInput.PkgSN, dtl.PKG_LEVEL, dtl.PkgType.PKG_NAME);
+                            CurPosition.ResetNode();
                             return action;
                         }
                         //瀹㈡埛绔壂鎻忔垚鍔�

--
Gitblit v1.9.3