MET08THFTIRQS408M - v2.47.0 - Ready to
test ISQ query
This commit is contained in:
@ -16,6 +16,7 @@ namespace Adaptation.FileHandlers.OpenInsight;
|
||||
public class FileRead : Shared.FileRead, IFileRead
|
||||
{
|
||||
|
||||
private readonly string _IqsConnectionString;
|
||||
private readonly string _OpenInsightFilePattern;
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
@ -30,6 +31,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (!_IsDuplicator)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
_IqsConnectionString = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "IQS.ConnectionString");
|
||||
_OpenInsightFilePattern = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.FilePattern");
|
||||
}
|
||||
|
||||
@ -131,8 +133,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, List<QS408M.Description> descriptions, Test[] tests)
|
||||
{
|
||||
bool isDummyRun = false;
|
||||
string lines = GetLines(descriptions);
|
||||
List<(Shared.Properties.IScopeInfo, string)> tuples = new();
|
||||
List<(Shared.Properties.IScopeInfo, string)> collection = new();
|
||||
string successDirectory = _FileConnectorConfiguration.AlternateTargetFolder;
|
||||
string parentParent = GetParentParent(_FileConnectorConfiguration.SourceFileLocation);
|
||||
if (parentParent.Contains(_CellInstanceName))
|
||||
@ -141,13 +142,18 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
if (!Directory.Exists(duplicateDirectory))
|
||||
_ = Directory.CreateDirectory(duplicateDirectory);
|
||||
string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath));
|
||||
if (tests.Any())
|
||||
if (descriptions.Any() && tests.Any())
|
||||
{
|
||||
ScopeInfo scopeInfo = new(tests[0], _OpenInsightFilePattern);
|
||||
string lines = GetLines(descriptions);
|
||||
if (!string.IsNullOrEmpty(lines))
|
||||
tuples.Add(new(scopeInfo, lines));
|
||||
collection.Add(new(new ScopeInfo(tests[0], _OpenInsightFilePattern), lines));
|
||||
_ = FromIQS.GetCommandText(_IqsConnectionString, _Logistics, descriptions[0]);
|
||||
// // string commandText = FromIQS.GetCommandText(_IqsConnectionString, _Logistics, descriptions[0]);
|
||||
// if (!string.IsNullOrEmpty(commandText))
|
||||
// collection.Add(new(new ScopeInfo(tests[0], _OpenInsightFilePattern, extraExtension: "sql"), commandText));
|
||||
}
|
||||
WaitForFileConsumption(dateTime, isDummyRun, successDirectory, duplicateDirectory, tuples, duplicateFile);
|
||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||
WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile);
|
||||
}
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
@ -157,6 +163,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||
SetFileParameterLotIDToLogisticsMID();
|
||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
||||
// List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||
List<QS408M.Description> descriptions = QS408M.ProcessData.GetDescriptions(jsonElements);
|
||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||
|
Reference in New Issue
Block a user