| | |
| | | /// <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) |
| | |
| | | |
| | | //保存成功,返回过站消息 |
| | | 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>()}]"); |