Bug fix - GetHeaderId
This commit is contained in:
parent
5c0a3e53d3
commit
5d16251f28
@ -104,12 +104,14 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable IDE0060
|
#pragma warning disable IDE0060
|
||||||
private static void PostOpenInsightMetrologyViewerAttachments(DateTime dateTime, List<SECS.Description> descriptions)
|
private static void PostOpenInsightMetrologyViewerAttachments(List<SECS.Description> descriptions)
|
||||||
#pragma warning restore IDE0060
|
#pragma warning restore IDE0060
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable IDE0060
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
|
#pragma warning restore IDE0060
|
||||||
{
|
{
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||||
@ -119,7 +121,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
List<SECS.Description> descriptions = SECS.ProcessData.GetDescriptions(jsonElements);
|
List<SECS.Description> descriptions = SECS.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();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
PostOpenInsightMetrologyViewerAttachments(dateTime, descriptions);
|
PostOpenInsightMetrologyViewerAttachments(descriptions);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
@ -78,20 +78,32 @@ public partial class WS
|
|||||||
{
|
{
|
||||||
foreach (Attachment attachment in headerAttachments)
|
foreach (Attachment attachment in headerAttachments)
|
||||||
{
|
{
|
||||||
directory = Path.GetDirectoryName(attachment.HeaderIdDirectory) ?? throw new Exception();
|
directory = Path.Combine(Path.GetDirectoryName(attachment.HeaderIdDirectory), attachment.AttachmentId) ?? throw new Exception();
|
||||||
File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.AttachmentId, attachment.DestinationFileName), overwrite: true);
|
if (!Directory.Exists(directory))
|
||||||
AttachFile(url, attachment);
|
_ = Directory.CreateDirectory(directory);
|
||||||
|
File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dataAttachments is not null)
|
if (dataAttachments is not null)
|
||||||
{
|
{
|
||||||
foreach (Attachment attachment in dataAttachments)
|
foreach (Attachment attachment in dataAttachments)
|
||||||
{
|
{
|
||||||
directory = Path.GetDirectoryName(attachment.HeaderIdDirectory) ?? throw new Exception();
|
directory = Path.Combine(Path.GetDirectoryName(attachment.HeaderIdDirectory.Replace("Header", "Data")), attachment.AttachmentId) ?? throw new Exception();
|
||||||
File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.AttachmentId, attachment.DestinationFileName), overwrite: true);
|
if (!Directory.Exists(directory))
|
||||||
AttachFile(url, attachment);
|
_ = Directory.CreateDirectory(directory);
|
||||||
|
File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (headerAttachments is not null)
|
||||||
|
{
|
||||||
|
foreach (Attachment attachment in headerAttachments)
|
||||||
|
AttachFile(url, attachment);
|
||||||
|
}
|
||||||
|
if (dataAttachments is not null)
|
||||||
|
{
|
||||||
|
foreach (Attachment attachment in dataAttachments)
|
||||||
|
AttachFile(url, attachment);
|
||||||
|
}
|
||||||
//MessageBox.Show(r.ToString());
|
//MessageBox.Show(r.ToString());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -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.52.0.0")]
|
[assembly: AssemblyVersion("2.56.0.0")]
|
||||||
[assembly: AssemblyFileVersion("2.52.0.0")]
|
[assembly: AssemblyFileVersion("2.56.0.0")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user