Enhance CommonB and Run classes to include ExportControl and ReactorMode properties; update Job class to utilize new fields for improved data handling
This commit is contained in:
@ -10,18 +10,24 @@ public class CommonB
|
||||
public string? PSN { get; }
|
||||
public int? ReactorNumber { get; }
|
||||
public string? Zone { get; }
|
||||
public string? ExportControl { get; }
|
||||
public string? ReactorMode { get; }
|
||||
|
||||
public CommonB(string? layer,
|
||||
int? rdsNumber,
|
||||
string? psn,
|
||||
int? reactorNumber,
|
||||
string? zone)
|
||||
string? zone,
|
||||
string? exportControl,
|
||||
string? reactorMode)
|
||||
{
|
||||
Layer = layer;
|
||||
RDSNumber = rdsNumber;
|
||||
PSN = psn;
|
||||
ReactorNumber = reactorNumber;
|
||||
Zone = zone;
|
||||
ExportControl = exportControl;
|
||||
ReactorMode = reactorMode;
|
||||
}
|
||||
|
||||
internal static CommonB Get(Common common, RunDataSheetRoot? runDataSheetRoot, Run[]? runs)
|
||||
@ -31,9 +37,13 @@ public class CommonB
|
||||
string? zone;
|
||||
string? layer;
|
||||
int? reactorNumber;
|
||||
string? reactorMode;
|
||||
string? exportControl;
|
||||
if (runs is null || runs.Length == 0)
|
||||
{
|
||||
reactorMode = null;
|
||||
zone = common.Zone;
|
||||
exportControl = null;
|
||||
layer = common.Layer;
|
||||
if (runDataSheetRoot?.RunDataSheet is null)
|
||||
{
|
||||
@ -50,6 +60,8 @@ public class CommonB
|
||||
{
|
||||
const int zero = 0;
|
||||
Run run = runs[zero];
|
||||
reactorMode = run.ReactorMode;
|
||||
exportControl = run.ExportControl;
|
||||
if (runDataSheetRoot?.RunDataSheet is not null)
|
||||
{
|
||||
psn = runDataSheetRoot?.RunDataSheet.PSN.ToString();
|
||||
@ -67,7 +79,9 @@ public class CommonB
|
||||
rdsNumber: common.RDSNumber,
|
||||
psn: psn,
|
||||
reactorNumber: reactorNumber,
|
||||
zone: zone);
|
||||
zone: zone,
|
||||
exportControl: exportControl,
|
||||
reactorMode: reactorMode);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ -119,11 +119,9 @@ public partial class Job
|
||||
basicType = runCount is null ? hyphen : (runCount + 1).ToString();
|
||||
}
|
||||
Qty = "1";
|
||||
Status = hyphen; // INFO
|
||||
CreationUser = hyphen; // ?
|
||||
LotState = hyphen; // LAYER2
|
||||
Equipment = input.MesEntity; // ?
|
||||
PackageName = hyphen; // WAFER_ID
|
||||
Qty2 = input.Sequence; // SEQUENCE
|
||||
RecipeName = input.Recipe; // PPID
|
||||
BasicType = basicType; // BASIC_TYPE
|
||||
@ -133,8 +131,10 @@ public partial class Job
|
||||
AutomationMode = string.Concat(DateTime.Ticks, ".", input.MesEntity); // ?
|
||||
SpecName = !string.IsNullOrEmpty(commonB.Layer) ? commonB.Layer : hyphen; // LAYER
|
||||
ProductName = !string.IsNullOrEmpty(commonB.PSN) ? commonB.PSN : hyphen; // PRODUCT
|
||||
Status = !string.IsNullOrEmpty(commonB.ReactorMode) ? commonB.ReactorMode : hyphen; // INFO
|
||||
ProcessSpecName = !string.IsNullOrEmpty(commonB.Zone) ? commonB.Zone : hyphen; // WAFER_POS
|
||||
LotName = commonB.RDSNumber is not null ? commonB.RDSNumber.Value.ToString() : input.MID; // MID
|
||||
PackageName = !string.IsNullOrEmpty(commonB.ExportControl) ? commonB.ExportControl : hyphen; // WAFER_ID
|
||||
LastUpdateUser = string.IsNullOrEmpty(runDataSheetRoot?.Json) ? "{}" : runDataSheetRoot.Json; // NULL_DATA
|
||||
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 });
|
||||
@ -597,6 +597,21 @@ public partial class Job
|
||||
results.Add($" and wm.in_cass_no = {workOrderCassetteValue}");
|
||||
results.Add($" and wm.slot_no = {slotValue}");
|
||||
results.Add(" ) zone ");
|
||||
results.Add(" , ( ");
|
||||
results.Add(" select top 1 case when ep.export_control = 1 then 'true' else 'false' end ");
|
||||
results.Add(" from lsl2sql.dbo.epi_part ep ");
|
||||
results.Add(" where ep.epi_pn = rr.part_no ");
|
||||
results.Add(" ) export_control ");
|
||||
results.Add(" , ( ");
|
||||
results.Add(" select top 1 rm.mode ");
|
||||
results.Add(" from lsl2sql.dbo.react_mode rm ");
|
||||
results.Add(" where rm.react_no = rr.reactor ");
|
||||
results.Add(" and rm.start_dtm = ( ");
|
||||
results.Add(" select max(start_dtm) ");
|
||||
results.Add(" from lsl2sql.dbo.react_mode rm_b ");
|
||||
results.Add(" where rm_b.react_no = rr.reactor ");
|
||||
results.Add(" ) ");
|
||||
results.Add(" ) react_mode ");
|
||||
results.Add(" from lsl2sql.dbo.react_run rr ");
|
||||
results.Add($" where rr.rds_no = {rdsValue}");
|
||||
results.Add($" and rr.enter_dtm > '{enteredDateTimeFilter:yyyy-MM-dd} 00:00:00.000' ");
|
||||
@ -618,6 +633,21 @@ public partial class Job
|
||||
results.Add($" and wm.in_cass_no = {workOrderCassetteValue}");
|
||||
results.Add($" and wm.slot_no = {slotValue}");
|
||||
results.Add(" ) zone ");
|
||||
results.Add(" , ( ");
|
||||
results.Add(" select top 1 case when ep.export_control = 1 then 'true' else 'false' end ");
|
||||
results.Add(" from lsl2sql.dbo.epi_part ep ");
|
||||
results.Add(" where ep.epi_pn = rr.part_no ");
|
||||
results.Add(" ) export_control ");
|
||||
results.Add(" , ( ");
|
||||
results.Add(" select top 1 rm.mode ");
|
||||
results.Add(" from lsl2sql.dbo.react_mode rm ");
|
||||
results.Add(" where rm.react_no = rr.reactor ");
|
||||
results.Add(" and rm.start_dtm = ( ");
|
||||
results.Add(" select max(start_dtm) ");
|
||||
results.Add(" from lsl2sql.dbo.react_mode rm_b ");
|
||||
results.Add(" where rm_b.react_no = rr.reactor ");
|
||||
results.Add(" ) ");
|
||||
results.Add(" ) react_mode ");
|
||||
results.Add(" from lsl2sql.dbo.react_run rr ");
|
||||
results.Add(" where rr.rds_no = ( ");
|
||||
results.Add(" select max(wm.rds) ");
|
||||
@ -644,6 +674,21 @@ public partial class Job
|
||||
results.Add($" and wm.in_cass_no = {workOrderCassetteValue}");
|
||||
results.Add($" and wm.slot_no = {slotValue}");
|
||||
results.Add(" ) zone ");
|
||||
results.Add(" , ( ");
|
||||
results.Add(" select top 1 case when ep.export_control = 1 then 'true' else 'false' end ");
|
||||
results.Add(" from lsl2sql.dbo.epi_part ep ");
|
||||
results.Add(" where ep.epi_pn = rr.part_no ");
|
||||
results.Add(" ) export_control ");
|
||||
results.Add(" , ( ");
|
||||
results.Add(" select top 1 rm.mode ");
|
||||
results.Add(" from lsl2sql.dbo.react_mode rm ");
|
||||
results.Add(" where rm.react_no = rr.reactor ");
|
||||
results.Add(" and rm.start_dtm = ( ");
|
||||
results.Add(" select max(start_dtm) ");
|
||||
results.Add(" from lsl2sql.dbo.react_mode rm_b ");
|
||||
results.Add(" where rm_b.react_no = rr.reactor ");
|
||||
results.Add(" ) ");
|
||||
results.Add(" ) react_mode ");
|
||||
results.Add(" from lsl2sql.dbo.react_run rr ");
|
||||
results.Add(" where rr.rds_no = ( ");
|
||||
results.Add(" select max(qa.rds_no) ");
|
||||
|
||||
@ -74,4 +74,10 @@ public class Run
|
||||
[JsonPropertyName("zone")]
|
||||
public string Zone { get; set; }
|
||||
|
||||
[JsonPropertyName("export_control")]
|
||||
public string ExportControl { get; set; }
|
||||
|
||||
[JsonPropertyName("react_mode")]
|
||||
public string ReactorMode { get; set; }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user