MET08RESIMAPCDE - v2.43.0 - SPC and APC Bug Fix

This commit is contained in:
2022-06-10 09:39:38 -07:00
parent 2e660ec384
commit 044b0e2bcd
18 changed files with 119 additions and 167 deletions

View File

@ -166,13 +166,12 @@ public class ProcessData : IProcessData
StandardDeviationPercentage = Math.Round(standardDeviation / average, 4).ToString("0.00%");
}
private void SetOperatorData(IFileRead fileRead, string[] segments)
private void SetOperatorData(string[] segments)
{
if (segments.Length > 1)
Employee = segments[0];
if (segments.Length > 2)
EquipId = segments[1];
EquipId = fileRead.CellInstanceName;
}
private void SetEngineerData(string[] segments)
@ -205,10 +204,12 @@ public class ProcessData : IProcessData
private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection)
{
Lot = "LotID";
Detail detail;
if (fileRead is null)
{ }
if (fileInfoCollection is null)
{ }
Lot = "LotID";
Detail detail;
string[] segments;
string timeFormat = "yyyyMMddHHmmss";
string[] separator = new string[] { " " };
@ -223,7 +224,7 @@ public class ProcessData : IProcessData
else if (lines[i].Contains(",<DateTime,Temp,TCR%,N|P>"))
SetDateTimeData(logistics, segments);
else if (lines[i].Contains(",<Operator, Epuipment>"))
SetOperatorData(fileRead, segments);
SetOperatorData(segments);
else if (lines[i].Contains(",<Engineer>"))
SetEngineerData(segments);
else if (lines[i].Contains(",<NumProbePoints, SingleOrDualProbeConfig, #ActPrbPts, Rsens,IdrvMx,VinGain, DataRejectSigma, MeritThreshold>"))
@ -272,16 +273,20 @@ public class ProcessData : IProcessData
LogBody = stringBuilder.ToString();
}
#nullable enable
internal static List<Description> GetDescriptions(JsonElement[] jsonElements)
{
List<Description> results = new();
Description description;
Description? description;
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
foreach (JsonElement jsonElement in jsonElements)
{
if (jsonElement.ValueKind != JsonValueKind.Object)
throw new Exception();
description = JsonSerializer.Deserialize<Description>(jsonElement.ToString(), jsonSerializerOptions);
if (description is null)
continue;
results.Add(description);
}
return results;