From 0116b5d2ed16a0825da9e7474fc786ee06b2d60c Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期三, 04 九月 2024 08:40:31 +0800
Subject: [PATCH] 增加公布提示信息和状态

---
 Tiger.Business.MES/WorkAction/VerifyItem.cs                      |    9 +++
 Tiger.Business.WMS/iWMS/RePrintBarcode.cs                        |    1 
 Tiger.Api/Language.db                                            |    0 
 Tiger.Business.WMS/WMS_ITEM_Biz.cs                               |    1 
 Tiger.Business.MES/WorkAction/Assembly.cs                        |   55 ++++++++++++++---
 Tiger.Business.MES/WorkAction/Weighing.cs                        |    5 +
 Tiger.Business.WMS/Minsun/iWMS.cs                                |    1 
 Tiger.IBusiness/Common/IStep.cs                                  |   10 ++-
 Tiger.IBusiness/Tiger.IBusiness.csproj                           |    3 
 Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs |    1 
 Tiger.Business.WMS/Transaction/OutSplit.cs                       |    1 
 Tiger.Business.MES/WorkAction/IPQC.cs                            |    7 ++
 Tiger.Business.WMS/Minsun/Shelf.cs                               |    1 
 Tiger.Business.MES/WorkAction/PackingAction.cs                   |   49 +++++++++++++++-
 Tiger.Business.MES/WorkAction/PrintLabel.cs                      |    5 +
 Tiger.Business.WMS/Transaction/OtherInLocationChecking.cs        |    1 
 Tiger.Business.MES/WorkAction/WipExtInfo.cs                      |    9 +++
 Tiger.Business.WMS/Transaction/ShelfRemote.cs                    |    1 
 18 files changed, 131 insertions(+), 29 deletions(-)

diff --git a/Tiger.Api/Language.db b/Tiger.Api/Language.db
index e1158f2..e1e1eb7 100644
--- a/Tiger.Api/Language.db
+++ b/Tiger.Api/Language.db
Binary files differ
diff --git a/Tiger.Business.MES/WorkAction/Assembly.cs b/Tiger.Business.MES/WorkAction/Assembly.cs
index 0ac02f5..9dc8ee7 100644
--- a/Tiger.Business.MES/WorkAction/Assembly.cs
+++ b/Tiger.Business.MES/WorkAction/Assembly.cs
@@ -23,7 +23,6 @@
         public MES_WO_ACTION Setting { get; set; }
         #endregion
         public List<BAS_PROD_BOM> Boms { get; set; } = new();
-        public Dictionary<string, List<BAS_ITEM>> SubItemDic { get; set; } = new();
         public AssemblyInfo CurAssembly { get; set; } = new();
         #endregion Propertys & Variables
 
@@ -76,10 +75,13 @@
 	                {
 		                var subs = bom.SUB_CODE.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
 		                var surItems = Biz.Db.Queryable<BAS_ITEM>().Where(q => subs.Contains(q.ITEM_CODE) && q.AUTH_ORG == CurPosition.WorkBatch.WO.AUTH_ORG).ToList();
-	                    if (!SubItemDic.ContainsKey(assy.ITEM_CODE))
-	                    {
-	                        SubItemDic.Add(assy.ITEM_CODE, surItems);
-	                    }
+                        foreach (var sub in surItems)
+                        {
+                            if (!item.SubItems.Any(q => q.ITEM_CODE == sub.ITEM_CODE))
+                            {
+                                item.SubItems.Add(sub);
+                            }
+                        }
 	                }
 	                CurAssembly.Items.Add(item);
                 }
@@ -112,6 +114,8 @@
             }
 
             //濡傛灉杩斿洖鎴愬姛鍒欒涓哄綋鍓嶈涓哄彲浠ュ紑濮嬫墽琛岋紝鍚﹀垯杩斿洖澶辫触
+            CurStep.Message = Biz.L("绛夊緟涓婃枡");
+            CurStep.Status = StepStatus.Normal;
             action.IsSuccessed = false;
             action.Data.ShortMsg = new("绛夊緟涓婃枡", ShortMessage.Types.Normal);
             return action;
@@ -145,6 +149,7 @@
                 foreach (var item in CurAssembly.Items.Where(q => !q.IsFinished))
                 {
                     var isOK = true;
+                    var matchItem = item.ItemInfo;
                     //鏍规嵁鏉$爜瑙勫垯楠岃瘉涓婃枡鏄惁姝g‘
                     if (!item.RuleCode.IsNullOrEmpty())
                     {
@@ -169,6 +174,27 @@
                             }
                         }
                     }
