From fdd3e9c598b0a53a6eb84321f5c95a0862b1a673 Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期六, 03 八月 2024 22:22:34 +0800 Subject: [PATCH] 增加上料行为 --- Tiger.Business.MES/WorkAction/PrintLabel.cs | 29 ++++++----------------------- 1 files changed, 6 insertions(+), 23 deletions(-) diff --git a/Tiger.Business.MES/WorkAction/PrintLabel.cs b/Tiger.Business.MES/WorkAction/PrintLabel.cs index bab5da0..8f33876 100644 --- a/Tiger.Business.MES/WorkAction/PrintLabel.cs +++ b/Tiger.Business.MES/WorkAction/PrintLabel.cs @@ -1,5 +1,4 @@ -锘縰sing MailKit.Search; -using Rhea.Common; +锘縰sing Rhea.Common; using SqlSugar; using System; using System.Collections.Generic; @@ -7,6 +6,7 @@ using System.Text; using System.Threading.Tasks; using Tiger.IBusiness; +using Tiger.IBusiness.MES.WorkAction; using Tiger.Model; using Tiger.Model.Entitys.MES.Position; @@ -62,26 +62,9 @@ public ApiAction<SubmitOutput> TryBegin(SubmitInput input) { var action = new ApiAction<SubmitOutput>(new SubmitOutput()); - - foreach (var item in Label.Variables) - { - switch (item.VAR_TYPE.GetEnum<BAS_LABEL_VAR.VAR_TYPEs>()) - { - case BAS_LABEL_VAR.VAR_TYPEs.Constant: - item.Value = item.VAR_VALUE; - break; - case BAS_LABEL_VAR.VAR_TYPEs.ProcessVariable: - item.Value = CurPosition.GetPrintProcessValue(LabelPV, item); - break; - case BAS_LABEL_VAR.VAR_TYPEs.DateVariable: - item.Value = DateTime.Now.ToString(item.VAR_VALUE); - break; - case BAS_LABEL_VAR.VAR_TYPEs.CustomVariable: - default: - item.Value = ""; - break; - } - } + + //璁剧疆鎵撳嵃鍙橀噺鍊� + Label = CurPosition.SetLabelVariables(LabelPV, Label); action.Data.Data = Label; //濡傛灉杩斿洖鎴愬姛鍒欒涓哄綋鍓嶈涓哄彲浠ュ紑濮嬫墽琛岋紝鍚﹀垯杩斿洖澶辫触 @@ -110,7 +93,7 @@ //濡傛灉琛屼负璁剧疆涓哄嚭閿欓渶瑕侀噸缃伐搴忔搷浣� if (NodeAct.NEED_RESET == "Y") { - CurPosition.ResetSteps(); + CurPosition.ResetNode(); } } return action; -- Gitblit v1.9.3