服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-10-10 83dbcd7c0d6afcbbd1f20dc1e7371be89ee28f0b
Tiger.Business.MES/Transaction/CollectNode.cs
@@ -210,7 +210,7 @@
        public ApiAction<SubmitOutput> NodeSubmit(ApiAction<SubmitOutput> action, SubmitInput input)
        {
            var curNode = CurBatch.GetNode(PostCode);
            var curNodeSetting = CurBatch.GetNodeSetting(curNode);
            try
            {
                //工序节点逻辑增加如果根基当前岗位找不到对应工序的时候要报错
@@ -222,6 +222,8 @@
                    action.LocaleMsg = new("MES.Transaction.CollectNode.NodeSubmit.OperateNodeError", PostCode, CurBatch.WO.ORDER_NO);
                    return action;
                }
                var curNodeSetting = CurBatch.GetNodeSetting(curNode);
                //当工步列表为空,则执行当前工序的必要逻辑当作第一个工序节点,完成后按需求创建后续的工步列表
                if (Steps.IsNullOrEmpty())
                {
@@ -306,7 +308,7 @@
                    }
                    //更新工单条码明细信息
                    var woSNs = CurBatch.WoSNs.Where(q => wipSNs.Any(w => q.SN == w.SN)).ToList();
                    var woSNs = CurBatch.WoSNs.Where(q => wipSNs.Any(w => q.WIP_ID == w.ID)).ToList();
                    foreach (var woSN in woSNs)
                    {
                        woSN.AUTH_ORG = CurBatch.WO.AUTH_ORG;
@@ -340,7 +342,7 @@
                        //如果是投入站
                        if (curNodeSetting.IS_INPUT == "Y")
                        {
                            var woSN = woSNs.First(q => q.SN == wipSN.SN);
                            var woSN = woSNs.First(q => q.WIP_ID == wipSN.ID);
                            woSN.STATUS = BIZ_MES_WO_SN.STATUSs.Inputed.GetValue();
                            wipSN.STATUS = MES_WIP_DATA.STATUSs.Input.GetValue();
                            wipSN.INLINE_DATE = DateTime.Now;
@@ -348,7 +350,7 @@
                        //如果是产出站
                        if (curNodeSetting.IS_OUTPUT == "Y")
                        {
                            var woSN = woSNs.First(q => q.SN == wipSN.SN);
                            var woSN = woSNs.First(q => q.WIP_ID == wipSN.ID);
                            woSN.STATUS = BIZ_MES_WO_SN.STATUSs.Finished.GetValue();
                            wipSN.STATUS = MES_WIP_DATA.STATUSs.Finished.GetValue();
                            wipSN.OUTLINE_DATE = DateTime.Now;
@@ -560,7 +562,7 @@
            //保存成功,返回过站消息
            CurOperInfo(locale).InputQty += CurWipSNs.Count;
            action.Data.OperInfo = SetOperNodeInfo(CurOperInfo(locale));
            action.Data.ShortMsg = new("过站成功", ShortMessage.Types.Success);
            action.Data.ShortMsg = new(CurWipSNs.Any(q => q.DFT_FLAG == "Y") ? "不良过站" : "良品过站", ShortMessage.Types.Success);
            //action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]");
            action.LocaleMsg = new("MES.Transaction.CollectNode.ScanSn.PassSuccess", CurWipSNs.First().WORK_ORDER, CurSN, CurWipSNs.First().POST_CODE, CurWipSNs.First().NODE_NAME,CurWipSNs.First().STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>());