+                    //涓绘枡楠岃瘉涓嶉�氳繃锛屽垯灏濊瘯楠岃瘉鏇夸唬鏂�
+                    if (!isOK && item.SubItems.Any())
+                    {
+                        foreach (var subItem in item.SubItems)
+                        {
+                            if (!subItem.RULE_CODE.IsNullOrEmpty())
+                            {
+                                if (!Biz.CodeRule[subItem.RULE_CODE].IsNullOrEmpty())
+                                {
+                                    var result = Biz.CodeRule[item.RuleCode].Verify(input.SN);
+                                    //鍙鏈変竴涓浛浠f枡閫氳繃楠岃瘉鍒欏彲浠ヤ笂鏂�
+                                    if (result.IsSuccessed)
+                                    {
+                                        isOK = true;
+                                        matchItem = subItem;
+                                        break;
+                                    }
+                                }
+                            }
+                        }
+                    }
                     //楠岃瘉閫氳繃鍒欎繚瀛樹笂鏂欎俊鎭�
                     if (isOK)
                     {
@@ -184,9 +210,9 @@
                                     WIP_ID = wipSn.ID,
                                     SN = input.SN,
                                     PROD_SN = wipSn.SN,
-                                    ITEM_CODE = item.ItemInfo.ITEM_CODE,
+                                    ITEM_CODE = matchItem.ITEM_CODE,
                                     QTY = 1,
-                                    UNIT = item.ItemInfo.UNIT,
+                                    UNIT = matchItem.UNIT,
                                     WORK_ORDER = wipSn.WORK_ORDER,
                                     BATCH_NO = wipSn.BATCH_NO,
                                     ROT_CODE = wipSn.ROT_CODE,
@@ -214,9 +240,9 @@
                                     WIP_ID = wipSn.ID,
                                     SN = input.SN,
                                     PROD_SN = wipSn.SN,
-                                    ITEM_CODE = item.ItemInfo.ITEM_CODE,
+                                    ITEM_CODE = matchItem.ITEM_CODE,
                                     QTY = 1,
-                                    UNIT = item.ItemInfo.UNIT,
+                                    UNIT = matchItem.UNIT,
                                     WORK_ORDER = wipSn.WORK_ORDER,
                                     BATCH_NO = wipSn.BATCH_NO,
                                     ROT_CODE = wipSn.ROT_CODE,
@@ -238,11 +264,13 @@
 	                        }
                         }
 
+                        CurStep.Message = Biz.L("涓婃枡鎴愬姛");
+                        CurStep.Status = StepStatus.Success;
                         action.IsSuccessed = true;
                         action.Data.ShortMsg = new("涓婃枡鎴愬姛", ShortMessage.Types.Success);
                         action.Data.Data = CurAssembly;
-	                    //action.LocaleMsg = new Locale($"鎵弿鐗╂枡[{item.ItemInfo.ITEM_NAME}({item.ItemInfo.ITEM_CODE})鐨勬潯鐮乕{input.SN}]鎴愬姛锛岃缁х画涓婃枡");
-	                    action.LocaleMsg = new Locale("MES.WorkAction.Assembly.LoadSuccess", item.ItemInfo.ITEM_NAME, item.ItemInfo.ITEM_CODE);
+                        //action.LocaleMsg = new Locale($"鎵弿鐗╂枡[{matchItem.ITEM_NAME}({matchItem.ITEM_CODE})鐨勬潯鐮乕{input.SN}]鎴愬姛锛岃缁х画涓婃枡");
+                        action.LocaleMsg = new Locale("MES.WorkAction.Assembly.LoadSuccess", matchItem.ITEM_NAME, matchItem.ITEM_CODE);
 
                         //涓婃枡瀹屾垚
                         if (CurAssembly.IsFinished)
@@ -253,6 +281,8 @@
                     }
                 }
                 //閮芥病鏈夌墿鏂欓獙璇侀�氳繃锛屽垯杩斿洖閿欒淇℃伅
+                CurStep.Message = Biz.L("涓婃枡澶辫触");
+                CurStep.Status = StepStatus.Error;
                 action.IsSuccessed = false;
                 action.Data.ShortMsg = new("涓婃枡澶辫触", ShortMessage.Types.Failed);
                 //action.LocaleMsg = new($"鏉$爜[{input.SN}]楠岃瘉澶辫触锛屼笉鏄互涓嬬墿鏂欑殑鏉$爜锛歿string.Join("锛�", CurAssembly.Items.Where(q => !q.IsFinished).Select(q => $"{q.ItemInfo.ITEM_NAME}({q.ItemInfo.ITEM_CODE})"))}");
@@ -260,6 +290,8 @@
             }
             catch (System.Exception ex)
             {
+                CurStep.Message = Biz.L("涓婃枡寮傚父");
+                CurStep.Status = StepStatus.Error;
                 action.Data.ShortMsg = new("涓婃枡寮傚父", ShortMessage.Types.Exception);
                 action.CatchExceptionWithLog(ex, $"涓婃枡琛屼负锛氶獙璇佹潯鐮乕{input.SN}]骞朵繚瀛樻暟鎹紓甯�");
                 action.IsSuccessed = false;
@@ -340,6 +372,7 @@
             };
 
             IsFinished = true;
+            CurStep.Message = Biz.L("涓婃枡瀹屾垚");
             CurStep.Status = StepStatus.Finished;
             action.Data.ShortMsg = new("涓婃枡瀹屾垚", ShortMessage.Types.Success);
             //action.LocaleMsg = new($"浠ヤ笅鐗╂枡涓婃枡瀹屾垚锛歿string.Join("锛�", CurAssembly.Items.Select(q => $"{q.ItemInfo.ITEM_NAME}({q.ItemInfo.ITEM_CODE})"))}");
