Add Hyphen

Dual write PDSF for Metrology Viewer
Version Error Message
Tests Passed
Added Climatec to Test.cs
GetJobIdDirectory
Remove and
5-Other-Small
NETFRAMEWORK
This commit is contained in:
2024-05-16 12:14:05 -07:00
parent 5caa336f8f
commit 4c513d6e7e
81 changed files with 1944 additions and 332 deletions

View File

@ -31,8 +31,8 @@ public class FileRead : Shared.FileRead, IFileRead
throw new Exception(cellInstanceConnectionName);
if (!_IsDuplicator)
throw new Exception(cellInstanceConnectionName);
_OpenInsightMetrologyViewerFileShare = @"\\mesfs.infineon.com\EC_Metrology_Si\MetrologyAttachments\StratusBioRadRunHeader_";
_OpenInsightMetrologyViewerAPI = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.MetrologyViewerAPI");
_OpenInsightMetrologyViewerFileShare = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.MetrologyViewerFileShare");
}
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception)
@ -112,16 +112,15 @@ public class FileRead : Shared.FileRead, IFileRead
private void SendData(string reportFullPath, DateTime dateTime, List<Stratus.Description> descriptions)
{
string checkDirectory;
WSRequest wsRequest = new(this, _Logistics, descriptions);
int weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
string directory = Path.Combine(_OpenInsightMetrologyViewerFileShare, dateTime.Year.ToString(), $"WW{weekOfYear:00}", _Logistics.Sequence.ToString());
if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory);
string fullPath = Path.Combine(directory, Path.GetFileName(reportFullPath));
if (File.Exists(fullPath))
File.Delete(fullPath);
File.Copy(reportFullPath, fullPath);
WSRequest wsRequest = new(this, _Logistics, descriptions, fullPath);
(string json, WS.Results wsResults) = WS.SendData(_OpenInsightMetrologyViewerAPI, wsRequest);
string directory = Path.Combine(_OpenInsightMetrologyViewerFileShare, dateTime.Year.ToString(), $"WW{weekOfYear:00}");
checkDirectory = Path.Combine(directory, _Logistics.Sequence.ToString());
if (!Directory.Exists(checkDirectory))
_ = Directory.CreateDirectory(checkDirectory);
File.Copy(reportFullPath, Path.Combine(checkDirectory, Path.GetFileName(reportFullPath)), overwrite: true);
(string jsonResults, WS.Results wsResults) = WS.SendData(_OpenInsightMetrologyViewerAPI, _Logistics.Sequence, directory, wsRequest);
if (!wsResults.Success)
throw new Exception(wsResults.ToString());
_Log.Debug(wsResults.HeaderID);
@ -129,8 +128,12 @@ public class FileRead : Shared.FileRead, IFileRead
{
if (!_StaticRuns.ContainsKey(_Logistics.Sequence))
_StaticRuns.Add(_Logistics.Sequence, new());
_StaticRuns[_Logistics.Sequence].Add(json);
_StaticRuns[_Logistics.Sequence].Add(jsonResults);
}
checkDirectory = Path.Combine(directory, $"-{wsResults.HeaderID}");
if (!Directory.Exists(checkDirectory))
_ = Directory.CreateDirectory(checkDirectory);
File.Copy(reportFullPath, Path.Combine(checkDirectory, Path.GetFileName(reportFullPath)), overwrite: true);
}
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)