Browse Source

update command 設定Jump会导致PreProcess

jiangjy 2 weeks ago
parent
commit
8185fbf6e5
1 changed files with 7 additions and 1 deletions
  1. 7 1
      Furnace/FurnaceRT/Equipments/PMs/RecipeExecutions/Process.cs

+ 7 - 1
Furnace/FurnaceRT/Equipments/PMs/RecipeExecutions/Process.cs

@@ -1479,13 +1479,15 @@ namespace FurnaceRT.Equipments.PMs.RecipeExecutions
         protected int CalcRecipeTime()
         {
             double total = 0;
-
+            Dictionary<int, bool> keyValuePairs = new Dictionary<int, bool>();
             int iStart = PMModule.IsJobProcess ? 1 : 0;
             try
             {
                 for (int i = iStart; i < PMModule.RecipeRunningInfo.RecipeStepList.Count; i++)
                 //for (int i = PMModule.RecipeRunningInfo.RecipeStepList.Count - 1; i <= iStart; i--)
                 {
+                    if (keyValuePairs.ContainsKey(i))
+                        continue;
                     if (!PMModule.RecipeRunningInfo.RecipeStepList[i].IsJumpStep)
                     {
                         if (PMModule.RecipeRunningInfo.RecipeStepList[i].IsLoopEndStep)
@@ -1518,6 +1520,10 @@ namespace FurnaceRT.Equipments.PMs.RecipeExecutions
                     }
                     else
                     {
+                        if (!keyValuePairs.ContainsKey(i))
+                        {
+                            keyValuePairs.Add(i, true);
+                        }
                         i = PMModule.RecipeRunningInfo.RecipeStepList[i].JumpStepNo - 1;// -1是因为i++
                     }
                     if (i < PMModule.RecipeRunningInfo.RecipeStepList.Count - 1)