diff --git a/Tiger.Business.MES/WorkAction/IPQC.cs b/Tiger.Business.MES/WorkAction/IPQC.cs
index d092fe8..ecd6bf3 100644
--- a/Tiger.Business.MES/WorkAction/IPQC.cs
+++ b/Tiger.Business.MES/WorkAction/IPQC.cs
@@ -59,8 +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);
+            action.Data.ShortMsg = new("绛夊緟娴嬭瘯", ShortMessage.Types.Success);
             return action;
         }
         /// <summary>
@@ -86,6 +88,8 @@
             //鎻愪氦鏁版嵁鎵ц澶辫触
             else
             {
+                CurStep.Message = Biz.L("娴嬭瘯澶辫触");
+                CurStep.Status = StepStatus.Error;
                 action.Data.ShortMsg = new("娴嬭瘯澶辫触", ShortMessage.Types.Failed);
                 action.IsSuccessed = false;
                 //action.LocaleMsg = new($"鎵ц澶辫触");
@@ -165,6 +169,7 @@
             };
 
             IsFinished = true;
+            CurStep.Message = Biz.L("娴嬭瘯瀹屾垚");
             CurStep.Status = StepStatus.Finished;
             action.Data.ShortMsg = new("娴嬭瘯瀹屾垚", ShortMessage.Types.Success);
             action.LocaleMsg = new($"娴嬭瘯缁撴潫");
diff --git a/Tiger.Business.MES/WorkAction/PackingAction.cs b/Tiger.Business.MES/WorkAction/PackingAction.cs
index 7a4421c..5172731 100644
--- a/Tiger.Business.MES/WorkAction/PackingAction.cs
+++ b/Tiger.Business.MES/WorkAction/PackingAction.cs
@@ -177,6 +177,8 @@
                 data.PrintLable = LabelDic[min.PKG_LEVEL];
                 CurCmd = data;
                 PrintTimes++;
+                CurStep.Message = Biz.L("鎵撳嵃鏍囩");
+                CurStep.Status = StepStatus.Normal;
                 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}]");
