| | |
| | | //如果行为被标记成已完成,则重置工序 |
| | | if (TempPkgAction.IsFinished) |
| | | { |
| | | action.Data.OperInfo = OperInfoDic.ContainsKey(CurBatch?.Batch?.BATCH_NO ?? "") ? OperInfoDic[CurBatch.Batch.BATCH_NO] : new(); |
| | | action.Data.OperInfo = CurOperInfo(input.Locale); |
| | | ResetNode(); |
| | | } |
| | | } |
| | |
| | | if (!action.IsSuccessed) |
| | | { |
| | | var info = WoContext.GetSnOperInfo(input.SN).Data; |
| | | info.InputQty = OperInfoDic[CurBatch.Batch.BATCH_NO].InputQty; |
| | | info.InputQty = CurOperInfo(input.Locale).InputQty; |
| | | action.Data.OperInfo = info; |
| | | } |
| | | else if (!IsFinishAllSteps) |
| | | { |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], input.Locale); |
| | | action.Data.OperInfo = SetOperNodeInfo(CurOperInfo(input.Locale)); |
| | | } |
| | | } |
| | | //当前岗位在当前工单不是首站,则查找条码已绑定的工单当作当前工单 |
| | |
| | | if (!action.IsSuccessed && !CurWipSNs.Any()) |
| | | { |
| | | var info = WoContext.GetSnOperInfo(input.SN).Data; |
| | | info.InputQty = OperInfoDic[CurBatch.Batch.BATCH_NO].InputQty; |
| | | info.InputQty = CurOperInfo(input.Locale).InputQty; |
| | | action.Data.OperInfo = info; |
| | | } |
| | | else if (!IsFinishAllSteps) |
| | | { |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], input.Locale); |
| | | action.Data.OperInfo = SetOperNodeInfo(CurOperInfo(input.Locale)); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (submitStep.IsNullOrEmpty()) |
| | | { |
| | | action = BeginNextActionStep(input); |
| | | action.Data.OperInfo = OperInfoDic[CurBatch.Batch.BATCH_NO]; |
| | | action.Data.OperInfo = CurOperInfo(input.Locale); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | result.Data.OperInfo = OperInfoDic[CurBatch.Batch.BATCH_NO]; |
| | | result.Data.OperInfo = CurOperInfo(input.Locale); |
| | | } |
| | | return result; |
| | | } |
| | |
| | | else |
| | | { |
| | | action.Data.ShortMsg = new("重置扫描", ShortMessage.Types.Error); |
| | | action.Data.OperInfo = OperInfoDic.ContainsKey(CurBatch?.Batch?.BATCH_NO ?? "") ? OperInfoDic[CurBatch.Batch.BATCH_NO] : new(); |
| | | action.Data.OperInfo = CurOperInfo(input.Locale); |
| | | ResetNode(); |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = new($"岗位[{CurPosition.POST_CODE}]工步执行异常,请重新扫描产品条码", CurPosition.POST_CODE); |
| | |
| | | catch (Exception ex) |
| | | { |
| | | action.Data.ShortMsg = new("工序异常", ShortMessage.Types.Error); |
| | | action.Data.OperInfo = OperInfoDic.ContainsKey(CurBatch?.Batch?.BATCH_NO ?? "") ? OperInfoDic[CurBatch.Batch.BATCH_NO] : new(); |
| | | action.Data.OperInfo = CurOperInfo(input.Locale); |
| | | //action.CatchExceptionWithLog(ex, $"包装工序:提交操作数据异常"); |
| | | action.CatchExceptionWithLog(ex, Biz.L("MES.Transaction.PackingNode.SubmitException")); |
| | | } |
| | |
| | | SaveStepsCommitActionToDB(); |
| | | |
| | | //保存成功,返回过站消息 |
| | | OperInfoDic[CurBatch.Batch.BATCH_NO].InputQty += CurWipSNs.Count; |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], locale); |
| | | CurOperInfo(locale).InputQty += CurWipSNs.Count; |
| | | action.Data.OperInfo = SetOperNodeInfo(CurOperInfo(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>()); |