| | |
| | | { |
| | | 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(); |
| | | //有填出货数量则验证当前包装数量必须等于(出货数量/包装规则数量)的余数 |
| | |
| | | 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 |
| | | { |
| | |
| | | catch (Exception ex) |
| | | { |
| | | action.CatchExceptionWithLog(ex, $"包装工序:手动结束包装异常"); |
| | | NodeCmd = null; |
| | | } |
| | | return action; |
| | | } |