@@ -207,6 +209,8 @@
                         if (!pInput.IsFinish || pInput.PkgSN.IsNullOrEmpty())
                         {
                             var dtl = PkgRule.Details.First(q => q.PKG_LEVEL == pInput.PkgLevel);
+                            CurStep.Message = Biz.L("鎵弿閿欒");
+                            CurStep.Status = StepStatus.Error;
                             action.Data.ShortMsg = new("鎵弿閿欒", ShortMessage.Types.Error);
                             action.IsSuccessed = false;
                             //action.LocaleMsg = new($"鏉$爜鎵弿澶辫触锛岃閲嶆柊鎵弿绗瑊dtl.PKG_LEVEL}灞傚寘瑁匸{dtl.PkgType.PKG_NAME}]鐨勬爣绛炬潯鐮�");
@@ -217,6 +221,8 @@
                         if (GetPackageList(CurPkg.Item).Any(q => q.SN == pInput.PkgSN))
                         {
                             var dtl = PkgRule.Details.First(q => q.PKG_LEVEL == pInput.PkgLevel);
+                            CurStep.Message = Biz.L("鎵弿閿欒");
+                            CurStep.Status = StepStatus.Error;
                             action.Data.ShortMsg = new("鎵弿閿欒", ShortMessage.Types.Error);
                             action.IsSuccessed = false;
                             //action.LocaleMsg = new($"鏉$爜[{pInput.PkgSN}]鏃犻渶閲嶅鎵弿锛岃鎵弿绗瑊dtl.PKG_LEVEL}灞傚寘瑁匸{dtl.PkgType.PKG_NAME}]鐨勬爣绛炬潯鐮�");
@@ -229,6 +235,8 @@
                         action = SavePkgData(input, action);
                         if (action.IsSuccessed)
                         {
+                            CurStep.Message = Biz.L("鎵弿鎴愬姛");
+                            CurStep.Status = StepStatus.Success;
                             action.Data.ShortMsg = new("鎵弿鎴愬姛", ShortMessage.Types.Success);
                         }
                     }
@@ -247,6 +255,8 @@
                             data.ExecCode = "Scan";
                             data.PkgLevel = dtl.PKG_LEVEL;
                             CurCmd = data;
+                            CurStep.Message = Biz.L("鎵弿鏍囩");
+                            CurStep.Status = StepStatus.Normal;
                             action.Data.Data = data;
                             action.Data.ShortMsg = new("鎵弿鏍囩", ShortMessage.Types.Normal);
                             //action.LocaleMsg = new($"璇锋壂鎻忕{dtl.PKG_LEVEL}灞傚寘瑁匸{dtl.PkgType.PKG_NAME}]鐨勬爣绛炬潯鐮�");
@@ -259,6 +269,8 @@
                             if (PrintTimes < 3 && !CurCmd.IsNullOrEmpty())
                             {
                                 PrintTimes++;
+                                CurStep.Message = Biz.L("閲嶆柊鎵撳嵃");
+                                CurStep.Status = StepStatus.Normal;
                                 action.Data.Data = CurCmd;
                                 action.Data.ShortMsg = new("閲嶆柊鎵撳嵃", ShortMessage.Types.Normal);
                                 //action.LocaleMsg = new Locale($"寮�濮媨PrintTimes}娆℃墦鍗扮{dtl.PKG_LEVEL}灞傚寘瑁匸{dtl.PkgType.PKG_NAME}]鐨勬爣绛綶{LabelDic[dtl.PKG_LEVEL]?.LABEL_CODE}: {LabelDic[dtl.PKG_LEVEL].LABEL_NAME}]");
@@ -268,6 +280,8 @@
                             {
                                 CurCmd = null;
                                 PrintTimes = 0;
+                                CurStep.Message = Biz.L("鎵撳嵃澶辫触");
+                                CurStep.Status = StepStatus.Error;
                                 action.Data.ShortMsg = new("鎵撳嵃澶辫触", ShortMessage.Types.Failed);
                                 action.IsSuccessed = false;
                                 //action.LocaleMsg = new($"灏濊瘯绗瑊PrintTimes}娆℃墦鍗扮{dtl.PKG_LEVEL}灞傚寘瑁匸{dtl.PkgType.PKG_NAME}]鐨勬爣绛綶{LabelDic[dtl.PKG_LEVEL]?.LABEL_CODE}: {LabelDic[dtl.PKG_LEVEL].LABEL_NAME}]澶辫触锛屽伐搴忓凡閲嶇疆锛岃閲嶆柊鎵弿杩涚珯浜у搧鏉$爜");
@@ -287,6 +301,8 @@
                             if (!PkgProd.IsNullOrEmpty() && (pInput.WeightInfo.Weight < PkgProd.MIN_WEIGHT || PkgProd.MIN_WEIGHT < pInput.WeightInfo.Weight))
                             {
                                 action.IsSuccessed = false;
+                                CurStep.Message = Biz.L("閲嶉噺瓒呴檺");
+                                CurStep.Status = StepStatus.Error;
                                 action.Data.Data = CurCmd;
                                 action.Data.ShortMsg = new("閲嶉噺瓒呴檺", ShortMessage.Types.Failed);
                                 //action.LocaleMsg = new($"澶栧寘瑁呴噸閲廩{0}]瓒呭嚭浜у搧[{1}]鍦ㄥ寘瑁呰鍒橻{2}]涓殑棰勮鑼冨洿[{3} - {4}]锛岃澶勭悊鍚庨噸鏂颁笂绉扮О閲�");
@@ -317,7 +333,9 @@
 	                                data.ExecCode = "Scan";
 	                                data.PkgLevel = dtl.PKG_LEVEL;
 	                                CurCmd = data;
-	                                action.Data.Data = data;
+                                    CurStep.Message = Biz.L("鎵弿鏍囩");
+                                    CurStep.Status = StepStatus.Normal;
+                                    action.Data.Data = data;
 	                                action.Data.ShortMsg = new("鎵弿鏍囩", ShortMessage.Types.Normal);
 	                                //action.LocaleMsg = new($"璇锋壂鎻忕{dtl.PKG_LEVEL}灞傚寘瑁匸{dtl.PkgType.PKG_NAME}]鐨勬爣绛炬潯鐮�");
 	                                action.LocaleMsg = new("MES.WorkAction.PackingAction.PleaseScanLabel", dtl.PKG_LEVEL, dtl.PkgType.PKG_NAME);
@@ -333,7 +351,9 @@
 	                                data.PrintLable = LabelDic[dtl.PKG_LEVEL];
 	                                CurCmd = data;
 	                                PrintTimes++;
-	                                action.Data.Data = data;
+                                    CurStep.Message = Biz.L("鎵撳嵃鏍囩");
+                                    CurStep.Status = StepStatus.Normal;
+                                    action.Data.Data = data;
 	                                action.Data.ShortMsg = new("鎵撳嵃鏍囩", ShortMessage.Types.Normal);
 	                                //action.LocaleMsg = new Locale($"寮�濮嬬{PrintTimes}娆℃墦鍗扮{dtl.PKG_LEVEL}灞傚寘瑁匸{dtl.PkgType.PKG_NAME}]鐨勬爣绛綶{LabelDic[dtl.PKG_LEVEL]?.LABEL_CODE}: {LabelDic[dtl.PKG_LEVEL].LABEL_NAME}]");
 	                                action.LocaleMsg = new Locale("MES.WorkAction.PackingAction.BeginPrint", PrintTimes, dtl.PKG_LEVEL, dtl.PkgType.PKG_NAME, LabelDic[dtl.PKG_LEVEL]?.LABEL_CODE, LabelDic[dtl.PKG_LEVEL].LABEL_NAME);
@@ -345,6 +365,8 @@
                         else
                         {
                             action.IsSuccessed = false;
+                            CurStep.Message = Biz.L("绉伴噸澶辫触");
+                            CurStep.Status = StepStatus.Error;
                             action.Data.Data = CurCmd;
                             action.Data.ShortMsg = new("绉伴噸澶辫触", ShortMessage.Types.Failed);
                             //action.LocaleMsg = new($"澶栧寘瑁呯О閲嶆暟鎹紓甯革紝璇烽噸鏂颁笂绉扮О閲�");
@@ -366,6 +388,8 @@
                             data.ExecCode = "Weighing";
                             data.PkgLevel = CurPkgItem.PKG_LEVEL;
                             CurCmd = data;
+                            CurStep.Message = Biz.L("鍖呰鎴愬姛");
+                            CurStep.Status = StepStatus.Success;
                             action.Data.Data = data;
                             action.Data.ShortMsg = new("鍖呰鎴愬姛", ShortMessage.Types.Success);
                             //action.LocaleMsg = new($"璇锋妸鍖呰[{CurPkgItem.Package.SN}]涓婄О绉伴噸");
@@ -400,6 +424,8 @@
                             data.ExecCode = "Scan";
                             data.PkgLevel = dtl.PKG_LEVEL;
                             CurCmd = data;
+                            CurStep.Message = Biz.L("鎵弿鏍囩");
+                            CurStep.Status = StepStatus.Normal;
                             action.Data.Data = data;
                             action.Data.ShortMsg = new("鎵弿鏍囩", ShortMessage.Types.Normal);
                             //action.LocaleMsg = new($"璇锋壂鎻忕{dtl.PKG_LEVEL}灞傚寘瑁匸{dtl.PkgType.PKG_NAME}]鐨勬爣绛炬潯鐮�");
@@ -416,6 +442,8 @@
                             data.PrintLable = LabelDic[dtl.PKG_LEVEL];
                             CurCmd = data;
                             PrintTimes++;
+                            CurStep.Message = Biz.L("鎵撳嵃鏍囩");
+                            CurStep.Status = StepStatus.Normal;
                             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}]");
@@ -565,6 +593,8 @@
                                 data.ExecCode = "Weighing";
                                 data.PkgLevel = CurPkgItem.PKG_LEVEL;
                                 CurCmd = data;
+                                CurStep.Message = Biz.L("涓婄О绉伴噸");
+                                CurStep.Status = StepStatus.Normal;
                                 action.Data.Data = data;
                                 action.Data.ShortMsg = new("涓婄О绉伴噸", ShortMessage.Types.Success);
                                 //action.LocaleMsg = new($"璇锋妸澶栧寘瑁呬笂绉扮О閲�");
@@ -579,7 +609,9 @@
 	                                data.ExecCode = "Scan";
 	                                data.PkgLevel = dtl.PKG_LEVEL;
 	                                CurCmd = data;
-	                                action.Data.Data = data;
+                                    CurStep.Message = Biz.L("鎵弿鏍囩");
+                                    CurStep.Status = StepStatus.Normal;
+                                    action.Data.Data = data;
                                     action.Data.ShortMsg = new("鎵弿鏍囩", ShortMessage.Types.Normal);
                                     //action.LocaleMsg = new($"璇锋壂鎻忕{dtl.PKG_LEVEL}灞傚寘瑁匸{dtl.PkgType.PKG_NAME}]鐨勬爣绛炬潯鐮�");
                                     action.LocaleMsg = new("MES.WorkAction.PackingAction.PleaseScanLabel", dtl.PKG_LEVEL, dtl.PkgType.PKG_NAME);
@@ -595,7 +627,9 @@
 	                                data.PrintLable = LabelDic[dtl.PKG_LEVEL];
 	                                CurCmd = data;
 	                                PrintTimes++;
-	                                action.Data.Data = data;
+                                    CurStep.Message = Biz.L("鎵撳嵃鏍囩");
+                                    CurStep.Status = StepStatus.Normal;
+                                    action.Data.Data = data;
                                     action.Data.ShortMsg = new("鎵撳嵃鏍囩", ShortMessage.Types.Normal);
                                     //action.LocaleMsg = new Locale($"寮�濮嬬{PrintTimes}娆℃墦鍗扮{dtl.PKG_LEVEL}灞傚寘瑁匸{dtl.PkgType.PKG_NAME}]鐨勬爣绛綶{LabelDic[dtl.PKG_LEVEL]?.LABEL_CODE}: {LabelDic[dtl.PKG_LEVEL].LABEL_NAME}]");
                                     action.LocaleMsg = new Locale("MES.WorkAction.PackingAction.BeginPrint", PrintTimes, dtl.PKG_LEVEL, dtl.PkgType.PKG_NAME, LabelDic[dtl.PKG_LEVEL]?.LABEL_CODE, LabelDic[dtl.PKG_LEVEL].LABEL_NAME);                
@@ -611,6 +645,8 @@
                     //鏁版嵁寮傚父
                     else
                     {
+                        CurStep.Message = Biz.L("鍖呰閿欒");
+                        CurStep.Status = StepStatus.Error;
                         action.Data.ShortMsg = new("鍖呰閿欒", ShortMessage.Types.Error);
                         var pdtl = PkgRule.Details.First(q => q.PKG_LEVEL == pInput.PkgLevel);
                         action.IsSuccessed = false;
@@ -622,6 +658,8 @@
             }
             catch (System.Exception ex)
             {
+                CurStep.Message = Biz.L("鍖呰寮傚父");
+                CurStep.Status = StepStatus.Error;
                 action.Data.ShortMsg = new("鍖呰寮傚父", ShortMessage.Types.Exception);
                 var dtl = PkgRule.Details.First(q => q.PKG_LEVEL == pInput.PkgLevel);
                 action.CatchExceptionWithLog(ex, $"鍖呰琛屼负锛氭壂鎻忕{dtl.PKG_LEVEL}灞傚寘瑁匸{dtl.PkgType.PKG_NAME}]鐨勬爣绛炬潯鐮乕{input.SN}]鍚庝繚瀛樻暟鎹け璐�");
@@ -656,6 +694,8 @@
             data.ExecCode = "Complete";
             data.PkgLevel = CurPkg.Item.PKG_LEVEL;
             CurCmd = data;
+            CurStep.Message = Biz.L("淇濆瓨鍖呰鏁版嵁");
+            CurStep.Status = StepStatus.Normal;
             action.Data.Data = data;
             action.Data.ShortMsg = new("淇濆瓨鍖呰鏁版嵁", ShortMessage.Types.Normal);
             //action.LocaleMsg = new($"绗瑊CurPkg.Item.PKG_LEVEL}灞傚寘瑁匸{CurPkg.Item.PKG_NAME}]宸茬粡鍏ㄩ儴瀹屾垚锛屼繚瀛樺寘瑁呮暟鎹�");
@@ -791,6 +831,7 @@
             }
 
             IsFinished = true;
+            CurStep.Message = Biz.L("鍖呰瀹屾垚");
             CurStep.Status = StepStatus.Finished;
             action.Data.ShortMsg = new("鍖呰瀹屾垚", ShortMessage.Types.Success);
             
diff --git a/Tiger.Business.MES/WorkAction/PrintLabel.cs b/Tiger.Business.MES/WorkAction/PrintLabel.cs
index d4b91f5..ba7dd94 100644
--- a/Tiger.Business.MES/WorkAction/PrintLabel.cs
+++ b/Tiger.Business.MES/WorkAction/PrintLabel.cs
@@ -68,6 +68,8 @@
             action.Data.Data = Label;
 
             //濡傛灉杩斿洖鎴愬姛鍒欒涓哄綋鍓嶈涓哄彲浠ュ紑濮嬫墽琛岋紝鍚﹀垯杩斿洖澶辫触
+            CurStep.Message = Biz.L("鎵撳嵃寮�濮�");
+            CurStep.Status = StepStatus.Normal;
             action.IsSuccessed = true;
             action.Data.ShortMsg = new("鎵撳嵃寮�濮�", ShortMessage.Types.Success);
             return action;
@@ -88,6 +90,8 @@
             //鎻愪氦鏁版嵁鎵ц澶辫触
             else
             {
+                CurStep.Message = Biz.L("鎵撳嵃澶辫触");
+                CurStep.Status = StepStatus.Error;
                 action.Data.ShortMsg = new("鎵撳嵃澶辫触", ShortMessage.Types.Failed);
                 action.IsSuccessed = false;
                 //action.LocaleMsg = new($"鏍囩{Label.LABEL_NAME}[{Label.LABEL_CODE}]鎵撳嵃澶辫触", Label.LABEL_NAME);
@@ -163,6 +167,7 @@
             };
 
             IsFinished = true;
+            CurStep.Message = Biz.L("鎵撳嵃瀹屾垚");
             CurStep.Status = StepStatus.Finished;
             action.Data.ShortMsg = new("鎵撳嵃瀹屾垚", ShortMessage.Types.Success);
             //action.LocaleMsg = new($"鏍囩{Label.LABEL_NAME}[{Label.LABEL_CODE}]鎵撳嵃鎴愬姛", Label.LABEL_NAME);
diff --git a/Tiger.Business.MES/WorkAction/VerifyItem.cs b/Tiger.Business.MES/WorkAction/VerifyItem.cs
index 1e9f7d2..6dd675a 100644
--- a/Tiger.Business.MES/WorkAction/VerifyItem.cs
+++ b/Tiger.Business.MES/WorkAction/VerifyItem.cs
@@ -64,6 +64,8 @@
             action = Submit(input);
 
             //濡傛灉杩斿洖鎴愬姛鍒欒涓哄綋鍓嶈涓哄彲浠ュ紑濮嬫墽琛岋紝鍚﹀垯杩斿洖澶辫触
+            //CurStep.Message = Biz.L("楠岃瘉寮�濮�");
+            //CurStep.Status = StepStatus.Normal;
             //action.IsSuccessed = true;
             //action.Data.ShortMsg = new("楠岃瘉寮�濮�", ShortMessage.Types.Success);
             return action;
@@ -98,6 +100,8 @@
                 //楠岃瘉閫昏緫
                 //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}]鏍囩鏉$爜涓嶈兘涓虹┖锛岃閲嶆柊鎵弿");
@@ -105,6 +109,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}]鏍囩鏉$爜");
@@ -121,6 +127,8 @@
             }
             catch (System.Exception ex)
             {
+                CurStep.Message = Biz.L("楠岃瘉寮傚父");
+                CurStep.Status = StepStatus.Error;
                 action.Data.ShortMsg = new("楠岃瘉寮傚父", ShortMessage.Types.Exception);
                 action.CatchExceptionWithLog(ex, $"楠岃瘉寮傚父");
                 action.IsSuccessed = false;
@@ -192,6 +200,7 @@
             };
 
             IsFinished = true;
