| | |
| | | } |
| | | else if (!IsFinishAllSteps) |
| | | { |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO]); |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], input.Locale); |
| | | } |
| | | } |
| | | //当前岗位在当前工单不是首站,则查找条码已绑定的工单当作当前工单 |
| | |
| | | } |
| | | else if (!IsFinishAllSteps) |
| | | { |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO]); |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], input.Locale); |
| | | } |
| | | } |
| | | } |
| | |
| | | //如果所有工步都完成 |
| | | if (IsFinishAllSteps) |
| | | { |
| | | result = DoIfFinishAllSteps(result); |
| | | result = DoIfFinishAllSteps(result, input.Locale); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | |
| | | //完成第一个工序节点工步 |
| | | curStep.IsFinished = true; |
| | | CurStep = curStep; |
| | | curStep.Status = StepStatus.Finished; |
| | | CurStep = curStep; |
| | | } |
| | | else if (!IsFinishNodeSteps) |
| | | { |
| | | 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; |
| | | } |
| | | |
| | |
| | | if (IsFinishAllSteps) |
| | | { |
| | | action.Data.SetValue(CurBatch, CurStep, "", IsFinishAllSteps); |
| | | action = DoIfFinishAllSteps(action); |
| | | action = DoIfFinishAllSteps(action, input.Locale); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | /// </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>()); |