服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2024-08-04 25f8eb843fd2046d8b94b410185e4ecdd3c07f57
Tiger.Business.MES/Transaction/PackingNode.cs
@@ -175,7 +175,8 @@
            }
            catch (Exception ex)
            {
                action.CatchExceptionWithLog(ex, $"包装工序:提交操作数据异常");
                //action.CatchExceptionWithLog(ex, $"包装工序:提交操作数据异常");
                action.CatchExceptionWithLog(ex, Biz.L("MES.Transaction.PackingNode.SubmitException"));
            }
            return action;
        }
@@ -188,9 +189,9 @@
        /// <returns></returns>
        public ApiAction<SubmitOutput> NodeSubmit(ApiAction<SubmitOutput> action, SubmitInput input)
        {
            var curNode = CurBatch.GetNode(PostCode);
            try
            {
                var curNode = CurBatch.GetNode(PostCode);
                //判断工单实时状态判断是否可以生产
                var woStatus = CurBatch.CheckCanProduce(curNode);
                if (!woStatus.IsSuccessed)
@@ -311,14 +312,23 @@
                        }
                   };
                   Steps.Add(curStep);
                   //有需要用户提交信息则添加工序节点的其他工步
                   //最后添加当前工序的行为工步
                   GenerateSteps(curStep);
                   //完成第一个工序节点工步
                   curStep.IsFinished = true;
                    //有需要用户提交信息则添加工序节点的其他工步
                    //最后添加当前工序的行为工步
                    try
                    {
                        GenerateSteps(curStep);
                    }
                    catch (System.Exception ex)
                    {
                        ResetNode();
                        //action.CatchExceptionWithLog(ex, $"{curNode.NODE_NAME}:工序行为工步生成异常,请检查工序行为设置");
                        action.CatchExceptionWithLog(ex, Biz.L("MES.Transaction.PackingNode.NodeSubmit.GenerateStepsException", curNode.NODE_NAME));
                    }
                    //完成第一个工序节点工步
                    curStep.IsFinished = true;
               CurStep = curStep;
                } 
                else if (!IsFinishNodeSteps)
@@ -372,7 +382,8 @@
            catch (Exception ex)
            {
                ResetNode();
                action.CatchExceptionWithLog(ex, $"包装工序:工序节点工步提交数据异常");
                //action.CatchExceptionWithLog(ex, $"{curNode.NODE_NAME}:工序节点工步提交数据异常,请检查工序节点设置");
                action.CatchExceptionWithLog(ex, Biz.L("MES.Transaction.PackingNode.NodeSubmitException", curNode.NODE_NAME));
            }
            return action;
        }