+            CurStep.Message = Biz.L("楠岃瘉閫氳繃");
             CurStep.Status = StepStatus.Finished;
             action.Data.ShortMsg = new("楠岃瘉閫氳繃", ShortMessage.Types.Success);
             //action.LocaleMsg = new($"浜у搧[{CurPosition.CurSN}]楠岃瘉閫氳繃");
diff --git a/Tiger.Business.MES/WorkAction/Weighing.cs b/Tiger.Business.MES/WorkAction/Weighing.cs
index ce49c60..6829cc4 100644
--- a/Tiger.Business.MES/WorkAction/Weighing.cs
+++ b/Tiger.Business.MES/WorkAction/Weighing.cs
@@ -83,6 +83,8 @@
             action.LocaleMsg = GetBeginMsg();
 
             //濡傛灉杩斿洖鎴愬姛鍒欒涓哄綋鍓嶈涓哄彲浠ュ紑濮嬫墽琛岋紝鍚﹀垯杩斿洖澶辫触
+            CurStep.Message = Biz.L("绉伴噸寮�濮�");
+            CurStep.Status = StepStatus.Normal;
             action.IsSuccessed = true;
             action.Data.ShortMsg = new("绉伴噸寮�濮�", ShortMessage.Types.Success);
             return action;
@@ -123,6 +125,8 @@
             }
             catch (System.Exception ex)
             {
+                CurStep.Message = Biz.L("绉伴噸寮傚父");
+                CurStep.Status = StepStatus.Error;
                 action.Data.ShortMsg = new("绉伴噸寮傚父", ShortMessage.Types.Error);
                 action.CatchExceptionWithLog(ex, $"绉伴噸琛屼负锛氭潯鐮乕{CurPosition.CurSN}]绉伴噸鏁版嵁[{input?.Data?.ToString()}]淇濆瓨寮傚父");
                 action.LocaleMsg = new("MES.WorkAction.Weighing.SaveWeightInfoException", CurPosition.CurSN, input?.Data.ToString());
@@ -193,6 +197,7 @@
             };
 
             IsFinished = true;
