UniqueId replacement for attachments

Write input PDSF in output after EOF

GetPropertyValue for MoveMatchingFiles

MoveMatchingFile

ProcessDataStandardFormat over Tuple

MoveMatchingFiles to use ProcessDataStandardFormatMapping

MID Logic
This commit is contained in:
2025-04-14 10:00:36 -07:00
parent 4d41e545b3
commit 5a3469baa1
22 changed files with 2027 additions and 1463 deletions

View File

@ -84,12 +84,18 @@ public partial class Job
else
common = Get(input);
}
if (IsValid(common.RDSNumber))
bool isValid = IsValid(common.RDSNumber);
if (isValid)
commonB = GetWithValidRDS(lsl2SQLConnectionString, common.Layer, common.PSN, common.RDSNumber, common.ReactorNumber, common.Zone);
else if (workOrder.IsWorkOrder || common.RDSNumber.HasValue)
commonB = Get(lsl2SQLConnectionString, common.Layer, common.PSN, common.ReactorNumber, workOrder.SlotNumber, workOrder.WorkOrderNumber, workOrder.WorkOrderCassette, common.Zone);
else
commonB = new(hyphen, hyphen, common.RDSNumber, common.PSN, common.ReactorNumber, hyphen);
commonB = new(comment: hyphen,
layer: hyphen,
rdsNumber: common.RDSNumber,
psn: common.PSN,
reactorNumber: common.ReactorNumber,
zone: hyphen);
Qty = "1";
Status = hyphen; // INFO
CreationUser = hyphen; // ?
@ -107,7 +113,7 @@ public partial class Job
ProductName = !string.IsNullOrEmpty(commonB.PSN) ? commonB.PSN : hyphen; // PRODUCT
ProcessSpecName = !string.IsNullOrEmpty(commonB.Zone) ? commonB.Zone : hyphen; // WAFER_POS
BasicType = !string.IsNullOrEmpty(commonB.Comment) ? commonB.Comment : hyphen; // BASIC_TYPE
LotName = commonB.RDSNumber is not null ? commonB.RDSNumber.Value.ToString() : hyphen; // MID
LotName = commonB.RDSNumber is not null ? commonB.RDSNumber.Value.ToString() : input.MID; // MID
ProcessType = commonB.ReactorNumber is not null ? commonB.ReactorNumber.Value.ToString() : hyphen; // PROCESS_JOBID
Items.Add(new Item { Name = "0", Type = "NA", Number = (0 + 1).ToString(), Qty = "1", CarrierName = hyphen });
}
@ -237,9 +243,10 @@ public partial class Job
{
string? psn;
string? rds;
int rdsCheck;
string? zone;
int rdsNumber;
string? layer;
int? rdsNumber;
string? reactor;
string? employee;
int? reactorNumber;
@ -250,11 +257,9 @@ public partial class Job
string[] segments = mid.Split(new char[] { '-' });
// bool hasRDS = Regex.IsMatch(mid, "[-]?([QP][0-9]{4,}|[0-9]{5,})[-]?");
(reactor, rds) = GetReactorAndRDS(input.MID, mid, segments);
if (string.IsNullOrEmpty(rds))
rdsNumber = 0;
else
_ = int.TryParse(rds, out rdsNumber);
if (IsInvalid(rdsNumber) || !int.TryParse(reactor, out int reactorCheck))
rdsNumber = string.IsNullOrEmpty(rds) || !int.TryParse(rds, out rdsCheck) ? null : rdsCheck;
bool isInvalid = IsInvalid(rdsNumber);
if (isInvalid || !int.TryParse(reactor, out int reactorCheck))
{
psn = null;
zone = null;
@ -597,7 +602,11 @@ public partial class Job
string comment;
const int zero = 0;
const string hyphen = "-";
string commandText = GetCommandText(rds: null, workOrderNumber, workOrderCassette, slotNumber, reactorNumber);
string commandText = GetCommandText(rds: null,
workOrderNumber: workOrderNumber,
workOrderCassette: workOrderCassette,
slot: slotNumber,
reactor: reactorNumber);
string json = GetRunJson(lsl2SQLConnectionString, commandText);
if (string.IsNullOrEmpty(json))
{
@ -640,7 +649,12 @@ public partial class Job
comment = $"{loadLockSideFull} - {runs[zero].ReactorType}";
}
}
return new(comment, layer, rdsNumber, psn, reactorNumber, zone);
return new(comment: comment,
layer: layer,
rdsNumber: rdsNumber,
psn: psn,
reactorNumber: reactorNumber,
zone: zone);
}
private static CommonB GetWithValidRDS(string lsl2SQLConnectionString, string layer, string psn, int? rdsNumber, int? reactorNumber, string zone)
@ -648,7 +662,11 @@ public partial class Job
string comment;
const int zero = 0;
const string hyphen = "-";
string commandText = GetCommandText(rdsNumber, workOrderNumber: null, workOrderCassette: null, slot: null, reactor: null);
string commandText = GetCommandText(rds: rdsNumber,
workOrderNumber: null,
workOrderCassette: null,
slot: null,
reactor: null);
string json = GetRunJson(lsl2SQLConnectionString, commandText);
if (string.IsNullOrEmpty(json))
{
@ -686,7 +704,12 @@ public partial class Job
comment = $"{loadLockSideFull} - {runs[zero].ReactorType}";
}
}
return new(comment, layer, rdsNumber, psn, reactorNumber, zone);
return new(comment: comment,
layer: layer,
rdsNumber: rdsNumber,
psn: psn,
reactorNumber: reactorNumber,
zone: zone);
}
}