Compare commits
4 Commits
0ed6d17774
...
07-18-b
Author | SHA1 | Date | |
---|---|---|---|
a10c041f60 | |||
823a31e48a | |||
552f0137df | |||
538bd194ae |
3
Adaptation/.vscode/settings.json
vendored
3
Adaptation/.vscode/settings.json
vendored
@ -7,6 +7,7 @@
|
|||||||
"CASS",
|
"CASS",
|
||||||
"CEPIEPSILON",
|
"CEPIEPSILON",
|
||||||
"CUST",
|
"CUST",
|
||||||
|
"DDUPSFS",
|
||||||
"DDUPSP",
|
"DDUPSP",
|
||||||
"EQPT",
|
"EQPT",
|
||||||
"GETJOBS",
|
"GETJOBS",
|
||||||
@ -31,6 +32,8 @@
|
|||||||
"substr",
|
"substr",
|
||||||
"SUSCEPTOR",
|
"SUSCEPTOR",
|
||||||
"targ",
|
"targ",
|
||||||
|
"TENCOR",
|
||||||
|
"THFTIRQS",
|
||||||
"TIBCO",
|
"TIBCO",
|
||||||
"Wafr"
|
"Wafr"
|
||||||
],
|
],
|
||||||
|
@ -128,7 +128,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
FileCopy(reportFullPath, dateTime, descriptions);
|
FileCopy(reportFullPath, dateTime, descriptions);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
MoveArchive(reportFullPath, dateTime);
|
MoveArchive(reportFullPath, dateTime);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,17 +22,21 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
internal class PreWith
|
internal class PreWith
|
||||||
{
|
{
|
||||||
|
|
||||||
internal string MatchingFile { get; private set; }
|
|
||||||
internal string CheckFile { get; private set; }
|
|
||||||
internal string ErrFile { get; private set; }
|
internal string ErrFile { get; private set; }
|
||||||
|
internal string CheckFile { get; private set; }
|
||||||
|
internal string MatchingFile { get; private set; }
|
||||||
internal string CheckDirectory { get; private set; }
|
internal string CheckDirectory { get; private set; }
|
||||||
internal string NoWaitDirectory { get; private set; }
|
internal string NoWaitDirectory { get; private set; }
|
||||||
|
|
||||||
internal PreWith(string matchingFile, string checkFile, string errFile, string checkDirectory, string noWaitDirectory)
|
internal PreWith(string checkDirectory,
|
||||||
|
string checkFile,
|
||||||
|
string errFile,
|
||||||
|
string matchingFile,
|
||||||
|
string noWaitDirectory)
|
||||||
{
|
{
|
||||||
MatchingFile = matchingFile;
|
|
||||||
CheckFile = checkFile;
|
|
||||||
ErrFile = errFile;
|
ErrFile = errFile;
|
||||||
|
CheckFile = checkFile;
|
||||||
|
MatchingFile = matchingFile;
|
||||||
CheckDirectory = checkDirectory;
|
CheckDirectory = checkDirectory;
|
||||||
NoWaitDirectory = noWaitDirectory;
|
NoWaitDirectory = noWaitDirectory;
|
||||||
}
|
}
|
||||||
@ -221,7 +225,11 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (!Directory.Exists(checkDirectory))
|
if (!Directory.Exists(checkDirectory))
|
||||||
_ = Directory.CreateDirectory(checkDirectory);
|
_ = Directory.CreateDirectory(checkDirectory);
|
||||||
noWaitDirectory = Path.Combine(checkDirectory, "NoWaitDirectory");
|
noWaitDirectory = Path.Combine(checkDirectory, "NoWaitDirectory");
|
||||||
preWith = new(pre.MatchingFile, pre.CheckFile, errFile, checkDirectory, noWaitDirectory);
|
preWith = new(checkDirectory: checkDirectory,
|
||||||
|
checkFile: pre.CheckFile,
|
||||||
|
errFile: errFile,
|
||||||
|
matchingFile: pre.MatchingFile,
|
||||||
|
noWaitDirectory: noWaitDirectory);
|
||||||
results.Add(preWith);
|
results.Add(preWith);
|
||||||
}
|
}
|
||||||
return results.AsReadOnly();
|
return results.AsReadOnly();
|
||||||
@ -260,7 +268,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ReadOnlyCollection<Pre> GetPreCollection(int numberLength, string parentDirectory, ReadOnlyCollection<string> matchingFiles)
|
private static ReadOnlyCollection<Pre> GetPreCollection(int numberLength, string parentDirectory, ReadOnlyCollection<string> matchingFiles, bool _)
|
||||||
{
|
{
|
||||||
List<Pre> results = new();
|
List<Pre> results = new();
|
||||||
Pre pre;
|
Pre pre;
|
||||||
@ -275,7 +283,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results.AsReadOnly();
|
return results.AsReadOnly();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MoveCollection(DateTime dateTime, ProcessDataStandardFormat? processDataStandardFormat, ReadOnlyCollection<PreWith> preWithCollection)
|
private void MoveCollection(DateTime dateTime, ProcessDataStandardFormat processDataStandardFormat, ReadOnlyCollection<PreWith> preWithCollection)
|
||||||
{
|
{
|
||||||
ReadOnlyCollection<Post> postCollection = GetPostCollection(dateTime, processDataStandardFormat, preWithCollection);
|
ReadOnlyCollection<Post> postCollection = GetPostCollection(dateTime, processDataStandardFormat, preWithCollection);
|
||||||
if (postCollection.Count != 0)
|
if (postCollection.Count != 0)
|
||||||
@ -294,7 +302,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private ReadOnlyCollection<Post> GetPostCollection(DateTime dateTime, ProcessDataStandardFormat? processDataStandardFormat, ReadOnlyCollection<PreWith> preWithCollection)
|
private ReadOnlyCollection<Post> GetPostCollection(DateTime dateTime, ProcessDataStandardFormat processDataStandardFormat, ReadOnlyCollection<PreWith> preWithCollection)
|
||||||
{
|
{
|
||||||
List<Post> results = new();
|
List<Post> results = new();
|
||||||
Post post;
|
Post post;
|
||||||
@ -303,15 +311,10 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
{
|
{
|
||||||
if (!_IsEAFHosted)
|
if (!_IsEAFHosted)
|
||||||
continue;
|
continue;
|
||||||
if (processDataStandardFormat is null)
|
if (!_StaticRuns.TryGetValue(_Logistics.Sequence, out List<Shared.Metrology.WS.Results>? wsResults))
|
||||||
File.Move(preWith.MatchingFile, preWith.CheckFile);
|
wsResults = null;
|
||||||
else
|
ProcessDataStandardFormat.Write(preWith.CheckFile, processDataStandardFormat, wsResults);
|
||||||
{
|
File.Delete(preWith.MatchingFile);
|
||||||
if (!_StaticRuns.TryGetValue(_Logistics.Sequence, out List<Shared.Metrology.WS.Results>? wsResults))
|
|
||||||
wsResults = null;
|
|
||||||
ProcessDataStandardFormat.Write(preWith.CheckFile, processDataStandardFormat, wsResults);
|
|
||||||
File.Delete(preWith.MatchingFile);
|
|
||||||
}
|
|
||||||
if (Directory.Exists(preWith.NoWaitDirectory))
|
if (Directory.Exists(preWith.NoWaitDirectory))
|
||||||
{
|
{
|
||||||
post = new(preWith.CheckFile, preWith.ErrFile);
|
post = new(preWith.CheckFile, preWith.ErrFile);
|
||||||
@ -345,17 +348,10 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, Array.Empty<Test>(), Array.Empty<JsonElement>(), new List<FileInfo>());
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, Array.Empty<Test>(), Array.Empty<JsonElement>(), new List<FileInfo>());
|
||||||
ProcessDataStandardFormat? processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, _ProcessDataStandardFormatMapping);
|
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, _ProcessDataStandardFormatMapping);
|
||||||
if (processDataStandardFormat is not null)
|
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
||||||
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
if (!_IsEAFHosted)
|
||||||
else
|
ProcessDataStandardFormat.Write("../../.pdsf", processDataStandardFormat, wsResults: null);
|
||||||
{
|
|
||||||
processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
|
|
||||||
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
|
||||||
processDataStandardFormat = null;
|
|
||||||
}
|
|
||||||
if (!_IsEAFHosted && processDataStandardFormat is not null)
|
|
||||||
ProcessDataStandardFormat.Write(".pdsf", processDataStandardFormat, wsResults: null);
|
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
int numberLength = 2;
|
int numberLength = 2;
|
||||||
long ticks = dateTime.Ticks;
|
long ticks = dateTime.Ticks;
|
||||||
@ -364,10 +360,16 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
ReadOnlyCollection<string> matchingFiles = GetMatchingFiles(ticks, reportFullPath, searchDirectories);
|
ReadOnlyCollection<string> matchingFiles = GetMatchingFiles(ticks, reportFullPath, searchDirectories);
|
||||||
if (matchingFiles.Count != searchDirectories.Count)
|
if (matchingFiles.Count != searchDirectories.Count)
|
||||||
throw new Exception($"Didn't find all files after {_BreakAfterSeconds} second(s)!");
|
throw new Exception($"Didn't find all files after {_BreakAfterSeconds} second(s)!");
|
||||||
try
|
if (_IsEAFHosted)
|
||||||
{ CreatePointerFile(numberLength, parentParentDirectory, matchingFiles); }
|
{
|
||||||
catch (Exception) { }
|
try
|
||||||
ReadOnlyCollection<Pre> preCollection = GetPreCollection(numberLength, parentParentDirectory, matchingFiles);
|
{ CreatePointerFile(numberLength, parentParentDirectory, matchingFiles); }
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
|
||||||
|
List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements);
|
||||||
|
bool mesEntityMatchesProcess = descriptions.Count > 0 && descriptions[0].MesEntity == descriptions[0].Reactor;
|
||||||
|
ReadOnlyCollection<Pre> preCollection = GetPreCollection(numberLength, parentParentDirectory, matchingFiles, mesEntityMatchesProcess);
|
||||||
ReadOnlyCollection<PreWith> preWithCollection = GetPreWithCollection(preCollection);
|
ReadOnlyCollection<PreWith> preWithCollection = GetPreWithCollection(preCollection);
|
||||||
MoveCollection(dateTime, processDataStandardFormat, preWithCollection);
|
MoveCollection(dateTime, processDataStandardFormat, preWithCollection);
|
||||||
return results;
|
return results;
|
||||||
|
@ -147,7 +147,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
SendData(reportFullPath, dateTime, descriptions);
|
SendData(reportFullPath, dateTime, descriptions);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
PostOpenInsightMetrologyViewerAttachments(descriptions);
|
PostOpenInsightMetrologyViewerAttachments(descriptions);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
|
||||||
List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements);
|
List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements);
|
||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
DirectoryMove(reportFullPath, dateTime, descriptions);
|
DirectoryMove(reportFullPath, dateTime, descriptions);
|
||||||
else if (!_IsEAFHosted)
|
else if (!_IsEAFHosted)
|
||||||
|
@ -125,7 +125,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
FileCopy(reportFullPath, dateTime, descriptions);
|
FileCopy(reportFullPath, dateTime, descriptions);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,13 +11,15 @@ public class Common
|
|||||||
public int? ReactorNumber { get; }
|
public int? ReactorNumber { get; }
|
||||||
public string? Zone { get; }
|
public string? Zone { get; }
|
||||||
public string? Employee { get; }
|
public string? Employee { get; }
|
||||||
|
public WorkOrder? WorkOrder { get; }
|
||||||
|
|
||||||
public Common(string? layer,
|
public Common(string? layer,
|
||||||
string? psn,
|
string? psn,
|
||||||
int? rdsNumber,
|
int? rdsNumber,
|
||||||
int? reactor,
|
int? reactor,
|
||||||
string? zone,
|
string? zone,
|
||||||
string? employee)
|
string? employee,
|
||||||
|
WorkOrder? workOrder)
|
||||||
{
|
{
|
||||||
Layer = layer;
|
Layer = layer;
|
||||||
PSN = psn;
|
PSN = psn;
|
||||||
@ -25,6 +27,7 @@ public class Common
|
|||||||
ReactorNumber = reactor;
|
ReactorNumber = reactor;
|
||||||
Zone = zone;
|
Zone = zone;
|
||||||
Employee = employee;
|
Employee = employee;
|
||||||
|
WorkOrder = workOrder;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -3,18 +3,20 @@ namespace Adaptation.FileHandlers.TIBCO.Transport;
|
|||||||
public class CommonB
|
public class CommonB
|
||||||
{
|
{
|
||||||
|
|
||||||
public string Comment { get; }
|
|
||||||
public string Layer { get; }
|
public string Layer { get; }
|
||||||
|
public string LoadLockSide { get; }
|
||||||
public int? RDSNumber { get; }
|
public int? RDSNumber { get; }
|
||||||
|
public string ReactorType { get; }
|
||||||
public string PSN { get; }
|
public string PSN { get; }
|
||||||
public int? ReactorNumber { get; }
|
public int? ReactorNumber { get; }
|
||||||
public string Zone { get; }
|
public string Zone { get; }
|
||||||
|
|
||||||
public CommonB(string comment, string layer, int? rdsNumber, string psn, int? reactorNumber, string zone)
|
public CommonB(string layer, string loadLockSide, int? rdsNumber, string reactorType, string psn, int? reactorNumber, string zone)
|
||||||
{
|
{
|
||||||
Comment = comment;
|
|
||||||
Layer = layer;
|
Layer = layer;
|
||||||
|
LoadLockSide = loadLockSide;
|
||||||
RDSNumber = rdsNumber;
|
RDSNumber = rdsNumber;
|
||||||
|
ReactorType = reactorType;
|
||||||
PSN = psn;
|
PSN = psn;
|
||||||
ReactorNumber = reactorNumber;
|
ReactorNumber = reactorNumber;
|
||||||
Zone = zone;
|
Zone = zone;
|
||||||
|
@ -41,7 +41,7 @@ public partial class Job
|
|||||||
public DateTime DateTime { get; }
|
public DateTime DateTime { get; }
|
||||||
public List<Item> Items { get; }
|
public List<Item> Items { get; }
|
||||||
|
|
||||||
public Job(string lsl2SQLConnectionString, string metrologyFileShare, string barcodeHostFileShare, HttpClient httpClient, string mid)
|
public Job(string lsl2SQLConnectionString, string metrologyFileShare, string barcodeHostFileShare, HttpClient httpClient, string mid, DateTime enteredDateTimeFilter, DateTime loadSignatureDateTimeFilter)
|
||||||
{
|
{
|
||||||
const int zero = 0;
|
const int zero = 0;
|
||||||
Items = new List<Item>();
|
Items = new List<Item>();
|
||||||
@ -52,7 +52,6 @@ public partial class Job
|
|||||||
Common common;
|
Common common;
|
||||||
CommonB commonB;
|
CommonB commonB;
|
||||||
int? reactorNumber;
|
int? reactorNumber;
|
||||||
WorkOrder workOrder;
|
|
||||||
const string hyphen = "-";
|
const string hyphen = "-";
|
||||||
const string bioRad2 = "BIORAD2";
|
const string bioRad2 = "BIORAD2";
|
||||||
const string bioRad3 = "BIORAD3";
|
const string bioRad3 = "BIORAD3";
|
||||||
@ -65,20 +64,23 @@ public partial class Job
|
|||||||
DateTime = new DateTime(sequence);
|
DateTime = new DateTime(sequence);
|
||||||
const string dep08CEPIEPSILON = "DEP08CEPIEPSILON";
|
const string dep08CEPIEPSILON = "DEP08CEPIEPSILON";
|
||||||
if (input.EquipmentType == dep08CEPIEPSILON)
|
if (input.EquipmentType == dep08CEPIEPSILON)
|
||||||
(common, workOrder) = Get(input, httpClient);
|
{
|
||||||
|
common = Get(input, httpClient);
|
||||||
|
}
|
||||||
else if (!string.IsNullOrEmpty(input.MID) && !string.IsNullOrEmpty(input.MesEntity) && Regex.IsMatch(input.MID, reactorNumberPattern) && input.MesEntity is bioRad2 or bioRad3)
|
else if (!string.IsNullOrEmpty(input.MID) && !string.IsNullOrEmpty(input.MesEntity) && Regex.IsMatch(input.MID, reactorNumberPattern) && input.MesEntity is bioRad2 or bioRad3)
|
||||||
(common, workOrder) = Get(input, barcodeHostFileShare);
|
common = Get(input, barcodeHostFileShare);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
workOrder = GetWorkOrder(input);
|
|
||||||
reactorNumber = GetReactorNumber(input);
|
reactorNumber = GetReactorNumber(input);
|
||||||
|
WorkOrder workOrder = GetWorkOrder(input);
|
||||||
if (workOrder.IsWorkOrder || reactorNumber.HasValue)
|
if (workOrder.IsWorkOrder || reactorNumber.HasValue)
|
||||||
common = new(layer: null,
|
common = new(layer: null,
|
||||||
psn: null,
|
psn: null,
|
||||||
rdsNumber: null,
|
rdsNumber: null,
|
||||||
reactor: null,
|
reactor: null,
|
||||||
zone: null,
|
zone: null,
|
||||||
employee: null);
|
employee: null,
|
||||||
|
workOrder: workOrder);
|
||||||
else if (!string.IsNullOrEmpty(input.MID) && input.MID.Length is 2 or 3 && Regex.IsMatch(input.MID, twoAlphaPattern))
|
else if (!string.IsNullOrEmpty(input.MID) && input.MID.Length is 2 or 3 && Regex.IsMatch(input.MID, twoAlphaPattern))
|
||||||
common = GetTwoAlphaPattern(metrologyFileShare, input);
|
common = GetTwoAlphaPattern(metrologyFileShare, input);
|
||||||
else
|
else
|
||||||
@ -86,13 +88,14 @@ public partial class Job
|
|||||||
}
|
}
|
||||||
bool isValid = IsValid(common.RDSNumber);
|
bool isValid = IsValid(common.RDSNumber);
|
||||||
if (isValid)
|
if (isValid)
|
||||||
commonB = GetWithValidRDS(lsl2SQLConnectionString, common.Layer, common.PSN, common.RDSNumber, common.ReactorNumber, common.Zone);
|
commonB = GetWithValidRDS(lsl2SQLConnectionString, enteredDateTimeFilter, loadSignatureDateTimeFilter, common.Layer, common.PSN, common.RDSNumber, common.ReactorNumber, common.Zone);
|
||||||
else if (workOrder.IsWorkOrder || common.RDSNumber.HasValue)
|
else if (common.WorkOrder is null || common.WorkOrder.IsWorkOrder || common.RDSNumber.HasValue)
|
||||||
commonB = Get(lsl2SQLConnectionString, common.Layer, common.PSN, common.ReactorNumber, workOrder.SlotNumber, workOrder.WorkOrderNumber, workOrder.WorkOrderCassette, common.Zone);
|
commonB = Get(lsl2SQLConnectionString, enteredDateTimeFilter, loadSignatureDateTimeFilter, common);
|
||||||
else
|
else
|
||||||
commonB = new(comment: hyphen,
|
commonB = new(layer: hyphen,
|
||||||
layer: hyphen,
|
loadLockSide: hyphen,
|
||||||
rdsNumber: common.RDSNumber,
|
rdsNumber: common.RDSNumber,
|
||||||
|
reactorType: hyphen,
|
||||||
psn: common.PSN,
|
psn: common.PSN,
|
||||||
reactorNumber: common.ReactorNumber,
|
reactorNumber: common.ReactorNumber,
|
||||||
zone: hyphen);
|
zone: hyphen);
|
||||||
@ -108,17 +111,45 @@ public partial class Job
|
|||||||
IsAreaSi = input.Area == "Si"; // N/A
|
IsAreaSi = input.Area == "Si"; // N/A
|
||||||
StateModel = input.EquipmentType; // ?
|
StateModel = input.EquipmentType; // ?
|
||||||
JobName = DateTime.Ticks.ToString(); // ?
|
JobName = DateTime.Ticks.ToString(); // ?
|
||||||
|
BasicType = GetComment(hyphen, httpClient, commonB); // BASIC_TYPE
|
||||||
AutomationMode = string.Concat(DateTime.Ticks, ".", input.MesEntity); // ?
|
AutomationMode = string.Concat(DateTime.Ticks, ".", input.MesEntity); // ?
|
||||||
SpecName = !string.IsNullOrEmpty(commonB.Layer) ? commonB.Layer : hyphen; // LAYER
|
SpecName = !string.IsNullOrEmpty(commonB.Layer) ? commonB.Layer : hyphen; // LAYER
|
||||||
ProductName = !string.IsNullOrEmpty(commonB.PSN) ? commonB.PSN : hyphen; // PRODUCT
|
ProductName = !string.IsNullOrEmpty(commonB.PSN) ? commonB.PSN : hyphen; // PRODUCT
|
||||||
ProcessSpecName = !string.IsNullOrEmpty(commonB.Zone) ? commonB.Zone : hyphen; // WAFER_POS
|
ProcessSpecName = !string.IsNullOrEmpty(commonB.Zone) ? commonB.Zone : hyphen; // WAFER_POS
|
||||||
BasicType = !string.IsNullOrEmpty(commonB.Comment) ? commonB.Comment : hyphen; // BASIC_TYPE
|
|
||||||
LotName = commonB.RDSNumber is not null ? commonB.RDSNumber.Value.ToString() : input.MID; // MID
|
LotName = commonB.RDSNumber is not null ? commonB.RDSNumber.Value.ToString() : input.MID; // MID
|
||||||
ProcessType = commonB.ReactorNumber is not null ? commonB.ReactorNumber.Value.ToString() : hyphen; // PROCESS_JOBID
|
ProcessType = commonB.ReactorNumber is not null ? commonB.ReactorNumber.Value.ToString() : hyphen; // PROCESS_JOBID
|
||||||
Items.Add(new Item { Name = "0", Type = "NA", Number = (0 + 1).ToString(), Qty = "1", CarrierName = hyphen });
|
Items.Add(new Item { Name = "0", Type = "NA", Number = (0 + 1).ToString(), Qty = "1", CarrierName = hyphen });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string GetComment(string hyphen, HttpClient httpClient, CommonB commonB)
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
string? loadLockSide = commonB.LoadLockSide;
|
||||||
|
if (string.IsNullOrEmpty(loadLockSide) && commonB.RDSNumber is not null)
|
||||||
|
{
|
||||||
|
RunDataSheetRoot? runDataSheetRoot;
|
||||||
|
try
|
||||||
|
{ runDataSheetRoot = GetRunDataSheetRoot(httpClient, commonB.RDSNumber.Value); }
|
||||||
|
catch (Exception)
|
||||||
|
{ runDataSheetRoot = null; }
|
||||||
|
loadLockSide = runDataSheetRoot?.RunDataSheet?.LoadLockSide;
|
||||||
|
}
|
||||||
|
if (string.IsNullOrEmpty(loadLockSide) || string.IsNullOrEmpty(commonB.ReactorType))
|
||||||
|
result = hyphen;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string loadLockSideFull = loadLockSide switch
|
||||||
|
{
|
||||||
|
"L" => "Left",
|
||||||
|
"R" => "Right",
|
||||||
|
_ => loadLockSide,
|
||||||
|
};
|
||||||
|
result = $"{loadLockSideFull} - {commonB.ReactorType}";
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
private static int? GetReactorNumber(Input input)
|
private static int? GetReactorNumber(Input input)
|
||||||
{
|
{
|
||||||
int? result;
|
int? result;
|
||||||
@ -279,7 +310,8 @@ public partial class Job
|
|||||||
rdsNumber: rdsNumber,
|
rdsNumber: rdsNumber,
|
||||||
reactor: reactorNumber,
|
reactor: reactorNumber,
|
||||||
zone: zone,
|
zone: zone,
|
||||||
employee: employee);
|
employee: employee,
|
||||||
|
workOrder: null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string[] GetDirectories(string fileShare)
|
private static string[] GetDirectories(string fileShare)
|
||||||
@ -342,7 +374,8 @@ public partial class Job
|
|||||||
rdsNumber: rdsNumber,
|
rdsNumber: rdsNumber,
|
||||||
reactor: reactor,
|
reactor: reactor,
|
||||||
zone: zone,
|
zone: zone,
|
||||||
employee: null);
|
employee: null,
|
||||||
|
workOrder: null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<string> GetFiles(Input input, string barcodeHostFileShare)
|
private static List<string> GetFiles(Input input, string barcodeHostFileShare)
|
||||||
@ -381,12 +414,11 @@ public partial class Job
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static (Common common, WorkOrder workOrder) Get(Input input, HttpClient httpClient)
|
private static Common Get(Input input, HttpClient httpClient)
|
||||||
{
|
{
|
||||||
int? rds;
|
int? rds;
|
||||||
string psn;
|
string? psn;
|
||||||
Common common;
|
Common result;
|
||||||
WorkOrder workOrder;
|
|
||||||
Task<Stream> streamTask;
|
Task<Stream> streamTask;
|
||||||
Task<HttpResponseMessage> httpResponseMessageTask;
|
Task<HttpResponseMessage> httpResponseMessageTask;
|
||||||
string mid = string.IsNullOrEmpty(input.MID) ? string.Empty : input.MID;
|
string mid = string.IsNullOrEmpty(input.MID) ? string.Empty : input.MID;
|
||||||
@ -405,60 +437,70 @@ public partial class Job
|
|||||||
if (reactorRoot is null || reactor != reactorRoot.Reactor.ReactorNo || reactorRoot.Reactor.LoadedRDS is null || reactorRoot.Reactor.LoadedRDS.Length < 1)
|
if (reactorRoot is null || reactor != reactorRoot.Reactor.ReactorNo || reactorRoot.Reactor.LoadedRDS is null || reactorRoot.Reactor.LoadedRDS.Length < 1)
|
||||||
{
|
{
|
||||||
rds = null;
|
rds = null;
|
||||||
psn = string.Empty;
|
psn = null;
|
||||||
workOrder = new(null, null, null, null, false);
|
result = new(layer: null,
|
||||||
common = new(layer: null,
|
|
||||||
psn: psn,
|
psn: psn,
|
||||||
rdsNumber: rds,
|
rdsNumber: rds,
|
||||||
reactor: reactor,
|
reactor: reactor,
|
||||||
zone: null,
|
zone: null,
|
||||||
employee: null);
|
employee: null,
|
||||||
|
workOrder: null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rds = reactorRoot.Reactor.LoadedRDS[0];
|
rds = reactorRoot.Reactor.LoadedRDS[0];
|
||||||
workOrder = new(null, null, null, null, false);
|
RunDataSheetRoot? runDataSheetRoot = GetRunDataSheetRoot(httpClient, rds.Value);
|
||||||
httpResponseMessageTask = httpClient.GetAsync($"{httpClient.BaseAddress}/materials/rds/{rds}");
|
|
||||||
httpResponseMessageTask.Wait();
|
|
||||||
if (httpResponseMessageTask.Result.StatusCode != System.Net.HttpStatusCode.OK)
|
|
||||||
throw new Exception($"Unable to OI <{httpResponseMessageTask.Result.StatusCode}>");
|
|
||||||
streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync();
|
|
||||||
streamTask.Wait();
|
|
||||||
if (!streamTask.Result.CanRead)
|
|
||||||
throw new NullReferenceException(nameof(streamTask));
|
|
||||||
RunDataSheetRoot? runDataSheetRoot = JsonSerializer.Deserialize<RunDataSheetRoot>(streamTask.Result, jsonSerializerOptions);
|
|
||||||
streamTask.Result.Dispose();
|
|
||||||
if (runDataSheetRoot is null || reactor != runDataSheetRoot.RunDataSheet.Reactor)
|
if (runDataSheetRoot is null || reactor != runDataSheetRoot.RunDataSheet.Reactor)
|
||||||
{
|
{
|
||||||
psn = string.Empty;
|
psn = null;
|
||||||
common = new(layer: null,
|
result = new(layer: null,
|
||||||
psn: psn,
|
psn: psn,
|
||||||
rdsNumber: rds,
|
rdsNumber: rds,
|
||||||
reactor: reactor,
|
reactor: reactor,
|
||||||
zone: null,
|
zone: null,
|
||||||
employee: null);
|
employee: null,
|
||||||
|
workOrder: null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
psn = runDataSheetRoot.RunDataSheet.PSN.ToString();
|
psn = runDataSheetRoot.RunDataSheet.PSN.ToString();
|
||||||
common = new(layer: null,
|
result = new(layer: null,
|
||||||
psn: psn,
|
psn: psn,
|
||||||
rdsNumber: rds,
|
rdsNumber: rds,
|
||||||
reactor: reactor,
|
reactor: reactor,
|
||||||
zone: null,
|
zone: null,
|
||||||
employee: null);
|
employee: null,
|
||||||
|
workOrder: null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new(common, workOrder);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static (Common common, WorkOrder workOrder) Get(Input input, string barcodeHostFileShare)
|
private static RunDataSheetRoot? GetRunDataSheetRoot(HttpClient httpClient, int rds)
|
||||||
{
|
{
|
||||||
|
RunDataSheetRoot? runDataSheetRoot;
|
||||||
|
JsonSerializerOptions jsonSerializerOptions = new() { PropertyNameCaseInsensitive = true };
|
||||||
|
using Task<HttpResponseMessage> httpResponseMessageTask = httpClient.GetAsync($"{httpClient.BaseAddress}/materials/rds/{rds}");
|
||||||
|
httpResponseMessageTask.Wait();
|
||||||
|
if (httpResponseMessageTask.Result.StatusCode != System.Net.HttpStatusCode.OK)
|
||||||
|
throw new Exception($"Unable to OI <{httpResponseMessageTask.Result.StatusCode}>");
|
||||||
|
using Task<Stream> streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync();
|
||||||
|
streamTask.Wait();
|
||||||
|
if (!streamTask.Result.CanRead)
|
||||||
|
throw new NullReferenceException(nameof(streamTask));
|
||||||
|
runDataSheetRoot = JsonSerializer.Deserialize<RunDataSheetRoot>(streamTask.Result, jsonSerializerOptions);
|
||||||
|
streamTask.Result.Dispose();
|
||||||
|
return runDataSheetRoot;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Common Get(Input input, string barcodeHostFileShare)
|
||||||
|
{
|
||||||
|
Common result;
|
||||||
if (string.IsNullOrEmpty(barcodeHostFileShare) || !Directory.Exists(barcodeHostFileShare))
|
if (string.IsNullOrEmpty(barcodeHostFileShare) || !Directory.Exists(barcodeHostFileShare))
|
||||||
throw new Exception($"Unable to access file-share <{barcodeHostFileShare}>");
|
throw new Exception($"Unable to access file-share <{barcodeHostFileShare}>");
|
||||||
int? rds;
|
int? rds;
|
||||||
long sequence = 0;
|
long sequence = 0;
|
||||||
WorkOrder workOrder;
|
WorkOrder? workOrder;
|
||||||
string mid = string.IsNullOrEmpty(input.MID) ? string.Empty : input.MID;
|
string mid = string.IsNullOrEmpty(input.MID) ? string.Empty : input.MID;
|
||||||
int? reactor = mid.Length < 2 || !int.TryParse(mid.Substring(0, 2), out int reactorNumber) ? null : reactorNumber;
|
int? reactor = mid.Length < 2 || !int.TryParse(mid.Substring(0, 2), out int reactorNumber) ? null : reactorNumber;
|
||||||
bool parsed = !string.IsNullOrEmpty(input.Sequence) && long.TryParse(input.Sequence, out sequence);
|
bool parsed = !string.IsNullOrEmpty(input.Sequence) && long.TryParse(input.Sequence, out sequence);
|
||||||
@ -471,29 +513,28 @@ public partial class Job
|
|||||||
if (text is null || text.Length < 3)
|
if (text is null || text.Length < 3)
|
||||||
{
|
{
|
||||||
rds = null;
|
rds = null;
|
||||||
workOrder = new(null, null, null, null, false);
|
workOrder = null;
|
||||||
}
|
}
|
||||||
else if (!text.Contains('.'))
|
else if (!text.Contains('.'))
|
||||||
{
|
{
|
||||||
|
workOrder = null;
|
||||||
rds = !int.TryParse(text.Substring(2), out int rdsNumber) ? null : rdsNumber;
|
rds = !int.TryParse(text.Substring(2), out int rdsNumber) ? null : rdsNumber;
|
||||||
workOrder = new(null, null, null, null, false);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rds = null;
|
rds = null;
|
||||||
workOrder = GetWorkOrder(new(input, text.Substring(2)));
|
workOrder = GetWorkOrder(new(input, text.Substring(2)));
|
||||||
}
|
}
|
||||||
Common common = new(layer: null,
|
result = new(layer: null,
|
||||||
psn: null,
|
psn: null,
|
||||||
rdsNumber: rds,
|
rdsNumber: rds,
|
||||||
reactor: reactor,
|
reactor: reactor,
|
||||||
zone: null,
|
zone: null,
|
||||||
employee: null);
|
employee: null,
|
||||||
return new(common, workOrder);
|
workOrder: workOrder);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
private static string GetRunJson(string lsl2SQLConnectionString, string commandText)
|
private static string GetRunJson(string lsl2SQLConnectionString, string commandText)
|
||||||
{
|
{
|
||||||
StringBuilder result = new();
|
StringBuilder result = new();
|
||||||
@ -513,7 +554,7 @@ public partial class Job
|
|||||||
return result.ToString();
|
return result.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetCommandText(int? rds, int? workOrderNumber, int? workOrderCassette, int? slot, int? reactor)
|
private static string GetCommandText(DateTime enteredDateTimeFilter, DateTime loadSignatureDateTimeFilter, int? rds, int? workOrderNumber, int? workOrderCassette, int? slot, int? reactor)
|
||||||
{ // cSpell:disable
|
{ // cSpell:disable
|
||||||
List<string> results = new();
|
List<string> results = new();
|
||||||
int rdsValue = rds is null ? -1 : rds.Value;
|
int rdsValue = rds is null ? -1 : rds.Value;
|
||||||
@ -540,6 +581,7 @@ public partial class Job
|
|||||||
results.Add(" ) zone ");
|
results.Add(" ) zone ");
|
||||||
results.Add(" from lsl2sql.dbo.react_run rr ");
|
results.Add(" from lsl2sql.dbo.react_run rr ");
|
||||||
results.Add($" where rr.rds_no = {rdsValue}");
|
results.Add($" where rr.rds_no = {rdsValue}");
|
||||||
|
results.Add($" and rr.enter_dtm > '{enteredDateTimeFilter:yyyy-MM-dd} 00:00:00.000' ");
|
||||||
results.Add(" union all ");
|
results.Add(" union all ");
|
||||||
results.Add(" select ");
|
results.Add(" select ");
|
||||||
results.Add(" rr.rds_no ");
|
results.Add(" rr.rds_no ");
|
||||||
@ -589,80 +631,87 @@ public partial class Job
|
|||||||
results.Add(" select max(qa.rds_no) ");
|
results.Add(" select max(qa.rds_no) ");
|
||||||
results.Add(" from lsl2sql.dbo.react_run qa ");
|
results.Add(" from lsl2sql.dbo.react_run qa ");
|
||||||
results.Add(" where qa.load_sig != '' ");
|
results.Add(" where qa.load_sig != '' ");
|
||||||
results.Add(" and qa.load_sig_dtm > '2023-05-01 00:00:00.000' ");
|
results.Add($" and qa.load_sig_dtm > '{loadSignatureDateTimeFilter:yyyy-MM-dd} 00:00:00.000' ");
|
||||||
results.Add($" and qa.reactor = {reactorValue}");
|
results.Add($" and qa.reactor = {reactorValue}");
|
||||||
results.Add(" ) ");
|
results.Add(" ) ");
|
||||||
results.Add(" for json path ");
|
results.Add(" for json path ");
|
||||||
return string.Join(Environment.NewLine, results);
|
return string.Join(Environment.NewLine, results);
|
||||||
} // cSpell:restore
|
} // cSpell:restore
|
||||||
|
|
||||||
private static CommonB Get(string lsl2SQLConnectionString, string layer, string psn, int? reactorNumber, int? slotNumber, int? workOrderNumber, int? workOrderCassette, string zone)
|
private static CommonB Get(string lsl2SQLConnectionString, DateTime enteredDateTimeFilter, DateTime loadSignatureDateTimeFilter, Common common)
|
||||||
{
|
{
|
||||||
int? rdsNumber;
|
int? rdsNumber;
|
||||||
string comment;
|
string? psn;
|
||||||
|
string? zone;
|
||||||
|
string? layer;
|
||||||
const int zero = 0;
|
const int zero = 0;
|
||||||
const string hyphen = "-";
|
int? reactorNumber;
|
||||||
string commandText = GetCommandText(rds: null,
|
string? reactorType;
|
||||||
workOrderNumber: workOrderNumber,
|
string? loadLockSide;
|
||||||
workOrderCassette: workOrderCassette,
|
string commandText = GetCommandText(enteredDateTimeFilter,
|
||||||
slot: slotNumber,
|
loadSignatureDateTimeFilter,
|
||||||
reactor: reactorNumber);
|
rds: null,
|
||||||
|
workOrderNumber: common.WorkOrder?.WorkOrderNumber,
|
||||||
|
workOrderCassette: common.WorkOrder?.WorkOrderCassette,
|
||||||
|
slot: common.WorkOrder?.SlotNumber,
|
||||||
|
reactor: common.ReactorNumber);
|
||||||
string json = GetRunJson(lsl2SQLConnectionString, commandText);
|
string json = GetRunJson(lsl2SQLConnectionString, commandText);
|
||||||
if (string.IsNullOrEmpty(json))
|
if (string.IsNullOrEmpty(json))
|
||||||
{
|
{
|
||||||
|
psn = common.PSN;
|
||||||
rdsNumber = null;
|
rdsNumber = null;
|
||||||
comment = hyphen;
|
reactorType = null;
|
||||||
psn = string.Empty;
|
zone = common.Zone;
|
||||||
zone = string.Empty;
|
loadLockSide = null;
|
||||||
|
layer = common.Layer;
|
||||||
|
reactorNumber = common.ReactorNumber;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Run[] runs;
|
Run[]? runs;
|
||||||
try
|
try
|
||||||
{ runs = JsonSerializer.Deserialize<Run[]>(json); }
|
{ runs = JsonSerializer.Deserialize<Run[]>(json); }
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{ runs = Array.Empty<Run>(); }
|
{ runs = Array.Empty<Run>(); }
|
||||||
if (runs.Length == 0)
|
if (runs is null || runs.Length == 0)
|
||||||
{
|
{
|
||||||
|
psn = common.PSN;
|
||||||
rdsNumber = null;
|
rdsNumber = null;
|
||||||
comment = hyphen;
|
reactorType = null;
|
||||||
psn = string.Empty;
|
zone = common.Zone;
|
||||||
zone = string.Empty;
|
loadLockSide = null;
|
||||||
|
layer = common.Layer;
|
||||||
|
reactorNumber = common.ReactorNumber;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rdsNumber = runs[zero].RdsNo;
|
reactorType = null;
|
||||||
if (string.IsNullOrEmpty(psn))
|
Run run = runs[zero];
|
||||||
psn = runs[zero].PSN;
|
rdsNumber = run.RdsNo;
|
||||||
if (string.IsNullOrEmpty(zone))
|
reactorNumber = run.Reactor;
|
||||||
zone = runs[zero].Zone;
|
loadLockSide = run.LoadLockSide;
|
||||||
if (string.IsNullOrEmpty(layer))
|
psn = string.IsNullOrEmpty(common.PSN) ? run.PSN : common.PSN;
|
||||||
layer = runs[zero].EpiLayer;
|
zone = string.IsNullOrEmpty(common.Zone) ? run.Zone : common.Zone;
|
||||||
reactorNumber = runs[zero].Reactor;
|
layer = string.IsNullOrEmpty(common.Layer) ? run.EpiLayer : common.Layer;
|
||||||
string loadLockSide = runs[zero].LoadLockSide;
|
|
||||||
string loadLockSideFull = loadLockSide switch
|
|
||||||
{
|
|
||||||
"L" => "Left",
|
|
||||||
"R" => "Right",
|
|
||||||
_ => loadLockSide,
|
|
||||||
};
|
|
||||||
comment = $"{loadLockSideFull} - {runs[zero].ReactorType}";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new(comment: comment,
|
return new(layer: layer,
|
||||||
layer: layer,
|
loadLockSide: loadLockSide,
|
||||||
rdsNumber: rdsNumber,
|
rdsNumber: rdsNumber,
|
||||||
psn: psn,
|
psn: psn,
|
||||||
reactorNumber: reactorNumber,
|
reactorNumber: reactorNumber,
|
||||||
|
reactorType: reactorType,
|
||||||
zone: zone);
|
zone: zone);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CommonB GetWithValidRDS(string lsl2SQLConnectionString, string layer, string psn, int? rdsNumber, int? reactorNumber, string zone)
|
private static CommonB GetWithValidRDS(string lsl2SQLConnectionString, DateTime enteredDateTimeFilter, DateTime loadSignatureDateTimeFilter, string? layer, string? psn, int? rdsNumber, int? reactorNumber, string? zone)
|
||||||
{
|
{
|
||||||
string comment;
|
|
||||||
const int zero = 0;
|
const int zero = 0;
|
||||||
const string hyphen = "-";
|
string? reactorType;
|
||||||
string commandText = GetCommandText(rds: rdsNumber,
|
string? loadLockSide;
|
||||||
|
string commandText = GetCommandText(enteredDateTimeFilter,
|
||||||
|
loadSignatureDateTimeFilter,
|
||||||
|
rds: rdsNumber,
|
||||||
workOrderNumber: null,
|
workOrderNumber: null,
|
||||||
workOrderCassette: null,
|
workOrderCassette: null,
|
||||||
slot: null,
|
slot: null,
|
||||||
@ -670,43 +719,41 @@ public partial class Job
|
|||||||
string json = GetRunJson(lsl2SQLConnectionString, commandText);
|
string json = GetRunJson(lsl2SQLConnectionString, commandText);
|
||||||
if (string.IsNullOrEmpty(json))
|
if (string.IsNullOrEmpty(json))
|
||||||
{
|
{
|
||||||
comment = hyphen;
|
zone = null;
|
||||||
zone = string.Empty;
|
reactorType = null;
|
||||||
|
loadLockSide = null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Run[] runs;
|
Run[]? runs;
|
||||||
try
|
try
|
||||||
{ runs = JsonSerializer.Deserialize<Run[]>(json); }
|
{ runs = JsonSerializer.Deserialize<Run[]>(json); }
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{ runs = Array.Empty<Run>(); }
|
{ runs = Array.Empty<Run>(); }
|
||||||
if (runs.Length == 0)
|
if (runs is null || runs.Length == 0)
|
||||||
{
|
{
|
||||||
comment = hyphen;
|
zone = null;
|
||||||
zone = string.Empty;
|
reactorType = null;
|
||||||
|
loadLockSide = null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Run run = runs[zero];
|
||||||
if (string.IsNullOrEmpty(psn))
|
if (string.IsNullOrEmpty(psn))
|
||||||
psn = runs[zero].PSN;
|
psn = run.PSN;
|
||||||
if (string.IsNullOrEmpty(zone))
|
if (string.IsNullOrEmpty(zone))
|
||||||
zone = runs[zero].Zone;
|
zone = run.Zone;
|
||||||
if (string.IsNullOrEmpty(layer))
|
if (string.IsNullOrEmpty(layer))
|
||||||
layer = runs[zero].EpiLayer;
|
layer = run.EpiLayer;
|
||||||
reactorNumber = runs[zero].Reactor is null ? reactorNumber : runs[zero].Reactor.Value;
|
reactorNumber = run.Reactor is null ? reactorNumber : run.Reactor.Value;
|
||||||
string loadLockSide = runs[zero].LoadLockSide;
|
loadLockSide = run.LoadLockSide;
|
||||||
string loadLockSideFull = loadLockSide switch
|
reactorType = run.ReactorType;
|
||||||
{
|
|
||||||
"L" => "Left",
|
|
||||||
"R" => "Right",
|
|
||||||
_ => loadLockSide,
|
|
||||||
};
|
|
||||||
comment = $"{loadLockSideFull} - {runs[zero].ReactorType}";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new(comment: comment,
|
return new(layer: layer,
|
||||||
layer: layer,
|
loadLockSide: loadLockSide,
|
||||||
rdsNumber: rdsNumber,
|
rdsNumber: rdsNumber,
|
||||||
|
reactorType: reactorType,
|
||||||
psn: psn,
|
psn: psn,
|
||||||
reactorNumber: reactorNumber,
|
reactorNumber: reactorNumber,
|
||||||
zone: zone);
|
zone: zone);
|
||||||
|
@ -167,13 +167,12 @@ internal partial class Main
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string mid = string.Empty;
|
|
||||||
string[] sourceFiles = null;
|
string[] sourceFiles = null;
|
||||||
DateTime dateTime = DateTime.Now;
|
DateTime dateTime = DateTime.Now;
|
||||||
string pdsfFileLogistics = string.Empty;
|
|
||||||
IfxDoc envelopeDocument = ifxEnvelope.ExtractDocument();
|
|
||||||
CultureInfo cultureInfo = new("en-US");
|
CultureInfo cultureInfo = new("en-US");
|
||||||
|
string pdsfFileLogistics = string.Empty;
|
||||||
Calendar calendar = cultureInfo.Calendar;
|
Calendar calendar = cultureInfo.Calendar;
|
||||||
|
IfxDoc envelopeDocument = ifxEnvelope.ExtractDocument();
|
||||||
string weekOfYear = calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
string weekOfYear = calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||||
string weekOfYearSegment = string.Concat(@"\", dateTime.ToString("yyyy"), "_Week_", weekOfYear, @"\", dateTime.ToString("yyyy-MM-dd"));
|
string weekOfYearSegment = string.Concat(@"\", dateTime.ToString("yyyy"), "_Week_", weekOfYear, @"\", dateTime.ToString("yyyy-MM-dd"));
|
||||||
if (!string.IsNullOrEmpty(_FileConnectorConfiguration.SourceFileLocation))
|
if (!string.IsNullOrEmpty(_FileConnectorConfiguration.SourceFileLocation))
|
||||||
@ -188,8 +187,10 @@ internal partial class Main
|
|||||||
}
|
}
|
||||||
if (!subject.Contains(_TibcoParameterSubjectPrefix))
|
if (!subject.Contains(_TibcoParameterSubjectPrefix))
|
||||||
throw new Exception("Invalid Subject");
|
throw new Exception("Invalid Subject");
|
||||||
mid = GetJobsMID(envelopeDocument);
|
string mid = GetJobsMID(envelopeDocument);
|
||||||
Job job = new(_LSL2SQLConnectionString, _MetrologyFileShare, _BarcodeHostFileShare, _HttpClient, mid);
|
DateTime enteredDateTimeFilter = dateTime.AddDays(-356);
|
||||||
|
DateTime loadSignatureDateTimeFilter = dateTime.AddDays(-4);
|
||||||
|
Job job = new(_LSL2SQLConnectionString, _MetrologyFileShare, _BarcodeHostFileShare, _HttpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter);
|
||||||
if (job.IsAreaSi)
|
if (job.IsAreaSi)
|
||||||
{
|
{
|
||||||
IfxDoc sendReply = GetJobsReply(job);
|
IfxDoc sendReply = GetJobsReply(job);
|
||||||
|
@ -6,12 +6,14 @@ public class RunDataSheet
|
|||||||
{
|
{
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
public RunDataSheet(int psn, int reactor)
|
public RunDataSheet(string loadLockSide, int psn, int reactor)
|
||||||
{
|
{
|
||||||
PSN = psn;
|
PSN = psn;
|
||||||
|
LoadLockSide = loadLockSide;
|
||||||
Reactor = reactor;
|
Reactor = reactor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[JsonPropertyName("loadLockSide")] public string LoadLockSide { get; } // { init; get; }
|
||||||
[JsonPropertyName("PSN")] public int PSN { get; } // { init; get; }
|
[JsonPropertyName("PSN")] public int PSN { get; } // { init; get; }
|
||||||
[JsonPropertyName("reactor")] public int Reactor { get; } // { init; get; }
|
[JsonPropertyName("reactor")] public int Reactor { get; } // { init; get; }
|
||||||
|
|
||||||
|
@ -87,16 +87,16 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Condition="'$(Configuration)' == 'Debug'" Include="\\mestsa003.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL\gpcl6win64\gpcl6dll64.dll">
|
<None Condition="'$(Configuration)' == 'Debug'" Include="D:\EAF-Mesa-Integration\copy\GhostPCL\gpcl6win64\gpcl6dll64.dll">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Condition="'$(Configuration)' == 'Debug'" Include="\\mestsa003.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL\gpcl6win64\gpcl6win64.exe">
|
<None Condition="'$(Configuration)' == 'Debug'" Include="D:\EAF-Mesa-Integration\copy\GhostPCL\gpcl6win64\gpcl6win64.exe">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Condition="'$(Configuration)' == 'Release'" Include="\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL\gpcl6win64\gpcl6dll64.dll">
|
<None Condition="'$(Configuration)' == 'Release'" Include="D:\EAF-Mesa-Integration\copy\GhostPCL\gpcl6win64\gpcl6dll64.dll">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Condition="'$(Configuration)' == 'Release'" Include="\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL\gpcl6win64\gpcl6win64.exe">
|
<None Condition="'$(Configuration)' == 'Release'" Include="D:\EAF-Mesa-Integration\copy\GhostPCL\gpcl6win64\gpcl6win64.exe">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -41,6 +41,24 @@ stages:
|
|||||||
displayName: "Nuget Clear"
|
displayName: "Nuget Clear"
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: 'Copy GhostPCL Files to: D:\EAF-Mesa-Integration\copy'
|
||||||
|
inputs:
|
||||||
|
Contents: "*"
|
||||||
|
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL'
|
||||||
|
TargetFolder: 'D:\EAF-Mesa-Integration\copy\GhostPCL'
|
||||||
|
OverWrite: true
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: 'Copy LincPDFC Files to: D:\EAF-Mesa-Integration\copy'
|
||||||
|
inputs:
|
||||||
|
Contents: "*"
|
||||||
|
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\LincPDFC'
|
||||||
|
TargetFolder: 'D:\EAF-Mesa-Integration\copy\LincPDFC'
|
||||||
|
OverWrite: true
|
||||||
|
enabled: false
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets init
|
"C:\program files\dotnet\dotnet.exe" user-secrets init
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
|
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
|
||||||
@ -184,6 +202,24 @@ stages:
|
|||||||
displayName: "Nuget Clear"
|
displayName: "Nuget Clear"
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: 'Copy GhostPCL Files to: D:\EAF-Mesa-Integration\copy'
|
||||||
|
inputs:
|
||||||
|
Contents: "*"
|
||||||
|
SourceFolder: '\\mestsa003.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL'
|
||||||
|
TargetFolder: 'D:\EAF-Mesa-Integration\copy\GhostPCL'
|
||||||
|
OverWrite: true
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: 'Copy LincPDFC Files to: D:\EAF-Mesa-Integration\copy'
|
||||||
|
inputs:
|
||||||
|
Contents: "*"
|
||||||
|
SourceFolder: '\\mestsa003.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\LincPDFC'
|
||||||
|
TargetFolder: 'D:\EAF-Mesa-Integration\copy\LincPDFC'
|
||||||
|
OverWrite: true
|
||||||
|
enabled: false
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets init
|
"C:\program files\dotnet\dotnet.exe" user-secrets init
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
|
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
|
||||||
|
@ -478,27 +478,14 @@ public class FileRead : Properties.IFileRead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void WritePDSF(IFileRead fileRead, JsonElement[] jsonElements)
|
protected static void WritePDSF(IFileRead fileRead, JsonElement[] jsonElements)
|
||||||
{
|
{
|
||||||
string directory;
|
#pragma warning disable CA1510
|
||||||
string day = $"{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
|
if (fileRead is null)
|
||||||
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
throw new ArgumentNullException(nameof(fileRead));
|
||||||
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}";
|
if (jsonElements is null)
|
||||||
if (!_CellInstanceConnectionName.StartsWith(_CellInstanceName) && _CellInstanceConnectionNameBase == _EquipmentType)
|
throw new ArgumentNullException(nameof(jsonElements));
|
||||||
directory = Path.Combine(_TracePath, _EquipmentType, "Target", weekDirectory, day, _CellInstanceName, _CellInstanceConnectionName);
|
#pragma warning restore CA1510
|
||||||
else
|
|
||||||
directory = Path.Combine(_TracePath, _EquipmentType, "Source", weekDirectory, day, _CellInstanceName, _CellInstanceConnectionName);
|
|
||||||
if (!Directory.Exists(directory))
|
|
||||||
_ = Directory.CreateDirectory(directory);
|
|
||||||
string file = Path.Combine(directory, string.Concat(_Logistics.MesEntity, "_", _Logistics.Sequence, ".ipdsf"));
|
|
||||||
string lines = ProcessDataStandardFormat.GetPDSFText(fileRead, _Logistics, jsonElements, logisticsText: string.Empty);
|
|
||||||
File.WriteAllText(file, lines);
|
|
||||||
if (_Logistics.TotalSecondsSinceLastWriteTimeFromSequence > 600)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{ File.SetLastWriteTime(file, _Logistics.DateTimeFromSequence); }
|
|
||||||
catch (Exception) { }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void WaitForThread(Thread thread, List<Exception> threadExceptions)
|
protected void WaitForThread(Thread thread, List<Exception> threadExceptions)
|
||||||
|
@ -61,8 +61,8 @@ internal class ProcessDataStandardFormat
|
|||||||
internal static string Archive(bool addSpaces = true, char separator = ' ') =>
|
internal static string Archive(bool addSpaces = true, char separator = ' ') =>
|
||||||
GetString(SearchFor.Archive, addSpaces, separator);
|
GetString(SearchFor.Archive, addSpaces, separator);
|
||||||
|
|
||||||
internal static ProcessDataStandardFormat GetEmpty() =>
|
internal static ProcessDataStandardFormat GetEmpty(Logistics logistics) =>
|
||||||
new(new(Array.Empty<string>()), new(Array.Empty<string>()), new(Array.Empty<string>()), new(Array.Empty<string>()), null, new(new string[] { "LOGISTICS_1" }), null);
|
new(new(Array.Empty<string>()), new(Array.Empty<string>()), new(Array.Empty<string>()), new(Array.Empty<string>()), null, new(logistics.Logistics1), null);
|
||||||
|
|
||||||
internal static List<string> PDSFToFixedWidth(string reportFullPath)
|
internal static List<string> PDSFToFixedWidth(string reportFullPath)
|
||||||
{
|
{
|
||||||
@ -136,6 +136,7 @@ internal class ProcessDataStandardFormat
|
|||||||
internal static ProcessDataStandardFormat GetProcessDataStandardFormat(string reportFullPath, string[]? lines = null, int columnsLine = 6)
|
internal static ProcessDataStandardFormat GetProcessDataStandardFormat(string reportFullPath, string[]? lines = null, int columnsLine = 6)
|
||||||
{
|
{
|
||||||
ProcessDataStandardFormat result;
|
ProcessDataStandardFormat result;
|
||||||
|
long? sequence;
|
||||||
string segment;
|
string segment;
|
||||||
string[] segments;
|
string[] segments;
|
||||||
bool addToFooter = false;
|
bool addToFooter = false;
|
||||||
@ -186,13 +187,25 @@ internal class ProcessDataStandardFormat
|
|||||||
}
|
}
|
||||||
string? linesOne = lines.Length > 0 && body.Count == 0 && columns.Count == 0 ? lines[1] : null;
|
string? linesOne = lines.Length > 0 && body.Count == 0 && columns.Count == 0 ? lines[1] : null;
|
||||||
logistics = GetLogistics(footer, linesOne: linesOne);
|
logistics = GetLogistics(footer, linesOne: linesOne);
|
||||||
|
if (logistics.Count == 0)
|
||||||
|
sequence = null;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
segments = logistics[0].Split(new string[] { "SEQUENCE=" }, StringSplitOptions.None);
|
||||||
|
sequence = segments.Length < 2 || !long.TryParse(segments[1].Split(';')[0], out long s) ? null : s;
|
||||||
|
}
|
||||||
|
if (sequence is null && !string.IsNullOrEmpty(reportFullPath))
|
||||||
|
{
|
||||||
|
FileInfo fileInfo = new(reportFullPath);
|
||||||
|
sequence = fileInfo.LastWriteTime.Ticks;
|
||||||
|
}
|
||||||
result = new(body: body.AsReadOnly(),
|
result = new(body: body.AsReadOnly(),
|
||||||
columns: columns.AsReadOnly(),
|
columns: columns.AsReadOnly(),
|
||||||
footer: footer.AsReadOnly(),
|
footer: footer.AsReadOnly(),
|
||||||
header: header.AsReadOnly(),
|
header: header.AsReadOnly(),
|
||||||
inputPDSF: null,
|
inputPDSF: null,
|
||||||
logistics: logistics,
|
logistics: logistics,
|
||||||
sequence: null);
|
sequence: sequence);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,28 +227,29 @@ internal class ProcessDataStandardFormat
|
|||||||
return results.AsReadOnly();
|
return results.AsReadOnly();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static ProcessDataStandardFormat? GetProcessDataStandardFormat(string reportFullPath, ProcessDataStandardFormatMapping pdsfMapping)
|
internal static ProcessDataStandardFormat GetProcessDataStandardFormat(string reportFullPath, ProcessDataStandardFormatMapping pdsfMapping)
|
||||||
{
|
{
|
||||||
ProcessDataStandardFormat? result;
|
ProcessDataStandardFormat result;
|
||||||
const int columnsLine = 6;
|
const int columnsLine = 6;
|
||||||
FileInfo fileInfo = new(reportFullPath);
|
FileInfo fileInfo = new(reportFullPath);
|
||||||
ProcessDataStandardFormat processDataStandardFormat = GetProcessDataStandardFormat(fileInfo.LastWriteTime, pdsfMapping.NewColumnNames.Count, columnsLine, fileInfo.FullName, lines: null);
|
ProcessDataStandardFormat processDataStandardFormat = GetProcessDataStandardFormat(fileInfo.LastWriteTime, columnsLine, fileInfo.FullName, lines: null);
|
||||||
JsonElement[]? jsonElements = GetArray(pdsfMapping.NewColumnNames.Count, processDataStandardFormat, lookForNumbers: false);
|
JsonElement[]? jsonElements = pdsfMapping.OldColumnNames.Count != pdsfMapping.ColumnIndices.Count ? null : GetFullArray(processDataStandardFormat);
|
||||||
if (jsonElements is null || jsonElements.Length == 0 || pdsfMapping.OldColumnNames.Count != pdsfMapping.ColumnIndices.Count)
|
JsonProperty[]? jsonProperties = jsonElements is null || jsonElements.Length == 0 ? null : jsonElements[0].EnumerateObject().ToArray();
|
||||||
result = null;
|
if (jsonElements is null || jsonProperties is null || jsonProperties.Length != pdsfMapping.NewColumnNames.Count)
|
||||||
|
result = processDataStandardFormat;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = GetProcessDataStandardFormat(pdsfMapping, jsonElements, processDataStandardFormat);
|
result = GetProcessDataStandardFormat(pdsfMapping, jsonElements, processDataStandardFormat);
|
||||||
if (result.Sequence is null || result.Columns.Count == 0 || result.Body.Count == 0 || result.Logistics.Count == 0)
|
if (result.Sequence is null || result.Columns.Count == 0 || result.Body.Count == 0 || result.Logistics.Count == 0)
|
||||||
result = null;
|
result = processDataStandardFormat;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ProcessDataStandardFormat GetProcessDataStandardFormat(DateTime lastWriteTime, int expectedColumns, int columnsLine, string path, string[]? lines)
|
private static ProcessDataStandardFormat GetProcessDataStandardFormat(DateTime lastWriteTime, int columnsLine, string path, string[]? lines)
|
||||||
{
|
{
|
||||||
ProcessDataStandardFormat result;
|
ProcessDataStandardFormat result;
|
||||||
long sequence;
|
long? sequence;
|
||||||
string[] segments;
|
string[] segments;
|
||||||
bool addToFooter = false;
|
bool addToFooter = false;
|
||||||
List<string> body = new();
|
List<string> body = new();
|
||||||
@ -248,8 +262,6 @@ internal class ProcessDataStandardFormat
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
segments = lines[columnsLine].Split('\t');
|
segments = lines[columnsLine].Split('\t');
|
||||||
if (segments.Length != expectedColumns)
|
|
||||||
segments = Array.Empty<string>();
|
|
||||||
for (int i = 0; i < columnsLine; i++)
|
for (int i = 0; i < columnsLine; i++)
|
||||||
header.Add(lines[i]);
|
header.Add(lines[i]);
|
||||||
}
|
}
|
||||||
@ -269,12 +281,13 @@ internal class ProcessDataStandardFormat
|
|||||||
}
|
}
|
||||||
logistics = GetLogistics(footer, linesOne: null);
|
logistics = GetLogistics(footer, linesOne: null);
|
||||||
if (logistics.Count == 0)
|
if (logistics.Count == 0)
|
||||||
sequence = lastWriteTime.Ticks;
|
sequence = null;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
segments = logistics[0].Split(new string[] { "SEQUENCE=" }, StringSplitOptions.None);
|
segments = logistics[0].Split(new string[] { "SEQUENCE=" }, StringSplitOptions.None);
|
||||||
sequence = segments.Length < 2 || !long.TryParse(segments[1].Split(';')[0], out long s) ? lastWriteTime.Ticks : s;
|
sequence = segments.Length < 2 || !long.TryParse(segments[1].Split(';')[0], out long s) ? null : s;
|
||||||
}
|
}
|
||||||
|
sequence ??= lastWriteTime.Ticks;
|
||||||
result = new(body: body.AsReadOnly(),
|
result = new(body: body.AsReadOnly(),
|
||||||
columns: new(columns),
|
columns: new(columns),
|
||||||
footer: footer.AsReadOnly(),
|
footer: footer.AsReadOnly(),
|
||||||
@ -285,7 +298,7 @@ internal class ProcessDataStandardFormat
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static JsonElement[]? GetArray(int expectedColumns, ProcessDataStandardFormat processDataStandardFormat, bool lookForNumbers)
|
private static JsonElement[]? GetFullArray(ProcessDataStandardFormat processDataStandardFormat)
|
||||||
{
|
{
|
||||||
JsonElement[]? results;
|
JsonElement[]? results;
|
||||||
if (processDataStandardFormat.Body.Count == 0 || !processDataStandardFormat.Body[0].Contains('\t'))
|
if (processDataStandardFormat.Body.Count == 0 || !processDataStandardFormat.Body[0].Contains('\t'))
|
||||||
@ -293,36 +306,18 @@ internal class ProcessDataStandardFormat
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
string value;
|
string value;
|
||||||
string[] segments;
|
List<string> segments;
|
||||||
List<string> lines = new();
|
List<string> lines = new();
|
||||||
StringBuilder stringBuilder = new();
|
StringBuilder stringBuilder = new();
|
||||||
foreach (string bodyLine in processDataStandardFormat.Body)
|
foreach (string bodyLine in processDataStandardFormat.Body)
|
||||||
{
|
{
|
||||||
_ = stringBuilder.Clear();
|
_ = stringBuilder.Clear();
|
||||||
_ = stringBuilder.Append('{');
|
_ = stringBuilder.Append('{');
|
||||||
segments = bodyLine.Split('\t');
|
segments = bodyLine.Split('\t').ToList();
|
||||||
if (segments.Length != expectedColumns)
|
for (int c = 0; c < segments.Count; c++)
|
||||||
continue;
|
|
||||||
if (!lookForNumbers)
|
|
||||||
{
|
{
|
||||||
for (int c = 0; c < segments.Length; c++)
|
value = segments[c].Replace("\\", "\\\\").Replace("\"", "\\\"");
|
||||||
{
|
_ = stringBuilder.Append('"').Append(processDataStandardFormat.Columns[c]).Append("\":\"").Append(value).Append("\",");
|
||||||
value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\");
|
|
||||||
_ = stringBuilder.Append('"').Append(processDataStandardFormat.Columns[c]).Append("\":\"").Append(value).Append("\",");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (int c = 0; c < segments.Length; c++)
|
|
||||||
{
|
|
||||||
value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\");
|
|
||||||
if (string.IsNullOrEmpty(value))
|
|
||||||
_ = stringBuilder.Append('"').Append(processDataStandardFormat.Columns[c]).Append("\":").Append(value).Append("null,");
|
|
||||||
else if (value.All(char.IsDigit))
|
|
||||||
_ = stringBuilder.Append('"').Append(processDataStandardFormat.Columns[c]).Append("\":").Append(value).Append(',');
|
|
||||||
else
|
|
||||||
_ = stringBuilder.Append('"').Append(processDataStandardFormat.Columns[c]).Append("\":\"").Append(value).Append("\",");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||||
_ = stringBuilder.AppendLine("}");
|
_ = stringBuilder.AppendLine("}");
|
||||||
@ -379,6 +374,125 @@ internal class ProcessDataStandardFormat
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string GetJson(ProcessDataStandardFormat processDataStandardFormat)
|
||||||
|
{
|
||||||
|
if (processDataStandardFormat.InputPDSF is null)
|
||||||
|
throw new NullReferenceException(nameof(processDataStandardFormat.InputPDSF));
|
||||||
|
#pragma warning disable CA1845, IDE0057
|
||||||
|
string result;
|
||||||
|
string line;
|
||||||
|
string value;
|
||||||
|
string[] segments;
|
||||||
|
List<string> lines = new();
|
||||||
|
for (int i = 0; i < processDataStandardFormat.InputPDSF.Body.Count; i++)
|
||||||
|
{
|
||||||
|
line = "{";
|
||||||
|
segments = processDataStandardFormat.InputPDSF.Body[i].Trim().Split('\t');
|
||||||
|
if (segments.Length != processDataStandardFormat.InputPDSF.Columns.Count)
|
||||||
|
break;
|
||||||
|
for (int c = 0; c < segments.Length; c++)
|
||||||
|
{
|
||||||
|
value = segments[c].Replace("\\", "\\\\").Replace("\"", "\\\"");
|
||||||
|
line += string.Concat('"', processDataStandardFormat.InputPDSF.Columns[c].Trim('"'), '"', ':', '"', value, '"', ',');
|
||||||
|
}
|
||||||
|
line = string.Concat(line.Substring(0, line.Length - 1), '}');
|
||||||
|
lines.Add(line);
|
||||||
|
}
|
||||||
|
string? json = null;
|
||||||
|
if (processDataStandardFormat.Footer is not null && processDataStandardFormat.Footer.Count > 0) {
|
||||||
|
Dictionary<string, string> footerKeyValuePairs = GetFooterKeyValuePairs(processDataStandardFormat.Footer);
|
||||||
|
Dictionary<string, Dictionary<string, string>> logisticKeyValuePairs = GetLogisticKeyValuePairs(processDataStandardFormat.Footer, footerKeyValuePairs);
|
||||||
|
json = JsonSerializer.Serialize(logisticKeyValuePairs, DictionaryStringDictionaryStringStringSourceGenerationContext.Default.DictionaryStringDictionaryStringString);
|
||||||
|
}
|
||||||
|
string footerText = string.IsNullOrEmpty(json) || json == "{}" ? string.Empty : $",{Environment.NewLine}\"PDSF\":{Environment.NewLine}{json}";
|
||||||
|
result = string.Concat(
|
||||||
|
'{',
|
||||||
|
Environment.NewLine,
|
||||||
|
'"',
|
||||||
|
"Count",
|
||||||
|
'"',
|
||||||
|
": ",
|
||||||
|
processDataStandardFormat.Body.Count,
|
||||||
|
',',
|
||||||
|
Environment.NewLine,
|
||||||
|
'"',
|
||||||
|
"Records",
|
||||||
|
'"',
|
||||||
|
": ",
|
||||||
|
Environment.NewLine,
|
||||||
|
'[',
|
||||||
|
Environment.NewLine,
|
||||||
|
string.Join($",{Environment.NewLine}", lines),
|
||||||
|
Environment.NewLine,
|
||||||
|
']',
|
||||||
|
',',
|
||||||
|
Environment.NewLine,
|
||||||
|
'"',
|
||||||
|
"Sequence",
|
||||||
|
'"',
|
||||||
|
": ",
|
||||||
|
processDataStandardFormat.Sequence,
|
||||||
|
Environment.NewLine,
|
||||||
|
footerText,
|
||||||
|
Environment.NewLine,
|
||||||
|
'}');
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Dictionary<string, string> GetFooterKeyValuePairs(ReadOnlyCollection<string> footerLines) {
|
||||||
|
Dictionary<string, string> results = new();
|
||||||
|
string[] segments;
|
||||||
|
foreach (string footerLine in footerLines) {
|
||||||
|
segments = footerLine.Split('\t');
|
||||||
|
if (segments.Length != 2 || string.IsNullOrEmpty(segments[1].Trim())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (segments[1].Contains(';')) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
results.Add(segments[0], segments[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Dictionary<string, Dictionary<string, string>> GetLogisticKeyValuePairs(ReadOnlyCollection<string> footerLines, Dictionary<string, string> footerKeyValuePairs) {
|
||||||
|
Dictionary<string, Dictionary<string, string>> results = new();
|
||||||
|
string[] segments;
|
||||||
|
string[] subSegments;
|
||||||
|
string[] subSubSegments;
|
||||||
|
Dictionary<string, string>? keyValue;
|
||||||
|
results.Add("Footer", footerKeyValuePairs);
|
||||||
|
foreach (string footerLine in footerLines) {
|
||||||
|
segments = footerLine.Split('\t');
|
||||||
|
if (segments.Length != 2 || string.IsNullOrEmpty(segments[1].Trim())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!segments[1].Contains(';') || !segments[1].Contains('=')) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
subSegments = segments[1].Split(';');
|
||||||
|
if (subSegments.Length < 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!results.TryGetValue(segments[0], out keyValue)) {
|
||||||
|
results.Add(segments[0], new());
|
||||||
|
if (!results.TryGetValue(segments[0], out keyValue)) {
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach (string segment in subSegments) {
|
||||||
|
subSubSegments = segment.Split('=');
|
||||||
|
if (subSubSegments.Length != 2) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
keyValue.Add(subSubSegments[0], subSubSegments[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
internal static void Write(string path, ProcessDataStandardFormat processDataStandardFormat, List<Metrology.WS.Results>? wsResults)
|
internal static void Write(string path, ProcessDataStandardFormat processDataStandardFormat, List<Metrology.WS.Results>? wsResults)
|
||||||
{
|
{
|
||||||
List<string> results = new();
|
List<string> results = new();
|
||||||
@ -418,9 +532,10 @@ internal class ProcessDataStandardFormat
|
|||||||
results.Add($"{segments[0]}\t{segments[1][0]}_HeaderId={wsResults[0].HeaderId};{segments[1][0]}_SubgroupId={wsResults[0].SubgroupId};{segments[1]}");
|
results.Add($"{segments[0]}\t{segments[1][0]}_HeaderId={wsResults[0].HeaderId};{segments[1][0]}_SubgroupId={wsResults[0].SubgroupId};{segments[1]}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
results.Add("EOF");
|
results.Add("END_HEADER");
|
||||||
if (processDataStandardFormat.InputPDSF is not null)
|
if (processDataStandardFormat.InputPDSF is not null)
|
||||||
{
|
{
|
||||||
|
results.Add(string.Empty);
|
||||||
List<char> hyphens = new();
|
List<char> hyphens = new();
|
||||||
results.AddRange(processDataStandardFormat.InputPDSF.Header.Select(l => l.Replace('\t', '|')));
|
results.AddRange(processDataStandardFormat.InputPDSF.Header.Select(l => l.Replace('\t', '|')));
|
||||||
results.Add(string.Empty);
|
results.Add(string.Empty);
|
||||||
@ -431,6 +546,11 @@ internal class ProcessDataStandardFormat
|
|||||||
results.AddRange(processDataStandardFormat.InputPDSF.Body.Select(l => l.Replace('\t', '|')));
|
results.AddRange(processDataStandardFormat.InputPDSF.Body.Select(l => l.Replace('\t', '|')));
|
||||||
results.Add(string.Empty);
|
results.Add(string.Empty);
|
||||||
results.AddRange(processDataStandardFormat.InputPDSF.Footer.Select(l => l.Replace('\t', '|')));
|
results.AddRange(processDataStandardFormat.InputPDSF.Footer.Select(l => l.Replace('\t', '|')));
|
||||||
|
results.Add(string.Empty);
|
||||||
|
results.Add("EOF");
|
||||||
|
results.Add(string.Empty);
|
||||||
|
string json = GetJson(processDataStandardFormat);
|
||||||
|
results.Add(json);
|
||||||
}
|
}
|
||||||
File.WriteAllText(path, string.Join(Environment.NewLine, results));
|
File.WriteAllText(path, string.Join(Environment.NewLine, results));
|
||||||
}
|
}
|
||||||
@ -474,7 +594,7 @@ internal class ProcessDataStandardFormat
|
|||||||
{
|
{
|
||||||
for (int c = 1; c < segments.Length; c++)
|
for (int c = 1; c < segments.Length; c++)
|
||||||
{
|
{
|
||||||
value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\");
|
value = segments[c].Replace("\\", "\\\\").Replace("\"", "\\\"");
|
||||||
_ = stringBuilder.Append('"').Append(processDataStandardFormat.Columns[c]).Append("\":\"").Append(value).Append("\",");
|
_ = stringBuilder.Append('"').Append(processDataStandardFormat.Columns[c]).Append("\":\"").Append(value).Append("\",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -482,7 +602,7 @@ internal class ProcessDataStandardFormat
|
|||||||
{
|
{
|
||||||
for (int c = 1; c < segments.Length; c++)
|
for (int c = 1; c < segments.Length; c++)
|
||||||
{
|
{
|
||||||
value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\");
|
value = segments[c].Replace("\\", "\\\\").Replace("\"", "\\\"");
|
||||||
if (string.IsNullOrEmpty(value))
|
if (string.IsNullOrEmpty(value))
|
||||||
_ = stringBuilder.Append('"').Append(processDataStandardFormat.Columns[c]).Append("\":").Append(value).Append("null,");
|
_ = stringBuilder.Append('"').Append(processDataStandardFormat.Columns[c]).Append("\":").Append(value).Append("null,");
|
||||||
else if (value.All(char.IsDigit))
|
else if (value.All(char.IsDigit))
|
||||||
@ -719,4 +839,9 @@ internal class ProcessDataStandardFormat
|
|||||||
[JsonSerializable(typeof(JsonElement[]))]
|
[JsonSerializable(typeof(JsonElement[]))]
|
||||||
internal partial class JsonElementCollectionSourceGenerationContext : JsonSerializerContext
|
internal partial class JsonElementCollectionSourceGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
|
[JsonSerializable(typeof(Dictionary<string, Dictionary<string, string>>))]
|
||||||
|
internal partial class DictionaryStringDictionaryStringStringSourceGenerationContext : JsonSerializerContext {
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_59_0
|
||||||
using Adaptation._Tests.Shared;
|
using Adaptation._Tests.Shared;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_59_0
|
||||||
using Adaptation._Tests.Shared;
|
using Adaptation._Tests.Shared;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_59_0
|
||||||
using Adaptation._Tests.Shared;
|
using Adaptation._Tests.Shared;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
@ -0,0 +1,195 @@
|
|||||||
|
#if true
|
||||||
|
using Adaptation._Tests.Shared;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_60_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class MET08DDUPSP1TBI : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static string DummyRoot { get; private set; }
|
||||||
|
internal static MET08DDUPSP1TBI EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
static MET08DDUPSP1TBI() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||||
|
|
||||||
|
public MET08DDUPSP1TBI() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public MET08DDUPSP1TBI(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting ??= new MET08DDUPSP1TBI(testContext);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||||
|
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||||
|
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||||
|
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassCleanup()]
|
||||||
|
public static void ClassCleanup()
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||||
|
EAFLoggingUnitTesting?.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__MoveMatchingFiles()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__IQSSi()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__OpenInsight()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__APC()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__SPaCe()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__Processed()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__Archive()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__Dummy()
|
||||||
|
{
|
||||||
|
string check = "637400748000000000.zip";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__TIBCO()
|
||||||
|
{
|
||||||
|
string check = "*.idc";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
@ -0,0 +1,70 @@
|
|||||||
|
#if true
|
||||||
|
using Adaptation._Tests.Shared;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_60_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class SP101_EQPT : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static string DummyRoot { get; private set; }
|
||||||
|
internal static SP101_EQPT EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
static SP101_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||||
|
|
||||||
|
public SP101_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public SP101_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting ??= new SP101_EQPT(testContext);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||||
|
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||||
|
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||||
|
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassCleanup()]
|
||||||
|
public static void ClassCleanup()
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||||
|
EAFLoggingUnitTesting?.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void NonThrowTryCatch()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{ throw new Exception(); }
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__SP101_EQPT__MoveAllFiles()
|
||||||
|
{
|
||||||
|
string check = "*";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
@ -0,0 +1,65 @@
|
|||||||
|
#if true
|
||||||
|
using Adaptation._Tests.Shared;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_60_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class SP101 : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static string DummyRoot { get; private set; }
|
||||||
|
internal static SP101 EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
static SP101() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||||
|
|
||||||
|
public SP101() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public SP101(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting ??= new SP101(testContext);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||||
|
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||||
|
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||||
|
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassCleanup()]
|
||||||
|
public static void ClassCleanup()
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||||
|
EAFLoggingUnitTesting?.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__SP101__txt()
|
||||||
|
{
|
||||||
|
string check = "*.txt";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_59_0
|
||||||
using Adaptation.Shared;
|
using Adaptation.Shared;
|
||||||
using Adaptation.Shared.Methods;
|
using Adaptation.Shared.Methods;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_59_0
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|
||||||
namespace Adaptation._Tests.Extract.Production.v2_59_0;
|
namespace Adaptation._Tests.Extract.Production.v2_59_0;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#if true
|
#if v2_59_0
|
||||||
using Adaptation.Shared;
|
using Adaptation.Shared;
|
||||||
using Adaptation.Shared.Methods;
|
using Adaptation.Shared.Methods;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
148
Adaptation/_Tests/Extract/Production/v2.60.0/MET08DDUPSP1TBI.cs
Normal file
148
Adaptation/_Tests/Extract/Production/v2.60.0/MET08DDUPSP1TBI.cs
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
#if true
|
||||||
|
using Adaptation.Shared;
|
||||||
|
using Adaptation.Shared.Methods;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.Extract.Production.v2_60_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class MET08DDUPSP1TBI
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
private static CreateSelfDescription.Production.v2_60_0.MET08DDUPSP1TBI _MET08DDUPSP1TBI;
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
CreateSelfDescription.Production.v2_60_0.MET08DDUPSP1TBI.ClassInitialize(testContext);
|
||||||
|
_MET08DDUPSP1TBI = CreateSelfDescription.Production.v2_60_0.MET08DDUPSP1TBI.EAFLoggingUnitTesting;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void NonThrowTryCatch()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{ throw new Exception(); }
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__MoveMatchingFiles() => _MET08DDUPSP1TBI.Production__v2_60_0__MET08DDUPSP1TBI__MoveMatchingFiles();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__MoveMatchingFiles637955319879801344__Normal()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
bool validatePDSF = false;
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08DDUPSP1TBI.Production__v2_60_0__MET08DDUPSP1TBI__MoveMatchingFiles();
|
||||||
|
string[] variables = _MET08DDUPSP1TBI.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||||
|
IFileRead fileRead = _MET08DDUPSP1TBI.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer() => _MET08DDUPSP1TBI.Production__v2_60_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewer();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__IQSSi() => _MET08DDUPSP1TBI.Production__v2_60_0__MET08DDUPSP1TBI__IQSSi();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__OpenInsight() => _MET08DDUPSP1TBI.Production__v2_60_0__MET08DDUPSP1TBI__OpenInsight();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__OpenInsight638052814829645888__IqsSql()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08DDUPSP1TBI.Production__v2_60_0__MET08DDUPSP1TBI__OpenInsight();
|
||||||
|
string[] variables = _MET08DDUPSP1TBI.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
|
||||||
|
IFileRead fileRead = _MET08DDUPSP1TBI.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments() => _MET08DDUPSP1TBI.Production__v2_60_0__MET08DDUPSP1TBI__OpenInsightMetrologyViewerAttachments();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__APC() => _MET08DDUPSP1TBI.Production__v2_60_0__MET08DDUPSP1TBI__APC();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__SPaCe() => _MET08DDUPSP1TBI.Production__v2_60_0__MET08DDUPSP1TBI__SPaCe();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__Processed() => _MET08DDUPSP1TBI.Production__v2_60_0__MET08DDUPSP1TBI__Processed();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__Archive() => _MET08DDUPSP1TBI.Production__v2_60_0__MET08DDUPSP1TBI__Archive();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__Dummy() => _MET08DDUPSP1TBI.Production__v2_60_0__MET08DDUPSP1TBI__Dummy();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__TIBCO() => _MET08DDUPSP1TBI.Production__v2_60_0__MET08DDUPSP1TBI__TIBCO();
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08DDUPSP1TBI__TIBCO638217888620242702__Normal()
|
||||||
|
{
|
||||||
|
string check = "*.idc";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08DDUPSP1TBI.Production__v2_60_0__MET08DDUPSP1TBI__TIBCO();
|
||||||
|
string[] variables = _MET08DDUPSP1TBI.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
|
||||||
|
_ = _MET08DDUPSP1TBI.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
for (int i = 0; i < int.MaxValue; i++)
|
||||||
|
System.Threading.Thread.Sleep(500);
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
27
Adaptation/_Tests/Extract/Production/v2.60.0/SP101-EQPT.cs
Normal file
27
Adaptation/_Tests/Extract/Production/v2.60.0/SP101-EQPT.cs
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#if true
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.Extract.Production.v2_60_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class SP101_EQPT
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
private static CreateSelfDescription.Production.v2_60_0.SP101_EQPT _SP101_EQPT;
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
CreateSelfDescription.Production.v2_60_0.SP101_EQPT.ClassInitialize(testContext);
|
||||||
|
_SP101_EQPT = CreateSelfDescription.Production.v2_60_0.SP101_EQPT.EAFLoggingUnitTesting;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__SP101_EQPT__MoveAllFiles() => _SP101_EQPT.Production__v2_60_0__SP101_EQPT__MoveAllFiles();
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
58
Adaptation/_Tests/Extract/Production/v2.60.0/SP101.cs
Normal file
58
Adaptation/_Tests/Extract/Production/v2.60.0/SP101.cs
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
#if true
|
||||||
|
using Adaptation.Shared;
|
||||||
|
using Adaptation.Shared.Methods;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.Extract.Production.v2_60_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class SP101
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
private static CreateSelfDescription.Production.v2_60_0.SP101 _SP101;
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
CreateSelfDescription.Production.v2_60_0.SP101.ClassInitialize(testContext);
|
||||||
|
_SP101 = CreateSelfDescription.Production.v2_60_0.SP101.EAFLoggingUnitTesting;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void NonThrowTryCatch()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{ throw new Exception(); }
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__SP101__txt() => _SP101.Production__v2_60_0__SP101__txt();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__SP101__txt637955319879801344__Normal()
|
||||||
|
{
|
||||||
|
string check = "*.txt";
|
||||||
|
bool validatePDSF = false;
|
||||||
|
_SP101.Production__v2_60_0__SP101__txt();
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
string[] variables = _SP101.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||||
|
IFileRead fileRead = _SP101.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
@ -1182,7 +1182,7 @@ public class AdaptationTesting : ISMTP
|
|||||||
Assert.IsNotNull(extractResult.Item3);
|
Assert.IsNotNull(extractResult.Item3);
|
||||||
Assert.IsNotNull(extractResult.Item4);
|
Assert.IsNotNull(extractResult.Item4);
|
||||||
if (!validatePDSF)
|
if (!validatePDSF)
|
||||||
_ = GetProcessDataStandardFormat(fileRead, logistics, extractResult, ProcessDataStandardFormat.GetEmpty());
|
_ = GetProcessDataStandardFormat(fileRead, logistics, extractResult, ProcessDataStandardFormat.GetEmpty(logistics));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Assert.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!");
|
Assert.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!");
|
||||||
|
@ -52,44 +52,57 @@ public class Job : LoggingUnitTesting, IDisposable
|
|||||||
{
|
{
|
||||||
string mid;
|
string mid;
|
||||||
FileHandlers.TIBCO.Transport.Job job;
|
FileHandlers.TIBCO.Transport.Job job;
|
||||||
|
DateTime enteredDateTimeFilter = new(2023, 05, 01);
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
DateTime loadSignatureDateTimeFilter = new(2023, 05, 01);
|
||||||
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
||||||
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
||||||
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
||||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
|
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
|
||||||
mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"12-123456-1234\", \"Recipe\": \"Recipe\"}";
|
mid = """
|
||||||
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
|
{"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "CDE4", "Sequence": "123456789", "MID": "12-123456-1234", "Recipe": "Recipe"}
|
||||||
|
""";
|
||||||
|
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "21");
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "21");
|
||||||
Assert.AreEqual("123456", job.LotName);
|
Assert.AreEqual("123456", job.LotName);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4609");
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4609");
|
||||||
mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"12-1234567-1234\", \"Recipe\": \"Recipe\"}";
|
mid = """
|
||||||
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
|
{"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "CDE4", "Sequence": "123456789", "MID": "12-1234567-1234", "Recipe": "Recipe"}
|
||||||
|
""";
|
||||||
|
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "21");
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "21");
|
||||||
Assert.AreEqual("1234567", job.LotName);
|
Assert.AreEqual("1234567", job.LotName);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4609");
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4609");
|
||||||
mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"-544481-\", \"Recipe\": \"Recipe\"}";
|
mid = """
|
||||||
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
|
{"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "CDE4", "Sequence": "123456789", "MID": "-544481-", "Recipe": "Recipe"}
|
||||||
|
""";
|
||||||
|
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "51");
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "51");
|
||||||
Assert.AreEqual("544481", job.LotName);
|
Assert.AreEqual("544481", job.LotName);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "5158");
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "5158");
|
||||||
mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-544481-0000\", \"Recipe\": \"Recipe\"}";
|
mid = """
|
||||||
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
|
{"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "CDE4", "Sequence": "123456789", "MID": "00-544481-0000", "Recipe": "Recipe"}
|
||||||
|
""";
|
||||||
|
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "51");
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "51");
|
||||||
Assert.AreEqual("544481", job.LotName);
|
Assert.AreEqual("544481", job.LotName);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "5158");
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "5158");
|
||||||
mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"00-o171308.1.51-0000\", \"Recipe\": \"Recipe\", \"Slot\": \"11\"}";
|
mid = """
|
||||||
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
|
{"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "CDE4", "Sequence": "123456789", "MID": "00-o171308.1.51-0000", "Recipe": "Recipe", "Slot": "11"}
|
||||||
|
""";
|
||||||
|
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "54");
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "54");
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "547000");
|
Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "547000");
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4445");
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4445");
|
||||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE5\", \"Sequence\": \"638163023363575829\", \"MID\": \"B48\", \"Recipe\": \"lsl_6in \"}";
|
mid = """
|
||||||
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
|
{"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "CDE5", "Sequence": "638163023363575829", "MID": "B48", "Recipe": "lsl_6in "}
|
||||||
|
""";
|
||||||
|
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "54");
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "54");
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "547000");
|
Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "547000");
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4445");
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "4445");
|
||||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
|
||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,16 +112,19 @@ public class Job : LoggingUnitTesting, IDisposable
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void TestJobAA()
|
public void TestJobAA()
|
||||||
{
|
{
|
||||||
string mid;
|
|
||||||
FileHandlers.TIBCO.Transport.Job job;
|
FileHandlers.TIBCO.Transport.Job job;
|
||||||
|
DateTime enteredDateTimeFilter = new(2023, 05, 01);
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
DateTime loadSignatureDateTimeFilter = new(2023, 05, 01);
|
||||||
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
||||||
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
||||||
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
||||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
|
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
|
||||||
mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08THFTIRQS408M\", \"MesEntity\": \"BIORAD2\", \"Sequence\": \"123456789\", \"MID\": \"37--\", \"Recipe\": \"Recipe\"}";
|
string mid = """
|
||||||
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
|
{"Area": "Si", "EquipmentType": "MET08THFTIRQS408M", "MesEntity": "BIORAD2", "Sequence": "123456789", "MID": "37--", "Recipe": "Recipe"}
|
||||||
|
""";
|
||||||
|
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter);
|
||||||
Assert.AreEqual("37", job.ProcessType);
|
Assert.AreEqual("37", job.ProcessType);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "549918");
|
Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "549918");
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "5101");
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "5101");
|
||||||
@ -123,14 +139,18 @@ public class Job : LoggingUnitTesting, IDisposable
|
|||||||
public void TestJobB()
|
public void TestJobB()
|
||||||
{
|
{
|
||||||
FileHandlers.TIBCO.Transport.Job job;
|
FileHandlers.TIBCO.Transport.Job job;
|
||||||
|
DateTime enteredDateTimeFilter = new(2023, 05, 01);
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
DateTime loadSignatureDateTimeFilter = new(2023, 05, 01);
|
||||||
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
||||||
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
||||||
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
||||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
|
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
|
||||||
string mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"CDE4\", \"Sequence\": \"123456789\", \"MID\": \"P1234\", \"Recipe\": \"Recipe\"}";
|
string mid = """
|
||||||
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
|
{"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "CDE4", "Sequence": "123456789", "MID": "P1234", "Recipe": "Recipe"}
|
||||||
|
""";
|
||||||
|
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
|
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
|
||||||
@ -145,14 +165,18 @@ public class Job : LoggingUnitTesting, IDisposable
|
|||||||
public void TestJobC()
|
public void TestJobC()
|
||||||
{
|
{
|
||||||
FileHandlers.TIBCO.Transport.Job job;
|
FileHandlers.TIBCO.Transport.Job job;
|
||||||
|
DateTime enteredDateTimeFilter = new(2023, 05, 01);
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
DateTime loadSignatureDateTimeFilter = new(2023, 05, 01);
|
||||||
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
||||||
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
||||||
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
||||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
|
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
|
||||||
string mid = "{\"Area\": \"Si\", \"EquipmentType\": \"MET08RESIMAPCDE\", \"MesEntity\": \"BIORAD3\", \"Sequence\": \"638234699589174855\", \"MID\": \"33--\", \"Recipe\": \"Recipe\"}";
|
string mid = """
|
||||||
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
|
{"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "BIORAD3", "Sequence": "638234699589174855", "MID": "33--", "Recipe": "Recipe"}
|
||||||
|
""";
|
||||||
|
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
|
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
|
||||||
@ -167,15 +191,18 @@ public class Job : LoggingUnitTesting, IDisposable
|
|||||||
public void TestJobD()
|
public void TestJobD()
|
||||||
{
|
{
|
||||||
FileHandlers.TIBCO.Transport.Job job;
|
FileHandlers.TIBCO.Transport.Job job;
|
||||||
|
DateTime enteredDateTimeFilter = new(2023, 05, 01);
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
string metrologyFileShare =
|
DateTime loadSignatureDateTimeFilter = new(2023, 05, 01);
|
||||||
FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
||||||
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
||||||
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
||||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
|
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
|
||||||
string mid = "{\"Area\": \"Si\", \"EquipmentType\": \"DEP08CEPIEPSILON\", \"MesEntity\": \"R32\", \"Sequence\": \"\", \"MID\": \"32--\", \"Recipe\": \"Recipe\"}";
|
string mid = """
|
||||||
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
|
{"Area": "Si", "EquipmentType": "DEP08CEPIEPSILON", "MesEntity": "R32", "Sequence": "", "MID": "32--", "Recipe": "Recipe"}
|
||||||
|
""";
|
||||||
|
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
|
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
|
||||||
@ -191,7 +218,9 @@ public class Job : LoggingUnitTesting, IDisposable
|
|||||||
public void TestJobE()
|
public void TestJobE()
|
||||||
{
|
{
|
||||||
FileHandlers.TIBCO.Transport.Job job;
|
FileHandlers.TIBCO.Transport.Job job;
|
||||||
|
DateTime enteredDateTimeFilter = new(2023, 05, 01);
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
DateTime loadSignatureDateTimeFilter = new(2023, 05, 01);
|
||||||
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
||||||
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
||||||
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
||||||
@ -200,7 +229,7 @@ public class Job : LoggingUnitTesting, IDisposable
|
|||||||
string mid = """
|
string mid = """
|
||||||
{"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "CDE5", "Sequence": "638756365880000000", "MID": "38-660275-5095.1", "Recipe": "IRC6mm"}
|
{"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "CDE5", "Sequence": "638756365880000000", "MID": "38-660275-5095.1", "Recipe": "IRC6mm"}
|
||||||
""";
|
""";
|
||||||
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
|
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
|
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
|
||||||
@ -216,7 +245,9 @@ public class Job : LoggingUnitTesting, IDisposable
|
|||||||
public void TestJobF()
|
public void TestJobF()
|
||||||
{
|
{
|
||||||
FileHandlers.TIBCO.Transport.Job job;
|
FileHandlers.TIBCO.Transport.Job job;
|
||||||
|
DateTime enteredDateTimeFilter = new(2023, 05, 01);
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
DateTime loadSignatureDateTimeFilter = new(2023, 05, 01);
|
||||||
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
||||||
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
||||||
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
||||||
@ -225,7 +256,7 @@ public class Job : LoggingUnitTesting, IDisposable
|
|||||||
string mid = """
|
string mid = """
|
||||||
{"Area": "Si", "EquipmentType": "MET08THFTIRQS408M", "MesEntity": "BIORAD2", "Sequence": "638757112479659597", "MID": "173308.1.5", "Recipe": "6inTHICK"}
|
{"Area": "Si", "EquipmentType": "MET08THFTIRQS408M", "MesEntity": "BIORAD2", "Sequence": "638757112479659597", "MID": "173308.1.5", "Recipe": "6inTHICK"}
|
||||||
""";
|
""";
|
||||||
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
|
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
|
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
|
||||||
@ -241,7 +272,9 @@ public class Job : LoggingUnitTesting, IDisposable
|
|||||||
public void TestJobG()
|
public void TestJobG()
|
||||||
{
|
{
|
||||||
FileHandlers.TIBCO.Transport.Job job;
|
FileHandlers.TIBCO.Transport.Job job;
|
||||||
|
DateTime enteredDateTimeFilter = new(2023, 05, 01);
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
DateTime loadSignatureDateTimeFilter = new(2023, 05, 01);
|
||||||
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
||||||
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
||||||
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
||||||
@ -250,7 +283,7 @@ public class Job : LoggingUnitTesting, IDisposable
|
|||||||
string mid = """
|
string mid = """
|
||||||
{"Area": "Si", "EquipmentType": "MET08DDUPSFS6420", "MesEntity": "TENCOR1", "Sequence": "638765945581765554", "MID": "1T661282", "Recipe": "8IN_THIN ROTR"}
|
{"Area": "Si", "EquipmentType": "MET08DDUPSFS6420", "MesEntity": "TENCOR1", "Sequence": "638765945581765554", "MID": "1T661282", "Recipe": "8IN_THIN ROTR"}
|
||||||
""";
|
""";
|
||||||
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
|
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
|
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
|
||||||
@ -266,7 +299,9 @@ public class Job : LoggingUnitTesting, IDisposable
|
|||||||
public void TestJobH()
|
public void TestJobH()
|
||||||
{
|
{
|
||||||
FileHandlers.TIBCO.Transport.Job job;
|
FileHandlers.TIBCO.Transport.Job job;
|
||||||
|
DateTime enteredDateTimeFilter = new(2023, 05, 01);
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
DateTime loadSignatureDateTimeFilter = new(2023, 05, 01);
|
||||||
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
||||||
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
||||||
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
||||||
@ -275,7 +310,7 @@ public class Job : LoggingUnitTesting, IDisposable
|
|||||||
string mid = """
|
string mid = """
|
||||||
{"Area": "Si", "EquipmentType": "MET08DDUPSFS6420", "MesEntity": "TENCOR1", "Sequence": "638765945581765554", "MID": "AK1PL2", "Recipe": "8INCLEAN"}
|
{"Area": "Si", "EquipmentType": "MET08DDUPSFS6420", "MesEntity": "TENCOR1", "Sequence": "638765945581765554", "MID": "AK1PL2", "Recipe": "8INCLEAN"}
|
||||||
""";
|
""";
|
||||||
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid);
|
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter);
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType));
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
|
Assert.IsFalse(string.IsNullOrEmpty(job.LotName));
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName));
|
||||||
@ -284,4 +319,28 @@ public class Job : LoggingUnitTesting, IDisposable
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void TestJobI()
|
||||||
|
{
|
||||||
|
FileHandlers.TIBCO.Transport.Job job;
|
||||||
|
DateTime enteredDateTimeFilter = new(2023, 05, 01);
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
DateTime loadSignatureDateTimeFilter = new(2023, 05, 01);
|
||||||
|
string metrologyFileShare = FileHandlers.TIBCO.FileRead.MetrologyFileShare;
|
||||||
|
string barcodeHostFileShare = FileHandlers.TIBCO.FileRead.BarcodeHostFileShare;
|
||||||
|
string lsl2SQLConnectionString = FileHandlers.TIBCO.FileRead.LSL2SQLConnectionString;
|
||||||
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
HttpClient httpClient = new() { BaseAddress = new(FileHandlers.TIBCO.FileRead.OpenInsightApplicationProgrammingInterface) };
|
||||||
|
string mid = """
|
||||||
|
{"Area": "Si", "EquipmentType": "MET08RESIMAPCDE", "MesEntity": "CDE5", "Sequence": "638163023363575829", "MID": "23-111111-5053", "Recipe": "lsl_6in "}
|
||||||
|
""";
|
||||||
|
job = new(lsl2SQLConnectionString, metrologyFileShare, barcodeHostFileShare, httpClient, mid, enteredDateTimeFilter, loadSignatureDateTimeFilter);
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProcessType)); // == "23");
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(job.LotName)); // == "111111");
|
||||||
|
Assert.IsFalse(string.IsNullOrEmpty(job.ProductName)); // == "5053");
|
||||||
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -64,7 +64,7 @@ public class MET08DDUPSP1TBI : LoggingUnitTesting, IDisposable
|
|||||||
StringBuilder results = new();
|
StringBuilder results = new();
|
||||||
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
||||||
{
|
{
|
||||||
new("MET08DDUPSP1TBI", "v2.59.0"),
|
new("MET08DDUPSP1TBI", "v2.60.0"),
|
||||||
};
|
};
|
||||||
string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2";
|
string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2";
|
||||||
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
||||||
|
@ -203,8 +203,8 @@ public class TXT : LoggingUnitTesting, IDisposable
|
|||||||
StringBuilder results = new();
|
StringBuilder results = new();
|
||||||
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
||||||
{
|
{
|
||||||
new("SP101", "v2.59.0"),
|
new("SP101", "v2.60.0"),
|
||||||
new("SP101-EQPT", "v2.59.0"),
|
new("SP101-EQPT", "v2.60.0"),
|
||||||
};
|
};
|
||||||
string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2";
|
string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2";
|
||||||
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
||||||
|
@ -196,13 +196,13 @@
|
|||||||
<Version>7.2.4630.5</Version>
|
<Version>7.2.4630.5</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Infineon.EAF.Runtime">
|
<PackageReference Include="Infineon.EAF.Runtime">
|
||||||
<Version>2.59.0</Version>
|
<Version>2.60.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Pdfbox">
|
<PackageReference Include="Pdfbox">
|
||||||
<Version>1.1.1</Version>
|
<Version>1.1.1</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Text.Json">
|
<PackageReference Include="System.Text.Json">
|
||||||
<Version>8.0.3</Version>
|
<Version>8.0.5</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.59.0.0")]
|
[assembly: AssemblyVersion("2.60.0.0")]
|
||||||
[assembly: AssemblyFileVersion("2.59.0.0")]
|
[assembly: AssemblyFileVersion("2.60.0.0")]
|
||||||
|
Reference in New Issue
Block a user