Zero _TickOffset
IDE0060
This commit is contained in:
@ -227,7 +227,7 @@ public class FromIQS
|
||||
private static void FlagDuplicates(string connectionString, string json)
|
||||
{
|
||||
JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json);
|
||||
JsonSerializerOptions jsonSerializerOptions = new() { PropertyNameCaseInsensitive = true};
|
||||
JsonSerializerOptions jsonSerializerOptions = new() { PropertyNameCaseInsensitive = true };
|
||||
if (jsonElements is not null && jsonElements.Length != 0 && jsonElements[0].ValueKind == JsonValueKind.Object)
|
||||
{
|
||||
Root? root;
|
||||
@ -244,14 +244,9 @@ public class FromIQS
|
||||
}
|
||||
if (collection.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
string commandText = GetCommandText(collection);
|
||||
File.WriteAllText("D:/.sql", commandText);
|
||||
_ = ExecuteNonQuery(connectionString, commandText);
|
||||
}
|
||||
catch (Exception)
|
||||
{ }
|
||||
string commandText = GetCommandText(collection);
|
||||
File.WriteAllText("D:/.sql", commandText);
|
||||
_ = ExecuteNonQuery(connectionString, commandText);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -271,9 +266,15 @@ public class FromIQS
|
||||
else
|
||||
dateTime = logistics.DateTimeFromSequence;
|
||||
commandText = GetCommandText(dateTime);
|
||||
stringBuilder = GetForJsonPath(connectionString, commandText);
|
||||
if (stringBuilder.Length > 0)
|
||||
FlagDuplicates(connectionString, stringBuilder.ToString());
|
||||
try
|
||||
{
|
||||
stringBuilder = GetForJsonPath(connectionString, commandText);
|
||||
if (stringBuilder.Length > 0)
|
||||
FlagDuplicates(connectionString, stringBuilder.ToString());
|
||||
}
|
||||
catch (Exception)
|
||||
{ stringBuilder = new(); }
|
||||
_ = stringBuilder.Clear();
|
||||
commandText = GetCommandText(logistics, description, dateTime.ToString("yyyy-MM-dd HH:mm:ss"), subGroupId: null);
|
||||
for (short i = 0; i < short.MaxValue; i++)
|
||||
{
|
||||
|
@ -6,22 +6,22 @@ namespace Adaptation.FileHandlers.OpenInsight;
|
||||
public class Root
|
||||
{
|
||||
|
||||
[JsonPropertyName("count_se_sgtm")] public long CountSeSgtm { get; }
|
||||
[JsonPropertyName("date_time")] public DateTime DateTime { get; }
|
||||
[JsonPropertyName("max_max_se_test")] public long MaxMaxSeTest { get; }
|
||||
[JsonPropertyName("max_max_se_test_name")] public string MaxMaxSeTestName { get; }
|
||||
[JsonPropertyName("max_max_se_val")] public double MaxMaxSeVal { get; }
|
||||
[JsonPropertyName("max_se_lot")] public long MaxSeLot { get; }
|
||||
[JsonPropertyName("max_se_lot_name")] public string MaxSeLotName { get; }
|
||||
[JsonPropertyName("max_se_part")] public long MaxSePart { get; }
|
||||
[JsonPropertyName("max_se_part_name")] public string MaxSePartName { get; }
|
||||
[JsonPropertyName("max_se_prcs")] public long MaxSePrcs { get; }
|
||||
[JsonPropertyName("max_se_prcs_name")] public string MaxSePrcsName { get; }
|
||||
[JsonPropertyName("max_se_sgrp")] public long MaxSeSgrp { get; }
|
||||
[JsonPropertyName("min_min_se_test")] public long MinMinSeTest { get; }
|
||||
[JsonPropertyName("min_min_se_test_name")] public string MinMinSeTestName { get; }
|
||||
[JsonPropertyName("min_min_se_val")] public double MinMinSeVal { get; }
|
||||
[JsonPropertyName("min_se_sgrp")] public long MinSeSgrp { get; }
|
||||
public long CountSeSgtm { get; } // [JsonPropertyName("count_se_sgtm")]
|
||||
public DateTime DateTime { get; } // [JsonPropertyName("date_time")]
|
||||
public long MaxMaxSeTest { get; } // [JsonPropertyName("max_max_se_test")]
|
||||
public string MaxMaxSeTestName { get; } // [JsonPropertyName("max_max_se_test_name")]
|
||||
public double MaxMaxSeVal { get; } // [JsonPropertyName("max_max_se_val")]
|
||||
public long MaxSeLot { get; } // [JsonPropertyName("max_se_lot")]
|
||||
public string MaxSeLotName { get; } // [JsonPropertyName("max_se_lot_name")]
|
||||
public long MaxSePart { get; } // [JsonPropertyName("max_se_part")]
|
||||
public string MaxSePartName { get; } // [JsonPropertyName("max_se_part_name")]
|
||||
public long MaxSePrcs { get; } // [JsonPropertyName("max_se_prcs")]
|
||||
public string MaxSePrcsName { get; } // [JsonPropertyName("max_se_prcs_name")]
|
||||
public long MaxSeSgrp { get; } // [JsonPropertyName("max_se_sgrp")]
|
||||
public long MinMinSeTest { get; } // [JsonPropertyName("min_min_se_test")]
|
||||
public string MinMinSeTestName { get; } // [JsonPropertyName("min_min_se_test_name")]
|
||||
public double MinMinSeVal { get; } // [JsonPropertyName("min_min_se_val")]
|
||||
public long MinSeSgrp { get; } // [JsonPropertyName("min_se_sgrp")]
|
||||
|
||||
[JsonConstructor]
|
||||
public Root(long countSeSgtm, DateTime dateTime, long maxMaxSeTest, string maxMaxSeTestName, double maxMaxSeVal, long maxSeLot, string maxSeLotName, long maxSePart, string maxSePartName, long maxSePrcs, string maxSePrcsName, long maxSeSgrp, long minMinSeTest, string minMinSeTestName, double minMinSeVal, long minSeSgrp)
|
||||
|
Reference in New Issue
Block a user