From 6c781d6e14d4fbd6903006d71acdf45ec87632c1 Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期日, 13 十月 2024 20:46:12 +0800 Subject: [PATCH] 修复手动结束包装后支持检查条工单完工 --- Tiger.Business.MES/Transaction/PackingNode.cs | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/Tiger.Business.MES/Transaction/PackingNode.cs b/Tiger.Business.MES/Transaction/PackingNode.cs index ebf4b87..5279f56 100644 --- a/Tiger.Business.MES/Transaction/PackingNode.cs +++ b/Tiger.Business.MES/Transaction/PackingNode.cs @@ -621,12 +621,18 @@ /// <returns></returns> public ApiAction<SubmitOutput> DoIfFinishAllSteps(ApiAction<SubmitOutput> action, string locale) { + var curPkg = Context.ContainsKey("CurPackage") ? Context["CurPackage"] as WipPkg : null; var operInfo = SetOperNodeInfo(CurOperInfo(locale)); Action endAction = null; //濡傛灉褰撳墠鏉$爜宸茬粡璧板埌娴佺▼缁堢偣鍒欒褰曟潯鐮佸畬宸� if (operInfo.IsReachedEndNode) { + //鏍囪褰撳墠鍖呰淇℃伅涓虹粓鐐圭珯 + if (!curPkg.IsNullOrEmpty()) + { + curPkg.IsReachedEndNode = true; + } //鏇存柊宸ュ崟鏉$爜鏄庣粏淇℃伅 var woSNs = CurBatch.WoSNs.Where(q => CurWipSNs.Any(w => q.WIP_ID == w.ID)).ToList(); foreach (var woSN in woSNs) @@ -673,7 +679,7 @@ //淇濆瓨鎴愬姛锛岃繑鍥炶繃绔欐秷鎭� CurOperInfo(locale).InputQty += CurWipSNs.Count; - action.Data.Data = new PackingActionOutput() { PkgInfo = Context.ContainsKey("CurPackage") ? Context["CurPackage"] as WipPkg : null }; + action.Data.Data = new PackingActionOutput() { PkgInfo = curPkg }; action.Data.OperInfo = operInfo; action.Data.ShortMsg = new(CurWipSNs.Any(q => q.DFT_FLAG == "Y") ? "涓嶈壇杩囩珯" : "鑹搧杩囩珯", ShortMessage.Types.Success); //action.LocaleMsg = new($"宸ュ崟[{CurWipSN.WORK_ORDER}]鐨勬潯鐮乕{CurWipSN.SN}]鍦ㄥ矖浣峓{CurWipSN.POST_CODE}]宸ュ簭[{CurWipSN.NODE_NAME}]杩囩珯鎴愬姛锛岀姸鎬乕{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]"); -- Gitblit v1.9.3