服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-08-28 935722e71cc47d8c9f3b0e911de33c7eb0cbc693
Tiger.Business.MES/WorkAction/PrintLabel.cs
@@ -69,6 +69,7 @@
            //如果返回成功则认为当前行为可以开始执行,否则返回失败
            action.IsSuccessed = true;
            action.Data.ShortMsg = new("打印开始", ShortMessage.Types.Success);
            return action;
        }
@@ -82,11 +83,12 @@
            //提交数据执行成功
            if (input.Data.ToBoolean())
            {
                action = End();
                action = End(input);
            }
            //提交数据执行失败
            else
            {
                action.Data.ShortMsg = new("打印失败", ShortMessage.Types.Failed);
                action.IsSuccessed = false;
                //action.LocaleMsg = new($"标签{Label.LABEL_NAME}[{Label.LABEL_CODE}]打印失败", Label.LABEL_NAME);
                action.LocaleMsg = new("MES.WorkAction.PrintLabel.PrintFail", Label.LABEL_NAME, Label.LABEL_CODE);
@@ -102,7 +104,7 @@
        /// 结束执行工序行为
        /// </summary>
        /// <returns></returns>
        public ApiAction<SubmitOutput> End()
        public ApiAction<SubmitOutput> End(SubmitInput input)
        {
            var action = new ApiAction<SubmitOutput>(new SubmitOutput());
@@ -115,6 +117,7 @@
                    AUTH_ORG = CurPosition.WorkBatch.WO.AUTH_ORG,
                    AUTH_PROD = CurPosition.CurLine.LINE_CODE,
                    HIS_ID = CurPosition.CurWipSNHiss.First(q => q.SN == wipSn.SN).ID,
                    WIP_ID = wipSn.ID,
                    SN = wipSn.SN,
                    STATUS = wipSn.STATUS,
                    ITEM_CODE = wipSn.ITEM_CODE,
@@ -131,7 +134,11 @@
                    POST_CODE = wipSn.POST_CODE,
                    OPER_CODE = wipSn.OPER_CODE,
                    SEGMENT = wipSn.SEGMENT,
                    FLOW_SN = wipSn.FLOW_SN,
                    TRAY_SN = wipSn.TRAY_SN,
                    INNER_SN = wipSn.INNER_SN,
                    CARTON_SN = wipSn.CARTON_SN,
                    PALLET_SN = wipSn.PALLET_SN,
                    OPERATION_TIME = DateTime.Now,
                    SFTS_CODE = wipSn.SFTS_CODE,
                    SFT_CODE = wipSn.SFT_CODE,
@@ -156,6 +163,8 @@
            };
            IsFinished = true;
            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.PrintLabel.PrintSuccess", Label.LABEL_NAME, Label.LABEL_CODE);
            return action;