+            CurStep.Message = Biz.L("绉伴噸瀹屾垚");
             CurStep.Status = StepStatus.Finished;
             action.Data.ShortMsg = new("绉伴噸瀹屾垚", ShortMessage.Types.Success);
             //action.LocaleMsg = new($"鏉$爜[{CurPosition.CurSN}]绉伴噸鏁版嵁[{CurPkg.WEIGHT} {CurPkg.WEIGHT_UNIT}]淇濆瓨鎴愬姛");
diff --git a/Tiger.Business.MES/WorkAction/WipExtInfo.cs b/Tiger.Business.MES/WorkAction/WipExtInfo.cs
index e8df4f9..e8e81fe 100644
--- a/Tiger.Business.MES/WorkAction/WipExtInfo.cs
+++ b/Tiger.Business.MES/WorkAction/WipExtInfo.cs
@@ -82,6 +82,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 +118,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 +127,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 +146,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;
@@ -214,6 +222,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()}]淇濆瓨鎴愬姛");
diff --git a/Tiger.Business.WMS/Minsun/Shelf.cs b/Tiger.Business.WMS/Minsun/Shelf.cs
index 2cdfed6..f631df0 100644
--- a/Tiger.Business.WMS/Minsun/Shelf.cs
+++ b/Tiger.Business.WMS/Minsun/Shelf.cs
@@ -11,7 +11,6 @@
 using System.Data;
 using System.Text.RegularExpressions;
 using System.Text;
