Browse Source

从TiN前移已解决bug:1.recipe手动Abort导致建表少Scheduler.CoolingRemainTime列
2.主界面执行sub recipe非table1时快速查看recipe没有跳转到正确的table

huangping 1 month ago
parent
commit
0253239e24

+ 1 - 1
FrameworkLocal/UIClient/CenterViews/DataLogs/ProcessHistory/ProcessDetailViewModel.cs

@@ -1401,7 +1401,7 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
                     else
                     {
                         StepNameDisPlay = $"{step.StepNo}:{step.StepName}";
-                        LOG.Info($"CurrentTime:{PointTime:yyyy/MM/dd HH:mm:ss.FFF} {StepNameDisPlay}");
+                       // LOG.Info($"CurrentTime:{PointTime:yyyy/MM/dd HH:mm:ss.FFF} {StepNameDisPlay}");
                     }
                     var name = (seriesinfo.RenderableSeries as ChartDataLine<T>).DataSource.Split('.','\\');
                     if (name.Length>0)

+ 3 - 3
FrameworkLocal/UIClient/CenterViews/Editors/Recipe/RecipeDataBase.cs

@@ -281,7 +281,7 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Recipe
         }
 
 
-        public string TableName => Tables.Count > 0 ? Tables.FirstOrDefault(x => x.Index == TableIndex).Name : "";
+        public string TableName =>Tables?.FirstOrDefault(x => x.Index == TableIndex)?.Name ??"";
 
         private DateTime deviseTime;
         public DateTime ReviseTime
