From 6c9d81a3ec6e6136b2d1b055a2ad6476b19844c8 Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Mon, 28 Apr 2025 13:46:01 -0700 Subject: [PATCH] InterceptIQS _Logistics.Logistics1 over processDataStandardFormat.Logistics Version>2.59.0 0) ReWriteFile(reportFullPath, dateTime); - results = new Tuple>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), Array.Empty(), Array.Empty(), new List()); + results = new Tuple>(string.Join(Environment.NewLine, _Logistics.Logistics1), Array.Empty(), Array.Empty(), new List()); return results; } diff --git a/Adaptation/Shared/FileRead.cs b/Adaptation/Shared/FileRead.cs index 947734c..f50e453 100644 --- a/Adaptation/Shared/FileRead.cs +++ b/Adaptation/Shared/FileRead.cs @@ -377,17 +377,25 @@ public class FileRead : Properties.IFileRead internal string[] GetInProcessDirectory(string jobIdDirectory) { - string[] results; + List results = new(); if (!_IsEAFHosted) - results = new string[] { jobIdDirectory }; + results = new string[] { jobIdDirectory }.ToList(); else { + string[] files; string logisticsSequence = _Logistics.Sequence.ToString(); - results = Directory.GetDirectories(jobIdDirectory, $"*{logisticsSequence}*", SearchOption.TopDirectoryOnly); + string[] directories = Directory.GetDirectories(jobIdDirectory, $"*{logisticsSequence}*", SearchOption.TopDirectoryOnly); + foreach (string directory in directories) + { + files = Directory.GetFiles(directory, "*", SearchOption.TopDirectoryOnly); + if (files.Length == 0) + continue; + results.Add(directory); + } } - if ((results is null) || results.Length != 1) + if ((results is null) || results.Count != 1) throw new Exception("Didn't find directory by logistics sequence"); - return results; + return results.ToArray(); } protected static string[] GetMatches(FileConnectorConfiguration fileConnectorConfiguration) diff --git a/Adaptation/Shared/ProcessDataStandardFormat.cs b/Adaptation/Shared/ProcessDataStandardFormat.cs index 62fb6a3..60407cd 100644 --- a/Adaptation/Shared/ProcessDataStandardFormat.cs +++ b/Adaptation/Shared/ProcessDataStandardFormat.cs @@ -62,7 +62,7 @@ internal class ProcessDataStandardFormat GetString(SearchFor.Archive, addSpaces, separator); internal static ProcessDataStandardFormat GetEmpty() => - new(new(Array.Empty()), new(Array.Empty()), new(Array.Empty()), new(Array.Empty()), null, new(Array.Empty()), null); + new(new(Array.Empty()), new(Array.Empty()), new(Array.Empty()), new(Array.Empty()), null, new(new string[] { "LOGISTICS_1" }), null); internal static List PDSFToFixedWidth(string reportFullPath) { diff --git a/MET08RESIHGCV.csproj b/MET08RESIHGCV.csproj index d4ba763..0d561fd 100644 --- a/MET08RESIHGCV.csproj +++ b/MET08RESIHGCV.csproj @@ -182,7 +182,7 @@ 7.2.4630.5 - 2.52.0 + 2.59.0 1.1.1