MET08DDUPSP1TBI - v2.43.4 - MeanThickness

This commit is contained in:
2022-09-13 08:15:25 -07:00
parent 65b4ae1463
commit 67f10dbc2e
3 changed files with 19 additions and 12 deletions

View File

@ -61,7 +61,7 @@ public class Job
Equipment = input.MesEntity;
JobName = DateTime.Ticks.ToString();
if (!IsValid(rds))
(basicType, epiLayer, lotName, psn, reactor) = Get(lsl2SQLConnectionString, psn, rds, reactor);
(basicType, epiLayer, lotName, psn, reactor) = Get(lsl2SQLConnectionString, input, psn, rds, reactor);
else
{
basicType = hyphen;
@ -222,7 +222,7 @@ public class Job
return result;
}
private static (string, string, string, string, string) Get(string lsl2SQLConnectionString, string psn, int rds, string reactor)
private static (string, string, string, string, string) Get(string lsl2SQLConnectionString, Input input, string psn, int rds, string reactor)
{
string lotName;
string epiLayer;
@ -267,13 +267,19 @@ public class Job
epiLayer = "1";
else
{
epiLayer = runs[zero].EpiLayer;
foreach (Run run in runs)
if (string.IsNullOrEmpty(input.MeanThickness) || !double.TryParse(input.MeanThickness, out double meanThickness))
epiLayer = runs[zero].EpiLayer;
else
{
if (run.EpiThickMin is null || run.EpiThickMax is null)
continue;
if (run.EpiResMin is null || run.EpiResMax is null)
continue;
epiLayer = hyphen;
foreach (Run run in runs)
{
if (run.EpiThickMin is null || run.EpiThickMax is null)
continue;
if (meanThickness < run.EpiThickMin || meanThickness > run.EpiThickMax)
continue;
epiLayer = run.EpiLayer;
}
}
}
}