服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-10-18 c827cf7fe5e4561dbb8424f6d423200f2f03caa4
Tiger.Business.MES/Transaction/CollectNode.cs
@@ -57,7 +57,7 @@
                            info.InputQty = CurOperInfo(input.Locale).InputQty;
                            action.Data.OperInfo = info;
                        }
                        else if (!IsFinishAllSteps)
                        else if (Steps.Any() && !IsFinishAllSteps)
                        {
                            action.Data.OperInfo = SetOperNodeInfo(CurOperInfo(input.Locale));
                        }
@@ -115,29 +115,30 @@
                        //查找不到条码已绑定的工单
                        else
                        {
                            //没有当前工单,则先选择工单后再扫描条码
                            if (CurBatch.IsNullOrEmpty())
                            var lastSn = wosns.OrderByDescending(q => q.SN.UPDATE_TIME).FirstOrDefault();
                            if (!lastSn.IsNullOrEmpty())
                            {
                                action.Data.ShortMsg = new("未选择工单", ShortMessage.Types.Error);
                                action.Data.ShortMsg = new($"产品{lastSn.SN.STATUS.GetEnumDesc<BIZ_MES_WO_SN.STATUSs>()}", ShortMessage.Types.Error);
                                action.Data.OperInfo = new();
                                action.IsSuccessed = false;
                                //action.LocaleMsg = new($"未选择工单,请先选择要生产的工单");
                                action.LocaleMsg = new("MES.Transaction.CollectNode.Submit.NotSelectOrderException");
                                //action.LocaleMsg = new($"进站扫描错误,条码[{0}]{1}", input.SN);
                                action.LocaleMsg = new("MES.Transaction.CollectNode.Submit.SnStatusError", input.SN, lastSn.SN.STATUS.GetEnumDesc<BIZ_MES_WO_SN.STATUSs>());
                            }
                            //有当前工单且不是投入,则提示条码未投入生产,请先去首站扫描
                            else
                            {
                                var lastSn = wosns.OrderByDescending(q => q.SN.UPDATE_TIME).FirstOrDefault();
                                if (!lastSn.IsNullOrEmpty())
                                //没有当前工单,则先选择工单后再扫描条码
                                if (CurBatch.IsNullOrEmpty())
                                {
                                    action.Data.ShortMsg = new($"产品{lastSn.SN.STATUS.GetEnumDesc<BIZ_MES_WO_SN.STATUSs>()}", ShortMessage.Types.Error);
                                    action.Data.ShortMsg = new("未选择工单", ShortMessage.Types.Error);
                                    action.Data.OperInfo = new();
                                    action.IsSuccessed = false;
                                    //action.LocaleMsg = new($"进站扫描错误,条码[{0}]{1}", input.SN);
                                    action.LocaleMsg = new("MES.Transaction.CollectNode.Submit.NotInputException", input.SN);
                                    //action.LocaleMsg = new($"未选择工单,请先选择要生产的工单");
                                    action.LocaleMsg = new("MES.Transaction.CollectNode.Submit.NotSelectOrderException");
                                }
                                //有当前工单且不是投入,则提示条码未投入生产,请先去首站扫描
                                else
                                {
                                    action.Data.ShortMsg = new("未投入生产", ShortMessage.Types.Error);
                                    action.Data.OperInfo = new();
                                    action.IsSuccessed = false;
@@ -423,7 +424,7 @@
                    CurWipSNHiss.Clear();
                    foreach (var wipSN in wipSNs)
                    {
                        var his = new MES_WIP_HIS(wipSN, $"工单[{wipSN.WORK_ORDER}]条码[{wipSN.SN}]在岗位[{wipSN.POST_CODE}]过站工序[{wipSN.NODE_NAME}]成功");
                        var his = new MES_WIP_HIS(wipSN, $"工单[{wipSN.WORK_ORDER}]条码[{wipSN.SN}]在岗位[{wipSN.POST_CODE}]过站工序[{wipSN.NODE_NAME}]成功(TransId:{TransID})");
                        wipSN.History.Add(his);
                        CurWipSNHiss.Add(his);
                    }
@@ -595,7 +596,7 @@
                var wipHiss = new List<MES_WIP_HIS>();
                foreach (var wipSN in CurWipSNs)
                {
                    var his = new MES_WIP_HIS(wipSN, $"工单[{wipSN.WORK_ORDER}]条码[{wipSN.SN}]在岗位[{wipSN.POST_CODE}]过站工序[{wipSN.NODE_NAME}]成功");
                    var his = new MES_WIP_HIS(wipSN, $"工单[{wipSN.WORK_ORDER}]条码[{wipSN.SN}]在岗位[{wipSN.POST_CODE}]过站工序[{wipSN.NODE_NAME}]成功(TransId:{TransID})");
                    wipSN.History.Add(his);
                    wipHiss.Add(his);
                }