Wrong job name, added slot and ToLocalTime()

This commit is contained in:
2023-03-23 10:48:57 -07:00
parent 36291ae434
commit 1aa0e9affa
3 changed files with 12 additions and 9 deletions

View File

@ -126,7 +126,8 @@ public class FileRead : Shared.FileRead, IFileRead
.Append(logistics.MesEntity).Append(del)
.Append(x.RDS).Append(del)
.Append(x.Recipe).Append(del)
.Append(x.Employee).Append(del);
.Append(x.Employee).Append(del)
.Append(x.SlotNumber).Append(del);
return results.ToString();
}

View File

@ -55,7 +55,7 @@ public class FromIQS
_ = result
.Append(" and rd.f_name = '").Append(description.Reactor).AppendLine("' ")
.Append(" and pd.f_name = '").Append(description.PSN).AppendLine("' ")
.AppendLine(" and jd.f_name in ('TENCOR1', 'TENCOR2', 'TENCOR3') ")
.AppendLine(" and jd.f_name in ('SPV01') ")
.Append(" and jd.f_name = '").Append(logistics.MesEntity).AppendLine("' ")
.Append(" and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '").Append(dateTime).AppendLine("' ")
.AppendLine(" for json path ");
@ -82,9 +82,9 @@ public class FromIQS
long? result = null;
string dateFormat = SECS.Description.GetDateFormat();
if (DateTime.TryParseExact(description.Date, dateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime dateTimeParsed))
dateTime = dateTimeParsed.ToString("yyyy-MM-dd HH:mm:ss");
dateTime = dateTimeParsed.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss");
else if (DateTime.TryParse(description.Date, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTimeParsed))
dateTime = dateTimeParsed.ToString("yyyy-MM-dd HH:mm:ss");
dateTime = dateTimeParsed.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss");
else
dateTime = logistics.DateTimeFromSequence.ToString("yyyy-MM-dd HH:mm:ss");
commandText = GetCommandText(logistics, description, dateTime, subGroupId: null);