服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-10-25 f165524436ee7a5040c4066081609d1d1e4ffb64
优化打印入库标签行为
已修改2个文件
32 ■■■■■ 文件已修改
Tiger.Api/Language.db 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/WorkAction/PrintInStoreLabel.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Api/Language.db
Binary files differ
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 NoNeedPrint { get; set; }
        #endregion Propertys & Variables
        #region Functions
@@ -67,7 +68,9 @@
        {
            var action = new ApiAction<SubmitOutput>(new SubmitOutput());
            if (CurPosition is YadaPacking && !(CurPosition as YadaPacking).IsPrintCustomerLabel)
            NoNeedPrint = (!CurPosition.Context.ContainsKey("CurPackage") || !(CurPosition.Context["CurPackage"] as WipPkg).IsFinished)
                                    || (CurPosition is YadaPacking && (CurPosition as YadaPacking).IsPrintCustomerLabel);
            if (NoNeedPrint)
            {
                action = End(input);
            } 
@@ -164,12 +167,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 = NoNeedPrint ? $"无需打印入库标签" : $"标签{Label.LABEL_NAME}[{Label.LABEL_CODE}]打印成功",
                };
                if (CurPosition is YadaPacking && !(CurPosition as YadaPacking).IsPrintCustomerLabel)
                {
                    wipAct.TRACE_INFO = $"无需打印入库标签";
                }
                wipActs.Add(wipAct);
            }
@@ -183,11 +182,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 (NoNeedPrint)
            {
                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;
        }