Forráskód Böngészése

update

git-svn-id: http://10.4.3.168:50001/svn/Furnace@124 dbcde07d-dcf5-c148-8a84-ac3097b7778e
Jiangjinyuan 1 hónapja%!(EXTRA string=óta)
szülő
commit
229a0dbc31

+ 10 - 13
FrameworkLocal/UIClient/Converter/SecondsToHourMinConverter.cs

@@ -18,26 +18,23 @@ namespace MECF.Framework.UI.Client.Converter
         {
             if (value == null)
                 return "";
-
-            if (value.ToString() is string stringValue)
+       
+            if (value is float floatResult)
             {
-                if (double.TryParse(stringValue, out double totalSeconds))
-                {
-                    var secondAll = Math.Round(totalSeconds, 1, MidpointRounding.AwayFromZero);
-                    // 将总秒数转换为时间跨度
-                    TimeSpan timeSpan = TimeSpan.FromSeconds(secondAll);
+                var secondAll = Math.Round(floatResult, 1, MidpointRounding.AwayFromZero);
+                // 将总秒数转换为时间跨度
+                TimeSpan timeSpan = TimeSpan.FromSeconds(secondAll);
 
-                    // 格式化为 HH:mm:ss
-                    string formattedTime = $"{timeSpan.Hours:D2}:{timeSpan.Minutes:D2}:{timeSpan.Seconds:D2}.{timeSpan.Milliseconds / 10:D2}";
-                    return formattedTime;
-                }
+                // 格式化为 HH:mm:ss
+                string formattedTime = $"{timeSpan.Hours:D2}:{timeSpan.Minutes:D2}";
+                return formattedTime;
             }
-            return value;
+            return "";
         }
 
         public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
         {
-            throw new NotImplementedException();
+            return "";
         }
     }
 }

+ 7 - 4
Furnace/FurnaceRT/Equipments/PMs/PMModule.cs

@@ -959,12 +959,15 @@ namespace FurnaceRT.Equipments.PMs
             Result ret = StartRoutine(_preprocessRoutine);
             if (ret == Result.FAIL || ret == Result.DONE)
                 return false;
+            #region MyRegion
 
-            UpdateRecipeFre(_recipeRunningInfo.RecipeName,out bool result);
-            if (!result)
-            {
+            if (CheckRecipeThicknessMoreThan(_recipeRunningInfo.RecipeName))
                 return false;
-            }
+
+            if (CheckRecipeExecuteFreqMoreThan(_recipeRunningInfo.RecipeName))
+                return false;
+            #endregion
+
 
             if (!IsJobProcess)
                 SensorPROCManualOK.Value = true;

+ 50 - 20
Furnace/FurnaceRT/Equipments/PMs/PMScheduleMaintenance.cs

@@ -5,6 +5,7 @@ using Aitex.Core.RT.Event;
 using Aitex.Core.RT.IOCore;
 using Aitex.Core.RT.Log;
 using Aitex.Core.RT.OperationCenter;
+using Aitex.Core.RT.Routine;
 using Aitex.Core.RT.SCCore;
 using Aitex.Core.Util;
 using DocumentFormat.OpenXml.VariantTypes;
