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/ThreeInOne.cs | 45 ++++++++++++++++++++++++++++++++------------- 1 files changed, 32 insertions(+), 13 deletions(-) diff --git a/Tiger.Business.MES/WorkAction/ThreeInOne.cs b/Tiger.Business.MES/WorkAction/ThreeInOne.cs index 072cad6..669a4fb 100644 --- a/Tiger.Business.MES/WorkAction/ThreeInOne.cs +++ b/Tiger.Business.MES/WorkAction/ThreeInOne.cs @@ -67,7 +67,9 @@ //鍙厑璁稿崟涓骇鍝佽繘琛屽鎴锋潯鐮佺粦瀹� if (CurPosition.CurWipSNs.Count > 1) { - action.Data.ShortMsg = new("璇锋壂鎻忎骇鍝�", ShortMessage.Types.Error); + CurStep.Message = Biz.L("璇锋壂鎻忓崟涓骇鍝�"); + CurStep.Status = StepStatus.Error; + action.Data.ShortMsg = new("璇锋壂鎻忓崟涓骇鍝�", ShortMessage.Types.Error); //action.LocaleMsg = new($"鏉$爜[{0}]鏄寘瑁�/杞藉叿鏉$爜锛岃閲嶆柊鎵弿鍗曚釜鍘傚唴鏉$爜杩涜瀹㈡埛鏉$爜缁戝畾"); action.LocaleMsg = new("MES.WorkAction.ThreeInOne.NotProductSN", CurPosition.CurSN); //閲嶇疆宸ュ簭鎿嶄綔 @@ -82,15 +84,22 @@ //鍘傚唴鏉$爜宸茬粦瀹氬鎴锋潯鐮侊紝鐩存帴缁撴潫琛屼负 if (!CurCSN.IsNullOrEmpty()) { - CurCSN.WORK_ORDER = CurPosition.WorkBatch.WO.ORDER_NO; - CurCSN.ITEM_CODE = CurPosition.WorkBatch.WO.ITEM_CODE; - action.Data.Data = new + if (CurCSN.WORK_ORDER == CurPosition.WorkBatch.WO.ORDER_NO) { - NeedPrint = false, - NeedScan = false, - Label = "", - }; - action = End(); + CurCSN.WORK_ORDER = CurPosition.WorkBatch.WO.ORDER_NO; + CurCSN.ITEM_CODE = CurPosition.WorkBatch.WO.ITEM_CODE; + action.Data.Data = new + { + NeedPrint = false, + NeedScan = false, + Label = "", + }; + action = End(input); + } + else + { + + } } //鍘傚唴鏉$爜鏈粦瀹氬鎴锋潯鐮� else @@ -104,7 +113,9 @@ NeedScan = true, Label = "", }; - action.Data.ShortMsg = new("鎵弿瀹㈡埛鏍囩", ShortMessage.Types.Normal); + CurStep.Message = Biz.L("鎵弿瀹㈡埛鏍囩"); + CurStep.Status = StepStatus.Normal; + action.Data.ShortMsg = new("鎵弿瀹㈡埛鏍囩", ShortMessage.Types.Normal); //action.LocaleMsg = new Locale($"璇锋壂鎻忓巶鍐呮潯鐮乕{0}]闇�瑕佺粦瀹氬鎴锋潯鐮�"); action.LocaleMsg = new Locale("MES.WorkAction.ThreeInOne.BeginScan", wipSn.SN); } @@ -118,7 +129,9 @@ NeedScan = true, Label, }; - action.Data.ShortMsg = new("鎵弿宸叉墦鍗扮殑瀹㈡埛鏍囩", ShortMessage.Types.Normal); + CurStep.Message = Biz.L("鎵弿宸叉墦鍗扮殑瀹㈡埛鏍囩"); + CurStep.Status = StepStatus.Normal; + action.Data.ShortMsg = new("鎵弿宸叉墦鍗扮殑瀹㈡埛鏍囩", ShortMessage.Types.Normal); //action.LocaleMsg = new Locale($"寮�濮嬫墦鍗板巶鍐呮潯鐮乕{0}]瀵瑰簲鐨勫鎴锋潯鐮�"); action.LocaleMsg = new Locale("MES.WorkAction.ThreeInOne.BeginPrint", wipSn.SN); } @@ -147,6 +160,8 @@ //瀹㈡埛鏉$爜宸茬粦瀹氬叾浠栧巶鍐呮潯鐮� if (!CurCSN.FLOW_SN.IsNullOrEmpty() && CurCSN.FLOW_SN != CurPosition.CurWipSNs.First().SN) { + CurStep.Message = Biz.L("缁戝畾澶辫触"); + CurStep.Status = StepStatus.Error; action.Data.ShortMsg = new("缁戝畾澶辫触", ShortMessage.Types.Failed); action.IsSuccessed = false; //action.LocaleMsg = new($"鍘傚唴鏉$爜[{0}]缁戝畾瀹㈡埛鏉$爜[{1}]澶辫触锛屽鎴锋潯鐮佸凡缁戝畾鍘傚唴鏉$爜[{2}]"); @@ -160,6 +175,8 @@ //瀹㈡埛鏉$爜涓嶅睘浜庡綋鍓嶅伐鍗曠殑瀹㈡埛 else if (CurCSN.CUST_CODE.IsNullOrEmpty(CurPosition.WorkBatch.WO.CUST_CODE) != CurPosition.WorkBatch.WO.CUST_CODE) { + CurStep.Message = Biz.L("缁戝畾澶辫触"); + CurStep.Status = StepStatus.Error; action.Data.ShortMsg = new("缁戝畾澶辫触", ShortMessage.Types.Failed); action.IsSuccessed = false; //action.LocaleMsg = new($"瀹㈡埛鏉$爜[{0}]灞炰簬瀹㈡埛[{1}]锛屼笌褰撳墠宸ュ崟鐨勫鎴穂{2}]涓嶄竴鑷�"); @@ -177,7 +194,7 @@ CurCSN.FLOW_SN = CurPosition.CurWipSNs.First().SN; CurCSN.WORK_ORDER = CurPosition.WorkBatch.WO.ORDER_NO; CurCSN.ITEM_CODE = CurPosition.WorkBatch.WO.ITEM_CODE; - action = End(); + action = End(input); } return action; @@ -186,7 +203,7 @@ /// 缁撴潫鎵ц宸ュ簭琛屼负 /// </summary> /// <returns></returns> - public ApiAction<SubmitOutput> End() + public ApiAction<SubmitOutput> End(SubmitInput input) { var action = new ApiAction<SubmitOutput>(new SubmitOutput()); @@ -247,6 +264,8 @@ }; IsFinished = true; + CurStep.Message = Biz.L("瀹㈡埛鏉$爜宸茬粦瀹�"); + CurStep.Status = StepStatus.Finished; action.Data.ShortMsg = new("瀹㈡埛鏉$爜宸茬粦瀹�", ShortMessage.Types.Success); //action.LocaleMsg = new($"鍘傚唴鏉$爜[{0}]宸茬粦瀹氬鎴锋潯鐮乕{1}]瀹屾垚", Label.LABEL_NAME); action.LocaleMsg = new("MES.WorkAction.ThreeInOne.BindingComplete", CurCSN.FLOW_SN, CurCSN.CUST_SN); -- Gitblit v1.9.3