From 8b9bf3bff68ee4b73c569d4c2d9166436cf8afd8 Mon Sep 17 00:00:00 2001 From: lxw Date: Fri, 13 Sep 2024 15:58:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8D=A2=E7=94=B5=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/Execute/SwappingStateMachine.cs | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/Service/Execute/SwappingStateMachine.cs b/Service/Execute/SwappingStateMachine.cs index eff75fa..12b6a7d 100644 --- a/Service/Execute/SwappingStateMachine.cs +++ b/Service/Execute/SwappingStateMachine.cs @@ -331,22 +331,17 @@ public class SwappingStateMachine : IDisposable StepSort = 0; Array values = Enum.GetValues(typeof(InfoEnum.BusinessSwappingStep)); - foreach (var key in StepModel.Keys.ToList()) + foreach (var value in values) { - StepModel[key].Status = 0; - StepModel[key].StartTime = null; + StepModel[(string)value] = new StepModel() + { + StepNo = (int)value, + Status = 0, + StepName = BaseEnumExtensions.GetEnumDescriptionByCode((int)value) + } + ; + ; } - //foreach (var value in values) - //{ - // StepModel[(string)value] = new StepModel() - // { - // StepNo = (int)value, - // Status = 0, - // StepName = BaseEnumExtensions.GetEnumDescriptionByCode((int)value) - // } - // ; - // ; - //} PlcSwapFlag = false; ManualSwapSuccFlag = false;