| | |
| | | |
| | | #region Propertys & Variables |
| | | public string ID { get; set; } = Guid.NewGuid().ToString("N"); |
| | | public string Name { get; set; } |
| | | public IWorkStep.NodeTypes NodeType { get; set; } |
| | | public MES_WO_NODE Node { get; set; } |
| | | public MES_WO_OPER OperSetting { get; set; } |
| | |
| | | public int Sequence { get; set; } |
| | | public List<string> PrepNodeIDs { get; set; } = new(); |
| | | public string NodeID => NodeType == IWorkStep.NodeTypes.Action ? NodeAct.ID : Node.ID; |
| | | private bool _IsFinished = false; |
| | | public bool IsFinished |
| | | //private bool _IsFinished = false; |
| | | //public bool IsFinished |
| | | //{ |
| | | // get => NodeType == IWorkStep.NodeTypes.Action ? CurAction.IsFinished : _IsFinished; |
| | | // set { _IsFinished = value; } |
| | | //} |
| | | public StepStatus Status { get; set; } = StepStatus.Normal; |
| | | public bool IsFinished => Status == StepStatus.Finished; |
| | | private Locale _Message; |
| | | public Locale Message |
| | | { |
| | | get => NodeType == IWorkStep.NodeTypes.Action ? CurAction.IsFinished : _IsFinished; |
| | | set { _IsFinished = value; } |
| | | get => _Message; |
| | | set { _MsgHistory.Add(_Message = value); } |
| | | } |
| | | private List<Locale> _MsgHistory = new(); |
| | | public List<Locale> MsgHistory => _MsgHistory; |
| | | public Action DBSubmitAction { get; set; } = () => { }; |
| | | #endregion |
| | | |
| | |
| | | /// 结束工步执行 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> End() |
| | | public ApiAction<SubmitOutput> End(SubmitInput input) |
| | | { |
| | | return CurAction.End(); |
| | | return CurAction.End(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取当前工步的信息 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WorkStepInfo GetInfo() |
| | | public WorkStepInfo GetInfo(string locale) |
| | | { |
| | | return new WorkStepInfo() { |
| | | ID = ID, |
| | |
| | | OperSetting = OperSetting, |
| | | NodeAct = NodeAct, |
| | | ActSetting = ActSetting, |
| | | IsFinished = IsFinished, |
| | | Status = Status.ToString(), |
| | | Message = Biz.T(Message, locale), |
| | | }; |
| | | } |
| | | #endregion |