MET08RESIMAPCDE - v2.43.4 - MethodBaseName

This commit is contained in:
2022-08-08 16:05:28 -07:00
parent 94b06b7de5
commit 1d7368c44e
69 changed files with 1763 additions and 356 deletions

View File

@ -28,12 +28,12 @@ public class ProcessData : IProcessData
public string Date { get; set; }
public DateTime DateTime { get; set; }
public string Employee { get; set; }
public string EquipId { get; set; }
public string Engineer { get; set; }
public string EquipId { get; set; }
public string FileName { get; set; }
public string Layer { get; set; }
public string Lot { get; set; }
public string LogBody { get; set; }
public string Lot { get; set; }
public string PSN { get; set; }
public string Project { get; set; }
public string RDS { get; set; }
@ -86,37 +86,86 @@ public class ProcessData : IProcessData
return results;
}
private void SetTitleData(string[] segments)
public static Descriptor GetDescriptor(string text)
{
if (segments.Length > 0)
Descriptor result;
string psn;
string rds;
string run;
string zone;
string layer;
string title;
string reactor;
string[] segments;
const string defaultPSN = "0000";
const string defaultRDS = "000000";
const string defaultReactor = "00";
if (text.Length is 2 or 3)
{
run = text;
psn = defaultPSN;
rds = defaultRDS;
zone = string.Empty;
layer = string.Empty;
reactor = defaultReactor;
}
else
{
// Remove illegal characters \/:*?"<>| found in the title.
string title = Regex.Replace(segments[0], @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
title = Regex.Replace(text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
if (title.StartsWith("1T") || title.StartsWith("1t"))
title = title.Substring(2);
Title = title;
Run = title;
string[] parsedBatch = title.Split('-');
if (parsedBatch.Length == 1)
RDS = title;
run = title;
segments = title.Split('-');
if (segments.Length == 0)
reactor = defaultReactor;
else
reactor = segments[0];
if (segments.Length <= 1)
rds = defaultRDS;
else
rds = segments[1];
if (reactor.Length > 3)
{
rds = reactor;
reactor = defaultReactor;
}
if (segments.Length <= 2)
psn = defaultPSN;
else
psn = segments[2];
if (segments.Length < 3)
layer = string.Empty;
else
{
if (parsedBatch.Length > 0)
Reactor = parsedBatch[0];
if (parsedBatch.Length > 1)
RDS = parsedBatch[1];
if (parsedBatch.Length > 2)
{
string[] parsedPSN = parsedBatch[2].Split('.');
if (parsedPSN.Length > 0)
PSN = parsedPSN[0];
if (parsedPSN.Length > 1)
Layer = parsedPSN[1];
}
if (parsedBatch.Length > 3)
Zone = parsedBatch[3];
string[] segmentsB = segments[2].Split('.');
if (segmentsB.Length > 1)
psn = segmentsB[0];
if (segmentsB.Length <= 1)
layer = string.Empty;
else
layer = segmentsB[1];
}
if (segments.Length <= 3)
zone = string.Empty;
else
zone = segments[3];
}
result = new(layer, psn, rds, reactor, run, zone);
return result;
}
private void SetTitleData(Logistics logistics, string text)
{
string timeFormat = "yyyyMMddHHmmss";
Descriptor descriptor = GetDescriptor(text);
PSN = descriptor.PSN;
RDS = descriptor.RDS;
Run = descriptor.Run;
Zone = descriptor.Zone;
Layer = descriptor.Layer;
Reactor = descriptor.Reactor;
UniqueId = string.Concat(logistics.JobID, "_", descriptor.Run, "_", logistics.DateTimeFromSequence.ToString(timeFormat));
}
private void SetFileNameData(string[] segments)
@ -174,9 +223,9 @@ public class ProcessData : IProcessData
StandardDeviationPercentage = Math.Round(standardDeviation / average, 4).ToString("0.00%");
}
private void SetOperatorData(string[] segments)
private void SetOperatorData(string[] segments, bool updateEmployee)
{
if (segments.Length > 1)
if (segments.Length > 1 && updateEmployee)
Employee = segments[0];
if (segments.Length > 2)
EquipId = segments[1];
@ -219,20 +268,19 @@ public class ProcessData : IProcessData
Lot = "LotID";
Detail detail;
string[] segments;
string timeFormat = "yyyyMMddHHmmss";
string[] separator = new string[] { " " };
string[] lines = File.ReadAllLines(logistics.ReportFullPath);
for (int i = 0; i < lines.Length; i++)
{
segments = lines[i].Split(separator, StringSplitOptions.RemoveEmptyEntries);
if (lines[i].Contains("<Title>"))
SetTitleData(segments);
if (lines[i].Contains("<Title>") && segments.Length > 0)
SetTitleData(logistics, segments[0]);
else if (lines[i].Contains("<FileName, Proj,Rcpe, LotID,WfrID"))
SetFileNameData(segments);
else if (lines[i].Contains("<DateTime,Temp,TCR%,N|P>"))
SetDateTimeData(logistics, segments);
else if (lines[i].Contains("<Operator, Epuipment>"))
SetOperatorData(segments);
SetOperatorData(segments, updateEmployee: string.IsNullOrEmpty(Employee));
else if (lines[i].Contains("<Engineer>"))
SetEngineerData(segments);
else if (lines[i].Contains("<NumProbePoints, SingleOrDualProbeConfig, #ActPrbPts, Rsens,IdrvMx,VinGain, DataRejectSigma, MeritThreshold"))
@ -249,7 +297,6 @@ public class ProcessData : IProcessData
}
}
}
UniqueId = string.Concat(EquipId, "_", Run, "_", logistics.DateTimeFromSequence.ToString(timeFormat));
for (int i = 0; i < _Details.Count; i++)
{
if (_Details[i] is not Detail item)