Tests passed using Mock
This commit is contained in:
6
Server/.vscode/tasks.json
vendored
6
Server/.vscode/tasks.json
vendored
@ -70,6 +70,12 @@
|
||||
"endsPattern": "^.*Application started.*"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "File-Folder-Helper AOT s V Repositories",
|
||||
"type": "shell",
|
||||
"command": "& L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net7.0/win-x64/publish/File-Folder-Helper.exe s V Repositories",
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
@ -56,7 +56,7 @@ public partial class InboundController : ControllerBase, IInboundController<IAct
|
||||
{
|
||||
string? json = GetJson(Request.Body);
|
||||
DataResponse dataResponse = _InboundRepository.Data(_MetrologyRepository, _InboundDataService, tooltype, json);
|
||||
if (!dataResponse.Errors.Any())
|
||||
if (dataResponse.Errors.Count == 0)
|
||||
return Ok(dataResponse);
|
||||
else
|
||||
return BadRequest(dataResponse);
|
||||
|
55
Server/ApiControllers/InfinityQSV3Controller.cs
Normal file
55
Server/ApiControllers/InfinityQSV3Controller.cs
Normal file
@ -0,0 +1,55 @@
|
||||
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 InfinityQSV3Controller : Controller, IInfinityQSV3Controller<IActionResult>
|
||||
{
|
||||
|
||||
private readonly IInfinityQSV3Repository _InfinityQSRepositoryV3;
|
||||
|
||||
public InfinityQSV3Controller(IInfinityQSV3Repository InfinityQSRepositoryV3) => _InfinityQSRepositoryV3 = InfinityQSRepositoryV3;
|
||||
|
||||
[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 = _InfinityQSRepositoryV3.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<InfinityQSV3[]> result = _InfinityQSRepositoryV3.GetData(sub_group_id);
|
||||
string json = JsonSerializer.Serialize(result, ResultInfinityQSV3SourceGenerationContext.Default.ResultInfinityQSV3Array);
|
||||
return Content(json, "application/json", System.Text.Encoding.UTF8);
|
||||
}
|
||||
|
||||
[HttpGet("{sub_group_id}/descriptors")]
|
||||
public IActionResult GetDescriptors(string sub_group_id)
|
||||
{
|
||||
Result<InfinityQSDescriptorV3[]> result = _InfinityQSRepositoryV3.GetDescriptors(sub_group_id);
|
||||
string json = JsonSerializer.Serialize(result, ResultInfinityQSDescriptorV3SourceGenerationContext.Default.ResultInfinityQSDescriptorV3Array);
|
||||
return Content(json, "application/json", System.Text.Encoding.UTF8);
|
||||
}
|
||||
|
||||
[HttpGet("{sub_group_id}/header")]
|
||||
public IActionResult GetHeader(string sub_group_id)
|
||||
{
|
||||
Result<InfinityQSV3[]> result = _InfinityQSRepositoryV3.GetHeader(sub_group_id);
|
||||
string json = JsonSerializer.Serialize(result, ResultInfinityQSV3SourceGenerationContext.Default.ResultInfinityQSV3Array);
|
||||
return Content(json, "application/json", System.Text.Encoding.UTF8);
|
||||
}
|
||||
|
||||
[HttpGet("{process}/product-data-average-sum-of-defects-process-mean-process-sigma")]
|
||||
public IActionResult GetProductDataAverageSumOfDefectsProcessMeanProcessSigma(string process, string? recipe)
|
||||
{
|
||||
string result = _InfinityQSRepositoryV3.GetProductDataAverageSumOfDefectsProcessMeanProcessSigma(process, recipe);
|
||||
return Content(result, "application/json", System.Text.Encoding.UTF8);
|
||||
}
|
||||
|
||||
}
|
24
Server/ApiControllers/OpenInsightV1Controller.cs
Normal file
24
Server/ApiControllers/OpenInsightV1Controller.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace OI.Metrology.Server.ApiControllers;
|
||||
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
|
||||
[Route("api/[controller]")]
|
||||
public class OpenInsightV1Controller : Controller, IOpenInsightV1Controller<IActionResult>
|
||||
{
|
||||
|
||||
private readonly IOpenInsightV1Repository _OpenInsightRepository;
|
||||
|
||||
public OpenInsightV1Controller(IOpenInsightV1Repository openInsightRepository) =>
|
||||
_OpenInsightRepository = openInsightRepository;
|
||||
|
||||
[HttpGet]
|
||||
[Route("{rds}/tencor-run")]
|
||||
public IActionResult GetTencorRun(string rds, string? insert_date, string? recipe)
|
||||
{
|
||||
string result = _OpenInsightRepository.GetTencorRun(rds, insert_date, recipe);
|
||||
return Content(result, "application/json", System.Text.Encoding.UTF8);
|
||||
}
|
||||
|
||||
}
|
@ -1 +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}
|
||||
{"apiExportPath":null,"apiLoggingContentTypes":null,"apiLoggingPathPrefixes":null,"apiLogPath":null,"apiUrl":null,"attachmentPath":null,"buildNumber":"1000014","company":"Infineon Technologies Americas Corp.","connectionString":null,"gitCommitSeven":"6bc0487","inboundApiAllowedIPList":null,"isDevelopment":false,"isStaging":false,"mockRoot":null,"monAResource":null,"monASite":null,"oi2SqlConnectionString":null,"tableToPath":null,"urLs":null,"workingDirectoryName":null}
|
@ -1 +1 @@
|
||||
1-1234567
|
||||
1000014-6bc0487
|
@ -1 +0,0 @@
|
||||
asdf
|
@ -1,4 +1,90 @@
|
||||
{
|
||||
"Results": [],
|
||||
"TotalRows": 0
|
||||
"Results": [
|
||||
{
|
||||
"ID": 0,
|
||||
"InsertDate": "0001-01-01T00:00:00",
|
||||
"AttachmentID": "00000000-0000-0000-0000-000000000000",
|
||||
"Title": null,
|
||||
"Date": "0001-01-01T00:00:00",
|
||||
"ToolTypeID": 0,
|
||||
"ToolTypeName": null,
|
||||
"MesEntity": "TENCOR2",
|
||||
"Employee": "PRE",
|
||||
"Layer": null,
|
||||
"PSN": "",
|
||||
"RDS": "",
|
||||
"Reactor": "",
|
||||
"Recipe": "8IN.2QUAL",
|
||||
"Zone": null
|
||||
},
|
||||
{
|
||||
"ID": 0,
|
||||
"InsertDate": "0001-01-01T00:00:00",
|
||||
"AttachmentID": "00000000-0000-0000-0000-000000000000",
|
||||
"Title": null,
|
||||
"Date": "0001-01-01T00:00:00",
|
||||
"ToolTypeID": 0,
|
||||
"ToolTypeName": null,
|
||||
"MesEntity": "TENCOR3",
|
||||
"Employee": "",
|
||||
"Layer": null,
|
||||
"PSN": "",
|
||||
"RDS": "",
|
||||
"Reactor": "",
|
||||
"Recipe": "8INCLEAN",
|
||||
"Zone": null
|
||||
},
|
||||
{
|
||||
"ID": 0,
|
||||
"InsertDate": "0001-01-01T00:00:00",
|
||||
"AttachmentID": "00000000-0000-0000-0000-000000000000",
|
||||
"Title": null,
|
||||
"Date": "0001-01-01T00:00:00",
|
||||
"ToolTypeID": 0,
|
||||
"ToolTypeName": null,
|
||||
"MesEntity": "TENCOR3",
|
||||
"Employee": "",
|
||||
"Layer": null,
|
||||
"PSN": "",
|
||||
"RDS": "",
|
||||
"Reactor": "",
|
||||
"Recipe": "8IN_THIN ROTR",
|
||||
"Zone": null
|
||||
},
|
||||
{
|
||||
"ID": 0,
|
||||
"InsertDate": "0001-01-01T00:00:00",
|
||||
"AttachmentID": "00000000-0000-0000-0000-000000000000",
|
||||
"Title": null,
|
||||
"Date": "0001-01-01T00:00:00",
|
||||
"ToolTypeID": 0,
|
||||
"ToolTypeName": null,
|
||||
"MesEntity": "TENCOR3",
|
||||
"Employee": "",
|
||||
"Layer": null,
|
||||
"PSN": "",
|
||||
"RDS": "",
|
||||
"Reactor": "",
|
||||
"Recipe": "8IN_PTYPE_ROTR",
|
||||
"Zone": null
|
||||
},
|
||||
{
|
||||
"ID": 0,
|
||||
"InsertDate": "0001-01-01T00:00:00",
|
||||
"AttachmentID": "00000000-0000-0000-0000-000000000000",
|
||||
"Title": null,
|
||||
"Date": "0001-01-01T00:00:00",
|
||||
"ToolTypeID": 0,
|
||||
"ToolTypeName": null,
|
||||
"MesEntity": "TENCOR3",
|
||||
"Employee": "",
|
||||
"Layer": null,
|
||||
"PSN": "",
|
||||
"RDS": "",
|
||||
"Reactor": "",
|
||||
"Recipe": "AS_IFX_ROTR",
|
||||
"Zone": null
|
||||
}
|
||||
],
|
||||
"TotalRows": 5
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,17 +1,19 @@
|
||||
{
|
||||
"Results": [
|
||||
{
|
||||
"EV_COUNT": 0,
|
||||
"CL_COUNT": 0,
|
||||
"SL_COUNT": 0,
|
||||
"SE_SGRP": 1677273357,
|
||||
"SE_SGTM": 1677273300,
|
||||
"SE_TSNO": 1,
|
||||
"TD_TEST": 1650647347,
|
||||
"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_VAL": 270
|
||||
}
|
||||
],
|
||||
"TotalRows": 1
|
||||
|
@ -1,22 +1,35 @@
|
||||
select iq.ev_count, iq.cl_count, iq.sl_count, iq.se_sgrp, iq.se_sgtm, iq.se_tsno, iq.td_test, iq.pr_name, iq.jd_name, iq.pl_name, iq.pd_name, iq.td_name, iq.se_val
|
||||
from (
|
||||
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,
|
||||
pr.f_name pr_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(cl.f_part)
|
||||
from [spcepiworld].[dbo].[ctrl_lim] cl
|
||||
where cl.f_part = pd.f_part
|
||||
and cl.f_test = td.f_test
|
||||
) cl_count,
|
||||
(select count(sl.f_part)
|
||||
from [spcepiworld].[dbo].[spec_lim] sl
|
||||
where sl.f_part = pd.f_part
|
||||
and sl.f_test = td.f_test
|
||||
) sl_count,
|
||||
(select count(ev.f_evnt)
|
||||
from [spcepiworld].[dbo].[evnt_inf] ev
|
||||
where ev.f_prcs = rd.f_prcs
|
||||
where ev.f_prcs = pr.f_prcs
|
||||
and ev.f_part = pd.f_part
|
||||
and ev.f_sgtm = se.f_sgtm) ev_count
|
||||
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].[prcs_dat] pr
|
||||
on se.f_prcs = pr.f_prcs
|
||||
join [spcepiworld].[dbo].[job_dat] jd
|
||||
on se.f_job = jd.f_job
|
||||
join [spcepiworld].[dbo].[part_lot] pl
|
||||
@ -27,9 +40,11 @@
|
||||
on se.f_test = td.f_test
|
||||
where se.f_flag = 0
|
||||
and se.f_sgrp = 1677273357
|
||||
and rd.f_name = '61'
|
||||
and pr.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'
|
||||
) as iq
|
||||
order by iq.ev_count desc, iq.cl_count desc, iq.sl_count desc, iq.se_sgrp, iq.se_tsno, iq.td_test
|
||||
for json path
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,17 +1,19 @@
|
||||
{
|
||||
"Results": [
|
||||
{
|
||||
"EventCount": 0,
|
||||
"ControlLimitCount": 0,
|
||||
"SpecLimitCount": 0,
|
||||
"SubGroupId": 1677273357,
|
||||
"SubGroupDateTime": 1677273300,
|
||||
"SiteNumber": 1,
|
||||
"VariableNumber": 1650647347,
|
||||
"Process": "61",
|
||||
"Job": "CDE5",
|
||||
"Lot": "575908",
|
||||
"Part": "5012",
|
||||
"VariableNumber": 1650647347,
|
||||
"Variable": "T",
|
||||
"Value": 270,
|
||||
"EventCount": 0
|
||||
"Value": 270
|
||||
}
|
||||
],
|
||||
"TotalRows": 1
|
||||
|
78
Server/Data/Tests/InfinityQSV3-GetCommandText.sql
Normal file
78
Server/Data/Tests/InfinityQSV3-GetCommandText.sql
Normal file
@ -0,0 +1,78 @@
|
||||
select case when iq.sl_loos is null then 0 else iq.sl_loos end +
|
||||
case when iq.sl_uoos is null then 0 else iq.sl_uoos end +
|
||||
iq.ev_count as iq_sum,
|
||||
iq.sl_aflag,
|
||||
iq.sl_loos,
|
||||
iq.sl_uoos,
|
||||
iq.se_sgrp,
|
||||
iq.se_sgtm,
|
||||
iq.se_tsno,
|
||||
iq.td_test,
|
||||
iq.pr_name,
|
||||
iq.jd_name,
|
||||
iq.pl_name,
|
||||
iq.pd_name,
|
||||
iq.td_name,
|
||||
iq.se_val,
|
||||
iq.sl_eflag,
|
||||
iq.sl_scal,
|
||||
iq.sl_sls,
|
||||
iq.sl_usl
|
||||
from (
|
||||
select
|
||||
se.f_sgrp se_sgrp,
|
||||
se.f_sgtm se_sgtm,
|
||||
se.f_tsno se_tsno,
|
||||
se.f_val se_val,
|
||||
pr.f_name pr_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,
|
||||
sl.f_eflag sl_eflag,
|
||||
sl.f_aflag sl_aflag,
|
||||
sl.f_scal sl_scal,
|
||||
sl.f_lsl sl_sls,
|
||||
sl.f_usl sl_usl,
|
||||
case when sl.f_aflag is null or sl.f_aflag = 0 then null else
|
||||
case when round(se.f_val, sl.F_scal, 1) < sl.f_lsl then 1 else 0 end
|
||||
end as sl_loos,
|
||||
case when sl.f_aflag is null or sl.f_aflag = 0 then null else
|
||||
case when round(se.f_val, sl.F_scal, 1) > sl.f_usl then 1 else 0 end
|
||||
end as sl_uoos,
|
||||
(select count(ev.f_evnt)
|
||||
from [spcepiworld].[dbo].[evnt_inf] ev
|
||||
where ev.f_prcs = pr.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] pr
|
||||
on se.f_prcs = pr.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
|
||||
left join [spcepiworld].[dbo].[spec_lim] sl
|
||||
on se.f_part = sl.f_part
|
||||
and se.f_test = sl.f_test
|
||||
where se.f_flag = 0
|
||||
and (sl.f_prcs is null or se.f_prcs = sl.f_prcs or sl.f_prcs = 0)
|
||||
and se.f_sgrp = 1698497987
|
||||
and pr.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'
|
||||
) as iq
|
||||
order by iq.sl_loos + iq.sl_uoos + iq.ev_count desc,
|
||||
iq.sl_aflag desc,
|
||||
iq.se_sgrp,
|
||||
iq.se_tsno,
|
||||
iq.td_test
|
||||
for json path
|
1023
Server/Data/Tests/InfinityQSV3-GetData.json
Normal file
1023
Server/Data/Tests/InfinityQSV3-GetData.json
Normal file
File diff suppressed because it is too large
Load Diff
152
Server/Data/Tests/InfinityQSV3-GetDescriptors.json
Normal file
152
Server/Data/Tests/InfinityQSV3-GetDescriptors.json
Normal file
@ -0,0 +1,152 @@
|
||||
{
|
||||
"Results": [
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 1,
|
||||
"dd_dsgp": 1657291789,
|
||||
"gd_name": "CondType",
|
||||
"dd_name": "N"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 2,
|
||||
"dd_dsgp": 1657291789,
|
||||
"gd_name": "CondType",
|
||||
"dd_name": "N"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 1,
|
||||
"dd_dsgp": 1657291790,
|
||||
"gd_name": "GLimit",
|
||||
"dd_name": "2000.00 \u00B5"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 2,
|
||||
"dd_dsgp": 1657291790,
|
||||
"gd_name": "GLimit",
|
||||
"dd_name": "2000.00 \u00B5"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 1,
|
||||
"dd_dsgp": 1657296863,
|
||||
"gd_name": "Model",
|
||||
"dd_name": "PARALLEL"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 2,
|
||||
"dd_dsgp": 1657296863,
|
||||
"gd_name": "Model",
|
||||
"dd_name": "PARALLEL"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 0,
|
||||
"dd_dsgp": 1657296864,
|
||||
"gd_name": "Pattern",
|
||||
"dd_name": "ONEPT.PAT"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 1,
|
||||
"dd_dsgp": 1657296865,
|
||||
"gd_name": "Phase",
|
||||
"dd_name": "90.000"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 2,
|
||||
"dd_dsgp": 1657296865,
|
||||
"gd_name": "Phase",
|
||||
"dd_name": "90.000"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 1,
|
||||
"dd_dsgp": 1657296866,
|
||||
"gd_name": "Plan",
|
||||
"dd_name": "5PT MES"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 2,
|
||||
"dd_dsgp": 1657296866,
|
||||
"gd_name": "Plan",
|
||||
"dd_name": "5PT MES"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 1,
|
||||
"dd_dsgp": 1657296867,
|
||||
"gd_name": "RampRate",
|
||||
"dd_name": "2500"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 2,
|
||||
"dd_dsgp": 1657296867,
|
||||
"gd_name": "RampRate",
|
||||
"dd_name": "2500"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 1,
|
||||
"dd_dsgp": 1657296868,
|
||||
"gd_name": "RhoMethod",
|
||||
"dd_name": "ASTM: F723 - 82"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 2,
|
||||
"dd_dsgp": 1657296868,
|
||||
"gd_name": "RhoMethod",
|
||||
"dd_name": "ASTM: F723 - 82"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 1,
|
||||
"dd_dsgp": 1657296869,
|
||||
"gd_name": "StartVoltage",
|
||||
"dd_name": "-5.00"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 2,
|
||||
"dd_dsgp": 1657296869,
|
||||
"gd_name": "StartVoltage",
|
||||
"dd_name": "-5.00"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 1,
|
||||
"dd_dsgp": 1657296870,
|
||||
"gd_name": "StopVoltage",
|
||||
"dd_name": "-20.00"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 2,
|
||||
"dd_dsgp": 1657296870,
|
||||
"gd_name": "StopVoltage",
|
||||
"dd_name": "-20.00"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 1,
|
||||
"dd_dsgp": 1657296871,
|
||||
"gd_name": "WaferSize",
|
||||
"dd_name": "150.00"
|
||||
},
|
||||
{
|
||||
"sd_sgrp": 1698497987,
|
||||
"sd_tsno": 2,
|
||||
"dd_dsgp": 1657296871,
|
||||
"gd_name": "WaferSize",
|
||||
"dd_name": "150.00"
|
||||
}
|
||||
],
|
||||
"TotalRows": 21
|
||||
}
|
25
Server/Data/Tests/InfinityQSV3-GetHeader.json
Normal file
25
Server/Data/Tests/InfinityQSV3-GetHeader.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"Results": [
|
||||
{
|
||||
"iq_sum": 1,
|
||||
"sl_aflag": 34,
|
||||
"sl_loos": 0,
|
||||
"sl_uoos": 1,
|
||||
"se_sgrp": 1698497987,
|
||||
"se_sgtm": 1698497973,
|
||||
"se_tsno": 1,
|
||||
"td_test": 1657240302,
|
||||
"pr_name": "HGCV2",
|
||||
"jd_name": "HGCV2",
|
||||
"pl_name": "-",
|
||||
"pd_name": "High",
|
||||
"td_name": "RhoAvgMean",
|
||||
"se_val": 12.66,
|
||||
"sl_eflag": 42,
|
||||
"sl_scal": 4,
|
||||
"sl_sls": 12.379,
|
||||
"sl_usl": 12.561
|
||||
}
|
||||
],
|
||||
"TotalRows": 1
|
||||
}
|
@ -0,0 +1 @@
|
||||
[{"ProcessMean":1.750000000000000e+001,"ProcessSigma":5.800000000000000e+000}]
|
1
Server/Data/Tests/OpenInsightV1-GetTencorRun.json
Normal file
1
Server/Data/Tests/OpenInsightV1-GetTencorRun.json
Normal file
@ -0,0 +1 @@
|
||||
[{"RDS":"615071","AttachmentId":"43CA162D-A04B-4A37-90D7-83BABAF2D3AB","Slot":"*01","SumOfDefects":"100","Sort":"FAIL","InsertDate":"2023-10-30T18:48:57.617"},{"RDS":"615071","AttachmentId":"706C7D0E-4EC1-4042-9DAA-3D141532B6E1","Slot":"*04","SumOfDefects":"12","Sort":"PASS","InsertDate":"2023-10-30T18:48:57.623"},{"RDS":"615071","AttachmentId":"4CECFAC9-745E-4235-BAD9-BE57D1FB450E","Slot":"*11","SumOfDefects":"22","Sort":"PASS","InsertDate":"2023-10-30T18:48:57.627"},{"RDS":"615071","AttachmentId":"B62DE99D-2060-4627-A006-C5FA0DC779BE","Slot":"*17","SumOfDefects":"279","Sort":"FAIL","InsertDate":"2023-10-30T18:48:57.630"}]
|
@ -1,23 +1 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
{"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}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@
|
||||
"DataTableName": "BioRadRunData",
|
||||
"ExportSPName": "Export_BioRad",
|
||||
"HeaderGridAttributes": null,
|
||||
"DataGridAttributes": null,
|
||||
"DataGridAttributes": "{ \u0022pinButton\u0022: true }",
|
||||
"DataGridSortBy": "LEN(Position), Position",
|
||||
"DataGridStatsColumn": "Thickness",
|
||||
"DataGridStatsStdDevType": " ",
|
||||
@ -224,7 +224,7 @@
|
||||
"ApiName": "SentToMetrology",
|
||||
"ColumnName": "SentToMetrology",
|
||||
"DisplayTitle": "SentToOI",
|
||||
"GridDisplayOrder": 9,
|
||||
"GridDisplayOrder": 10,
|
||||
"GridAttributes": "{ \u0022dataType:\u0022: \u0022bool\u0022, \u0022formatter\u0022: \u0022boolToYesNo\u0022 }",
|
||||
"TableDisplayOrder": 14
|
||||
},
|
||||
@ -274,7 +274,7 @@
|
||||
"ApiName": "Wafer",
|
||||
"ColumnName": "Wafer",
|
||||
"DisplayTitle": "Wafer",
|
||||
"GridDisplayOrder": 0,
|
||||
"GridDisplayOrder": 9,
|
||||
"GridAttributes": null,
|
||||
"TableDisplayOrder": 9
|
||||
},
|
||||
|
@ -23,7 +23,11 @@
|
||||
{
|
||||
"ToolTypeName": "TencorSP1",
|
||||
"ID": 6
|
||||
},
|
||||
{
|
||||
"ToolTypeName": "SRP",
|
||||
"ID": 7
|
||||
}
|
||||
],
|
||||
"TotalRows": 6
|
||||
"TotalRows": 7
|
||||
}
|
@ -1,280 +1,357 @@
|
||||
{
|
||||
"Results": [
|
||||
{
|
||||
"RunDataSheet": "586337",
|
||||
"Reactor": 54,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 1,
|
||||
"RunDataSheet": "586820",
|
||||
"Reactor": 52,
|
||||
"Pocket": "1",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 40,
|
||||
"InSlotNumber": 24,
|
||||
"OutCassetteNumber": 36,
|
||||
"OutSlotNumber": 21,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586337",
|
||||
"Reactor": 54,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 2,
|
||||
"RunDataSheet": "586820",
|
||||
"Reactor": 52,
|
||||
"Pocket": "2",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 40,
|
||||
"InSlotNumber": 25,
|
||||
"OutCassetteNumber": 36,
|
||||
"OutSlotNumber": 22,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586337",
|
||||
"Reactor": 54,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 3,
|
||||
"RunDataSheet": "586820",
|
||||
"Reactor": 52,
|
||||
"Pocket": "3",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 1,
|
||||
"OutCassetteNumber": 36,
|
||||
"OutSlotNumber": 23,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586337",
|
||||
"Reactor": 54,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 4,
|
||||
"RunDataSheet": "586820",
|
||||
"Reactor": 52,
|
||||
"Pocket": "4",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 2,
|
||||
"OutCassetteNumber": 36,
|
||||
"OutSlotNumber": 24,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586337",
|
||||
"Reactor": 54,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 5,
|
||||
"RunDataSheet": "586820",
|
||||
"Reactor": 52,
|
||||
"Pocket": "5",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 3,
|
||||
"OutCassetteNumber": 36,
|
||||
"OutSlotNumber": 25,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586337",
|
||||
"Reactor": 54,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 6,
|
||||
"RunDataSheet": "586820",
|
||||
"Reactor": 52,
|
||||
"Pocket": "6",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 4,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 1,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586337",
|
||||
"Reactor": 54,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 7,
|
||||
"RunDataSheet": "586820",
|
||||
"Reactor": 52,
|
||||
"Pocket": "7",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 5,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 2,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586337",
|
||||
"Reactor": 54,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 8,
|
||||
"RunDataSheet": "586820",
|
||||
"Reactor": 52,
|
||||
"Pocket": "8",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 6,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 3,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586345",
|
||||
"RunDataSheet": "586821",
|
||||
"Reactor": 52,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 9,
|
||||
"Pocket": "1",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 7,
|
||||
"OutCassetteNumber": -1,
|
||||
"OutSlotNumber": -1,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586345",
|
||||
"RunDataSheet": "586821",
|
||||
"Reactor": 52,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 10,
|
||||
"Pocket": "2",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 8,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 4,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586345",
|
||||
"RunDataSheet": "586821",
|
||||
"Reactor": 52,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 11,
|
||||
"Pocket": "3",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 9,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 5,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586345",
|
||||
"RunDataSheet": "586821",
|
||||
"Reactor": 52,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 12,
|
||||
"Pocket": "4",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 10,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 6,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586345",
|
||||
"RunDataSheet": "586821",
|
||||
"Reactor": 52,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 13,
|
||||
"Pocket": "5",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 11,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 7,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586345",
|
||||
"RunDataSheet": "586821",
|
||||
"Reactor": 52,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 14,
|
||||
"Pocket": "6",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 12,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 8,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586345",
|
||||
"RunDataSheet": "586821",
|
||||
"Reactor": 52,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 15,
|
||||
"Pocket": "7",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 13,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 9,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586345",
|
||||
"RunDataSheet": "586821",
|
||||
"Reactor": 52,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 16,
|
||||
"Pocket": "8",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 14,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 10,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586347",
|
||||
"Reactor": 54,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 17,
|
||||
"RunDataSheet": "586822",
|
||||
"Reactor": 52,
|
||||
"Pocket": "1",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 15,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 11,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586347",
|
||||
"Reactor": 54,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 18,
|
||||
"RunDataSheet": "586822",
|
||||
"Reactor": 52,
|
||||
"Pocket": "2",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 16,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 12,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586347",
|
||||
"Reactor": 54,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 19,
|
||||
"Pocket": "3",
|
||||
"Zone": "1"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586347",
|
||||
"Reactor": 54,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 20,
|
||||
"Pocket": "4",
|
||||
"Zone": "1"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586347",
|
||||
"Reactor": 54,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 21,
|
||||
"Pocket": "5",
|
||||
"Zone": "1"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586347",
|
||||
"Reactor": 54,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 22,
|
||||
"Pocket": "6",
|
||||
"Zone": "1"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586347",
|
||||
"Reactor": 54,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 23,
|
||||
"Pocket": "7",
|
||||
"Zone": "1"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586347",
|
||||
"Reactor": 54,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 24,
|
||||
"Pocket": "8",
|
||||
"Zone": "1"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586381",
|
||||
"RunDataSheet": "586822",
|
||||
"Reactor": 52,
|
||||
"Pocket": "3",
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 17,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 13,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586822",
|
||||
"Reactor": 52,
|
||||
"Pocket": "4",
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 18,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 14,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586822",
|
||||
"Reactor": 52,
|
||||
"Pocket": "5",
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 19,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 15,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586822",
|
||||
"Reactor": 52,
|
||||
"Pocket": "6",
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 20,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 16,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586822",
|
||||
"Reactor": 52,
|
||||
"Pocket": "7",
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 21,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 17,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586822",
|
||||
"Reactor": 52,
|
||||
"Pocket": "8",
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 22,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 18,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586827",
|
||||
"Reactor": 52,
|
||||
"PSN": "4445",
|
||||
"RecipeName": "Phosphorus",
|
||||
"RecipeNumber": 743,
|
||||
"SpecType": "Production",
|
||||
"SlotNumber": 25,
|
||||
"Pocket": "1",
|
||||
"Zone": "1"
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 23,
|
||||
"OutCassetteNumber": -1,
|
||||
"OutSlotNumber": -1,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586827",
|
||||
"Reactor": 52,
|
||||
"Pocket": "2",
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 24,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 19,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586827",
|
||||
"Reactor": 52,
|
||||
"Pocket": "3",
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 41,
|
||||
"InSlotNumber": 25,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 20,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586827",
|
||||
"Reactor": 52,
|
||||
"Pocket": "4",
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 42,
|
||||
"InSlotNumber": 1,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 21,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586827",
|
||||
"Reactor": 52,
|
||||
"Pocket": "5",
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 42,
|
||||
"InSlotNumber": 2,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 22,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586827",
|
||||
"Reactor": 52,
|
||||
"Pocket": "6",
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 42,
|
||||
"InSlotNumber": 3,
|
||||
"OutCassetteNumber": -1,
|
||||
"OutSlotNumber": -1,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586827",
|
||||
"Reactor": 52,
|
||||
"Pocket": "7",
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 42,
|
||||
"InSlotNumber": 4,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 24,
|
||||
"PSN": "4445"
|
||||
},
|
||||
{
|
||||
"RunDataSheet": "586827",
|
||||
"Reactor": 52,
|
||||
"Pocket": "8",
|
||||
"Zone": "1",
|
||||
"InCassetteNumber": 42,
|
||||
"InSlotNumber": 5,
|
||||
"OutCassetteNumber": 37,
|
||||
"OutSlotNumber": 25,
|
||||
"PSN": "4445"
|
||||
}
|
||||
],
|
||||
"TotalRows": 25
|
||||
"TotalRows": 32
|
||||
}
|
2
Server/Models/Binder/.editorconfig
Normal file
2
Server/Models/Binder/.editorconfig
Normal file
@ -0,0 +1,2 @@
|
||||
[*.cs]
|
||||
csharp_preserve_single_line_statements = true
|
@ -1,35 +1,31 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace OI.Metrology.Server.Models.Binder;
|
||||
|
||||
public class AppSettings
|
||||
{
|
||||
|
||||
#nullable disable
|
||||
|
||||
[Display(Name = "Api Export Path"), Required] public string ApiExportPath { get; set; }
|
||||
[Display(Name = "Api Logging Content Types"), Required] public string ApiLoggingContentTypes { get; set; }
|
||||
[Display(Name = "Api Logging Path Prefixes"), Required] public string ApiLoggingPathPrefixes { get; set; }
|
||||
[Display(Name = "Api Log Path"), Required] public string ApiLogPath { get; set; }
|
||||
[Display(Name = "Api URL"), Required] public string ApiUrl { get; set; }
|
||||
[Display(Name = "Attachment Path"), Required] public string AttachmentPath { get; set; }
|
||||
[Display(Name = "Build Number"), Required] public string BuildNumber { get; set; }
|
||||
[Display(Name = "Company"), Required] public string Company { get; set; }
|
||||
[Display(Name = "Connection String"), Required] public string ConnectionString { get; set; }
|
||||
[Display(Name = "Git Commit Seven"), Required] public string GitCommitSeven { get; set; }
|
||||
[Display(Name = "Inbound Api Allowed IP List"), Required] public string InboundApiAllowedIPList { get; set; }
|
||||
[Display(Name = "Is Development"), Required] public bool? IsDevelopment { get; set; }
|
||||
[Display(Name = "Is Staging"), Required] public bool? IsStaging { get; set; }
|
||||
[Display(Name = "Mock Root"), Required] public string MockRoot { get; set; }
|
||||
[Display(Name = "MonA Resource"), Required] public string MonAResource { get; set; }
|
||||
[Display(Name = "MonA Site"), Required] public string MonASite { get; set; }
|
||||
[Display(Name = "Oi 2 Sql Connection String"), Required] public string Oi2SqlConnectionString { get; set; }
|
||||
[Display(Name = "Table to Path"), Required] public Dictionary<string, string> TableToPath { get; set; }
|
||||
[Display(Name = "URLs"), Required] public string URLs { get; set; }
|
||||
[Display(Name = "Working Directory Name"), Required] public string WorkingDirectoryName { get; set; }
|
||||
|
||||
#nullable restore
|
||||
public string? ApiExportPath { get; set; }
|
||||
public string? ApiLoggingContentTypes { get; set; }
|
||||
public string? ApiLoggingPathPrefixes { get; set; }
|
||||
public string? ApiLogPath { get; set; }
|
||||
public string? ApiUrl { get; set; }
|
||||
public string? AttachmentPath { get; set; }
|
||||
public string? BuildNumber { get; set; }
|
||||
public string? Company { get; set; }
|
||||
public string? ConnectionString { get; set; }
|
||||
public string? GitCommitSeven { get; set; }
|
||||
public string? InboundApiAllowedIPList { get; set; }
|
||||
public bool? IsDevelopment { get; set; }
|
||||
public bool? IsStaging { get; set; }
|
||||
public string? MockRoot { get; set; }
|
||||
public string? MonAResource { get; set; }
|
||||
public string? MonASite { get; set; }
|
||||
public string? Oi2SqlConnectionString { get; set; }
|
||||
public Dictionary<string, string>? TableToPath { get; set; }
|
||||
public string? URLs { get; set; }
|
||||
public string? WorkingDirectoryName { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
@ -40,48 +36,27 @@ public class AppSettings
|
||||
private static Models.AppSettings Get(AppSettings? appSettings)
|
||||
{
|
||||
Models.AppSettings result;
|
||||
if (appSettings is null)
|
||||
throw new NullReferenceException(nameof(appSettings));
|
||||
if (appSettings.ApiExportPath is null)
|
||||
throw new NullReferenceException(nameof(ApiExportPath));
|
||||
if (appSettings.ApiLoggingContentTypes is null)
|
||||
throw new NullReferenceException(nameof(ApiLoggingContentTypes));
|
||||
if (appSettings.ApiLoggingPathPrefixes is null)
|
||||
throw new NullReferenceException(nameof(ApiLoggingPathPrefixes));
|
||||
if (appSettings.ApiLogPath is null)
|
||||
throw new NullReferenceException(nameof(ApiLogPath));
|
||||
if (appSettings.ApiUrl is null)
|
||||
throw new NullReferenceException(nameof(ApiUrl));
|
||||
if (appSettings.AttachmentPath is null)
|
||||
throw new NullReferenceException(nameof(AttachmentPath));
|
||||
if (appSettings.BuildNumber is null)
|
||||
throw new NullReferenceException(nameof(BuildNumber));
|
||||
if (appSettings.Company is null)
|
||||
throw new NullReferenceException(nameof(Company));
|
||||
if (appSettings.ConnectionString is null)
|
||||
throw new NullReferenceException(nameof(ConnectionString));
|
||||
if (appSettings.GitCommitSeven is null)
|
||||
throw new NullReferenceException(nameof(GitCommitSeven));
|
||||
if (appSettings.InboundApiAllowedIPList is null)
|
||||
throw new NullReferenceException(nameof(InboundApiAllowedIPList));
|
||||
if (appSettings.IsDevelopment is null)
|
||||
throw new NullReferenceException(nameof(IsDevelopment));
|
||||
if (appSettings.IsStaging is null)
|
||||
throw new NullReferenceException(nameof(IsStaging));
|
||||
if (appSettings.MockRoot is null)
|
||||
throw new NullReferenceException(nameof(MockRoot));
|
||||
if (appSettings.MonAResource is null)
|
||||
throw new NullReferenceException(nameof(MonAResource));
|
||||
if (appSettings.MonASite is null)
|
||||
throw new NullReferenceException(nameof(MonASite));
|
||||
if (appSettings.Oi2SqlConnectionString is null)
|
||||
throw new NullReferenceException(nameof(Oi2SqlConnectionString));
|
||||
if (appSettings.URLs is null)
|
||||
throw new NullReferenceException(nameof(URLs));
|
||||
if (appSettings.TableToPath is null)
|
||||
throw new NullReferenceException(nameof(TableToPath));
|
||||
if (appSettings.WorkingDirectoryName is null)
|
||||
throw new NullReferenceException(nameof(WorkingDirectoryName));
|
||||
if (appSettings is null) throw new NullReferenceException(nameof(appSettings));
|
||||
if (appSettings.ApiExportPath is null) throw new NullReferenceException(nameof(ApiExportPath));
|
||||
if (appSettings.ApiLoggingContentTypes is null) throw new NullReferenceException(nameof(ApiLoggingContentTypes));
|
||||
if (appSettings.ApiLoggingPathPrefixes is null) throw new NullReferenceException(nameof(ApiLoggingPathPrefixes));
|
||||
if (appSettings.ApiLogPath is null) throw new NullReferenceException(nameof(ApiLogPath));
|
||||
if (appSettings.ApiUrl is null) throw new NullReferenceException(nameof(ApiUrl));
|
||||
if (appSettings.AttachmentPath is null) throw new NullReferenceException(nameof(AttachmentPath));
|
||||
if (appSettings.BuildNumber is null) throw new NullReferenceException(nameof(BuildNumber));
|
||||
if (appSettings.Company is null) throw new NullReferenceException(nameof(Company));
|
||||
if (appSettings.ConnectionString is null) throw new NullReferenceException(nameof(ConnectionString));
|
||||
if (appSettings.GitCommitSeven is null) throw new NullReferenceException(nameof(GitCommitSeven));
|
||||
if (appSettings.InboundApiAllowedIPList is null) throw new NullReferenceException(nameof(InboundApiAllowedIPList));
|
||||
if (appSettings.IsDevelopment is null) throw new NullReferenceException(nameof(IsDevelopment));
|
||||
if (appSettings.IsStaging is null) throw new NullReferenceException(nameof(IsStaging));
|
||||
if (appSettings.MockRoot is null) throw new NullReferenceException(nameof(MockRoot));
|
||||
if (appSettings.MonAResource is null) throw new NullReferenceException(nameof(MonAResource));
|
||||
if (appSettings.MonASite is null) throw new NullReferenceException(nameof(MonASite));
|
||||
if (appSettings.Oi2SqlConnectionString is null) throw new NullReferenceException(nameof(Oi2SqlConnectionString));
|
||||
if (appSettings.URLs is null) throw new NullReferenceException(nameof(URLs));
|
||||
if (appSettings.TableToPath is null) throw new NullReferenceException(nameof(TableToPath));
|
||||
if (appSettings.WorkingDirectoryName is null) throw new NullReferenceException(nameof(WorkingDirectoryName));
|
||||
result = new(
|
||||
appSettings.ApiExportPath,
|
||||
appSettings.ApiLoggingContentTypes,
|
||||
@ -109,9 +84,31 @@ public class AppSettings
|
||||
public static Models.AppSettings Get(IConfigurationRoot configurationRoot)
|
||||
{
|
||||
Models.AppSettings result;
|
||||
#pragma warning disable IL3050, IL2026
|
||||
AppSettings? appSettings = configurationRoot.Get<AppSettings>();
|
||||
#pragma warning restore IL3050, IL2026
|
||||
if (appSettings?.ApiExportPath is null)
|
||||
{
|
||||
foreach (IConfigurationProvider configurationProvider in configurationRoot.Providers)
|
||||
{
|
||||
if (configurationProvider is not Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider jsonConfigurationProvider)
|
||||
continue;
|
||||
if (jsonConfigurationProvider.Source.FileProvider is not Microsoft.Extensions.FileProviders.PhysicalFileProvider physicalFileProvider)
|
||||
continue;
|
||||
if (!physicalFileProvider.Root.Contains("UserSecrets"))
|
||||
continue;
|
||||
throw new NotSupportedException(physicalFileProvider.Root);
|
||||
}
|
||||
throw new NotSupportedException("Not found!");
|
||||
}
|
||||
result = Get(appSettings);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(AppSettings))]
|
||||
internal partial class BinderAppSettingsSourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
@ -24,22 +24,19 @@
|
||||
<Content Remove="compilerconfig.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Dapper" Version="2.0.143" />
|
||||
<PackageReference Include="Dapper" Version="2.1.4" />
|
||||
<PackageReference Include="EntityFramework" Version="6.4.4" />
|
||||
<PackageReference Include="jQuery" Version="3.7.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.9" />
|
||||
<PackageReference Include="jQuery" Version="3.7.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.13" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="7.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Serilog.AspNetCore.Ingestion" Version="1.0.0-dev-00032" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
|
||||
<PackageReference Include="Serilog.Settings.Configuration" Version="7.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
|
||||
@ -56,12 +53,6 @@
|
||||
<None Include="compilerconfig.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="appsettings.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="appsettings.Development.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Mike\service-shop.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
@ -92,18 +83,6 @@
|
||||
<None Include="Data\Tests\InfinityQS-GetCommandText.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\InfinityQS-GetData.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\InfinityQS-GetDescriptors.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\InfinityQS-GetEvents.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\InfinityQS-GetHeader.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\InfinityQSV2-GetCommandText.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
@ -119,6 +98,21 @@
|
||||
<None Include="Data\Tests\InfinityQSV2-GetHeader.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\InfinityQSV3-GetData.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\InfinityQSV3-GetDescriptors.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\InfinityQSV3-GetHeader.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\InfinityQSV3-GetProductDataAverageSumOfDefectsProcessMeanProcessSigma.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\OpenInsightV1-GetTencorRun.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\Pin-GetPinnedTable.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
@ -134,10 +128,10 @@
|
||||
<None Include="Data\Tests\ToolTypes-GetHeaderFields.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\ToolTypes-GetHeaderTitles.json">
|
||||
<None Include="Data\Tests\ToolTypes-GetHeaders.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\ToolTypes-GetHeaders.json">
|
||||
<None Include="Data\Tests\ToolTypes-GetHeaderTitles.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Data\Tests\ToolTypes-GetToolTypeMetadata.json">
|
||||
|
@ -8,7 +8,6 @@ using OI.Metrology.Shared.Models;
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
using OI.Metrology.Shared.Repositories;
|
||||
using OI.Metrology.Shared.Services;
|
||||
using Serilog;
|
||||
using System.Reflection;
|
||||
|
||||
namespace OI.Metrology.Server;
|
||||
@ -41,19 +40,17 @@ public class Program
|
||||
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
LoggerConfiguration loggerConfiguration = new();
|
||||
ILogger<Program>? logger = null;
|
||||
(string assemblyName, WebApplicationOptions _) = Get(args);
|
||||
WebApplicationBuilder webApplicationBuilder = WebApplication.CreateBuilder(args);
|
||||
_ = webApplicationBuilder.Configuration.AddUserSecrets<Program>();
|
||||
AppSettings appSettings = Models.Binder.AppSettings.Get(webApplicationBuilder.Configuration);
|
||||
if (string.IsNullOrEmpty(appSettings.Company))
|
||||
throw new Exception("Company name must have a value!");
|
||||
if (string.IsNullOrEmpty(appSettings.WorkingDirectoryName))
|
||||
throw new Exception("Working directory name must have a value!");
|
||||
string workingDirectory = IWorkingDirectory.GetWorkingDirectory(assemblyName, appSettings.WorkingDirectoryName);
|
||||
Environment.SetEnvironmentVariable(nameof(workingDirectory), workingDirectory);
|
||||
_ = ConfigurationLoggerConfigurationExtensions.Configuration(loggerConfiguration.ReadFrom, webApplicationBuilder.Configuration);
|
||||
_ = SerilogHostBuilderExtensions.UseSerilog(webApplicationBuilder.Host);
|
||||
Log.Logger = loggerConfiguration.CreateLogger();
|
||||
Serilog.ILogger log = Log.ForContext<Program>();
|
||||
try
|
||||
{
|
||||
_ = webApplicationBuilder.Services.AddMemoryCache();
|
||||
@ -77,12 +74,14 @@ public class Program
|
||||
_ = 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.AddSingleton<IInfinityQSV3Repository, InfinityQSV3Repository>(_ => new(appSettings.MockRoot, sqlDbConnectionFactory));
|
||||
_ = webApplicationBuilder.Services.AddSingleton<IWorkMaterialRepository, WorkMaterialRepository>(_ => new(appSettings.MockRoot, sqlDbConnectionFactory));
|
||||
|
||||
_ = webApplicationBuilder.Services.AddScoped<IExportRepository, ExportRepository>();
|
||||
_ = webApplicationBuilder.Services.AddScoped<IAttachmentsService, AttachmentsService>();
|
||||
_ = webApplicationBuilder.Services.AddScoped<IInboundDataService, InboundDataService>();
|
||||
_ = webApplicationBuilder.Services.AddScoped<IMetrologyRepository, MetrologyRepository>();
|
||||
_ = webApplicationBuilder.Services.AddScoped<IOpenInsightV1Repository, OpenInsightV1Repository>();
|
||||
|
||||
_ = webApplicationBuilder.Services.AddSwaggerGen();
|
||||
_ = webApplicationBuilder.Services.AddSession(sessionOptions =>
|
||||
@ -104,6 +103,7 @@ public class Program
|
||||
});
|
||||
}
|
||||
WebApplication webApplication = webApplicationBuilder.Build();
|
||||
logger = webApplication.Services.GetRequiredService<ILogger<Program>>();
|
||||
_ = webApplication.UseCors(corsPolicyBuilder => corsPolicyBuilder.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod());
|
||||
if (!webApplicationBuilder.Environment.IsDevelopment())
|
||||
{
|
||||
@ -121,26 +121,21 @@ public class Program
|
||||
_ = webApplication.UseSwagger();
|
||||
_ = webApplication.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "Server V1"));
|
||||
}
|
||||
_ = webApplication.Lifetime.ApplicationStopped.Register(Log.CloseAndFlush);
|
||||
_ = ApplicationBuilderSerilogClientExtensions.UseSerilogIngestion(webApplication);
|
||||
_ = SerilogApplicationBuilderExtensions.UseSerilogRequestLogging(webApplication);
|
||||
_ = webApplication.UseFileServer(enableDirectoryBrowsing: true);
|
||||
_ = webApplication.UseStaticFiles();
|
||||
_ = webApplication.UseSession();
|
||||
_ = webApplication.UseMiddleware<ApiLoggingMiddleware>();
|
||||
_ = webApplication.MapControllers();
|
||||
log.Information("Starting Web Application");
|
||||
logger.LogInformation("Starting Web Application");
|
||||
webApplication.Run();
|
||||
return 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Fatal(ex, "Host terminated unexpectedly");
|
||||
return 1;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Log.CloseAndFlush();
|
||||
try
|
||||
{ logger?.LogCritical(ex, "Host terminated unexpectedly"); }
|
||||
catch (Exception) { }
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,8 +31,6 @@ public class AppSettingsRepository : IAppSettingsRepository<Models.Binder.AppSet
|
||||
return result;
|
||||
}
|
||||
|
||||
string IAppSettingsRepository<Models.Binder.AppSettings>.GetBuildNumberAndGitCommitSeven() => GetBuildNumberAndGitCommitSeven();
|
||||
|
||||
internal void VerifyConnectionStrings()
|
||||
{
|
||||
if (string.IsNullOrEmpty(_AppSettings.ConnectionString))
|
||||
@ -53,6 +51,8 @@ public class AppSettingsRepository : IAppSettingsRepository<Models.Binder.AppSet
|
||||
#endif
|
||||
}
|
||||
|
||||
string IAppSettingsRepository<Models.Binder.AppSettings>.GetBuildNumberAndGitCommitSeven() => GetBuildNumberAndGitCommitSeven();
|
||||
|
||||
void IAppSettingsRepository<Models.Binder.AppSettings>.VerifyConnectionStrings() => VerifyConnectionStrings();
|
||||
|
||||
}
|
@ -23,14 +23,14 @@ public class ClientSettingsRepository : IClientSettingsRepository
|
||||
return results;
|
||||
}
|
||||
|
||||
List<string> IClientSettingsRepository.GetClientSettings(IPAddress? remoteIpAddress) => GetClientSettings(remoteIpAddress);
|
||||
|
||||
internal static string GetIpAddress(IPAddress? remoteIpAddress)
|
||||
{
|
||||
string result = remoteIpAddress is null ? string.Empty : remoteIpAddress.ToString();
|
||||
return result;
|
||||
}
|
||||
|
||||
List<string> IClientSettingsRepository.GetClientSettings(IPAddress? remoteIpAddress) => GetClientSettings(remoteIpAddress);
|
||||
|
||||
string IClientSettingsRepository.GetIpAddress(IPAddress? remoteIpAddress) => GetIpAddress(remoteIpAddress);
|
||||
|
||||
}
|
@ -9,17 +9,17 @@ namespace OI.Metrology.Server.Repository;
|
||||
public class ExportRepository : IExportRepository
|
||||
{
|
||||
|
||||
private readonly Serilog.ILogger _Log;
|
||||
private readonly string _RepositoryName;
|
||||
private readonly AppSettings _AppSettings;
|
||||
private readonly ILogger<ExportRepository> _Logger;
|
||||
private readonly Dictionary<string, Dictionary<long, HeaderCommon>> _RdsToHeaderCommonCollection;
|
||||
|
||||
public ExportRepository(AppSettings appSettings)
|
||||
public ExportRepository(ILogger<ExportRepository> logger, AppSettings appSettings)
|
||||
{
|
||||
_Logger = logger;
|
||||
_AppSettings = appSettings;
|
||||
_RdsToHeaderCommonCollection = new();
|
||||
_RepositoryName = nameof(ExportRepository)[..^10];
|
||||
_Log = Serilog.Log.ForContext<ExportRepository>();
|
||||
}
|
||||
|
||||
private static string[] Get()
|
||||
@ -93,7 +93,7 @@ public class ExportRepository : IExportRepository
|
||||
if (jsonElement is not null && jsonElement.Value.ValueKind == JsonValueKind.Object)
|
||||
{
|
||||
jsonProperties = (from l in jsonElement.Value.EnumerateObject() where l.Name == ticks select l).ToArray();
|
||||
if (jsonProperties.Any() && long.TryParse(jsonProperties[0].Value.ToString(), out long ticksValue))
|
||||
if (jsonProperties.Length != 0 && long.TryParse(jsonProperties[0].Value.ToString(), out long ticksValue))
|
||||
hc.Date = new(ticksValue);
|
||||
}
|
||||
results.Add(hc);
|
||||
|
@ -65,7 +65,7 @@ public class InboundRepository : IInboundRepository
|
||||
else
|
||||
{
|
||||
inboundDataService.ValidateJSONFields(jToken, 0, metaData, result.Errors, result.Warnings);
|
||||
if (!result.Errors.Any())
|
||||
if (result.Errors.Count == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
321
Server/Repositories/InfinityQSV3Repository.cs
Normal file
321
Server/Repositories/InfinityQSV3Repository.cs
Normal file
@ -0,0 +1,321 @@
|
||||
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 InfinityQSV3Repository : IInfinityQSV3Repository
|
||||
{
|
||||
|
||||
private readonly string _MockRoot;
|
||||
private readonly string _RepositoryName;
|
||||
private readonly IDbConnectionFactory _DBConnectionFactory;
|
||||
|
||||
public InfinityQSV3Repository(string mockRoot, IDbConnectionFactory dbConnectionFactory)
|
||||
{
|
||||
_MockRoot = mockRoot;
|
||||
_DBConnectionFactory = dbConnectionFactory;
|
||||
_RepositoryName = nameof(InfinityQSV3Repository)[..^10];
|
||||
}
|
||||
|
||||
string IInfinityQSV3Repository.GetCommandText(string subGroupId)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
if (string.IsNullOrEmpty(subGroupId))
|
||||
throw new ArgumentException(null, 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 IInfinityQSV3Repository.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(null, nameof(dateTime));
|
||||
_ = result
|
||||
.AppendLine(" select case when iq.sl_loos is null then 0 else iq.sl_loos end + ")
|
||||
.AppendLine(" case when iq.sl_uoos is null then 0 else iq.sl_uoos end + ")
|
||||
.AppendLine(" iq.ev_count as iq_sum, ")
|
||||
.AppendLine(" iq.sl_aflag, ")
|
||||
.AppendLine(" iq.sl_loos, ")
|
||||
.AppendLine(" iq.sl_uoos, ")
|
||||
.AppendLine(" iq.se_sgrp, ")
|
||||
.AppendLine(" iq.se_sgtm, ")
|
||||
.AppendLine(" iq.se_tsno, ")
|
||||
.AppendLine(" iq.td_test, ")
|
||||
.AppendLine(" iq.pr_name, ")
|
||||
.AppendLine(" iq.jd_name, ")
|
||||
.AppendLine(" iq.pl_name, ")
|
||||
.AppendLine(" iq.pd_name, ")
|
||||
.AppendLine(" iq.td_name, ")
|
||||
.AppendLine(" iq.se_val, ")
|
||||
.AppendLine(" iq.sl_eflag, ")
|
||||
.AppendLine(" iq.sl_scal, ")
|
||||
.AppendLine(" iq.sl_sls, ")
|
||||
.AppendLine(" iq.sl_usl ")
|
||||
.AppendLine(" from ( ")
|
||||
.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(" sl.f_eflag sl_eflag, ")
|
||||
.AppendLine(" sl.f_aflag sl_aflag, ")
|
||||
.AppendLine(" sl.f_scal sl_scal, ")
|
||||
.AppendLine(" sl.f_lsl sl_sls, ")
|
||||
.AppendLine(" sl.f_usl sl_usl, ")
|
||||
.AppendLine(" case when sl.f_aflag is null or sl.f_aflag = 0 then null else ")
|
||||
.AppendLine(" case when round(se.f_val, sl.F_scal, 1) < sl.f_lsl then 1 else 0 end ")
|
||||
.AppendLine(" end as sl_loos, ")
|
||||
.AppendLine(" case when sl.f_aflag is null or sl.f_aflag = 0 then null else ")
|
||||
.AppendLine(" case when round(se.f_val, sl.F_scal, 1) > sl.f_usl then 1 else 0 end ")
|
||||
.AppendLine(" end as sl_uoos, ")
|
||||
.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 ")
|
||||
.AppendLine(" ) 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(" left join [spcepiworld].[dbo].[spec_lim] sl ")
|
||||
.AppendLine(" on se.f_part = sl.f_part ")
|
||||
.AppendLine(" and se.f_test = sl.f_test ")
|
||||
.AppendLine(" where se.f_flag = 0 ")
|
||||
.AppendLine(" and (sl.f_prcs is null or se.f_prcs = sl.f_prcs or sl.f_prcs = 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(" ) as iq ")
|
||||
.AppendLine(" order by iq.sl_loos + iq.sl_uoos + iq.ev_count desc, ")
|
||||
.AppendLine(" iq.sl_aflag desc, ")
|
||||
.AppendLine(" iq.se_sgrp, ")
|
||||
.AppendLine(" iq.se_tsno, ")
|
||||
.AppendLine(" iq.td_test ")
|
||||
.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 InfinityQSV3 GetInfinityQSV3(IDbConnectionFactory dbConnectionFactory, IInfinityQSV3Repository infinityQSV3Repository, string subGroupId)
|
||||
{
|
||||
InfinityQSV3 result;
|
||||
string commandText = infinityQSV3Repository.GetCommandText(subGroupId, process: string.Empty, job: string.Empty, part: string.Empty, lot: string.Empty, dateTime: string.Empty);
|
||||
StringBuilder stringBuilder = GetForJsonPath(dbConnectionFactory, commandText);
|
||||
InfinityQSV3[]? results = stringBuilder.Length == 0 ? Array.Empty<InfinityQSV3>() : JsonSerializer.Deserialize(stringBuilder.ToString(), ResultInfinityQSV3SourceGenerationContext.Default.InfinityQSV3Array); // , new JsonSerializerOptions { PropertyNameCaseInsensitive = true }
|
||||
if (results is null)
|
||||
throw new NullReferenceException(nameof(results));
|
||||
result = results.First();
|
||||
return result;
|
||||
}
|
||||
|
||||
Result<InfinityQSV3[]> IInfinityQSV3Repository.GetData(string subGroupId)
|
||||
{
|
||||
Result<InfinityQSV3[]>? result;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV3Repository.GetData)}.json"));
|
||||
result = JsonSerializer.Deserialize(json, ResultInfinityQSV3SourceGenerationContext.Default.ResultInfinityQSV3Array);
|
||||
if (result is null)
|
||||
throw new NullReferenceException(nameof(result));
|
||||
}
|
||||
else
|
||||
{
|
||||
IInfinityQSV3Repository infinityQSV3Repository = this;
|
||||
InfinityQSV3 infinityQSV3 = GetInfinityQSV3(_DBConnectionFactory, infinityQSV3Repository, subGroupId);
|
||||
string commandText = infinityQSV3Repository.GetCommandText(subGroupId, process: infinityQSV3.Process, job: infinityQSV3.Job, part: infinityQSV3.Part, lot: infinityQSV3.Lot, dateTime: string.Concat(infinityQSV3.SubGroupDateTime));
|
||||
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
|
||||
InfinityQSV3[]? results = stringBuilder.Length == 0 ? Array.Empty<InfinityQSV3>() : JsonSerializer.Deserialize(stringBuilder.ToString(), ResultInfinityQSV3SourceGenerationContext.Default.InfinityQSV3Array); // , new JsonSerializerOptions { PropertyNameCaseInsensitive = true }
|
||||
if (results is null)
|
||||
throw new NullReferenceException(nameof(results));
|
||||
result = new()
|
||||
{
|
||||
Results = results,
|
||||
TotalRows = results.Length,
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Result<InfinityQSDescriptorV3[]> IInfinityQSV3Repository.GetDescriptors(string subGroupId)
|
||||
{
|
||||
Result<InfinityQSDescriptorV3[]>? result;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV3Repository.GetDescriptors)}.json"));
|
||||
result = JsonSerializer.Deserialize(json, ResultInfinityQSDescriptorV3SourceGenerationContext.Default.ResultInfinityQSDescriptorV3Array);
|
||||
if (result is null)
|
||||
throw new NullReferenceException(nameof(result));
|
||||
}
|
||||
else
|
||||
{
|
||||
IInfinityQSV3Repository infinityQSV3Repository = this;
|
||||
string commandText = infinityQSV3Repository.GetCommandText(subGroupId);
|
||||
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
|
||||
InfinityQSDescriptorV3[]? results = stringBuilder.Length == 0 ? Array.Empty<InfinityQSDescriptorV3>() : JsonSerializer.Deserialize(stringBuilder.ToString(), ResultInfinityQSDescriptorV3SourceGenerationContext.Default.InfinityQSDescriptorV3Array); // , new JsonSerializerOptions { PropertyNameCaseInsensitive = true }
|
||||
if (results is null)
|
||||
throw new NullReferenceException(nameof(results));
|
||||
result = new()
|
||||
{
|
||||
Results = results,
|
||||
TotalRows = results.Length,
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
string IInfinityQSV3Repository.GetCommandText(InfinityQSV3 infinityQSV3)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
if (string.IsNullOrEmpty(infinityQSV3.Process))
|
||||
throw new ArgumentException(nameof(infinityQSV3.Process));
|
||||
if (string.IsNullOrEmpty(infinityQSV3.Part))
|
||||
throw new ArgumentException(nameof(infinityQSV3.Part));
|
||||
_ = result
|
||||
.AppendLine(" select ")
|
||||
.AppendLine(" ev.f_evnt [ev_evnt], ")
|
||||
.AppendLine(" ev.f_sgtm [ev_sgtm], ")
|
||||
.AppendLine(" dateadd(HH, -7, (dateadd(SS, convert(bigint, ev.f_sgtm), '19700101'))) [ev_utc7], ")
|
||||
.AppendLine(" pr.f_name [pr_name], ")
|
||||
.AppendLine(" pd.f_name [pd_name], ")
|
||||
.AppendLine(" td.f_test [td_test], ")
|
||||
.AppendLine(" td.f_name [td_name], ")
|
||||
.AppendLine(" ev.f_name [ev_name] ")
|
||||
.AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] pr ")
|
||||
.AppendLine(" on ev.f_prcs = pr.f_prcs ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ")
|
||||
.AppendLine(" on ev.f_part = pd.f_part ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ")
|
||||
.AppendLine(" on ev.f_test = td.f_test ")
|
||||
.Append(" where pr.f_name = '").Append(infinityQSV3.Process).AppendLine("' ")
|
||||
.Append(" and pd.f_name = '").Append(infinityQSV3.Part).AppendLine("' ")
|
||||
.Append(" and ev.f_sgtm = ").Append(infinityQSV3.SubGroupDateTime).AppendLine(" ")
|
||||
.AppendLine(" for json path ");
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
Result<InfinityQSV3[]> IInfinityQSV3Repository.GetHeader(string subGroupId)
|
||||
{
|
||||
Result<InfinityQSV3[]>? result;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV3Repository.GetHeader)}.json"));
|
||||
result = JsonSerializer.Deserialize(json, ResultInfinityQSV3SourceGenerationContext.Default.ResultInfinityQSV3Array);
|
||||
if (result is null)
|
||||
throw new NullReferenceException(nameof(result));
|
||||
}
|
||||
else
|
||||
{
|
||||
IInfinityQSV3Repository infinityQSV3Repository = this;
|
||||
InfinityQSV3 infinityQSV3 = GetInfinityQSV3(_DBConnectionFactory, infinityQSV3Repository, subGroupId);
|
||||
InfinityQSV3[] results = new InfinityQSV3[] { infinityQSV3 };
|
||||
result = new()
|
||||
{
|
||||
Results = results,
|
||||
TotalRows = results.Length,
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
string IInfinityQSV3Repository.GetCommandText(string process, string? part)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
if (string.IsNullOrEmpty(process))
|
||||
throw new ArgumentException(null, nameof(process));
|
||||
if (string.IsNullOrEmpty(part))
|
||||
throw new ArgumentException(null, nameof(part));
|
||||
_ = result
|
||||
.AppendLine(" select [f_mean] as ProcessMean, ")
|
||||
.AppendLine(" [f_sp] as ProcessSigma ")
|
||||
.AppendLine(" from [spcepiworld].[dbo].[test_dat] test ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[ctrl_lim] ctrl ")
|
||||
.AppendLine(" on test.f_test = ctrl.f_test ")
|
||||
.AppendLine(" and test.f_tsgp = 1104848523 /* Product Data */ ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[part_dat] part ")
|
||||
.AppendLine(" on part.f_part = ctrl.f_part ")
|
||||
.AppendLine(" and ctrl.f_test = 1125073605 /* Average Sum of Defects */ ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] process ")
|
||||
.AppendLine(" on process.f_prcs = ctrl.f_prcs ")
|
||||
.AppendLine(" where test.f_name = 'Average Sum of Defects' ")
|
||||
.Append(" and process.f_name = '").Append(process).AppendLine("' ")
|
||||
.Append(" and part.f_name = '").Append(part).AppendLine("' ")
|
||||
.AppendLine(" for json path; ");
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
string IInfinityQSV3Repository.GetProductDataAverageSumOfDefectsProcessMeanProcessSigma(string process, string? recipe)
|
||||
{
|
||||
StringBuilder result;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV3Repository.GetProductDataAverageSumOfDefectsProcessMeanProcessSigma)}.json"));
|
||||
result = new(json);
|
||||
}
|
||||
else
|
||||
{
|
||||
IInfinityQSV3Repository infinityQSV3Repository = this;
|
||||
string commandText = infinityQSV3Repository.GetCommandText(process, recipe);
|
||||
result = GetForJsonPath(_DBConnectionFactory, commandText);
|
||||
if (result.Length == 0)
|
||||
result = new("{}");
|
||||
}
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
}
|
@ -606,7 +606,7 @@ public class MetrologyRepository : IMetrologyRepository
|
||||
IEnumerable<HeaderCommon> results;
|
||||
ToolType[] toolTypes = GetToolTypes().ToArray();
|
||||
|
||||
if (!toolTypes.Any() || toolTypes.FirstOrDefault() is null)
|
||||
if (toolTypes.Length == 0 || toolTypes.FirstOrDefault() is null)
|
||||
throw new Exception("Invalid tool type ID");
|
||||
|
||||
ToolType tt;
|
||||
|
85
Server/Repositories/OpenInsightV1Repository.cs
Normal file
85
Server/Repositories/OpenInsightV1Repository.cs
Normal file
@ -0,0 +1,85 @@
|
||||
using OI.Metrology.Server.Models;
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
using OI.Metrology.Shared.Repositories;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Text;
|
||||
|
||||
#pragma warning disable CS8600, CS8602, CS8603, CS8604, CS8625
|
||||
|
||||
namespace OI.Metrology.Server.Repositories;
|
||||
|
||||
public class OpenInsightV1Repository : IOpenInsightV1Repository
|
||||
{
|
||||
private readonly string _MockRoot;
|
||||
private readonly string _RepositoryName;
|
||||
private readonly IDbConnectionFactory _DBConnectionFactory;
|
||||
|
||||
public OpenInsightV1Repository(AppSettings appSettings, IDbConnectionFactory dbConnectionFactory)
|
||||
{
|
||||
_MockRoot = appSettings.MockRoot;
|
||||
_DBConnectionFactory = dbConnectionFactory;
|
||||
_RepositoryName = nameof(OpenInsightV1Repository)[..^10];
|
||||
}
|
||||
|
||||
string IOpenInsightV1Repository.GetCommandText(string rds, string? insertDate, string? recipe)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
if (string.IsNullOrEmpty(rds))
|
||||
throw new ArgumentException(null, nameof(rds));
|
||||
if (string.IsNullOrEmpty(insertDate))
|
||||
throw new ArgumentException(null, nameof(insertDate));
|
||||
if (string.IsNullOrEmpty(recipe))
|
||||
throw new ArgumentException(null, nameof(recipe));
|
||||
_ = result
|
||||
.AppendLine(" select header.RDS, ")
|
||||
.AppendLine(" child.AttachmentId, ")
|
||||
.AppendLine(" child.Slot, ")
|
||||
.AppendLine(" child.SumOfDefects, ")
|
||||
.AppendLine(" child.Sort, ")
|
||||
.AppendLine(" child.InsertDate ")
|
||||
.AppendLine(" from metrology.dbo.tencorRunHeader header ")
|
||||
.AppendLine(" inner join metrology.dbo.TencorRunData child ")
|
||||
.AppendLine(" on header.id = child.headerId ")
|
||||
.Append(" where header.rds = '").Append(rds).AppendLine("' ")
|
||||
.Append(" and header.recipe like '").Append(recipe).AppendLine("%' ")
|
||||
.Append(" and child.insertdate between (select(dateadd(minute, -5, '").Append(insertDate).AppendLine("'))) ")
|
||||
.Append(" and (select(dateadd(minute, 5, '").Append(insertDate).AppendLine("'))) ")
|
||||
.AppendLine(" order by header.insertdate desc, ")
|
||||
.AppendLine(" child.slot asc ")
|
||||
.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;
|
||||
}
|
||||
|
||||
string IOpenInsightV1Repository.GetTencorRun(string rds, string? insertDate, string? recipe)
|
||||
{
|
||||
StringBuilder result;
|
||||
if (!string.IsNullOrEmpty(_MockRoot))
|
||||
{
|
||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IOpenInsightV1Repository.GetTencorRun)}.json"));
|
||||
result = new(json);
|
||||
}
|
||||
else
|
||||
{
|
||||
IOpenInsightV1Repository openInsightRepository = this;
|
||||
string commandText = openInsightRepository.GetCommandText(rds, insertDate, recipe);
|
||||
result = GetForJsonPath(_DBConnectionFactory, commandText);
|
||||
if (result.Length == 0)
|
||||
result = new("{}");
|
||||
}
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
}
|
@ -8,7 +8,6 @@ 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;
|
||||
|
||||
@ -17,7 +16,6 @@ public class PinRepository : IPinRepository
|
||||
_MockRoot = mockRoot;
|
||||
_RdsToHeaderCommonCollection = new();
|
||||
_RepositoryName = nameof(PinRepository)[..^10];
|
||||
_Log = Serilog.Log.ForContext<PinRepository>();
|
||||
}
|
||||
|
||||
void IPinRepository.SetPinnedTable(HeaderCommon headerCommon)
|
||||
|
@ -1,6 +1,5 @@
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
using OI.Metrology.Shared.ViewModels;
|
||||
using Serilog.Context;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace OI.Metrology.Server.Repository;
|
||||
@ -8,9 +7,10 @@ namespace OI.Metrology.Server.Repository;
|
||||
public class ServiceShopOrderRepository : IServiceShopOrderRepository
|
||||
{
|
||||
|
||||
private readonly Serilog.ILogger _Log;
|
||||
private readonly ILogger<ServiceShopOrderRepository> _Logger;
|
||||
|
||||
public ServiceShopOrderRepository() => _Log = Serilog.Log.ForContext<ServiceShopOrderRepository>();
|
||||
public ServiceShopOrderRepository(ILogger<ServiceShopOrderRepository> logger) =>
|
||||
_Logger = logger;
|
||||
|
||||
private static ServiceShopOrder[] GetServiceShopOrders(Shared.Models.ServiceShop? serviceShop)
|
||||
{
|
||||
@ -35,13 +35,8 @@ public class ServiceShopOrderRepository : IServiceShopOrderRepository
|
||||
async Task<ServiceShopOrder[]> IServiceShopOrderRepository.GetAllServiceShopOrders()
|
||||
{
|
||||
ServiceShopOrder[] results;
|
||||
string? methodName = IMethodName.GetActualAsyncMethodName();
|
||||
using (LogContext.PushProperty("MethodName", methodName))
|
||||
{
|
||||
_Log.Debug("() => ...");
|
||||
Shared.Models.ServiceShop? serviceShop = await Task.Run(GetServiceShopOrders);
|
||||
results = GetServiceShopOrders(serviceShop);
|
||||
}
|
||||
Shared.Models.ServiceShop? serviceShop = await Task.Run(GetServiceShopOrders);
|
||||
results = GetServiceShopOrders(serviceShop);
|
||||
return results.ToArray();
|
||||
}
|
||||
|
||||
|
@ -11,13 +11,11 @@ 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];
|
||||
}
|
||||
|
||||
@ -257,32 +255,6 @@ public class ToolTypesRepository : IToolTypesRepository
|
||||
return r;
|
||||
}
|
||||
|
||||
protected static string GetRowData(DataRow dr)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
for (int i = 0; i < dr.Table.Columns.Count; i++)
|
||||
{
|
||||
if (i > 0)
|
||||
_ = result.Append(',');
|
||||
object v = dr[i];
|
||||
if (v is not null && !Convert.IsDBNull(v))
|
||||
_ = result.Append(FormatForCSV(string.Concat(Convert.ToString(v))));
|
||||
}
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
protected static string GetColumnHeaders(DataTable dataTable)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
for (int i = 0; i < dataTable.Columns.Count; i++)
|
||||
{
|
||||
if (i > 0)
|
||||
_ = result.Append(',');
|
||||
_ = result.Append(FormatForCSV(dataTable.Columns[i].ColumnName.TrimEnd('_')));
|
||||
}
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
protected static string FormatForCSV(string v)
|
||||
{
|
||||
StringBuilder result = new(v.Length + 2);
|
||||
@ -306,6 +278,32 @@ public class ToolTypesRepository : IToolTypesRepository
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
protected static string GetColumnHeaders(DataTable dataTable)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
for (int i = 0; i < dataTable.Columns.Count; i++)
|
||||
{
|
||||
if (i > 0)
|
||||
_ = result.Append(',');
|
||||
_ = result.Append(FormatForCSV(dataTable.Columns[i].ColumnName.TrimEnd('_')));
|
||||
}
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
protected static string GetRowData(DataRow dr)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
for (int i = 0; i < dr.Table.Columns.Count; i++)
|
||||
{
|
||||
if (i > 0)
|
||||
_ = result.Append(',');
|
||||
object v = dr[i];
|
||||
if (v is not null && !Convert.IsDBNull(v))
|
||||
_ = result.Append(FormatForCSV(string.Concat(Convert.ToString(v))));
|
||||
}
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
byte[] IToolTypesRepository.GetCSVExport(IMetrologyRepository metrologyRepository, int toolTypeId, DateTime? datebegin, DateTime? dateend)
|
||||
{
|
||||
byte[] results;
|
||||
|
@ -63,18 +63,6 @@ public class WorkMaterialRepository : IWorkMaterialRepository
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
private static StringBuilder GetForJsonPath(IDbConnectionFactory dbConnectionFactory, string commandText)
|
||||
{
|
||||
StringBuilder stringBuilder = new();
|
||||
using DbConnection dbConnection = dbConnectionFactory.GetDbConnection(useOI2Sql: true);
|
||||
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 (int?, int?, int?, bool) GetWorkOrder(string mid)
|
||||
{
|
||||
int? workOrderStep = null;
|
||||
@ -108,6 +96,18 @@ public class WorkMaterialRepository : IWorkMaterialRepository
|
||||
return new(workOrderNumber, workOrderStep, workOrderCassette, workOrderStep is not null || workOrderNumber is not null || workOrderCassette is not null);
|
||||
}
|
||||
|
||||
private static StringBuilder GetForJsonPath(IDbConnectionFactory dbConnectionFactory, string commandText)
|
||||
{
|
||||
StringBuilder stringBuilder = new();
|
||||
using DbConnection dbConnection = dbConnectionFactory.GetDbConnection(useOI2Sql: true);
|
||||
DbCommand dbCommand = dbConnection.CreateCommand();
|
||||
dbCommand.CommandText = commandText;
|
||||
DbDataReader dbDataReader = dbCommand.ExecuteReader(CommandBehavior.SequentialAccess);
|
||||
while (dbDataReader.Read())
|
||||
_ = stringBuilder.Append(dbDataReader.GetString(0));
|
||||
return stringBuilder;
|
||||
}
|
||||
|
||||
Result<WorkMaterialV2[]> IWorkMaterialRepository.GetCassette(string mid)
|
||||
{
|
||||
Result<WorkMaterialV2[]>? result;
|
||||
@ -132,7 +132,7 @@ public class WorkMaterialRepository : IWorkMaterialRepository
|
||||
IWorkMaterialRepository workMaterialRepository = this;
|
||||
string commandText = workMaterialRepository.GetCommandText(workOrderNumber, workOrderStep, workOrderCassette);
|
||||
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText);
|
||||
JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(stringBuilder.ToString());
|
||||
JsonElement[]? jsonElements = stringBuilder.Length == 0 ? Array.Empty<JsonElement>() : JsonSerializer.Deserialize<JsonElement[]>(stringBuilder.ToString());
|
||||
if (jsonElements is null)
|
||||
throw new NullReferenceException(nameof(jsonElements));
|
||||
foreach (JsonElement jsonElement in jsonElements)
|
||||
@ -140,7 +140,7 @@ public class WorkMaterialRepository : IWorkMaterialRepository
|
||||
if (jsonElement.ValueKind != JsonValueKind.Object)
|
||||
continue;
|
||||
jsonProperties = jsonElement.EnumerateObject().ToArray();
|
||||
if (!jsonProperties.Any())
|
||||
if (jsonProperties.Length == 0)
|
||||
continue;
|
||||
group = JsonSerializer.Deserialize<WorkMaterial[]>(jsonProperties.First().Value.ToString(), new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
if (group is null)
|
||||
|
@ -143,10 +143,10 @@ public class AttachmentsService : IAttachmentsService
|
||||
if (!Directory.Exists(checkDirectory))
|
||||
continue;
|
||||
files.AddRange(Directory.GetFiles(checkDirectory));
|
||||
if (files.Any())
|
||||
if (files.Count != 0)
|
||||
break;
|
||||
}
|
||||
result = !files.Any() ? null : files.First();
|
||||
result = files.Count == 0 ? null : files.First();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
using Adaptation.FileHandlers.json;
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
@ -95,7 +96,7 @@ public class SpreadingResistanceProfileService : ISpreadingResistanceProfileServ
|
||||
return rectangles.ToArray();
|
||||
}
|
||||
|
||||
private static string[] GetRectanglesDescriptions(Info info, Setup setup, List<Layer> layers)
|
||||
private static ReadOnlyCollection<string> GetRectanglesDescriptions(Info info, Setup setup, List<Layer> layers)
|
||||
{
|
||||
List<string> results = new()
|
||||
{
|
||||
@ -123,7 +124,7 @@ public class SpreadingResistanceProfileService : ISpreadingResistanceProfileServ
|
||||
_ = stringBuilder.AppendLine(string.Concat("First Pt. ", layer.FirstPoint, " Last Pt. ", layer.LastPoint, " Type ", layer.Type, " Smoothing ", layer.Smoothing, " Correction ", layer.Correction));
|
||||
_ = stringBuilder.AppendLine(string.Join(" ", info.Comments));
|
||||
results[0] = stringBuilder.ToString();
|
||||
return results.ToArray();
|
||||
return new(results);
|
||||
}
|
||||
|
||||
internal static byte[] GetImageBytes(CSV csv)
|
||||
@ -182,8 +183,8 @@ public class SpreadingResistanceProfileService : ISpreadingResistanceProfileServ
|
||||
graphics.FillRectangles(Brushes.White, rectangles);
|
||||
graphics.DrawRectangles(pen, rectangles);
|
||||
|
||||
string[] descriptions = GetRectanglesDescriptions(csv.Info, csv.Setup, csv.LayerHeader.Layers);
|
||||
for (int i = 0; i < descriptions.Length; i++)
|
||||
ReadOnlyCollection<string> descriptions = GetRectanglesDescriptions(csv.Info, csv.Setup, csv.LayerHeader.Layers);
|
||||
for (int i = 0; i < descriptions.Count; i++)
|
||||
graphics.DrawString(descriptions[i], consolas, brush, rectangles[i]);
|
||||
|
||||
DrawLine(graphics, concentrationPen, 13, 6, 13, 40);
|
||||
|
@ -35,7 +35,7 @@ public class CSV
|
||||
# else
|
||||
string[] lines = File.ReadAllLines(path, System.Text.Encoding.GetEncoding("ISO-8859-1")); // µ³®
|
||||
# endif
|
||||
string? fileVersion = !lines.Any() ? null : GetFileVersion(lines.First());
|
||||
string? fileVersion = lines.Length == 0 ? null : GetFileVersion(lines.First());
|
||||
for (int i = 1; i < lines.Length; i++)
|
||||
{
|
||||
if (lines[i].StartsWith("--INFO--"))
|
||||
|
@ -1,47 +0,0 @@
|
||||
{
|
||||
"ApiExportPath": "\\\\messdv002.na.infineon.com\\Candela",
|
||||
"ApiUrl": "~/api",
|
||||
"ConnectionString": "Data Source=MESSAD1001\\TEST1,59583;Integrated Security=True;Initial Catalog=Metrology;",
|
||||
"IsDevelopment": true,
|
||||
"MockRoot": "",
|
||||
"MonAResource": "OI_Metrology_Viewer_IFX",
|
||||
"Oi2SqlConnectionString": "Data Source=MESSAD1001\\TEST1,59583;Initial Catalog=LSL2SQL;Persist Security Info=True;User ID=srpadmin;Password=0okm9ijn;",
|
||||
"Serilog": {
|
||||
"Using": [
|
||||
"Serilog.Sinks.Console",
|
||||
"Serilog.Sinks.File"
|
||||
],
|
||||
"MinimumLevel": "Debug",
|
||||
"WriteTo": [
|
||||
{
|
||||
"Name": "Debug",
|
||||
"Args": {
|
||||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName}) ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "Console",
|
||||
"Args": {
|
||||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName}) ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "File",
|
||||
"Args": {
|
||||
"path": "%workingDirectory% - Log/log-.txt",
|
||||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName}) ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}",
|
||||
"rollingInterval": "Hour"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Enrich": [
|
||||
"FromLogContext",
|
||||
"WithMachineName",
|
||||
"WithThreadId"
|
||||
],
|
||||
"Properties": {
|
||||
"Application": "Sample"
|
||||
}
|
||||
},
|
||||
"URLs": "https://localhost:7130;http://localhost:5126"
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
{
|
||||
"AllowedHosts": "*",
|
||||
"ApiExportPath": "\\\\mesfs.infineon.com\\EC_Metrology_Si",
|
||||
"ApiLoggingContentTypes": "application/json",
|
||||
"ApiLoggingPathPrefixes": "/api/inbound",
|
||||
"ApiUrl": "~/api",
|
||||
"ApiLogPath": "D:\\Metrology\\MetrologyAPILogs",
|
||||
"AttachmentPath": "\\\\mesfs.infineon.com\\EC_Metrology_Si\\MetrologyAttachments",
|
||||
"BuildNumber": "1",
|
||||
"Company": "Infineon Technologies Americas Corp.",
|
||||
"ConnectionString": "Data Source=messqlec1.infineon.com\\PROD1,53959;Integrated Security=True;Initial Catalog=Metrology;",
|
||||
"GitCommitSeven": "1234567",
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Log4netProvider": "Debug",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"InboundApiAllowedIPList": "",
|
||||
"IsDevelopment": false,
|
||||
"IsStaging": false,
|
||||
"MockRoot": "",
|
||||
"MonAResource": "OI_Metrology_Viewer_EC",
|
||||
"MonASite": "auc",
|
||||
"Oi2SqlConnectionString": "Data Source=messqlec1.infineon.com\\PROD1,53959;Initial Catalog=LSL2SQL;Persist Security Info=True;User ID=srpadmin;Password=0okm9ijn;",
|
||||
"Serilog": {
|
||||
"Using": [
|
||||
"Serilog.Sinks.Console",
|
||||
"Serilog.Sinks.File"
|
||||
],
|
||||
"MinimumLevel": "Information",
|
||||
"WriteTo": [
|
||||
{
|
||||
"Name": "Debug",
|
||||
"Args": {
|
||||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName}) ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "Console",
|
||||
"Args": {
|
||||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName}) ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "File",
|
||||
"Args": {
|
||||
"path": "%workingDirectory% - Log/log-.txt",
|
||||
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName}) ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}",
|
||||
"rollingInterval": "Hour"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Enrich": [
|
||||
"FromLogContext",
|
||||
"WithMachineName",
|
||||
"WithThreadId"
|
||||
],
|
||||
"Properties": {
|
||||
"Application": "Sample"
|
||||
}
|
||||
},
|
||||
"TableToPath": {
|
||||
"SPVRunHeader": "\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08ANLYSDIFAAST230\\Source",
|
||||
"TencorRunHeader": "\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08DDUPSFS6420\\Source",
|
||||
"SP1RunHeader": "\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08DDUPSP1TBI\\Source",
|
||||
"MercuryProbeRunHeader": "\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08RESIHGCV\\Source",
|
||||
"CDERunHeader": "\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08RESIMAPCDE\\Source",
|
||||
"SRPRunHeader": "\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08RESISRP2100\\Source",
|
||||
"BioRadRunHeader": "\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08THFTIRQS408M\\Source",
|
||||
"StratusBioRadRunHeader": "\\\\messa01ec.infineon.com\\apps\\Metrology\\MET08THFTIRSTRATUS\\Source"
|
||||
},
|
||||
"URLs": "http://localhost:5002;",
|
||||
"WorkingDirectoryName": "IFXApps"
|
||||
}
|
@ -1027,8 +1027,22 @@ function oiExportButtonRunInfo() {
|
||||
});
|
||||
}
|
||||
|
||||
function setInitialDateTimesRunInfo() {
|
||||
var startTime = new Date(Date.now() - 6 * 60 * 60 * 1000);//6 hours back from now
|
||||
function setInitialDateTimesRunInfo(milliseconds) {
|
||||
if (!milliseconds)
|
||||
{
|
||||
var startDate = $("#StartDate").igDatePicker("value");
|
||||
var startTime = $("#StartTime").igTimePicker("value");
|
||||
var endDate = $("#EndDate").igDatePicker("value");
|
||||
var endTime = $("#EndTime").igTimePicker("value");
|
||||
var startDateTime = new Date(
|
||||
startDate.getFullYear(), startDate.getMonth(), startDate.getDate(),
|
||||
startTime.getHours(), startTime.getMinutes(), startTime.getSeconds());
|
||||
var endDateTime = new Date(
|
||||
endDate.getFullYear(), endDate.getMonth(), endDate.getDate(),
|
||||
endTime.getHours(), endTime.getMinutes(), endTime.getSeconds());
|
||||
milliseconds = Math.abs(endDateTime - startDateTime);
|
||||
}
|
||||
var startTime = new Date(Date.now() - milliseconds);
|
||||
$("#StartDate").igDatePicker({
|
||||
dateInputFormat: "date",
|
||||
value: startTime,
|
||||
@ -1079,7 +1093,7 @@ function initRunInfo(apiUrl, initialToolTypeID, initialHeaderId, initialHeaderAt
|
||||
initialSelectedItems: [{ value: initialToolTypeID }]
|
||||
});
|
||||
});
|
||||
setInitialDateTimesRunInfo();
|
||||
setInitialDateTimesRunInfo(6 * 60 * 60 * 1000);
|
||||
$("#HeaderGrid").on("dblclick", "tr", loadDetailsRunInfo);
|
||||
$("#LoadHeadersButton").click(loadHeaderGridRunInfo);
|
||||
$("#GetDataButton").click(loadDetailsRunInfo);
|
||||
@ -1090,7 +1104,7 @@ function initRunInfo(apiUrl, initialToolTypeID, initialHeaderId, initialHeaderAt
|
||||
$("#OIExportButton").click(oiExportButtonRunInfo);
|
||||
setInterval(function () {
|
||||
if ($("#chkAutoRefresh").is(':checked')) {
|
||||
setInitialDateTimesRunInfo();
|
||||
setInitialDateTimesRunInfo(null);
|
||||
$("#LoadHeadersButton").click();
|
||||
}
|
||||
}, 180000);
|
||||
|
Reference in New Issue
Block a user