@@ -210,9 +211,8 @@ namespace FurnaceRT.Equipments.PMs
             {
                 if (item == null)
                     continue;
-           //     var data=Math.Round(stepTime, 1, MidpointRounding.AwayFromZero);
-
-                Singleton<ScheduleMaintenanceDataManager>.Instance.Increase(item.Item, (float)stepTime);
+                var data = Math.Round(stepTime, 1, MidpointRounding.AwayFromZero);
+                Singleton<ScheduleMaintenanceDataManager>.Instance.Increase(item.Item, (float)data);
 
 
 
@@ -251,26 +251,15 @@ namespace FurnaceRT.Equipments.PMs
         /// 根据RecipeName统计 Recipe执行 累计次数
         /// </summary>
         /// <param name="processRecipeName"></param>
-        public void UpdateRecipeFre(string recipeName, out bool result)
+        public void UpdateRecipeFre(string recipeName)
         {
-            result = true;
 
             if (string.IsNullOrEmpty(recipeName))
                 return;
             var item = Singleton<ScheduleMaintenanceDataManager>.Instance.Item.Values.Where(a => a.Item == MaintenanceItemEnum.RecipeExecuteFreq.ToString() && a.Path == $"{DataItemEnum.Reactor}.{ReactorsEnum.Recipe}" && a.AdditionInformationDisplay == recipeName).FirstOrDefault();
             if (item == null)
                 return;
-
-            if (item.CurrentValue > item.StartValue && item.CurrentValue < item.LimitValue)
-                MaintenanceProcessingCommandExec(item.MaintenanceProcessing, new AlarmReportItem(Singleton<EquipmentManager>.Instance.RecipeExecuteFreqWarning.Set, $"more than {item.StartValue} times"));
-
-            if (item.CurrentValue >= item.LimitValue)
-            {
-                MaintenanceProcessingCommandExec(item.MaintenanceProcessing, new AlarmReportItem(Singleton<EquipmentManager>.Instance.RecipeExecuteFreqAlarm.Set, $"more than {item.LimitValue} times"));
-                result = false;
-                return;
-            }
-
+         
             if (item != null && item.Item == MaintenanceItemEnum.RecipeExecuteFreq.ToString())
                 Singleton<ScheduleMaintenanceDataManager>.Instance.Increase(item.Item);
 
@@ -293,17 +282,58 @@ namespace FurnaceRT.Equipments.PMs
             if (item != null && item.Item == MaintenanceItemEnum.RecipeThickness.ToString())
                 Singleton<ScheduleMaintenanceDataManager>.Instance.Increase(item.Item, thickness);
 
+        }
+
+
+        #endregion
+
+        #region 检查是否超过设定值
+
+        public bool CheckRecipeExecuteFreqMoreThan(string recipeName)
+        {
+
+            if (string.IsNullOrEmpty(recipeName))
+                return false;
+            var item = Singleton<ScheduleMaintenanceDataManager>.Instance.Item.Values.Where(a => a.Item == MaintenanceItemEnum.RecipeExecuteFreq.ToString() && a.Path == $"{DataItemEnum.Reactor}.{ReactorsEnum.Recipe}" && a.AdditionInformationDisplay == recipeName).FirstOrDefault();
+            if (item == null)
+                return false;
+
             if (item.CurrentValue > item.StartValue && item.CurrentValue < item.LimitValue)
+            {
+                MaintenanceProcessingCommandExec(item.MaintenanceProcessing, new AlarmReportItem(Singleton<EquipmentManager>.Instance.RecipeExecuteFreqWarning.Set, $"more than {item.StartValue} times"));
+                return false;
+            }
+
+            if (item.CurrentValue >= item.LimitValue)
+            {
+                MaintenanceProcessingCommandExec(item.MaintenanceProcessing, new AlarmReportItem(Singleton<EquipmentManager>.Instance.RecipeExecuteFreqAlarm.Set, $"more than {item.LimitValue} times"));
+                return true;
+            }
+            return false;
+        }
+        public bool CheckRecipeThicknessMoreThan(string recipeName)
+        {
+            if (string.IsNullOrEmpty(recipeName))
+                return false;
+            var item = Singleton<ScheduleMaintenanceDataManager>.Instance.Item.Values.Where(a => a.Item == MaintenanceItemEnum.RecipeThickness.ToString() && a.Path == $"{DataItemEnum.Reactor}.{ReactorsEnum.Recipe}" && a.AdditionInformationDisplay == recipeName).FirstOrDefault();
+
+            if (item == null)
+                return false;
+
+            if (item.CurrentValue > item.StartValue && item.CurrentValue < item.LimitValue)
+            {
                 MaintenanceProcessingCommandExec(item.MaintenanceProcessing, new AlarmReportItem(Singleton<EquipmentManager>.Instance.RecipeThicknessWarning.Set, $"more than {item.StartValue} Å"));
+                return false;
+            }
 
             if (item.CurrentValue >= item.LimitValue)
+            {
                 MaintenanceProcessingCommandExec(item.MaintenanceProcessing, new AlarmReportItem(Singleton<EquipmentManager>.Instance.RecipeThicknessAlarm.Set, $"more than {item.LimitValue} Å"));
+                return true;
+            }
 
-
+            return false;
         }
-
         #endregion
-
-
     }
 }

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

@@ -755,7 +755,7 @@ namespace FurnaceRT.Equipments.PMs.RecipeExecutions
 
                                         WaferManager.Instance.UpdateWaferStatistics(ModuleHelper.Converter(Module), i, useCount, useTime, useThick);
                                     }
