| | |
| | | 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}]保存成功"); |