Add joins for ReactorMode and Description in Job class query for enhanced data retrieval

This commit is contained in:
2025-12-11 15:28:55 -07:00
parent ed8930bd48
commit c401562813

View File

@ -113,10 +113,12 @@ public partial class Job
int? runCount;
string commandText = GetCommandText(commonB, jobNames);
try
{ runCount = GetScalar(iqsSQLConnectionString, commandText); }
{
runCount = GetScalar(iqsSQLConnectionString, commandText);
basicType = runCount is null ? "1" : (runCount + 1).ToString();
}
catch (Exception)
{ runCount = null; }
basicType = runCount is null ? hyphen : (runCount + 1).ToString();
{ basicType = hyphen; }
}
Qty = "1";
CreationUser = hyphen; // ?
@ -828,10 +830,16 @@ public partial class Job
results.Add(" on se.f_part = pd.f_part ");
results.Add(" join [spcepiworld].[dbo].[test_dat] td ");
results.Add(" on se.f_test = td.f_test ");
results.Add(" join [spcepiworld].[dbo].[sgrp_dsc] sd ");
results.Add(" on se.f_sgrp = sd.f_sgrp ");
results.Add(" join [spcepiworld].[dbo].[desc_dat] ds ");
results.Add(" on sd.f_desc = ds.f_desc ");
results.Add(" where se.f_flag = 0 ");
results.Add($" and pl.f_name = '{commonB.RDSNumber}' ");
results.Add($" and pr.f_name = '{commonB.ReactorNumber}' ");
results.Add(" and sd.f_dsgp = 1765472498 /* Reactor Mode */ ");
results.Add($" and pd.f_name = '{commonB.PSN}' ");
results.Add($" and pl.f_name = '{commonB.RDSNumber}' ");
results.Add($" and ds.f_name = '{commonB.ReactorMode}' ");
results.Add($" and pr.f_name = '{commonB.ReactorNumber}' ");
results.Add($" and jd.f_name in ({jobNames}) ");
results.Add(" group by se.f_sgrp ");
results.Add(" , se.f_sgtm ");