From 94359cabfd77f8cac9191b41a586b587953dffd5 Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期三, 04 九月 2024 16:14:33 +0800
Subject: [PATCH] 增加雅达专用上料行为 增加雅达U9数据实体

---
 Tiger.Business.MES/WorkAction/IPQC.cs |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/Tiger.Business.MES/WorkAction/IPQC.cs b/Tiger.Business.MES/WorkAction/IPQC.cs
index 2468326..ecd6bf3 100644
--- a/Tiger.Business.MES/WorkAction/IPQC.cs
+++ b/Tiger.Business.MES/WorkAction/IPQC.cs
@@ -59,7 +59,10 @@
             action.LocaleMsg = new("MES.WorkAction.IPQC.PleaseTest");
 
             //濡傛灉鏍规嵁杈撳叆鍙互寮�濮嬫墽琛屽綋鍓嶈涓哄垯鏍囪涓烘垚鍔燂紝鍚﹀垯澶辫触
+            CurStep.Message = Biz.L("绛夊緟娴嬭瘯");
+            CurStep.Status = StepStatus.Normal;
             action.IsSuccessed = false;
+            action.Data.ShortMsg = new("绛夊緟娴嬭瘯", ShortMessage.Types.Success);
             return action;
         }
         /// <summary>
@@ -79,12 +82,15 @@
                 //琛屼负鎵ц瀹屾垚
                 if (false)
                 {
-                	action = End();
+                	action = End(input);
                 }
             }
             //鎻愪氦鏁版嵁鎵ц澶辫触
             else
             {
+                CurStep.Message = Biz.L("娴嬭瘯澶辫触");
+                CurStep.Status = StepStatus.Error;
+                action.Data.ShortMsg = new("娴嬭瘯澶辫触", ShortMessage.Types.Failed);
                 action.IsSuccessed = false;
                 //action.LocaleMsg = new($"鎵ц澶辫触");
                 action.LocaleMsg = new("MES.WorkAction.IPQC.Fail");
@@ -101,7 +107,7 @@
         /// 缁撴潫鎵ц宸ュ簭琛屼负
         /// </summary>
         /// <returns></returns>
-        public ApiAction<SubmitOutput> End()
+        public ApiAction<SubmitOutput> End(SubmitInput input)
         {
             var action = new ApiAction<SubmitOutput>(new SubmitOutput());
 
@@ -113,6 +119,7 @@
                 {
                     AUTH_ORG = CurPosition.WorkBatch.WO.AUTH_ORG,
                     AUTH_PROD = CurPosition.CurLine.LINE_CODE,
+                    WIP_ID = wipSn.ID,
                     HIS_ID = CurPosition.CurWipSNHiss.First(q => q.SN == wipSn.SN).ID,
                     SN = wipSn.SN,
                     STATUS = wipSn.STATUS,
@@ -130,7 +137,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,
@@ -148,15 +159,20 @@
                 wipActs.Add(wipAct);
             }
 
+            //鍒涘缓鍙橀噺鍏嬮殕瀵硅薄鐢ㄤ簬浼犲叆DBSubmitAction涓繚瀛樺綋鍓嶉渶瑕佹殏瀛樼殑鏁版嵁鍊�
+            var _wipActs = wipActs.Clone();
             //淇濆瓨鏁版嵁
             CurStep.DBSubmitAction = () =>
             {
                 var db = CurPosition.GetCommitDB();
-                db.Storageable(wipActs, CurPosition.UserCode).ExecuteCommand();
+                db.Storageable(_wipActs, CurPosition.UserCode).ExecuteCommand();
             };
 
             IsFinished = true;
-            action.LocaleMsg = new($"琛屼负缁撴潫");
+            CurStep.Message = Biz.L("娴嬭瘯瀹屾垚");
+            CurStep.Status = StepStatus.Finished;
+            action.Data.ShortMsg = new("娴嬭瘯瀹屾垚", ShortMessage.Types.Success);
+            action.LocaleMsg = new($"娴嬭瘯缁撴潫");
             //action.LocaleMsg = new("MES.WorkAction.IPQC.Finish");
             return action;
         }

--
Gitblit v1.9.3