Switched to xml for InfinityQS export

This commit is contained in:
2025-08-26 10:01:45 -07:00
parent 7007207ede
commit a71c0c3a5a
23 changed files with 1869 additions and 999 deletions

View File

@ -24,7 +24,7 @@ public class Description : IDescription, Shared.Properties.IDescription
public string MID { get; set; }
//
public string Date { get; set; }
public string Lot { get; set; }
public string RDS { get; set; }
public string Part { get; set; }
public string Process { get; set; }
public string Recipe { get; set; }
@ -65,7 +65,7 @@ public class Description : IDescription, Shared.Properties.IDescription
List<string> results = new()
{
nameof(Date),
nameof(Lot),
nameof(RDS),
nameof(Part),
nameof(Process),
nameof(Recipe)
@ -165,7 +165,7 @@ public class Description : IDescription, Shared.Properties.IDescription
MID = logistics.MID,
//
Date = detail.Date,
Lot = processData.MetaData.Date,
RDS = processData.MetaData.Date,
Part = $"{processData.MetaData.DeviceId}-{processData.MetaData.DeviceType}-{processData.MetaData.DeviceNumber}",
Process = $"{processData.MetaData.DescriptionName}",
Recipe = processData.MetaData.Frequency,
@ -204,7 +204,7 @@ public class Description : IDescription, Shared.Properties.IDescription
MID = logistics.MID,
//
Date = nameof(Date),
Lot = nameof(Lot),
RDS = nameof(RDS),
Part = nameof(Part),
Process = nameof(Process),
Recipe = nameof(Recipe),

View File

@ -15,7 +15,7 @@ public class FileRead : Shared.FileRead, IFileRead
private long? _TickOffset;
private readonly CommaSeparatedValuesConfiguration _CommaSeparatedValuesConfiguration;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), true, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 1000;

View File

@ -25,7 +25,6 @@ public class ProcessData : IProcessData
public ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, CommaSeparatedValuesConfiguration commaSeparatedValuesConfiguration, MetaData metaData)
{
JobID = logistics.JobID;
fileInfoCollection.Clear();
_Details = new List<object>();
MesEntity = logistics.MesEntity;
Parse(fileRead, logistics, fileInfoCollection, commaSeparatedValuesConfiguration, metaData);
@ -49,9 +48,13 @@ public class ProcessData : IProcessData
if (description.Test != (int)tests[i])
throw new Exception();
}
FileInfo fileInfo = new($"{logistics.ReportFullPath}.descriptions.json");
List<Description> fileReadDescriptions = (from l in descriptions select (Description)l).ToList();
string json = JsonSerializer.Serialize(fileReadDescriptions, fileReadDescriptions.GetType());
JsonElement[] jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json);
File.WriteAllText(fileInfo.FullName, json);
File.SetLastWriteTime(fileInfo.FullName, logistics.DateTimeFromSequence);
fileInfoCollection.Add(fileInfo);
JsonElement[] jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json) ?? throw new Exception();
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(logistics.Logistics1[0], tests.ToArray(), jsonElements, fileInfoCollection);
return results;
}