服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-09-11 27b4865c2c15b2256bff5d32d6c0853646451fbd
Tiger.Business.MES/Transaction/PackingNode.cs
@@ -86,7 +86,7 @@
                        else
                        {
                            var wosns = Biz.Db.Queryable<BIZ_MES_WO_BATCH, BIZ_MES_WO_SN>((q, s) => new JoinQueryInfos(JoinType.Inner, q.ORDER_NO == s.WORK_ORDER))
                                                        .ByAuth(input.AuthOption).Where((q, s) => s.SN == input.SN || s.TRAY_SN == input.SN).Select((q, s) => new { Batch = q, SN = s }).ToList();
                                                        .ByAuth(input.AuthOption).Where((q, s) => s.SN == input.SN || s.FLOW_SN == input.SN || s.TRAY_SN == input.SN).Select((q, s) => new { Batch = q, SN = s }).ToList();
                                                        
                            //查找到条码已绑定的工单
                            if (!wosns.IsNullOrEmpty())
@@ -100,9 +100,18 @@
                                    action.LocaleMsg = new("MES.Transaction.PackingNode.Submit.OnlyMinPackage", input.SN);
                                    return action;
                                }
                                if (Context.ContainsKey("CurPackage") && !Context["CurPackage"].IsNullOrEmpty() && (Context["CurPackage"] as WipPkg).WorkBatch != wosns.First().Batch.BATCH_NO)
                                {
                                    action.Data.ShortMsg = new("工单批次错误", ShortMessage.Types.Error);
                                    action.Data.OperInfo = new();
                                    action.IsSuccessed = false;
                                    //action.LocaleMsg = new($"正在包装工单批次[{0}]的产品,请先完成当前包装后再扫描其他批次[{1}]的产品[{2}]");
                                    action.LocaleMsg = new("MES.Transaction.PackingNode.Submit.BatchError", (Context["CurPackage"] as WipPkg).WorkBatch, wosns.First().Batch.BATCH_NO, CurSN);
                                    return action;
                                }
                                if (wosns.First().Batch.ACT_LINE != CurLine.LINE_CODE)
                                {
                                    action.Data.ShortMsg = new("产线错误", ShortMessage.Types.Error);
                                    action.Data.ShortMsg = new("产线投产错误", ShortMessage.Types.Error);
                                    action.Data.OperInfo = new();
                                    action.IsSuccessed = false;
                                    //action.LocaleMsg = new($"条码[{0}]已在产线[{1}]投入生产,请在正确岗位扫描");
@@ -585,7 +594,7 @@
                        NodeCmd = "PkgSubmit";
                        TempPkgAction = new PackingAction();
                        TempPkgAction.Init(null, this, null, null);
                        TempPkgAction.Init(this);
                        action = TempPkgAction.Submit(null);
                    }
                    else