Now relying on pipeline to copy files from file shares for ghost-pcl and linc-pdfc
Now using entered-date-time-filter and load-signature-date-time-filter for logistics query
This commit is contained in:
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"
|
||||||
],
|
],
|
||||||
|
@ -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>();
|
||||||
@ -86,9 +86,9 @@ 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 (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.Layer, common.PSN, common.ReactorNumber, workOrder.SlotNumber, workOrder.WorkOrderNumber, workOrder.WorkOrderCassette, common.Zone);
|
||||||
else
|
else
|
||||||
commonB = new(comment: hyphen,
|
commonB = new(comment: hyphen,
|
||||||
layer: hyphen,
|
layer: hyphen,
|
||||||
@ -513,7 +513,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 +540,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,20 +590,22 @@ 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, string layer, string psn, int? reactorNumber, int? slotNumber, int? workOrderNumber, int? workOrderCassette, string zone)
|
||||||
{
|
{
|
||||||
int? rdsNumber;
|
int? rdsNumber;
|
||||||
string comment;
|
string comment;
|
||||||
const int zero = 0;
|
const int zero = 0;
|
||||||
const string hyphen = "-";
|
const string hyphen = "-";
|
||||||
string commandText = GetCommandText(rds: null,
|
string commandText = GetCommandText(enteredDateTimeFilter,
|
||||||
|
loadSignatureDateTimeFilter,
|
||||||
|
rds: null,
|
||||||
workOrderNumber: workOrderNumber,
|
workOrderNumber: workOrderNumber,
|
||||||
workOrderCassette: workOrderCassette,
|
workOrderCassette: workOrderCassette,
|
||||||
slot: slotNumber,
|
slot: slotNumber,
|
||||||
@ -657,12 +660,14 @@ public partial class Job
|
|||||||
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;
|
string comment;
|
||||||
const int zero = 0;
|
const int zero = 0;
|
||||||
const string hyphen = "-";
|
const string hyphen = "-";
|
||||||
string commandText = GetCommandText(rds: rdsNumber,
|
string commandText = GetCommandText(enteredDateTimeFilter,
|
||||||
|
loadSignatureDateTimeFilter,
|
||||||
|
rds: rdsNumber,
|
||||||
workOrderNumber: null,
|
workOrderNumber: null,
|
||||||
workOrderCassette: null,
|
workOrderCassette: null,
|
||||||
slot: null,
|
slot: null,
|
||||||
|
@ -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);
|
||||||
|
@ -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>
|
||||||
|
@ -38,7 +38,25 @@ stages:
|
|||||||
displayName: "Echo Check"
|
displayName: "Echo Check"
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
||||||
displayName: "Nuget Clear"
|
displayName: "Nuget Nuget Clear"
|
||||||
|
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
|
enabled: false
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
@ -181,7 +199,25 @@ stages:
|
|||||||
displayName: "Echo Check"
|
displayName: "Echo Check"
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
||||||
displayName: "Nuget Clear"
|
displayName: "Nuget Nuget Clear"
|
||||||
|
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
|
enabled: false
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,7 +249,7 @@ internal class ProcessDataStandardFormat
|
|||||||
private static ProcessDataStandardFormat GetProcessDataStandardFormat(DateTime lastWriteTime, 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();
|
||||||
@ -268,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(),
|
||||||
@ -302,7 +316,7 @@ internal class ProcessDataStandardFormat
|
|||||||
segments = bodyLine.Split('\t').ToList();
|
segments = bodyLine.Split('\t').ToList();
|
||||||
for (int c = 0; c < segments.Count; c++)
|
for (int c = 0; c < segments.Count; 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("\",");
|
||||||
}
|
}
|
||||||
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||||
@ -378,7 +392,7 @@ internal class ProcessDataStandardFormat
|
|||||||
break;
|
break;
|
||||||
for (int c = 0; c < segments.Length; c++)
|
for (int c = 0; c < segments.Length; c++)
|
||||||
{
|
{
|
||||||
value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\");
|
value = segments[c].Replace("\\", "\\\\").Replace("\"", "\\\"");
|
||||||
line += string.Concat('"', processDataStandardFormat.InputPDSF.Columns[c].Trim('"'), '"', ':', '"', value, '"', ',');
|
line += string.Concat('"', processDataStandardFormat.InputPDSF.Columns[c].Trim('"'), '"', ':', '"', value, '"', ',');
|
||||||
}
|
}
|
||||||
line = string.Concat(line.Substring(0, line.Length - 1), '}');
|
line = string.Concat(line.Substring(0, line.Length - 1), '}');
|
||||||
@ -518,7 +532,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("\",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -526,7 +540,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))
|
||||||
|
@ -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,31 @@ public class Job : LoggingUnitTesting, IDisposable
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !Always
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Reference in New Issue
Block a user