瀏覽代碼

revise metal ui bug

chenzk 1 周之前
父節點
當前提交
2446ffa7f9

+ 17 - 3
CyberX8_MainPages/ViewModels/MetalSHHomePageViewModel.cs

@@ -1,5 +1,6 @@
 using Aitex.Core.Common;
 using Aitex.Core.UI.MVVM;
+using CyberX8_MainPages.Model;
 using ExcelLibrary.BinaryFileFormat;
 using MECF.Framework.Common.CommonData.Metal;
 using MECF.Framework.Common.CommonData.PowerSupplier;
@@ -151,6 +152,10 @@ namespace CyberX8_MainPages.ViewModels
         /// 是否存在WaferHolder
         /// </summary>
         private bool _isWaferHolder;
+        /// <summary>
+        /// 所在reservoir的name
+        /// </summary>
+        private string _reservoirName;
 
         /// <summary>
         /// 是否为调速泵
@@ -424,7 +429,16 @@ namespace CyberX8_MainPages.ViewModels
         /// </summary>
         public void LoadData(string systemName)
         {
-            Module = systemName;
+            Module = systemName;
+            _rtDataKeys.Clear();
+            _rtDataKeys.Add($"{Module}.SubordinateReservoirName");
+            Dictionary<string, object> reservoirName = QueryDataClient.Instance.Service.PollData(_rtDataKeys);
+            if (reservoirName != null)
+            {
+                _reservoirName = CommonFunction.GetValue<string>(reservoirName, $"{Module}.SubordinateReservoirName");
+            }
+            _rtDataKeys.Clear();
+
             RecipeModuleName = "DEP Recipe";
             RecipeType = "dep";
             _rtDataKeys.Clear();
@@ -440,7 +454,7 @@ namespace CyberX8_MainPages.ViewModels
             _rtDataKeys.Add($"{Module}.TotalTime");
             _rtDataKeys.Add($"{Module}.TimeRemain");
             _rtDataKeys.Add($"{Module}.IsSingalPump");
-            _rtDataKeys.Add($"{Module}.SubordinateReservoirPump");
+            _rtDataKeys.Add($"{_reservoirName}.SubordinateReservoirPump");
             if (_timer == null)
             {
                 _timer = new DispatcherTimer();
@@ -461,7 +475,7 @@ namespace CyberX8_MainPages.ViewModels
                 _rtDataValueDic = QueryDataClient.Instance.Service.PollData(_rtDataKeys);
                 if (_rtDataValueDic != null)
                 {
-                    _subordinateReservoirPumpOn = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{Module}.SubordinateReservoirPump");
+                    _subordinateReservoirPumpOn = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{_reservoirName}.SubordinateReservoirPump");
                     IsSingalPump = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{Module}.IsSingalPump");
                     MetalData = CommonFunction.GetValue<StandardHotMetalDeviceData>(_rtDataValueDic, $"{Module}.{METALDATA}");
                     MetalData.CellPump ^= _subordinateReservoirPumpOn;

+ 1 - 0
CyberX8_MainPages/ViewModels/StandardHotReservoirsViewModel.cs

@@ -18,6 +18,7 @@ using MECF.Framework.Common.CommonData.TemperatureControl;
 using MECF.Framework.Common.CommonData.PowerSupplier;
 using MECF.Framework.Common.Device.Safety;
 using MECF.Framework.Common.ProcessCell;
+using Aitex.Core.RT.Log;
 
 namespace CyberX8_MainPages.ViewModels
 {

+ 1 - 0
CyberX8_RT/Modules/Metal/MetalEntity.cs

@@ -350,6 +350,7 @@ namespace CyberX8_RT.Modules.Metal
             DATA.Subscribe($"{Module}.IsDisable", () => IsDisable, SubscriptionAttribute.FLAG.IgnoreSaveDB);
             DATA.Subscribe($"{Module}.CurrentRecipe", () => _currentRecipe != null ? _currentRecipe.Ppid : "", SubscriptionAttribute.FLAG.IgnoreSaveDB);
             DATA.Subscribe($"{Module}.MetalUsage", () => MetalUsage, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+            DATA.Subscribe($"{Module}.SubordinateReservoirName", () => _reservoirName, SubscriptionAttribute.FLAG.IgnoreSaveDB);
         }
         /// <summary>
         /// 初始化SVID

+ 6 - 6
CyberX8_RT/Modules/Metal/StandardHotRunRecipeRoutine.cs

@@ -177,12 +177,12 @@ namespace CyberX8_RT.Modules.Metal
                 LOG.WriteLog(eEvent.ERR_METAL, Module, "Recipe RampProfileSteps count is 0");
                 return false;
             }
-            MetalEntity metalEntity = Singleton<RouteManager>.Instance.GetModule<MetalEntity>(Module);
-            if (metalEntity != null && metalEntity.WaferHolderInfo == null)
-            {
-                LOG.WriteLog(eEvent.ERR_METAL, Module, $"there is no waferShuttle in {Module}");
-                return false;
-            }
+            //MetalEntity metalEntity = Singleton<RouteManager>.Instance.GetModule<MetalEntity>(Module);
+            //if (metalEntity != null && metalEntity.WaferHolderInfo == null)
+            //{
+            //    LOG.WriteLog(eEvent.ERR_METAL, Module, $"there is no waferShuttle in {Module}");
+            //    return false;
+            //}
             return true;
         }
         /// <summary>

+ 1 - 1
CyberX8_Themes/UserControls/MetalSHUIControl.xaml

@@ -188,7 +188,7 @@
         <userControls:FlowPipe Margin="-110,304,622,138" Width="288" IsFlowing="{Binding ElementName=self,Path=IsCellPumpOn}" IsReverse="True"/>
         <userControls:Pipe2  RotateTransformValue="-90" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-118,318,0,0" />
         <userControls:Pipe2  RotateTransformValue="180" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-105,394,0,0" />
-        <Canvas Width="50" Height="80" Margin="52,385,698,-15">
+        <Canvas Width="50" Height="80" Margin="52,385,698,-15" Visibility="{Binding ElementName=self,Path=IsSingalPump,Converter={StaticResource boolToVisibility2}}">
             <userControls:PrewetTankControl/>
             <Rectangle Width="20" Height="40" Canvas.Left="6" Canvas.Top="24" HorizontalAlignment="Left" VerticalAlignment="Top" 
                        Visibility="{Binding ElementName=self,Path=IsCellPumpOn,Converter={StaticResource boolToVisibility2}}"