process-data-standard-format with pipes

Test empty first pass when wafer data isn't present
This commit is contained in:
2025-04-21 13:11:23 -07:00
parent 954cdf7a26
commit 2b7573b33d
4 changed files with 94 additions and 79 deletions

View File

@ -301,6 +301,8 @@ public class FileRead : Shared.FileRead, IFileRead
long preWait;
foreach (PreWith preWith in preWithCollection)
{
if (!_IsEAFHosted)
continue;
if (processDataStandardFormat is null)
File.Move(preWith.MatchingFile, preWith.CheckFile);
else
@ -350,6 +352,8 @@ public class FileRead : Shared.FileRead, IFileRead
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
processDataStandardFormat = null;
}
if (!_IsEAFHosted && processDataStandardFormat is not null)
ProcessDataStandardFormat.Write(".pdsf", processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID();
int numberLength = 2;
long ticks = dateTime.Ticks;

View File

@ -238,34 +238,6 @@ public class FileRead : Shared.FileRead, IFileRead
return result.ToString();
}
private static string GetJson(int columnsLine, string[] columns, string[] body)
{
#pragma warning disable CA1845, IDE0057
string result = "[\n";
string line;
string value;
string[] segments;
if (columns.Length == 0)
columns = body[columnsLine].Trim().Split('\t');
for (int i = columnsLine + 1; i < body.Length; i++)
{
line = "{";
segments = body[i].Trim().Split('\t');
if (segments.Length != columns.Length)
break;
for (int c = 1; c < segments.Length; c++)
{
value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\");
line += '"' + columns[c].Trim('"') + '"' + ':' + '"' + value + '"' + ',';
}
line = line.Substring(0, line.Length - 1) + '}' + ',' + '\n';
result += line;
}
result = result.Substring(0, result.Length - 1) + ']';
return result;
#pragma warning restore CA1845, IDE0057
}
private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, ProcessDataStandardFormat processDataStandardFormat, List<pcl.Description> descriptions, Test[] tests)
{
bool isDummyRun = false;

View File

@ -141,7 +141,7 @@ public class FileRead : Shared.FileRead, IFileRead
if (iProcessData.Details.Count > 0)
results = iProcessData.GetResults(this, _Logistics, results.Item4);
else
results = new(string.Concat("C) No Data - ", dateTime.Ticks), Array.Empty<Test>(), Array.Empty<JsonElement>(), results.Item4);
results = new(string.Concat("LOGISTICS_1 - C) No Data - ", dateTime.Ticks), Array.Empty<Test>(), Array.Empty<JsonElement>(), results.Item4);
}
}
return results;