InfinityQSV2
This commit is contained in:
parent
8e15b6a3a5
commit
97c9c3c264
@ -28,6 +28,13 @@ public class InfinityQSController : Controller, IInfinityQSController<IActionRes
|
||||
return Json(result, new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
||||
}
|
||||
|
||||
[HttpGet("{sub_group_id}/descriptors")]
|
||||
public IActionResult GetDescriptors(string sub_group_id)
|
||||
{
|
||||
Result<InfinityQSDescriptor[]> result = _InfinityQSRepository.GetDescriptors(sub_group_id);
|
||||
return Json(result, new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
||||
}
|
||||
|
||||
[HttpGet("{sub_group_id}/events")]
|
||||
public IActionResult GetEvents(string sub_group_id)
|
||||
{
|
||||
|
52
Server/ApiControllers/InfinityQSV2Controller.cs
Normal file
52
Server/ApiControllers/InfinityQSV2Controller.cs
Normal file
@ -0,0 +1,52 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace OI.Metrology.Server.ApiControllers;
|
||||
|
||||
using OI.Metrology.Shared.DataModels;
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
using System.Text.Json;
|
||||
|
||||
[Route("api/[controller]")]
|
||||
public class InfinityQSV2Controller : Controller, IInfinityQSV2Controller<IActionResult>
|
||||
{
|
||||
|
||||
private readonly IInfinityQSV2Repository _InfinityQSRepositoryV2;
|
||||
|
||||
public InfinityQSV2Controller(IInfinityQSV2Repository InfinityQSRepositoryV2) => _InfinityQSRepositoryV2 = InfinityQSRepositoryV2;
|
||||
|
||||
[HttpGet("{sub_group_id}/commandText")]
|
||||
public IActionResult GetCommandText(string sub_group_id, string process, string job, string part, string lot, string date_time)
|
||||
{
|
||||
string commandText = _InfinityQSRepositoryV2.GetCommandText(sub_group_id, process, job, part, lot, date_time);
|
||||
return Content(commandText, "text/plain; charset=utf-8");
|
||||
}
|
||||
|
||||
[HttpGet("{sub_group_id}/data")]
|
||||
public IActionResult GetData(string sub_group_id)
|
||||
{
|
||||
Result<InfinityQSBaseV2[]> result = _InfinityQSRepositoryV2.GetData(sub_group_id);
|
||||
return Json(result, new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
||||
}
|
||||
|
||||
[HttpGet("{sub_group_id}/descriptors")]
|
||||
public IActionResult GetDescriptors(string sub_group_id)
|
||||
{
|
||||
Result<InfinityQSDescriptorV2[]> result = _InfinityQSRepositoryV2.GetDescriptors(sub_group_id);
|
||||
return Json(result, new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
||||
}
|
||||
|
||||
[HttpGet("{sub_group_id}/events")]
|
||||
public IActionResult GetEvents(string sub_group_id)
|
||||
{
|
||||
Result<InfinityQSEventV2[]> result = _InfinityQSRepositoryV2.GetEvents(sub_group_id);
|
||||
return Json(result, new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
||||
}
|
||||
|
||||
[HttpGet("{sub_group_id}/header")]
|
||||
public IActionResult GetHeader(string sub_group_id)
|
||||
{
|
||||
Result<InfinityQSBaseV2[]> result = _InfinityQSRepositoryV2.GetHeader(sub_group_id);
|
||||
return Json(result, new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
||||
}
|
||||
|
||||
}
|
1
Server/Data/Tests/AppSettings-GetAppSettings.json
Normal file
1
Server/Data/Tests/AppSettings-GetAppSettings.json
Normal file
@ -0,0 +1 @@
|
||||
{"apiLoggingContentTypes":null,"apiLoggingPathPrefixes":null,"apiLogPath":null,"apiUrl":null,"attachmentPath":null,"buildNumber":"1","company":"Infineon Technologies Americas Corp.","connectionString":null,"gitCommitSeven":"1234567","inboundApiAllowedIPList":null,"isDevelopment":true,"isStaging":false,"mockRoot":null,"monAResource":null,"monASite":null,"oi2SqlConnectionString":null,"oiExportPath":null,"urLs":null,"workingDirectoryName":null}
|
@ -1 +0,0 @@
|
||||
["application/json","/api/inbound","D:\\Metrology\\MetrologyAPILogs","\\\\messv02ecc1.ec.local\\EC_Metrology_Si\\MetrologyAttachments","1","Infineon Technologies Americas Corp.","Data Source=MESSAD1001\\TEST1,59583;Integrated Security=True;Initial Catalog=Metrology;","1234567","","True","False","OI_Metrology_Viewer_IFX","auc","Data Source=MESSAD1001\\TEST1,59583;Initial Catalog=LSL2SQL;Persist Security Info=True;User ID=srpadmin;Password=0okm9ijn;","\\\\openinsight-db-srv.na.infineon.com\\apps\\Metrology\\Data","https://localhost:7130;http://localhost:5126","IFXApps"]
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
{"Results":[],"TotalRows":0}
|
@ -1,21 +0,0 @@
|
||||
{
|
||||
"Results": [
|
||||
{
|
||||
"ID": 2,
|
||||
"InsertDate": "2019-09-12T16:24:18.617",
|
||||
"AttachmentID": "00000000-0000-0000-0000-000000000000",
|
||||
"Title": "Bio-RadQS400MEPI_99-999999-9999.1_201909121623333616",
|
||||
"Recipe": null,
|
||||
"Date": "2019-09-12T16:23:43"
|
||||
},
|
||||
{
|
||||
"ID": 1,
|
||||
"InsertDate": "2019-09-12T16:02:17.253",
|
||||
"AttachmentID": "00000000-0000-0000-0000-000000000000",
|
||||
"Title": "Bio-RadQS400MEPI_99-999999-9999.1_201909121559040648",
|
||||
"Recipe": null,
|
||||
"Date": "2019-09-12T15:59:05"
|
||||
}
|
||||
],
|
||||
"TotalRows": 2
|
||||
}
|
@ -1 +0,0 @@
|
||||
{"Results":[{"Batch":"BIORAD #4","Cassette":"","Date":"2019-09-12T16:23:43","ID":2,"InsertDate":"2019-09-12T16:24:18.617","Layer":"1","Mean Thickness":"114.785","Operator":"","Path":null,"PSN":"9999","RDS":"999999","Reactor":"99","Recipe":"6in_thick","RV Thickness":"0.0000","SentToMetrology":false,"SentToSPC":false,"Status":"PASS","Std Dev":"1.1047","Title":"Bio-RadQS400MEPI_99-999999-9999.1_201909121623333616","Wafer":"99-999999-9999.1","Zone":null,"AttachmentID":null},{"Batch":"BIORAD #4","Cassette":"","Date":"2019-09-12T15:59:05","ID":1,"InsertDate":"2019-09-12T16:02:17.253","Layer":"1","Mean Thickness":"114.785","Operator":"","Path":null,"PSN":"9999","RDS":"999999","Reactor":"99","Recipe":"6in_thick","RV Thickness":"0.0000","SentToMetrology":true,"SentToSPC":false,"Status":"PASS","Std Dev":"1.1047","Title":"Bio-RadQS400MEPI_99-999999-9999.1_201909121559040648","Wafer":"99-999999-9999.1","Zone":null,"AttachmentID":null}],"TotalRows":2}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
{
|
||||
"Results": [],
|
||||
"TotalRows": 0
|
||||
}
|
||||
}
|
35
Server/Data/Tests/InfinityQS-GetCommandText.sql
Normal file
35
Server/Data/Tests/InfinityQS-GetCommandText.sql
Normal file
@ -0,0 +1,35 @@
|
||||
select
|
||||
se.f_sgrp se_sgrp,
|
||||
se.f_sgtm se_sgtm,
|
||||
se.f_tsno se_tsno,
|
||||
se.f_val se_val,
|
||||
rd.f_name rd_name,
|
||||
jd.f_name jd_name,
|
||||
pl.f_name pl_name,
|
||||
pd.f_name pd_name,
|
||||
td.f_test td_test,
|
||||
td.f_name td_name,
|
||||
(select count(ev.f_evnt)
|
||||
from [spcepiworld].[dbo].[evnt_inf] ev
|
||||
where ev.f_prcs = rd.f_prcs
|
||||
and ev.f_part = pd.f_part
|
||||
and ev.f_sgtm = se.f_sgtm) ev_count
|
||||
from [spcepiworld].[dbo].[sgrp_ext] se
|
||||
join [spcepiworld].[dbo].[prcs_dat] rd
|
||||
on se.f_prcs = rd.f_prcs
|
||||
join [spcepiworld].[dbo].[job_dat] jd
|
||||
on se.f_job = jd.f_job
|
||||
join [spcepiworld].[dbo].[part_lot] pl
|
||||
on se.f_lot = pl.f_lot
|
||||
join [spcepiworld].[dbo].[part_dat] pd
|
||||
on se.f_part = pd.f_part
|
||||
join [spcepiworld].[dbo].[test_dat] td
|
||||
on se.f_test = td.f_test
|
||||
where se.f_flag = 0
|
||||
and se.f_sgrp = 1677273357
|
||||
and rd.f_name = '61'
|
||||
and pd.f_name = '5012'
|
||||
and jd.f_name = 'CDE5'
|
||||
and pl.f_name = '575908'
|
||||
and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '2023-02-24 15:15:00'
|
||||
for json path
|
785
Server/Data/Tests/InfinityQS-GetData.json
Normal file
785
Server/Data/Tests/InfinityQS-GetData.json
Normal file
@ -0,0 +1,785 @@
|
||||
{
|
||||
"Results": [
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 1,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1650647347,
|
||||
"TD_NAME": "T",
|
||||
"SE_VAL": 270,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 2,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1650647347,
|
||||
"TD_NAME": "T",
|
||||
"SE_VAL": 270,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 3,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1650647347,
|
||||
"TD_NAME": "T",
|
||||
"SE_VAL": 270,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 4,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1650647347,
|
||||
"TD_NAME": "T",
|
||||
"SE_VAL": 270,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 5,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1650647347,
|
||||
"TD_NAME": "T",
|
||||
"SE_VAL": 0,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 6,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1650647347,
|
||||
"TD_NAME": "T",
|
||||
"SE_VAL": 90,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 7,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1650647347,
|
||||
"TD_NAME": "T",
|
||||
"SE_VAL": 90,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 8,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1650647347,
|
||||
"TD_NAME": "T",
|
||||
"SE_VAL": 90,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 9,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1650647347,
|
||||
"TD_NAME": "T",
|
||||
"SE_VAL": 90,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 10,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1650647347,
|
||||
"TD_NAME": "T",
|
||||
"SE_VAL": 90,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 1,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1654782546,
|
||||
"TD_NAME": "Merit",
|
||||
"SE_VAL": 1,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 2,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1654782546,
|
||||
"TD_NAME": "Merit",
|
||||
"SE_VAL": 0.9,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 3,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1654782546,
|
||||
"TD_NAME": "Merit",
|
||||
"SE_VAL": 0.92,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 4,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1654782546,
|
||||
"TD_NAME": "Merit",
|
||||
"SE_VAL": 0.93,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 5,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1654782546,
|
||||
"TD_NAME": "Merit",
|
||||
"SE_VAL": 0.87,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 6,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1654782546,
|
||||
"TD_NAME": "Merit",
|
||||
"SE_VAL": 0.87,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 7,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1654782546,
|
||||
"TD_NAME": "Merit",
|
||||
"SE_VAL": 0.85,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 8,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1654782546,
|
||||
"TD_NAME": "Merit",
|
||||
"SE_VAL": 0.98,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 9,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1654782546,
|
||||
"TD_NAME": "Merit",
|
||||
"SE_VAL": 0.88,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 10,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1654782546,
|
||||
"TD_NAME": "Merit",
|
||||
"SE_VAL": 0.98,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 1,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716039,
|
||||
"TD_NAME": "R",
|
||||
"SE_VAL": 95,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 2,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716039,
|
||||
"TD_NAME": "R",
|
||||
"SE_VAL": 71,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 3,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716039,
|
||||
"TD_NAME": "R",
|
||||
"SE_VAL": 47,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 4,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716039,
|
||||
"TD_NAME": "R",
|
||||
"SE_VAL": 23,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 5,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716039,
|
||||
"TD_NAME": "R",
|
||||
"SE_VAL": 0,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 6,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716039,
|
||||
"TD_NAME": "R",
|
||||
"SE_VAL": 11,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 7,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716039,
|
||||
"TD_NAME": "R",
|
||||
"SE_VAL": 35,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 8,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716039,
|
||||
"TD_NAME": "R",
|
||||
"SE_VAL": 59,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 9,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716039,
|
||||
"TD_NAME": "R",
|
||||
"SE_VAL": 83,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 10,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716039,
|
||||
"TD_NAME": "R",
|
||||
"SE_VAL": 95,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 1,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716040,
|
||||
"TD_NAME": "Rs",
|
||||
"SE_VAL": 1399.703,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 2,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716040,
|
||||
"TD_NAME": "Rs",
|
||||
"SE_VAL": 1425.322,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 3,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716040,
|
||||
"TD_NAME": "Rs",
|
||||
"SE_VAL": 1439.78,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 4,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716040,
|
||||
"TD_NAME": "Rs",
|
||||
"SE_VAL": 1382.154,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 5,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716040,
|
||||
"TD_NAME": "Rs",
|
||||
"SE_VAL": 1406.158,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 6,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716040,
|
||||
"TD_NAME": "Rs",
|
||||
"SE_VAL": 1394.458,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 7,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716040,
|
||||
"TD_NAME": "Rs",
|
||||
"SE_VAL": 1387.965,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 8,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716040,
|
||||
"TD_NAME": "Rs",
|
||||
"SE_VAL": 1411.158,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 9,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716040,
|
||||
"TD_NAME": "Rs",
|
||||
"SE_VAL": 1413.722,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 10,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716040,
|
||||
"TD_NAME": "Rs",
|
||||
"SE_VAL": 1401.816,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 1,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716248,
|
||||
"TD_NAME": "Avg",
|
||||
"SE_VAL": 1406.22,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 2,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716248,
|
||||
"TD_NAME": "Avg",
|
||||
"SE_VAL": 1406.22,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 3,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716248,
|
||||
"TD_NAME": "Avg",
|
||||
"SE_VAL": 1406.22,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 4,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716248,
|
||||
"TD_NAME": "Avg",
|
||||
"SE_VAL": 1406.22,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 5,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716248,
|
||||
"TD_NAME": "Avg",
|
||||
"SE_VAL": 1406.22,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 6,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716248,
|
||||
"TD_NAME": "Avg",
|
||||
"SE_VAL": 1406.22,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 7,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716248,
|
||||
"TD_NAME": "Avg",
|
||||
"SE_VAL": 1406.22,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 8,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716248,
|
||||
"TD_NAME": "Avg",
|
||||
"SE_VAL": 1406.22,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 9,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716248,
|
||||
"TD_NAME": "Avg",
|
||||
"SE_VAL": 1406.22,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 10,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716248,
|
||||
"TD_NAME": "Avg",
|
||||
"SE_VAL": 1406.22,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 1,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716249,
|
||||
"TD_NAME": "Temp",
|
||||
"SE_VAL": 18.2,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 2,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716249,
|
||||
"TD_NAME": "Temp",
|
||||
"SE_VAL": 18.2,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 3,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716249,
|
||||
"TD_NAME": "Temp",
|
||||
"SE_VAL": 18.2,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 4,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716249,
|
||||
"TD_NAME": "Temp",
|
||||
"SE_VAL": 18.2,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 5,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716249,
|
||||
"TD_NAME": "Temp",
|
||||
"SE_VAL": 18.2,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 6,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716249,
|
||||
"TD_NAME": "Temp",
|
||||
"SE_VAL": 18.2,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 7,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716249,
|
||||
"TD_NAME": "Temp",
|
||||
"SE_VAL": 18.2,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 8,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716249,
|
||||
"TD_NAME": "Temp",
|
||||
"SE_VAL": 18.2,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 9,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716249,
|
||||
"TD_NAME": "Temp",
|
||||
"SE_VAL": 18.2,
|
||||
"EV_COUNT": 0
|
||||
},
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 10,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1656716249,
|
||||
"TD_NAME": "Temp",
|
||||
"SE_VAL": 18.2,
|
||||
"EV_COUNT": 0
|
||||
}
|
||||
],
|
||||
"TotalRows": 60
|
||||
}
|
236
Server/Data/Tests/InfinityQS-GetDescriptors.json
Normal file
236
Server/Data/Tests/InfinityQS-GetDescriptors.json
Normal file
@ -0,0 +1,236 @@
|
||||
{
|
||||
"Results": [
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 0,
|
||||
"DD_DSGP": 1655312695,
|
||||
"GD_NAME": "Recipe",
|
||||
"DD_NAME": "LSL8IN \\ 10PT_5mm"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 0,
|
||||
"DD_DSGP": 1656696777,
|
||||
"GD_NAME": "Layer",
|
||||
"DD_NAME": "1"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 0,
|
||||
"DD_DSGP": 1656696778,
|
||||
"GD_NAME": "Zone",
|
||||
"DD_NAME": "1"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 1,
|
||||
"DD_DSGP": 1656716039,
|
||||
"GD_NAME": "DataReject",
|
||||
"DD_NAME": "3.00"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 2,
|
||||
"DD_DSGP": 1656716039,
|
||||
"GD_NAME": "DataReject",
|
||||
"DD_NAME": "3.00"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 3,
|
||||
"DD_DSGP": 1656716039,
|
||||
"GD_NAME": "DataReject",
|
||||
"DD_NAME": "3.00"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 4,
|
||||
"DD_DSGP": 1656716039,
|
||||
"GD_NAME": "DataReject",
|
||||
"DD_NAME": "3.00"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 5,
|
||||
"DD_DSGP": 1656716039,
|
||||
"GD_NAME": "DataReject",
|
||||
"DD_NAME": "3.00"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 6,
|
||||
"DD_DSGP": 1656716039,
|
||||
"GD_NAME": "DataReject",
|
||||
"DD_NAME": "3.00"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 7,
|
||||
"DD_DSGP": 1656716039,
|
||||
"GD_NAME": "DataReject",
|
||||
"DD_NAME": "3.00"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 8,
|
||||
"DD_DSGP": 1656716039,
|
||||
"GD_NAME": "DataReject",
|
||||
"DD_NAME": "3.00"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 9,
|
||||
"DD_DSGP": 1656716039,
|
||||
"GD_NAME": "DataReject",
|
||||
"DD_NAME": "3.00"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 10,
|
||||
"DD_DSGP": 1656716039,
|
||||
"GD_NAME": "DataReject",
|
||||
"DD_NAME": "3.00"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 1,
|
||||
"DD_DSGP": 1656716040,
|
||||
"GD_NAME": "Pt",
|
||||
"DD_NAME": "1"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 2,
|
||||
"DD_DSGP": 1656716040,
|
||||
"GD_NAME": "Pt",
|
||||
"DD_NAME": "2"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 3,
|
||||
"DD_DSGP": 1656716040,
|
||||
"GD_NAME": "Pt",
|
||||
"DD_NAME": "3"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 4,
|
||||
"DD_DSGP": 1656716040,
|
||||
"GD_NAME": "Pt",
|
||||
"DD_NAME": "4"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 5,
|
||||
"DD_DSGP": 1656716040,
|
||||
"GD_NAME": "Pt",
|
||||
"DD_NAME": "5"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 6,
|
||||
"DD_DSGP": 1656716040,
|
||||
"GD_NAME": "Pt",
|
||||
"DD_NAME": "6"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 7,
|
||||
"DD_DSGP": 1656716040,
|
||||
"GD_NAME": "Pt",
|
||||
"DD_NAME": "7"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 8,
|
||||
"DD_DSGP": 1656716040,
|
||||
"GD_NAME": "Pt",
|
||||
"DD_NAME": "8"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 9,
|
||||
"DD_DSGP": 1656716040,
|
||||
"GD_NAME": "Pt",
|
||||
"DD_NAME": "9"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 10,
|
||||
"DD_DSGP": 1656716040,
|
||||
"GD_NAME": "Pt",
|
||||
"DD_NAME": "10"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 1,
|
||||
"DD_DSGP": 1656716042,
|
||||
"GD_NAME": "StdDev",
|
||||
"DD_NAME": "1.23%"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 2,
|
||||
"DD_DSGP": 1656716042,
|
||||
"GD_NAME": "StdDev",
|
||||
"DD_NAME": "1.23%"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 3,
|
||||
"DD_DSGP": 1656716042,
|
||||
"GD_NAME": "StdDev",
|
||||
"DD_NAME": "1.23%"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 4,
|
||||
"DD_DSGP": 1656716042,
|
||||
"GD_NAME": "StdDev",
|
||||
"DD_NAME": "1.23%"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 5,
|
||||
"DD_DSGP": 1656716042,
|
||||
"GD_NAME": "StdDev",
|
||||
"DD_NAME": "1.23%"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 6,
|
||||
"DD_DSGP": 1656716042,
|
||||
"GD_NAME": "StdDev",
|
||||
"DD_NAME": "1.23%"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 7,
|
||||
"DD_DSGP": 1656716042,
|
||||
"GD_NAME": "StdDev",
|
||||
"DD_NAME": "1.23%"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 8,
|
||||
"DD_DSGP": 1656716042,
|
||||
"GD_NAME": "StdDev",
|
||||
"DD_NAME": "1.23%"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 9,
|
||||
"DD_DSGP": 1656716042,
|
||||
"GD_NAME": "StdDev",
|
||||
"DD_NAME": "1.23%"
|
||||
},
|
||||
{
|
||||
"SD_SGRP": 1677273357,
|
||||
"SD_TSNO": 10,
|
||||
"DD_DSGP": 1656716042,
|
||||
"GD_NAME": "StdDev",
|
||||
"DD_NAME": "1.23%"
|
||||
}
|
||||
],
|
||||
"TotalRows": 33
|
||||
}
|
4
Server/Data/Tests/InfinityQS-GetEvents.json
Normal file
4
Server/Data/Tests/InfinityQS-GetEvents.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"Results": [],
|
||||
"TotalRows": 0
|
||||
}
|
18
Server/Data/Tests/InfinityQS-GetHeader.json
Normal file
18
Server/Data/Tests/InfinityQS-GetHeader.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"Results": [
|
||||
{
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 1,
|
||||
"PR_NAME": "61",
|
||||
"JD_NAME": "CDE5",
|
||||
"PL_NAME": "575908",
|
||||
"PD_NAME": "5012",
|
||||
"TD_TEST": 1650647347,
|
||||
"TD_NAME": "T",
|
||||
"SE_VAL": 270,
|
||||
"EV_COUNT": 0
|
||||
}
|
||||
],
|
||||
"TotalRows": 1
|
||||
}
|
35
Server/Data/Tests/InfinityQSV2-GetCommandText.sql
Normal file
35
Server/Data/Tests/InfinityQSV2-GetCommandText.sql
Normal file
@ -0,0 +1,35 @@
|
||||
select
|
||||
se.f_sgrp se_sgrp,
|
||||
se.f_sgtm se_sgtm,
|
||||
se.f_tsno se_tsno,
|
||||
se.f_val se_val,
|
||||
rd.f_name rd_name,
|
||||
jd.f_name jd_name,
|
||||
pl.f_name pl_name,
|
||||
pd.f_name pd_name,
|
||||
td.f_test td_test,
|
||||
td.f_name td_name,
|
||||
(select count(ev.f_evnt)
|
||||
from [spcepiworld].[dbo].[evnt_inf] ev
|
||||
where ev.f_prcs = rd.f_prcs
|
||||
and ev.f_part = pd.f_part
|
||||
and ev.f_sgtm = se.f_sgtm) ev_count
|
||||
from [spcepiworld].[dbo].[sgrp_ext] se
|
||||
join [spcepiworld].[dbo].[prcs_dat] rd
|
||||
on se.f_prcs = rd.f_prcs
|
||||
join [spcepiworld].[dbo].[job_dat] jd
|
||||
on se.f_job = jd.f_job
|
||||
join [spcepiworld].[dbo].[part_lot] pl
|
||||
on se.f_lot = pl.f_lot
|
||||
join [spcepiworld].[dbo].[part_dat] pd
|
||||
on se.f_part = pd.f_part
|
||||
join [spcepiworld].[dbo].[test_dat] td
|
||||
on se.f_test = td.f_test
|
||||
where se.f_flag = 0
|
||||
and se.f_sgrp = 1677273357
|
||||
and rd.f_name = '61'
|
||||
and pd.f_name = '5012'
|
||||
and jd.f_name = 'CDE5'
|
||||
and pl.f_name = '575908'
|
||||
and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '2023-02-24 15:15:00'
|
||||
for json path
|
785
Server/Data/Tests/InfinityQSV2-GetData.json
Normal file
785
Server/Data/Tests/InfinityQSV2-GetData.json
Normal file
@ -0,0 +1,785 @@
|
||||
{
|
||||
"Results": [
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 1,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1650647347,
|
||||
"Variable": "T",
|
||||
"Value": 270,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 2,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1650647347,
|
||||
"Variable": "T",
|
||||
"Value": 270,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 3,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1650647347,
|
||||
"Variable": "T",
|
||||
"Value": 270,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 4,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1650647347,
|
||||
"Variable": "T",
|
||||
"Value": 270,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 5,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1650647347,
|
||||
"Variable": "T",
|
||||
"Value": 0,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 6,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1650647347,
|
||||
"Variable": "T",
|
||||
"Value": 90,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 7,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1650647347,
|
||||
"Variable": "T",
|
||||
"Value": 90,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 8,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1650647347,
|
||||
"Variable": "T",
|
||||
"Value": 90,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 9,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1650647347,
|
||||
"Variable": "T",
|
||||
"Value": 90,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 10,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1650647347,
|
||||
"Variable": "T",
|
||||
"Value": 90,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 1,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1654782546,
|
||||
"Variable": "Merit",
|
||||
"Value": 1,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 2,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1654782546,
|
||||
"Variable": "Merit",
|
||||
"Value": 0.9,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 3,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1654782546,
|
||||
"Variable": "Merit",
|
||||
"Value": 0.92,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 4,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1654782546,
|
||||
"Variable": "Merit",
|
||||
"Value": 0.93,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 5,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1654782546,
|
||||
"Variable": "Merit",
|
||||
"Value": 0.87,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 6,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1654782546,
|
||||
"Variable": "Merit",
|
||||
"Value": 0.87,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 7,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1654782546,
|
||||
"Variable": "Merit",
|
||||
"Value": 0.85,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 8,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1654782546,
|
||||
"Variable": "Merit",
|
||||
"Value": 0.98,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 9,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1654782546,
|
||||
"Variable": "Merit",
|
||||
"Value": 0.88,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 10,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1654782546,
|
||||
"Variable": "Merit",
|
||||
"Value": 0.98,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 1,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "R",
|
||||
"Value": 95,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 2,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "R",
|
||||
"Value": 71,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 3,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "R",
|
||||
"Value": 47,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 4,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "R",
|
||||
"Value": 23,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 5,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "R",
|
||||
"Value": 0,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 6,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "R",
|
||||
"Value": 11,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 7,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "R",
|
||||
"Value": 35,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 8,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "R",
|
||||
"Value": 59,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 9,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "R",
|
||||
"Value": 83,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 10,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "R",
|
||||
"Value": 95,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 1,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Rs",
|
||||
"Value": 1399.703,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 2,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Rs",
|
||||
"Value": 1425.322,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 3,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Rs",
|
||||
"Value": 1439.78,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 4,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Rs",
|
||||
"Value": 1382.154,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 5,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Rs",
|
||||
"Value": 1406.158,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 6,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Rs",
|
||||
"Value": 1394.458,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 7,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Rs",
|
||||
"Value": 1387.965,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 8,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Rs",
|
||||
"Value": 1411.158,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 9,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Rs",
|
||||
"Value": 1413.722,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 10,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Rs",
|
||||
"Value": 1401.816,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 1,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716248,
|
||||
"Variable": "Avg",
|
||||
"Value": 1406.22,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 2,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716248,
|
||||
"Variable": "Avg",
|
||||
"Value": 1406.22,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 3,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716248,
|
||||
"Variable": "Avg",
|
||||
"Value": 1406.22,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 4,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716248,
|
||||
"Variable": "Avg",
|
||||
"Value": 1406.22,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 5,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716248,
|
||||
"Variable": "Avg",
|
||||
"Value": 1406.22,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 6,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716248,
|
||||
"Variable": "Avg",
|
||||
"Value": 1406.22,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 7,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716248,
|
||||
"Variable": "Avg",
|
||||
"Value": 1406.22,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 8,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716248,
|
||||
"Variable": "Avg",
|
||||
"Value": 1406.22,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 9,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716248,
|
||||
"Variable": "Avg",
|
||||
"Value": 1406.22,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 10,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716248,
|
||||
"Variable": "Avg",
|
||||
"Value": 1406.22,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 1,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716249,
|
||||
"Variable": "Temp",
|
||||
"Value": 18.2,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 2,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716249,
|
||||
"Variable": "Temp",
|
||||
"Value": 18.2,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 3,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716249,
|
||||
"Variable": "Temp",
|
||||
"Value": 18.2,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 4,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716249,
|
||||
"Variable": "Temp",
|
||||
"Value": 18.2,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 5,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716249,
|
||||
"Variable": "Temp",
|
||||
"Value": 18.2,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 6,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716249,
|
||||
"Variable": "Temp",
|
||||
"Value": 18.2,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 7,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716249,
|
||||
"Variable": "Temp",
|
||||
"Value": 18.2,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 8,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716249,
|
||||
"Variable": "Temp",
|
||||
"Value": 18.2,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 9,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716249,
|
||||
"Variable": "Temp",
|
||||
"Value": 18.2,
|
||||
"EventCount": 0
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 10,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1656716249,
|
||||
"Variable": "Temp",
|
||||
"Value": 18.2,
|
||||
"EventCount": 0
|
||||
}
|
||||
],
|
||||
"TotalRows": 60
|
||||
}
|
236
Server/Data/Tests/InfinityQSV2-GetDescriptors.json
Normal file
236
Server/Data/Tests/InfinityQSV2-GetDescriptors.json
Normal file
@ -0,0 +1,236 @@
|
||||
{
|
||||
"Results": [
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 0,
|
||||
"VariableNumber": 1655312695,
|
||||
"Variable": "Recipe",
|
||||
"Value": "LSL8IN \\ 10PT_5mm"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 0,
|
||||
"VariableNumber": 1656696777,
|
||||
"Variable": "Layer",
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 0,
|
||||
"VariableNumber": 1656696778,
|
||||
"Variable": "Zone",
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 1,
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "DataReject",
|
||||
"Value": "3.00"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 2,
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "DataReject",
|
||||
"Value": "3.00"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 3,
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "DataReject",
|
||||
"Value": "3.00"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 4,
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "DataReject",
|
||||
"Value": "3.00"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 5,
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "DataReject",
|
||||
"Value": "3.00"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 6,
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "DataReject",
|
||||
"Value": "3.00"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 7,
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "DataReject",
|
||||
"Value": "3.00"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 8,
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "DataReject",
|
||||
"Value": "3.00"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 9,
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "DataReject",
|
||||
"Value": "3.00"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 10,
|
||||
"VariableNumber": 1656716039,
|
||||
"Variable": "DataReject",
|
||||
"Value": "3.00"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 1,
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Pt",
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 2,
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Pt",
|
||||
"Value": "2"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 3,
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Pt",
|
||||
"Value": "3"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 4,
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Pt",
|
||||
"Value": "4"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 5,
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Pt",
|
||||
"Value": "5"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 6,
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Pt",
|
||||
"Value": "6"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 7,
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Pt",
|
||||
"Value": "7"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 8,
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Pt",
|
||||
"Value": "8"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 9,
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Pt",
|
||||
"Value": "9"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 10,
|
||||
"VariableNumber": 1656716040,
|
||||
"Variable": "Pt",
|
||||
"Value": "10"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 1,
|
||||
"VariableNumber": 1656716042,
|
||||
"Variable": "StdDev",
|
||||
"Value": "1.23%"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 2,
|
||||
"VariableNumber": 1656716042,
|
||||
"Variable": "StdDev",
|
||||
"Value": "1.23%"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 3,
|
||||
"VariableNumber": 1656716042,
|
||||
"Variable": "StdDev",
|
||||
"Value": "1.23%"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 4,
|
||||
"VariableNumber": 1656716042,
|
||||
"Variable": "StdDev",
|
||||
"Value": "1.23%"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 5,
|
||||
"VariableNumber": 1656716042,
|
||||
"Variable": "StdDev",
|
||||
"Value": "1.23%"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 6,
|
||||
"VariableNumber": 1656716042,
|
||||
"Variable": "StdDev",
|
||||
"Value": "1.23%"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 7,
|
||||
"VariableNumber": 1656716042,
|
||||
"Variable": "StdDev",
|
||||
"Value": "1.23%"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 8,
|
||||
"VariableNumber": 1656716042,
|
||||
"Variable": "StdDev",
|
||||
"Value": "1.23%"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 9,
|
||||
"VariableNumber": 1656716042,
|
||||
"Variable": "StdDev",
|
||||
"Value": "1.23%"
|
||||
},
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SiteNumber": 10,
|
||||
"VariableNumber": 1656716042,
|
||||
"Variable": "StdDev",
|
||||
"Value": "1.23%"
|
||||
}
|
||||
],
|
||||
"TotalRows": 33
|
||||
}
|
4
Server/Data/Tests/InfinityQSV2-GetEvents.json
Normal file
4
Server/Data/Tests/InfinityQSV2-GetEvents.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"Results": [],
|
||||
"TotalRows": 0
|
||||
}
|
18
Server/Data/Tests/InfinityQSV2-GetHeader.json
Normal file
18
Server/Data/Tests/InfinityQSV2-GetHeader.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"Results": [
|
||||
{
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 1,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1650647347,
|
||||
"Variable": "T",
|
||||
"Value": 270,
|
||||
"EventCount": 0
|
||||
}
|
||||
],
|
||||
"TotalRows": 1
|
||||
}
|
4
Server/Data/Tests/Pin-GetPinnedTable.json
Normal file
4
Server/Data/Tests/Pin-GetPinnedTable.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"Results": [],
|
||||
"TotalRows": 0
|
||||
}
|
23
Server/Data/Tests/ToolTypes-GetData.json
Normal file
23
Server/Data/Tests/ToolTypes-GetData.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"Results": [
|
||||
{
|
||||
"InsertDate": null,
|
||||
"Run Header": null,
|
||||
"Title": null,
|
||||
"AttachmentID": null,
|
||||
"Position": "Average",
|
||||
"Thickness": "NaN",
|
||||
"ID": -1
|
||||
},
|
||||
{
|
||||
"InsertDate": null,
|
||||
"Run Header": null,
|
||||
"Title": null,
|
||||
"AttachmentID": null,
|
||||
"Position": "Std Dev",
|
||||
"Thickness": "NaN",
|
||||
"ID": -2
|
||||
}
|
||||
],
|
||||
"TotalRows": 2
|
||||
}
|
@ -2,23 +2,23 @@
|
||||
"Results": [
|
||||
{
|
||||
"Column": "ID",
|
||||
"Value": "1"
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "InsertDate",
|
||||
"Value": "9/12/2019 4:02:17 PM"
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "Title",
|
||||
"Value": "Bio-RadQS400MEPI_99-999999-9999.1_201909121559040648"
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "Recipe",
|
||||
"Value": "6in_thick"
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "Date",
|
||||
"Value": "9/12/2019 3:59:05 PM"
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "Operator",
|
||||
@ -26,7 +26,7 @@
|
||||
},
|
||||
{
|
||||
"Column": "Batch",
|
||||
"Value": "BIORAD #4"
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "Cassette",
|
||||
@ -34,43 +34,43 @@
|
||||
},
|
||||
{
|
||||
"Column": "Wafer",
|
||||
"Value": "99-999999-9999.1"
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "Mean Thickness",
|
||||
"Value": "114.785"
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "RV Thickness",
|
||||
"Value": "0.0000"
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "Status",
|
||||
"Value": "PASS"
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "Std Dev",
|
||||
"Value": "1.1047"
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "SentToMetrology",
|
||||
"Value": "True"
|
||||
"Column": "SentToOI",
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "SentToSPC",
|
||||
"Value": "False"
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "Reactor",
|
||||
"Value": "99"
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "RDS",
|
||||
"Value": "999999"
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "PSN",
|
||||
"Value": "9999"
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "Path",
|
||||
@ -78,12 +78,16 @@
|
||||
},
|
||||
{
|
||||
"Column": "Layer",
|
||||
"Value": "1"
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "Zone",
|
||||
"Value": ""
|
||||
},
|
||||
{
|
||||
"Column": "Tool",
|
||||
"Value": ""
|
||||
}
|
||||
],
|
||||
"TotalRows": 21
|
||||
"TotalRows": 22
|
||||
}
|
138742
Server/Data/Tests/ToolTypes-GetHeaderTitles.json
Normal file
138742
Server/Data/Tests/ToolTypes-GetHeaderTitles.json
Normal file
File diff suppressed because it is too large
Load Diff
1
Server/Data/Tests/ToolTypes-GetHeaders.json
Normal file
1
Server/Data/Tests/ToolTypes-GetHeaders.json
Normal file
File diff suppressed because one or more lines are too long
@ -134,8 +134,8 @@
|
||||
"ApiName": "Layer",
|
||||
"ColumnName": "Layer",
|
||||
"DisplayTitle": "Layer",
|
||||
"GridDisplayOrder": 5,
|
||||
"GridAttributes": null,
|
||||
"GridDisplayOrder": 6,
|
||||
"GridAttributes": "{ \u0022formatter\u0022: \u0022isNull\u0022 }",
|
||||
"TableDisplayOrder": 20
|
||||
},
|
||||
{
|
||||
@ -155,7 +155,7 @@
|
||||
"ColumnName": "Operator",
|
||||
"DisplayTitle": "Operator",
|
||||
"GridDisplayOrder": 8,
|
||||
"GridAttributes": null,
|
||||
"GridAttributes": "{ \u0022formatter\u0022: \u0022isNull\u0022 }",
|
||||
"TableDisplayOrder": 6
|
||||
},
|
||||
{
|
||||
@ -174,8 +174,8 @@
|
||||
"ApiName": "PSN",
|
||||
"ColumnName": "PSN",
|
||||
"DisplayTitle": "PSN",
|
||||
"GridDisplayOrder": 4,
|
||||
"GridAttributes": null,
|
||||
"GridDisplayOrder": 5,
|
||||
"GridAttributes": "{ \u0022formatter\u0022: \u0022isNull\u0022 }",
|
||||
"TableDisplayOrder": 18
|
||||
},
|
||||
{
|
||||
@ -184,8 +184,8 @@
|
||||
"ApiName": "RDS",
|
||||
"ColumnName": "RDS",
|
||||
"DisplayTitle": "RDS",
|
||||
"GridDisplayOrder": 3,
|
||||
"GridAttributes": null,
|
||||
"GridDisplayOrder": 4,
|
||||
"GridAttributes": "{ \u0022formatter\u0022: \u0022isNull\u0022 }",
|
||||
"TableDisplayOrder": 17
|
||||
},
|
||||
{
|
||||
@ -194,7 +194,7 @@
|
||||
"ApiName": "Reactor",
|
||||
"ColumnName": "Reactor",
|
||||
"DisplayTitle": "Reactor",
|
||||
"GridDisplayOrder": 2,
|
||||
"GridDisplayOrder": 3,
|
||||
"GridAttributes": null,
|
||||
"TableDisplayOrder": 16
|
||||
},
|
||||
@ -223,7 +223,7 @@
|
||||
"Header": true,
|
||||
"ApiName": "SentToMetrology",
|
||||
"ColumnName": "SentToMetrology",
|
||||
"DisplayTitle": "SentToMetrology",
|
||||
"DisplayTitle": "SentToOI",
|
||||
"GridDisplayOrder": 9,
|
||||
"GridAttributes": "{ \u0022dataType:\u0022: \u0022bool\u0022, \u0022formatter\u0022: \u0022boolToYesNo\u0022 }",
|
||||
"TableDisplayOrder": 14
|
||||
@ -234,7 +234,7 @@
|
||||
"ApiName": "SentToSPC",
|
||||
"ColumnName": "SentToSPC",
|
||||
"DisplayTitle": "SentToSPC",
|
||||
"GridDisplayOrder": 10,
|
||||
"GridDisplayOrder": 0,
|
||||
"GridAttributes": "{ \u0022dataType:\u0022: \u0022bool\u0022, \u0022formatter\u0022: \u0022boolToYesNo\u0022 }",
|
||||
"TableDisplayOrder": 15
|
||||
},
|
||||
@ -327,8 +327,18 @@
|
||||
"GridDisplayOrder": -1,
|
||||
"GridAttributes": null,
|
||||
"TableDisplayOrder": -1
|
||||
},
|
||||
{
|
||||
"ToolTypeID": 1,
|
||||
"Header": true,
|
||||
"ApiName": "CellName",
|
||||
"ColumnName": "Tool",
|
||||
"DisplayTitle": "Tool",
|
||||
"GridDisplayOrder": 2,
|
||||
"GridAttributes": null,
|
||||
"TableDisplayOrder": 22
|
||||
}
|
||||
]
|
||||
},
|
||||
"TotalRows": 31
|
||||
"TotalRows": 32
|
||||
}
|
@ -64,46 +64,70 @@
|
||||
<None Include="Data\Mike\service-shop.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\GetAllServiceShopOrdersApi.json">
|
||||
<None Include="Data\Tests\AppSettings-GetAppSettings.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\GetAppSettingsApi.json">
|
||||
<None Include="Data\Tests\AppSettings-GetBuildNumberAndGitCommitSeven.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\GetAwaitingDispositionApi.json">
|
||||
<None Include="Data\Tests\ClientSettings-GetClientSettings.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\GetBuildNumberAndGitCommitSevenApi.json">
|
||||
<None Include="Data\Tests\ClientSettings-GetIpAddress.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\GetClientSettingsApi.json">
|
||||
<None Include="Data\Tests\InfinityQS-GetCommandText.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\GetDataApi.json">
|
||||
<None Include="Data\Tests\InfinityQS-GetData.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\GetExportDataApi.json">
|
||||
<None Include="Data\Tests\InfinityQS-GetDescriptors.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\GetHeaderFieldsApi.json">
|
||||
<None Include="Data\Tests\InfinityQS-GetEvents.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\GetHeadersApi.json">
|
||||
<None Include="Data\Tests\InfinityQS-GetHeader.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\GetHeaderTitlesApi.json">
|
||||
<None Include="Data\Tests\InfinityQSV2-GetCommandText.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\GetIpAddressApi.json">
|
||||
<None Include="Data\Tests\InfinityQSV2-GetData.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\GetPinnedTableApi.json">
|
||||
<None Include="Data\Tests\InfinityQSV2-GetDescriptors.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\GetToolTypeMetadataApi.json">
|
||||
<None Include="Data\Tests\InfinityQSV2-GetEvents.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\IndexApi.json">
|
||||
<None Include="Data\Tests\InfinityQSV2-GetHeader.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\Pin-GetPinnedTable.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\ServiceShopOrder-GetAllServiceShopOrders.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\ToolTypes-GetData.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\ToolTypes-GetHeaderFields.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\ToolTypes-GetHeaderTitles.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\ToolTypes-GetHeaders.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\ToolTypes-GetToolTypeMetadata.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\ToolTypes-Index.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
@ -67,13 +67,14 @@ public class Program
|
||||
|
||||
_ = webApplicationBuilder.Services.AddSingleton(_ => appSettings);
|
||||
_ = webApplicationBuilder.Services.AddSingleton<IInboundRepository, InboundRepository>();
|
||||
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSRepository, InfinityQSRepository>();
|
||||
_ = webApplicationBuilder.Services.AddSingleton<IClientSettingsRepository>(_ => clientSettingsRepository);
|
||||
_ = webApplicationBuilder.Services.AddSingleton<IServiceShopOrderRepository, ServiceShopOrderRepository>();
|
||||
_ = webApplicationBuilder.Services.AddSingleton<IPinRepository, PinRepository>(_ => new(appSettings.MockRoot));
|
||||
_ = webApplicationBuilder.Services.AddSingleton<IDbConnectionFactory, SQLDbConnectionFactory>(_ => sqlDbConnectionFactory);
|
||||
_ = webApplicationBuilder.Services.AddSingleton<IToolTypesRepository, ToolTypesRepository>(_ => new(appSettings.MockRoot));
|
||||
_ = webApplicationBuilder.Services.AddSingleton<IAppSettingsRepository<Models.Binder.AppSettings>>(_ => appSettingsRepository);
|
||||
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSRepository, InfinityQSRepository>(_ => new(appSettings.MockRoot, sqlDbConnectionFactory));
|
||||
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSV2Repository, InfinityQSV2Repository>(_ => new(appSettings.MockRoot, sqlDbConnectionFactory));
|
||||
|
||||
_ = webApplicationBuilder.Services.AddScoped<IAttachmentsService, AttachmentsService>();
|
||||
_ = webApplicationBuilder.Services.AddScoped<IInboundDataService, InboundDataService>();
|
||||
|
@ -33,4 +33,26 @@ public class AppSettingsRepository : IAppSettingsRepository<Models.Binder.AppSet
|
||||
|
||||
string IAppSettingsRepository<Models.Binder.AppSettings>.GetBuildNumberAndGitCommitSeven() => GetBuildNumberAndGitCommitSeven();
|
||||
|
||||
internal void VerifyConnectionStrings()
|
||||
{
|
||||
if (string.IsNullOrEmpty(_AppSettings.ConnectionString))
|
||||
throw new NotSupportedException();
|
||||
if (string.IsNullOrEmpty(_AppSettings.OI2SqlConnectionString))
|
||||
throw new NotSupportedException();
|
||||
#if DEBUG
|
||||
if (!_AppSettings.ConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
|
||||
throw new NotSupportedException();
|
||||
if (!_AppSettings.OI2SqlConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
|
||||
throw new NotSupportedException();
|
||||
#endif
|
||||
#if !DEBUG
|
||||
if (_AppSettings.ConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
|
||||
throw new NotSupportedException();
|
||||
if (_AppSettings.OI2SqlConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
|
||||
throw new NotSupportedException();
|
||||
#endif
|
||||
}
|
||||
|
||||
void IAppSettingsRepository<Models.Binder.AppSettings>.VerifyConnectionStrings() => VerifyConnectionStrings();
|
||||
|
||||
}
|
@ -1,151 +0,0 @@
|
||||
using OI.Metrology.Shared.DataModels;
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
using OI.Metrology.Shared.Repositories;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace OI.Metrology.Server.Repository;
|
||||
|
||||
public class InfinityQSRepository : IInfinityQSRepository
|
||||
{
|
||||
|
||||
private readonly IDbConnectionFactory _DBConnectionFactory;
|
||||
|
||||
public InfinityQSRepository(IDbConnectionFactory dbConnectionFactory) => _DBConnectionFactory = dbConnectionFactory;
|
||||
|
||||
string IInfinityQSRepository.GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
const string dateTimeFormat = "yyyy-MM-dd HH:mm:ss";
|
||||
if (!string.IsNullOrEmpty(dateTime) && (dateTime.Contains('-') || dateTime.Contains(' ') || dateTime.Contains(':')) && dateTime.Length != dateTimeFormat.Length)
|
||||
throw new ArgumentException(nameof(dateTime));
|
||||
_ = result
|
||||
.AppendLine(" select ")
|
||||
.AppendLine(" se.f_sgrp se_sgrp, ")
|
||||
.AppendLine(" se.f_sgtm se_sgtm, ")
|
||||
.AppendLine(" se.f_tsno se_tsno, ")
|
||||
.AppendLine(" se.f_val se_val, ")
|
||||
.AppendLine(" rd.f_name rd_name, ")
|
||||
.AppendLine(" jd.f_name jd_name, ")
|
||||
.AppendLine(" pl.f_name pl_name, ")
|
||||
.AppendLine(" pd.f_name pd_name, ")
|
||||
.AppendLine(" td.f_test td_test, ")
|
||||
.AppendLine(" td.f_name td_name, ")
|
||||
.AppendLine(" (select count(ev.f_evnt) ")
|
||||
.AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ")
|
||||
.AppendLine(" where ev.f_prcs = rd.f_prcs ")
|
||||
.AppendLine(" and ev.f_part = pd.f_part ")
|
||||
.AppendLine(" and ev.f_sgtm = se.f_sgtm) ev_count ")
|
||||
.AppendLine(" from [spcepiworld].[dbo].[sgrp_ext] se ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] rd ")
|
||||
.AppendLine(" on se.f_prcs = rd.f_prcs ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[job_dat] jd ")
|
||||
.AppendLine(" on se.f_job = jd.f_job ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[part_lot] pl ")
|
||||
.AppendLine(" on se.f_lot = pl.f_lot ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ")
|
||||
.AppendLine(" on se.f_part = pd.f_part ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ")
|
||||
.AppendLine(" on se.f_test = td.f_test ")
|
||||
.AppendLine(" where se.f_flag = 0 ");
|
||||
if (!string.IsNullOrEmpty(subGroupId))
|
||||
_ = result.Append(" and se.f_sgrp = ").Append(subGroupId.Split(" ")[0]).AppendLine(" ");
|
||||
if (!string.IsNullOrEmpty(process))
|
||||
_ = result.Append(" and rd.f_name = '").Append(process).AppendLine("' ");
|
||||
if (!string.IsNullOrEmpty(part))
|
||||
_ = result.Append(" and pd.f_name = '").Append(part).AppendLine("' ");
|
||||
if (!string.IsNullOrEmpty(job))
|
||||
_ = result.Append(" and jd.f_name = '").Append(job).AppendLine("' ");
|
||||
if (!string.IsNullOrEmpty(lot))
|
||||
_ = result.Append(" and pl.f_name = '").Append(lot).AppendLine("' ");
|
||||
if (!string.IsNullOrEmpty(dateTime) && (dateTime.Contains('-') || dateTime.Contains(' ') || dateTime.Contains(':')))
|
||||
_ = result.Append(" and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '").Append(dateTime).AppendLine("' ");
|
||||
_ = result.AppendLine(" for json path ");
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
private static StringBuilder GetForJsonPath(IDbConnectionFactory dbConnectionFactory, string commandText)
|
||||
{
|
||||
StringBuilder stringBuilder = new();
|
||||
using DbConnection dbConnection = dbConnectionFactory.GetDbConnection();
|
||||
DbCommand dbCommand = dbConnection.CreateCommand();
|
||||
dbCommand.CommandText = commandText;
|
||||
DbDataReader dbDataReader = dbCommand.ExecuteReader(CommandBehavior.SequentialAccess);
|
||||
while (dbDataReader.Read())
|
||||
_ = stringBuilder.Append(dbDataReader.GetString(0));
|
||||
return stringBuilder;
|
||||
}
|
||||
|
||||
private static InfinityQSBase GetInfinityQSBase(IDbConnectionFactory dbConnectionFactory, IInfinityQSRepository infinityQSRepository, string subGroupId)
|
||||
{
|
||||
InfinityQSBase result;
|
||||
string commandText = infinityQSRepository.GetCommandText(subGroupId, process: string.Empty, job: string.Empty, part: string.Empty, lot: string.Empty, dateTime: string.Empty);
|
||||
StringBuilder stringBuilder = GetForJsonPath(dbConnectionFactory, commandText);
|
||||
InfinityQSBase[]? results = JsonSerializer.Deserialize<InfinityQSBase[]>(stringBuilder.ToString());
|
||||
if (results is null)
|
||||
throw new NullReferenceException(nameof(results));
|
||||
if (results.Select(l => l.SubGroupId).Distinct().Count() != 1)
|
||||
throw new NotSupportedException("Multiple ids are present!");
|
||||
result = results.First();
|
||||
return result;
|
||||
}
|
||||
|
||||
Result<InfinityQSBase[]> IInfinityQSRepository.GetData(string subGroupId)
|
||||
{
|
||||
Result<InfinityQSBase[]>? result;
|
||||
IInfinityQSRepository infinityQSRepository = this;
|
||||
InfinityQSBase infinityQSBase = GetInfinityQSBase(_DBConnectionFactory, infinityQSRepository, subGroupId);
|
||||
string commandText = infinityQSRepository.GetCommandText(subGroupId, process: infinityQSBase.Process, job: infinityQSBase.Job, part: infinityQSBase.Part, lot: infinityQSBase.Lot, dateTime: string.Concat(infinityQSBase.SubGroupDateTime));
|
||||
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
|
||||
InfinityQSBase[]? results = JsonSerializer.Deserialize<InfinityQSBase[]>(stringBuilder.ToString());
|
||||
if (results is null)
|
||||
throw new NullReferenceException(nameof(results));
|
||||
result = new()
|
||||
{
|
||||
Results = results,
|
||||
TotalRows = results.Length,
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
Result<InfinityQSEvent[]> IInfinityQSRepository.GetEvents(string subGroupId)
|
||||
{
|
||||
Result<InfinityQSEvent[]>? result;
|
||||
IInfinityQSRepository infinityQSRepository = this;
|
||||
InfinityQSEvent[]? results;
|
||||
InfinityQSBase infinityQSBase = GetInfinityQSBase(_DBConnectionFactory, infinityQSRepository, subGroupId);
|
||||
if (!infinityQSBase.EventCount.HasValue || infinityQSBase.EventCount.Value <= 0)
|
||||
results = Array.Empty<InfinityQSEvent>();
|
||||
else
|
||||
{
|
||||
string commandText = $"select * from [spcepiworld].[dbo].[evnt_inf] ev where ev.f_prcs = '{infinityQSBase.Process}' and ev.f_part = '{infinityQSBase.Part}' and ev.f_sgtm = {infinityQSBase.SubGroupDateTime} ";
|
||||
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
|
||||
results = JsonSerializer.Deserialize<InfinityQSEvent[]>(stringBuilder.ToString());
|
||||
if (results is null)
|
||||
throw new NullReferenceException(nameof(results));
|
||||
}
|
||||
result = new()
|
||||
{
|
||||
Results = results,
|
||||
TotalRows = results.Length,
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
Result<InfinityQSBase[]> IInfinityQSRepository.GetHeader(string subGroupId)
|
||||
{
|
||||
Result<InfinityQSBase[]>? result;
|
||||
IInfinityQSRepository infinityQSRepository = this;
|
||||
InfinityQSBase infinityQSBase = GetInfinityQSBase(_DBConnectionFactory, infinityQSRepository, subGroupId);
|
||||
InfinityQSBase[] results = new InfinityQSBase[] { infinityQSBase };
|
||||
result = new()
|
||||
{
|
||||
Results = results,
|
||||
TotalRows = results.Length,
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
238
Server/Repositories/InfinityQSRepository.cs
Normal file
238
Server/Repositories/InfinityQSRepository.cs
Normal file
@ -0,0 +1,238 @@
|
||||
using OI.Metrology.Shared.DataModels;
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
using OI.Metrology.Shared.Repositories;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace OI.Metrology.Server.Repository;
|
||||
|
||||
public class InfinityQSRepository : IInfinityQSRepository
|
||||
{
|
||||
|
||||
private readonly string _MockRoot;
|
||||
private readonly string _RepositoryName;
|
||||
private readonly IDbConnectionFactory _DBConnectionFactory;
|
||||
|
||||
public InfinityQSRepository(string mockRoot, IDbConnectionFactory dbConnectionFactory)
|
||||
{
|
||||
_MockRoot = mockRoot;
|
||||
_DBConnectionFactory = dbConnectionFactory;
|
||||
_RepositoryName = nameof(InfinityQSRepository)[..^10];
|
||||
}
|
||||
|
||||
string IInfinityQSRepository.GetCommandText(string subGroupId)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
if (string.IsNullOrEmpty(subGroupId))
|
||||
throw new ArgumentException(nameof(subGroupId));
|
||||
_ = result
|
||||
.AppendLine(" select ")
|
||||
.AppendLine(" sd.f_sgrp sd_sgrp, ")
|
||||
.AppendLine(" sd.f_tsno sd_tsno, ")
|
||||
.AppendLine(" dd.f_dsgp dd_dsgp, ")
|
||||
.AppendLine(" dg.f_name gd_name, ")
|
||||
.AppendLine(" dd.f_name dd_name ")
|
||||
.AppendLine(" from [SPCEPIWORLD].[dbo].[SGRP_DSC] sd ")
|
||||
.AppendLine(" join [SPCEPIWORLD].[dbo].[DESC_DAT] dd ")
|
||||
.AppendLine(" on sd.f_dsgp = dd.f_dsgp ")
|
||||
.AppendLine(" and sd.f_desc = dd.f_desc ")
|
||||
.AppendLine(" join [SPCEPIWORLD].[dbo].[DESC_GRP] dg ")
|
||||
.AppendLine(" on dd.f_dsgp = dg.f_dsgp ");
|
||||
_ = result.Append(" where sd.f_sgrp = ").Append(subGroupId).AppendLine(" ");
|
||||
_ = result.AppendLine(" for json path ");
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
string IInfinityQSRepository.GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
const string dateTimeFormat = "yyyy-MM-dd HH:mm:ss";
|
||||
if (!string.IsNullOrEmpty(dateTime) && (dateTime.Contains('-') || dateTime.Contains(' ') || dateTime.Contains(':')) && dateTime.Length != dateTimeFormat.Length)
|
||||
throw new ArgumentException(nameof(dateTime));
|
||||
_ = result
|
||||
.AppendLine(" select ")
|
||||
.AppendLine(" se.f_sgrp se_sgrp, ")
|
||||
.AppendLine(" se.f_sgtm se_sgtm, ")
|
||||
.AppendLine(" se.f_tsno se_tsno, ")
|
||||
.AppendLine(" se.f_val se_val, ")
|
||||
.AppendLine(" pr.f_name pr_name, ")
|
||||
.AppendLine(" jd.f_name jd_name, ")
|
||||
.AppendLine(" pl.f_name pl_name, ")
|
||||
.AppendLine(" pd.f_name pd_name, ")
|
||||
.AppendLine(" td.f_test td_test, ")
|
||||
.AppendLine(" td.f_name td_name, ")
|
||||
.AppendLine(" (select count(ev.f_evnt) ")
|
||||
.AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ")
|
||||
.AppendLine(" where ev.f_prcs = pr.f_prcs ")
|
||||
.AppendLine(" and ev.f_part = pd.f_part ")
|
||||
.AppendLine(" and ev.f_sgtm = se.f_sgtm) ev_count ")
|
||||
.AppendLine(" from [spcepiworld].[dbo].[sgrp_ext] se ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] pr ")
|
||||
.AppendLine(" on se.f_prcs = pr.f_prcs ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[job_dat] jd ")
|
||||
.AppendLine(" on se.f_job = jd.f_job ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[part_lot] pl ")
|
||||
.AppendLine(" on se.f_lot = pl.f_lot ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ")
|
||||
.AppendLine(" on se.f_part = pd.f_part ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ")
|
||||
.AppendLine(" on se.f_test = td.f_test ")
|
||||
.AppendLine(" where se.f_flag = 0 ");
|
||||
if (!string.IsNullOrEmpty(subGroupId))
|
||||
_ = result.Append(" and se.f_sgrp = ").Append(subGroupId.Split(" ")[0]).AppendLine(" ");
|
||||
if (!string.IsNullOrEmpty(process))
|
||||
_ = result.Append(" and pr.f_name = '").Append(process).AppendLine("' ");
|
||||
if (!string.IsNullOrEmpty(part))
|
||||
_ = result.Append(" and pd.f_name = '").Append(part).AppendLine("' ");
|
||||
if (!string.IsNullOrEmpty(job))
|
||||
_ = result.Append(" and jd.f_name = '").Append(job).AppendLine("' ");
|
||||
if (!string.IsNullOrEmpty(lot))
|
||||
_ = result.Append(" and pl.f_name = '").Append(lot).AppendLine("' ");
|
||||
if (!string.IsNullOrEmpty(dateTime) && (dateTime.Contains('-') || dateTime.Contains(' ') || dateTime.Contains(':')))
|
||||
_ = result.Append(" and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '").Append(dateTime).AppendLine("' ");
|
||||
_ = result.AppendLine(" for json path ");
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
private static StringBuilder GetForJsonPath(IDbConnectionFactory dbConnectionFactory, string commandText)
|
||||
{
|
||||
StringBuilder stringBuilder = new();
|
||||
using DbConnection dbConnection = dbConnectionFactory.GetDbConnection();
|
||||
DbCommand dbCommand = dbConnection.CreateCommand();
|
||||
dbCommand.CommandText = commandText;
|
||||
DbDataReader dbDataReader = dbCommand.ExecuteReader(CommandBehavior.SequentialAccess);
|
||||
while (dbDataReader.Read())
|
||||
_ = stringBuilder.Append(dbDataReader.GetString(0));
|
||||
return stringBuilder;
|
||||
}
|
||||
|
||||
private static InfinityQSBase GetInfinityQSBase(IDbConnectionFactory dbConnectionFactory, IInfinityQSRepository infinityQSRepository, string subGroupId)
|
||||
{
|
||||
InfinityQSBase result;
|
||||
string commandText = infinityQSRepository.GetCommandText(subGroupId, process: string.Empty, job: string.Empty, part: string.Empty, lot: string.Empty, dateTime: string.Empty);
|
||||
StringBuilder stringBuilder = GetForJsonPath(dbConnectionFactory, commandText);
|
||||
InfinityQSBase[]? results = JsonSerializer.Deserialize<InfinityQSBase[]>(stringBuilder.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
if (results is null)
|
||||
throw new NullReferenceException(nameof(results));
|
||||
if (results.Select(l => l.SE_SGRP).Distinct().Count() != 1)
|
||||
throw new NotSupportedException("Multiple ids are present!");
|
||||
result = (from l in results orderby l.SE_TSNO, l.TD_TEST select l).First();
|
||||
return result;
|
||||
}
|
||||
|
||||
Result<InfinityQSBase[]> IInfinityQSRepository.GetData(string subGroupId)
|
||||
{
|
||||
Result<InfinityQSBase[]>? result;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSRepository.GetData)}.json"));
|
||||
result = JsonSerializer.Deserialize<Result<InfinityQSBase[]>>(json);
|
||||
if (result is null)
|
||||
throw new NullReferenceException(nameof(result));
|
||||
}
|
||||
else
|
||||
{
|
||||
IInfinityQSRepository infinityQSRepository = this;
|
||||
InfinityQSBase infinityQSBase = GetInfinityQSBase(_DBConnectionFactory, infinityQSRepository, subGroupId);
|
||||
string commandText = infinityQSRepository.GetCommandText(subGroupId, process: infinityQSBase.PR_NAME, job: infinityQSBase.JD_NAME, part: infinityQSBase.PD_NAME, lot: infinityQSBase.PL_NAME, dateTime: string.Concat(infinityQSBase.SE_SGTM));
|
||||
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
|
||||
InfinityQSBase[]? results = JsonSerializer.Deserialize<InfinityQSBase[]>(stringBuilder.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
if (results is null)
|
||||
throw new NullReferenceException(nameof(results));
|
||||
result = new()
|
||||
{
|
||||
Results = results,
|
||||
TotalRows = results.Length,
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Result<InfinityQSDescriptor[]> IInfinityQSRepository.GetDescriptors(string subGroupId)
|
||||
{
|
||||
Result<InfinityQSDescriptor[]>? result;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSRepository.GetDescriptors)}.json"));
|
||||
result = JsonSerializer.Deserialize<Result<InfinityQSDescriptor[]>>(json);
|
||||
if (result is null)
|
||||
throw new NullReferenceException(nameof(result));
|
||||
}
|
||||
else
|
||||
{
|
||||
IInfinityQSRepository infinityQSRepository = this;
|
||||
string commandText = infinityQSRepository.GetCommandText(subGroupId);
|
||||
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
|
||||
InfinityQSDescriptor[]? results = JsonSerializer.Deserialize<InfinityQSDescriptor[]>(stringBuilder.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
if (results is null)
|
||||
throw new NullReferenceException(nameof(results));
|
||||
result = new()
|
||||
{
|
||||
Results = results,
|
||||
TotalRows = results.Length,
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Result<InfinityQSEvent[]> IInfinityQSRepository.GetEvents(string subGroupId)
|
||||
{
|
||||
Result<InfinityQSEvent[]>? result;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSRepository.GetEvents)}.json"));
|
||||
result = JsonSerializer.Deserialize<Result<InfinityQSEvent[]>>(json);
|
||||
if (result is null)
|
||||
throw new NullReferenceException(nameof(result));
|
||||
}
|
||||
else
|
||||
{
|
||||
InfinityQSEvent[]? results;
|
||||
IInfinityQSRepository infinityQSRepository = this;
|
||||
InfinityQSBase infinityQSBase = GetInfinityQSBase(_DBConnectionFactory, infinityQSRepository, subGroupId);
|
||||
if (!infinityQSBase.EV_COUNT.HasValue || infinityQSBase.EV_COUNT.Value <= 0)
|
||||
results = Array.Empty<InfinityQSEvent>();
|
||||
else
|
||||
{
|
||||
string commandText = $"select * from [spcepiworld].[dbo].[evnt_inf] ev where ev.f_prcs = '{infinityQSBase.PR_NAME}' and ev.f_part = '{infinityQSBase.PD_NAME}' and ev.f_sgtm = {infinityQSBase.SE_SGTM} ";
|
||||
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
|
||||
results = JsonSerializer.Deserialize<InfinityQSEvent[]>(stringBuilder.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
if (results is null)
|
||||
throw new NullReferenceException(nameof(results));
|
||||
}
|
||||
result = new()
|
||||
{
|
||||
Results = results,
|
||||
TotalRows = results.Length,
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Result<InfinityQSBase[]> IInfinityQSRepository.GetHeader(string subGroupId)
|
||||
{
|
||||
Result<InfinityQSBase[]>? result;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSRepository.GetHeader)}.json"));
|
||||
result = JsonSerializer.Deserialize<Result<InfinityQSBase[]>>(json);
|
||||
if (result is null)
|
||||
throw new NullReferenceException(nameof(result));
|
||||
}
|
||||
else
|
||||
{
|
||||
IInfinityQSRepository infinityQSRepository = this;
|
||||
InfinityQSBase infinityQSBase = GetInfinityQSBase(_DBConnectionFactory, infinityQSRepository, subGroupId);
|
||||
InfinityQSBase[] results = new InfinityQSBase[] { infinityQSBase };
|
||||
result = new()
|
||||
{
|
||||
Results = results,
|
||||
TotalRows = results.Length,
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
242
Server/Repositories/InfinityQSV2Repository.cs
Normal file
242
Server/Repositories/InfinityQSV2Repository.cs
Normal file
@ -0,0 +1,242 @@
|
||||
using OI.Metrology.Shared.DataModels;
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
using OI.Metrology.Shared.Repositories;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace OI.Metrology.Server.Repository;
|
||||
|
||||
public class InfinityQSV2Repository : IInfinityQSV2Repository
|
||||
{
|
||||
|
||||
private readonly string _MockRoot;
|
||||
private readonly string _RepositoryName;
|
||||
private readonly IDbConnectionFactory _DBConnectionFactory;
|
||||
|
||||
public InfinityQSV2Repository(string mockRoot, IDbConnectionFactory dbConnectionFactory)
|
||||
{
|
||||
_MockRoot = mockRoot;
|
||||
_DBConnectionFactory = dbConnectionFactory;
|
||||
_RepositoryName = nameof(InfinityQSV2Repository)[..^10];
|
||||
}
|
||||
|
||||
string IInfinityQSV2Repository.GetCommandText(string subGroupId)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
if (string.IsNullOrEmpty(subGroupId))
|
||||
throw new ArgumentException(nameof(subGroupId));
|
||||
_ = result
|
||||
.AppendLine(" select ")
|
||||
.AppendLine(" sd.f_sgrp sd_sgrp, ")
|
||||
.AppendLine(" sd.f_tsno sd_tsno, ")
|
||||
.AppendLine(" dd.f_dsgp dd_dsgp, ")
|
||||
.AppendLine(" dg.f_name gd_name, ")
|
||||
.AppendLine(" dd.f_name dd_name ")
|
||||
.AppendLine(" from [SPCEPIWORLD].[dbo].[SGRP_DSC] sd ")
|
||||
.AppendLine(" join [SPCEPIWORLD].[dbo].[DESC_DAT] dd ")
|
||||
.AppendLine(" on sd.f_dsgp = dd.f_dsgp ")
|
||||
.AppendLine(" and sd.f_desc = dd.f_desc ")
|
||||
.AppendLine(" join [SPCEPIWORLD].[dbo].[DESC_GRP] dg ")
|
||||
.AppendLine(" on dd.f_dsgp = dg.f_dsgp ");
|
||||
_ = result.Append(" where sd.f_sgrp = ").Append(subGroupId).AppendLine(" ");
|
||||
_ = result.AppendLine(" for json path ");
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
string IInfinityQSV2Repository.GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
const string dateTimeFormat = "yyyy-MM-dd HH:mm:ss";
|
||||
if (!string.IsNullOrEmpty(dateTime) && (dateTime.Contains('-') || dateTime.Contains(' ') || dateTime.Contains(':')) && dateTime.Length != dateTimeFormat.Length)
|
||||
throw new ArgumentException(nameof(dateTime));
|
||||
_ = result
|
||||
.AppendLine(" select ")
|
||||
.AppendLine(" se.f_sgrp se_sgrp, ")
|
||||
.AppendLine(" se.f_sgtm se_sgtm, ")
|
||||
.AppendLine(" se.f_tsno se_tsno, ")
|
||||
.AppendLine(" se.f_val se_val, ")
|
||||
.AppendLine(" pr.f_name pr_name, ")
|
||||
.AppendLine(" jd.f_name jd_name, ")
|
||||
.AppendLine(" pl.f_name pl_name, ")
|
||||
.AppendLine(" pd.f_name pd_name, ")
|
||||
.AppendLine(" td.f_test td_test, ")
|
||||
.AppendLine(" td.f_name td_name, ")
|
||||
.AppendLine(" (select count(ev.f_evnt) ")
|
||||
.AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ")
|
||||
.AppendLine(" where ev.f_prcs = pr.f_prcs ")
|
||||
.AppendLine(" and ev.f_part = pd.f_part ")
|
||||
.AppendLine(" and ev.f_sgtm = se.f_sgtm) ev_count ")
|
||||
.AppendLine(" from [spcepiworld].[dbo].[sgrp_ext] se ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] pr ")
|
||||
.AppendLine(" on se.f_prcs = pr.f_prcs ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[job_dat] jd ")
|
||||
.AppendLine(" on se.f_job = jd.f_job ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[part_lot] pl ")
|
||||
.AppendLine(" on se.f_lot = pl.f_lot ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ")
|
||||
.AppendLine(" on se.f_part = pd.f_part ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ")
|
||||
.AppendLine(" on se.f_test = td.f_test ")
|
||||
.AppendLine(" where se.f_flag = 0 ");
|
||||
if (!string.IsNullOrEmpty(subGroupId))
|
||||
_ = result.Append(" and se.f_sgrp = ").Append(subGroupId.Split(" ")[0]).AppendLine(" ");
|
||||
if (!string.IsNullOrEmpty(process))
|
||||
_ = result.Append(" and pr.f_name = '").Append(process).AppendLine("' ");
|
||||
if (!string.IsNullOrEmpty(part))
|
||||
_ = result.Append(" and pd.f_name = '").Append(part).AppendLine("' ");
|
||||
if (!string.IsNullOrEmpty(job))
|
||||
_ = result.Append(" and jd.f_name = '").Append(job).AppendLine("' ");
|
||||
if (!string.IsNullOrEmpty(lot))
|
||||
_ = result.Append(" and pl.f_name = '").Append(lot).AppendLine("' ");
|
||||
if (!string.IsNullOrEmpty(dateTime) && (dateTime.Contains('-') || dateTime.Contains(' ') || dateTime.Contains(':')))
|
||||
_ = result.Append(" and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '").Append(dateTime).AppendLine("' ");
|
||||
_ = result.AppendLine(" for json path ");
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
private static StringBuilder GetForJsonPath(IDbConnectionFactory dbConnectionFactory, string commandText)
|
||||
{
|
||||
StringBuilder stringBuilder = new();
|
||||
using DbConnection dbConnection = dbConnectionFactory.GetDbConnection();
|
||||
DbCommand dbCommand = dbConnection.CreateCommand();
|
||||
dbCommand.CommandText = commandText;
|
||||
DbDataReader dbDataReader = dbCommand.ExecuteReader(CommandBehavior.SequentialAccess);
|
||||
while (dbDataReader.Read())
|
||||
_ = stringBuilder.Append(dbDataReader.GetString(0));
|
||||
return stringBuilder;
|
||||
}
|
||||
|
||||
private static InfinityQSBaseV2 GetInfinityQSBase(IDbConnectionFactory dbConnectionFactory, IInfinityQSV2Repository infinityQSV2Repository, string subGroupId)
|
||||
{
|
||||
InfinityQSBaseV2 result;
|
||||
string commandText = infinityQSV2Repository.GetCommandText(subGroupId, process: string.Empty, job: string.Empty, part: string.Empty, lot: string.Empty, dateTime: string.Empty);
|
||||
StringBuilder stringBuilder = GetForJsonPath(dbConnectionFactory, commandText);
|
||||
InfinityQSBase[]? collection = JsonSerializer.Deserialize<InfinityQSBase[]>(stringBuilder.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
if (collection is null)
|
||||
throw new NullReferenceException(nameof(collection));
|
||||
InfinityQSBaseV2[] results = InfinityQSBase.Convert(collection);
|
||||
if (results.Select(l => l.SubGroupId).Distinct().Count() != 1)
|
||||
throw new NotSupportedException("Multiple ids are present!");
|
||||
result = (from l in results orderby l.SiteNumber, l.VariableNumber select l).First();
|
||||
return result;
|
||||
}
|
||||
|
||||
Result<InfinityQSBaseV2[]> IInfinityQSV2Repository.GetData(string subGroupId)
|
||||
{
|
||||
Result<InfinityQSBaseV2[]>? result;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV2Repository.GetData)}.json"));
|
||||
result = JsonSerializer.Deserialize<Result<InfinityQSBaseV2[]>>(json);
|
||||
if (result is null)
|
||||
throw new NullReferenceException(nameof(result));
|
||||
}
|
||||
else
|
||||
{
|
||||
IInfinityQSV2Repository infinityQSV2Repository = this;
|
||||
InfinityQSBaseV2 infinityQSBase = GetInfinityQSBase(_DBConnectionFactory, infinityQSV2Repository, subGroupId);
|
||||
string commandText = infinityQSV2Repository.GetCommandText(subGroupId, process: infinityQSBase.Process, job: infinityQSBase.Job, part: infinityQSBase.Part, lot: infinityQSBase.Lot, dateTime: string.Concat(infinityQSBase.SubGroupDateTime));
|
||||
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
|
||||
InfinityQSBase[]? collection = JsonSerializer.Deserialize<InfinityQSBase[]>(stringBuilder.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
if (collection is null)
|
||||
throw new NullReferenceException(nameof(collection));
|
||||
InfinityQSBaseV2[] results = InfinityQSBase.Convert(collection);
|
||||
result = new()
|
||||
{
|
||||
Results = results,
|
||||
TotalRows = results.Length,
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Result<InfinityQSDescriptorV2[]> IInfinityQSV2Repository.GetDescriptors(string subGroupId)
|
||||
{
|
||||
Result<InfinityQSDescriptorV2[]>? result;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV2Repository.GetDescriptors)}.json"));
|
||||
result = JsonSerializer.Deserialize<Result<InfinityQSDescriptorV2[]>>(json);
|
||||
if (result is null)
|
||||
throw new NullReferenceException(nameof(result));
|
||||
}
|
||||
else
|
||||
{
|
||||
IInfinityQSV2Repository infinityQSV2Repository = this;
|
||||
string commandText = infinityQSV2Repository.GetCommandText(subGroupId);
|
||||
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
|
||||
InfinityQSDescriptor[]? collection = JsonSerializer.Deserialize<InfinityQSDescriptor[]>(stringBuilder.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
if (collection is null)
|
||||
throw new NullReferenceException(nameof(collection));
|
||||
InfinityQSDescriptorV2[] results = InfinityQSDescriptor.Convert(collection);
|
||||
result = new()
|
||||
{
|
||||
Results = results,
|
||||
TotalRows = results.Length,
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Result<InfinityQSEventV2[]> IInfinityQSV2Repository.GetEvents(string subGroupId)
|
||||
{
|
||||
Result<InfinityQSEventV2[]>? result;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV2Repository.GetEvents)}.json"));
|
||||
result = JsonSerializer.Deserialize<Result<InfinityQSEventV2[]>>(json);
|
||||
if (result is null)
|
||||
throw new NullReferenceException(nameof(result));
|
||||
}
|
||||
else
|
||||
{
|
||||
InfinityQSEvent[]? collection;
|
||||
IInfinityQSV2Repository infinityQSV2Repository = this;
|
||||
InfinityQSBaseV2 infinityQSBase = GetInfinityQSBase(_DBConnectionFactory, infinityQSV2Repository, subGroupId);
|
||||
if (!infinityQSBase.EventCount.HasValue || infinityQSBase.EventCount.Value <= 0)
|
||||
collection = Array.Empty<InfinityQSEvent>();
|
||||
else
|
||||
{
|
||||
string commandText = $"select * from [spcepiworld].[dbo].[evnt_inf] ev where ev.f_prcs = '{infinityQSBase.Process}' and ev.f_part = '{infinityQSBase.Part}' and ev.f_sgtm = {infinityQSBase.SubGroupDateTime} ";
|
||||
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
|
||||
collection = JsonSerializer.Deserialize<InfinityQSEvent[]>(stringBuilder.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
if (collection is null)
|
||||
throw new NullReferenceException(nameof(collection));
|
||||
}
|
||||
InfinityQSEventV2[] results = InfinityQSEvent.Convert(collection);
|
||||
result = new()
|
||||
{
|
||||
Results = results,
|
||||
TotalRows = results.Length,
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Result<InfinityQSBaseV2[]> IInfinityQSV2Repository.GetHeader(string subGroupId)
|
||||
{
|
||||
Result<InfinityQSBaseV2[]>? result;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV2Repository.GetHeader)}.json"));
|
||||
result = JsonSerializer.Deserialize<Result<InfinityQSBaseV2[]>>(json);
|
||||
if (result is null)
|
||||
throw new NullReferenceException(nameof(result));
|
||||
}
|
||||
else
|
||||
{
|
||||
IInfinityQSV2Repository infinityQSV2Repository = this;
|
||||
InfinityQSBaseV2 infinityQSBase = GetInfinityQSBase(_DBConnectionFactory, infinityQSV2Repository, subGroupId);
|
||||
InfinityQSBaseV2[] results = new InfinityQSBaseV2[] { infinityQSBase };
|
||||
result = new()
|
||||
{
|
||||
Results = results,
|
||||
TotalRows = results.Length,
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
@ -17,6 +17,7 @@ namespace OI.Metrology.Server.Repositories;
|
||||
public class MetrologyRepository : IMetrologyRepository
|
||||
{
|
||||
private readonly string _MockRoot;
|
||||
private readonly string _RepositoryName;
|
||||
private readonly IMemoryCache _MemoryCache;
|
||||
private readonly IDbConnectionFactory _DBConnectionFactory;
|
||||
|
||||
@ -25,6 +26,7 @@ public class MetrologyRepository : IMetrologyRepository
|
||||
_MemoryCache = memoryCache;
|
||||
_MockRoot = appSettings.MockRoot;
|
||||
_DBConnectionFactory = dbConnectionFactory;
|
||||
_RepositoryName = nameof(MetrologyRepository)[..^10];
|
||||
}
|
||||
|
||||
protected DbProviderFactory GetDbProviderFactory(IDbConnection conn) =>
|
||||
@ -732,7 +734,7 @@ public class MetrologyRepository : IMetrologyRepository
|
||||
IEnumerable<AwaitingDisposition>? r;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), "GetAwaitingDispositionApi.json"));
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IMetrologyRepository.GetAwaitingDisposition)}.json"));
|
||||
r = System.Text.Json.JsonSerializer.Deserialize<IEnumerable<AwaitingDisposition>>(json);
|
||||
if (r is null)
|
||||
throw new NullReferenceException(nameof(r));
|
||||
|
@ -9,12 +9,14 @@ public class PinRepository : IPinRepository
|
||||
|
||||
private readonly string _MockRoot;
|
||||
private readonly Serilog.ILogger _Log;
|
||||
private readonly string _RepositoryName;
|
||||
private readonly Dictionary<string, Dictionary<long, HeaderCommon>> _RdsToHeaderCommonCollection;
|
||||
|
||||
public PinRepository(string mockRoot)
|
||||
{
|
||||
_MockRoot = mockRoot;
|
||||
_RdsToHeaderCommonCollection = new();
|
||||
_RepositoryName = nameof(PinRepository)[..^10];
|
||||
_Log = Serilog.Log.ForContext<PinRepository>();
|
||||
}
|
||||
|
||||
@ -79,7 +81,7 @@ public class PinRepository : IPinRepository
|
||||
Result<Pinned[]>? r;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), "GetPinnedTableApi.json"));
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IPinRepository.GetPinnedTable)}.json"));
|
||||
r = JsonSerializer.Deserialize<Result<Pinned[]>>(json);
|
||||
if (r is null)
|
||||
throw new NullReferenceException(nameof(r));
|
||||
|
@ -12,11 +12,13 @@ public class ToolTypesRepository : IToolTypesRepository
|
||||
|
||||
private readonly string _MockRoot;
|
||||
private readonly Serilog.ILogger _Log;
|
||||
private readonly string _RepositoryName;
|
||||
|
||||
public ToolTypesRepository(string mockRoot)
|
||||
{
|
||||
_MockRoot = mockRoot;
|
||||
_Log = Serilog.Log.ForContext<ToolTypesRepository>();
|
||||
_RepositoryName = nameof(ToolTypesRepository)[..^10];
|
||||
}
|
||||
|
||||
// Get a list of tooltypes, returns just Name and ID
|
||||
@ -25,7 +27,7 @@ public class ToolTypesRepository : IToolTypesRepository
|
||||
Result<ToolTypeNameId[]>? r;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), "IndexApi.json"));
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IToolTypesRepository.Index)}.json"));
|
||||
r = JsonSerializer.Deserialize<Result<ToolTypeNameId[]>>(json);
|
||||
if (r is null)
|
||||
throw new NullReferenceException(nameof(r));
|
||||
@ -49,7 +51,7 @@ public class ToolTypesRepository : IToolTypesRepository
|
||||
Result<ToolTypeMetadataResult>? r;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), "GetToolTypeMetadataApi.json"));
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IToolTypesRepository.GetToolTypeMetadata)}.json"));
|
||||
r = JsonSerializer.Deserialize<Result<ToolTypeMetadataResult>>(json);
|
||||
if (r is null)
|
||||
throw new NullReferenceException(nameof(r));
|
||||
@ -82,7 +84,7 @@ public class ToolTypesRepository : IToolTypesRepository
|
||||
Result<DataTable>? r;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), "GetHeadersApi.json"));
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IToolTypesRepository.GetHeaders)}.json"));
|
||||
r = Newtonsoft.Json.JsonConvert.DeserializeObject<Result<DataTable>>(json);
|
||||
if (r is null)
|
||||
throw new NullReferenceException(nameof(r));
|
||||
@ -106,7 +108,7 @@ public class ToolTypesRepository : IToolTypesRepository
|
||||
Result<HeaderCommon[]>? r;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), "GetHeaderTitlesApi.json"));
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IToolTypesRepository.GetHeaderTitles)}.json"));
|
||||
r = JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json);
|
||||
if (r is null)
|
||||
throw new NullReferenceException(nameof(r));
|
||||
@ -131,7 +133,7 @@ public class ToolTypesRepository : IToolTypesRepository
|
||||
Result<ColumnValue[]>? r;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), "GetHeaderFieldsApi.json"));
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IToolTypesRepository.GetHeaderFields)}.json"));
|
||||
r = JsonSerializer.Deserialize<Result<ColumnValue[]>>(json);
|
||||
if (r is null)
|
||||
throw new NullReferenceException(nameof(r));
|
||||
@ -154,7 +156,7 @@ public class ToolTypesRepository : IToolTypesRepository
|
||||
Result<DataTable>? r;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), "GetDataApi.json"));
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IToolTypesRepository.GetData)}.json"));
|
||||
r = Newtonsoft.Json.JsonConvert.DeserializeObject<Result<DataTable>>(json);
|
||||
if (r is null)
|
||||
throw new NullReferenceException(nameof(r));
|
||||
@ -250,7 +252,7 @@ public class ToolTypesRepository : IToolTypesRepository
|
||||
Result<DataTable>? r;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), "GetExportDataApi.json"));
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IToolTypesRepository.GetExportData)}.json"));
|
||||
r = Newtonsoft.Json.JsonConvert.DeserializeObject<Result<DataTable>>(json);
|
||||
if (r is null)
|
||||
throw new NullReferenceException(nameof(r));
|
||||
|
@ -1,13 +1,14 @@
|
||||
{
|
||||
"xApiUrl": "http://messa010ec.ec.local:50301/api",
|
||||
"xApiUrl": "~/api",
|
||||
"ApiUrl": "http://localhost:5126/api",
|
||||
"xxxApiUrl": "http://localhost:50301/api",
|
||||
"xxxxApiUrl": "http://messa010ec.ec.local:50301/api",
|
||||
"ConnectionString": "Data Source=MESSAD1001\\TEST1,59583;Integrated Security=True;Initial Catalog=Metrology;",
|
||||
"xxxApiUrl": "http://messa010ec.ec.local:50301/api",
|
||||
"xxxxApiUrl": "http://localhost:50301/api",
|
||||
"xxxxxApiUrl": "http://messa010ec.ec.local:50301/api",
|
||||
"xConnectionString": "Data Source=messv01ec.ec.local\\PROD1,53959;Integrated Security=True;Initial Catalog=Metrology;",
|
||||
"ConnectionString": "Data Source=MESSAD1001\\TEST1,59583;Integrated Security=True;Initial Catalog=Metrology;",
|
||||
"IsDevelopment": true,
|
||||
"xMockRoot": "/Data/Tests",
|
||||
"MockRoot": "",
|
||||
"xMockRoot": "",
|
||||
"MockRoot": "/Data/Tests",
|
||||
"MonAResource": "OI_Metrology_Viewer_IFX",
|
||||
"Oi2SqlConnectionString": "Data Source=MESSAD1001\\TEST1,59583;Initial Catalog=LSL2SQL;Persist Security Info=True;User ID=srpadmin;Password=0okm9ijn;",
|
||||
"Serilog": {
|
||||
|
@ -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);
|
||||
|
||||
}
|
@ -37,6 +37,7 @@ public class UnitAwaitingDispoController
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public void Index()
|
||||
{
|
||||
@ -48,18 +49,19 @@ public class UnitAwaitingDispoController
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public async Task IndexApi()
|
||||
{
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(IMetrologyRepository.GetAwaitingDisposition)}Api.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(IMetrologyRepository.GetAwaitingDisposition)}Api.json"), json);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public void MarkAsReviewed()
|
||||
{
|
||||
_Logger.Information("Starting Web Application");
|
||||
@ -69,8 +71,8 @@ public class UnitAwaitingDispoController
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public async Task MarkAsReviewedApi()
|
||||
{
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
@ -79,8 +81,8 @@ public class UnitAwaitingDispoController
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public void MarkAsAwaiting()
|
||||
{
|
||||
_Logger.Information("Starting Web Application");
|
||||
@ -91,8 +93,8 @@ public class UnitAwaitingDispoController
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public async Task MarkAsAwaitingApi()
|
||||
{
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
|
@ -34,8 +34,8 @@ public class UnitInboundController
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public async Task DataApi()
|
||||
{
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
@ -44,8 +44,8 @@ public class UnitInboundController
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public async Task AttachFileApi()
|
||||
{
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
|
@ -1,5 +1,6 @@
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using OI.Metrology.Server.Models;
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
using Serilog;
|
||||
using System.Net;
|
||||
@ -36,12 +37,22 @@ public class UnitTestAppSettingsController
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void TestConnectionString()
|
||||
{
|
||||
_Logger.Information("Starting Web Application");
|
||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
||||
IAppSettingsRepository<Server.Models.Binder.AppSettings> appSettingsRepository = serviceProvider.GetRequiredService<IAppSettingsRepository<Server.Models.Binder.AppSettings>>();
|
||||
appSettingsRepository.VerifyConnectionStrings();
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void AppSettings()
|
||||
{
|
||||
_Logger.Information("Starting Web Application");
|
||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
||||
Server.Models.AppSettings appSettings = serviceProvider.GetRequiredService<Server.Models.AppSettings>();
|
||||
AppSettings appSettings = serviceProvider.GetRequiredService<AppSettings>();
|
||||
Assert.IsNotNull(appSettings);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
@ -67,7 +78,7 @@ public class UnitTestAppSettingsController
|
||||
Assert.AreEqual(HttpStatusCode.OK, httpResponseMessage.StatusCode);
|
||||
Assert.AreEqual("application/json; charset=utf-8", httpResponseMessage.Content.Headers.ContentType?.ToString());
|
||||
string json = await httpResponseMessage.Content.ReadAsStringAsync();
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetAppSettingsApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetAppSettings)}.json"), json);
|
||||
Assert.IsNotNull(json);
|
||||
Assert.IsTrue(json != "[]");
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
@ -94,7 +105,7 @@ public class UnitTestAppSettingsController
|
||||
Assert.AreEqual(HttpStatusCode.OK, httpResponseMessage.StatusCode);
|
||||
Assert.AreEqual("text/plain; charset=utf-8", httpResponseMessage.Content.Headers.ContentType?.ToString());
|
||||
string json = await httpResponseMessage.Content.ReadAsStringAsync();
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetBuildNumberAndGitCommitSevenApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetBuildNumberAndGitCommitSeven)}.json"), json);
|
||||
Assert.IsNotNull(json);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class UnitTestClientSettingsController
|
||||
Assert.AreEqual(HttpStatusCode.OK, httpResponseMessage.StatusCode);
|
||||
Assert.AreEqual("application/json; charset=utf-8", httpResponseMessage.Content.Headers.ContentType?.ToString());
|
||||
string json = await httpResponseMessage.Content.ReadAsStringAsync();
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetClientSettingsApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetClientSettings)}.json"), json);
|
||||
Assert.IsNotNull(json);
|
||||
Assert.IsTrue(json != "[]");
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
@ -84,7 +84,7 @@ public class UnitTestClientSettingsController
|
||||
Assert.AreEqual(HttpStatusCode.OK, httpResponseMessage.StatusCode);
|
||||
Assert.AreEqual("text/plain; charset=utf-8", httpResponseMessage.Content.Headers.ContentType?.ToString());
|
||||
string json = await httpResponseMessage.Content.ReadAsStringAsync();
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetIpAddressApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetIpAddress)}.json"), json);
|
||||
Assert.IsNotNull(json);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class UnitTestInfinityQSController
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/commandText/?sub_group_id=1677273357&process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 15:15:00");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetCommandTextApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCommandText)}.sql"), json);
|
||||
Assert.IsNotNull(json);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
@ -67,7 +67,11 @@ public class UnitTestInfinityQSController
|
||||
Result<InfinityQSBase[]> result = infinityQSRepository.GetData("1677273357");
|
||||
Assert.IsNotNull(result?.Results);
|
||||
Assert.IsTrue(result?.Results.Any());
|
||||
Assert.IsNotNull(result?.Results[0].SubGroupDateTime);
|
||||
Assert.IsNotNull(result?.Results[0].PR_NAME);
|
||||
Assert.IsNotNull(result?.Results[0].SE_SGTM);
|
||||
Assert.IsNotNull(result?.Results[0].SE_TSNO);
|
||||
Assert.IsNotNull(result?.Results[0].TD_NAME);
|
||||
Assert.IsNotNull(result?.Results[0].TD_TEST);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
@ -78,12 +82,39 @@ public class UnitTestInfinityQSController
|
||||
_Logger.Information("Starting Web Application");
|
||||
//string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1677273357 575908_2023-02-24 14-18-05.txt/data");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1677273357/data");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetDataApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetData)}.json"), json);
|
||||
Result<InfinityQSBase[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBase[]>>(json);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GetDescriptors()
|
||||
{
|
||||
_Logger.Information("Starting Web Application");
|
||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
||||
IInfinityQSRepository infinityQSRepository = serviceProvider.GetRequiredService<IInfinityQSRepository>();
|
||||
Result<InfinityQSDescriptor[]> result = infinityQSRepository.GetDescriptors("1677273357");
|
||||
Assert.IsNotNull(result?.Results);
|
||||
Assert.IsTrue(result?.Results.Any());
|
||||
Assert.IsNotNull(result?.Results[0].SD_SGRP);
|
||||
Assert.IsNotNull(result?.Results[0].SD_TSNO);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetDescriptorsApi()
|
||||
{
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
//string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1677273357 575908_2023-02-24 14-18-05.txt/descriptors");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1677273357/descriptors");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetDescriptors)}.json"), json);
|
||||
Result<InfinityQSDescriptor[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSDescriptor[]>>(json);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GetEvents()
|
||||
{
|
||||
@ -101,7 +132,7 @@ public class UnitTestInfinityQSController
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1677273357/events");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetEventsApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEvents)}.json"), json);
|
||||
Result<InfinityQSEvent[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSEvent[]>>(json);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
@ -124,7 +155,7 @@ public class UnitTestInfinityQSController
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1677273357/header");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetHeaderApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetHeader)}.json"), json);
|
||||
Result<InfinityQSBase[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBase[]>>(json);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
|
164
Tests/UnitTestInfinityQSV2Controller.cs
Normal file
164
Tests/UnitTestInfinityQSV2Controller.cs
Normal file
@ -0,0 +1,164 @@
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using OI.Metrology.Shared.DataModels;
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
using Serilog;
|
||||
|
||||
namespace OI.Metrology.Tests;
|
||||
|
||||
[TestClass]
|
||||
public class UnitTestInfinityQSV2Controller
|
||||
{
|
||||
|
||||
#pragma warning disable CS8618
|
||||
|
||||
private static ILogger _Logger;
|
||||
private static string _ControllerName;
|
||||
private static TestContext _TestContext;
|
||||
private static WebApplicationFactory<Server.Program> _WebApplicationFactory;
|
||||
|
||||
#pragma warning restore
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitAsync(TestContext testContext)
|
||||
{
|
||||
_TestContext = testContext;
|
||||
_Logger = Log.ForContext<UnitTestInfinityQSV2Controller>();
|
||||
_WebApplicationFactory = new WebApplicationFactory<Server.Program>();
|
||||
_ControllerName = nameof(Server.ApiControllers.InfinityQSV2Controller)[..^10];
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void TestControllerName()
|
||||
{
|
||||
_Logger.Information("Starting Web Application");
|
||||
Assert.AreEqual(IInfinityQSV2Controller<string>.GetRouteName(), _ControllerName);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GetCommandText()
|
||||
{
|
||||
_Logger.Information("Starting Web Application");
|
||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
||||
IInfinityQSV2Repository infinityQSV2Repository = serviceProvider.GetRequiredService<IInfinityQSV2Repository>();
|
||||
string result = infinityQSV2Repository.GetCommandText("1677273357", "61", "CDE5", "5012", "575908", "");
|
||||
Assert.IsNotNull(result);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetCommandTextApi()
|
||||
{
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1677273357/commandText/?process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 15:15:00");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetCommandText)}.sql"), json);
|
||||
Assert.IsNotNull(json);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GetData()
|
||||
{
|
||||
_Logger.Information("Starting Web Application");
|
||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
||||
IInfinityQSV2Repository infinityQSV2Repository = serviceProvider.GetRequiredService<IInfinityQSV2Repository>();
|
||||
Result<InfinityQSBaseV2[]> result = infinityQSV2Repository.GetData("1677273357");
|
||||
Assert.IsNotNull(result?.Results);
|
||||
Assert.IsTrue(result?.Results.Any());
|
||||
Assert.IsNotNull(result?.Results[0].Process);
|
||||
Assert.IsNotNull(result?.Results[0].Variable);
|
||||
Assert.IsNotNull(result?.Results[0].SiteNumber);
|
||||
Assert.IsNotNull(result?.Results[0].VariableNumber);
|
||||
Assert.IsNotNull(result?.Results[0].SubGroupDateTime);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetDataApi()
|
||||
{
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
//string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1677273357 575908_2023-02-24 14-18-05.txt/data");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1677273357/data");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetData)}.json"), json);
|
||||
Result<InfinityQSBaseV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBaseV2[]>>(json);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GetDescriptors()
|
||||
{
|
||||
_Logger.Information("Starting Web Application");
|
||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
||||
IInfinityQSV2Repository infinityQSV2Repository = serviceProvider.GetRequiredService<IInfinityQSV2Repository>();
|
||||
Result<InfinityQSDescriptorV2[]> result = infinityQSV2Repository.GetDescriptors("1677273357");
|
||||
Assert.IsNotNull(result?.Results);
|
||||
Assert.IsTrue(result?.Results.Any());
|
||||
Assert.IsNotNull(result?.Results[0].SubGroupId);
|
||||
Assert.IsNotNull(result?.Results[0].SiteNumber);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetDescriptorsApi()
|
||||
{
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
//string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1677273357 575908_2023-02-24 14-18-05.txt/descriptors");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1677273357/descriptors");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetDescriptors)}.json"), json);
|
||||
Result<InfinityQSDescriptorV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSDescriptorV2[]>>(json);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GetEvents()
|
||||
{
|
||||
_Logger.Information("Starting Web Application");
|
||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
||||
IInfinityQSV2Repository infinityQSV2Repository = serviceProvider.GetRequiredService<IInfinityQSV2Repository>();
|
||||
Result<InfinityQSEventV2[]> result = infinityQSV2Repository.GetEvents("1677273357");
|
||||
Assert.IsNotNull(result?.Results);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetEventsApi()
|
||||
{
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1677273357/events");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetEvents)}.json"), json);
|
||||
Result<InfinityQSEvent[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSEvent[]>>(json);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GetHeader()
|
||||
{
|
||||
_Logger.Information("Starting Web Application");
|
||||
IServiceProvider serviceProvider = _WebApplicationFactory.Services.CreateScope().ServiceProvider;
|
||||
IInfinityQSV2Repository infinityQSV2Repository = serviceProvider.GetRequiredService<IInfinityQSV2Repository>();
|
||||
Result<InfinityQSBaseV2[]> result = infinityQSV2Repository.GetHeader("1677273357");
|
||||
Assert.IsNotNull(result?.Results);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetHeaderApi()
|
||||
{
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1677273357/header");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetHeader)}.json"), json);
|
||||
Result<InfinityQSBaseV2[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<InfinityQSBaseV2[]>>(json);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
}
|
@ -54,7 +54,7 @@ public class UnitTestPinController
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/-1/pinned");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetPinnedTableApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetPinnedTable)}.json"), json);
|
||||
Result<Pinned[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<Pinned[]>>(json);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
|
@ -68,7 +68,7 @@ public class UnitTestServiceShopOrderController
|
||||
_Logger.Information("Starting Web Application");
|
||||
string actionName = nameof(IServiceShopOrderController<object>.Action.All);
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/{actionName}");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetAllServiceShopOrdersApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetAllServiceShopOrders)}.json"), json);
|
||||
ServiceShopOrder[]? serviceShopOrders = System.Text.Json.JsonSerializer.Deserialize<ServiceShopOrder[]>(json);
|
||||
Assert.IsNotNull(serviceShopOrders);
|
||||
Assert.IsTrue(serviceShopOrders.Any());
|
||||
|
@ -59,7 +59,7 @@ public class UnitTestToolTypesController
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(IndexApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(Index)}.json"), json);
|
||||
Result<ToolTypeNameId[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<ToolTypeNameId[]>>(json);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
Assert.IsTrue(result.Results.Any());
|
||||
@ -88,7 +88,7 @@ public class UnitTestToolTypesController
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetToolTypeMetadataApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetToolTypeMetadata)}.json"), json);
|
||||
Result<ToolTypeMetadataResult>? result = System.Text.Json.JsonSerializer.Deserialize<Result<ToolTypeMetadataResult>>(json);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
Assert.IsNotNull(result.Results.Metadata);
|
||||
@ -116,7 +116,7 @@ public class UnitTestToolTypesController
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1/headers");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetHeadersApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetHeaders)}.json"), json);
|
||||
Result<DataTable>? result = Newtonsoft.Json.JsonConvert.DeserializeObject<Result<DataTable>>(json);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
Assert.IsNotNull(result.Results.Rows.Count > 0);
|
||||
@ -142,7 +142,7 @@ public class UnitTestToolTypesController
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/-1/headertitles");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetHeaderTitlesApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetHeaderTitles)}.json"), json);
|
||||
Result<HeaderCommon[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<HeaderCommon[]>>(json);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
Assert.IsTrue(result.Results.Any());
|
||||
@ -168,7 +168,7 @@ public class UnitTestToolTypesController
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1/headers/1/fields");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetHeaderFieldsApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetHeaderFields)}.json"), json);
|
||||
Result<ColumnValue[]>? result = System.Text.Json.JsonSerializer.Deserialize<Result<ColumnValue[]>>(json);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
Assert.IsTrue(result.Results.Any());
|
||||
@ -194,13 +194,14 @@ public class UnitTestToolTypesController
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1/headers/1/data");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetDataApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetData)}.json"), json);
|
||||
Result<DataTable>? result = Newtonsoft.Json.JsonConvert.DeserializeObject<Result<DataTable>>(json);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
Assert.IsNotNull(result.Results.Rows.Count > 0);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public void GetExportData()
|
||||
{
|
||||
@ -214,21 +215,22 @@ public class UnitTestToolTypesController
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public async Task GetExportDataApi()
|
||||
{
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
_Logger.Information("Starting Web Application");
|
||||
string? json = await httpClient.GetStringAsync($"api/{_ControllerName}/1/export");
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{nameof(GetExportDataApi)}.json"), json);
|
||||
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"{_ControllerName}-{nameof(GetExportData)}.json"), json);
|
||||
Result<DataTable>? result = Newtonsoft.Json.JsonConvert.DeserializeObject<Result<DataTable>>(json);
|
||||
Assert.IsNotNull(result?.Results);
|
||||
Assert.IsNotNull(result.Results.Rows.Count > 0);
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public void GetAttachment()
|
||||
{
|
||||
_Logger.Information("Starting Web Application");
|
||||
@ -245,8 +247,8 @@ public class UnitTestToolTypesController
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public async Task GetAttachmentApi()
|
||||
{
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
@ -255,8 +257,8 @@ public class UnitTestToolTypesController
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public void OIExport()
|
||||
{
|
||||
_Logger.Information("Starting Web Application");
|
||||
@ -269,8 +271,8 @@ public class UnitTestToolTypesController
|
||||
_Logger.Information($"{_TestContext?.TestName} completed");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Ignore]
|
||||
[TestMethod]
|
||||
public async Task OIExportApi()
|
||||
{
|
||||
HttpClient httpClient = _WebApplicationFactory.CreateClient();
|
||||
|
@ -18,6 +18,12 @@ pool:
|
||||
name: Mesa-IIS
|
||||
demands: OI-Metrology-Server-Development
|
||||
|
||||
variables:
|
||||
# solution: '**/*.sln'
|
||||
# buildPlatform: 'Any CPU'
|
||||
buildConfiguration: 'Debug'
|
||||
ASPNETCORE_ENVIRONMENT: 'Development'
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
set coreVersion=net7.0
|
||||
@ -84,7 +90,7 @@ steps:
|
||||
- script: "dotnet test --configuration $(Configuration)"
|
||||
workingDirectory: Tests
|
||||
displayName: "Core Test"
|
||||
enabled: false
|
||||
# enabled: false
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" tool restore'
|
||||
workingDirectory: Server
|
||||
|
@ -18,6 +18,12 @@ pool:
|
||||
name: Mesa-IIS
|
||||
demands: OI-Metrology-Server
|
||||
|
||||
variables:
|
||||
# solution: '**/*.sln'
|
||||
# buildPlatform: 'Any CPU'
|
||||
buildConfiguration: 'Release'
|
||||
ASPNETCORE_ENVIRONMENT: 'Production'
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
set coreVersion=net7.0
|
||||
@ -84,7 +90,7 @@ steps:
|
||||
- script: "dotnet test --configuration $(Configuration)"
|
||||
workingDirectory: Tests
|
||||
displayName: "Core Test"
|
||||
enabled: false
|
||||
# enabled: false
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" tool restore'
|
||||
workingDirectory: Server
|
||||
|
Loading…
x
Reference in New Issue
Block a user