Wrong job name, added slot and ToLocalTime()

This commit is contained in:
Mike Phares 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);

View File

@ -14,13 +14,14 @@ public class Description : IDescription, Shared.Properties.IDescription
public int Count { get; set; }
public int Index { get; set; }
public string MesEntity { get; set; }
public string Date { get; set; }
[JsonPropertyName("CURRENT_RECIPE_NAME")]
public string PSN { get; set; } // Part
[JsonPropertyName("LotID")]
public string Reactor { get; set; } // Process
public string MesEntity { get; set; }
[JsonPropertyName("ID")]
public string RDS { get; set; } // Lot
@ -31,7 +32,8 @@ public class Description : IDescription, Shared.Properties.IDescription
[JsonPropertyName("SAMPLETYPE")]
public string Employee { get; set; } // Item descriptor
public string Date { get; set; }
[JsonPropertyName("SLOT_NUMBER")]
public string SlotNumber { get; set; } // Item descriptor
string IDescription.GetEventDescription() => "File Has been read and parsed";
@ -68,6 +70,6 @@ public class Description : IDescription, Shared.Properties.IDescription
List<IDescription> IDescription.GetDescriptions(IFileRead fileRead, Logistics logistics, List<Test> tests, IProcessData iProcessData) =>
throw new NotImplementedException();
internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt";
internal static string GetDateFormat() => "MM/dd/yyyy HH:mm:ss";
}