InfinityQSV2
This commit is contained in:
@ -1,41 +1,53 @@
|
||||
using System.Text.Json.Serialization;
|
||||
namespace OI.Metrology.Shared.DataModels;
|
||||
|
||||
namespace OI.Metrology.Shared.DataModels;
|
||||
|
||||
public class InfinityQSBase
|
||||
public record InfinityQSBase(int? SE_SGRP,
|
||||
int? SE_SGTM,
|
||||
int? SE_TSNO,
|
||||
string? PR_NAME,
|
||||
string? JD_NAME,
|
||||
string? PL_NAME,
|
||||
string? PD_NAME,
|
||||
int? TD_TEST,
|
||||
string? TD_NAME,
|
||||
double? SE_VAL,
|
||||
int? EV_COUNT)
|
||||
{
|
||||
|
||||
[JsonPropertyName("se_sgrp")]
|
||||
public int? SubGroupId { get; set; }
|
||||
public static InfinityQSBaseV2[] Convert(InfinityQSBase[] collection)
|
||||
{
|
||||
List<InfinityQSBaseV2> results = new();
|
||||
foreach (InfinityQSBase item in collection)
|
||||
results.Add(Map(item));
|
||||
return results.ToArray();
|
||||
}
|
||||
|
||||
[JsonPropertyName("se_sgtm")]
|
||||
public int? SubGroupDateTime { get; set; }
|
||||
public static InfinityQSBaseV2 Map(InfinityQSBase item)
|
||||
{
|
||||
InfinityQSBaseV2 result = new(item.SE_SGRP,
|
||||
item.SE_SGTM,
|
||||
item.SE_TSNO,
|
||||
item.PR_NAME,
|
||||
item.JD_NAME,
|
||||
item.PL_NAME,
|
||||
item.PD_NAME,
|
||||
item.TD_TEST,
|
||||
item.TD_NAME,
|
||||
item.SE_VAL,
|
||||
item.EV_COUNT);
|
||||
return result;
|
||||
}
|
||||
|
||||
[JsonPropertyName("se_tsno")]
|
||||
public int? TestNumber { get; set; }
|
||||
}
|
||||
|
||||
[JsonPropertyName("rd_name")]
|
||||
public string? Process { get; set; }
|
||||
|
||||
[JsonPropertyName("jd_name")]
|
||||
public string? Job { get; set; }
|
||||
|
||||
[JsonPropertyName("pl_name")]
|
||||
public string? Lot { get; set; }
|
||||
|
||||
[JsonPropertyName("pd_name")]
|
||||
public string? Part { get; set; }
|
||||
|
||||
[JsonPropertyName("td_test")]
|
||||
public int? Test { get; set; }
|
||||
|
||||
[JsonPropertyName("td_name")]
|
||||
public string? TestName { get; set; }
|
||||
|
||||
[JsonPropertyName("se_val")]
|
||||
public double? Value { get; set; }
|
||||
|
||||
[JsonPropertyName("ev_count")]
|
||||
public int? EventCount { get; set; }
|
||||
|
||||
}
|
||||
public record InfinityQSBaseV2(int? SubGroupId,
|
||||
int? SubGroupDateTime,
|
||||
int? SiteNumber,
|
||||
string? Process,
|
||||
string? Job,
|
||||
string? Lot,
|
||||
string? Part,
|
||||
int? VariableNumber,
|
||||
string? Variable,
|
||||
double? Value,
|
||||
int? EventCount)
|
||||
{ }
|
35
Shared/DataModels/InfinityQSDescriptor.cs
Normal file
35
Shared/DataModels/InfinityQSDescriptor.cs
Normal file
@ -0,0 +1,35 @@
|
||||
namespace OI.Metrology.Shared.DataModels;
|
||||
|
||||
public record InfinityQSDescriptor(int? SD_SGRP,
|
||||
int? SD_TSNO,
|
||||
int? DD_DSGP,
|
||||
string? GD_NAME,
|
||||
string? DD_NAME)
|
||||
{
|
||||
|
||||
public static InfinityQSDescriptorV2[] Convert(InfinityQSDescriptor[] collection)
|
||||
{
|
||||
List<InfinityQSDescriptorV2> results = new();
|
||||
foreach (InfinityQSDescriptor item in collection)
|
||||
results.Add(Map(item));
|
||||
return results.ToArray();
|
||||
}
|
||||
|
||||
public static InfinityQSDescriptorV2 Map(InfinityQSDescriptor item)
|
||||
{
|
||||
InfinityQSDescriptorV2 result = new(item.SD_SGRP,
|
||||
item.SD_TSNO,
|
||||
item.DD_DSGP,
|
||||
item.GD_NAME,
|
||||
item.DD_NAME);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public record InfinityQSDescriptorV2(int? SubGroupId,
|
||||
int? SiteNumber,
|
||||
int? VariableNumber,
|
||||
string? Variable,
|
||||
string? Value)
|
||||
{ }
|
@ -1,74 +1,86 @@
|
||||
using System.Text.Json.Serialization;
|
||||
namespace OI.Metrology.Shared.DataModels;
|
||||
|
||||
namespace OI.Metrology.Shared.DataModels;
|
||||
|
||||
public class InfinityQSEvent
|
||||
public record InfinityQSEvent(int F_EVNT,
|
||||
int F_CRTM,
|
||||
int F_EDTM,
|
||||
int F_TYPE,
|
||||
string F_NAME,
|
||||
int F_EMPL,
|
||||
int F_EVTM,
|
||||
int F_PRCS,
|
||||
int F_PART,
|
||||
int F_TEST,
|
||||
int F_SGTM,
|
||||
int F_ACC,
|
||||
int F_ACEM,
|
||||
int F_ACTM,
|
||||
int F_CAC,
|
||||
int F_CAEM,
|
||||
int F_CATM,
|
||||
int F_FLAG,
|
||||
int F_USER,
|
||||
int F_DSBL,
|
||||
int F_RFC,
|
||||
int F_TRTM)
|
||||
{
|
||||
|
||||
[JsonPropertyName("F_EVNT")]
|
||||
public int Evnt { get; set; }
|
||||
public static InfinityQSEventV2[] Convert(InfinityQSEvent[] collection)
|
||||
{
|
||||
List<InfinityQSEventV2> results = new();
|
||||
foreach (InfinityQSEvent item in collection)
|
||||
results.Add(Map(item));
|
||||
return results.ToArray();
|
||||
}
|
||||
|
||||
[JsonPropertyName("F_CRTM")]
|
||||
public int Crtm { get; set; }
|
||||
public static InfinityQSEventV2 Map(InfinityQSEvent item)
|
||||
{
|
||||
InfinityQSEventV2 result = new(item.F_EVNT,
|
||||
item.F_CRTM,
|
||||
item.F_EDTM,
|
||||
item.F_TYPE,
|
||||
item.F_NAME,
|
||||
item.F_EMPL,
|
||||
item.F_EVTM,
|
||||
item.F_PRCS,
|
||||
item.F_PART,
|
||||
item.F_TEST,
|
||||
item.F_SGTM,
|
||||
item.F_ACC,
|
||||
item.F_ACEM,
|
||||
item.F_ACTM,
|
||||
item.F_CAC,
|
||||
item.F_CAEM,
|
||||
item.F_CATM,
|
||||
item.F_FLAG,
|
||||
item.F_USER,
|
||||
item.F_DSBL,
|
||||
item.F_RFC,
|
||||
item.F_TRTM);
|
||||
return result;
|
||||
}
|
||||
|
||||
[JsonPropertyName("F_EDTM")]
|
||||
public int Edtm { get; set; }
|
||||
}
|
||||
|
||||
[JsonPropertyName("F_TYPE")]
|
||||
public int Type { get; set; }
|
||||
|
||||
[JsonPropertyName("F_NAME")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
[JsonPropertyName("F_EMPL")]
|
||||
public int Empl { get; set; }
|
||||
|
||||
[JsonPropertyName("F_EVTM")]
|
||||
public int Evtm { get; set; }
|
||||
|
||||
[JsonPropertyName("F_PRCS")]
|
||||
public int Prcs { get; set; }
|
||||
|
||||
[JsonPropertyName("F_PART")]
|
||||
public int Part { get; set; }
|
||||
|
||||
[JsonPropertyName("F_TEST")]
|
||||
public int Test { get; set; }
|
||||
|
||||
[JsonPropertyName("F_SGTM")]
|
||||
public int Sgtm { get; set; }
|
||||
|
||||
[JsonPropertyName("F_ACC")]
|
||||
public int Acc { get; set; }
|
||||
|
||||
[JsonPropertyName("F_ACEM")]
|
||||
public int Acem { get; set; }
|
||||
|
||||
[JsonPropertyName("F_ACTM")]
|
||||
public int Actm { get; set; }
|
||||
|
||||
[JsonPropertyName("F_CAC")]
|
||||
public int Cac { get; set; }
|
||||
|
||||
[JsonPropertyName("F_CAEM")]
|
||||
public int Caem { get; set; }
|
||||
|
||||
[JsonPropertyName("F_CATM")]
|
||||
public int Catm { get; set; }
|
||||
|
||||
[JsonPropertyName("F_FLAG")]
|
||||
public int Flag { get; set; }
|
||||
|
||||
[JsonPropertyName("F_USER")]
|
||||
public int User { get; set; }
|
||||
|
||||
[JsonPropertyName("F_DSBL")]
|
||||
public int Dsbl { get; set; }
|
||||
|
||||
[JsonPropertyName("F_RFC")]
|
||||
public int Rfc { get; set; }
|
||||
|
||||
[JsonPropertyName("F_TRTM")]
|
||||
public int Trtm { get; set; }
|
||||
|
||||
}
|
||||
public record InfinityQSEventV2(int Evnt,
|
||||
int Crtm,
|
||||
int Edtm,
|
||||
int Type,
|
||||
string Name,
|
||||
int Empl,
|
||||
int Evtm,
|
||||
int Prcs,
|
||||
int Part,
|
||||
int Test,
|
||||
int Sgtm,
|
||||
int Acc,
|
||||
int Acem,
|
||||
int Actm,
|
||||
int Cac,
|
||||
int Caem,
|
||||
int Catm,
|
||||
int Flag,
|
||||
int User,
|
||||
int Dsbl,
|
||||
int Rfc,
|
||||
int Trtm)
|
||||
{ }
|
@ -5,5 +5,6 @@ public interface IAppSettingsRepository<T>
|
||||
|
||||
T GetAppSettings();
|
||||
string GetBuildNumberAndGitCommitSeven();
|
||||
void VerifyConnectionStrings();
|
||||
|
||||
}
|
@ -5,8 +5,10 @@ namespace OI.Metrology.Shared.Models.Stateless;
|
||||
public interface IInfinityQSRepository
|
||||
{
|
||||
|
||||
string GetCommandText(string subGroupId);
|
||||
string GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime);
|
||||
Result<InfinityQSBase[]> GetData(string subGroupId);
|
||||
Result<InfinityQSDescriptor[]> GetDescriptors(string subGroupId);
|
||||
Result<InfinityQSBase[]> GetHeader(string subGroupId);
|
||||
Result<InfinityQSEvent[]> GetEvents(string subGroupId);
|
||||
|
||||
|
18
Shared/Models/Stateless/IInfinityQSV2Controller.cs
Normal file
18
Shared/Models/Stateless/IInfinityQSV2Controller.cs
Normal file
@ -0,0 +1,18 @@
|
||||
namespace OI.Metrology.Shared.Models.Stateless;
|
||||
|
||||
public interface IInfinityQSV2Controller<T>
|
||||
{
|
||||
|
||||
enum Action : int
|
||||
{
|
||||
Index = 0,
|
||||
MarkAsPinned = 1
|
||||
}
|
||||
|
||||
static string GetRouteName() => nameof(IInfinityQSV2Controller<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 GetEvents(string sub_group_id);
|
||||
T GetHeader(string sub_group_id);
|
||||
|
||||
}
|
15
Shared/Models/Stateless/IInfinityQSV2Repository.cs
Normal file
15
Shared/Models/Stateless/IInfinityQSV2Repository.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using OI.Metrology.Shared.DataModels;
|
||||
|
||||
namespace OI.Metrology.Shared.Models.Stateless;
|
||||
|
||||
public interface IInfinityQSV2Repository
|
||||
{
|
||||
|
||||
string GetCommandText(string subGroupId);
|
||||
string GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime);
|
||||
Result<InfinityQSBaseV2[]> GetData(string subGroupId);
|
||||
Result<InfinityQSDescriptorV2[]> GetDescriptors(string subGroupId);
|
||||
Result<InfinityQSBaseV2[]> GetHeader(string subGroupId);
|
||||
Result<InfinityQSEventV2[]> GetEvents(string subGroupId);
|
||||
|
||||
}
|
Reference in New Issue
Block a user