Enhance PCL and PDSF file handlers with new constants and refactor methods for improved readability and functionality
This commit is contained in:
@ -24,13 +24,13 @@ internal class Run
|
||||
Wafers = wafers;
|
||||
}
|
||||
|
||||
private static ReadOnlyCollection<Wafer> GetLastWaferForEachSlot(ReadOnlyDictionary<string, string> pages, Constant constant, string headerFileName, Header header)
|
||||
private static ReadOnlyCollection<Wafer> GetLastWaferForEachSlot(ReadOnlyDictionary<string, string> pages, Constant constant, Header header)
|
||||
{
|
||||
List<Wafer> results = new();
|
||||
string id;
|
||||
Wafer wafer;
|
||||
ReadOnlyCollection<Wafer>? wafers;
|
||||
ReadOnlyDictionary<string, ReadOnlyCollection<Wafer>> keyValuePairs = Wafer.Get(pages, constant, headerFileName);
|
||||
ReadOnlyDictionary<string, ReadOnlyCollection<Wafer>> keyValuePairs = Wafer.Get(pages, constant);
|
||||
ReadOnlyCollection<string> waferIds = GetWaferIds(header);
|
||||
for (int i = 0; i < waferIds.Count; i++)
|
||||
{
|
||||
@ -123,13 +123,12 @@ internal class Run
|
||||
{
|
||||
Run? result;
|
||||
Constant constant = new();
|
||||
string headerFileName = pages.ElementAt(pages.Count - 1).Key;
|
||||
Header? header = Header.Get(pages, constant, headerFileName);
|
||||
Header? header = Header.Get(pages, constant);
|
||||
if (header is null)
|
||||
result = null;
|
||||
else
|
||||
{
|
||||
ReadOnlyCollection<Wafer> wafers = GetLastWaferForEachSlot(pages, constant, headerFileName, header);
|
||||
ReadOnlyCollection<Wafer> wafers = GetLastWaferForEachSlot(pages, constant, header);
|
||||
result = new(header, wafers);
|
||||
WriteJson(logistics, fileInfoCollection, result);
|
||||
WriteCommaSeparatedValues(logistics, result);
|
||||
|
||||
Reference in New Issue
Block a user