MET08DDUPSP1TBI - v2.47.0 - Job - Zone Rev B
This commit is contained in:
parent
73b88fed0b
commit
963082a769
@ -12,19 +12,26 @@ namespace Adaptation.FileHandlers.TIBCO.Transport;
|
|||||||
public class Job
|
public class Job
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#nullable restore
|
||||||
|
|
||||||
public string AutomationMode { get; }
|
public string AutomationMode { get; }
|
||||||
public string BasicType { get; }
|
public string BasicType { get; }
|
||||||
public string EpiLayer { get; }
|
public string CreationUser { get; }
|
||||||
public string Equipment { get; }
|
public string Equipment { get; }
|
||||||
public string JobName { get; }
|
public string JobName { get; }
|
||||||
|
public string LastUpdateUser { get; }
|
||||||
public string LotName { get; }
|
public string LotName { get; }
|
||||||
|
public string LotState { get; }
|
||||||
public string PackageName { get; }
|
public string PackageName { get; }
|
||||||
public string ProcessSpecName { get; }
|
public string ProcessSpecName { get; }
|
||||||
public string ProcessType { get; }
|
public string ProcessType { get; }
|
||||||
public string ProductName { get; }
|
public string ProductName { get; }
|
||||||
public string Qty { get; }
|
public string Qty { get; }
|
||||||
|
public string Qty2 { get; }
|
||||||
public string RecipeName { get; }
|
public string RecipeName { get; }
|
||||||
|
public string SpecName { get; }
|
||||||
public string StateModel { get; }
|
public string StateModel { get; }
|
||||||
|
public string Status { get; }
|
||||||
//
|
//
|
||||||
public bool IsAreaSi { get; }
|
public bool IsAreaSi { get; }
|
||||||
public DateTime DateTime { get; }
|
public DateTime DateTime { get; }
|
||||||
@ -41,8 +48,7 @@ public class Job
|
|||||||
string psn;
|
string psn;
|
||||||
string zone;
|
string zone;
|
||||||
int? rdsNumber;
|
int? rdsNumber;
|
||||||
string epiLayer;
|
string comment;
|
||||||
string basicType;
|
|
||||||
const string hyphen = "-";
|
const string hyphen = "-";
|
||||||
Input input = JsonSerializer.Deserialize<Input>(mid);
|
Input input = JsonSerializer.Deserialize<Input>(mid);
|
||||||
if (!long.TryParse(input.Sequence, out long sequence))
|
if (!long.TryParse(input.Sequence, out long sequence))
|
||||||
@ -57,36 +63,31 @@ public class Job
|
|||||||
(psn, rdsNumber, reactorNumber) = Get(input);
|
(psn, rdsNumber, reactorNumber) = Get(input);
|
||||||
else
|
else
|
||||||
(psn, rdsNumber, reactorNumber) = Get(metrologyFileShare, input);
|
(psn, rdsNumber, reactorNumber) = Get(metrologyFileShare, input);
|
||||||
Equipment = input.MesEntity;
|
|
||||||
IsAreaSi = input.Area == "Si";
|
|
||||||
JobName = DateTime.Ticks.ToString();
|
|
||||||
AutomationMode = string.Concat(DateTime.Ticks, ".", input.MesEntity);
|
|
||||||
if (IsValid(rdsNumber))
|
if (IsValid(rdsNumber))
|
||||||
(basicType, rdsNumber, psn, reactorNumber, epiLayer, zone) = GetWithValidRDS(lsl2SQLConnectionString, psn, rdsNumber, reactorNumber);
|
(comment, rdsNumber, psn, reactorNumber, zone) = GetWithValidRDS(lsl2SQLConnectionString, psn, rdsNumber, reactorNumber);
|
||||||
else if (isWorkOrder || reactorNumber.HasValue)
|
else if (isWorkOrder || reactorNumber.HasValue)
|
||||||
(basicType, rdsNumber, psn, reactorNumber, epiLayer, zone) = Get(lsl2SQLConnectionString, reactorNumber, slotNumber, workOrderNumber, workOrderCassette);
|
(comment, rdsNumber, psn, reactorNumber, zone) = Get(lsl2SQLConnectionString, reactorNumber, slotNumber, workOrderNumber, workOrderCassette);
|
||||||
else
|
else
|
||||||
{
|
(comment, zone) = (hyphen, hyphen);
|
||||||
zone = hyphen;
|
|
||||||
epiLayer = "1";
|
|
||||||
basicType = hyphen;
|
|
||||||
}
|
|
||||||
Qty = "1";
|
Qty = "1";
|
||||||
ProductName = psn;
|
Status = hyphen; // INFO
|
||||||
EpiLayer = epiLayer;
|
CreationUser = hyphen; // ?
|
||||||
BasicType = basicType;
|
SpecName = hyphen; // LAYER
|
||||||
RecipeName = input.Recipe;
|
LotState = hyphen; // LAYER2
|
||||||
StateModel = input.EquipmentType;
|
LastUpdateUser = hyphen; // ?
|
||||||
PackageName = hyphen; //WAFER_ID WaferLot
|
Equipment = input.MesEntity; // ?
|
||||||
ProcessSpecName = zone; //WAFER_POS PocketNumber
|
PackageName = hyphen; // WAFER_ID
|
||||||
if (rdsNumber is null)
|
Qty2 = input.Sequence; // SEQUENCE
|
||||||
LotName = input.MID;
|
RecipeName = input.Recipe; // PPID
|
||||||
else
|
IsAreaSi = input.Area == "Si"; // N/A
|
||||||
LotName = rdsNumber.Value.ToString();
|
StateModel = input.EquipmentType; // ?
|
||||||
if (reactorNumber is null)
|
JobName = DateTime.Ticks.ToString(); // ?
|
||||||
ProcessType = string.Empty;
|
ProductName = !string.IsNullOrEmpty(psn) ? psn : hyphen; // PRODUCT
|
||||||
else
|
AutomationMode = string.Concat(DateTime.Ticks, ".", input.MesEntity); // ?
|
||||||
ProcessType = reactorNumber.Value.ToString();
|
ProcessSpecName = !string.IsNullOrEmpty(zone) ? zone : hyphen; // WAFER_POS
|
||||||
|
BasicType = !string.IsNullOrEmpty(comment) ? comment : hyphen; // BASIC_TYPE
|
||||||
|
LotName = rdsNumber is not null ? rdsNumber.Value.ToString() : hyphen; // MID
|
||||||
|
ProcessType = reactorNumber is not null ? reactorNumber.Value.ToString() : hyphen; // PROCESS_JOBID
|
||||||
Items.Add(new Item { Name = "0", Type = "NA", Number = (0 + 1).ToString(), Qty = "1", CarrierName = hyphen });
|
Items.Add(new Item { Name = "0", Type = "NA", Number = (0 + 1).ToString(), Qty = "1", CarrierName = hyphen });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -310,20 +311,19 @@ public class Job
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static (string, int?, string, int?, string, string) Get(string lsl2SQLConnectionString, int? reactorNumber, int? slotNumber, int? workOrderNumber, int? workOrderCassette)
|
private static (string, int?, string, int?, string) Get(string lsl2SQLConnectionString, int? reactorNumber, int? slotNumber, int? workOrderNumber, int? workOrderCassette)
|
||||||
{
|
{
|
||||||
string psn;
|
string psn;
|
||||||
string zone;
|
string zone;
|
||||||
int? rdsNumber;
|
int? rdsNumber;
|
||||||
string basicType;
|
string comment;
|
||||||
const int zero = 0;
|
const int zero = 0;
|
||||||
string epiLayer = "1";
|
|
||||||
const string hyphen = "-";
|
const string hyphen = "-";
|
||||||
string json = GetRunJson(lsl2SQLConnectionString, rds: -1, workOrderNumber, workOrderCassette, slotNumber, reactorNumber);
|
string json = GetRunJson(lsl2SQLConnectionString, rds: null, workOrderNumber, workOrderCassette, slotNumber, reactorNumber);
|
||||||
if (string.IsNullOrEmpty(json))
|
if (string.IsNullOrEmpty(json))
|
||||||
{
|
{
|
||||||
rdsNumber = null;
|
rdsNumber = null;
|
||||||
basicType = hyphen;
|
comment = hyphen;
|
||||||
psn = string.Empty;
|
psn = string.Empty;
|
||||||
zone = string.Empty;
|
zone = string.Empty;
|
||||||
}
|
}
|
||||||
@ -337,7 +337,7 @@ public class Job
|
|||||||
if (!runs.Any())
|
if (!runs.Any())
|
||||||
{
|
{
|
||||||
rdsNumber = null;
|
rdsNumber = null;
|
||||||
basicType = hyphen;
|
comment = hyphen;
|
||||||
psn = string.Empty;
|
psn = string.Empty;
|
||||||
zone = string.Empty;
|
zone = string.Empty;
|
||||||
}
|
}
|
||||||
@ -346,8 +346,7 @@ public class Job
|
|||||||
psn = runs[zero].PSN;
|
psn = runs[zero].PSN;
|
||||||
zone = runs[zero].Zone;
|
zone = runs[zero].Zone;
|
||||||
rdsNumber = runs[zero].RdsNo;
|
rdsNumber = runs[zero].RdsNo;
|
||||||
if (reactorNumber is null)
|
reactorNumber = runs[zero].Reactor;
|
||||||
reactorNumber = runs[zero].Reactor;
|
|
||||||
string loadLockSide = runs[zero].LoadLockSide;
|
string loadLockSide = runs[zero].LoadLockSide;
|
||||||
string loadLockSideFull = loadLockSide switch
|
string loadLockSideFull = loadLockSide switch
|
||||||
{
|
{
|
||||||
@ -355,23 +354,22 @@ public class Job
|
|||||||
"R" => "Right",
|
"R" => "Right",
|
||||||
_ => loadLockSide,
|
_ => loadLockSide,
|
||||||
};
|
};
|
||||||
basicType = $"{loadLockSideFull} - {runs[zero].ReactorType}";
|
comment = $"{loadLockSideFull} - {runs[zero].ReactorType}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new(basicType, rdsNumber, psn, reactorNumber, epiLayer, zone);
|
return new(comment, rdsNumber, psn, reactorNumber, zone);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static (string, int?, string, int?, string, string) GetWithValidRDS(string lsl2SQLConnectionString, string psn, int? rdsNumber, int? reactorNumber)
|
private static (string, int?, string, int?, string) GetWithValidRDS(string lsl2SQLConnectionString, string psn, int? rdsNumber, int? reactorNumber)
|
||||||
{
|
{
|
||||||
string zone;
|
string zone;
|
||||||
string basicType;
|
string comment;
|
||||||
const int zero = 0;
|
const int zero = 0;
|
||||||
string epiLayer = "1";
|
|
||||||
const string hyphen = "-";
|
const string hyphen = "-";
|
||||||
string json = GetRunJson(lsl2SQLConnectionString, rdsNumber, workOrderNumber: -1, workOrderCassette: -1, slot: -1, reactor: -1);
|
string json = GetRunJson(lsl2SQLConnectionString, rdsNumber, workOrderNumber: null, workOrderCassette: null, slot: null, reactor: null);
|
||||||
if (string.IsNullOrEmpty(json))
|
if (string.IsNullOrEmpty(json))
|
||||||
{
|
{
|
||||||
basicType = hyphen;
|
comment = hyphen;
|
||||||
zone = string.Empty;
|
zone = string.Empty;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -383,16 +381,14 @@ public class Job
|
|||||||
{ runs = Array.Empty<Run>(); }
|
{ runs = Array.Empty<Run>(); }
|
||||||
if (!runs.Any())
|
if (!runs.Any())
|
||||||
{
|
{
|
||||||
basicType = hyphen;
|
comment = hyphen;
|
||||||
zone = string.Empty;
|
zone = string.Empty;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(psn))
|
psn = runs[zero].PSN;
|
||||||
psn = runs[zero].PSN;
|
|
||||||
if (reactorNumber is null)
|
|
||||||
reactorNumber = runs[zero].Reactor;
|
|
||||||
zone = runs[zero].Zone;
|
zone = runs[zero].Zone;
|
||||||
|
reactorNumber = runs[zero].Reactor;
|
||||||
string loadLockSide = runs[zero].LoadLockSide;
|
string loadLockSide = runs[zero].LoadLockSide;
|
||||||
string loadLockSideFull = loadLockSide switch
|
string loadLockSideFull = loadLockSide switch
|
||||||
{
|
{
|
||||||
@ -400,10 +396,10 @@ public class Job
|
|||||||
"R" => "Right",
|
"R" => "Right",
|
||||||
_ => loadLockSide,
|
_ => loadLockSide,
|
||||||
};
|
};
|
||||||
basicType = $"{loadLockSideFull} - {runs[zero].ReactorType}";
|
comment = $"{loadLockSideFull} - {runs[zero].ReactorType}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new(basicType, rdsNumber, psn, reactorNumber, epiLayer, zone);
|
return new(comment, rdsNumber, psn, reactorNumber, zone);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -119,26 +119,26 @@ internal partial class Main
|
|||||||
List<IfxDoc> itemDocs = new();
|
List<IfxDoc> itemDocs = new();
|
||||||
jobDoc.Add(nameof(Job.AutomationMode), job.AutomationMode);
|
jobDoc.Add(nameof(Job.AutomationMode), job.AutomationMode);
|
||||||
jobDoc.Add("CreationTimestamp", job.DateTime);
|
jobDoc.Add("CreationTimestamp", job.DateTime);
|
||||||
jobDoc.Add("CreationUser", "-");
|
jobDoc.Add(nameof(Job.CreationUser), job.CreationUser);
|
||||||
jobDoc.Add("CurrentState", true);
|
jobDoc.Add("CurrentState", true);
|
||||||
jobDoc.Add(nameof(Job.Equipment), job.Equipment);
|
jobDoc.Add(nameof(Job.Equipment), job.Equipment);
|
||||||
jobDoc.Add(nameof(Job.JobName), job.JobName);
|
jobDoc.Add(nameof(Job.JobName), job.JobName);
|
||||||
jobDoc.Add("LastUpdateTimestamp", job.DateTime);
|
jobDoc.Add("LastUpdateTimestamp", job.DateTime);
|
||||||
jobDoc.Add("LastUpdateUser", "-");
|
jobDoc.Add(nameof(Job.LastUpdateUser), job.LastUpdateUser);
|
||||||
jobDoc.Add(nameof(Job.ProcessType), job.ProcessType); //Key.Process_JobId
|
jobDoc.Add(nameof(Job.ProcessType), job.ProcessType);
|
||||||
jobDoc.Add(nameof(Job.StateModel), job.StateModel);
|
jobDoc.Add(nameof(Job.StateModel), job.StateModel);
|
||||||
jobDoc.Add("Status", "-"); //Key.Info
|
jobDoc.Add(nameof(Job.Status), job.Status);
|
||||||
lotDoc.Add(nameof(Job.BasicType), job.BasicType); //Key.BasicType
|
lotDoc.Add(nameof(Job.BasicType), job.BasicType);
|
||||||
lotDoc.Add("IsActive", true);
|
lotDoc.Add("IsActive", true);
|
||||||
lotDoc.Add(nameof(Job.LotName), job.LotName); //Key.MID
|
lotDoc.Add(nameof(Job.LotName), job.LotName);
|
||||||
lotDoc.Add("LotState", "-"); //Key.Layer2
|
lotDoc.Add(nameof(Job.LotState), job.LotState);
|
||||||
lotDoc.Add(nameof(Job.PackageName), job.PackageName); //Key.WaferId
|
lotDoc.Add(nameof(Job.PackageName), job.PackageName);
|
||||||
lotDoc.Add(nameof(Job.ProcessSpecName), job.ProcessSpecName); //Key.Chamber
|
lotDoc.Add(nameof(Job.ProcessSpecName), job.ProcessSpecName);
|
||||||
lotDoc.Add(nameof(Job.ProductName), job.ProductName); //Key.Product
|
lotDoc.Add(nameof(Job.ProductName), job.ProductName);
|
||||||
lotDoc.Add(nameof(Job.Qty), job.Qty);
|
lotDoc.Add(nameof(Job.Qty), job.Qty);
|
||||||
lotDoc.Add("Qty2", "-"); //Key.Sequence
|
lotDoc.Add(nameof(Job.Qty2), job.Qty2);
|
||||||
recipeDoc.Add(nameof(Job.RecipeName), job.RecipeName); //Key.PPID
|
recipeDoc.Add(nameof(Job.RecipeName), job.RecipeName);
|
||||||
lotDoc.Add("SpecName", job.EpiLayer); //Key.Layer
|
lotDoc.Add(nameof(Job.SpecName), job.SpecName);
|
||||||
foreach (Item item in job.Items)
|
foreach (Item item in job.Items)
|
||||||
{
|
{
|
||||||
itemDoc = new IfxDoc();
|
itemDoc = new IfxDoc();
|
||||||
|
@ -53,27 +53,22 @@ public class Job : LoggingUnitTesting, IDisposable
|
|||||||
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "21");
|
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "21");
|
||||||
Assert.IsTrue(job.LotName == "123456");
|
Assert.IsTrue(job.LotName == "123456");
|
||||||
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4609");
|
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4609");
|
||||||
Assert.IsTrue(job.EpiLayer == "1");
|
|
||||||
job = new(conn, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"-544481-\", \"Recipe\": \"Recipe\"}");
|
job = new(conn, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"-544481-\", \"Recipe\": \"Recipe\"}");
|
||||||
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "51");
|
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "51");
|
||||||
Assert.IsTrue(job.LotName == "544481");
|
Assert.IsTrue(job.LotName == "544481");
|
||||||
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5158");
|
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5158");
|
||||||
Assert.IsTrue(job.EpiLayer == "1");
|
|
||||||
job = new(conn, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-544481-0000\", \"Recipe\": \"Recipe\"}");
|
job = new(conn, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-544481-0000\", \"Recipe\": \"Recipe\"}");
|
||||||
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "51");
|
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "51");
|
||||||
Assert.IsTrue(job.LotName == "544481");
|
Assert.IsTrue(job.LotName == "544481");
|
||||||
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5158");
|
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5158");
|
||||||
Assert.IsTrue(job.EpiLayer == "1");
|
|
||||||
job = new(conn, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"37\", \"Recipe\": \"Recipe\"}");
|
job = new(conn, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"37\", \"Recipe\": \"Recipe\"}");
|
||||||
Assert.IsTrue(job.ProcessType == "37");
|
Assert.IsTrue(job.ProcessType == "37");
|
||||||
Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); // == "549918");
|
Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); // == "549918");
|
||||||
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5101");
|
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "5101");
|
||||||
Assert.IsTrue(job.EpiLayer == "1");
|
|
||||||
job = new(conn, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-o171308.1.51-0000\", \"Recipe\": \"Recipe\", \"Slot\": \"11\"}");
|
job = new(conn, string.Empty, "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-o171308.1.51-0000\", \"Recipe\": \"Recipe\", \"Slot\": \"11\"}");
|
||||||
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "54");
|
Assert.IsTrue(!string.IsNullOrEmpty(job.ProcessType)); // == "54");
|
||||||
Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); // == "547000");
|
Assert.IsTrue(!string.IsNullOrEmpty(job.LotName)); // == "547000");
|
||||||
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4445");
|
Assert.IsTrue(!string.IsNullOrEmpty(job.ProductName)); // == "4445");
|
||||||
Assert.IsTrue(job.EpiLayer == "1");
|
|
||||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user