From 1aa0e9affa8c79242dc800b751d52148571910d6 Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Thu, 23 Mar 2023 10:48:57 -0700 Subject: [PATCH] Wrong job name, added slot and ToLocalTime() --- Adaptation/FileHandlers/OpenInsight/FileRead.cs | 3 ++- Adaptation/FileHandlers/OpenInsight/FromIQS.cs | 6 +++--- Adaptation/FileHandlers/SECS/Description.cs | 12 +++++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Adaptation/FileHandlers/OpenInsight/FileRead.cs b/Adaptation/FileHandlers/OpenInsight/FileRead.cs index db872b2..bbcc52c 100644 --- a/Adaptation/FileHandlers/OpenInsight/FileRead.cs +++ b/Adaptation/FileHandlers/OpenInsight/FileRead.cs @@ -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(); } diff --git a/Adaptation/FileHandlers/OpenInsight/FromIQS.cs b/Adaptation/FileHandlers/OpenInsight/FromIQS.cs index d1026f1..d433339 100644 --- a/Adaptation/FileHandlers/OpenInsight/FromIQS.cs +++ b/Adaptation/FileHandlers/OpenInsight/FromIQS.cs @@ -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); diff --git a/Adaptation/FileHandlers/SECS/Description.cs b/Adaptation/FileHandlers/SECS/Description.cs index 5caa8ac..215423b 100644 --- a/Adaptation/FileHandlers/SECS/Description.cs +++ b/Adaptation/FileHandlers/SECS/Description.cs @@ -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.GetDescriptions(IFileRead fileRead, Logistics logistics, List 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"; } \ No newline at end of file