-                                
+
                                     PMModule.UpdateRecipeThickness(PMModule.RecipeRunningInfo.RecipeName, thickness);
                                     PMModule.UpdateRecipeStepFre(stepName);
                                     PMModule.UpdateRecipeStepRunTime(stepName, stepTime);
@@ -793,6 +793,8 @@ namespace FurnaceRT.Equipments.PMs.RecipeExecutions
                                 if (PMModule.IsHeaterProfile && !PMModule.IsHeaterProfileSuccess)
                                     EV.PostWarningLog(PMModule.Module, "Auto profile failed");
 
+                                PMModule.UpdateRecipeFre(PMModule.RecipeRunningInfo.RecipeName);
+
                                 Notify("End");
                                 return Result.DONE;
                             }

+ 24 - 2
Furnace/FurnaceUI/Views/Scheduled/ScheduledMaintenanceMonitorView.xaml

@@ -8,6 +8,7 @@
     xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
     xmlns:local="clr-namespace:FurnaceUI.Views.Editors"
            xmlns:enumData="clr-namespace:MECF.Framework.Common.CommonData.EnumData;assembly=MECF.Framework.Common"
+        xmlns:converterTime="clr-namespace:MECF.Framework.UI.Client.Converter;assembly=MECF.Framework.UI.Client"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     Width="1000"
     Height="780"
@@ -16,6 +17,7 @@
     FontSize="20"
     mc:Ignorable="d">
     <UserControl.Resources>
+        <converterTime:SecondsToHourMinConverter x:Key="SecondsToHourMinConverter" />
         <converter:IsCheckShowStringConverter x:Key="isCheckShowStringConverter" />
         <Style BasedOn="{StaticResource ExOnlyVerticalScrollBar}" TargetType="ScrollBar" />
     </UserControl.Resources>
@@ -255,8 +257,28 @@
                     Margin="5,0"
                     FontSize="20"
                     IsEnabled="{Binding IsEnable}"
-                      Tag="Number"
-                    Text="{Binding EditModel.CurrentValue, StringFormat={}{0:000.000}, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" />
+                      Tag="None"
+
+                    >
+                    <TextBox.Style>
+                        <Style TargetType="TextBox">
+                            <Setter Property="Text" Value="{Binding EditModel.CurrentValue,StringFormat={}{0:000.000}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
+                            <Style.Triggers>
+                                <DataTrigger Binding="{Binding EditModel.Path}" Value="Reactor.StepRunTime">
+                                    <Setter Property="Text" Value="{Binding EditModel.CurrentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged,Converter={StaticResource SecondsToHourMinConverter}}"/>
+                                </DataTrigger>
+                            </Style.Triggers>
+                        </Style>
+                    </TextBox.Style>
+                    <i:Interaction.Triggers>
+                        <i:EventTrigger EventName="PreviewMouseUp">
+                            <cal:ActionMessage MethodName="SetCurrentValue">
+                                <cal:Parameter Value="{Binding}"/>
+                                <cal:Parameter Value="$eventargs"/>
+                            </cal:ActionMessage>
+                        </i:EventTrigger>
+                    </i:Interaction.Triggers>
+                </TextBox>
                 <TextBox
                     Grid.Column="2"
                     Height="40"

+ 48 - 1
Furnace/FurnaceUI/Views/Scheduled/ScheduledMaintenanceMonitorViewModel.cs

@@ -7,7 +7,11 @@ using FurnaceUI.Models;
 using FurnaceUI.Views.Scheduled;
 using MECF.Framework.Common.CommonData.EnumData;
 using MECF.Framework.Common.DataCenter;
+using MECF.Framework.Common.OperationCenter;
 using MECF.Framework.Common.Utilities;
+using MECF.Framework.UI.Client.CenterViews.Configs.SystemConfig;
+using MECF.Framework.UI.Client.CenterViews.Dialogs;
+using MECF.Framework.UI.Client.CenterViews.Editors;
 using MECF.Framework.UI.Client.CenterViews.Editors.Recipe;
 using MECF.Framework.UI.Client.CenterViews.Editors.Sequence;
 using OpenSEMI.ClientBase;
@@ -16,7 +20,9 @@ using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.Data;
 using System.Linq;
+using System.Windows.Controls;
 using System.Windows.Documents;
+using System.Windows.Input;
 using static System.Windows.Forms.VisualStyles.VisualStyleElement.Window;
 
 namespace FurnaceUI.Views.Editors
