MET08THFTIRSTRATUS - v2.47.0 - Job -

Work Oder, Reactor and Slot
This commit is contained in:
2022-10-10 19:39:25 -07:00
parent 8e16a0bae9
commit dd4dba16d4
13 changed files with 940 additions and 64 deletions

View File

@ -40,6 +40,7 @@ public class Description : IDescription, Shared.Properties.IDescription
public string Title { get; set; }
public string UniqueId { get; set; }
public string Wafer { get; set; }
public string Zone { get; set; }
//
public string Mean { get; set; }
public string Position { get; set; }
@ -74,7 +75,8 @@ public class Description : IDescription, Shared.Properties.IDescription
nameof(Slot),
nameof(Title),
nameof(UniqueId),
nameof(Wafer)
nameof(Wafer),
nameof(Zone)
};
return results;
}
@ -193,7 +195,7 @@ public class Description : IDescription, Shared.Properties.IDescription
Lot = processData.Batch,
PSN = processData.PSN,
Reactor = processData.Reactor,
Recipe = processData.Recipe,
Recipe = detail.Recipe,
//
Cassette = processData.Cassette,
GradeStdDev = processData.StdDev,
@ -205,6 +207,7 @@ public class Description : IDescription, Shared.Properties.IDescription
Title = processData.Title,
UniqueId = detail.UniqueId,
Wafer = detail.Wafer,
Zone = processData.Zone,
//
Mean = detail.Mean,
Position = detail.Position,
@ -257,6 +260,7 @@ public class Description : IDescription, Shared.Properties.IDescription
Title = nameof(Title),
UniqueId = nameof(UniqueId),
Wafer = nameof(Wafer),
Zone = nameof(Zone),
//
Mean = nameof(Mean),
Position = nameof(Position),

View File

@ -5,17 +5,21 @@ public class Descriptor
public string Cassette { get; private set; }
public string Employee { get; private set; }
public string Layer { get; private set; }
public string PSN { get; private set; }
public string RDS { get; private set; }
public string Reactor { get; private set; }
public string Zone { get; private set; }
public Descriptor(string cassette, string employee, string psn, string rds, string reactor)
public Descriptor(string cassette, string employee, string layer, string psn, string rds, string reactor, string zone)
{
Cassette = cassette;
Employee = employee;
Layer = layer;
PSN = psn;
RDS = rds;
Reactor = reactor;
Zone = zone;
}
}

View File

