服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-09-13 12b0846ee59a358fbf5bc392f74794b8ef13d8eb
增加出货数量验证
已修改4个文件
31 ■■■■ 文件已修改
Tiger.Api/Language.db 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/Transaction/PackingNode.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/Transaction/TestNode.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Model.Net/Entitys/MES/BIZ_MES_WO.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Api/Language.db
Binary files differ
Tiger.Business.MES/Transaction/PackingNode.cs
@@ -294,7 +294,7 @@
                        action.Data.ShortMsg = new("工单错误", ShortMessage.Types.Error);
                        action.IsSuccessed = false;
                        //action.LocaleMsg = new($"产品[{CurSN}]不属于当前工单,请切换到工单[{wipSNs.First().WORK_ORDER}]后再扫描");
                        action.LocaleMsg = new("MES.Transaction.PackingNode.NodeSubmit.WoError", CurSN, wipSNs.First().WORK_ORDER);
                        action.LocaleMsg = new("MES.Transaction.PackingNode.NodeSubmit.WoError", input.SN, wipSNs.First().WORK_ORDER);
                        return action;
                    }
                    else
@@ -302,7 +302,7 @@
                        action.Data.ShortMsg = new("产线错误", ShortMessage.Types.Error);
                        action.IsSuccessed = false;
                        //action.LocaleMsg = new($"产品[{CurSN}]已在产线[{wipSNs.First().LINE_CODE}]投产,请到产线[{wipSNs.First().LINE_CODE}]扫描");
                        action.LocaleMsg = new("MES.Transaction.PackingNode.NodeSubmit.LineError", CurSN, wipSNs.First().LINE_CODE);
                        action.LocaleMsg = new("MES.Transaction.PackingNode.NodeSubmit.LineError", input.SN, wipSNs.First().LINE_CODE);
                        return action;
                    }
                }
@@ -599,16 +599,24 @@
                {
                    if (Context.ContainsKey("CurPackage"))
                    {
                        var CurPkg = Context["CurPackage"] as WipPkg;
                        int shipQty = input.Data.ToInt32();
                        //有填出货数量则验证当前包装数量必须等于(出货数量/包装规则数量)的余数
                        if (shipQty > 0)
                        {
                        }
                        NodeCmd = "PkgSubmit";
                        TempPkgAction = new PackingAction();
                        TempPkgAction.Init(this);
                        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);
                        }
                        action = TempPkgAction.Submit(null);
                    }
                    else
Tiger.Business.MES/Transaction/TestNode.cs
@@ -253,7 +253,7 @@
                        action.Data.ShortMsg = new("工单错误", ShortMessage.Types.Error);
                        action.IsSuccessed = false;
                        //action.LocaleMsg = new($"产品[{CurSN}]不属于当前工单,请切换到工单[{wipSNs.First().WORK_ORDER}]后再扫描");
                        action.LocaleMsg = new("MES.Transaction.TestNode.NodeSubmit.WoError", CurSN, wipSNs.First().WORK_ORDER);
                        action.LocaleMsg = new("MES.Transaction.TestNode.NodeSubmit.WoError", input.SN, wipSNs.First().WORK_ORDER);
                        return action;
                    }
                    else
@@ -261,7 +261,7 @@
                        action.Data.ShortMsg = new("产线错误", ShortMessage.Types.Error);
                        action.IsSuccessed = false;
                        //action.LocaleMsg = new($"产品[{CurSN}]已在产线[{wipSNs.First().LINE_CODE}]投产,请到产线[{wipSNs.First().LINE_CODE}]扫描");
                        action.LocaleMsg = new("MES.Transaction.TestNode.NodeSubmit.LineError", CurSN, wipSNs.First().LINE_CODE);
                        action.LocaleMsg = new("MES.Transaction.TestNode.NodeSubmit.LineError", input.SN, wipSNs.First().LINE_CODE);
                        return action;
                    }
                }
Tiger.Model.Net/Entitys/MES/BIZ_MES_WO.cs
@@ -209,6 +209,11 @@
        [DisplayName("销售订单")]
        public string SALES_ORDER { get; set; }
        /// <summary>
        /// 销售合同号
        /// </summary>
        [DisplayName("销售合同号")]
        public string SALES_CONTRACT { get; set; }
        /// <summary>
        /// 销售订单备注
        /// </summary>
        [DisplayName("销售订单备注")]