From 1818a97f14836d85b4f3fa651f77de0394cd4371 Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期二, 27 八月 2024 14:24:36 +0800 Subject: [PATCH] 增加步骤基类,工序信息增加公布信息列表 --- Tiger.Business.MES/Transaction/Position.cs | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Tiger.Business.MES/Transaction/Position.cs b/Tiger.Business.MES/Transaction/Position.cs index f01aa1f..676be4b 100644 --- a/Tiger.Business.MES/Transaction/Position.cs +++ b/Tiger.Business.MES/Transaction/Position.cs @@ -63,7 +63,7 @@ public List<WorkStep> Steps { get; set; } = new(); public WorkStep CurStep { get; set; } public List<WorkStep> NextSteps { get; set; } = new(); - public bool IsFinishNodeSteps => !Steps.Any(q => q.Type == IWorkStep.Types.Node && !q.IsFinished); + public bool IsFinishNodeSteps => !Steps.Any(q => q.NodeType == IWorkStep.NodeTypes.Node && !q.IsFinished); public bool IsFinishAllSteps => !Steps.Any() || !Steps.Any(q => !q.IsFinished); //public int CurStep => Steps.Where(q => !q.IsFinished).OrderBy(q => q.Sequence).FirstOrDefault()?.Sequence ?? 0; private DbClient CommitDB; @@ -74,7 +74,7 @@ protected Dictionary<string, List<Action>> DBCommitList { get; set; } = new(); protected List<Position> NodeCommitList { get; set; } = new(); protected Dictionary<string, OperInfo> OperInfoDic { get; set; } = new(); - protected OperInfo CurOperInfo { get; set; } + //protected OperInfo CurOperInfo { get; set; } #endregion Propertys & Variables #region Functions @@ -198,11 +198,13 @@ { 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(); } else { info.CurNode = " 鈥� "; info.NextNode = " 鈥� "; + info.StepsInfo = new(); } return info; } @@ -249,12 +251,13 @@ } else { - var next = new WorkStep(IWorkStep.Types.Action, this) + var next = new WorkStep(IWorkStep.NodeTypes.Action, this) { Sequence = parent.Sequence + 1, Node = parent.Node, + OperSetting = CurBatch.NodeSets.FirstOrDefault(q => q.NODE_ID == parent.Node.ID), NodeAct = act, - Setting = CurBatch.ActionSets.FirstOrDefault(q => q.ACT_ID == act.ID), + ActSetting = CurBatch.ActionSets.FirstOrDefault(q => q.ACT_ID == act.ID), }; next.Init(); next.PrepNodeIDs.Add(parent.NodeID); -- Gitblit v1.9.3