服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-10-09 65369be5502820d6367beab53e33fe3645f23a06
Tiger.Business.MES/Transaction/PackingNode.cs
@@ -624,14 +624,11 @@
                {
                    if (Context.ContainsKey("CurPackage"))
                    {
                        var CurPkg = Context["CurPackage"] as WipPkg;
                        int shipQty = input.Data.ToInt32();
                        NodeCmd = "PkgSubmit";
                        TempPkgAction = new PackingAction();
                        TempPkgAction.Init(this);
                        var CurPkg = Context["CurPackage"] as WipPkg;
                        int shipQty = input.Data.ToInt32();
                        int curQty = CurPkg.Item.TotalQty;
                        int ruleQty = TempPkgAction.PkgRule.GetTotalQty();
                        //有填出货数量则验证当前包装数量必须等于(出货数量/包装规则数量)的余数
@@ -642,7 +639,13 @@
                            action.LocaleMsg = new("MES.Transaction.PackingNode.NotMatchShipQty", shipQty, curQty, shipQty % ruleQty); 
                            return action;
                        }
                        NodeCmd = "PkgSubmit";
                        action = TempPkgAction.Submit(null);
                        if (!action.IsSuccessed)
                        {
                            NodeCmd = null;
                        }
                    }
                    else
                    {
@@ -669,6 +672,7 @@
            catch (Exception ex)
            {
                action.CatchExceptionWithLog(ex, $"包装工序:手动结束包装异常");
                NodeCmd = null;
            }
            return action;
        }