using Adaptation.FileHandlers.Stratus;

This commit is contained in:
2025-02-17 12:40:52 -07:00
parent 55dbbc517c
commit 2453d448e7
3 changed files with 33 additions and 27 deletions

View File

@ -40,7 +40,7 @@ internal class Run
int columns = 0;
StringBuilder stringBuilder = new();
results.Add($"\"Count\",{jsonElements?.Length}");
results.Add($"\"{nameof(logistics.Sequence)}\",{logistics.Sequence}");
results.Add($"\"{nameof(logistics.Sequence)}\",\"{logistics.Sequence}\"");
results.Add($"\"{nameof(logistics.MesEntity)}\",\"{logistics.MesEntity}\"");
string dateTimeFromSequence = logistics.DateTimeFromSequence.ToString("MM/dd/yyyy hh:mm:ss tt");
for (int i = 0; i < jsonElements?.Length;)
@ -79,18 +79,21 @@ internal class Run
{
List<Row> results = new();
Row row;
int index = 0;
for (int i = 0; i < run.Wafers.Count; i++)
{
for (int j = 0; j < run.Wafers[i].Sites.Count; j++)
{
row = new(run, i, j);
row = new(run, index, i, j);
results.Add(row);
index +=1;
}
}
string json = JsonSerializer.Serialize(results);
JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json);
ReadOnlyCollection<string> lines = GetLines(logistics, jsonElements);
File.WriteAllText($"{logistics.ReportFullPath}.csv", string.Join(Environment.NewLine, lines));
File.WriteAllText($"{logistics.ReportFullPath}.a.csv", string.Join(Environment.NewLine, lines));
File.WriteAllText($"{logistics.ReportFullPath}.b.csv", string.Join(Environment.NewLine, lines));
}
internal static Run? Get(Logistics logistics, List<FileInfo> fileInfoCollection)