| | |
| | | Setting = setting; |
| | | #endregion |
| | | |
| | | |
| | | CurStep.Message = Biz.L("验证产品数据"); |
| | | CurStep.Status = StepStatus.Normal; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | action = Submit(input); |
| | | |
| | | //如果返回成功则认为当前行为可以开始执行,否则返回失败 |
| | | //CurStep.Message = Biz.L("验证开始"); |
| | | //CurStep.Status = StepStatus.Normal; |
| | | //action.IsSuccessed = true; |
| | | //action.Data.ShortMsg = new("验证开始", ShortMessage.Types.Success); |
| | | return action; |
| | |
| | | var action = new ApiAction<SubmitOutput>(new SubmitOutput()); |
| | | |
| | | action = Verify(input, action); |
| | | //上料数据保存失败 |
| | | //数据保存失败 |
| | | if (!action.IsSuccessed) |
| | | { |
| | | //如果行为设置为出错需要重置工序操作 |
| | |
| | | //验证逻辑 |
| | | //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}]标签条码"); |
| | |
| | | //验证通过则保存 |
| | | if (isOK) |
| | | { |
| | | action = End(); |
| | | action = End(input); |
| | | } |
| | | |
| | | //都没有物料验证通过,则返回错误信息 |
| | | } |
| | | 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; |
| | |
| | | /// 结束执行工序行为 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> End() |
| | | public ApiAction<SubmitOutput> End(SubmitInput input) |
| | | { |
| | | var action = new ApiAction<SubmitOutput>(new SubmitOutput()); |
| | | |
| | |
| | | }; |
| | | |
| | | IsFinished = true; |
| | | CurStep.Message = Biz.L("验证通过"); |
| | | CurStep.Status = StepStatus.Finished; |
| | | action.Data.ShortMsg = new("验证通过", ShortMessage.Types.Success); |
| | | //action.LocaleMsg = new($"产品[{CurPosition.CurSN}]验证通过"); |
| | | action.LocaleMsg = new("MES.WorkAction.VerifyItem.VerifySuccess", CurPosition.CurSN); |