Tests passed using Mock
This commit is contained in:
21
Shared/DataModels/InfinityQSDescriptorV3.cs
Normal file
21
Shared/DataModels/InfinityQSDescriptorV3.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace OI.Metrology.Shared.DataModels;
|
||||
|
||||
public record InfinityQSDescriptorV3([property: JsonPropertyName("sd_sgrp")] int? SubGroupId,
|
||||
[property: JsonPropertyName("sd_tsno")] int? SiteNumber,
|
||||
[property: JsonPropertyName("dd_dsgp")] int? VariableNumber,
|
||||
[property: JsonPropertyName("gd_name")] string? Variable,
|
||||
[property: JsonPropertyName("dd_name")] string? Value);
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[JsonSerializable(typeof(InfinityQSDescriptorV3))]
|
||||
public partial class InfinityQSDescriptorV3SourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[JsonSerializable(typeof(Result<InfinityQSDescriptorV3[]>))]
|
||||
public partial class ResultInfinityQSDescriptorV3SourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
24
Shared/DataModels/InfinityQSEventV3.cs
Normal file
24
Shared/DataModels/InfinityQSEventV3.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace OI.Metrology.Shared.DataModels;
|
||||
|
||||
public record InfinityQSEventV3([property: JsonPropertyName("ev_evnt")] int EventId,
|
||||
[property: JsonPropertyName("ev_sgtm")] int SubGroupDateTimeId,
|
||||
[property: JsonPropertyName("ev_utc7")] string SubGroupDateTime,
|
||||
[property: JsonPropertyName("pr_name")] string Process,
|
||||
[property: JsonPropertyName("pd_name")] string Part,
|
||||
[property: JsonPropertyName("td_test")] int VariableNumber,
|
||||
[property: JsonPropertyName("td_name")] string Variable,
|
||||
[property: JsonPropertyName("ev_name")] string Name);
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[JsonSerializable(typeof(InfinityQSEventV3))]
|
||||
public partial class InfinityQSEventV3SourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[JsonSerializable(typeof(Result<InfinityQSEventV3[]>))]
|
||||
public partial class ResultInfinityQSEventV3SourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
34
Shared/DataModels/InfinityQSV3.cs
Normal file
34
Shared/DataModels/InfinityQSV3.cs
Normal file
@ -0,0 +1,34 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace OI.Metrology.Shared.DataModels;
|
||||
|
||||
public record InfinityQSV3([property: JsonPropertyName("iq_sum")] int SumOOS,
|
||||
[property: JsonPropertyName("sl_aflag")] int? AlarmFlag,
|
||||
[property: JsonPropertyName("sl_loos")] int? LowerOOS,
|
||||
[property: JsonPropertyName("sl_uoos")] int? UperOOS,
|
||||
[property: JsonPropertyName("se_sgrp")] int SubGroupId,
|
||||
[property: JsonPropertyName("se_sgtm")] int SubGroupDateTime,
|
||||
[property: JsonPropertyName("se_tsno")] int SiteNumber,
|
||||
[property: JsonPropertyName("td_test")] int VariableNumber,
|
||||
[property: JsonPropertyName("pr_name")] string? Process,
|
||||
[property: JsonPropertyName("jd_name")] string? Job,
|
||||
[property: JsonPropertyName("pl_name")] string? Lot,
|
||||
[property: JsonPropertyName("pd_name")] string? Part,
|
||||
[property: JsonPropertyName("td_name")] string? Variable,
|
||||
[property: JsonPropertyName("se_val")] double? Value,
|
||||
[property: JsonPropertyName("sl_eflag")] int? EnableFlag,
|
||||
[property: JsonPropertyName("sl_scal")] int? Scale,
|
||||
[property: JsonPropertyName("sl_sls")] double? LowerSpecLimit,
|
||||
[property: JsonPropertyName("sl_usl")] double? UperSpecLimit);
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[JsonSerializable(typeof(InfinityQSV3))]
|
||||
public partial class InfinityQSV3SourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[JsonSerializable(typeof(Result<InfinityQSV3[]>))]
|
||||
public partial class ResultInfinityQSV3SourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
9
Shared/Models/Stateless/IIOpenInsightV1Repository.cs
Normal file
9
Shared/Models/Stateless/IIOpenInsightV1Repository.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace OI.Metrology.Shared.Models.Stateless;
|
||||
|
||||
public interface IOpenInsightV1Repository
|
||||
{
|
||||
|
||||
string GetTencorRun(string rds, string? insertDate, string? recipe);
|
||||
string GetCommandText(string rds, string? insertDate, string? recipe);
|
||||
|
||||
}
|
17
Shared/Models/Stateless/IInfinityQSV3Controller.cs
Normal file
17
Shared/Models/Stateless/IInfinityQSV3Controller.cs
Normal file
@ -0,0 +1,17 @@
|
||||
namespace OI.Metrology.Shared.Models.Stateless;
|
||||
|
||||
public interface IInfinityQSV3Controller<T>
|
||||
{
|
||||
|
||||
enum Action : int
|
||||
{
|
||||
Index = 0,
|
||||
MarkAsPinned = 1
|
||||
}
|
||||
|
||||
static string GetRouteName() => nameof(IInfinityQSV3Controller<T>)[1..^10];
|
||||
T GetCommandText(string sub_group_id, string process, string job, string part, string lot, string date_time);
|
||||
T GetData(string sub_group_id);
|
||||
T GetHeader(string sub_group_id);
|
||||
|
||||
}
|
17
Shared/Models/Stateless/IInfinityQSV3Repository.cs
Normal file
17
Shared/Models/Stateless/IInfinityQSV3Repository.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using OI.Metrology.Shared.DataModels;
|
||||
|
||||
namespace OI.Metrology.Shared.Models.Stateless;
|
||||
|
||||
public interface IInfinityQSV3Repository
|
||||
{
|
||||
|
||||
string GetCommandText(string subGroupId);
|
||||
string GetCommandText(string process, string? part);
|
||||
string GetCommandText(InfinityQSV3 infinityQSV2);
|
||||
string GetProductDataAverageSumOfDefectsProcessMeanProcessSigma(string process, string? recipe);
|
||||
string GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime);
|
||||
Result<InfinityQSV3[]> GetData(string subGroupId);
|
||||
Result<InfinityQSDescriptorV3[]> GetDescriptors(string subGroupId);
|
||||
Result<InfinityQSV3[]> GetHeader(string subGroupId);
|
||||
|
||||
}
|
9
Shared/Models/Stateless/IOpenInsightV1Controller.cs
Normal file
9
Shared/Models/Stateless/IOpenInsightV1Controller.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace OI.Metrology.Shared.Models.Stateless;
|
||||
|
||||
public interface IOpenInsightV1Controller<T>
|
||||
{
|
||||
|
||||
static string GetRouteName() => nameof(IOpenInsightV1Controller<T>)[1..^10];
|
||||
T GetTencorRun(string rds, string? insertDate, string? recipe);
|
||||
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<LangVersion>10.0</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
|
Reference in New Issue
Block a user