|
@@ -5,6 +5,7 @@ using Caliburn.Micro;
|
|
using Caliburn.Micro.Core;
|
|
using Caliburn.Micro.Core;
|
|
using DocumentFormat.OpenXml.Spreadsheet;
|
|
using DocumentFormat.OpenXml.Spreadsheet;
|
|
using MECF.Framework.Common.CommonData;
|
|
using MECF.Framework.Common.CommonData;
|
|
|
|
+using MECF.Framework.Common.CommonData.EnumData;
|
|
using MECF.Framework.Common.ControlDataContext;
|
|
using MECF.Framework.Common.ControlDataContext;
|
|
using MECF.Framework.Common.DataCenter;
|
|
using MECF.Framework.Common.DataCenter;
|
|
using MECF.Framework.Common.Utilities;
|
|
using MECF.Framework.Common.Utilities;
|
|
@@ -327,6 +328,10 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
|
|
item.ProcessStatus = dbData.Rows[i]["process_status"].ToString();
|
|
item.ProcessStatus = dbData.Rows[i]["process_status"].ToString();
|
|
item.WaferDataGUID = dbData.Rows[i]["wafer_data_guid"].ToString();
|
|
item.WaferDataGUID = dbData.Rows[i]["wafer_data_guid"].ToString();
|
|
item.ProcessIn = dbData.Rows[i]["process_in"].ToString();
|
|
item.ProcessIn = dbData.Rows[i]["process_in"].ToString();
|
|
|
|
+
|
|
|
|
+ item.RecipeType = dbData.Rows[i]["recipe_type"].ToString();
|
|
|
|
+ item.RecipeExeEntry = dbData.Rows[i]["recipe_exec_entry"].ToString();
|
|
|
|
+
|
|
if (!dbData.Rows[i]["process_begin_time"].Equals(DBNull.Value))
|
|
if (!dbData.Rows[i]["process_begin_time"].Equals(DBNull.Value))
|
|
{
|
|
{
|
|
item.ProcessBeginTime = (DateTime)dbData.Rows[i]["process_begin_time"];
|
|
item.ProcessBeginTime = (DateTime)dbData.Rows[i]["process_begin_time"];
|
|
@@ -336,10 +341,21 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
|
|
{
|
|
{
|
|
item.ProcessEndTime = (DateTime)dbData.Rows[i]["process_end_time"];
|
|
item.ProcessEndTime = (DateTime)dbData.Rows[i]["process_end_time"];
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
ProcessDataLotList.Add(item);
|
|
ProcessDataLotList.Add(item);
|
|
}
|
|
}
|
|
if (ProcessDataLotList.Count == 0) { LOG.Warning($"QueryStep:No process data({sql})"); return; }
|
|
if (ProcessDataLotList.Count == 0) { LOG.Warning($"QueryStep:No process data({sql})"); return; }
|
|
|
|
|
|
|
|
+ historyLot.ProcessStartTime = ProcessDataLotList[0].ProcessBeginTime;
|
|
|
|
+ historyLot.ProcessEndTime = ProcessDataLotList[0].ProcessEndTime;
|
|
|
|
+
|
|
|
|
+ if (int.TryParse(ProcessDataLotList[0].RecipeType, out int type))
|
|
|
|
+ historyLot.RecipeType = (RecipeTypeEnum)type;
|
|
|
|
+
|
|
|
|
+ if (int.TryParse(ProcessDataLotList[0].RecipeExeEntry, out int entry))
|
|
|
|
+ historyLot.RecipeExecEntry = (RecipeExecEntryEnum)entry;
|
|
|
|
|
|
// Annotations.Add(VerLine(Media.Brushes.Blue, ProcessDataLotList[0].ProcessBeginTime, Media.Brushes.Blue, $"{ProcessDataLotList[0].RecipeName}"));
|
|
// Annotations.Add(VerLine(Media.Brushes.Blue, ProcessDataLotList[0].ProcessBeginTime, Media.Brushes.Blue, $"{ProcessDataLotList[0].RecipeName}"));
|
|
|
|
|
|
@@ -755,7 +771,6 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
|
|
|
|
|
|
int rowIndex = 4;
|
|
int rowIndex = 4;
|
|
int cellIndex = 0;
|
|
int cellIndex = 0;
|
|
- List<string> headers = new List<string>();
|
|
|
|
if (!firstHeader)
|
|
if (!firstHeader)
|
|
{
|
|
{
|
|
firstHeader = true;
|
|
firstHeader = true;
|
|
@@ -769,10 +784,8 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
|
|
colAttributeName = "DisplayName";
|
|
colAttributeName = "DisplayName";
|
|
}
|
|
}
|
|
var tempStr = _processProcessDetailAttributeDict[x.ColumnName].ContainsKey("DisplayName") && !string.IsNullOrEmpty(_processProcessDetailAttributeDict[x.ColumnName]["DisplayName"]) ? _processProcessDetailAttributeDict[x.ColumnName]["DisplayName"] : x.ColumnName;
|
|
var tempStr = _processProcessDetailAttributeDict[x.ColumnName].ContainsKey("DisplayName") && !string.IsNullOrEmpty(_processProcessDetailAttributeDict[x.ColumnName]["DisplayName"]) ? _processProcessDetailAttributeDict[x.ColumnName]["DisplayName"] : x.ColumnName;
|
|
- headers.Add(tempStr.EndsWith("Enable") ? tempStr.Replace("Valve.", "") : tempStr);
|
|
|
|
return string.IsNullOrEmpty(_processProcessDetailAttributeDict[x.ColumnName][colAttributeName]) ? x.ColumnName : _processProcessDetailAttributeDict[x.ColumnName][colAttributeName];
|
|
return string.IsNullOrEmpty(_processProcessDetailAttributeDict[x.ColumnName][colAttributeName]) ? x.ColumnName : _processProcessDetailAttributeDict[x.ColumnName][colAttributeName];
|
|
}
|
|
}
|
|
- headers.Add(x.ColumnName.EndsWith("Enable") ? x.ColumnName.Replace("Valve.", "") : x.ColumnName);
|
|
|
|
return x.ColumnName;
|
|
return x.ColumnName;
|
|
});
|
|
});
|
|
|
|
|
|
@@ -786,10 +799,8 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
|
|
colAttributeName = "DisplayName";
|
|
colAttributeName = "DisplayName";
|
|
}
|
|
}
|
|
var tempStr = _processProcessDetailAttributeDict[x.ColumnName].ContainsKey("DisplayName") && !string.IsNullOrEmpty(_processProcessDetailAttributeDict[x.ColumnName]["DisplayName"]) ? _processProcessDetailAttributeDict[x.ColumnName]["DisplayName"] : x.ColumnName;
|
|
var tempStr = _processProcessDetailAttributeDict[x.ColumnName].ContainsKey("DisplayName") && !string.IsNullOrEmpty(_processProcessDetailAttributeDict[x.ColumnName]["DisplayName"]) ? _processProcessDetailAttributeDict[x.ColumnName]["DisplayName"] : x.ColumnName;
|
|
- headers.Add(tempStr.EndsWith("Enable") ? tempStr.Replace("Valve.", "") : tempStr);
|
|
|
|
return string.IsNullOrEmpty(_processProcessDetailAttributeDict[x.ColumnName][colAttributeName]) ? x.ColumnName : _processProcessDetailAttributeDict[x.ColumnName][colAttributeName];
|
|
return string.IsNullOrEmpty(_processProcessDetailAttributeDict[x.ColumnName][colAttributeName]) ? x.ColumnName : _processProcessDetailAttributeDict[x.ColumnName][colAttributeName];
|
|
}
|
|
}
|
|
- headers.Add(x.ColumnName.EndsWith("Enable") ? x.ColumnName.Replace("Valve.", "") : x.ColumnName);
|
|
|
|
return x.ColumnName;
|
|
return x.ColumnName;
|
|
});
|
|
});
|
|
|
|
|
|
@@ -831,6 +842,8 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
|
|
{ "Recipe Info",recipeInfo.RecipeName},
|
|
{ "Recipe Info",recipeInfo.RecipeName},
|
|
{ "Recipe StartTime",recipeInfo.ProcessStartTime.ToString("yyyy-MM-dd HH:mm:ss")},
|
|
{ "Recipe StartTime",recipeInfo.ProcessStartTime.ToString("yyyy-MM-dd HH:mm:ss")},
|
|
{ "Recipe EndTime",recipeInfo.ProcessEndTime.ToString("yyyy-MM-dd HH:mm:ss")},
|
|
{ "Recipe EndTime",recipeInfo.ProcessEndTime.ToString("yyyy-MM-dd HH:mm:ss")},
|
|
|
|
+ { "Recipe Type",recipeInfo.RecipeType.ToString()},
|
|
|
|
+ { "Recipe ExecEntry",recipeInfo.RecipeExecEntry.ToString()},
|
|
};
|
|
};
|
|
rowIndex = 0;
|
|
rowIndex = 0;
|
|
cellIndex = 0;
|
|
cellIndex = 0;
|
|
@@ -917,9 +930,12 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
|
|
for (int j = 1; j < pmRow.ItemArray.Length; j++)
|
|
for (int j = 1; j < pmRow.ItemArray.Length; j++)
|
|
{
|
|
{
|
|
ICell cell = dataRow.CreateCell(cellIndex++);
|
|
ICell cell = dataRow.CreateCell(cellIndex++);
|
|
- if ((headers.Count > cellIndex - 1 - columnIndex) && headers[cellIndex - 1 - columnIndex].StartsWith("Valve."))//TiN需求164
|
|
|
|
- cell.SetCellValue(pmRow[j].ToString() == bool.TrueString ? "Open" : "Close");
|
|
|
|
- else cell.SetCellValue(pmRow[j].ToString());
|
|
|
|
|
|
+
|
|
|
|
+ var setValueData = pmRow[j].ToString();
|
|
|
|
+ if (bool.TryParse(pmRow[j].ToString(), out var avData))
|
|
|
|
+ setValueData = pmRow[j].ToString() == bool.TrueString ? "Open" : "Close";
|
|
|
|
+
|
|
|
|
+ cell.SetCellValue(setValueData);
|
|
cell.CellStyle = GetICellStyle(workbook);
|
|
cell.CellStyle = GetICellStyle(workbook);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -934,14 +950,18 @@ namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
|
|
for (int j = 1; j < pmRow.ItemArray.Length; j++)
|
|
for (int j = 1; j < pmRow.ItemArray.Length; j++)
|
|
{
|
|
{
|
|
ICell cell = dataRow.CreateCell(cellIndex++);
|
|
ICell cell = dataRow.CreateCell(cellIndex++);
|
|
- if ((headers.Count > cellIndex - 1 - columnIndex) && headers[cellIndex - 1 - columnIndex].StartsWith("Valve."))
|
|
|
|
- cell.SetCellValue(pmRow[j].ToString() == bool.TrueString ? "Open" : "Close");
|
|
|
|
- else cell.SetCellValue(pmRow[j].ToString());
|
|
|
|
|
|
+ var setValueData = pmRow[j].ToString();
|
|
|
|
+ if (bool.TryParse(pmRow[j].ToString(), out var avData))
|
|
|
|
+ setValueData = pmRow[j].ToString() == bool.TrueString ? "Open" : "Close";
|
|
|
|
+
|
|
|
|
+ cell.SetCellValue(setValueData);
|
|
cell.CellStyle = GetICellStyle(workbook);
|
|
cell.CellStyle = GetICellStyle(workbook);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ sheet.SetColumnWidth(0, keyValuePairs.LastOrDefault().Key.Length * 256);
|
|
|
|
+ sheet.SetColumnWidth(3, keyValuePairs.LastOrDefault().Key.Length * 256);
|
|
|
|
+ sheet.SetColumnWidth(4, keyValuePairs.LastOrDefault().Key.Length * 256);
|
|
// Write the output to a file
|
|
// Write the output to a file
|
|
using (FileStream file = new FileStream(fileName, FileMode.Create, FileAccess.Write))
|
|
using (FileStream file = new FileStream(fileName, FileMode.Create, FileAccess.Write))
|
|
{
|
|
{
|