Bug fix - GetHeaderId

This commit is contained in:
2024-05-22 18:01:33 -07:00
parent a27686684d
commit 9338f54fe7
4 changed files with 31 additions and 17 deletions

View File

@ -77,13 +77,13 @@ public class WSRequest
throw new Exception();
}
internal static long GetHeaderId(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, DateTime dateTime, int weekOfYear, string json, List<json.Description> descriptions)
internal static long GetHeaderId(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string openInsightMetrologyViewerFileShare, int weekOfYear, string json, List<json.Description> descriptions)
{
long result;
if (string.IsNullOrEmpty(json))
{
WSRequest wsRequest = new(fileRead, logistics, descriptions);
string directory = Path.Combine(openInsightMetrologyViewerAPI, dateTime.Year.ToString(), $"WW{weekOfYear:00}");
string directory = Path.Combine(openInsightMetrologyViewerFileShare, logistics.DateTimeFromSequence.Year.ToString(), $"WW{weekOfYear:00}");
(json, WS.Results wsResults) = WS.SendData(openInsightMetrologyViewerAPI, logistics.Sequence, directory, wsRequest);
if (!wsResults.Success)
throw new Exception(wsResults.ToString());