From 935722e71cc47d8c9f3b0e911de33c7eb0cbc693 Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期三, 28 八月 2024 22:55:55 +0800
Subject: [PATCH] 优化工步实体,增加名称,状态,消息

---
 Tiger.Business.MES/WorkAction/PrintLabel.cs |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/Tiger.Business.MES/WorkAction/PrintLabel.cs b/Tiger.Business.MES/WorkAction/PrintLabel.cs
index 0529854..d4b91f5 100644
--- a/Tiger.Business.MES/WorkAction/PrintLabel.cs
+++ b/Tiger.Business.MES/WorkAction/PrintLabel.cs
@@ -69,6 +69,7 @@
 
             //濡傛灉杩斿洖鎴愬姛鍒欒涓哄綋鍓嶈涓哄彲浠ュ紑濮嬫墽琛岋紝鍚﹀垯杩斿洖澶辫触
             action.IsSuccessed = true;
+            action.Data.ShortMsg = new("鎵撳嵃寮�濮�", ShortMessage.Types.Success);
             return action;
         }
 
@@ -82,11 +83,12 @@
             //鎻愪氦鏁版嵁鎵ц鎴愬姛
             if (input.Data.ToBoolean())
             {
-                action = End();
+                action = End(input);
             }
             //鎻愪氦鏁版嵁鎵ц澶辫触
             else
             {
+                action.Data.ShortMsg = new("鎵撳嵃澶辫触", ShortMessage.Types.Failed);
                 action.IsSuccessed = false;
                 //action.LocaleMsg = new($"鏍囩{Label.LABEL_NAME}[{Label.LABEL_CODE}]鎵撳嵃澶辫触", Label.LABEL_NAME);
                 action.LocaleMsg = new("MES.WorkAction.PrintLabel.PrintFail", Label.LABEL_NAME, Label.LABEL_CODE);
@@ -102,7 +104,7 @@
         /// 缁撴潫鎵ц宸ュ簭琛屼负
         /// </summary>
         /// <returns></returns>
-        public ApiAction<SubmitOutput> End()
+        public ApiAction<SubmitOutput> End(SubmitInput input)
         {
             var action = new ApiAction<SubmitOutput>(new SubmitOutput());
 
@@ -115,6 +117,7 @@
                     AUTH_ORG = CurPosition.WorkBatch.WO.AUTH_ORG,
                     AUTH_PROD = CurPosition.CurLine.LINE_CODE,
                     HIS_ID = CurPosition.CurWipSNHiss.First(q => q.SN == wipSn.SN).ID,
+                    WIP_ID = wipSn.ID,
                     SN = wipSn.SN,
                     STATUS = wipSn.STATUS,
                     ITEM_CODE = wipSn.ITEM_CODE,
@@ -131,7 +134,11 @@
                     POST_CODE = wipSn.POST_CODE,
                     OPER_CODE = wipSn.OPER_CODE,
                     SEGMENT = wipSn.SEGMENT,
+                    FLOW_SN = wipSn.FLOW_SN,
                     TRAY_SN = wipSn.TRAY_SN,
+                    INNER_SN = wipSn.INNER_SN,
+                    CARTON_SN = wipSn.CARTON_SN,
+                    PALLET_SN = wipSn.PALLET_SN,
                     OPERATION_TIME = DateTime.Now,
                     SFTS_CODE = wipSn.SFTS_CODE,
                     SFT_CODE = wipSn.SFT_CODE,
@@ -156,6 +163,8 @@
             };
 
             IsFinished = true;
+            CurStep.Status = StepStatus.Finished;
+            action.Data.ShortMsg = new("鎵撳嵃瀹屾垚", ShortMessage.Types.Success);
             //action.LocaleMsg = new($"鏍囩{Label.LABEL_NAME}[{Label.LABEL_CODE}]鎵撳嵃鎴愬姛", Label.LABEL_NAME);
             action.LocaleMsg = new("MES.WorkAction.PrintLabel.PrintSuccess", Label.LABEL_NAME, Label.LABEL_CODE);
             return action;

--
Gitblit v1.9.3