[spcepiworld].[dbo].[evnt_inf]

This commit is contained in:
2023-02-23 11:05:02 -07:00
parent 21da025c24
commit 7bad8c9270
3 changed files with 19 additions and 8 deletions

View File

@ -29,7 +29,12 @@ public class FromIQS
.AppendLine(" pl.f_name pl_name, ")
.AppendLine(" pd.f_name pd_name, ")
.AppendLine(" td.f_test td_test, ")
.AppendLine(" td.f_name td_name ")
.AppendLine(" td.f_name td_name, ")
.AppendLine(" (select count(ev.f_evnt) ")
.AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ")
.AppendLine(" where ev.f_prcs = rd.f_prcs ")
.AppendLine(" and ev.f_part = pd.f_part ")
.AppendLine(" and ev.f_sgtm = se.f_sgtm) ev_count ")
.AppendLine(" from [spcepiworld].[dbo].[sgrp_ext] se ")
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] rd ")
.AppendLine(" on se.f_prcs = rd.f_prcs ")
@ -67,9 +72,10 @@ public class FromIQS
return stringBuilder;
}
internal static (long?, string) GetCommandText(string connectionString, Logistics logistics, txt.Description description, long breakAfter, long preWait)
internal static (long?, int?, string) GetCommandText(string connectionString, Logistics logistics, txt.Description description, long breakAfter, long preWait)
{
string dateTime;
int? count = null;
string commandText;
long? result = null;
string dateFormat = txt.Description.GetDateFormat();
@ -113,10 +119,12 @@ public class FromIQS
{
result = subGroupId;
commandText = GetCommandText(logistics, description, dateTime, subGroupId);
if (jsonProperties.Any() && jsonProperties[10].Name == "ev_count" && int.TryParse(jsonProperties[10].Value.ToString(), out int evCount))
count = evCount;
}
}
}
return new(result, commandText);
return new(result, count, commandText);
}
#nullable disable