| | |
| | | NodeAct = nodeAct; |
| | | Setting = setting; |
| | | #endregion |
| | | |
| | | CurPkg = Biz.Db.Queryable<MES_WIP_PKG>().Where(q => q.SN == CurPosition.CurSN && q.AUTH_ORG == CurPosition.WorkBatch.WO.AUTH_ORG).First() ?? new() |
| | | { |
| | | AUTH_ORG = CurPosition.WorkBatch.WO.AUTH_ORG, |
| | |
| | | OPER_CODE = CurPosition.CurWipSNs.First().OPER_CODE, |
| | | SEGMENT = CurPosition.CurWipSNs.First().SEGMENT, |
| | | }; |
| | | |
| | | CurStep.Message = Biz.L("等待称重数据"); |
| | | CurStep.Status = StepStatus.Normal; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | action.LocaleMsg = GetBeginMsg(); |
| | | |
| | | //如果返回成功则认为当前行为可以开始执行,否则返回失败 |
| | | CurStep.Message = Biz.L("称重开始"); |
| | | CurStep.Status = StepStatus.Normal; |
| | | action.IsSuccessed = true; |
| | | action.Data.ShortMsg = new("称重开始", ShortMessage.Types.Success); |
| | | return action; |
| | |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | CurStep.Message = Biz.L("称重异常"); |
| | | CurStep.Status = StepStatus.Error; |
| | | action.Data.ShortMsg = new("称重异常", ShortMessage.Types.Error); |
| | | action.CatchExceptionWithLog(ex, $"称重行为:条码[{CurPosition.CurSN}]称重数据[{input?.Data?.ToString()}]保存异常"); |
| | | action.LocaleMsg = new("MES.WorkAction.Weighing.SaveWeightInfoException", CurPosition.CurSN, input?.Data.ToString()); |
| | |
| | | }; |
| | | |
| | | IsFinished = true; |
| | | CurStep.Message = Biz.L("称重完成"); |
| | | CurStep.Status = StepStatus.Finished; |
| | | action.Data.ShortMsg = new("称重完成", ShortMessage.Types.Success); |
| | | //action.LocaleMsg = new($"条码[{CurPosition.CurSN}]称重数据[{CurPkg.WEIGHT} {CurPkg.WEIGHT_UNIT}]保存成功"); |