| 
															
																@@ -36,6 +36,7 @@ using System.Text; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using System.Threading;
 
															 | 
															
															 | 
															
																 using System.Threading;
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using System.Threading.Tasks;
 
															 | 
															
															 | 
															
																 using System.Threading.Tasks;
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using System.Windows;
 
															 | 
															
															 | 
															
																 using System.Windows;
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+using static log4net.Appender.RollingFileAppender;
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using static MECF.Framework.Common.FAServices.DataVariables;
 
															 | 
															
															 | 
															
																 using static MECF.Framework.Common.FAServices.DataVariables;
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using Action = System.Action;
 
															 | 
															
															 | 
															
																 using Action = System.Action;
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using Media = System.Windows.Media;
 
															 | 
															
															 | 
															
																 using Media = System.Windows.Media;
 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -424,10 +425,7 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
 
															 | 
															
															 | 
															
																 
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 //Annotations.Add(VerLine(Media.Brushes.AliceBlue, StartTime, Media.Brushes.Blue, $"{stepNo}"));
 
															 | 
															
															 | 
															
																                                 //Annotations.Add(VerLine(Media.Brushes.AliceBlue, StartTime, Media.Brushes.Blue, $"{stepNo}"));
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 var time = StartTime.AddSeconds(stepTime);
 
															 | 
															
															 | 
															
																                                 var time = StartTime.AddSeconds(stepTime);
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                if (EndTime < time && time < ProcessDataLotList[0].ProcessEndTime)//解决process过程abort,数据导出问题:数据点时间范围大于recipe结束时间。
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                {
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                    EndTime = StartTime.AddSeconds(stepTime);
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                                }
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 _stepInfo.Add(new StepInfo()
 
															 | 
															
															 | 
															
																                                 _stepInfo.Add(new StepInfo()
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                 {
 
															 | 
															
															 | 
															
																                                 {
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                     StartTime = StartTime,
 
															 | 
															
															 | 
															
																                                     StartTime = StartTime,
 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -844,11 +842,17 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             for (int i = 0; i < _stepInfo.Count; i++)
 
															 | 
															
															 | 
															
																             for (int i = 0; i < _stepInfo.Count; i++)
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             {
 
															 | 
															
															 | 
															
																             {
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 var tempStepInfo = _stepInfo[i];
 
															 | 
															
															 | 
															
																                 var tempStepInfo = _stepInfo[i];
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                var rowCount = tempStepInfo.StepTime;
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                if (!string.IsNullOrEmpty(tempStepInfo.SubRecipeStepNumber))
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                var durationTIme = new TimeSpan();
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                if (i == (_stepInfo.Count() - 1))
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 {
 
															 | 
															
															 | 
															
																                 {
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    rowCount = int.Parse(tempStepInfo.SubRecipeStepTime);
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    durationTIme = _stepInfo[i].EndTime - tempStepInfo.StartTime;
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 }
 
															 | 
															
															 | 
															
																                 }
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                else
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                {
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    durationTIme = _stepInfo[i + 1].StartTime - _stepInfo[i].StartTime;
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                }
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                var rowCount = Math.Ceiling(durationTIme.TotalSeconds);
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
 
															 | 
															
															 | 
															
																 
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 for (int jx = 1; jx < rowCount + 1; jx++)
 
															 | 
															
															 | 
															
																                 for (int jx = 1; jx < rowCount + 1; jx++)
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 {
 
															 | 
															
															 | 
															
																                 {
 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -892,7 +896,7 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     dataRow.CreateCell(cellIndex++).SetCellValue(tempPid);
 
															 | 
															
															 | 
															
																                     dataRow.CreateCell(cellIndex++).SetCellValue(tempPid);
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     if (pmRow == null && systemRow != null)
 
															 | 
															
															 | 
															
																                     if (pmRow == null && systemRow != null)
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     {
 
															 | 
															
															 | 
															
																                     {
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        for (int j = 1; j < systemRow.Count; j++)
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        for (int j = 0; j < systemRow.Count; j++)
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         {
 
															 | 
															
															 | 
															
																                         {
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             WriterCell(dataRow, cellIndex++, workbook, systemRow[j].ToString());
 
															 | 
															
															 | 
															
																                             WriterCell(dataRow, cellIndex++, workbook, systemRow[j].ToString());
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         }
 
															 | 
															
															 | 
															
																                         }
 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -908,18 +912,18 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         {
 
															 | 
															
															 | 
															
																                         {
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             WriterCell(dataRow, cellIndex++, workbook, "");
 
															 | 
															
															 | 
															
																                             WriterCell(dataRow, cellIndex++, workbook, "");
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         }
 
															 | 
															
															 | 
															
																                         }
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        for (int j = 1; j < pmRow.Count; j++)
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        for (int j = 0; j < pmRow.Count; j++)
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         {
 
															 | 
															
															 | 
															
																                         {
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             WriterCell(dataRow, cellIndex++, workbook, ConvertBooleanValues(pmRow[j]));
 
															 | 
															
															 | 
															
																                             WriterCell(dataRow, cellIndex++, workbook, ConvertBooleanValues(pmRow[j]));
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         }
 
															 | 
															
															 | 
															
																                         }
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     }
 
															 | 
															
															 | 
															
																                     }
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     else if (systemDataTable != null)
 
															 | 
															
															 | 
															
																                     else if (systemDataTable != null)
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     {
 
															 | 
															
															 | 
															
																                     {
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        for (int j = 1; j < systemRow.Count; j++)
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        for (int j = 0; j < systemRow.Count; j++)
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         {
 
															 | 
															
															 | 
															
																                         {
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             WriterCell(dataRow, cellIndex++, workbook, systemRow[j].ToString());
 
															 | 
															
															 | 
															
																                             WriterCell(dataRow, cellIndex++, workbook, systemRow[j].ToString());
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         }
 
															 | 
															
															 | 
															
																                         }
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        for (int j = 1; j < pmRow.Count; j++)
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        for (int j = 0; j < pmRow.Count; j++)
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         {
 
															 | 
															
															 | 
															
																                         {
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             WriterCell(dataRow, cellIndex++, workbook, ConvertBooleanValues(pmRow[j]));
 
															 | 
															
															 | 
															
																                             WriterCell(dataRow, cellIndex++, workbook, ConvertBooleanValues(pmRow[j]));
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         }
 
															 | 
															
															 | 
															
																                         }
 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -1011,8 +1015,14 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
 
															 | 
															
															 | 
															
																 
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public DataTable GetDataTable(ModuleName type, List<string> queryColNameList, DateTime startTime, DateTime endTime)
 
															 | 
															
															 | 
															
																         public DataTable GetDataTable(ModuleName type, List<string> queryColNameList, DateTime startTime, DateTime endTime)
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         {
 
															 | 
															
															 | 
															
																         {
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            startTime = startTime.AddSeconds(-10);
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            endTime = endTime.AddSeconds(10);
 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (startTime.TimeOfDay != TimeSpan.Zero)
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                startTime = startTime.AddSeconds(-10);
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (endTime.TimeOfDay != TimeSpan.FromDays(1).Subtract(TimeSpan.FromSeconds(1)))
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                endTime = endTime.AddSeconds(10);
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             var tableName = ModuleName.PM1.ToString();
 
															 | 
															
															 | 
															
																             var tableName = ModuleName.PM1.ToString();
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
 
															 | 
															
															 | 
															
																 
 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             if (type == ModuleName.System)
 
															 | 
															
															 | 
															
																             if (type == ModuleName.System)
 
															 |