Browse Source

recipeName去除冒号与数字

jiangjy 1 week ago
parent
commit
76130df884

+ 2 - 0
Furnace/FurnaceRT/Config/System.sccfg

@@ -18,6 +18,8 @@
 		<config default="false" name="AxisMonShowKey" description="" max="" min="" paramter="" tag="" unit="" type="Bool" visible="false" />
 		<!--是否检查Recipe文件夹结构不正确-->
 		<config default="true" name="EnableCheckRecipe" description="" max="" min="" paramter="" tag="" unit="" type="Bool"   />
+		<!--fdc ProcessRecipeStepName与SubName是否去除StepName中的 数字与:-->
+		<config default="true" name="SplitRecipeName" description="Split Recipe Name" max="" min="" paramter="" tag="" unit="" type="Bool"  visible="false"/>
 
 		<!--Valve是否展示新版图标-->
 		<config default="false" name="IsShowJetValve" description="" max="" min="" paramter="" tag="" unit="" type="Bool" visible="false" />

+ 18 - 2
Furnace/FurnaceRT/Equipments/PMs/PMModule.cs

@@ -1755,7 +1755,7 @@ namespace FurnaceRT.Equipments.PMs
         {
             if (isSub)
             {
-                _subRecipeStepName = stepName;
+                _subRecipeStepName = GetProcessRecipeStepName(stepName);
                 _subRecipeStepNumber = stepNo;
                 _isInSubProcessing = true;
                 _processRecipeStepName = "";
@@ -1763,14 +1763,30 @@ namespace FurnaceRT.Equipments.PMs
             }
             else
             {
+
                 _isInSubProcessing = false;
-                _processRecipeStepName = stepName;
+                _processRecipeStepName = GetProcessRecipeStepName(stepName);
                 _processRecipeStepNumber = stepNo;
                 _subRecipeStepName = string.Empty;
                 _subRecipeStepNumber = string.Empty;
 
             }
         }
+
+        public string GetProcessRecipeStepName(string value)
+        {
+            if (SC.ContainsItem("System.SplitRecipeName") && SC.GetValue<bool>("System.SplitRecipeName"))
+            {
+                if (string.IsNullOrEmpty(value) || !value.Contains(":"))
+                    return value;
+
+                var strList = value.Split(':').ToList();
+
+                return strList.LastOrDefault();
+            }
+            return value;
+
+        }
         #endregion
 
         public void ResetFDCRecipeStepName()

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

@@ -832,6 +832,7 @@ namespace FurnaceRT.Equipments.PMs.RecipeExecutions
 
                                 PMModule.UpdateRecipeFre(PMModule.RecipeRunningInfo.RecipeName);
 
+                                PMModule.ResetFDCRecipeStepName();
                                 Notify("End");
                                 return Result.DONE;
                             }