MET08DDUPSP1TBI - v2.43.0 - SPC and APC Bug Fix
This commit is contained in:
@ -110,7 +110,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
return results;
|
||||
}
|
||||
|
||||
private Tuple<string, string> GetLines(List<txt.Description> descriptions)
|
||||
internal static Tuple<string, string> GetLines(Logistics logistics, List<txt.Description> descriptions)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
char del = '\t';
|
||||
@ -157,7 +157,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
Append(x.DcnAllMax).Append(del). // 040 - Max Sum of defects
|
||||
Append(x.DcnAllMin).Append(del). // 041 - Min Sum of Defects
|
||||
Append(string.Empty).Append(del). // 042 -
|
||||
Append(_Logistics.MesEntity).Append(del). // 043 -
|
||||
Append(logistics.MesEntity).Append(del). // 043 -
|
||||
Append(x.DcnAreaMean).Append(del). // 044 - DCN MM2
|
||||
AppendLine();
|
||||
return new Tuple<string, string>(result.ToString(), x.Date);
|
||||
@ -165,8 +165,6 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
|
||||
private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, List<txt.Description> descriptions, Test[] tests)
|
||||
{
|
||||
if (reportFullPath is null)
|
||||
{ }
|
||||
if (dateTime == DateTime.MinValue)
|
||||
{ }
|
||||
if (!tests.Any())
|
||||
@ -174,21 +172,21 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
else
|
||||
{
|
||||
bool isDummyRun = false;
|
||||
string successDirectory = string.Empty;
|
||||
Tuple<string, string> lines = GetLines(descriptions);
|
||||
Tuple<string, string> lines = GetLines(_Logistics, descriptions);
|
||||
string check = lines.Item1.Replace(lines.Item2, "$Date$");
|
||||
ScopeInfo scopeInfo = new(tests[0], _OpenInsightFilePattern);
|
||||
List<(Shared.Properties.IScopeInfo, string)> tuples = new();
|
||||
if (string.IsNullOrEmpty(_LastLines) || check != _LastLines)
|
||||
tuples.Add(new(scopeInfo, lines.Item1));
|
||||
_LastLines = check;
|
||||
string[] segments = Path.GetFileNameWithoutExtension(reportFullPath).Split('_');
|
||||
string duplicateDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation)), @"\Data");
|
||||
if (segments.Length > 2)
|
||||
duplicateDirectory = string.Concat(duplicateDirectory, @"-", segments[2]);
|
||||
string successDirectory = _FileConnectorConfiguration.AlternateTargetFolder;
|
||||
string parentParent = GetParentParent(_FileConnectorConfiguration.SourceFileLocation);
|
||||
if (parentParent.Contains(_CellInstanceName))
|
||||
parentParent = Path.GetDirectoryName(parentParent);
|
||||
string duplicateDirectory = Path.Combine(parentParent, "Data");
|
||||
if (!Directory.Exists(duplicateDirectory))
|
||||
_ = Directory.CreateDirectory(duplicateDirectory);
|
||||
string duplicateFile = string.Concat(duplicateDirectory, @"\", Path.GetFileName(reportFullPath));
|
||||
string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath));
|
||||
WaitForFileConsumption(dateTime, isDummyRun, successDirectory, duplicateDirectory, tuples, duplicateFile);
|
||||
}
|
||||
}
|
||||
@ -202,9 +200,9 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
||||
List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements);
|
||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||
SaveOpenInsightFile(reportFullPath, dateTime, descriptions, tests);
|
||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||
return results;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user