Added Hypen

Dual write PDSF for Metrology Viewer
Version Error Message
CA1862 and GetWeekOfYear for WritePDSF
Save Copy - sql or json
gitignore
cellInstanceVersion.EdaConnection.PortNumber
Find Replace
Added Climatec to Test.cs
GetJobIdDirectory
Remove and
5-Other-Small
NETFRAMEWORK
This commit is contained in:
2024-05-16 12:03:39 -07:00
parent e5f684342d
commit f414bb6457
82 changed files with 1580 additions and 264 deletions

View File

@ -1,6 +1,5 @@
using Adaptation.Shared;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Globalization;
@ -282,7 +281,7 @@ public class FromIQS
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ")
.AppendLine(" on sl.f_test = td.f_test ")
.AppendLine(" where sl.f_prcs = 0 ")
.AppendLine(" and td.f_name = '").Append(find).AppendLine("' ")
.Append(" and td.f_name = '").Append(find).AppendLine("' ")
.AppendLine(" and isnull(( ")
.AppendLine(" select count(sl_b.f_spec) ")
.AppendLine(" from [spcepiworld].[dbo].[spec_lim] sl_b ")
@ -308,31 +307,15 @@ public class FromIQS
internal static void SaveCopy(string fileConnectorConfigurationSourceFileLocation, string connectionString, string name, string[] iqsCopyValues)
{
string checkFile = Path.Combine(fileConnectorConfigurationSourceFileLocation, $"{name}.tsv");
string checkFile = Path.Combine(fileConnectorConfigurationSourceFileLocation, $"{name}.json");
if (!File.Exists(checkFile))
{
string commandText = GetCommandText(iqsCopyValues);
StringBuilder stringBuilder = GetForJsonPath(connectionString, commandText);
if (stringBuilder.Length > 0)
{
JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(stringBuilder.ToString());
if (jsonElements is not null && jsonElements.Length != 0 && jsonElements[0].ValueKind == JsonValueKind.Object)
{
_ = stringBuilder.Clear();
List<string> lines = new();
JsonProperty[] jsonProperties = jsonElements[0].EnumerateObject().ToArray();
foreach (JsonProperty jsonProperty in jsonProperties)
_ = stringBuilder.Append(jsonProperty.Name).Append('\t');
lines.Add(stringBuilder.ToString());
for (int i = 0; i < jsonElements.Length; i++)
{
foreach (JsonProperty jsonProperty in jsonProperties)
_ = stringBuilder.Append(jsonProperty.Value).Append('\t');
lines.Add(stringBuilder.ToString());
}
File.WriteAllLines(checkFile, lines);
}
}
if (stringBuilder.Length != 0)
File.WriteAllText(checkFile, stringBuilder.ToString());
else
File.WriteAllText(Path.Combine(fileConnectorConfigurationSourceFileLocation, $"{name}.sql"), commandText);
}
}