| | |
| | | /// </summary> |
| | | public partial class WorkStep : IWorkStep |
| | | { |
| | | public WorkStep(string id, IWorkStep.Types type) |
| | | public WorkStep(IWorkStep.Types type, IPosition position) |
| | | { |
| | | ID = id; |
| | | Type = type; |
| | | CurPosition = position; |
| | | } |
| | | |
| | | #region Propertys & Variables |
| | | public string ID { get; set; } = Guid.NewGuid().ToString("N"); |
| | | |
| | | public IWorkStep.Types Type { get; set; } |
| | | public int Sequence { get; set; } |
| | | public MES_WO_NODE Node { get; set; } |
| | | public MES_WO_NODE_ACT NodeAct { get; set; } |
| | | public MES_WO_ACTION Setting { get; set; } |
| | | public IPosition CurPosition { get; set; } |
| | | public IWorkAction CurAction { get; set; } |
| | | public int Sequence { get; set; } |
| | | public List<string> PrepNodeIDs { get; set; } = new(); |
| | | public string NodeID => Type == IWorkStep.Types.Action ? NodeAct.ID : Node.ID; |
| | | private bool _IsFinished = false; |
| | | public bool IsFinished |
| | | { |
| | |
| | | |
| | | #region Functions |
| | | /// <summary> |
| | | /// 开始执行工步 |
| | | /// 初始化工步 |
| | | /// </summary> |
| | | /// <param name="position"></param> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> Begin(IPosition position) |
| | | public void Init() |
| | | { |
| | | CurPosition = position; |
| | | CurAction = DI.Resolve(NodeAct.Definition.SERVICE_TYPE) as IWorkAction; |
| | | //CurAction = DI.Resolve("Tiger.IBusiness.IPrintLabel,Tiger.IBusiness") as IWorkAction; |
| | | return CurAction.Begin(this, position, NodeAct, Setting); |
| | | CurAction.Init(this, CurPosition, NodeAct, Setting); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 尝试开始执行工步 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> TryBegin(SubmitInput input) |
| | | { |
| | | return CurAction.TryBegin(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取行为开始的提示信息 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public Locale GetBeginMsg() |
| | | { |
| | | return CurAction.GetBeginMsg(); |
| | | } |
| | | |
| | | /// <summary> |