process-data-standard-format with Pipes, HeaderId and SubgroupId
This commit is contained in:
@ -379,7 +379,7 @@ internal class ProcessDataStandardFormat
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static void Write(string path, ProcessDataStandardFormat processDataStandardFormat)
|
||||
internal static void Write(string path, ProcessDataStandardFormat processDataStandardFormat, List<Metrology.WS.Results>? wsResults)
|
||||
{
|
||||
List<string> results = new();
|
||||
if (processDataStandardFormat.Sequence is null)
|
||||
@ -404,7 +404,20 @@ internal class ProcessDataStandardFormat
|
||||
results.Add($"START_TIME\t{startTime}");
|
||||
results.Add("LOGISTICS_COLUMN\tA_LOGISTICS");
|
||||
results.Add("LOGISTICS_COLUMN\tB_LOGISTICS");
|
||||
results.AddRange(processDataStandardFormat.Logistics);
|
||||
if (wsResults is null || wsResults.Count != 1)
|
||||
results.AddRange(processDataStandardFormat.Logistics);
|
||||
else
|
||||
{
|
||||
string[] segments;
|
||||
foreach (string logistics in processDataStandardFormat.Logistics)
|
||||
{
|
||||
segments = logistics.Split(new string[] { "\t" }, StringSplitOptions.None);
|
||||
if (segments.Length != 2 || string.IsNullOrEmpty(segments[1]))
|
||||
results.Add(logistics);
|
||||
else
|
||||
results.Add($"{segments[0]}\t{segments[1][0]}_HeaderId={wsResults[0].HeaderId};{segments[1][0]}_SubgroupId={wsResults[0].SubgroupId};{segments[1]}");
|
||||
}
|
||||
}
|
||||
results.Add("EOF");
|
||||
if (processDataStandardFormat.InputPDSF is not null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user