Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
11cd36f9b7 |
@ -313,8 +313,13 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
continue;
|
||||
if (!_StaticRuns.TryGetValue(_Logistics.Sequence, out List<Shared.Metrology.WS.Results>? wsResults))
|
||||
wsResults = null;
|
||||
if (processDataStandardFormat.InputPDSF is null)
|
||||
File.Move(preWith.MatchingFile, preWith.CheckFile);
|
||||
else
|
||||
{
|
||||
ProcessDataStandardFormat.Write(preWith.CheckFile, processDataStandardFormat, wsResults);
|
||||
File.Delete(preWith.MatchingFile);
|
||||
}
|
||||
if (Directory.Exists(preWith.NoWaitDirectory))
|
||||
{
|
||||
post = new(preWith.CheckFile, preWith.ErrFile);
|
||||
|
@ -518,6 +518,8 @@ internal class ProcessDataStandardFormat
|
||||
internal static void Write(string path, ProcessDataStandardFormat processDataStandardFormat, List<Metrology.WS.Results>? wsResults)
|
||||
{
|
||||
List<string> results = new();
|
||||
if (processDataStandardFormat.InputPDSF is null)
|
||||
throw new NullReferenceException(nameof(processDataStandardFormat.InputPDSF));
|
||||
if (processDataStandardFormat.Sequence is null)
|
||||
throw new NullReferenceException(nameof(processDataStandardFormat.Sequence));
|
||||
string endOffset = "E#######T";
|
||||
@ -555,8 +557,6 @@ internal class ProcessDataStandardFormat
|
||||
}
|
||||
}
|
||||
results.Add("END_HEADER");
|
||||
if (processDataStandardFormat.InputPDSF is not null)
|
||||
{
|
||||
results.Add(string.Empty);
|
||||
List<char> hyphens = new();
|
||||
results.AddRange(processDataStandardFormat.InputPDSF.Header.Select(l => $"|{l.Replace('\t', '|')}|"));
|
||||
@ -573,7 +573,6 @@ internal class ProcessDataStandardFormat
|
||||
results.Add(string.Empty);
|
||||
string json = GetJson(processDataStandardFormat);
|
||||
results.Add(json);
|
||||
}
|
||||
File.WriteAllText(path, string.Join(Environment.NewLine, results));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user