| | |
| | | using MailKit.Search; |
| | | using Rhea.Common; |
| | | using Rhea.Common; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Tiger.IBusiness; |
| | | using Tiger.IBusiness.MES.WorkAction; |
| | | using Tiger.Model; |
| | | using Tiger.Model.Entitys.MES.Position; |
| | | |
| | |
| | | public ApiAction<SubmitOutput> TryBegin(SubmitInput input) |
| | | { |
| | | var action = new ApiAction<SubmitOutput>(new SubmitOutput()); |
| | | |
| | | foreach (var item in Label.Variables) |
| | | { |
| | | switch (item.VAR_TYPE.GetEnum<BAS_LABEL_VAR.VAR_TYPEs>()) |
| | | { |
| | | case BAS_LABEL_VAR.VAR_TYPEs.Constant: |
| | | item.Value = item.VAR_VALUE; |
| | | break; |
| | | case BAS_LABEL_VAR.VAR_TYPEs.ProcessVariable: |
| | | item.Value = CurPosition.GetPrintProcessValue(LabelPV, item); |
| | | break; |
| | | case BAS_LABEL_VAR.VAR_TYPEs.DateVariable: |
| | | item.Value = DateTime.Now.ToString(item.VAR_VALUE); |
| | | break; |
| | | case BAS_LABEL_VAR.VAR_TYPEs.CustomVariable: |
| | | default: |
| | | item.Value = ""; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //设置打印变量值 |
| | | Label = CurPosition.SetLabelVariables(LabelPV, Label); |
| | | action.Data.Data = Label; |
| | | |
| | | //如果返回成功则认为当前行为可以开始执行,否则返回失败 |
| | |
| | | //如果行为设置为出错需要重置工序操作 |
| | | if (NodeAct.NEED_RESET == "Y") |
| | | { |
| | | CurPosition.ResetSteps(); |
| | | CurPosition.ResetNode(); |
| | | } |
| | | } |
| | | return action; |