@ -30,10 +30,10 @@ public partial class ProcessData : IProcessData
public string PSN { get; set; }
public string RDS { get; set; }
public string Reactor { get; set; }
public string Recipe { get; set; }
public string StdDev { get; set; }
public string Title { get; set; }
public string UniqueId { get; set; }
public string Zone { get; set; }
List<object> Shared.Properties.IProcessData.Details => _Details;
@ -245,31 +245,111 @@ public partial class ProcessData : IProcessData
return result;
}
private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments)
{
string rds;
string reactor;
if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText))
reactor = defaultReactor;
else
reactor = segments[0];
if (segments.Length <= 1 || !int.TryParse(segments[1], out int rdsValue) || rdsValue < 99)
rds = defaultRDS;
else
rds = segments[1];
if (reactor.Length > 3)
{
rds = reactor;
reactor = defaultReactor;
}
return new(reactor, rds);
}
private static (string, string) GetLayerAndPSN(string defaultLayer, string defaultPSN, string[] segments)
{
string psn;
string layer;
if (segments.Length <= 2)
{
psn = defaultPSN;
layer = defaultLayer;
}
else
{
string[] segmentsB = segments[2].Split('.');
psn = segmentsB[0];
if (segmentsB.Length <= 1)
layer = defaultLayer;
else
{
layer = segmentsB[1];
if (layer.Length > 1 && layer[0] == '0')
layer = layer.Substring(1);
}
}
return (layer, psn);
}
private static string GetZone(string[] segments)
{
string result;
if (segments.Length <= 3)
result = string.Empty;
else
{
result = segments[3];
if (result.Length > 1 && result[0] == '0')
result = result.Substring(1);
}
return result;
}
public static Descriptor GetDescriptor(string text)
{
Descriptor result;
string psn;
string rds;
string zone;
string layer;
string reactor;
string cassette;
string employee;
string[] segments;
const string defaultPSN = "0000";
const string defaultRDS = "000000";
const string defaultReactor = "00";
if (text.Length is 2 or 3)
string defaultPSN = string.Empty;
string defaultRDS = string.Empty;
string defaultZone = string.Empty;
string defaultLayer = string.Empty;
string defaultReactor = string.Empty;
string defaultEmployee = string.Empty;
if (string.IsNullOrEmpty(text) || (text.Length is 2 or 3 && Regex.IsMatch(text, "^[a-zA-z]{2,3}")))
{
cassette = text;
rds = defaultRDS;
psn = defaultPSN;
rds = defaultRDS;
zone = defaultZone;
employee = cassette;
layer = defaultLayer;
reactor = defaultReactor;
}
else if (Regex.IsMatch(text, @"^[0-9]{2}[.][0-9]{1}[.]?[0-9]{0,1}"))
{
string[] segments = text.Split('.');
cassette = text;
psn = defaultPSN;
rds = defaultRDS;
layer = segments[1];
reactor = segments[0];
employee = defaultEmployee;
if (segments.Length <= 2)
zone = defaultZone;
else
zone = segments[2];
}
else
{
string[] segments;
// Remove illegal characters \/:*?"<>| found in the Cassette.
cassette = Regex.Replace(text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
if (cassette.StartsWith("1T") || cassette.StartsWith("1t"))
if (cassette.Length > 2 && cassette[0] == '1' && (cassette[1] == 'T' || cassette[1] == 't'))
cassette = cassette.Substring(2);
if (cassette.Contains('-'))
segments = cassette.Split(new char[] { '-' });
@ -279,29 +359,15 @@ public partial class ProcessData : IProcessData
segments = cassette.Split(new char[] { '.' });
else
segments = cassette.Split(new char[] { '\u005F' });
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].Split('.')[0];
if (segments.Length <= 3)
employee = string.Empty;
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, cassette, segments);
(layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments);
zone = GetZone(segments);
if (segments.Length <= 3 || segments[3].Length <= 1)
employee = defaultEmployee;
else
employee = segments[3];
}
result = new(cassette, employee, psn, rds, reactor);
result = new(cassette, employee, layer, psn, rds, reactor, zone);
return result;
}
@ -311,6 +377,7 @@ public partial class ProcessData : IProcessData
string rds;
string date;
string text;
string zone;
string batch;
string title;
string reactor;
@ -348,12 +415,14 @@ public partial class ProcessData : IProcessData
cassette = descriptor.Cassette;
psn = descriptor.PSN;
rds = descriptor.RDS;
zone = descriptor.Zone;
reactor = descriptor.Reactor;
employee = descriptor.Employee;
title = !string.IsNullOrEmpty(batch) ? batch : cassette;
PSN = psn;
RDS = rds;
Date = date;
Zone = zone;
Batch = batch;
Title = title;
Reactor = reactor;
@ -384,10 +453,11 @@ public partial class ProcessData : IProcessData
Point point;
int num1 = 0;
Detail detail;
string recipe;
_I = 0;
_Data = receivedData;
Set(logistics);
string cassette = Cassette;
string cassette = "Cassette";
if (PeekNextLine().Contains("Wafer"))
{
_Log.Debug("****ProcessData Contains Wafer");
@ -411,13 +481,13 @@ public partial class ProcessData : IProcessData
ScanPast("Slot");
detail.Slot = GetToEOL();
ScanPast("Recipe");
Recipe = GetToEOL();
if (Recipe.EndsWith("."))
recipe = GetToEOL();
if (recipe.EndsWith("."))
{
_Log.Debug("****ProcessData Removing Recipe");
Recipe = Recipe.Remove(Recipe.Length - 1, 1);
recipe = recipe.Remove(recipe.Length - 1, 1);
}
detail.Recipe = Recipe;
detail.Recipe = recipe;
_ = GetToEOL();
if (PeekNextLine().Contains("Thickness"))
{