From 8b7114c93a3a3a6c9356393ea695f881d0da8cbb Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期日, 27 十月 2024 21:49:49 +0800 Subject: [PATCH] Merge branch 'master' of http://47.115.28.255:8110/r/TigerClouds-Tech/Server/TigerApi6_2024 --- Tiger.Business.MES/WorkAction/PrintInStoreLabel.cs | 42 +++++++++++++++++++++++++++++------------- 1 files changed, 29 insertions(+), 13 deletions(-) diff --git a/Tiger.Business.MES/WorkAction/PrintInStoreLabel.cs b/Tiger.Business.MES/WorkAction/PrintInStoreLabel.cs index 545a495..6fbe831 100644 --- a/Tiger.Business.MES/WorkAction/PrintInStoreLabel.cs +++ b/Tiger.Business.MES/WorkAction/PrintInStoreLabel.cs @@ -25,6 +25,7 @@ #endregion public BAS_LABEL_TEMP Label { get; set; } public List<BAS_LABEL_PV> LabelPV { get; set; } + public bool NoNeedInStorePrint { get; set; } #endregion Propertys & Variables #region Functions @@ -67,14 +68,22 @@ { var action = new ApiAction<SubmitOutput>(new SubmitOutput()); - if (CurPosition is YadaPacking && !(CurPosition as YadaPacking).IsPrintCustomerLabel) + //璁剧疆鎵撳嵃鍙橀噺鍊� + Label = CurPosition.SetLabelVariables(LabelPV, Label, this); + if (CurPosition.Context.ContainsKey("CurPackage")) + { + (CurPosition.Context["CurPackage"] as WipPkg).InStoreLabel = Label; + } + + //鍒ゆ柇鏄惁闇�瑕佹墦鍗板叆搴撴爣绛� + NoNeedInStorePrint = (!CurPosition.Context.ContainsKey("CurPackage") || !(CurPosition.Context["CurPackage"] as WipPkg).IsFinished) + || (CurPosition is YadaPacking && (CurPosition as YadaPacking).IsPrintCustomerLabel); + if (NoNeedInStorePrint) { action = End(input); } else { - //璁剧疆鎵撳嵃鍙橀噺鍊� - Label = CurPosition.SetLabelVariables(LabelPV, Label, this); action.Data.Data = Label; //濡傛灉杩斿洖鎴愬姛鍒欒涓哄綋鍓嶈涓哄彲浠ュ紑濮嬫墽琛岋紝鍚﹀垯杩斿洖澶辫触 @@ -164,12 +173,8 @@ ACT_VALUE_2 = Label.Variables.ToJson(), ACT_RESULT = "Y", ELAPSED_TIME = CurStep.GetElapsedTime().TotalMilliseconds.ToInt64(), - TRACE_INFO = $"鏍囩{Label.LABEL_NAME}[{Label.LABEL_CODE}]鎵撳嵃鎴愬姛", + TRACE_INFO = NoNeedInStorePrint ? $"鏃犻渶鎵撳嵃鍏ュ簱鏍囩" : $"鏍囩{Label.LABEL_NAME}[{Label.LABEL_CODE}]鎵撳嵃鎴愬姛", }; - if (CurPosition is YadaPacking && !(CurPosition as YadaPacking).IsPrintCustomerLabel) - { - wipAct.TRACE_INFO = $"鏃犻渶鎵撳嵃鍏ュ簱鏍囩"; - } wipActs.Add(wipAct); } @@ -183,11 +188,22 @@ }; 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); - action.LocaleMsg = new("MES.WorkAction.PrintInStoreLabel.PrintSuccess", Label.LABEL_NAME, Label.LABEL_CODE); + if (NoNeedInStorePrint) + { + CurStep.Message = Biz.L("鏃犻渶鎵撳嵃"); + CurStep.Status = StepStatus.Finished; + action.Data.ShortMsg = new("鏃犻渶鎵撳嵃", ShortMessage.Types.Success); + //action.LocaleMsg = new($"鏃犻渶鎵撳嵃鍏ュ簱鏍囩{0}[{1}]"); + action.LocaleMsg = new("MES.WorkAction.PrintInStoreLabel.NoNeedPrint", Label.LABEL_NAME, Label.LABEL_CODE); + } + else + { + CurStep.Message = Biz.L("鎵撳嵃瀹屾垚"); + CurStep.Status = StepStatus.Finished; + action.Data.ShortMsg = new("鎵撳嵃瀹屾垚", ShortMessage.Types.Success); + //action.LocaleMsg = new($"鍏ュ簱鏍囩{0}[{1}鎵撳嵃鎴愬姛"); + action.LocaleMsg = new("MES.WorkAction.PrintInStoreLabel.PrintSuccess", Label.LABEL_NAME, Label.LABEL_CODE); + } return action; } -- Gitblit v1.9.3