@@ -829,8 +829,8 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Recipe
                 {
                     Steps.Clear();
                     StepNos.Clear();
-                    TableIndex = 1;
-                    Tables[0].TableData.Steps.ToList().ForEach(
+                    TableIndex = tableNo;
+                    Tables[tableNo-1].TableData.Steps.ToList().ForEach(
                         x =>
                         {
                             var tempStep = x;// (Step)CloneUtil.CloneObject(x);

+ 2 - 1
Furnace/FurnaceRT/Equipments/Jobs/AutoTransfer.cs

@@ -151,7 +151,7 @@ namespace FurnaceRT.Equipments.Jobs
 
                 var coolTime = pj != null ? pj.CoolTimeSec : 0;
                 if (_coolTimer.IsRunning)
-                    return (coolTime - _coolTimer.ElapsedMilliseconds / 1000) > 0 ? coolTime - _coolTimer.ElapsedMilliseconds / 1000 : 0;
+                    return (coolTime - _coolTimer.ElapsedMilliseconds / 1000) > 0 ? Convert.ToInt32(coolTime - _coolTimer.ElapsedMilliseconds / 1000) : 0;
                 return coolTime;
             });
             DATA.Subscribe($"Scheduler.StockerUseSlots", () =>
@@ -798,6 +798,7 @@ namespace FurnaceRT.Equipments.Jobs
                     JobDataRecorder.EndPJ(pj.InnerId.ToString(), aborted, unprocessed);
                 }
             }
+            if (_coolTimer.IsRunning) _coolTimer.Stop();
             Singleton<FAJobController>.Instance.FAProcessJobs[jobName].RequestAbort();
             foreach (var pj in pjAbortList)
             {

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

@@ -313,8 +313,9 @@ namespace FurnaceRT.Equipments.PMs
 
             DATA.Subscribe($"{Name}.MainRecipeName", () => _recipeRunningInfo.MainRecipeName);
             DATA.Subscribe($"{Name}.SelectedRecipeName", () => _recipeRunningInfo.RecipeName);
-
+            
             DATA.Subscribe($"{Name}.ProcessSubRecipe", () => _recipeRunningInfo.SubRecipeName);
+            DATA.Subscribe($"{Name}.ProcessSubRecipeTable", () => _recipeRunningInfo.SubRecipeTable);
             DATA.Subscribe($"{Name}.ProcessAbortRecipe", () => _recipeRunningInfo.AbortRecipeName);
 
             DATA.Subscribe($"{Name}.AbortRecipeName", () => _recipeRunningInfo.RecipeName);

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

@@ -339,12 +339,14 @@ namespace FurnaceRT.Equipments.PMs.RecipeExecutions
                 {
                     PMModule.RecipeRunningInfo.SubRecipeCurrentLoopCount = 1;
                     PMModule.RecipeRunningInfo.SubRecipeLoopCount = PMModule.RecipeRunningInfo.RecipeStepList[_currentStepNumber].SubRecipeLoopCount;
+                    PMModule.RecipeRunningInfo.SubRecipeTable = PMModule.RecipeRunningInfo.RecipeStepList[_currentStepNumber].SubRecipeTableInfo;
                 }
                 PMModule.RecipeRunningInfo.RecipeStepList[_currentStepNumber].IsCallSubStep = false;
                 IsSubReciep = true;
             }
             else
             {
+                PMModule.RecipeRunningInfo.SubRecipeTable = string.Empty;
                 curSteps = PMModule.RecipeRunningInfo.RecipeStepList;
                 PMModule.RecipeRunningInfo.SubRecipeLoopCount = 0;
             }
@@ -862,6 +864,7 @@ namespace FurnaceRT.Equipments.PMs.RecipeExecutions
                     PMModule.RecipeRunningInfo.ExecRecipeType = PMModule.RecipeRunningInfo.RecipeStepList[_currentStepNumber].SubRecipeSteps[_currentSubRecipeStepNumber].RecipeType;
                     PMModule.RecipeRunningInfo.SubRecipeCurrentLoopCount = PMModule.RecipeRunningInfo.SubRecipeLoopCount - PMModule.RecipeRunningInfo.RecipeStepList[_currentStepNumber].SubRecipeLoopCount + 1;
                     PMModule.RecipeRunningInfo.SubRecipeName = PMModule.RecipeRunningInfo.Head.SubRecipe;
+                    PMModule.RecipeRunningInfo.SubRecipeTable = PMModule.RecipeRunningInfo.RecipeStepList[_currentStepNumber].SubRecipeTableInfo;
 
                     step = _currentSubRecipeStepNumber;
                     if (_state == RecipeRunningState.Paused)

+ 2 - 0
Furnace/FurnaceRT/Equipments/PMs/RecipeExecutions/RecipeRunningInfo.cs

@@ -43,6 +43,8 @@ namespace FurnaceRT.Equipments.PMs.RecipeExecutions
         public int SubRecipeLoopCount { get; set; }
         public int SubRecipeCurrentLoopCount { get; set; }
         public string SubRecipeName { get; set; }
+        public string SubRecipeTable { get; set; }
+
         public string AbortRecipeName { get; set; }
 
         public bool IsLooping { get; set; }

+ 9 - 2
Furnace/FurnaceUI/Views/Operations/StatusViewModel.cs

@@ -622,6 +622,8 @@ namespace FurnaceUI.Views.Operations
         public int PM1SubRecipeLoopCount { get; set; }
         [Subscription("PM1.IsExecuteSubRecipe")]
         public bool PM1IsExecuteSubRecipe { get; set; }
+        [Subscription("PM1.ProcessSubRecipeTable")]
+        public string PM1SubTable { get; set; }
         public string SubInfo
         {
             get
@@ -1582,8 +1584,13 @@ namespace FurnaceUI.Views.Operations
                         {
                             viewProcessRecipeRecipeType = PM1ExecRecipeType.ToLower();
                         }
-
-                        var viewProcessRecipe = new RecipeProcessEditViewModel($"Furnace\\{viewProcessRecipeRecipeType}", recipeName);
+                        int tableIndex = 1;
+                        var table = PM1SubTable.Split(':');
+                        if (table.Length < 0 || !int.TryParse(table[0], out tableIndex))
+                        {
+                            tableIndex = 1;
+                        }
+                        var viewProcessRecipe = new RecipeProcessEditViewModel($"Furnace\\{viewProcessRecipeRecipeType}", recipeName,tableIndex:tableIndex);
                         viewProcessRecipe.RecipeType = viewProcessRecipeRecipeType;
                         viewProcessRecipe.IndexNoDefault = PM1RecipeStepNumber;
                         viewProcessRecipe.SelectedStepName = PM1RecipeStepName;

+ 4 - 2
Furnace/FurnaceUI/Views/Recipes/RecipeProcessEditViewModel.cs

@@ -1210,8 +1210,9 @@ namespace FurnaceUI.Views.Recipes
         public string RecipeType { get; set; }
 
         private RecipeProcessEditView view1;
+        private int _tableIndex;
 
-        public RecipeProcessEditViewModel(string strPrefixPath, string strRecipeName, string permission = "")
+        public RecipeProcessEditViewModel(string strPrefixPath, string strRecipeName, string permission = "", int tableIndex = 1)
         {
 
             PumpDict.Clear();
@@ -1231,6 +1232,7 @@ namespace FurnaceUI.Views.Recipes
             CurrentRecipe.PrefixPath = strPrefixPath;
             CurrentRecipe.Name = strRecipeName;
             CurrentRecipe.RecipePermission = permission;
+            _tableIndex = tableIndex;
         }
         protected override void OnViewLoaded(object view)
         {
@@ -1283,7 +1285,7 @@ namespace FurnaceUI.Views.Recipes
                 return;
             }
             //     CurrentRecipe.RecipeChamberType = "OriginChamber";
-            CurrentRecipe.InitData(CurrentRecipe.PrefixPath, CurrentRecipe.Name, recipeContent, "PM1");
+            CurrentRecipe.InitData(CurrentRecipe.PrefixPath, CurrentRecipe.Name, recipeContent, "PM1",_tableIndex);
             if (CurrentRecipe.Steps.Count > 0)
             {
                 if (!string.IsNullOrEmpty(SelectedStepName))