From b2a011edd5bf1abb316900cfd041ae0f888f9dc8 Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期三, 04 九月 2024 21:02:57 +0800 Subject: [PATCH] 优化了三码合一行为 --- Tiger.Business.MES/Transaction/CollectNode.cs | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Tiger.Business.MES/Transaction/CollectNode.cs b/Tiger.Business.MES/Transaction/CollectNode.cs index bb5973e..d07171d 100644 --- a/Tiger.Business.MES/Transaction/CollectNode.cs +++ b/Tiger.Business.MES/Transaction/CollectNode.cs @@ -56,14 +56,14 @@ } else if (!IsFinishAllSteps) { - action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO]); + action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], input.Locale); } } //褰撳墠宀椾綅鍦ㄥ綋鍓嶅伐鍗曚笉鏄绔欙紝鍒欐煡鎵炬潯鐮佸凡缁戝畾鐨勫伐鍗曞綋浣滃綋鍓嶅伐鍗� 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()) @@ -101,7 +101,7 @@ } else if (!IsFinishAllSteps) { - action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO]); + action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], input.Locale); } } } @@ -162,7 +162,7 @@ //濡傛灉鎵�鏈夊伐姝ラ兘瀹屾垚 if (IsFinishAllSteps) { - result = DoIfFinishAllSteps(result); + result = DoIfFinishAllSteps(result, input.Locale); } else { @@ -279,6 +279,7 @@ WORK_ORDER = CurBatch.Batch.ORDER_NO, WIP_ID = wipSN.ID, SN = wipSN.SN, + FLOW_SN = wipSN.SN, TRAY_SN = wipSN.TRAY_SN, STATUS = BIZ_MES_WO_SN.STATUSs.NotInput.GetValue(), }); @@ -405,6 +406,7 @@ Steps.Clear(); var curStep = new Biz.WorkStep(IWorkStep.NodeTypes.Node, this) { + Name = "鎵弿浜у搧", Sequence = Steps.Count + 1, Node = curNode, OperSetting = CurBatch.NodeSets.FirstOrDefault(q => q.NODE_ID == curNode.ID), @@ -452,7 +454,7 @@ } //瀹屾垚绗竴涓伐搴忚妭鐐瑰伐姝� - curStep.IsFinished = true; + curStep.Status = StepStatus.Finished; CurStep = curStep; } else if (!IsFinishNodeSteps) @@ -460,7 +462,7 @@ var curStep = Steps.Where(q => q.NodeType == IWorkStep.NodeTypes.Node && !q.IsFinished).OrderBy(q => q.Sequence).First(); //瀹屾垚褰撳墠宸ュ簭鑺傜偣宸ユ - curStep.IsFinished = true; + curStep.Status = StepStatus.Finished; CurStep = curStep; } @@ -498,7 +500,7 @@ if (IsFinishAllSteps) { action.Data.SetValue(CurBatch, CurStep, "", IsFinishAllSteps); - action = DoIfFinishAllSteps(action); + action = DoIfFinishAllSteps(action, input.Locale); } } catch (Exception ex) @@ -516,14 +518,14 @@ /// </summary> /// <param name="action"></param> /// <returns></returns> - public ApiAction<SubmitOutput> DoIfFinishAllSteps(ApiAction<SubmitOutput> action) + public ApiAction<SubmitOutput> DoIfFinishAllSteps(ApiAction<SubmitOutput> action, string locale) { //淇濆瓨鏁版嵁搴� SaveStepsCommitActionToDB(); //淇濆瓨鎴愬姛锛岃繑鍥炶繃绔欐秷鎭� OperInfoDic[CurBatch.Batch.BATCH_NO].InputQty += CurWipSNs.Count; - action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO]); + action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], locale); action.Data.ShortMsg = new("杩囩珯鎴愬姛", ShortMessage.Types.Success); //action.LocaleMsg = new($"宸ュ崟[{CurWipSN.WORK_ORDER}]鐨勬潯鐮乕{CurWipSN.SN}]鍦ㄥ矖浣峓{CurWipSN.POST_CODE}]宸ュ簭[{CurWipSN.NODE_NAME}]杩囩珯鎴愬姛锛岀姸鎬乕{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]"); action.LocaleMsg = new("MES.Transaction.CollectNode.ScanSn.PassSuccess", CurWipSNs.First().WORK_ORDER, CurSN, CurWipSNs.First().POST_CODE, CurWipSNs.First().NODE_NAME,CurWipSNs.First().STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()); -- Gitblit v1.9.3