-using System.DirectoryServices.ActiveDirectory;
 using Dm;
 using Tiger.Model.DigitalTwin;
 using System.IO;
diff --git a/Tiger.Business.WMS/Minsun/iWMS.cs b/Tiger.Business.WMS/Minsun/iWMS.cs
index c243ca1..60f5b9c 100644
--- a/Tiger.Business.WMS/Minsun/iWMS.cs
+++ b/Tiger.Business.WMS/Minsun/iWMS.cs
@@ -13,7 +13,6 @@
 using System.Data;
 using System.Text.RegularExpressions;
 using System.Text;
-using System.DirectoryServices.ActiveDirectory;
 using Dm;
 using System.Reflection;
 using Apache.NMS.ActiveMQ.Commands;
diff --git a/Tiger.Business.WMS/Transaction/OtherInLocationChecking.cs b/Tiger.Business.WMS/Transaction/OtherInLocationChecking.cs
index 5a1d400..59e285c 100644
--- a/Tiger.Business.WMS/Transaction/OtherInLocationChecking.cs
+++ b/Tiger.Business.WMS/Transaction/OtherInLocationChecking.cs
@@ -9,7 +9,6 @@
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
-using System.DirectoryServices.ActiveDirectory;
 using System.Reflection.Emit;
 using Tiger.Model;
 using Tiger.IBusiness;