@@ -101,6 +107,47 @@ namespace FurnaceUI.Views.Editors
         /// <summary>
         /// CurrentValueChange
         /// </summary>
+
+        public void SetCurrentValue(object obj, MouseButtonEventArgs e)
+        {
+            e.Handled = true;
+
+
+
+            NumberKeyboard fullKeyboard = new NumberKeyboard("", "0");
+            if ((bool)fullKeyboard.ShowDialog())
+            {
+                var data = fullKeyboard.ValueString;
+                if (EditModel.Path == "Reactor.StepRunTime")
+                {
+
+                    var dataStrs = data.Split('.').ToList();
+                    if (dataStrs.Count > 1)
+                    {
+                        EditModel.CurrentValue = float.Parse(dataStrs.FirstOrDefault()) * 3600 + float.Parse(dataStrs.LastOrDefault()) * 60;
+                    }
+                    else
+                    {
+                        EditModel.CurrentValue = float.Parse(dataStrs.FirstOrDefault()) * 3600;
+                    }
+                }
+                else
+                {
+                    EditModel.CurrentValue = float.Parse(data);
+                }
+            }
+
+
+
+            //if ((bool)fullKeyboard.ShowDialog())
+            //{
+            //    //InvokeClient.Instance.Service.DoOperation($"{SystemName}.SetConfig", path, fullKeyboard.ValueString);
+            //    //currentValue = fullKeyboard.ValueString;
+            //    //EditModel.CurrentValue = fullKeyboard.ValueString;
+            //}
+        }
+
+
         public void CurrentValueChange()
         {
             IsEnable = !IsEnable;
@@ -149,7 +196,7 @@ namespace FurnaceUI.Views.Editors
                 EditModel.AdditionInformationDisplay = strs.FirstOrDefault();
                 if (strs.Length > 1)
                 {
-                    SelectStepIdName =$":{strs.LastOrDefault()}";
+                    SelectStepIdName = $":{strs.LastOrDefault()}";
 
                 }
 

+ 18 - 6
Furnace/FurnaceUI/Views/Scheduled/ScheduledMaitView.xaml

@@ -9,12 +9,14 @@
     xmlns:local="clr-namespace:FurnaceUI.Views.Editors"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     Background="White"
+       xmlns:converterTime="clr-namespace:MECF.Framework.UI.Client.Converter;assembly=MECF.Framework.UI.Client"
            xmlns:enumData="clr-namespace:MECF.Framework.Common.CommonData.EnumData;assembly=MECF.Framework.Common"
     FontFamily="Segoe"
     mc:Ignorable="d">
     <UserControl.Resources>
         <local:EnumToBoolConverter x:Key="EnumToBoolConverter" />
         <converter:IsCheckShowStringConverter x:Key="isCheckShowStringConverter" />
+        <converterTime:SecondsToHourMinConverter x:Key="SecondsToHourMinConverter" />
         <Style BasedOn="{StaticResource ExOnlyVerticalScrollBar}" TargetType="ScrollBar" />
     </UserControl.Resources>
     <Grid>
@@ -167,12 +169,22 @@
                         <GridViewColumn Width="100">
                             <GridViewColumn.CellTemplate>
                                 <DataTemplate>
-                                    <TextBlock
-                                        Width="132"
-                                        Margin="4"
-                                        HorizontalAlignment="Center"
-                                        Text="{Binding CurrentValue, StringFormat={}{0:000.000}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                        TextBlock.TextAlignment="Center" />
+                                    <StackPanel>
+                                        <TextBlock  Width="132"   Margin="4"   HorizontalAlignment="Center"   TextBlock.TextAlignment="Center" >
+                                            <TextBlock.Style>
+                                                <Style TargetType="TextBlock">
+                                                    <Setter Property="Text" Value="{Binding CurrentValue,StringFormat={}{0:000.000}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
+                                                    <Style.Triggers>
+                                                        <DataTrigger Binding="{Binding Path}" Value="Reactor.StepRunTime">
+                                                            <Setter Property="Text" Value="{Binding CurrentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged,Converter={StaticResource SecondsToHourMinConverter}}"/>
+                                                        </DataTrigger>
+                                                    </Style.Triggers>
+                                                </Style>
+                                            </TextBlock.Style>
+
+                                        </TextBlock>
+                                    </StackPanel>
+
                                 </DataTemplate>
                             </GridViewColumn.CellTemplate>
                             <GridViewColumn.Header>