Browse Source

Add tansfer checkpage add fix bug about show step

hecl 1 year ago
parent
commit
8e5ec35137

+ 1 - 1
Venus/Framework/Common/DBCore/ProcessDataRecorder.cs

@@ -492,7 +492,7 @@ namespace MECF.Framework.Common.DBCore
                     StartTime = Convert.ToDateTime(ds.Tables[0].Rows[i]["step_begin_time"]),
                     EndTime =  DateTime.Now,
                     StepHoldTime=Convert.ToInt32(ds.Tables[0].Rows[i]["step_time"]),
-                    RecipeId= ds.Tables[0].Rows[i]["process_data_guid"].ToString(),
+                    RecipeId= ds.Tables[0].Rows[i]["step_name"].ToString(),
                     StepNo=$"Step{Convert.ToInt32(ds.Tables[0].Rows[i]["step_number"])}"
                 });
             }

+ 9 - 0
Venus/Venus_MainPages/ViewModels/DataHistoryViewModel.cs

@@ -253,6 +253,15 @@ namespace Venus_MainPages.ViewModels
             }
             this.DataHistoryView.MyDrawGraphicsControl.PointCollections = cls;
             this.DataHistoryView.MyDrawGraphicsControl.FitControl();
+            this.DataHistoryView.MyDrawGraphicsControl.YPoints.Clear();
+            var item = QueryDataClient.Instance.Service.GetHistorySteps(this.DataHistoryView.wfTimeFrom.Value, this.DataHistoryView.wfTimeTo.Value);
+            if (item != null)
+            {
+                item.ForEach(x =>
+                {
+                    this.DataHistoryView.MyDrawGraphicsControl.YPoints.Add(new Venus_Core.StepItem() { StartValue = x.StartTime.ToOADate(), Information = $"{x.RecipeId}:{x.StepNo}" });
+                });
+            }
         }
         private void CloseAll(ObservableCollection<ParameterNode> parameterNodes)
         {

+ 4 - 0
Venus/Venus_MainPages/ViewModels/OperationOverViewModel.cs

@@ -559,6 +559,10 @@ namespace Venus_MainPages.ViewModels
             dialog.Width = 400;
             double angel = 0;
             double coolingtime = 0;
+            string message = "Please Confirm Return Wafer";
+            WaferDialogViewModel vm = new WaferDialogViewModel();
+            vm.ConfirmText = message;
+            dialog.DataContext = vm;
             if (dialog.ShowDialog() == true)
             {
                 if ((bool)dialog.AlignFlag == true && !string.IsNullOrEmpty(dialog.Angle))

+ 13 - 1
Venus/Venus_MainPages/ViewModels/ProcessHistoryViewModel.cs

@@ -117,6 +117,7 @@ namespace Venus_MainPages.ViewModels
         #region 构造函数
         public ProcessHistoryViewModel()
         {
+            ProcessData = new List<HistoryDataItem>() { };
             ProcessChartData = new ProcessDataChartDataItem(60000);
             Recipes = new ObservableCollection<RecipeItem>();
             timer.Interval = TimeSpan.FromSeconds(0.5);
@@ -541,6 +542,7 @@ namespace Venus_MainPages.ViewModels
         }
         public void OnSearchData()
         {
+            ProcessData.Clear();
             this.view.MyDrawGraphicsControl.ClearPlotPoints();
             var Keys = new List<string>();
             PdKeyDataCollection.ToList().ForEach(key =>
@@ -563,7 +565,8 @@ namespace Venus_MainPages.ViewModels
                 int k = 1;
                 result[Keys[i]].ForEach(point =>
                 {
-                    points.Add(new Point() { X = point.dateTime.ToOADate(), Y = point.value });
+                    ProcessData.Add(new HistoryDataItem() { dateTime= point.dateTime, dbName= Keys[i],value= point.value });
+                    points.Add(new Point() { X = point.dateTime.AddSeconds(1).ToOADate(), Y = point.value });
                     k += 1;
                 });
                 cls.Add(points);
@@ -576,6 +579,15 @@ namespace Venus_MainPages.ViewModels
             this.view.MyDrawGraphicsControl.PointCollections = cls;
 
             this.view.MyDrawGraphicsControl.FitControl();
+            this.view.MyDrawGraphicsControl.YPoints.Clear();
+            var item = QueryDataClient.Instance.Service.GetHistorySteps(Convert.ToDateTime(selectedRecipeItem?.StartTime), Convert.ToDateTime(selectedRecipeItem?.EndTime));
+            if (item!=null)
+            {
+                item.ForEach(x =>
+                {
+                    this.view.MyDrawGraphicsControl.YPoints.Add(new Venus_Core.StepItem() { StartValue = x.StartTime.ToOADate(), Information = $"{x.RecipeId}:{x.StepNo}" });
+                });
+            }
         }
         private void CloseAll(ObservableCollection<ParameterNode> parameterNodes)
         {

+ 9 - 3
Venus/Venus_MainPages/ViewModels/WaferDialogViewModel.cs

@@ -5,14 +5,20 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using Venus_Core;
 
 namespace Venus_MainPages.ViewModels
 {
-    internal class WaferDialogViewModel : Screen
+    public class WaferDialogViewModel : BindableBase
     {
         private string m_title;
-
-        public string Title { get { return m_title; } set { m_title = value;NotifyOfPropertyChange(()=> m_title); } }
+        public string _ConfirmText;
+        public string ConfirmText
+        {
+            get { return _ConfirmText; }
+            set { SetProperty(ref _ConfirmText, value); }
+        }
+        //public string Title { get { return m_title; } set { m_title = value;NotifyOfPropertyChange(()=> m_title); } }
 
         public WaferDialogViewModel()
         {

File diff suppressed because it is too large
+ 1 - 1
Venus/Venus_MainPages/Views/ProcessHistoryView.xaml


+ 8 - 7
Venus/Venus_MainPages/Views/ProcessHistoryView.xaml.cs

@@ -136,7 +136,7 @@ namespace Venus_MainPages.Views
                 Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog();
                 dlg.DefaultExt = ".xls"; // Default file extension 
                 dlg.Filter = "数据表格文件|*.xls"; // Filter files by extension 
-                dlg.FileName = string.Format("{0}-{1}", _viewModel.StartDateTime.ToString("yyyyMMdd"), log.Recipe);
+                dlg.FileName = string.Format("{0}-{1}", _viewModel.StartDateTime.ToString("yyyyMMdd"), log.Recipe.Replace("/","-"));
                 Nullable<bool> result = dlg.ShowDialog();// Show open file dialog box
                 if (result != true) // Process open file dialog box results
                     return;
@@ -151,17 +151,18 @@ namespace Venus_MainPages.Views
                 Worksheet worksheet = new Worksheet(log.Recipe);
 
                 Dictionary<string, int> colIndex = new Dictionary<string, int>();
-                Dictionary<DateTime, int> rowIndex = new Dictionary<DateTime, int>();
+                Dictionary<string, int> rowIndex = new Dictionary<string, int>();
 
                 int colCount = 0;
                 int rowCount = 0;
                 foreach (var item in _viewModel.ProcessData)
-                {
-                    if (!rowIndex.ContainsKey(item.dateTime))
+                { 
+
+                    if (!rowIndex.ContainsKey(item.dateTime.ToString("G")))
                     {
                         rowCount++;
-                        rowIndex[item.dateTime] = rowCount;
-                        worksheet.Cells[rowCount, 0] = new Cell(item.dateTime);
+                        rowIndex[item.dateTime.ToString("G")] = rowCount;
+                        worksheet.Cells[rowCount, 0] = new Cell(item.dateTime.ToString("G"));
                     }
 
                     if (!colIndex.ContainsKey(item.dbName))
@@ -171,7 +172,7 @@ namespace Venus_MainPages.Views
                         worksheet.Cells[0, colCount] = new Cell(item.dbName);
                     }
 
-                    worksheet.Cells[rowIndex[item.dateTime], colIndex[item.dbName]] = new Cell(item.value);
+                    worksheet.Cells[rowIndex[item.dateTime.ToString("G")], colIndex[item.dbName]] = new Cell(item.value);
                 }
                 workbook.Worksheets.Add(worksheet);
                 workbook.Save(dlg.FileName);

+ 11 - 13
Venus/Venus_MainPages/Views/WaferDialogView.xaml

@@ -3,7 +3,9 @@
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+             xmlns:prism="http://prismlibrary.com/"
              mc:Ignorable="d"
+             prism:ViewModelLocator.AutoWireViewModel="True"
              AllowsTransparency="True"
              WindowStyle="None"
              WindowStartupLocation="CenterOwner"
@@ -14,32 +16,28 @@
         <Grid Background="#dcf3f5">
             <Grid.RowDefinitions>
                 <RowDefinition Height="2*"></RowDefinition>
-                <RowDefinition Height=".5*"></RowDefinition>
                 <RowDefinition Height="1*"></RowDefinition>
                 <RowDefinition Height="1*"></RowDefinition>
                 <RowDefinition Height="1*"></RowDefinition>
             </Grid.RowDefinitions>
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="1*"/>
-                <ColumnDefinition Width="1*"/>
-                <ColumnDefinition Width="1*"/>
-            </Grid.ColumnDefinitions>
-            <TextBlock Grid.ColumnSpan="3" Text="Please Confirm Return Wafer" VerticalAlignment="Center" Margin="20,0" FontWeight="Bold" FontSize="18"></TextBlock>
-            <StackPanel Grid.Row="2" Grid.ColumnSpan="3" Orientation="Horizontal" VerticalAlignment="Center">
+
+            <TextBlock  Text="{Binding ConfirmText }" VerticalAlignment="Center" Margin="20,0" FontWeight="Bold" FontSize="18"></TextBlock>
+            <StackPanel Grid.Row="2" Grid.ColumnSpan="3" Orientation="Horizontal" VerticalAlignment="Center" Visibility="Hidden">
                 <ctrl:CheckBoxExt x:Name="cancooling" Content="Need Cooling" Width="120" Margin="5,0,0,0" Checked="needcooling_Checked" Unchecked="needcooling_unChecked"></ctrl:CheckBoxExt>
                 <TextBlock Text="Cooling Time"  Width="80"/>
                 <ctrl:TextBoxEx x:Name="coolingtime" IsEnabled="False" Width="50" InputMethod.IsInputMethodEnabled="False" PreviewTextInput="TextBox_PreviewTextInput"></ctrl:TextBoxEx>
                 <TextBlock Text="s"  Margin="5,0"/>
             </StackPanel>
-            <StackPanel Grid.Row="3" Grid.ColumnSpan="3" Orientation="Horizontal" VerticalAlignment="Center">
-                <ctrl:CheckBoxExt x:Name="canalign"  Content="Need Align" Width="120" Margin="5,0,0,0" Checked="needalign_Checked" Unchecked="needalign_unChecked"></ctrl:CheckBoxExt>
+            <StackPanel Grid.Row="1"  Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
+                <ctrl:CheckBoxExt x:Name="canalign"  Content="Need Align" Width="120" Margin="5,0,0,0" Checked="needalign_Checked" Unchecked="needalign_unChecked" HorizontalContentAlignment="Center"></ctrl:CheckBoxExt>
                 <TextBlock Text="Align Angel"  Width="80"/>
                 <ctrl:TextBoxEx x:Name="alignangel"  IsEnabled="False" Width="50" InputMethod.IsInputMethodEnabled="False" PreviewTextInput="TextBox_PreviewTextInput"></ctrl:TextBoxEx>
                 <TextBlock Text="D"  Margin="5,0"/>
             </StackPanel>
-
-            <Button Grid.Row="4" Grid.Column="1" Content="Return" Margin="5" Click="Button_Click" ></Button>
-            <Button Grid.Row="4" Grid.Column="2" Content="Cancel" Margin="5" Click="Button_Click_1"></Button>
+            <StackPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal" Margin="0,0,0,20">
+                <Button   Content="Transfer"  Height="25" Width="80"  Click="Button_Click" Margin="0,0,30,0"/>
+                <Button   Content="Cancel" Height="25" Width="80" Click="Button_Click_1"/>
+            </StackPanel>
         </Grid>
     </Border>
 </Window>

BIN
Venus/Venus_RT/Config/PM/Venus/VenusDeviceModel.xml


+ 35 - 7
Venus/Venus_UI/Views/ShellView.xaml.cs

@@ -86,10 +86,38 @@ namespace Venus_UI.Views
 
         private void Instance_SlotStartTransferEvent(OpenSEMI.Ctrlib.Controls.DragDropEventArgs e)
         {
-            InvokeClient.Instance.Service.DoOperation("System.MoveWafer",
-                e.TranferFrom.ModuleID,e.TranferFrom.SlotID, e.TranferTo.ModuleID, e.TranferTo.SlotID,false,1,false,1,"");
-            e.TranferFrom.ClearDragDropStatus();
-            e.TranferTo.ClearDragDropStatus();
+            string info = " from " + e.TranferFrom.ModuleID + " slot " + (e.TranferFrom.SlotID + 1).ToString() + " to " + e.TranferTo.ModuleID + " slot " + (e.TranferTo.SlotID + 1).ToString();
+            string message = "Are you sure to transfer the wafer: \n" + info;
+            WaferDialogViewModel vm = new WaferDialogViewModel();
+            vm.ConfirmText = message;
+
+            WaferDialogView dialog = new WaferDialogView()
+            {
+                Owner = Application.Current.MainWindow,
+            };
+            dialog.DataContext = vm;
+            dialog.Height = 300;
+            dialog.Width = 400;
+            double angel = 0;
+            double coolingtime = 0;
+            if (dialog.ShowDialog() == true)
+            {
+                if ((bool)dialog.AlignFlag == true && !string.IsNullOrEmpty(dialog.Angle))
+                {
+                    angel = Convert.ToDouble(dialog.Angle);
+                }
+
+                if ((bool)dialog.CoolingFlag == true && !string.IsNullOrEmpty(dialog.CoolingTime))
+                {
+                    coolingtime = Convert.ToDouble(dialog.CoolingTime);
+                }
+
+                InvokeClient.Instance.Service.DoOperation("System.MoveWafer",
+                    e.TranferFrom.ModuleID, e.TranferFrom.SlotID, e.TranferTo.ModuleID, e.TranferTo.SlotID, false, 1, false, 1, "");
+                e.TranferFrom.ClearDragDropStatus();
+                e.TranferTo.ClearDragDropStatus();
+            }
+
         }
 
         private void CustomWnd_Loaded(object sender, RoutedEventArgs e)
@@ -198,9 +226,9 @@ namespace Venus_UI.Views
             vm.searchlot(queryFilter.WaferGuid);
             //vm.OnDataGridSelectionChanged(vm.Recipes[0]);
             address.DataContext = vm;
-            centerTabViews.Last().Items[2]= new TabItem() { Header = menuviewItem, Content = address };
-            centerTabViews.Last().SelectedIndex = 2;
-            Main_Frame.Content = centerTabViews.Last();
+            centerTabViews[7].Items[2]= new TabItem() { Header = menuviewItem, Content = address };
+            centerTabViews[7].SelectedIndex = 2;
+            Main_Frame.Content = centerTabViews[7];
         }
         private void AduRadioButtonIcon_Click(object sender, RoutedEventArgs e)
         {