服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2024-10-26 0295f0d93a3dd54bb6104f5e9a488f94596e756b
Tiger.Business.MES/Transaction/PackingNode.cs
@@ -48,16 +48,6 @@
            var action = new ApiAction<SubmitOutput>(new SubmitOutput());
            try
            {
                if (input.Qty.ToInt32() <= 0)
                {
                    action.Data.ShortMsg = new("请输入包装数量", ShortMessage.Types.Error);
                    action.Data.OperInfo = new();
                    action.Data.Data = "QtyError";
                    action.IsSuccessed = false;
                    action.LocaleMsg = new($"包装数量[{input.Qty}]不正确,请重新输入数量后继续包装操作");
                    //action.LocaleMsg = new("MES.Transaction.PackingNode.Submit.QtyError", input.Qty);
                    return action;
                }
                //PkgSubmit:手动结束包装,手动保存暂存的包装数据
                if (NodeCmd == "PkgSubmit")
                {
@@ -729,19 +719,6 @@
                    {
                        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();
                        //有填出货数量则验证当前包装数量必须等于(出货数量/包装规则数量)的余数
                        if (shipQty > 0 && curQty != shipQty % ruleQty)
                        {
                            action.IsSuccessed = false;
                            //action.LocaleMsg = new($"出货数量设定为[{0}],目前包装了[{1}],包装尾数的数量必需是[{2}],请装够数量后再结束包装");
                            action.LocaleMsg = new("MES.Transaction.PackingNode.NotMatchShipQty", shipQty, curQty, shipQty % ruleQty);
                            return action;
                        }
                        NodeCmd = "PkgSubmit";
                        action = TempPkgAction.Submit(null);