Bug fix for two recipes in one run

This commit is contained in:
Mike Phares 2025-05-27 15:19:01 -07:00
parent 67f4943fc2
commit 72d021cf82
4 changed files with 7 additions and 7 deletions

View File

@ -268,7 +268,7 @@ public class FileRead : Shared.FileRead, IFileRead
}
}
private static ReadOnlyCollection<Pre> GetPreCollection(int numberLength, string parentDirectory, ReadOnlyCollection<string> matchingFiles, bool _)
private static ReadOnlyCollection<Pre> GetPreCollection(int numberLength, string parentDirectory, ReadOnlyCollection<string> matchingFiles)
{
List<Pre> results = new();
Pre pre;
@ -366,10 +366,7 @@ public class FileRead : Shared.FileRead, IFileRead
{ CreatePointerFile(numberLength, parentParentDirectory, matchingFiles); }
catch (Exception) { }
}
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
List<pcl.Description> descriptions = pcl.ProcessData.GetDescriptions(jsonElements);
bool mesEntityMatchesProcess = descriptions.Count > 0 && descriptions[0].MesEntity == descriptions[0].Reactor;
ReadOnlyCollection<Pre> preCollection = GetPreCollection(numberLength, parentParentDirectory, matchingFiles, mesEntityMatchesProcess);
ReadOnlyCollection<Pre> preCollection = GetPreCollection(numberLength, parentParentDirectory, matchingFiles);
ReadOnlyCollection<PreWith> preWithCollection = GetPreWithCollection(preCollection);
MoveCollection(dateTime, processDataStandardFormat, preWithCollection);
return results;

View File

@ -108,7 +108,7 @@ internal class Run
else
{
ReadOnlyCollection<string> waferIds = GetWaferIds(header);
ReadOnlyDictionary<string, Wafer> keyValuePairs = Wafer.Get(pages, constant, headerFileName);
ReadOnlyDictionary<string, Wafer> keyValuePairs = Wafer.Get(pages, constant, headerFileName, header);
ReadOnlyCollection<Wafer> wafers = Wafer.Get(waferIds, keyValuePairs);
result = new(header, wafers);
WriteJson(logistics, fileInfoCollection, result);

View File

@ -113,7 +113,7 @@ public class Wafer
public string Thruput { get; }
public string Recipe { get; }
internal static ReadOnlyDictionary<string, Wafer> Get(ReadOnlyDictionary<string, string> pages, Constant constant, string headerFileName)
internal static ReadOnlyDictionary<string, Wafer> Get(ReadOnlyDictionary<string, string> pages, Constant constant, string headerFileName, Header header)
{
Dictionary<string, Wafer> results = new();
Wafer wafer;
@ -190,6 +190,8 @@ public class Wafer
string thruput = Header.GetToEOL(text, i);
Header.ScanPast(text, i, "Recipe ID:");
string recipe = Header.GetToEOL(text, i);
if (recipe != header.Recipe)
continue;
wafer = new(date: date,
id: id,
comments: comments,

View File

@ -462,6 +462,7 @@ internal class ProcessDataStandardFormat
results.Add(string.Empty);
List<char> hyphens = new();
results.AddRange(processDataStandardFormat.InputPDSF.Header.Select(l => l.Replace('\t', '|')));
results.Add(string.Empty);
results.Add($"|{string.Join("|", processDataStandardFormat.InputPDSF.Columns)}|");
for (int i = 0; i < processDataStandardFormat.InputPDSF.Columns.Count; i++)
hyphens.Add('-');