| | |
| | | } |
| | | else if (!IsFinishAllSteps) |
| | | { |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO]); |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], input.Locale); |
| | | } |
| | | } |
| | | //当前岗位在当前工单不是首站,则查找条码已绑定的工单当作当前工单 |
| | |
| | | } |
| | | else if (!IsFinishAllSteps) |
| | | { |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO]); |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], input.Locale); |
| | | } |
| | | } |
| | | } |
| | |
| | | //如果所有工步都完成 |
| | | if (IsFinishAllSteps) |
| | | { |
| | | result = DoIfFinishAllSteps(result); |
| | | result = DoIfFinishAllSteps(result, input.Locale); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | |
| | | //完成第一个工序节点工步 |
| | | curStep.IsFinished = true; |
| | | curStep.Status = StepStatus.Finished; |
| | | CurStep = curStep; |
| | | } |
| | | else if (!IsFinishNodeSteps) |
| | |
| | | var curStep = Steps.Where(q => q.NodeType == IWorkStep.NodeTypes.Node && !q.IsFinished).OrderBy(q => q.Sequence).First(); |
| | | |
| | | //完成当前工序节点工步 |
| | | curStep.IsFinished = true; |
| | | curStep.Status = StepStatus.Finished; |
| | | CurStep = curStep; |
| | | } |
| | | |
| | |
| | | if (IsFinishAllSteps) |
| | | { |
| | | action.Data.SetValue(CurBatch, CurStep, "", IsFinishAllSteps); |
| | | action = DoIfFinishAllSteps(action); |
| | | action = DoIfFinishAllSteps(action, input.Locale); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | /// </summary> |
| | | /// <param name="action"></param> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> DoIfFinishAllSteps(ApiAction<SubmitOutput> action) |
| | | public ApiAction<SubmitOutput> DoIfFinishAllSteps(ApiAction<SubmitOutput> action, string locale) |
| | | { |
| | | //保存数据库 |
| | | SaveStepsCommitActionToDB(); |
| | | |
| | | //保存成功,返回过站消息 |
| | | OperInfoDic[CurBatch.Batch.BATCH_NO].InputQty += CurWipSNs.Count; |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO]); |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], locale); |
| | | action.Data.ShortMsg = new("过站成功", ShortMessage.Types.Success); |
| | | //action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]"); |
| | | action.LocaleMsg = new("MES.Transaction.CollectNode.ScanSn.PassSuccess", CurWipSNs.First().WORK_ORDER, CurSN, CurWipSNs.First().POST_CODE, CurWipSNs.First().NODE_NAME,CurWipSNs.First().STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()); |
| | |
| | | } |
| | | else if (!IsFinishAllSteps) |
| | | { |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO]); |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], input.Locale); |
| | | } |
| | | } |
| | | //当前岗位在当前工单不是首站,则查找条码已绑定的工单当作当前工单 |
| | |
| | | } |
| | | else if (!IsFinishAllSteps) |
| | | { |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO]); |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], input.Locale); |
| | | } |
| | | } |
| | | } |
| | |
| | | //如果所有工步都完成 |
| | | if (IsFinishAllSteps) |
| | | { |
| | | result = DoIfFinishAllSteps(result); |
| | | result = DoIfFinishAllSteps(result, input.Locale); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | |
| | | //完成第一个工序节点工步 |
| | | curStep.IsFinished = true; |
| | | curStep.Status = StepStatus.Finished; |
| | | CurStep = curStep; |
| | | } |
| | | else if (!IsFinishNodeSteps) |
| | |
| | | var curStep = Steps.Where(q => q.NodeType == IWorkStep.NodeTypes.Node && !q.IsFinished).OrderBy(q => q.Sequence).First(); |
| | | |
| | | //完成当前工序节点工步 |
| | | curStep.IsFinished = true; |
| | | curStep.Status = StepStatus.Finished; |
| | | CurStep = curStep; |
| | | } |
| | | |
| | |
| | | if (IsFinishAllSteps) |
| | | { |
| | | action.Data.SetValue(CurBatch, CurStep, "", IsFinishAllSteps); |
| | | action = DoIfFinishAllSteps(action); |
| | | action = DoIfFinishAllSteps(action, input.Locale); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | /// </summary> |
| | | /// <param name="action"></param> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> DoIfFinishAllSteps(ApiAction<SubmitOutput> action) |
| | | public ApiAction<SubmitOutput> DoIfFinishAllSteps(ApiAction<SubmitOutput> action, string locale) |
| | | { |
| | | //保存数据库 |
| | | SaveStepsCommitActionToDB(); |
| | | |
| | | //保存成功,返回过站消息 |
| | | OperInfoDic[CurBatch.Batch.BATCH_NO].InputQty += CurWipSNs.Count; |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO]); |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], locale); |
| | | action.Data.ShortMsg = new("过站成功", ShortMessage.Types.Success); |
| | | //action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]"); |
| | | action.LocaleMsg = new("MES.Transaction.CollectNode.ScanSn.PassSuccess", CurWipSNs.First().WORK_ORDER, CurSN, CurWipSNs.First().POST_CODE, CurWipSNs.First().NODE_NAME,CurWipSNs.First().STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()); |
| | |
| | | /// <summary> |
| | | /// 设置当前条码的工序信息 |
| | | /// </summary> |
| | | public OperInfo SetOperNodeInfo(OperInfo info) |
| | | public OperInfo SetOperNodeInfo(OperInfo info, string locale) |
| | | { |
| | | if (CurWipSNs.Any()) |
| | | { |
| | | info.CurNode = CurWipSNs.First().NODE_NAME; |
| | | info.NextNode = string.Join(",", CurBatch.GetNextNodes(CurWipSNs.First()).Select(q => q.NODE_NAME)); |
| | | info.StepsInfo = Steps.Select(q => q.GetInfo()).ToList(); |
| | | info.StepsInfo = Steps.Select(q => q.GetInfo(locale)).ToList(); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | else if (!IsFinishAllSteps) |
| | | { |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO]); |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], input.Locale); |
| | | } |
| | | } |
| | | //当前岗位在当前工单不是首站,则查找条码已绑定的工单当作当前工单 |
| | |
| | | } |
| | | else if (!IsFinishAllSteps) |
| | | { |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO]); |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], input.Locale); |
| | | } |
| | | } |
| | | } |
| | |
| | | //如果所有工步都完成 |
| | | if (IsFinishAllSteps) |
| | | { |
| | | result = DoIfFinishAllSteps(result); |
| | | result = DoIfFinishAllSteps(result, input.Locale); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | |
| | | //完成第一个工序节点工步 |
| | | curStep.IsFinished = true; |
| | | curStep.Status = StepStatus.Finished; |
| | | CurStep = curStep; |
| | | } |
| | | else if (!IsFinishNodeSteps) |
| | |
| | | var curStep = Steps.Where(q => q.NodeType == IWorkStep.NodeTypes.Node && !q.IsFinished).OrderBy(q => q.Sequence).First(); |
| | | |
| | | //完成当前工序节点工步 |
| | | curStep.IsFinished = true; |
| | | curStep.Status = StepStatus.Finished; |
| | | CurStep = curStep; |
| | | } |
| | | |
| | |
| | | if (IsFinishAllSteps) |
| | | { |
| | | action.Data.SetValue(CurBatch, CurStep, "", IsFinishAllSteps); |
| | | action = DoIfFinishAllSteps(action); |
| | | action = DoIfFinishAllSteps(action, input.Locale); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | /// </summary> |
| | | /// <param name="action"></param> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> DoIfFinishAllSteps(ApiAction<SubmitOutput> action) |
| | | public ApiAction<SubmitOutput> DoIfFinishAllSteps(ApiAction<SubmitOutput> action, string locale) |
| | | { |
| | | //保存数据库 |
| | | SaveStepsCommitActionToDB(); |
| | | |
| | | //保存成功,返回过站消息 |
| | | OperInfoDic[CurBatch.Batch.BATCH_NO].InputQty += CurWipSNs.Count; |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO]); |
| | | action.Data.OperInfo = SetOperNodeInfo(OperInfoDic[CurBatch.Batch.BATCH_NO], locale); |
| | | action.Data.ShortMsg = new("过站成功", ShortMessage.Types.Success); |
| | | //action.LocaleMsg = new($"工单[{CurWipSN.WORK_ORDER}]的条码[{CurWipSN.SN}]在岗位[{CurWipSN.POST_CODE}]工序[{CurWipSN.NODE_NAME}]过站成功,状态[{CurWipSN.STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()}]"); |
| | | action.LocaleMsg = new("MES.Transaction.CollectNode.ScanSn.PassSuccess", CurWipSNs.First().WORK_ORDER, CurSN, CurWipSNs.First().POST_CODE, CurWipSNs.First().NODE_NAME, CurWipSNs.First().STATUS.GetEnumDesc<MES_WIP_DATA.STATUSs>()); |
| | |
| | | //上料完成 |
| | | if (CurAssembly.IsFinished) |
| | | { |
| | | action = End(); |
| | | action = End(input); |
| | | } |
| | | return action; |
| | | } |
| | |
| | | /// 结束执行工序行为 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> End() |
| | | public ApiAction<SubmitOutput> End(SubmitInput input) |
| | | { |
| | | var action = new ApiAction<SubmitOutput>(new SubmitOutput()); |
| | | |
| | |
| | | }; |
| | | |
| | | IsFinished = true; |
| | | CurStep.Status = StepStatus.Finished; |
| | | action.Data.ShortMsg = new("上料完成", ShortMessage.Types.Success); |
| | | //action.LocaleMsg = new($"以下物料上料完成:{string.Join(",", CurAssembly.Items.Select(q => $"{q.ItemInfo.ITEM_NAME}({q.ItemInfo.ITEM_CODE})"))}"); |
| | | action.LocaleMsg = new("MES.WorkAction.Assembly.LoadFinish", string.Join(",", CurAssembly.Items.Select(q => $"{q.ItemInfo.ITEM_NAME}({q.ItemInfo.ITEM_CODE})"))); |
| | |
| | | //行为执行完成 |
| | | if (false) |
| | | { |
| | | action = End(); |
| | | action = End(input); |
| | | } |
| | | } |
| | | //提交数据执行失败 |
| | |
| | | /// 结束执行工序行为 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> End() |
| | | public ApiAction<SubmitOutput> End(SubmitInput input) |
| | | { |
| | | var action = new ApiAction<SubmitOutput>(new SubmitOutput()); |
| | | |
| | |
| | | }; |
| | | |
| | | IsFinished = true; |
| | | CurStep.Status = StepStatus.Finished; |
| | | action.Data.ShortMsg = new("测试完成", ShortMessage.Types.Success); |
| | | action.LocaleMsg = new($"测试结束"); |
| | | //action.LocaleMsg = new("MES.WorkAction.IPQC.Finish"); |
| | |
| | | //最外层包装已处理完成则直接结束行为 |
| | | if (CurPkg.Item.PKG_LEVEL == FinishLevel) |
| | | { |
| | | action = End(); |
| | | action = End(input); |
| | | } |
| | | //最外层包装未打印扫描则继续 |
| | | else |
| | |
| | | } |
| | | else |
| | | { |
| | | action = End(); |
| | | action = End(input); |
| | | } |
| | | } |
| | | break; |
| | |
| | | //当前包装层级的明细数量未达到包装数量,则完成本次扫描,等待下个产品进站 |
| | | else |
| | | { |
| | | action = End(); |
| | | action = End(input); |
| | | } |
| | | } |
| | | //数据异常 |
| | |
| | | /// 结束执行工序行为 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> End() |
| | | public ApiAction<SubmitOutput> End(SubmitInput input) |
| | | { |
| | | var action = new ApiAction<SubmitOutput>(new SubmitOutput()); |
| | | |
| | |
| | | } |
| | | |
| | | IsFinished = true; |
| | | CurStep.Status = StepStatus.Finished; |
| | | action.Data.ShortMsg = new("包装完成", ShortMessage.Types.Success); |
| | | |
| | | return action; |
| | |
| | | //提交数据执行成功 |
| | | if (input.Data.ToBoolean()) |
| | | { |
| | | action = End(); |
| | | action = End(input); |
| | | } |
| | | //提交数据执行失败 |
| | | else |
| | |
| | | /// 结束执行工序行为 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> End() |
| | | public ApiAction<SubmitOutput> End(SubmitInput input) |
| | | { |
| | | var action = new ApiAction<SubmitOutput>(new SubmitOutput()); |
| | | |
| | |
| | | }; |
| | | |
| | | IsFinished = true; |
| | | CurStep.Status = StepStatus.Finished; |
| | | action.Data.ShortMsg = new("打印完成", ShortMessage.Types.Success); |
| | | //action.LocaleMsg = new($"标签{Label.LABEL_NAME}[{Label.LABEL_CODE}]打印成功", Label.LABEL_NAME); |
| | | action.LocaleMsg = new("MES.WorkAction.PrintLabel.PrintSuccess", Label.LABEL_NAME, Label.LABEL_CODE); |
| | |
| | | NeedScan = false, |
| | | Label = "", |
| | | }; |
| | | action = End(); |
| | | action = End(input); |
| | | } |
| | | //厂内条码未绑定客户条码 |
| | | else |
| | |
| | | CurCSN.FLOW_SN = CurPosition.CurWipSNs.First().SN; |
| | | CurCSN.WORK_ORDER = CurPosition.WorkBatch.WO.ORDER_NO; |
| | | CurCSN.ITEM_CODE = CurPosition.WorkBatch.WO.ITEM_CODE; |
| | | action = End(); |
| | | action = End(input); |
| | | } |
| | | |
| | | return action; |
| | |
| | | /// 结束执行工序行为 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> End() |
| | | public ApiAction<SubmitOutput> End(SubmitInput input) |
| | | { |
| | | var action = new ApiAction<SubmitOutput>(new SubmitOutput()); |
| | | |
| | |
| | | }; |
| | | |
| | | IsFinished = true; |
| | | CurStep.Status = StepStatus.Finished; |
| | | action.Data.ShortMsg = new("客户条码已绑定", ShortMessage.Types.Success); |
| | | //action.LocaleMsg = new($"厂内条码[{0}]已绑定客户条码[{1}]完成", Label.LABEL_NAME); |
| | | action.LocaleMsg = new("MES.WorkAction.ThreeInOne.BindingComplete", CurCSN.FLOW_SN, CurCSN.CUST_SN); |
| | |
| | | //验证通过则保存 |
| | | if (isOK) |
| | | { |
| | | action = End(); |
| | | action = End(input); |
| | | } |
| | | |
| | | //都没有物料验证通过,则返回错误信息 |
| | |
| | | /// 结束执行工序行为 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> End() |
| | | public ApiAction<SubmitOutput> End(SubmitInput input) |
| | | { |
| | | var action = new ApiAction<SubmitOutput>(new SubmitOutput()); |
| | | |
| | |
| | | }; |
| | | |
| | | IsFinished = true; |
| | | 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); |
| | |
| | | } |
| | | else |
| | | { |
| | | action = End(); |
| | | action = End(input); |
| | | } |
| | | return action; |
| | | } |
| | |
| | | /// 结束执行工序行为 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> End() |
| | | public ApiAction<SubmitOutput> End(SubmitInput input) |
| | | { |
| | | var action = new ApiAction<SubmitOutput>(new SubmitOutput()); |
| | | |
| | |
| | | }; |
| | | |
| | | IsFinished = true; |
| | | CurStep.Status = StepStatus.Finished; |
| | | action.Data.ShortMsg = new("称重完成", ShortMessage.Types.Success); |
| | | //action.LocaleMsg = new($"条码[{CurPosition.CurSN}]称重数据[{CurPkg.WEIGHT} {CurPkg.WEIGHT_UNIT}]保存成功"); |
| | | action.LocaleMsg = new("MES.WorkAction.Weighing.SaveSuccess", CurPosition.CurSN, CurPkg.WEIGHT, CurPkg.WEIGHT_UNIT); |
| | |
| | | if (isOK) |
| | | { |
| | | CurWipExt.GetType().GetProperty($"FIELD_{ExtInfo.SEQ.ToString("00")}")?.SetValue(CurWipExt, input.SN); |
| | | action = End(); |
| | | action = End(input); |
| | | } |
| | | |
| | | //都没有物料验证通过,则返回错误信息 |
| | |
| | | /// 结束执行工序行为 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> End() |
| | | public ApiAction<SubmitOutput> End(SubmitInput input) |
| | | { |
| | | var action = new ApiAction<SubmitOutput>(new SubmitOutput()); |
| | | |
| | |
| | | }; |
| | | |
| | | IsFinished = true; |
| | | CurStep.Status = StepStatus.Finished; |
| | | action.Data.ShortMsg = new("绑定完成", ShortMessage.Types.Success); |
| | | //action.LocaleMsg = new($"产品[{CurPosition.CurWipSN.SN}]绑定[{ExtInfo.FIELD_NAME}]标签条码[{CurWipExt.GetType().GetProperty($"FIELD_{ExtInfo.SEQ.ToString("00")}")?.GetValue(CurWipExt)?.ToString()}]保存成功"); |
| | | action.LocaleMsg = new("MES.WorkAction.WipExtInfo.SaveSuccess", CurPosition.CurSN, ExtInfo.FIELD_NAME, CurWipExt.GetType().GetProperty($"FIELD_{ExtInfo.SEQ.ToString("00")}")?.GetValue(CurWipExt)?.ToString()); |
| | |
| | | |
| | | #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 |
| | |
| | | using Newtonsoft.Json; |
| | | using Rhea.Common; |
| | | using System; |
| | | using System.ComponentModel; |
| | | using Tiger.Model; |
| | | using Tiger.Model.Entitys.MES.Position; |
| | | |
| | |
| | | /// </summary> |
| | | public string ID { get; set; } |
| | | /// <summary> |
| | | /// 步骤名称 |
| | | /// </summary> |
| | | public string Name { get; set; } |
| | | /// <summary> |
| | | /// 步骤序号 |
| | | /// </summary> |
| | | public int Sequence { get; set; } |
| | | /// <summary> |
| | | /// 步骤是否完成 |
| | | /// 步骤状态 |
| | | /// </summary> |
| | | public abstract bool IsFinished { get; set; } |
| | | public StepStatus Status { get; set; } |
| | | /// <summary> |
| | | /// 步骤消息 |
| | | /// </summary> |
| | | public Locale Message { get; set; } |
| | | /// <summary> |
| | | /// 步骤消息历史 |
| | | /// </summary> |
| | | public List<Locale> MsgHistory { get; } |
| | | #endregion Propertys & Variables |
| | | |
| | | #region Functions |
| | |
| | | /// 结束执行 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public abstract ApiAction<OutputT> End(); |
| | | public abstract ApiAction<OutputT> End(InputT input); |
| | | #endregion Functions |
| | | } |
| | | |
| | | public enum StepStatus |
| | | { |
| | | [Description("正常")] |
| | | Normal = 0, |
| | | [Description("错误")] |
| | | Error = 1, |
| | | [Description("警告")] |
| | | Warning = 2, |
| | | [Description("完成")] |
| | | Finished = 3, |
| | | } |
| | | } |
| | |
| | | /// 结束执行工序行为 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ApiAction<SubmitOutput> End(); |
| | | public ApiAction<SubmitOutput> End(SubmitInput input); |
| | | #endregion Functions |
| | | } |
| | | } |
| | |
| | | public MES_WO_OPER OperSetting { get; set; } |
| | | public MES_WO_NODE_ACT NodeAct { get; set; } |
| | | public MES_WO_ACTION ActSetting { get; set; } |
| | | public bool IsFinished { get; set; } |
| | | public string Status { get; set; } |
| | | public string Message { get; set; } |
| | | } |
| | | |
| | | } |