Save CSV like PDSF ready to test

This commit is contained in:
2025-01-14 09:13:43 -07:00
parent ccedba10b5
commit e37d9757ec
9 changed files with 396 additions and 106 deletions

View File

@ -73,7 +73,7 @@ public class ProcessData : IProcessData
List<object> Shared.Properties.IProcessData.Details => _Details;
internal ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, ReadOnlyDictionary<string, string> pages, Complete complete)
internal ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, ReadOnlyDictionary<string, string> pages, Run run)
{
_Details = new List<object>();
_I = 0;
@ -82,7 +82,7 @@ public class ProcessData : IProcessData
Date = GetDateTime(logistics);
MesEntity = logistics.MesEntity;
_Log = LogManager.GetLogger(typeof(ProcessData));
Parse(fileRead, logistics, fileInfoCollection, pages, complete);
Parse(fileRead, logistics, fileInfoCollection, pages, run);
}
private static DateTime GetDateTime(Logistics logistics) =>
@ -381,7 +381,7 @@ public class ProcessData : IProcessData
return result;
}
private void Set(ILogistics logistics, Complete complete)
private void Set(ILogistics logistics, Run run)
{
string lot;
string rds;
@ -391,8 +391,8 @@ public class ProcessData : IProcessData
string employee;
ScanPast("Recipe ID:");
_ = GetBefore("LotID:");
lot = complete.Header.Id;
recipe = complete.Header.Recipe;
lot = run.Header.Id;
recipe = run.Header.Recipe;
Descriptor descriptor = GetDescriptor(lot);
lot = descriptor.Lot;
psn = descriptor.PSN;
@ -408,7 +408,7 @@ public class ProcessData : IProcessData
UniqueId = string.Format("{0}_{1}_{2}", logistics.JobID, lot, Path.GetFileNameWithoutExtension(logistics.ReportFullPath));
}
private void ParseLotSummary(ILogistics logistics, ReadOnlyDictionary<string, string> pages, Complete complete, string headerFileName, Dictionary<string, List<Detail>> slots)
private void ParseLotSummary(ILogistics logistics, ReadOnlyDictionary<string, string> pages, Run run, string headerFileName, Dictionary<string, List<Detail>> slots)
{
_I = 0;
ParseErrorText = string.Empty;
@ -418,7 +418,7 @@ public class ProcessData : IProcessData
_Data = value;
ScanPast("Date:");
_ = GetToEOL();
Set(logistics, complete);
Set(logistics, run);
// determine number of wafers and their slot numbers
_Log.Debug(_Data.Substring(_I));
string slot;
@ -597,7 +597,7 @@ public class ProcessData : IProcessData
#nullable enable
private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, ReadOnlyDictionary<string, string> pages, Complete complete)
private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, ReadOnlyDictionary<string, string> pages, Run run)
{
if (fileRead is null)
throw new ArgumentNullException(nameof(fileRead));
@ -607,7 +607,7 @@ public class ProcessData : IProcessData
List<Tuple<string, string>> pageMapping = new();
_Log.Debug($"****ParseData - Parsing lot summary");
string headerFileName = pages.ElementAt(pages.Count - 1).Key;
ParseLotSummary(logistics, pages, complete, headerFileName, slots);
ParseLotSummary(logistics, pages, run, headerFileName, slots);
string sourcePath = Path.GetDirectoryName(logistics.ReportFullPath) ?? throw new Exception();
string sourceFileNameWithoutExtension = Path.GetFileNameWithoutExtension(logistics.ReportFullPath);
foreach (FileInfo fileInfo in fileInfoCollection)