diff --git a/Tiger.Business.WMS/Transaction/OutSplit.cs b/Tiger.Business.WMS/Transaction/OutSplit.cs
index 3c6afb0..742796b 100644
--- a/Tiger.Business.WMS/Transaction/OutSplit.cs
+++ b/Tiger.Business.WMS/Transaction/OutSplit.cs
@@ -8,7 +8,6 @@
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
-using System.DirectoryServices.ActiveDirectory;
 using Tiger.Model;
 using Org.BouncyCastle.Ocsp;
 using Newtonsoft.Json;
diff --git a/Tiger.Business.WMS/Transaction/ShelfRemote.cs b/Tiger.Business.WMS/Transaction/ShelfRemote.cs
index c553dbc..939e53d 100644
--- a/Tiger.Business.WMS/Transaction/ShelfRemote.cs
+++ b/Tiger.Business.WMS/Transaction/ShelfRemote.cs
@@ -8,7 +8,6 @@
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
-using System.DirectoryServices.ActiveDirectory;
 using Tiger.Model;
 using Org.BouncyCastle.Ocsp;
 using Newtonsoft.Json;
diff --git a/Tiger.Business.WMS/WMS_ITEM_Biz.cs b/Tiger.Business.WMS/WMS_ITEM_Biz.cs
index 4892a66..d0e5965 100644
--- a/Tiger.Business.WMS/WMS_ITEM_Biz.cs
+++ b/Tiger.Business.WMS/WMS_ITEM_Biz.cs
@@ -3,7 +3,6 @@
 using SqlSugar;
 using System;
 using System.Collections.Generic;
-using System.DirectoryServices.ActiveDirectory;
 using System.Linq;
 using System.Threading.Tasks;
 using Tiger.IBusiness;
diff --git a/Tiger.Business.WMS/iWMS/RePrintBarcode.cs b/Tiger.Business.WMS/iWMS/RePrintBarcode.cs
index 06c159a..dd094ff 100644
--- a/Tiger.Business.WMS/iWMS/RePrintBarcode.cs
+++ b/Tiger.Business.WMS/iWMS/RePrintBarcode.cs
@@ -3,7 +3,6 @@
 using Rhea.Common;
 using System;
 using System.Collections.Generic;
-using System.DirectoryServices.ActiveDirectory;
 using System.Linq;
 using System.Security.Cryptography;
 using System.Text;
diff --git a/Tiger.IBusiness/Common/IStep.cs b/Tiger.IBusiness/Common/IStep.cs
index 16655e8..ec2bde1 100644
--- a/Tiger.IBusiness/Common/IStep.cs
+++ b/Tiger.IBusiness/Common/IStep.cs
@@ -62,12 +62,14 @@
     public enum StepStatus
     {
         [Description("姝e父")]
-        Normal = 0,
+        Normal,
+        [Description("鎴愬姛")]
+        Success,
         [Description("閿欒")]
-        Error = 1,
+        Error,
         [Description("璀﹀憡")]
-        Warning = 2,
+        Warning,
         [Description("瀹屾垚")]
-        Finished = 3,
+        Finished,
     }
 }
diff --git a/Tiger.IBusiness/Tiger.IBusiness.csproj b/Tiger.IBusiness/Tiger.IBusiness.csproj
index a6edf75..262beb7 100644
--- a/Tiger.IBusiness/Tiger.IBusiness.csproj
+++ b/Tiger.IBusiness/Tiger.IBusiness.csproj
@@ -16,10 +16,9 @@
     <PackageReference Include="Autofac.Extensions.DependencyInjection" Version="9.0.0" />
     <PackageReference Include="MailKit" Version="4.5.0" />
     <PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
-    <PackageReference Include="MQTTnet" Version="4.3.3.952" />
     <PackageReference Include="NLog" Version="5.2.8" />
     <PackageReference Include="NLog.Database" Version="5.2.8" />
-    <PackageReference Include="Rhea.Common" Version="6.1.7.1356" />
+    <PackageReference Include="Rhea.Common" Version="6.1.7.1358" />
     <PackageReference Include="Sundial" Version="2.45.0" />
   </ItemGroup>
 
diff --git a/Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs b/Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs
index c3ade56..7bff7c9 100644
--- a/Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs
+++ b/Tiger.Model.Net/Entitys/MES/ParameterEntity/PositionParameter.cs
@@ -219,6 +219,7 @@
         /// 鏄惁鎵规鐗╂枡
         /// </summary>
         public bool IsBatchItem { get; set; }
+        public List<BAS_ITEM> SubItems { get; set; } = new List<BAS_ITEM>();
         public List<MES_WIP_ASSY> Records { get; set; } = new List<MES_WIP_ASSY>();
         public bool IsFinished { get; set; } = false;
     }

--
Gitblit v1.9.3