| | |
| | | action = Submit(input); |
| | | |
| | | //如果返回成功则认为当前行为可以开始执行,否则返回失败 |
| | | //CurStep.Message = Biz.L("验证开始"); |
| | | //CurStep.Status = StepStatus.Normal; |
| | | //action.IsSuccessed = true; |
| | | //action.Data.ShortMsg = new("验证开始", ShortMessage.Types.Success); |
| | | return action; |
| | |
| | | //验证逻辑 |
| | | //if (input.SN.IsNullOrEmpty()) |
| | | { |
| | | CurStep.Message = Biz.L("验证失败"); |
| | | CurStep.Status = StepStatus.Error; |
| | | action.Data.ShortMsg = new("验证失败", ShortMessage.Types.Failed); |
| | | action.IsSuccessed = isOK = false; |
| | | //action.LocaleMsg = new Locale($"错误:[{ExtInfo.FIELD_NAME}]标签条码不能为空,请重新扫描"); |
| | |
| | | } |
| | | //if (CurPosition.CurWipSNs.Any(w => w.SN == input.SN)) |
| | | { |
| | | CurStep.Message = Biz.L("验证失败"); |
| | | CurStep.Status = StepStatus.Error; |
| | | action.Data.ShortMsg = new("验证失败", ShortMessage.Types.Failed); |
| | | action.IsSuccessed = isOK = false; |
| | | //action.LocaleMsg = new Locale($"错误:扫描到产品条码[{input.SN}],请重新扫描[{ExtInfo.FIELD_NAME}]标签条码"); |
| | |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | CurStep.Message = Biz.L("验证异常"); |
| | | CurStep.Status = StepStatus.Error; |
| | | action.Data.ShortMsg = new("验证异常", ShortMessage.Types.Exception); |
| | | action.CatchExceptionWithLog(ex, $"验证异常"); |
| | | action.IsSuccessed = false; |
| | |
| | | }; |
| | | |
| | | IsFinished = true; |
| | | CurStep.Message = Biz.L("验证通过"); |
| | | CurStep.Status = StepStatus.Finished; |
| | | action.Data.ShortMsg = new("验证通过", ShortMessage.Types.Success); |
| | | //action.LocaleMsg = new($"产品[{CurPosition.CurSN}]验证通过"); |