Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
4c2bef71ec | |||
b824c4ba36 | |||
1ad6246b8d | |||
478aecf2c8 | |||
fe3292133e | |||
e7b721fdb3 | |||
da3e839a48 | |||
6737ddfb59 | |||
3aed250488 | |||
f53ae8c1c8 | |||
6317c385f6 | |||
5c9f0d1aff |
@ -93,24 +93,27 @@ csharp_using_directive_placement = outside_namespace
|
|||||||
dotnet_code_quality_unused_parameters = all
|
dotnet_code_quality_unused_parameters = all
|
||||||
dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter
|
dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter
|
||||||
dotnet_code_quality.CAXXXX.api_surface = private, internal
|
dotnet_code_quality.CAXXXX.api_surface = private, internal
|
||||||
|
dotnet_diagnostic.CA1511.severity = none # CA1511: Use 'ArgumentException.ThrowIfNullOrEmpty' instead of explicitly throwing a new exception instance
|
||||||
dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array allocations
|
dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array allocations
|
||||||
dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available
|
dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available
|
||||||
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
||||||
dotnet_diagnostic.CA1860.severity = error # CA1860: Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance
|
dotnet_diagnostic.CA1860.severity = error # CA1860: Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance
|
||||||
|
dotnet_diagnostic.CA1862.severity = warning # CA1862: Prefer using 'string.Equals(string, StringComparison)' to perform a case-insensitive comparison, but keep in mind that this might cause subtle changes in behavior, so make sure to conduct thorough testing after applying the suggestion, or if culturally sensitive comparison is not required, consider using 'StringComparison.OrdinalIgnoreCase'
|
||||||
dotnet_diagnostic.CA1869.severity = none # CA1869: Avoid creating a new 'JsonSerializerOptions' instance for every serialization operation. Cache and reuse instances instead.
|
dotnet_diagnostic.CA1869.severity = none # CA1869: Avoid creating a new 'JsonSerializerOptions' instance for every serialization operation. Cache and reuse instances instead.
|
||||||
dotnet_diagnostic.CA2254.severity = none # CA2254: The logging message template should not vary between calls to 'LoggerExtensions.LogInformation(ILogger, string?, params object?[])'
|
dotnet_diagnostic.CA2254.severity = none # CA2254: The logging message template should not vary between calls to 'LoggerExtensions.LogInformation(ILogger, string?, params object?[])'
|
||||||
|
dotnet_diagnostic.CS8936.severity = error # Feature 'collection expressions' is not available in C# 10.0. Please use language version 12.0 or greater.
|
||||||
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
|
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
|
||||||
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2");
|
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2");
|
||||||
dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant.
|
dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant.
|
||||||
dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary
|
dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary
|
||||||
dotnet_diagnostic.IDE0028.severity = error # IDE0028: Collection initialization can be simplified
|
dotnet_diagnostic.IDE0028.severity = none # IDE0028: Collection initialization can be simplified
|
||||||
dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (IDE0031)
|
dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (IDE0031)
|
||||||
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
|
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
|
||||||
dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references (IDE0049)
|
dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references (IDE0049)
|
||||||
dotnet_diagnostic.IDE0060.severity = warning # IDE0060: Remove unused parameter
|
dotnet_diagnostic.IDE0060.severity = warning # IDE0060: Remove unused parameter
|
||||||
dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]csharp(IDE0290)
|
dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]csharp(IDE0290)
|
||||||
dotnet_diagnostic.IDE0300.severity = error # IDE0300: Collection initialization can be simplified
|
dotnet_diagnostic.IDE0300.severity = none # IDE0300: Collection initialization can be simplified
|
||||||
dotnet_diagnostic.IDE0301.severity = error #IDE0301: Collection initialization can be simplified
|
dotnet_diagnostic.IDE0301.severity = none #IDE0301: Collection initialization can be simplified
|
||||||
dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified
|
dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified
|
||||||
dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning
|
dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning
|
||||||
dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case
|
dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case
|
||||||
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -342,4 +342,7 @@ ASALocalRun/
|
|||||||
# Libman.json
|
# Libman.json
|
||||||
/wwwroot/lib/*
|
/wwwroot/lib/*
|
||||||
|
|
||||||
Tests/.kanbn/**/*
|
.kanbn
|
||||||
|
Tests/.kanbn
|
||||||
|
|
||||||
|
/Wafer-Counter/.vscode/.UserSecrets/secrets.json
|
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -10,7 +10,7 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"preLaunchTask": "buildServer",
|
"preLaunchTask": "buildServer",
|
||||||
// If you have changed target frameworks, make sure to update the program path.
|
// If you have changed target frameworks, make sure to update the program path.
|
||||||
"program": "${workspaceFolder}/Server/bin/Debug/net7.0/win-x64/OI.Metrology.Server.dll",
|
"program": "${workspaceFolder}/Server/bin/Debug/net8.0/win-x64/OI.Metrology.Server.dll",
|
||||||
"args": [],
|
"args": [],
|
||||||
"cwd": "${workspaceFolder}/Server",
|
"cwd": "${workspaceFolder}/Server",
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
|
18
.vscode/tasks.json
vendored
18
.vscode/tasks.json
vendored
@ -51,6 +51,18 @@
|
|||||||
],
|
],
|
||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "buildShared",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"build",
|
||||||
|
"${workspaceFolder}/Shared/OI.Metrology.Shared.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "publishServer",
|
"label": "publishServer",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
@ -205,12 +217,6 @@
|
|||||||
"endsPattern": "^.*Application started.*"
|
"endsPattern": "^.*Application started.*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "File-Folder-Helper AOT s M Self .Kanbn Tasks",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "& L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net7.0/win-x64/publish/File-Folder-Helper.exe s M '.kanbn/tasks'",
|
|
||||||
"problemMatcher": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
198
.vscode/thunder-tests/thunderActivity.json
vendored
198
.vscode/thunder-tests/thunderActivity.json
vendored
@ -1,198 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"_id": "646e3a9b-8fe9-4eb3-a532-f94270f752ac",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "http://localhost:5126/api/inbound/cde",
|
|
||||||
"url": "http://localhost:5126/api/inbound/cde",
|
|
||||||
"method": "POST",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-02-28T14:41:33.596Z",
|
|
||||||
"modified": "2023-02-28T15:19:48.924Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"SentToMetrology\": false,\n \"SentToSPC\": false,\n \"AutoOptimizeGain\": \"YES\",\n \"AutoProbeHeightSet\": \"NO\",\n \"Avg\": \"1824.053\",\n \"CellName\": \"CDE2\",\n \"DLRatio\": \"0.9680\",\n \"DataReject\": \"> 3.0Sigma\",\n \"Date\": \"02/27/2023 03:03:00 AM\",\n \"Engineer\": \"Engineer\",\n \"EquipId\": \"CDE2\",\n \"FileName\": \"0 C:\\\\4p_NT\\\\LSL8in.prj\\\\10PT_5mm.rcp\\\\3227D036.RsM 03:03 02/27/23\",\n \"FilePath\": \"\",\n \"Id\": \"-1\",\n \"Layer\": \"\",\n \"LotId\": \"LotID\",\n \"Op\": \"Operator\",\n \"PSN\": \"4628\",\n \"RDS\": \"577845\",\n \"Reactor\": \"20\",\n \"Recipe\": \"LSL8in \\\\ 10PT_5mm\",\n \"ResistivitySpec\": \"\",\n \"Run\": \"20-577845-4628\",\n \"SemiRadial\": \"1.55%\",\n \"StDev\": \"1.33%\",\n \"Temp\": \"19.2\",\n \"UniqueId\": \"21.16;1;95.0;1803.847;270.0_Point-1\",\n \"Zone\": null,\n \"Details\": [\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"21.16\",\n \"Pt\": \"1\",\n \"R\": \"95.0\",\n \"Rs\": \"1803.847\",\n \"T\": \"270.0\",\n \"UniqueId\": \"21.16;1;95.0;1803.847;270.0_Point-1\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"22.39\",\n \"Pt\": \"2\",\n \"R\": \"71.0\",\n \"Rs\": \"1858.424\",\n \"T\": \"270.0\",\n \"UniqueId\": \"22.39;2;71.0;1858.424;270.0_Point-2\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"21.07\",\n \"Pt\": \"3\",\n \"R\": \"47.0\",\n \"Rs\": \"1834.141\",\n \"T\": \"270.0\",\n \"UniqueId\": \"21.07;3;47.0;1834.141;270.0_Point-3\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"22.91\",\n \"Pt\": \"4\",\n \"R\": \"23.0\",\n \"Rs\": \"1803.609\",\n \"T\": \"270.0\",\n \"UniqueId\": \"22.91;4;23.0;1803.609;270.0_Point-4\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"21.94\",\n \"Pt\": \"5\",\n \"R\": \"0.0\",\n \"Rs\": \"1801.623\",\n \"T\": \"0.0\",\n \"UniqueId\": \"21.94;5;0.0;1801.623;0.0_Point-5\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"25.61\",\n \"Pt\": \"6\",\n \"R\": \"11.0\",\n \"Rs\": \"1803.997\",\n \"T\": \"90.0\",\n \"UniqueId\": \"25.61;6;11.0;1803.997;90.0_Point-6\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"24.73\",\n \"Pt\": \"7\",\n \"R\": \"35.0\",\n \"Rs\": \"1819.854\",\n \"T\": \"90.0\",\n \"UniqueId\": \"24.73;7;35.0;1819.854;90.0_Point-7\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"23.13\",\n \"Pt\": \"8\",\n \"R\": \"59.0\",\n \"Rs\": \"1855.965\",\n \"T\": \"90.0\",\n \"UniqueId\": \"23.13;8;59.0;1855.965;90.0_Point-8\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"23.44\",\n \"Pt\": \"9\",\n \"R\": \"83.0\",\n \"Rs\": \"1853.631\",\n \"T\": \"90.0\",\n \"UniqueId\": \"23.44;9;83.0;1853.631;90.0_Point-9\"\n },\n {\n \"HeaderUniqueId\": \"ResMap_20-577845-4628_20230227030723\",\n \"Merit\": \"21.75\",\n \"Pt\": \"10\",\n \"R\": \"95.0\",\n \"Rs\": \"1805.438\",\n \"T\": \"90.0\",\n \"UniqueId\": \"21.75;10;95.0;1805.438;90.0_Point-10\"\n }\n ]\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "7f723103-2cd6-4d09-b780-28afe34b3cd7",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "Delete",
|
|
||||||
"url": "https://tfs.intra.infineon.com/tfs/manufacturingit/APC%20Trend/_apis/test/runs/413094?api-version=6.0",
|
|
||||||
"method": "DELETE",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-03-02T15:43:07.175Z",
|
|
||||||
"modified": "2023-03-02T15:49:54.662Z",
|
|
||||||
"headers": [
|
|
||||||
{
|
|
||||||
"name": "Authorization",
|
|
||||||
"value": "Basic OmtzZHJveW9xMmJsdGI2N2xzN3NmZGhyYXlrY3l6cGlmemtkZjNndGs1bnl4ZnZmZHBqa2E="
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"name": "api-version",
|
|
||||||
"value": "6.0",
|
|
||||||
"isPath": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "2874b1ad-b298-48c1-8edb-6fd78ce7d2d9",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "Get",
|
|
||||||
"url": "https://tfs.intra.infineon.com/tfs/manufacturingit/Mesa_FI/_apis/test/runs?branchName=amaster&api-version=6.0",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-03-02T15:53:18.138Z",
|
|
||||||
"modified": "2023-03-02T16:12:27.892Z",
|
|
||||||
"headers": [
|
|
||||||
{
|
|
||||||
"name": "Authorization",
|
|
||||||
"value": "Basic OmtzZHJveW9xMmJsdGI2N2xzN3NmZGhyYXlrY3l6cGlmemtkZjNndGs1bnl4ZnZmZHBqa2E="
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"name": "branchName",
|
|
||||||
"value": "amaster",
|
|
||||||
"isPath": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "api-version",
|
|
||||||
"value": "6.0",
|
|
||||||
"isPath": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "ed8728f5-9afa-4e69-bca3-9c059a9a831b",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "Patch",
|
|
||||||
"url": "https://tfs.intra.infineon.com/tfs/manufacturingit/Mesa_FI/_apis/test/runs/410737?api-version=6.0",
|
|
||||||
"method": "PATCH",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-03-02T15:53:18.138Z",
|
|
||||||
"modified": "2023-03-02T15:58:09.720Z",
|
|
||||||
"headers": [
|
|
||||||
{
|
|
||||||
"name": "Authorization",
|
|
||||||
"value": "Basic OmtzZHJveW9xMmJsdGI2N2xzN3NmZGhyYXlrY3l6cGlmemtkZjNndGs1bnl4ZnZmZHBqa2E="
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"name": "api-version",
|
|
||||||
"value": "6.0",
|
|
||||||
"isPath": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"name\": \"MET08RESIHGCV\",\n \"comment\": \"40 passed\"\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "727621f0-63a3-4df2-9cfc-2610c532670d",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "OI-RDS",
|
|
||||||
"url": "http://messa020ec.ec.local/api/oiWizard/materials/rds/578941",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-03-02T18:20:01.561Z",
|
|
||||||
"modified": "2023-03-06T18:40:43.162Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"tests": [
|
|
||||||
{
|
|
||||||
"type": "json-query",
|
|
||||||
"custom": "json.rds.rdsLayers",
|
|
||||||
"action": "count",
|
|
||||||
"value": "1"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "4eafe190-e59e-4a3e-af76-356f62fde842",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "https://oi-metrology-viewer-prod.mes.infineon.com/api/tooltypes",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/tooltypes",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-03-07T17:20:54.044Z",
|
|
||||||
"modified": "2023-03-07T17:20:54.044Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "280ea9be-50e3-4813-8eb0-ffff739fe196",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetHeaders",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/export/headers",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-03-07T17:21:05.219Z",
|
|
||||||
"modified": "2023-03-07T19:35:11.146Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "6d8098aa-eb50-422e-b38d-32709d985e8e",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetHeaders-Dev",
|
|
||||||
"url": "http://mestsa008/api/export/headers",
|
|
||||||
"method": "POST",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-03-07T17:21:05.219Z",
|
|
||||||
"modified": "2023-03-08T18:18:04.054Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "61383ad6-ceb4-4d98-86c1-bf00c0e4204d",
|
|
||||||
"colId": "history",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetHeaders-localhost",
|
|
||||||
"url": "http://localhost:5126/api/export/headers",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 0,
|
|
||||||
"created": "2023-03-07T17:21:05.219Z",
|
|
||||||
"modified": "2023-03-08T19:05:54.744Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": -1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
}
|
|
||||||
]
|
|
30
.vscode/thunder-tests/thunderCollection.json
vendored
30
.vscode/thunder-tests/thunderCollection.json
vendored
@ -1,30 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"_id": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
|
||||||
"colName": "InfinityQS EC Only",
|
|
||||||
"created": "2023-02-27T20:07:11.913Z",
|
|
||||||
"sortNum": 10000,
|
|
||||||
"folders": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "fb96b15a-0cc4-48c7-8767-34f1242750e8",
|
|
||||||
"colName": "Export EC",
|
|
||||||
"created": "2023-03-08T17:16:29.420Z",
|
|
||||||
"sortNum": 20000,
|
|
||||||
"folders": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "5bfd00bc-b58c-49d3-9f27-5acadd060a51",
|
|
||||||
"colName": "Export IFX",
|
|
||||||
"created": "2023-03-08T17:31:19.468Z",
|
|
||||||
"sortNum": 30000,
|
|
||||||
"folders": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "9ebfb84d-fa73-4c00-a2e0-e9ec69a31a16",
|
|
||||||
"colName": "LocalHost",
|
|
||||||
"created": "2023-05-08T19:34:00.425Z",
|
|
||||||
"sortNum": 40000,
|
|
||||||
"folders": []
|
|
||||||
}
|
|
||||||
]
|
|
440
.vscode/thunder-tests/thunderclient.json
vendored
440
.vscode/thunder-tests/thunderclient.json
vendored
@ -1,440 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"_id": "acbbcc8d-3daf-43be-9081-f4be2f8a95b9",
|
|
||||||
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetCommandText",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/commandText/?sub_group_id=1677273357&process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 14:15:00",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 20000,
|
|
||||||
"created": "2023-02-27T20:07:11.921Z",
|
|
||||||
"modified": "2023-02-27T20:07:11.921Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"name": "sub_group_id",
|
|
||||||
"value": "1677273357",
|
|
||||||
"isPath": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "process",
|
|
||||||
"value": "61",
|
|
||||||
"isPath": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "job",
|
|
||||||
"value": "CDE5",
|
|
||||||
"isPath": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "part",
|
|
||||||
"value": "5012",
|
|
||||||
"isPath": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lot",
|
|
||||||
"value": "575908",
|
|
||||||
"isPath": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "date_time",
|
|
||||||
"value": "2023-02-24 14:15:00",
|
|
||||||
"isPath": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"tests": [
|
|
||||||
{
|
|
||||||
"type": "Content-Length",
|
|
||||||
"custom": "",
|
|
||||||
"action": ">",
|
|
||||||
"value": "100"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "29e56599-0093-481e-9386-9e6c1bb828a8",
|
|
||||||
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetCommandTextV2",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV2/1677273357/commandText/?process=61&job=CDE5&part=5012&lot=575908&date_time=2023-02-24 14:15:00",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 30000,
|
|
||||||
"created": "2023-02-27T20:07:11.923Z",
|
|
||||||
"modified": "2023-02-27T20:07:11.923Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"name": "process",
|
|
||||||
"value": "61",
|
|
||||||
"isPath": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "job",
|
|
||||||
"value": "CDE5",
|
|
||||||
"isPath": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "part",
|
|
||||||
"value": "5012",
|
|
||||||
"isPath": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lot",
|
|
||||||
"value": "575908",
|
|
||||||
"isPath": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "date_time",
|
|
||||||
"value": "2023-02-24 14:15:00",
|
|
||||||
"isPath": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"tests": [
|
|
||||||
{
|
|
||||||
"type": "Content-Length",
|
|
||||||
"custom": "",
|
|
||||||
"action": ">",
|
|
||||||
"value": "100"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "2810520f-7a8b-4282-a593-92da3043e491",
|
|
||||||
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetData",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/1677273357/data",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 40000,
|
|
||||||
"created": "2023-02-27T20:07:11.924Z",
|
|
||||||
"modified": "2023-02-27T20:07:11.924Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"tests": [
|
|
||||||
{
|
|
||||||
"type": "json-query",
|
|
||||||
"custom": "json.",
|
|
||||||
"action": "count",
|
|
||||||
"value": "2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "8628d1b1-cedb-45e3-9958-0ba4e233a2ac",
|
|
||||||
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetDataV2",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV2/1677273357/data",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 41250,
|
|
||||||
"created": "2023-02-27T20:07:11.925Z",
|
|
||||||
"modified": "2023-02-27T20:07:11.925Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"tests": [
|
|
||||||
{
|
|
||||||
"type": "json-query",
|
|
||||||
"custom": "json.",
|
|
||||||
"action": "count",
|
|
||||||
"value": "2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "55c863ce-b828-4cdb-8a72-26da369c44ee",
|
|
||||||
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetDescriptors",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/1677273357/descriptors",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 41875,
|
|
||||||
"created": "2023-02-27T20:07:11.926Z",
|
|
||||||
"modified": "2023-02-27T20:07:11.926Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"tests": [
|
|
||||||
{
|
|
||||||
"type": "json-query",
|
|
||||||
"custom": "json.",
|
|
||||||
"action": "count",
|
|
||||||
"value": "2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "b25fade2-44b5-4897-94a6-e31062c27e58",
|
|
||||||
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetDescriptorsV2",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV2/1677273357/descriptors",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 42187.5,
|
|
||||||
"created": "2023-02-27T20:07:11.927Z",
|
|
||||||
"modified": "2023-02-27T20:07:11.927Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"tests": [
|
|
||||||
{
|
|
||||||
"type": "json-query",
|
|
||||||
"custom": "json.",
|
|
||||||
"action": "count",
|
|
||||||
"value": "2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "f24e826e-578c-45fe-a80a-ce31f0a13dfc",
|
|
||||||
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetEvents",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/1677273357/events",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 42500,
|
|
||||||
"created": "2023-02-27T20:07:11.928Z",
|
|
||||||
"modified": "2023-02-27T20:07:11.928Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"tests": [
|
|
||||||
{
|
|
||||||
"type": "json-query",
|
|
||||||
"custom": "json.",
|
|
||||||
"action": "count",
|
|
||||||
"value": "2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "81118bd8-5919-4501-aa34-eaa2f4baeabf",
|
|
||||||
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetEventsV2",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV2/1677273357/events",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 43750,
|
|
||||||
"created": "2023-02-27T20:07:11.929Z",
|
|
||||||
"modified": "2023-02-27T20:07:11.929Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"tests": [
|
|
||||||
{
|
|
||||||
"type": "json-query",
|
|
||||||
"custom": "json.",
|
|
||||||
"action": "count",
|
|
||||||
"value": "2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "26ded486-79ad-4fc8-b526-98187b8fde91",
|
|
||||||
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetHeader",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQS/1677273357/header",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 45000,
|
|
||||||
"created": "2023-02-27T20:07:11.930Z",
|
|
||||||
"modified": "2023-02-27T20:07:11.930Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"tests": [
|
|
||||||
{
|
|
||||||
"type": "json-query",
|
|
||||||
"custom": "json.",
|
|
||||||
"action": "count",
|
|
||||||
"value": "2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "b8ee8160-6ca2-4276-be91-d1f6f2dd90dc",
|
|
||||||
"colId": "3743bec1-1f73-492a-9b9f-5889f239b5fc",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetHeaderV2",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/InfinityQSV2/1677273357/header",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 55000,
|
|
||||||
"created": "2023-02-27T20:07:11.931Z",
|
|
||||||
"modified": "2023-02-27T20:07:11.931Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"tests": [
|
|
||||||
{
|
|
||||||
"type": "json-query",
|
|
||||||
"custom": "json.",
|
|
||||||
"action": "count",
|
|
||||||
"value": "2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "0aafd6ed-26a6-4a07-825c-8c1fee603b6a",
|
|
||||||
"colId": "fb96b15a-0cc4-48c7-8767-34f1242750e8",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetHeaders",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/export/headers",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 10000,
|
|
||||||
"created": "2023-03-08T17:16:56.561Z",
|
|
||||||
"modified": "2023-03-08T17:17:39.783Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "af298148-482d-4822-80ba-1abb86e1f9c2",
|
|
||||||
"colId": "fb96b15a-0cc4-48c7-8767-34f1242750e8",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetExport",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/export/export",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 15000,
|
|
||||||
"created": "2023-03-08T17:17:47.597Z",
|
|
||||||
"modified": "2023-03-08T17:19:13.764Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "a787c81d-381e-451d-9d96-e607f06efdaf",
|
|
||||||
"colId": "fb96b15a-0cc4-48c7-8767-34f1242750e8",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetLogistics",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/export/logistics",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 30000,
|
|
||||||
"created": "2023-03-08T17:18:38.179Z",
|
|
||||||
"modified": "2023-03-08T17:19:21.874Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "7e19c7d4-2d93-46e1-88fd-ba5312885713",
|
|
||||||
"colId": "fb96b15a-0cc4-48c7-8767-34f1242750e8",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetProcessDataStandardFormat",
|
|
||||||
"url": "https://oi-metrology-viewer-prod.mes.infineon.com/api/export/pdsf",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 40000,
|
|
||||||
"created": "2023-03-08T17:18:49.042Z",
|
|
||||||
"modified": "2023-03-08T17:19:27.119Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4698\",\n \"RDS\": \"578824\",\n \"Reactor\": \"62\",\n \"ID\": 1678296039\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "25eb571f-064c-4b3f-8c20-666c66c1b123",
|
|
||||||
"colId": "5bfd00bc-b58c-49d3-9f27-5acadd060a51",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetHeaders",
|
|
||||||
"url": "https://messa017.infineon.com/api/export/headers",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 10000,
|
|
||||||
"created": "2023-03-08T17:31:19.471Z",
|
|
||||||
"modified": "2023-04-07T15:10:34.584Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4830\",\n \"Reactor\": \"41\",\n \"RDS\": \"584740\",\n \"ID\": 1680657537,\n \"Path\": \"\\\\\\\\messdv002.na.infineon.com\\\\Candela\\\\Archive\\\\API\\\\2023_Week_14\\\\-4830\\\\-41\\\\-584740\\\\-1680657537\\\\638162291037289598.json\"\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "f5feb8e3-0e82-4b47-a15e-97ef069a1539",
|
|
||||||
"colId": "5bfd00bc-b58c-49d3-9f27-5acadd060a51",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetExport",
|
|
||||||
"url": "https://messa017.infineon.com/api/export/export",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 15000,
|
|
||||||
"created": "2023-03-08T17:31:19.472Z",
|
|
||||||
"modified": "2023-04-07T15:10:45.402Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4830\",\n \"Reactor\": \"41\",\n \"RDS\": \"584740\",\n \"ID\": 1680657537,\n \"Path\": \"\\\\\\\\messdv002.na.infineon.com\\\\Candela\\\\Archive\\\\API\\\\2023_Week_14\\\\-4830\\\\-41\\\\-584740\\\\-1680657537\\\\638162291037289598.json\"\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "7fddba99-14a2-4c6a-bf4a-4b94391929cf",
|
|
||||||
"colId": "5bfd00bc-b58c-49d3-9f27-5acadd060a51",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetLogistics",
|
|
||||||
"url": "https://messa017.infineon.com/api/export/logistics",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 30000,
|
|
||||||
"created": "2023-03-08T17:31:19.473Z",
|
|
||||||
"modified": "2023-04-07T15:10:49.000Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4830\",\n \"Reactor\": \"41\",\n \"RDS\": \"584740\",\n \"ID\": 1680657537,\n \"Path\": \"\\\\\\\\messdv002.na.infineon.com\\\\Candela\\\\Archive\\\\API\\\\2023_Week_14\\\\-4830\\\\-41\\\\-584740\\\\-1680657537\\\\638162291037289598.json\"\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "07d5b0c3-684a-4cad-8a48-b164e8da87b0",
|
|
||||||
"colId": "5bfd00bc-b58c-49d3-9f27-5acadd060a51",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "GetProcessDataStandardFormat",
|
|
||||||
"url": "https://messa017.infineon.com/api/export/pdsf",
|
|
||||||
"method": "GET",
|
|
||||||
"sortNum": 40000,
|
|
||||||
"created": "2023-03-08T17:31:19.474Z",
|
|
||||||
"modified": "2023-04-07T15:10:53.080Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"PSN\": \"4830\",\n \"Reactor\": \"41\",\n \"RDS\": \"584740\",\n \"ID\": 1680657537,\n \"Path\": \"\\\\\\\\messdv002.na.infineon.com\\\\Candela\\\\Archive\\\\API\\\\2023_Week_14\\\\-4830\\\\-41\\\\-584740\\\\-1680657537\\\\638162291037289598.json\"\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "524e5261-69eb-4888-8818-608cde1ce506",
|
|
||||||
"colId": "9ebfb84d-fa73-4c00-a2e0-e9ec69a31a16",
|
|
||||||
"containerId": "",
|
|
||||||
"name": "Inbound-SRP",
|
|
||||||
"url": "http://localhost:5126/api/inbound/SRP",
|
|
||||||
"method": "POST",
|
|
||||||
"sortNum": 10000,
|
|
||||||
"created": "2023-05-08T19:34:14.843Z",
|
|
||||||
"modified": "2023-05-08T19:50:20.646Z",
|
|
||||||
"headers": [],
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "json",
|
|
||||||
"raw": "{\n \"SentToMetrology\": false,\n \"SentToSPC\": false,\n \"Id\": 0,\n \"Batch\": \"BIORAD#2\",\n \"Cassette\": \"BIORAD2\",\n \"CellName\": \"BIORAD2\",\n \"Date\": \"05/08/2023 12:23:23 AM\",\n \"FilePath\": \"\",\n \"Layer\": \"1\",\n \"MeanThickness\": \"21.8224\",\n \"Op\": \"C\",\n \"PSN\": \"5010\",\n \"PassFail\": \"PASS\",\n \"RDS\": \"588252\",\n \"RVThickness\": \"2.0559\",\n \"Reactor\": \"23\",\n \"Recipe\": \"PROD_8inch\",\n \"StdDev\": \"0.1483\",\n \"Title\": \"Bio-RadQS400MEPI\",\n \"UniqueId\": \"Bio-RadQS400MEPI_23-588252-5010.1_202305080023237034_5.4661928_Point-1\",\n \"Wafer\": \"23-588252-5010.1\",\n \"Zone\": \"-\",\n \"Details\": []\n}",
|
|
||||||
"form": []
|
|
||||||
},
|
|
||||||
"tests": []
|
|
||||||
}
|
|
||||||
]
|
|
@ -29,6 +29,23 @@ public class AppSettings
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void PreVerify(IConfigurationRoot configurationRoot, AppSettings? appSettings)
|
||||||
|
{
|
||||||
|
if (appSettings?.ApiLoggingContentTypes is null)
|
||||||
|
{
|
||||||
|
List<string> paths = [];
|
||||||
|
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;
|
||||||
|
paths.Add(physicalFileProvider.Root);
|
||||||
|
}
|
||||||
|
throw new NotSupportedException($"Not found!{Environment.NewLine}{string.Join(Environment.NewLine, paths.Distinct())}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static Models.AppSettings Get(AppSettings? appSettings)
|
private static Models.AppSettings Get(AppSettings? appSettings)
|
||||||
{
|
{
|
||||||
Models.AppSettings result;
|
Models.AppSettings result;
|
||||||
@ -73,20 +90,7 @@ public class AppSettings
|
|||||||
#pragma warning disable IL3050, IL2026
|
#pragma warning disable IL3050, IL2026
|
||||||
AppSettings? appSettings = configurationRoot.Get<AppSettings>();
|
AppSettings? appSettings = configurationRoot.Get<AppSettings>();
|
||||||
#pragma warning restore IL3050, IL2026
|
#pragma warning restore IL3050, IL2026
|
||||||
if (appSettings?.ApiLoggingContentTypes is null)
|
PreVerify(configurationRoot, appSettings);
|
||||||
{
|
|
||||||
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);
|
result = Get(appSettings);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -26,14 +26,14 @@
|
|||||||
<Content Remove="compilerconfig.json" />
|
<Content Remove="compilerconfig.json" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Dapper" Version="2.1.4" />
|
<PackageReference Include="Dapper" Version="2.1.24" />
|
||||||
<PackageReference Include="EntityFramework" Version="6.4.4" />
|
<PackageReference Include="EntityFramework" Version="6.4.4" />
|
||||||
<PackageReference Include="jQuery" Version="3.7.1" />
|
<PackageReference Include="jQuery" Version="3.7.1" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
|
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
# Visual Studio Version 16
|
# Visual Studio Version 16
|
||||||
VisualStudioVersion = 16.0.30114.105
|
VisualStudioVersion = 16.0.30114.105
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Archive", "Archive\OI.Metrology.Archive.csproj", "{D02BA20E-0ACE-4D1C-9132-90773AF3CF5A}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared", "Shared\OI.Metrology.Shared.csproj", "{A807EAE3-7DCB-4E5E-BE54-0D7410D18B3E}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared", "Shared\OI.Metrology.Shared.csproj", "{A807EAE3-7DCB-4E5E-BE54-0D7410D18B3E}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\OI.Metrology.Server.csproj", "{25C86DF8-EC1A-4D4B-AD4E-6561174824B9}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\OI.Metrology.Server.csproj", "{25C86DF8-EC1A-4D4B-AD4E-6561174824B9}"
|
||||||
|
2
Server/.vscode/launch.json
vendored
2
Server/.vscode/launch.json
vendored
@ -10,7 +10,7 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"preLaunchTask": "build",
|
"preLaunchTask": "build",
|
||||||
// If you have changed target frameworks, make sure to update the program path.
|
// If you have changed target frameworks, make sure to update the program path.
|
||||||
"program": "${workspaceFolder}/bin/Debug/net7.0/win-x64/OI.Metrology.Server.dll",
|
"program": "${workspaceFolder}/bin/Debug/net8.0/OI.Metrology.Server.dll",
|
||||||
"args": [],
|
"args": [],
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
|
5
Server/.vscode/settings.json
vendored
5
Server/.vscode/settings.json
vendored
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"cSpell.words": [
|
||||||
|
"Infineon"
|
||||||
|
]
|
||||||
|
}
|
99
Server/.vscode/tasks.json
vendored
99
Server/.vscode/tasks.json
vendored
@ -13,6 +13,69 @@
|
|||||||
],
|
],
|
||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "buildTests",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"build",
|
||||||
|
"${workspaceFolder}/../Tests/OI.Metrology.Tests.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "testDebug",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"test",
|
||||||
|
"${workspaceFolder}/../Tests/OI.Metrology.Tests.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "testRelease",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"test",
|
||||||
|
"${workspaceFolder}/../Tests/OI.Metrology.Tests.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary",
|
||||||
|
"-c",
|
||||||
|
"Release"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Format",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"format",
|
||||||
|
"--report",
|
||||||
|
".vscode",
|
||||||
|
"--verbosity",
|
||||||
|
"detailed",
|
||||||
|
"--severity",
|
||||||
|
"warn"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Format-Whitespace",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"format",
|
||||||
|
"whitespace"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "publish",
|
"label": "publish",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
@ -21,7 +84,32 @@
|
|||||||
"publish",
|
"publish",
|
||||||
"${workspaceFolder}/OI.Metrology.Server.csproj",
|
"${workspaceFolder}/OI.Metrology.Server.csproj",
|
||||||
"/property:GenerateFullPaths=true",
|
"/property:GenerateFullPaths=true",
|
||||||
"/consoleloggerparameters:NoSummary"
|
"/consoleloggerparameters:NoSummary",
|
||||||
|
"--configuration",
|
||||||
|
"Release",
|
||||||
|
"--runtime",
|
||||||
|
"win-x64",
|
||||||
|
"--self-contained",
|
||||||
|
"-o",
|
||||||
|
"D:/web-sites/OI-Metrology/hh-3498d1da-_______-OI-Metrology-Release/Server"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Publish AOT",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"${workspaceFolder}/OI.Metrology.Server.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary",
|
||||||
|
"--configuration",
|
||||||
|
"Release",
|
||||||
|
"--runtime",
|
||||||
|
"win-x64",
|
||||||
|
"-p:PublishAot=true",
|
||||||
|
"/property:GenerateFullPaths=true"
|
||||||
],
|
],
|
||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
@ -72,9 +160,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "File-Folder-Helper AOT s V Repositories",
|
"label": "File-Folder-Helper AOT s X Server",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "& L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net7.0/win-x64/publish/File-Folder-Helper.exe s V Repositories",
|
"command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe",
|
||||||
|
"args": [
|
||||||
|
"s",
|
||||||
|
"X",
|
||||||
|
"L:/DevOps/Mesa_FI/OI-Metrology Day-Helper-2024-01-08 L:/DevOps/Mesa_FI/OI-Metrology/Server"
|
||||||
|
],
|
||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -38,4 +38,10 @@ public class AwaitingDispoController : Controller, IAwaitingDispoController<IAct
|
|||||||
else
|
else
|
||||||
return StatusCode(444);
|
return StatusCode(444);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// this endpoint is used to clear the ReviewDate column, causing the header to show up again
|
||||||
|
[HttpGet("/api/awaitingdispo/{toolTypeId}/header-attachment-id")]
|
||||||
|
public IActionResult GetHeaderAttachmentID(int toolTypeId, [FromQuery] long headerid) =>
|
||||||
|
Content(_MetrologyRepository.GetHeaderAttachmentID(toolTypeId, headerid).ToString());
|
||||||
|
|
||||||
}
|
}
|
@ -4,6 +4,7 @@ namespace OI.Metrology.Server.ApiControllers;
|
|||||||
|
|
||||||
using OI.Metrology.Shared.DataModels;
|
using OI.Metrology.Shared.DataModels;
|
||||||
using OI.Metrology.Shared.Models.Stateless;
|
using OI.Metrology.Shared.Models.Stateless;
|
||||||
|
using System.Data;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
@ -11,9 +12,13 @@ public class ExportController : Controller, IExportController<IActionResult>
|
|||||||
{
|
{
|
||||||
|
|
||||||
private readonly IExportRepository _ExportRepository;
|
private readonly IExportRepository _ExportRepository;
|
||||||
|
private readonly IMetrologyRepository _MetrologyRepository;
|
||||||
|
|
||||||
public ExportController(IExportRepository exportRepository) =>
|
public ExportController(IExportRepository exportRepository, IMetrologyRepository metrologyRepository)
|
||||||
|
{
|
||||||
_ExportRepository = exportRepository;
|
_ExportRepository = exportRepository;
|
||||||
|
_MetrologyRepository = metrologyRepository;
|
||||||
|
}
|
||||||
|
|
||||||
private static string? GetJson(Stream stream)
|
private static string? GetJson(Stream stream)
|
||||||
{
|
{
|
||||||
@ -79,4 +84,21 @@ public class ExportController : Controller, IExportController<IActionResult>
|
|||||||
public IActionResult PostProcessDataStandardFormat() =>
|
public IActionResult PostProcessDataStandardFormat() =>
|
||||||
Content(_ExportRepository.GetProcessDataStandardFormat(GetHeaderCommon(Request.Body)));
|
Content(_ExportRepository.GetProcessDataStandardFormat(GetHeaderCommon(Request.Body)));
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
[Route("{toolTypeId}/export")]
|
||||||
|
public IActionResult GetExportData(int toolTypeId, [FromQuery] string? datebegin, [FromQuery] string? dateend)
|
||||||
|
{
|
||||||
|
Result<DataTable> r = _ExportRepository.GetExportData(_MetrologyRepository, toolTypeId, datebegin, dateend);
|
||||||
|
string json = Newtonsoft.Json.JsonConvert.SerializeObject(r);
|
||||||
|
return Content(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
[Route("{toolTypeId}/csv")]
|
||||||
|
public IActionResult GetCSVExport(int toolTypeId, [FromQuery] string? datebegin, [FromQuery] string? dateend, [FromQuery] string? filename)
|
||||||
|
{
|
||||||
|
string r = _ExportRepository.GetCSVExport(_MetrologyRepository, toolTypeId, datebegin, dateend);
|
||||||
|
return Content(r);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
36
Server/ApiControllers/FileShareController.cs
Normal file
36
Server/ApiControllers/FileShareController.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using OI.Metrology.Shared.Models.Stateless;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Server.ApiControllers;
|
||||||
|
|
||||||
|
[Route("api/v1/file-share")]
|
||||||
|
public class FileShareController : Controller, IFileShareController<IResult>
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly IFileShareRepository _FileShareRepository;
|
||||||
|
|
||||||
|
public FileShareController(IFileShareRepository fileShareRepository) =>
|
||||||
|
_FileShareRepository = fileShareRepository;
|
||||||
|
|
||||||
|
[HttpGet("copy-file")]
|
||||||
|
public IResult CopyFile(string from, string to)
|
||||||
|
{
|
||||||
|
_FileShareRepository.CopyFile(from, to);
|
||||||
|
return Results.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet("move-file")]
|
||||||
|
public IResult MoveFile(string from, string to)
|
||||||
|
{
|
||||||
|
_FileShareRepository.MoveFile(from, to);
|
||||||
|
return Results.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet("file-write")]
|
||||||
|
public IResult FileWrite(string path, string contents)
|
||||||
|
{
|
||||||
|
_FileShareRepository.FileWrite(path, contents);
|
||||||
|
return Results.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -4,6 +4,7 @@ using OI.Metrology.Shared.Models;
|
|||||||
using OI.Metrology.Shared.Models.Stateless;
|
using OI.Metrology.Shared.Models.Stateless;
|
||||||
using OI.Metrology.Shared.Services;
|
using OI.Metrology.Shared.Services;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace OI.Metrology.Server.ApiControllers;
|
namespace OI.Metrology.Server.ApiControllers;
|
||||||
|
|
||||||
@ -29,22 +30,9 @@ public partial class InboundController : ControllerBase, IInboundController<IAct
|
|||||||
_MetrologyRepository = metrologyRepository;
|
_MetrologyRepository = metrologyRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string? GetJson(Stream stream)
|
|
||||||
{
|
|
||||||
string? result;
|
|
||||||
if (!stream.CanRead)
|
|
||||||
result = null;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Task<string> task = new StreamReader(stream).ReadToEndAsync();
|
|
||||||
result = task.Result;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("{tooltype}")]
|
[Route("{tooltype}")]
|
||||||
public IActionResult Post(string tooltype)
|
public IActionResult Post(string tooltype, JsonElement? jsonElement)
|
||||||
{
|
{
|
||||||
IPAddress? remoteIP = HttpContext.Connection.RemoteIpAddress;
|
IPAddress? remoteIP = HttpContext.Connection.RemoteIpAddress;
|
||||||
if (!_InboundRepository.IsIPAddressAllowed(_AppSettings.InboundApiAllowedIPList, remoteIP))
|
if (!_InboundRepository.IsIPAddressAllowed(_AppSettings.InboundApiAllowedIPList, remoteIP))
|
||||||
@ -54,8 +42,7 @@ public partial class InboundController : ControllerBase, IInboundController<IAct
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string? json = GetJson(Request.Body);
|
DataResponse dataResponse = _InboundRepository.Data(_MetrologyRepository, _InboundDataService, tooltype, jsonElement);
|
||||||
DataResponse dataResponse = _InboundRepository.Data(_MetrologyRepository, _InboundDataService, tooltype, json);
|
|
||||||
if (dataResponse.Errors.Count == 0)
|
if (dataResponse.Errors.Count == 0)
|
||||||
return Ok(dataResponse);
|
return Ok(dataResponse);
|
||||||
else
|
else
|
||||||
@ -65,7 +52,7 @@ public partial class InboundController : ControllerBase, IInboundController<IAct
|
|||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("{tooltype}/attachment")]
|
[Route("{tooltype}/attachment")]
|
||||||
public IActionResult AttachFile(string tooltype, [FromQuery] long headerid, [FromQuery] string datauniqueid = "")
|
public IActionResult AttachFile(string tooltype, Attachment? attachment)
|
||||||
{
|
{
|
||||||
IPAddress? remoteIP = HttpContext.Connection.RemoteIpAddress;
|
IPAddress? remoteIP = HttpContext.Connection.RemoteIpAddress;
|
||||||
if (!_InboundRepository.IsIPAddressAllowed(_AppSettings.InboundApiAllowedIPList, remoteIP))
|
if (!_InboundRepository.IsIPAddressAllowed(_AppSettings.InboundApiAllowedIPList, remoteIP))
|
||||||
@ -75,16 +62,8 @@ public partial class InboundController : ControllerBase, IInboundController<IAct
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Request.Form is null)
|
_InboundRepository.AttachFile(_MetrologyRepository, _AttachmentsService, tooltype, attachment);
|
||||||
return BadRequest($"Invalid form");
|
return Ok();
|
||||||
if (Request.Form.Files.Count != 1)
|
|
||||||
return BadRequest($"Invalid file count");
|
|
||||||
IFormFile formFile = Request.Form.Files[0];
|
|
||||||
string? message = _InboundRepository.AttachFile(_MetrologyRepository, _AttachmentsService, tooltype, headerid, datauniqueid, formFile.FileName, formFile);
|
|
||||||
if (message is null)
|
|
||||||
return Ok();
|
|
||||||
else
|
|
||||||
return BadRequest(message);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
86
Server/ApiControllers/InfinityQSV4Controller.cs
Normal file
86
Server/ApiControllers/InfinityQSV4Controller.cs
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
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/v4/InfinityQS")]
|
||||||
|
public class InfinityQSV4Controller : Controller, IInfinityQSV4Controller<IActionResult>
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly IInfinityQSV4Repository _InfinityQSRepositoryV4;
|
||||||
|
|
||||||
|
public InfinityQSV4Controller(IInfinityQSV4Repository InfinityQSRepositoryV4) => _InfinityQSRepositoryV4 = InfinityQSRepositoryV4;
|
||||||
|
|
||||||
|
[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 = _InfinityQSRepositoryV4.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<InfinityQSV4[]> result = _InfinityQSRepositoryV4.GetData(sub_group_id);
|
||||||
|
string json = JsonSerializer.Serialize(result, ResultInfinityQSV4SourceGenerationContext.Default.ResultInfinityQSV4Array);
|
||||||
|
return Content(json, "application/json", System.Text.Encoding.UTF8);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet("{sub_group_id}/descriptors")]
|
||||||
|
public IActionResult GetDescriptors(string sub_group_id)
|
||||||
|
{
|
||||||
|
Result<InfinityQSDescriptorV4[]> result = _InfinityQSRepositoryV4.GetDescriptors(sub_group_id);
|
||||||
|
string json = JsonSerializer.Serialize(result, ResultInfinityQSDescriptorV4SourceGenerationContext.Default.ResultInfinityQSDescriptorV4Array);
|
||||||
|
return Content(json, "application/json", System.Text.Encoding.UTF8);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet("{sub_group_id}/header")]
|
||||||
|
public IActionResult GetHeader(string sub_group_id)
|
||||||
|
{
|
||||||
|
Result<InfinityQSV4[]> result = _InfinityQSRepositoryV4.GetHeader(sub_group_id);
|
||||||
|
string json = JsonSerializer.Serialize(result, ResultInfinityQSV4SourceGenerationContext.Default.ResultInfinityQSV4Array);
|
||||||
|
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 = _InfinityQSRepositoryV4.GetProductDataAverageSumOfDefectsProcessMeanProcessSigma(process, recipe);
|
||||||
|
return Content(result, "application/json", System.Text.Encoding.UTF8);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet("epi-pro-temp-verification")]
|
||||||
|
public IActionResult GetEpiProTempVerification(int[] night)
|
||||||
|
{
|
||||||
|
string result = _InfinityQSRepositoryV4.GetEpiProTempVerification(night);
|
||||||
|
return Content(result, "text/html", System.Text.Encoding.UTF8);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet("epi-pro-temp-verification-rows")]
|
||||||
|
public IActionResult GetEpiProTempVerificationRows(int[] night)
|
||||||
|
{
|
||||||
|
List<string[]> results = _InfinityQSRepositoryV4.GetEpiProTempVerificationRows(night);
|
||||||
|
string json = JsonSerializer.Serialize(results);
|
||||||
|
return Content(json, "application/json", System.Text.Encoding.UTF8);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet("reactors")]
|
||||||
|
public IActionResult GetReactors() =>
|
||||||
|
Json(_InfinityQSRepositoryV4.GetReactors());
|
||||||
|
|
||||||
|
[HttpGet("{rds}/run-data-sheet")]
|
||||||
|
public IActionResult GetRunDataSheet(string rds) =>
|
||||||
|
Content(_InfinityQSRepositoryV4.GetRunDataSheet(rds));
|
||||||
|
|
||||||
|
[HttpGet("{part}/production-specification")]
|
||||||
|
public IActionResult GetProductionSpecification(string part) =>
|
||||||
|
Content(_InfinityQSRepositoryV4.GetProductionSpecification(part));
|
||||||
|
|
||||||
|
[HttpGet("{process}/last-group-id-with-value")]
|
||||||
|
public IActionResult GetLastGroupIdWithValue(string process, string? part, int? test) =>
|
||||||
|
Content(_InfinityQSRepositoryV4.GetLastGroupIdWithValue(process, part, test));
|
||||||
|
|
||||||
|
}
|
@ -1,24 +0,0 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using OI.Metrology.Shared.Models.Stateless;
|
|
||||||
using System.Text.Json;
|
|
||||||
|
|
||||||
namespace OI.Metrology.Server.ApiControllers;
|
|
||||||
|
|
||||||
[Route("api/[controller]")]
|
|
||||||
public class ReactorsController : Controller, IReactorsController<IActionResult>
|
|
||||||
{
|
|
||||||
|
|
||||||
private readonly IReactorsRepository _ReactorsRepository;
|
|
||||||
|
|
||||||
public ReactorsController(IReactorsRepository reactorsRepository) =>
|
|
||||||
_ReactorsRepository = reactorsRepository;
|
|
||||||
|
|
||||||
[HttpGet("{even}")]
|
|
||||||
public IActionResult Get(bool even) =>
|
|
||||||
Json(even ? _ReactorsRepository.EvenReactors() : _ReactorsRepository.OddReactors(), new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
|
||||||
|
|
||||||
[HttpPost()]
|
|
||||||
public IActionResult Post(Shared.DataModels.WorkMaterialOut workMaterialOut) =>
|
|
||||||
Ok(_ReactorsRepository.GetKey(workMaterialOut, save: true));
|
|
||||||
|
|
||||||
}
|
|
@ -40,7 +40,7 @@ public class ToolTypesController : Controller, IToolTypesController<IActionResul
|
|||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Route("{id}/headers")]
|
[Route("{id}/headers")]
|
||||||
public IActionResult GetHeaders(int id, [FromQuery] DateTime? datebegin, [FromQuery] DateTime? dateend, [FromQuery] int? page, [FromQuery] int? pagesize, [FromQuery] long? headerid)
|
public IActionResult GetHeaders(int id, [FromQuery] string? datebegin, [FromQuery] string? dateend, [FromQuery] int? page, [FromQuery] int? pagesize, [FromQuery] long? headerid)
|
||||||
{
|
{
|
||||||
Shared.DataModels.Result<DataTable> r = _ToolTypesRepository.GetHeaders(_MetrologyRepo, id, datebegin, dateend, page, pagesize, headerid);
|
Shared.DataModels.Result<DataTable> r = _ToolTypesRepository.GetHeaders(_MetrologyRepo, id, datebegin, dateend, page, pagesize, headerid);
|
||||||
string json = JsonConvert.SerializeObject(r);
|
string json = JsonConvert.SerializeObject(r);
|
||||||
@ -66,23 +66,6 @@ public class ToolTypesController : Controller, IToolTypesController<IActionResul
|
|||||||
return Content(json);
|
return Content(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("{toolTypeId}/export")]
|
|
||||||
public IActionResult GetExportData(int toolTypeId, [FromQuery] DateTime? datebegin, [FromQuery] DateTime? dateend)
|
|
||||||
{
|
|
||||||
Shared.DataModels.Result<DataTable> r = _ToolTypesRepository.GetExportData(_MetrologyRepo, toolTypeId, datebegin, dateend);
|
|
||||||
string json = JsonConvert.SerializeObject(r);
|
|
||||||
return Content(json);
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("{toolTypeId}/csv")]
|
|
||||||
public IActionResult GetCSVExport(int toolTypeId, [FromQuery] DateTime? datebegin, [FromQuery] DateTime? dateend, [FromQuery] string? filename)
|
|
||||||
{
|
|
||||||
byte[] r = _ToolTypesRepository.GetCSVExport(_MetrologyRepo, toolTypeId, datebegin, dateend);
|
|
||||||
return File(r, "application/octet-stream", filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Route("{toolTypeId}/{tabletype}/files/{attachmentId}/{filename}")]
|
[Route("{toolTypeId}/{tabletype}/files/{attachmentId}/{filename}")]
|
||||||
public IActionResult GetAttachment(int toolTypeId, string tabletype, string attachmentId, string filename)
|
public IActionResult GetAttachment(int toolTypeId, string tabletype, string attachmentId, string filename)
|
||||||
@ -100,7 +83,7 @@ public class ToolTypesController : Controller, IToolTypesController<IActionResul
|
|||||||
[Route("{toolTypeId}/headers/{headerid}/oiexport")]
|
[Route("{toolTypeId}/headers/{headerid}/oiexport")]
|
||||||
public IActionResult OIExport(int toolTypeId, long headerid)
|
public IActionResult OIExport(int toolTypeId, long headerid)
|
||||||
{
|
{
|
||||||
string? message = _ToolTypesRepository.OIExport(_MetrologyRepo, _AttachmentsService, _AppSettings.AttachmentPath, _AppSettings.TableToPath, toolTypeId, headerid);
|
string? message = _ToolTypesRepository.OIExport(_MetrologyRepo, _AttachmentsService, toolTypeId, headerid);
|
||||||
if (message is null)
|
if (message is null)
|
||||||
return Ok(new { Message = "OK" });
|
return Ok(new { Message = "OK" });
|
||||||
else
|
else
|
||||||
|
@ -10,6 +10,7 @@ public class ErrorHandlerController : Controller
|
|||||||
|
|
||||||
public ErrorHandlerController(ILogger<ErrorHandlerController> logger) => _Logger = logger;
|
public ErrorHandlerController(ILogger<ErrorHandlerController> logger) => _Logger = logger;
|
||||||
|
|
||||||
|
[ApiExplorerSettings(IgnoreApi = true)]
|
||||||
public IActionResult Index()
|
public IActionResult Index()
|
||||||
{
|
{
|
||||||
IExceptionHandlerFeature? error = HttpContext.Features.Get<IExceptionHandlerFeature>();
|
IExceptionHandlerFeature? error = HttpContext.Features.Get<IExceptionHandlerFeature>();
|
||||||
|
@ -1,160 +0,0 @@
|
|||||||
using Infineon.Monitoring.MonA;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
|
||||||
using OI.Metrology.Server.Models;
|
|
||||||
using OI.Metrology.Shared.DataModels;
|
|
||||||
using OI.Metrology.Shared.Models.Stateless;
|
|
||||||
using OI.Metrology.Shared.ViewModels;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace OI.Metrology.Server.Controllers;
|
|
||||||
|
|
||||||
public class ExportController : Controller
|
|
||||||
{
|
|
||||||
|
|
||||||
private readonly ILogger _Logger;
|
|
||||||
private readonly AppSettings _AppSettings;
|
|
||||||
private readonly bool _IsTestDatabase;
|
|
||||||
private readonly IMetrologyRepository _MetrologyRepository;
|
|
||||||
|
|
||||||
public ExportController(AppSettings appSettings, ILogger<ExportController> logger, IMetrologyRepository metrologyRepository)
|
|
||||||
{
|
|
||||||
_Logger = logger;
|
|
||||||
_AppSettings = appSettings;
|
|
||||||
_MetrologyRepository = metrologyRepository;
|
|
||||||
_IsTestDatabase = appSettings.ConnectionString.Contains("test", StringComparison.InvariantCultureIgnoreCase);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnActionExecuted(ActionExecutedContext context)
|
|
||||||
{
|
|
||||||
base.OnActionExecuted(context);
|
|
||||||
ViewBag.IsTestDatabase = _IsTestDatabase;
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetApiUrl() => string.IsNullOrEmpty(_AppSettings.ApiUrl) ? Url.Content("~/") : _AppSettings.ApiUrl[0] == '~' ? Url.Content(_AppSettings.ApiUrl) : _AppSettings.ApiUrl;
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("/Export")]
|
|
||||||
public ActionResult Index()
|
|
||||||
{
|
|
||||||
Export model = new()
|
|
||||||
{
|
|
||||||
StartTime = DateTime.Now.AddMonths(-1),
|
|
||||||
EndTime = DateTime.Now
|
|
||||||
};
|
|
||||||
MonIn monIn = MonIn.GetInstance();
|
|
||||||
_ = monIn.SendStatus(_AppSettings.MonASite, _AppSettings.MonAResource, "Heartbeat", State.Up);
|
|
||||||
ViewBag.ApiUrl = GetApiUrl();
|
|
||||||
return View(model);
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost]
|
|
||||||
[Route("/ExportData")]
|
|
||||||
public ActionResult ExportData(Export model)
|
|
||||||
{
|
|
||||||
ToolType? toolType = null;
|
|
||||||
if (string.IsNullOrEmpty(model.ToolType))
|
|
||||||
ModelState.AddModelError("Exception", "Invalid selection");
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (model.StartTime > model.EndTime)
|
|
||||||
ModelState.AddModelError("EndTime", "End time must be after start time");
|
|
||||||
IEnumerable<ToolType> toolTypes = _MetrologyRepository.GetToolTypes();
|
|
||||||
toolType = toolTypes.Where(tt => tt.ID.ToString() == model.ToolType).SingleOrDefault();
|
|
||||||
if (toolType is null)
|
|
||||||
ModelState.AddModelError("ToolType", "Invalid selection");
|
|
||||||
else if (string.IsNullOrWhiteSpace(toolType.ExportSPName))
|
|
||||||
ModelState.AddModelError("ToolType", "Tool type is not exportable");
|
|
||||||
}
|
|
||||||
if (ModelState.IsValid)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
DateTime startDT = model.StartDate.Date.Add(model.StartTime.TimeOfDay);
|
|
||||||
DateTime endDT = model.EndDate.Date.Add(model.EndTime.TimeOfDay);
|
|
||||||
|
|
||||||
return DoCSVExport(toolType?.ToolTypeName, toolType?.ExportSPName, startDT, endDT);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
ModelState.AddModelError("Exception", "Error exporting data");
|
|
||||||
ModelState.AddModelError("Exception", ex.Message);
|
|
||||||
string errorMessage = $"Error exporting: {ex}";
|
|
||||||
_Logger.LogError(message: errorMessage);
|
|
||||||
MonIn monIn = MonIn.GetInstance();
|
|
||||||
_ = monIn.SendStatus(_AppSettings.MonASite, _AppSettings.MonAResource, "Heartbeat", State.Warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ViewBag.ApiUrl = GetApiUrl();
|
|
||||||
return View("Index", model);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected ActionResult DoCSVExport(string? toolTypeName, string? spName, DateTime startTime, DateTime endTime)
|
|
||||||
{
|
|
||||||
string fileName = string.Format("Export_{0}_{1:yyyyMMddHHmm}_to_{2:yyyyMMddHHmm}.csv", toolTypeName, startTime, endTime);
|
|
||||||
StringBuilder sb = new();
|
|
||||||
if (spName is null)
|
|
||||||
throw new NullReferenceException(nameof(spName));
|
|
||||||
System.Data.DataTable dt = _MetrologyRepository.ExportData(spName, startTime, endTime);
|
|
||||||
_ = sb.AppendLine(GetColumnHeaders(dt));
|
|
||||||
foreach (System.Data.DataRow dr in dt.Rows)
|
|
||||||
_ = sb.AppendLine(GetRowData(dr));
|
|
||||||
byte[] contents = Encoding.UTF8.GetBytes(sb.ToString());
|
|
||||||
return File(contents, "application/octet-stream", fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static string GetRowData(System.Data.DataRow dr)
|
|
||||||
{
|
|
||||||
StringBuilder r = new();
|
|
||||||
for (int i = 0; i < dr.Table.Columns.Count; i++)
|
|
||||||
{
|
|
||||||
if (i > 0)
|
|
||||||
_ = r.Append(',');
|
|
||||||
object v = dr[i];
|
|
||||||
if (!Convert.IsDBNull(v))
|
|
||||||
{
|
|
||||||
string? c = Convert.ToString(v);
|
|
||||||
if (c is not null)
|
|
||||||
_ = r.Append(FormatForCSV(c));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return r.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static string GetColumnHeaders(System.Data.DataTable dt)
|
|
||||||
{
|
|
||||||
StringBuilder r = new();
|
|
||||||
for (int i = 0; i < dt.Columns.Count; i++)
|
|
||||||
{
|
|
||||||
if (i > 0)
|
|
||||||
_ = r.Append(',');
|
|
||||||
|
|
||||||
_ = r.Append(FormatForCSV(dt.Columns[i].ColumnName.TrimEnd('_')));
|
|
||||||
}
|
|
||||||
return r.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static string FormatForCSV(string v)
|
|
||||||
{
|
|
||||||
bool doubleQuoted = false;
|
|
||||||
StringBuilder r = new(v.Length + 2);
|
|
||||||
if (v.StartsWith(' ') || v.EndsWith(' ') || v.Contains(',') || v.Contains('"'))
|
|
||||||
{
|
|
||||||
_ = r.Append('"');
|
|
||||||
doubleQuoted = true;
|
|
||||||
}
|
|
||||||
foreach (char c in v)
|
|
||||||
{
|
|
||||||
_ = c switch
|
|
||||||
{
|
|
||||||
'\r' or '\n' => r.Append(' '),
|
|
||||||
'"' => r.Append("\"\""),
|
|
||||||
_ => r.Append(c),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
if (doubleQuoted)
|
|
||||||
_ = r.Append('"');
|
|
||||||
return r.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,79 +0,0 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
|
||||||
using OI.Metrology.Server.Models;
|
|
||||||
using OI.Metrology.Shared.Models.Stateless;
|
|
||||||
using OI.Metrology.Shared.ViewModels;
|
|
||||||
|
|
||||||
namespace OI.Metrology.Server.Controllers;
|
|
||||||
|
|
||||||
public class PagesController : Controller
|
|
||||||
{
|
|
||||||
|
|
||||||
private readonly bool _IsTestDatabase;
|
|
||||||
private readonly AppSettings _AppSettings;
|
|
||||||
private readonly IMetrologyRepository _MetrologyRepository;
|
|
||||||
|
|
||||||
public PagesController(AppSettings appSettings, IMetrologyRepository metrologyRepository)
|
|
||||||
{
|
|
||||||
_AppSettings = appSettings;
|
|
||||||
_MetrologyRepository = metrologyRepository;
|
|
||||||
_IsTestDatabase = appSettings.ConnectionString.Contains("test", StringComparison.InvariantCultureIgnoreCase);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnActionExecuted(ActionExecutedContext context)
|
|
||||||
{
|
|
||||||
base.OnActionExecuted(context);
|
|
||||||
ViewBag.IsTestDatabase = _IsTestDatabase;
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetApiUrl() => string.IsNullOrEmpty(_AppSettings.ApiUrl) ? Url.Content("~/") : _AppSettings.ApiUrl[0] == '~' ? Url.Content(_AppSettings.ApiUrl) : _AppSettings.ApiUrl;
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("/")]
|
|
||||||
public IActionResult Index()
|
|
||||||
{
|
|
||||||
ViewBag.ApiUrl = GetApiUrl();
|
|
||||||
return View("AwaitingDispo");
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("/AwaitingDispo")]
|
|
||||||
[Route("/Metrology/AwaitingDispo")]
|
|
||||||
public IActionResult AwaitingDispo()
|
|
||||||
{
|
|
||||||
ViewBag.ApiUrl = GetApiUrl();
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("/RunInfo")]
|
|
||||||
[Route("/Metrology/RunInfo")]
|
|
||||||
public IActionResult RunInfo([FromQuery] int tooltypeid = 1, [FromQuery] int headerid = 0)
|
|
||||||
{
|
|
||||||
RunInfo m = new()
|
|
||||||
{
|
|
||||||
ToolTypeID = tooltypeid,
|
|
||||||
HeaderID = headerid,
|
|
||||||
HeaderAttachmentID = Guid.Empty,
|
|
||||||
};
|
|
||||||
if (headerid > 0)
|
|
||||||
{
|
|
||||||
m.HeaderAttachmentID = _MetrologyRepository.GetHeaderAttachmentID(tooltypeid, headerid);
|
|
||||||
}
|
|
||||||
ViewBag.ApiUrl = GetApiUrl();
|
|
||||||
return View(m);
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("/RunHeaders")]
|
|
||||||
[Route("/Metrology/RunHeaders")]
|
|
||||||
public IActionResult RunHeaders()
|
|
||||||
{
|
|
||||||
ViewBag.ApiUrl = GetApiUrl();
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("/Crash")]
|
|
||||||
public IActionResult Crash() => throw new Exception("Test unhandled exception");
|
|
||||||
}
|
|
@ -1,82 +0,0 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
|
||||||
using OI.Metrology.Server.Models;
|
|
||||||
using OI.Metrology.Shared.ViewModels;
|
|
||||||
|
|
||||||
namespace OI.Metrology.Server.Controllers;
|
|
||||||
|
|
||||||
public class ReactorsController : Controller
|
|
||||||
{
|
|
||||||
|
|
||||||
private readonly bool _IsTestDatabase;
|
|
||||||
private readonly AppSettings _AppSettings;
|
|
||||||
|
|
||||||
public ReactorsController(AppSettings appSettings)
|
|
||||||
{
|
|
||||||
_AppSettings = appSettings;
|
|
||||||
_IsTestDatabase = appSettings.ConnectionString.Contains("test", StringComparison.InvariantCultureIgnoreCase);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnActionExecuted(ActionExecutedContext context)
|
|
||||||
{
|
|
||||||
base.OnActionExecuted(context);
|
|
||||||
ViewBag.IsTestDatabase = _IsTestDatabase;
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetApiUrl() => string.IsNullOrEmpty(_AppSettings.ApiUrl) ? Url.Content("~/") : _AppSettings.ApiUrl[0] == '~' ? Url.Content(_AppSettings.ApiUrl) : _AppSettings.ApiUrl;
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("/Step1")]
|
|
||||||
[Route("/Metrology/Step1")]
|
|
||||||
public IActionResult Step1(string mod = "", string equipment = "", string layer = "", string zone = "", string rds = "", string initials = "")
|
|
||||||
{
|
|
||||||
string directory = "D:/Tmp/Metrology";
|
|
||||||
if (!Directory.Exists(directory))
|
|
||||||
_ = Directory.CreateDirectory(directory);
|
|
||||||
string[] model = new string[] { mod, equipment, layer, zone, rds, initials };
|
|
||||||
if (!string.IsNullOrEmpty(initials))
|
|
||||||
System.IO.File.WriteAllLines(Path.Combine(directory, $"{DateTime.Now.Ticks}-{initials}.rsv"), model);
|
|
||||||
return View(model);
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("/Step2")]
|
|
||||||
[Route("/Metrology/Step2")]
|
|
||||||
public IActionResult Step2(string mod) =>
|
|
||||||
View(new string[] { mod });
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("/Step3")]
|
|
||||||
[Route("/Metrology/Step3")]
|
|
||||||
public IActionResult Step3(string mod, string equipment) =>
|
|
||||||
View(new string[] { mod, equipment });
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("/Step4")]
|
|
||||||
[Route("/Metrology/Step4")]
|
|
||||||
public IActionResult Step4(string mod, string equipment, string layer) =>
|
|
||||||
View(new string[] { mod, equipment, layer });
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("/Step5")]
|
|
||||||
[Route("/Metrology/Step5")]
|
|
||||||
public IActionResult Step5(string mod, string equipment, string layer, string zone) =>
|
|
||||||
View(new string[] { mod, equipment, layer, zone });
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("/Step6")]
|
|
||||||
[Route("/Metrology/Step6")]
|
|
||||||
public IActionResult Step6(string mod, string equipment, string layer, string zone, string rds) =>
|
|
||||||
View(new string[] { mod, equipment, layer, zone, rds });
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("/Reactor")]
|
|
||||||
[Route("/Metrology/Reactor")]
|
|
||||||
public IActionResult Reactor() => View(new RunInfo());
|
|
||||||
|
|
||||||
[HttpGet]
|
|
||||||
[Route("/WorkMaterial")]
|
|
||||||
[Route("/Metrology/WorkMaterial")]
|
|
||||||
public IActionResult WorkMaterial() => View();
|
|
||||||
|
|
||||||
}
|
|
@ -2,26 +2,35 @@ using System.Text.Json;
|
|||||||
|
|
||||||
namespace OI.Metrology.Server.Models;
|
namespace OI.Metrology.Server.Models;
|
||||||
|
|
||||||
public record AppSettings(string ApiExportPath,
|
public record AppSettings(string ApiFileShare,
|
||||||
string ApiLoggingContentTypes,
|
string ApiLoggingContentTypes,
|
||||||
string ApiLoggingPathPrefixes,
|
string ApiLoggingPathPrefixes,
|
||||||
string ApiLogPath,
|
string ApiLogPath,
|
||||||
string ApiUrl,
|
string ApiUrl,
|
||||||
string AttachmentPath,
|
|
||||||
string BuildNumber,
|
string BuildNumber,
|
||||||
string Company,
|
string Company,
|
||||||
string ConnectionString,
|
string ConnectionString,
|
||||||
|
string EcCharacterizationSi,
|
||||||
|
string EcMesaFileShareCharacterizationSi,
|
||||||
|
string EcMesaFileShareMetrologySi,
|
||||||
|
string EcMetrologySi,
|
||||||
string GitCommitSeven,
|
string GitCommitSeven,
|
||||||
string InboundApiAllowedIPList,
|
string InboundApiAllowedIPList,
|
||||||
|
string IqsColumns,
|
||||||
|
string[] IqsFileSegments,
|
||||||
|
string IqsKey,
|
||||||
|
string IqsRed,
|
||||||
|
string IqsYellow,
|
||||||
bool IsDevelopment,
|
bool IsDevelopment,
|
||||||
bool IsStaging,
|
bool IsStaging,
|
||||||
string MockRoot,
|
string MockRoot,
|
||||||
string MonAResource,
|
string MonAResource,
|
||||||
string MonASite,
|
string MonASite,
|
||||||
string OI2SqlConnectionString,
|
|
||||||
string OpenInsightApplicationProgrammingInterface,
|
string OpenInsightApplicationProgrammingInterface,
|
||||||
Dictionary<string, string> TableToPath,
|
Dictionary<string, string> TableToPath,
|
||||||
string URLs,
|
string URLs,
|
||||||
|
string WaferCounterDestinationDirectory,
|
||||||
|
int WaferCounterTwoFileSecondsWait,
|
||||||
string WorkingDirectoryName)
|
string WorkingDirectoryName)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -6,26 +6,35 @@ namespace OI.Metrology.Server.Models.Binder;
|
|||||||
public class AppSettings
|
public class AppSettings
|
||||||
{
|
{
|
||||||
|
|
||||||
public string? ApiExportPath { get; set; }
|
public string? ApiFileShare { get; set; }
|
||||||
public string? ApiLoggingContentTypes { get; set; }
|
public string? ApiLoggingContentTypes { get; set; }
|
||||||
public string? ApiLoggingPathPrefixes { get; set; }
|
public string? ApiLoggingPathPrefixes { get; set; }
|
||||||
public string? ApiLogPath { get; set; }
|
public string? ApiLogPath { get; set; }
|
||||||
public string? ApiUrl { get; set; }
|
public string? ApiUrl { get; set; }
|
||||||
public string? AttachmentPath { get; set; }
|
|
||||||
public string? BuildNumber { get; set; }
|
public string? BuildNumber { get; set; }
|
||||||
public string? Company { get; set; }
|
public string? Company { get; set; }
|
||||||
public string? ConnectionString { get; set; }
|
public string? ConnectionString { get; set; }
|
||||||
|
public string? EcCharacterizationSi { get; set; }
|
||||||
|
public string? EcMesaFileShareCharacterizationSi { get; set; }
|
||||||
|
public string? EcMesaFileShareMetrologySi { get; set; }
|
||||||
|
public string? EcMetrologySi { get; set; }
|
||||||
public string? GitCommitSeven { get; set; }
|
public string? GitCommitSeven { get; set; }
|
||||||
public string? InboundApiAllowedIPList { get; set; }
|
public string? InboundApiAllowedIPList { get; set; }
|
||||||
|
public string? IqsColumns { get; set; }
|
||||||
|
public string[]? IqsFileSegments { get; set; }
|
||||||
|
public string? IqsKey { get; set; }
|
||||||
|
public string? IqsRed { get; set; }
|
||||||
|
public string? IqsYellow { get; set; }
|
||||||
public bool? IsDevelopment { get; set; }
|
public bool? IsDevelopment { get; set; }
|
||||||
public bool? IsStaging { get; set; }
|
public bool? IsStaging { get; set; }
|
||||||
public string? MockRoot { get; set; }
|
public string? MockRoot { get; set; }
|
||||||
public string? MonAResource { get; set; }
|
public string? MonAResource { get; set; }
|
||||||
public string? MonASite { get; set; }
|
public string? MonASite { get; set; }
|
||||||
public string? Oi2SqlConnectionString { get; set; }
|
|
||||||
public string? OpenInsightApplicationProgrammingInterface { get; set; }
|
public string? OpenInsightApplicationProgrammingInterface { get; set; }
|
||||||
public Dictionary<string, string>? TableToPath { get; set; }
|
public Dictionary<string, string>? TableToPath { get; set; }
|
||||||
public string? URLs { get; set; }
|
public string? URLs { get; set; }
|
||||||
|
public string? WaferCounterDestinationDirectory { get; set; }
|
||||||
|
public int? WaferCounterTwoFileSecondsWait { get; set; }
|
||||||
public string? WorkingDirectoryName { get; set; }
|
public string? WorkingDirectoryName { get; set; }
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
@ -34,52 +43,87 @@ public class AppSettings
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void PreVerify(IConfigurationRoot configurationRoot, AppSettings? appSettings)
|
||||||
|
{
|
||||||
|
if (appSettings?.ApiFileShare is null)
|
||||||
|
{
|
||||||
|
List<string> paths = new();
|
||||||
|
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;
|
||||||
|
paths.Add(physicalFileProvider.Root);
|
||||||
|
}
|
||||||
|
throw new NotSupportedException($"Not found!{Environment.NewLine}{string.Join(Environment.NewLine, paths.Distinct())}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static Models.AppSettings Get(AppSettings? appSettings)
|
private static Models.AppSettings Get(AppSettings? appSettings)
|
||||||
{
|
{
|
||||||
Models.AppSettings result;
|
Models.AppSettings result;
|
||||||
if (appSettings is null) throw new NullReferenceException(nameof(appSettings));
|
if (appSettings is null) throw new NullReferenceException(nameof(appSettings));
|
||||||
if (appSettings.ApiExportPath is null) throw new NullReferenceException(nameof(ApiExportPath));
|
if (appSettings.ApiFileShare is null) throw new NullReferenceException(nameof(ApiFileShare));
|
||||||
if (appSettings.ApiLoggingContentTypes is null) throw new NullReferenceException(nameof(ApiLoggingContentTypes));
|
if (appSettings.ApiLoggingContentTypes is null) throw new NullReferenceException(nameof(ApiLoggingContentTypes));
|
||||||
if (appSettings.ApiLoggingPathPrefixes is null) throw new NullReferenceException(nameof(ApiLoggingPathPrefixes));
|
if (appSettings.ApiLoggingPathPrefixes is null) throw new NullReferenceException(nameof(ApiLoggingPathPrefixes));
|
||||||
if (appSettings.ApiLogPath is null) throw new NullReferenceException(nameof(ApiLogPath));
|
if (appSettings.ApiLogPath is null) throw new NullReferenceException(nameof(ApiLogPath));
|
||||||
if (appSettings.ApiUrl is null) throw new NullReferenceException(nameof(ApiUrl));
|
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.BuildNumber is null) throw new NullReferenceException(nameof(BuildNumber));
|
||||||
if (appSettings.Company is null) throw new NullReferenceException(nameof(Company));
|
if (appSettings.Company is null) throw new NullReferenceException(nameof(Company));
|
||||||
if (appSettings.ConnectionString is null) throw new NullReferenceException(nameof(ConnectionString));
|
if (appSettings.ConnectionString is null) throw new NullReferenceException(nameof(ConnectionString));
|
||||||
|
if (appSettings.EcCharacterizationSi is null) throw new NullReferenceException(nameof(EcCharacterizationSi));
|
||||||
|
if (appSettings.EcMesaFileShareCharacterizationSi is null) throw new NullReferenceException(nameof(EcMesaFileShareCharacterizationSi));
|
||||||
|
if (appSettings.EcMesaFileShareMetrologySi is null) throw new NullReferenceException(nameof(EcMesaFileShareMetrologySi));
|
||||||
|
if (appSettings.EcMetrologySi is null) throw new NullReferenceException(nameof(EcMetrologySi));
|
||||||
if (appSettings.GitCommitSeven is null) throw new NullReferenceException(nameof(GitCommitSeven));
|
if (appSettings.GitCommitSeven is null) throw new NullReferenceException(nameof(GitCommitSeven));
|
||||||
if (appSettings.InboundApiAllowedIPList is null) throw new NullReferenceException(nameof(InboundApiAllowedIPList));
|
if (appSettings.InboundApiAllowedIPList is null) throw new NullReferenceException(nameof(InboundApiAllowedIPList));
|
||||||
|
if (appSettings.IqsColumns is null) throw new NullReferenceException(nameof(IqsColumns));
|
||||||
|
if (appSettings.IqsFileSegments is null) throw new NullReferenceException(nameof(IqsFileSegments));
|
||||||
|
if (appSettings.IqsKey is null) throw new NullReferenceException(nameof(IqsKey));
|
||||||
|
if (appSettings.IqsRed is null) throw new NullReferenceException(nameof(IqsRed));
|
||||||
|
if (appSettings.IqsYellow is null) throw new NullReferenceException(nameof(IqsYellow));
|
||||||
if (appSettings.IsDevelopment is null) throw new NullReferenceException(nameof(IsDevelopment));
|
if (appSettings.IsDevelopment is null) throw new NullReferenceException(nameof(IsDevelopment));
|
||||||
if (appSettings.IsStaging is null) throw new NullReferenceException(nameof(IsStaging));
|
if (appSettings.IsStaging is null) throw new NullReferenceException(nameof(IsStaging));
|
||||||
if (appSettings.MockRoot is null) throw new NullReferenceException(nameof(MockRoot));
|
if (appSettings.MockRoot is null) throw new NullReferenceException(nameof(MockRoot));
|
||||||
if (appSettings.MonAResource is null) throw new NullReferenceException(nameof(MonAResource));
|
if (appSettings.MonAResource is null) throw new NullReferenceException(nameof(MonAResource));
|
||||||
if (appSettings.MonASite is null) throw new NullReferenceException(nameof(MonASite));
|
if (appSettings.MonASite is null) throw new NullReferenceException(nameof(MonASite));
|
||||||
if (appSettings.Oi2SqlConnectionString is null) throw new NullReferenceException(nameof(Oi2SqlConnectionString));
|
|
||||||
if (appSettings.OpenInsightApplicationProgrammingInterface is null) throw new NullReferenceException(nameof(OpenInsightApplicationProgrammingInterface));
|
if (appSettings.OpenInsightApplicationProgrammingInterface is null) throw new NullReferenceException(nameof(OpenInsightApplicationProgrammingInterface));
|
||||||
if (appSettings.URLs is null) throw new NullReferenceException(nameof(URLs));
|
if (appSettings.URLs is null) throw new NullReferenceException(nameof(URLs));
|
||||||
if (appSettings.TableToPath is null) throw new NullReferenceException(nameof(TableToPath));
|
if (appSettings.TableToPath is null) throw new NullReferenceException(nameof(TableToPath));
|
||||||
|
if (appSettings.WaferCounterDestinationDirectory is null) throw new NullReferenceException(nameof(WaferCounterDestinationDirectory));
|
||||||
|
if (appSettings.WaferCounterTwoFileSecondsWait is null) throw new NullReferenceException(nameof(WaferCounterTwoFileSecondsWait));
|
||||||
if (appSettings.WorkingDirectoryName is null) throw new NullReferenceException(nameof(WorkingDirectoryName));
|
if (appSettings.WorkingDirectoryName is null) throw new NullReferenceException(nameof(WorkingDirectoryName));
|
||||||
result = new(
|
result = new(
|
||||||
appSettings.ApiExportPath,
|
appSettings.ApiFileShare,
|
||||||
appSettings.ApiLoggingContentTypes,
|
appSettings.ApiLoggingContentTypes,
|
||||||
appSettings.ApiLoggingPathPrefixes,
|
appSettings.ApiLoggingPathPrefixes,
|
||||||
appSettings.ApiLogPath,
|
appSettings.ApiLogPath,
|
||||||
appSettings.ApiUrl,
|
appSettings.ApiUrl,
|
||||||
appSettings.AttachmentPath,
|
|
||||||
appSettings.BuildNumber,
|
appSettings.BuildNumber,
|
||||||
appSettings.Company,
|
appSettings.Company,
|
||||||
appSettings.ConnectionString,
|
appSettings.ConnectionString,
|
||||||
|
appSettings.EcCharacterizationSi,
|
||||||
|
appSettings.EcMesaFileShareCharacterizationSi,
|
||||||
|
appSettings.EcMesaFileShareMetrologySi,
|
||||||
|
appSettings.EcMetrologySi,
|
||||||
appSettings.GitCommitSeven,
|
appSettings.GitCommitSeven,
|
||||||
appSettings.InboundApiAllowedIPList,
|
appSettings.InboundApiAllowedIPList,
|
||||||
|
appSettings.IqsColumns,
|
||||||
|
appSettings.IqsFileSegments,
|
||||||
|
appSettings.IqsKey,
|
||||||
|
appSettings.IqsRed,
|
||||||
|
appSettings.IqsYellow,
|
||||||
appSettings.IsDevelopment.Value,
|
appSettings.IsDevelopment.Value,
|
||||||
appSettings.IsStaging.Value,
|
appSettings.IsStaging.Value,
|
||||||
appSettings.MockRoot,
|
appSettings.MockRoot,
|
||||||
appSettings.MonAResource,
|
appSettings.MonAResource,
|
||||||
appSettings.MonASite,
|
appSettings.MonASite,
|
||||||
appSettings.Oi2SqlConnectionString,
|
|
||||||
appSettings.OpenInsightApplicationProgrammingInterface,
|
appSettings.OpenInsightApplicationProgrammingInterface,
|
||||||
appSettings.TableToPath,
|
appSettings.TableToPath,
|
||||||
appSettings.URLs,
|
appSettings.URLs,
|
||||||
|
appSettings.WaferCounterDestinationDirectory,
|
||||||
|
appSettings.WaferCounterTwoFileSecondsWait.Value,
|
||||||
appSettings.WorkingDirectoryName);
|
appSettings.WorkingDirectoryName);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -90,20 +134,7 @@ public class AppSettings
|
|||||||
#pragma warning disable IL3050, IL2026
|
#pragma warning disable IL3050, IL2026
|
||||||
AppSettings? appSettings = configurationRoot.Get<AppSettings>();
|
AppSettings? appSettings = configurationRoot.Get<AppSettings>();
|
||||||
#pragma warning restore IL3050, IL2026
|
#pragma warning restore IL3050, IL2026
|
||||||
if (appSettings?.ApiExportPath is null)
|
PreVerify(configurationRoot, appSettings);
|
||||||
{
|
|
||||||
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);
|
result = Get(appSettings);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -6,12 +6,13 @@
|
|||||||
<SccLocalPath>SAK</SccLocalPath>
|
<SccLocalPath>SAK</SccLocalPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<UserSecretsId>b0a3891c-b775-422c-80ee-63a2f385045d</UserSecretsId>
|
<UserSecretsId>b0a3891c-b775-422c-80ee-63a2f385045d</UserSecretsId>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -24,22 +25,22 @@
|
|||||||
<Content Remove="compilerconfig.json" />
|
<Content Remove="compilerconfig.json" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Dapper" Version="2.1.4" />
|
<PackageReference Include="Dapper" Version="2.1.44" />
|
||||||
<PackageReference Include="EntityFramework" Version="6.4.4" />
|
<PackageReference Include="EntityFramework" Version="6.5.1" />
|
||||||
<PackageReference Include="jQuery" Version="3.7.1" />
|
<PackageReference Include="jQuery" Version="3.7.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.13" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.7" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="8.0.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
|
||||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
|
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
|
||||||
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
|
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Shared\OI.Metrology.Shared.csproj" />
|
<ProjectReference Include="..\Shared\OI.Metrology.Shared.csproj" />
|
||||||
|
@ -4,7 +4,6 @@ using OI.Metrology.Server.Models;
|
|||||||
using OI.Metrology.Server.Repositories;
|
using OI.Metrology.Server.Repositories;
|
||||||
using OI.Metrology.Server.Repository;
|
using OI.Metrology.Server.Repository;
|
||||||
using OI.Metrology.Server.Services;
|
using OI.Metrology.Server.Services;
|
||||||
using OI.Metrology.Shared.Models;
|
|
||||||
using OI.Metrology.Shared.Models.Stateless;
|
using OI.Metrology.Shared.Models.Stateless;
|
||||||
using OI.Metrology.Shared.Repositories;
|
using OI.Metrology.Shared.Repositories;
|
||||||
using OI.Metrology.Shared.Services;
|
using OI.Metrology.Shared.Services;
|
||||||
@ -49,8 +48,6 @@ public class Program
|
|||||||
throw new Exception("Company name must have a value!");
|
throw new Exception("Company name must have a value!");
|
||||||
if (string.IsNullOrEmpty(appSettings.WorkingDirectoryName))
|
if (string.IsNullOrEmpty(appSettings.WorkingDirectoryName))
|
||||||
throw new Exception("Working directory name must have a value!");
|
throw new Exception("Working directory name must have a value!");
|
||||||
string workingDirectory = IWorkingDirectory.GetWorkingDirectory(assemblyName, appSettings.WorkingDirectoryName);
|
|
||||||
Environment.SetEnvironmentVariable(nameof(workingDirectory), workingDirectory);
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_ = webApplicationBuilder.Services.AddMemoryCache();
|
_ = webApplicationBuilder.Services.AddMemoryCache();
|
||||||
@ -70,12 +67,13 @@ public class Program
|
|||||||
_ = webApplicationBuilder.Services.AddScoped<IInboundDataService, InboundDataService>();
|
_ = webApplicationBuilder.Services.AddScoped<IInboundDataService, InboundDataService>();
|
||||||
_ = webApplicationBuilder.Services.AddSingleton<IInboundRepository, InboundRepository>();
|
_ = webApplicationBuilder.Services.AddSingleton<IInboundRepository, InboundRepository>();
|
||||||
_ = webApplicationBuilder.Services.AddScoped<IMetrologyRepository, MetrologyRepository>();
|
_ = webApplicationBuilder.Services.AddScoped<IMetrologyRepository, MetrologyRepository>();
|
||||||
_ = webApplicationBuilder.Services.AddSingleton<IReactorsRepository, ReactorsRepository>();
|
_ = webApplicationBuilder.Services.AddSingleton<IFileShareRepository, FileShareRepository>();
|
||||||
_ = webApplicationBuilder.Services.AddSingleton<IToolTypesRepository, ToolTypesRepository>();
|
_ = webApplicationBuilder.Services.AddSingleton<IToolTypesRepository, ToolTypesRepository>();
|
||||||
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSRepository, InfinityQSRepository>();
|
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSRepository, InfinityQSRepository>();
|
||||||
_ = webApplicationBuilder.Services.AddScoped<IOpenInsightV1Repository, OpenInsightV1Repository>();
|
_ = webApplicationBuilder.Services.AddScoped<IOpenInsightV1Repository, OpenInsightV1Repository>();
|
||||||
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSV2Repository, InfinityQSV2Repository>();
|
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSV2Repository, InfinityQSV2Repository>();
|
||||||
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSV3Repository, InfinityQSV3Repository>();
|
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSV3Repository, InfinityQSV3Repository>();
|
||||||
|
_ = webApplicationBuilder.Services.AddSingleton<IInfinityQSV4Repository, InfinityQSV4Repository>();
|
||||||
_ = webApplicationBuilder.Services.AddSingleton<IClientSettingsRepository>(_ => clientSettingsRepository);
|
_ = webApplicationBuilder.Services.AddSingleton<IClientSettingsRepository>(_ => clientSettingsRepository);
|
||||||
_ = webApplicationBuilder.Services.AddSingleton<IServiceShopOrderRepository, ServiceShopOrderRepository>();
|
_ = webApplicationBuilder.Services.AddSingleton<IServiceShopOrderRepository, ServiceShopOrderRepository>();
|
||||||
_ = webApplicationBuilder.Services.AddSingleton<ISpreadingResistanceProfileService, SpreadingResistanceProfileService>();
|
_ = webApplicationBuilder.Services.AddSingleton<ISpreadingResistanceProfileService, SpreadingResistanceProfileService>();
|
||||||
|
@ -35,19 +35,13 @@ public class AppSettingsRepository : IAppSettingsRepository<Models.Binder.AppSet
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(_AppSettings.ConnectionString))
|
if (string.IsNullOrEmpty(_AppSettings.ConnectionString))
|
||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
if (string.IsNullOrEmpty(_AppSettings.OI2SqlConnectionString))
|
|
||||||
throw new NotSupportedException();
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
if (!_AppSettings.ConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
|
if (!_AppSettings.ConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
|
||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
if (!_AppSettings.OI2SqlConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
|
|
||||||
throw new NotSupportedException();
|
|
||||||
#endif
|
#endif
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
if (_AppSettings.ConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
|
if (_AppSettings.ConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
|
||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
if (_AppSettings.OI2SqlConnectionString.Contains("test", StringComparison.CurrentCultureIgnoreCase))
|
|
||||||
throw new NotSupportedException();
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,11 +13,7 @@ public class ClientSettingsRepository : IClientSettingsRepository
|
|||||||
|
|
||||||
internal List<string> GetClientSettings(IPAddress? remoteIpAddress)
|
internal List<string> GetClientSettings(IPAddress? remoteIpAddress)
|
||||||
{
|
{
|
||||||
List<string> results = new();
|
List<string> results = new() { remoteIpAddress is null ? nameof(remoteIpAddress) : remoteIpAddress.ToString() };
|
||||||
if (remoteIpAddress is null)
|
|
||||||
results.Add(nameof(remoteIpAddress));
|
|
||||||
else
|
|
||||||
results.Add(remoteIpAddress.ToString());
|
|
||||||
if (!_AppSettings.IsDevelopment)
|
if (!_AppSettings.IsDevelopment)
|
||||||
throw new Exception("Shouldn't expose!");
|
throw new Exception("Shouldn't expose!");
|
||||||
return results;
|
return results;
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
using OI.Metrology.Server.Models;
|
using OI.Metrology.Server.Models;
|
||||||
using OI.Metrology.Shared.DataModels;
|
using OI.Metrology.Shared.DataModels;
|
||||||
|
using OI.Metrology.Shared.Models;
|
||||||
using OI.Metrology.Shared.Models.Stateless;
|
using OI.Metrology.Shared.Models.Stateless;
|
||||||
|
using System.Data;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.Text;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace OI.Metrology.Server.Repository;
|
namespace OI.Metrology.Server.Repository;
|
||||||
@ -12,13 +15,17 @@ public class ExportRepository : IExportRepository
|
|||||||
private readonly string _RepositoryName;
|
private readonly string _RepositoryName;
|
||||||
private readonly AppSettings _AppSettings;
|
private readonly AppSettings _AppSettings;
|
||||||
private readonly ILogger<ExportRepository> _Logger;
|
private readonly ILogger<ExportRepository> _Logger;
|
||||||
|
private readonly IHttpClientFactory _HttpClientFactory;
|
||||||
|
private readonly IFileShareRepository _FileShareRepository;
|
||||||
private readonly Dictionary<string, Dictionary<long, HeaderCommon>> _RdsToHeaderCommonCollection;
|
private readonly Dictionary<string, Dictionary<long, HeaderCommon>> _RdsToHeaderCommonCollection;
|
||||||
|
|
||||||
public ExportRepository(ILogger<ExportRepository> logger, AppSettings appSettings)
|
public ExportRepository(ILogger<ExportRepository> logger, AppSettings appSettings, IHttpClientFactory httpClientFactory, IFileShareRepository fileShareRepository)
|
||||||
{
|
{
|
||||||
_Logger = logger;
|
_Logger = logger;
|
||||||
_AppSettings = appSettings;
|
_AppSettings = appSettings;
|
||||||
_RdsToHeaderCommonCollection = new();
|
_RdsToHeaderCommonCollection = new();
|
||||||
|
_HttpClientFactory = httpClientFactory;
|
||||||
|
_FileShareRepository = fileShareRepository;
|
||||||
_RepositoryName = nameof(ExportRepository)[..^10];
|
_RepositoryName = nameof(ExportRepository)[..^10];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,32 +39,47 @@ public class ExportRepository : IExportRepository
|
|||||||
return new string[] { weekOfYear, lastWeekOfYear };
|
return new string[] { weekOfYear, lastWeekOfYear };
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<string> GetFiles(HeaderCommon headerCommon, string searchPattern)
|
private NginxFileSystemSortable[] GetNginxFileSystemSortableCollection(HeaderCommon headerCommon, HttpClient httpClient, string endsWith)
|
||||||
{
|
{
|
||||||
List<string> results = new();
|
List<NginxFileSystemSortable> results = new();
|
||||||
string directory;
|
Uri uri;
|
||||||
string[] weeks = Get();
|
string[] weeks = Get();
|
||||||
|
List<NginxFileSystemSortable> nginxFileSystemSortableCollection;
|
||||||
foreach (string weekYear in weeks)
|
foreach (string weekYear in weeks)
|
||||||
{
|
{
|
||||||
if (headerCommon.ID < 1)
|
if (headerCommon.ID < 1)
|
||||||
directory = Path.Combine(_AppSettings.ApiExportPath, "Archive", "API", weekYear, $"-{headerCommon.PSN}", $"-{headerCommon.Reactor}", $"-{headerCommon.RDS}");
|
uri = _FileShareRepository.Append(new Uri(_AppSettings.EcMesaFileShareMetrologySi), "Archive", "API", weekYear, $"-{headerCommon.PSN}", $"-{headerCommon.Reactor}", $"-{headerCommon.RDS}");
|
||||||
else
|
else
|
||||||
directory = Path.Combine(_AppSettings.ApiExportPath, "Archive", "API", weekYear, $"-{headerCommon.PSN}", $"-{headerCommon.Reactor}", $"-{headerCommon.RDS}", $"-{headerCommon.ID}");
|
uri = _FileShareRepository.Append(new Uri(_AppSettings.EcMesaFileShareMetrologySi), "Archive", "API", weekYear, $"-{headerCommon.PSN}", $"-{headerCommon.Reactor}", $"-{headerCommon.RDS}", $"-{headerCommon.ID}");
|
||||||
if (!Directory.Exists(directory))
|
nginxFileSystemSortableCollection = _FileShareRepository.GetNginxFileSystemSortableCollection(httpClient, uri, endsWith);
|
||||||
continue;
|
results.AddRange(nginxFileSystemSortableCollection);
|
||||||
results.AddRange(Directory.GetFiles(directory, searchPattern, SearchOption.AllDirectories));
|
|
||||||
}
|
}
|
||||||
return results;
|
return results.OrderByDescending(l => l.DateTime).ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetLines(HttpClient httpClient, NginxFileSystemSortable[] nginxFileSystemSortableCollection)
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
if (nginxFileSystemSortableCollection.Length != 1)
|
||||||
|
result = string.Empty;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HttpResponseMessage httpResponseMessage = _FileShareRepository.ReadFile(httpClient, nginxFileSystemSortableCollection.First().Uri);
|
||||||
|
if (httpResponseMessage.StatusCode != System.Net.HttpStatusCode.OK)
|
||||||
|
throw new Exception("File not found!");
|
||||||
|
Task<string> lines = httpResponseMessage.Content.ReadAsStringAsync();
|
||||||
|
lines.Wait();
|
||||||
|
result = lines.Result;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
string IExportRepository.GetExport(HeaderCommon headerCommon)
|
string IExportRepository.GetExport(HeaderCommon headerCommon)
|
||||||
{
|
{
|
||||||
string result;
|
string result;
|
||||||
List<string> files = GetFiles(headerCommon, "*.txt");
|
HttpClient httpClient = _HttpClientFactory.CreateClient();
|
||||||
if (files.Count != 1)
|
NginxFileSystemSortable[] nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(headerCommon, httpClient, ".txt");
|
||||||
result = string.Empty;
|
result = GetLines(httpClient, nginxFileSystemSortableCollection);
|
||||||
else
|
|
||||||
result = File.ReadAllText(files.First());
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,16 +94,17 @@ public class ExportRepository : IExportRepository
|
|||||||
JsonElement? jsonElement;
|
JsonElement? jsonElement;
|
||||||
const string ticks = "Ticks";
|
const string ticks = "Ticks";
|
||||||
JsonProperty[] jsonProperties;
|
JsonProperty[] jsonProperties;
|
||||||
List<string> files = GetFiles(headerCommon, "*.json");
|
HttpClient httpClient = _HttpClientFactory.CreateClient();
|
||||||
foreach (string file in files)
|
NginxFileSystemSortable[] nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(headerCommon, httpClient, ".json");
|
||||||
|
foreach (NginxFileSystemSortable nginxFileSystemSortable in nginxFileSystemSortableCollection)
|
||||||
{
|
{
|
||||||
json = File.ReadAllText(file);
|
json = GetLines(httpClient, nginxFileSystemSortableCollection);
|
||||||
hc = JsonSerializer.Deserialize<HeaderCommon>(json);
|
hc = JsonSerializer.Deserialize<HeaderCommon>(json);
|
||||||
if (hc is null)
|
if (hc is null)
|
||||||
continue;
|
continue;
|
||||||
if (hc.ID < 1)
|
if (hc.ID < 1)
|
||||||
{
|
{
|
||||||
directory = Path.GetDirectoryName(file);
|
directory = Path.GetDirectoryName(nginxFileSystemSortable.Uri.OriginalString);
|
||||||
if (directory is null)
|
if (directory is null)
|
||||||
continue;
|
continue;
|
||||||
directoryName = Path.GetFileName(directory);
|
directoryName = Path.GetFileName(directory);
|
||||||
@ -112,10 +135,11 @@ public class ExportRepository : IExportRepository
|
|||||||
List<HeaderCommon> results = new();
|
List<HeaderCommon> results = new();
|
||||||
string json;
|
string json;
|
||||||
HeaderCommon? hc;
|
HeaderCommon? hc;
|
||||||
List<string> files = GetFiles(headerCommon, "*.json");
|
HttpClient httpClient = _HttpClientFactory.CreateClient();
|
||||||
foreach (string file in files)
|
NginxFileSystemSortable[] nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(headerCommon, httpClient, ".json");
|
||||||
|
foreach (NginxFileSystemSortable nginxFileSystemSortable in nginxFileSystemSortableCollection)
|
||||||
{
|
{
|
||||||
json = File.ReadAllText(file);
|
json = GetLines(httpClient, nginxFileSystemSortableCollection);
|
||||||
hc = JsonSerializer.Deserialize<HeaderCommon>(json);
|
hc = JsonSerializer.Deserialize<HeaderCommon>(json);
|
||||||
if (hc is null)
|
if (hc is null)
|
||||||
continue;
|
continue;
|
||||||
@ -132,12 +156,92 @@ public class ExportRepository : IExportRepository
|
|||||||
string IExportRepository.GetProcessDataStandardFormat(HeaderCommon headerCommon)
|
string IExportRepository.GetProcessDataStandardFormat(HeaderCommon headerCommon)
|
||||||
{
|
{
|
||||||
string result;
|
string result;
|
||||||
List<string> files = GetFiles(headerCommon, "*.pdsf");
|
HttpClient httpClient = _HttpClientFactory.CreateClient();
|
||||||
if (files.Count != 1)
|
NginxFileSystemSortable[] nginxFileSystemSortableCollection = GetNginxFileSystemSortableCollection(headerCommon, httpClient, ".pdsf");
|
||||||
result = string.Empty;
|
result = GetLines(httpClient, nginxFileSystemSortableCollection);
|
||||||
else
|
|
||||||
result = File.ReadAllText(files.First());
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result<DataTable> IExportRepository.GetExportData(IMetrologyRepository metrologyRepository, int toolTypeId, string? datebegin, string? dateend)
|
||||||
|
{
|
||||||
|
Result<DataTable>? r;
|
||||||
|
DateTime dateEnd = dateend is null ? DateTime.Now : DateTime.Parse(dateend);
|
||||||
|
DateTime dateBegin = datebegin is null ? dateEnd.AddMonths(-1) : DateTime.Parse(datebegin);
|
||||||
|
ToolType tt = metrologyRepository.GetToolTypeByID(toolTypeId);
|
||||||
|
if (string.IsNullOrEmpty(tt.ExportSPName))
|
||||||
|
throw new NullReferenceException(nameof(tt.ExportSPName));
|
||||||
|
DataTable dataTable = metrologyRepository.ExportData(tt.ExportSPName, dateBegin, dateEnd);
|
||||||
|
r = new()
|
||||||
|
{
|
||||||
|
Results = dataTable,
|
||||||
|
TotalRows = dataTable.Rows.Count,
|
||||||
|
};
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static string FormatForCSV(string v)
|
||||||
|
{
|
||||||
|
StringBuilder result = new(v.Length + 2);
|
||||||
|
bool doubleQuoted = false;
|
||||||
|
if (v.StartsWith(' ') || v.EndsWith(' ') || v.Contains(',') || v.Contains('"'))
|
||||||
|
{
|
||||||
|
_ = result.Append('"');
|
||||||
|
doubleQuoted = true;
|
||||||
|
}
|
||||||
|
foreach (char c in v)
|
||||||
|
{
|
||||||
|
_ = c switch
|
||||||
|
{
|
||||||
|
'\r' or '\n' => result.Append(' '),
|
||||||
|
'"' => result.Append("\"\""),
|
||||||
|
_ => result.Append(c),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (doubleQuoted)
|
||||||
|
_ = result.Append('"');
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
string IExportRepository.GetCSVExport(IMetrologyRepository metrologyRepository, int toolTypeId, string? datebegin, string? dateend)
|
||||||
|
{
|
||||||
|
string results;
|
||||||
|
Result<DataTable> result;
|
||||||
|
IExportRepository repository = this;
|
||||||
|
result = repository.GetExportData(metrologyRepository, toolTypeId, datebegin, dateend);
|
||||||
|
if (result.Results is null)
|
||||||
|
throw new NullReferenceException(nameof(result.Results));
|
||||||
|
StringBuilder stringBuilder = new();
|
||||||
|
_ = stringBuilder.AppendLine(GetColumnHeaders(result.Results));
|
||||||
|
foreach (DataRow dr in result.Results.Rows)
|
||||||
|
_ = stringBuilder.AppendLine(GetRowData(dr));
|
||||||
|
results = stringBuilder.ToString();
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
106
Server/Repositories/FileShareRepository.cs
Normal file
106
Server/Repositories/FileShareRepository.cs
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
using OI.Metrology.Shared.Models;
|
||||||
|
using OI.Metrology.Shared.Models.Stateless;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Web;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Server.Repository;
|
||||||
|
|
||||||
|
public class FileShareRepository : IFileShareRepository
|
||||||
|
{
|
||||||
|
|
||||||
|
Uri IFileShareRepository.Append(Uri uri, params string[] paths) =>
|
||||||
|
new(paths.Aggregate(uri.AbsoluteUri, (current, path) => string.Format("{0}/{1}", current.TrimEnd('/'), path.TrimStart('/'))));
|
||||||
|
|
||||||
|
private Uri GetEndPoint(HttpClient httpClient, string method)
|
||||||
|
{
|
||||||
|
Uri result;
|
||||||
|
if (httpClient.BaseAddress is null)
|
||||||
|
throw new NullReferenceException(nameof(httpClient.BaseAddress));
|
||||||
|
IFileShareRepository fileShareRepository = this;
|
||||||
|
result = fileShareRepository.Append(httpClient.BaseAddress, "api", "v1", "file-share", method);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileShareRepository.CopyFile(string from, string to)
|
||||||
|
{
|
||||||
|
string directory = Path.GetDirectoryName(to) ?? throw new NullReferenceException();
|
||||||
|
if (!Directory.Exists(directory))
|
||||||
|
_ = Directory.CreateDirectory(directory);
|
||||||
|
File.Copy(from, to);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileShareRepository.MoveFile(string from, string to)
|
||||||
|
{
|
||||||
|
string directory = Path.GetDirectoryName(to) ?? throw new NullReferenceException();
|
||||||
|
if (!Directory.Exists(directory))
|
||||||
|
_ = Directory.CreateDirectory(directory);
|
||||||
|
if (File.Exists(to))
|
||||||
|
File.Move(to, $"{to}.{DateTime.Now.Ticks}.old");
|
||||||
|
File.Move(from, to);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileShareRepository.FileWrite(string path, string contents)
|
||||||
|
{
|
||||||
|
string directory = Path.GetDirectoryName(path) ?? throw new NullReferenceException();
|
||||||
|
if (!Directory.Exists(directory))
|
||||||
|
_ = Directory.CreateDirectory(directory);
|
||||||
|
File.WriteAllText(path, contents);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileShareRepository.CopyFile(HttpClient httpClient, string from, string to)
|
||||||
|
{
|
||||||
|
Uri uri = GetEndPoint(httpClient, "copy-file");
|
||||||
|
string encodedTo = HttpUtility.UrlEncode(to);
|
||||||
|
string encodedFrom = HttpUtility.UrlEncode(from);
|
||||||
|
Task<HttpResponseMessage> httpResponseMessage = httpClient.GetAsync($"{uri.OriginalString}?from={encodedFrom}&to={encodedTo}");
|
||||||
|
httpResponseMessage.Wait();
|
||||||
|
if (httpResponseMessage.Result.StatusCode != System.Net.HttpStatusCode.OK)
|
||||||
|
throw new Exception(httpResponseMessage.Result.StatusCode.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
void IFileShareRepository.MoveFile(HttpClient httpClient, string from, string to)
|
||||||
|
{
|
||||||
|
Uri uri = GetEndPoint(httpClient, "move-file");
|
||||||
|
string encodedTo = HttpUtility.UrlEncode(to);
|
||||||
|
string encodedFrom = HttpUtility.UrlEncode(from);
|
||||||
|
Task<HttpResponseMessage> httpResponseMessage = httpClient.GetAsync($"{uri.OriginalString}?from={encodedFrom}&to={encodedTo}");
|
||||||
|
httpResponseMessage.Wait();
|
||||||
|
if (httpResponseMessage.Result.StatusCode != System.Net.HttpStatusCode.OK)
|
||||||
|
throw new Exception(httpResponseMessage.Result.StatusCode.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
HttpResponseMessage IFileShareRepository.ReadFile(HttpClient httpClient, Uri uri)
|
||||||
|
{
|
||||||
|
HttpResponseMessage result;
|
||||||
|
Task<HttpResponseMessage> httpResponseMessage = httpClient.GetAsync(uri);
|
||||||
|
httpResponseMessage.Wait();
|
||||||
|
result = httpResponseMessage.Result;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<NginxFileSystemSortable> IFileShareRepository.GetNginxFileSystemSortableCollection(HttpClient httpClient, Uri uri, string? endsWith)
|
||||||
|
{
|
||||||
|
List<NginxFileSystemSortable> results = new();
|
||||||
|
Task<HttpResponseMessage> httpResponseMessage = httpClient.GetAsync(uri);
|
||||||
|
httpResponseMessage.Wait();
|
||||||
|
if (httpResponseMessage.Result.StatusCode == System.Net.HttpStatusCode.OK)
|
||||||
|
{
|
||||||
|
FileShareRepository fileShareRepository = this;
|
||||||
|
Task<string> json = httpResponseMessage.Result.Content.ReadAsStringAsync();
|
||||||
|
json.Wait();
|
||||||
|
NginxFileSystem[]? nginxFileSystemCollection = JsonSerializer.Deserialize(json.Result, NginxFileSystemCollectionSourceGenerationContext.Default.NginxFileSystemArray);
|
||||||
|
List<NginxFileSystemSortable> nginxFileSystemSortableCollection = NginxFileSystemSortable.Convert(fileShareRepository, uri, nginxFileSystemCollection);
|
||||||
|
foreach (NginxFileSystemSortable nginxFileSystemSortable in nginxFileSystemSortableCollection.OrderByDescending(l => l.DateTime))
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(endsWith) && !nginxFileSystemSortable.Name.EndsWith(endsWith))
|
||||||
|
continue;
|
||||||
|
results.Add(nginxFileSystemSortable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<CharacterizationInfo> IFileShareRepository.GetArchiveData(CharacterizationParameters archiveParameters) =>
|
||||||
|
throw new NotImplementedException();
|
||||||
|
|
||||||
|
}
|
@ -31,76 +31,42 @@ public class InboundRepository : IInboundRepository
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is the main endpoint, it accepts a JSON message that contains both the header and data records together
|
DataResponse IInboundRepository.Data(IMetrologyRepository metrologyRepository, IInboundDataService inboundDataService, string toolTypeName, JsonElement? jsonElement)
|
||||||
// tooltype is the ToolTypeName column from the ToolType table
|
|
||||||
// JToken is how you can accept a JSON message without deserialization.
|
|
||||||
// Using "string" doesn't work because ASP.NET Core will expect a json encoded string, not give you the actual string.
|
|
||||||
DataResponse IInboundRepository.Data(IMetrologyRepository metrologyRepository, IInboundDataService inboundDataService, string tooltype, string? json)
|
|
||||||
{
|
{
|
||||||
DataResponse result = new();
|
DataResponse result = new();
|
||||||
ToolType? toolType = metrologyRepository.GetToolTypeByName(tooltype);
|
if (jsonElement is null || jsonElement.Value.ValueKind != JsonValueKind.Object)
|
||||||
if (toolType is null)
|
throw new Exception("Invalid body!");
|
||||||
result.Errors.Add($"Invalid tool type: {tooltype}");
|
string? json = jsonElement.ToString();
|
||||||
else
|
JToken jToken = (string.IsNullOrEmpty(json) ? JToken.Parse("{}") : JToken.Parse(json)) ??
|
||||||
|
throw new Exception($"Invalid body: {json}");
|
||||||
|
ToolType toolType = metrologyRepository.GetToolTypeByName(toolTypeName) ??
|
||||||
|
throw new Exception($"Invalid tool type: {toolTypeName}");
|
||||||
|
List<ToolTypeMetadata> metaData = metrologyRepository.GetToolTypeMetadataByToolTypeID(toolType.ID).ToList();
|
||||||
|
inboundDataService.ValidateJSONFields(jToken, 0, metaData, result.Errors, result.Warnings);
|
||||||
|
if (result.Errors.Count == 0)
|
||||||
{
|
{
|
||||||
InboundCommon? inboundCommon = string.IsNullOrEmpty(json) ? null : JsonSerializer.Deserialize<InboundCommon>(json);
|
try
|
||||||
if (inboundCommon is null || string.IsNullOrEmpty(inboundCommon.ProcessDataStandardFormat))
|
|
||||||
result.Errors.Add($"Invalid body: {json}");
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
string? sourceDirectory = Path.GetDirectoryName(inboundCommon.ProcessDataStandardFormat);
|
result.HeaderID = inboundDataService.DoSQLInsert(jToken, toolType, metaData);
|
||||||
string? parentDirectory = Path.GetDirectoryName(sourceDirectory);
|
result.Success = result.HeaderID > 0;
|
||||||
if (string.IsNullOrEmpty(sourceDirectory) || string.IsNullOrEmpty(parentDirectory) || !Directory.Exists(parentDirectory))
|
|
||||||
result.Errors.Add($"Invalid body:path: <{inboundCommon.ProcessDataStandardFormat}>");
|
|
||||||
else
|
|
||||||
{
|
|
||||||
JToken jToken = string.IsNullOrEmpty(json) ? JToken.Parse("{}") : JToken.Parse(json);
|
|
||||||
if (jToken is null)
|
|
||||||
result.Errors.Add($"Invalid body: {json}");
|
|
||||||
else
|
|
||||||
{
|
|
||||||
List<ToolTypeMetadata> metaData = metrologyRepository.GetToolTypeMetadataByToolTypeID(toolType.ID).ToList();
|
|
||||||
if (metaData is null)
|
|
||||||
result.Errors.Add($"Invalid metadata for tool type: {tooltype}");
|
|
||||||
else
|
|
||||||
{
|
|
||||||
inboundDataService.ValidateJSONFields(jToken, 0, metaData, result.Errors, result.Warnings);
|
|
||||||
if (result.Errors.Count == 0)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
result.HeaderID = inboundDataService.DoSQLInsert(jToken, toolType, metaData);
|
|
||||||
result.Success = result.HeaderID > 0;
|
|
||||||
string? destinationDirectory = Path.Combine(parentDirectory, result.HeaderID.ToString());
|
|
||||||
Directory.Move(sourceDirectory, destinationDirectory);
|
|
||||||
}
|
|
||||||
catch (Exception ex) { result.Errors.Add(ex.Message); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
catch (Exception ex) { result.Errors.Add(ex.Message); }
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is the endpoint for attaching a field. It is not JSON, it is form-data/multipart like an HTML form because that's the normal way.
|
void IInboundRepository.AttachFile(IMetrologyRepository metrologyRepository, IAttachmentsService attachmentsService, string toolTypeName, Attachment? attachment)
|
||||||
// header ID is the ID value from the Header table
|
|
||||||
// datauniqueid is the Title value from the Data/Detail table
|
|
||||||
string? IInboundRepository.AttachFile(IMetrologyRepository metrologyRepository, IAttachmentsService attachmentsService, string tooltype, long headerid, string datauniqueid, string fileName, object uploadedFile)
|
|
||||||
{
|
{
|
||||||
string? result = null;
|
if (attachment is null)
|
||||||
ToolType toolType = metrologyRepository.GetToolTypeByName(tooltype);
|
throw new Exception("Invalid body!");
|
||||||
if (toolType is null)
|
ToolType toolType = metrologyRepository.GetToolTypeByName(toolTypeName) ??
|
||||||
result = $"Invalid tool type: {tooltype}";
|
throw new Exception($"Invalid tool type: {toolTypeName}");
|
||||||
string filename = Path.GetFileName(fileName);
|
if (string.IsNullOrWhiteSpace(attachment.DestinationFileName))
|
||||||
if (string.IsNullOrWhiteSpace(filename))
|
throw new Exception("Empty filename");
|
||||||
result = "Empty filename";
|
if (attachment.DestinationFileName.IndexOfAny(Path.GetInvalidFileNameChars()) >= 0)
|
||||||
if (filename.IndexOfAny(Path.GetInvalidFileNameChars()) >= 0)
|
throw new Exception("Invalid filename");
|
||||||
result = "Invalid filename";
|
attachmentsService.SaveAttachment(toolType, attachment);
|
||||||
if (result is null && toolType is not null)
|
|
||||||
attachmentsService.SaveAttachment(toolType, headerid, datauniqueid, filename, uploadedFile);
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -30,7 +30,7 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
|
|||||||
}
|
}
|
||||||
|
|
||||||
string IInfinityQSV3Repository.GetCommandText(string subGroupId)
|
string IInfinityQSV3Repository.GetCommandText(string subGroupId)
|
||||||
{
|
{ // cSpell:disable
|
||||||
StringBuilder result = new();
|
StringBuilder result = new();
|
||||||
if (string.IsNullOrEmpty(subGroupId))
|
if (string.IsNullOrEmpty(subGroupId))
|
||||||
throw new ArgumentException(null, nameof(subGroupId));
|
throw new ArgumentException(null, nameof(subGroupId));
|
||||||
@ -50,10 +50,10 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
|
|||||||
_ = result.Append(" where sd.f_sgrp = ").Append(subGroupId).AppendLine(" ");
|
_ = result.Append(" where sd.f_sgrp = ").Append(subGroupId).AppendLine(" ");
|
||||||
_ = result.AppendLine(" for json path ");
|
_ = result.AppendLine(" for json path ");
|
||||||
return result.ToString();
|
return result.ToString();
|
||||||
}
|
} // cSpell:enable
|
||||||
|
|
||||||
string IInfinityQSV3Repository.GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime)
|
string IInfinityQSV3Repository.GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime)
|
||||||
{
|
{ // cSpell:disable
|
||||||
StringBuilder result = new();
|
StringBuilder result = new();
|
||||||
const string dateTimeFormat = "yyyy-MM-dd HH:mm:ss";
|
const string dateTimeFormat = "yyyy-MM-dd HH:mm:ss";
|
||||||
if (!string.IsNullOrEmpty(dateTime) && (dateTime.Contains('-') || dateTime.Contains(' ') || dateTime.Contains(':')) && dateTime.Length != dateTimeFormat.Length)
|
if (!string.IsNullOrEmpty(dateTime) && (dateTime.Contains('-') || dateTime.Contains(' ') || dateTime.Contains(':')) && dateTime.Length != dateTimeFormat.Length)
|
||||||
@ -144,7 +144,7 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
|
|||||||
.AppendLine(" iq.td_test ")
|
.AppendLine(" iq.td_test ")
|
||||||
.AppendLine(" for json path ");
|
.AppendLine(" for json path ");
|
||||||
return result.ToString();
|
return result.ToString();
|
||||||
}
|
} // cSpell:enable
|
||||||
|
|
||||||
private static StringBuilder GetForJsonPath(IDbConnectionFactory dbConnectionFactory, string commandText)
|
private static StringBuilder GetForJsonPath(IDbConnectionFactory dbConnectionFactory, string commandText)
|
||||||
{
|
{
|
||||||
@ -226,7 +226,7 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
|
|||||||
}
|
}
|
||||||
|
|
||||||
string IInfinityQSV3Repository.GetCommandText(InfinityQSV3 infinityQSV3)
|
string IInfinityQSV3Repository.GetCommandText(InfinityQSV3 infinityQSV3)
|
||||||
{
|
{ // cSpell:disable
|
||||||
StringBuilder result = new();
|
StringBuilder result = new();
|
||||||
if (string.IsNullOrEmpty(infinityQSV3.Process))
|
if (string.IsNullOrEmpty(infinityQSV3.Process))
|
||||||
throw new ArgumentException(nameof(infinityQSV3.Process));
|
throw new ArgumentException(nameof(infinityQSV3.Process));
|
||||||
@ -254,7 +254,7 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
|
|||||||
.Append(" and ev.f_sgtm = ").Append(infinityQSV3.SubGroupDateTime).AppendLine(" ")
|
.Append(" and ev.f_sgtm = ").Append(infinityQSV3.SubGroupDateTime).AppendLine(" ")
|
||||||
.AppendLine(" for json path ");
|
.AppendLine(" for json path ");
|
||||||
return result.ToString();
|
return result.ToString();
|
||||||
}
|
} // cSpell:enable
|
||||||
|
|
||||||
Result<InfinityQSV3[]> IInfinityQSV3Repository.GetHeader(string subGroupId)
|
Result<InfinityQSV3[]> IInfinityQSV3Repository.GetHeader(string subGroupId)
|
||||||
{
|
{
|
||||||
@ -281,7 +281,7 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
|
|||||||
}
|
}
|
||||||
|
|
||||||
string IInfinityQSV3Repository.GetCommandText(string process, string? part)
|
string IInfinityQSV3Repository.GetCommandText(string process, string? part)
|
||||||
{
|
{ // cSpell:disable
|
||||||
StringBuilder result = new();
|
StringBuilder result = new();
|
||||||
if (string.IsNullOrEmpty(process))
|
if (string.IsNullOrEmpty(process))
|
||||||
throw new ArgumentException(null, nameof(process));
|
throw new ArgumentException(null, nameof(process));
|
||||||
@ -304,7 +304,7 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
|
|||||||
.Append(" and part.f_name = '").Append(part).AppendLine("' ")
|
.Append(" and part.f_name = '").Append(part).AppendLine("' ")
|
||||||
.AppendLine(" for json path; ");
|
.AppendLine(" for json path; ");
|
||||||
return result.ToString();
|
return result.ToString();
|
||||||
}
|
} // cSpell:enable
|
||||||
|
|
||||||
string IInfinityQSV3Repository.GetProductDataAverageSumOfDefectsProcessMeanProcessSigma(string process, string? recipe)
|
string IInfinityQSV3Repository.GetProductDataAverageSumOfDefectsProcessMeanProcessSigma(string process, string? recipe)
|
||||||
{
|
{
|
||||||
@ -363,7 +363,7 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
|
|||||||
}
|
}
|
||||||
|
|
||||||
string IInfinityQSV3Repository.GetCommandText(List<string> eppReactorNumbers)
|
string IInfinityQSV3Repository.GetCommandText(List<string> eppReactorNumbers)
|
||||||
{
|
{ // cSpell:disable
|
||||||
StringBuilder result = new();
|
StringBuilder result = new();
|
||||||
_ = result
|
_ = result
|
||||||
.AppendLine(" select se.f_sgrp, ")
|
.AppendLine(" select se.f_sgrp, ")
|
||||||
@ -411,7 +411,7 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
|
|||||||
.AppendLine(" order by iq.pr_name ")
|
.AppendLine(" order by iq.pr_name ")
|
||||||
.AppendLine(" for json path; ");
|
.AppendLine(" for json path; ");
|
||||||
return result.ToString();
|
return result.ToString();
|
||||||
}
|
} // cSpell:enable
|
||||||
|
|
||||||
private static List<string> Convert(int[] night)
|
private static List<string> Convert(int[] night)
|
||||||
{
|
{
|
||||||
@ -484,17 +484,16 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
|
|||||||
continue;
|
continue;
|
||||||
used.Add(i);
|
used.Add(i);
|
||||||
found = false;
|
found = false;
|
||||||
timeSpan = new(ticks - infinityQS1090FullLoad.SubGroupIdFormated.Ticks);
|
timeSpan = new(ticks - infinityQS1090FullLoad.SubGroupIdFormatted.Ticks);
|
||||||
loadedCount = reactor.LoadedRDS is null ? 0 : reactor.LoadedRDS.Count;
|
loadedCount = reactor.LoadedRDS is null ? 0 : reactor.LoadedRDS.Count;
|
||||||
loadedRDS = reactor.LoadedRDS is null ? " " : reactor.LoadedRDS[0].ToString();
|
loadedRDS = reactor.LoadedRDS is null ? " " : reactor.LoadedRDS[0].ToString();
|
||||||
results.Add(new string[]
|
results.Add(new string[]{
|
||||||
{
|
|
||||||
reactor.ReactorNo.ToString(),
|
reactor.ReactorNo.ToString(),
|
||||||
reactor.E10State,
|
reactor.E10State,
|
||||||
loadedRDS,
|
loadedRDS,
|
||||||
infinityQS1090FullLoad.Value.ToString(),
|
infinityQS1090FullLoad.Value.ToString(),
|
||||||
infinityQS1090FullLoad.TemperatureOffsetPercentage.ToString(),
|
infinityQS1090FullLoad.TemperatureOffsetPercentage.ToString(),
|
||||||
infinityQS1090FullLoad.SubGroupIdFormated.ToString(),
|
infinityQS1090FullLoad.SubGroupIdFormatted.ToString(),
|
||||||
Math.Floor(timeSpan.TotalHours).ToString()
|
Math.Floor(timeSpan.TotalHours).ToString()
|
||||||
});
|
});
|
||||||
for (int j = i + 1; j < infinityQS1090FullLoads.Length; j++)
|
for (int j = i + 1; j < infinityQS1090FullLoads.Length; j++)
|
||||||
@ -510,21 +509,21 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
|
|||||||
continue;
|
continue;
|
||||||
used.Add(j);
|
used.Add(j);
|
||||||
found = true;
|
found = true;
|
||||||
timeSpan = new(ticks - infinityQS1090FullLoad.SubGroupIdFormated.Ticks);
|
timeSpan = new(ticks - infinityQS1090FullLoad.SubGroupIdFormatted.Ticks);
|
||||||
loadedCount = reactor.LoadedRDS is null ? 0 : reactor.LoadedRDS.Count;
|
loadedCount = reactor.LoadedRDS is null ? 0 : reactor.LoadedRDS.Count;
|
||||||
loadedRDS = reactor.LoadedRDS is null ? " " : reactor.LoadedRDS[0].ToString();
|
loadedRDS = reactor.LoadedRDS is null ? " " : reactor.LoadedRDS[0].ToString();
|
||||||
columns = new();
|
columns = new();
|
||||||
columns.AddRange(results[^1]);
|
columns.AddRange(results[^1]);
|
||||||
columns.AddRange(new string[]
|
columns.AddRange(new string[]
|
||||||
{
|
{
|
||||||
" ",
|
" ",
|
||||||
reactor.ReactorNo.ToString(),
|
reactor.ReactorNo.ToString(),
|
||||||
reactor.E10State,
|
reactor.E10State,
|
||||||
loadedRDS,
|
loadedRDS,
|
||||||
infinityQS1090FullLoad.Value.ToString(),
|
infinityQS1090FullLoad.Value.ToString(),
|
||||||
infinityQS1090FullLoad.TemperatureOffsetPercentage.ToString(),
|
infinityQS1090FullLoad.TemperatureOffsetPercentage.ToString(),
|
||||||
infinityQS1090FullLoad.SubGroupIdFormated.ToString(),
|
infinityQS1090FullLoad.SubGroupIdFormatted.ToString(),
|
||||||
Math.Floor(timeSpan.TotalHours).ToString()
|
Math.Floor(timeSpan.TotalHours).ToString()
|
||||||
});
|
});
|
||||||
results[^1] = columns.ToArray();
|
results[^1] = columns.ToArray();
|
||||||
break;
|
break;
|
||||||
@ -556,8 +555,8 @@ public class InfinityQSV3Repository : IInfinityQSV3Repository
|
|||||||
foreach (string[] row in collection)
|
foreach (string[] row in collection)
|
||||||
{
|
{
|
||||||
_ = result.Append("<tr>");
|
_ = result.Append("<tr>");
|
||||||
foreach (string coulmn in row)
|
foreach (string column in row)
|
||||||
_ = result.Append("<td>").Append(coulmn).Append("</td>");
|
_ = result.Append("<td>").Append(column).Append("</td>");
|
||||||
_ = result.Append("</tr>");
|
_ = result.Append("</tr>");
|
||||||
}
|
}
|
||||||
return result.ToString();
|
return result.ToString();
|
||||||
|
702
Server/Repositories/InfinityQSV4Repository.cs
Normal file
702
Server/Repositories/InfinityQSV4Repository.cs
Normal file
@ -0,0 +1,702 @@
|
|||||||
|
using OI.Metrology.Server.Models;
|
||||||
|
using OI.Metrology.Shared.DataModels;
|
||||||
|
using OI.Metrology.Shared.Models;
|
||||||
|
using OI.Metrology.Shared.Models.Stateless;
|
||||||
|
using OI.Metrology.Shared.Repositories;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Server.Repository;
|
||||||
|
|
||||||
|
public class InfinityQSV4Repository : IInfinityQSV4Repository
|
||||||
|
{
|
||||||
|
|
||||||
|
private record Record(string? Color, string Text);
|
||||||
|
|
||||||
|
private readonly string _MockRoot;
|
||||||
|
private readonly string _RepositoryName;
|
||||||
|
private readonly AppSettings _AppSettings;
|
||||||
|
private readonly IHttpClientFactory _HttpClientFactory;
|
||||||
|
private readonly IDbConnectionFactory _DBConnectionFactory;
|
||||||
|
private readonly IFileShareRepository _FileShareRepository;
|
||||||
|
private readonly string _OpenInsightApplicationProgrammingInterface;
|
||||||
|
|
||||||
|
public InfinityQSV4Repository(AppSettings appSettings, IDbConnectionFactory dbConnectionFactory, IHttpClientFactory httpClientFactory, IFileShareRepository fileShareRepository)
|
||||||
|
{
|
||||||
|
_AppSettings = appSettings;
|
||||||
|
_MockRoot = appSettings.MockRoot;
|
||||||
|
_HttpClientFactory = httpClientFactory;
|
||||||
|
_DBConnectionFactory = dbConnectionFactory;
|
||||||
|
_FileShareRepository = fileShareRepository;
|
||||||
|
_RepositoryName = nameof(InfinityQSV4Repository)[..^10];
|
||||||
|
_OpenInsightApplicationProgrammingInterface = appSettings.OpenInsightApplicationProgrammingInterface;
|
||||||
|
}
|
||||||
|
|
||||||
|
string IInfinityQSV4Repository.GetCommandText(string subGroupId)
|
||||||
|
{ // cSpell:disable
|
||||||
|
List<string> results = [];
|
||||||
|
if (string.IsNullOrEmpty(subGroupId))
|
||||||
|
throw new ArgumentException(null, nameof(subGroupId));
|
||||||
|
results.Add(" select ");
|
||||||
|
results.Add(" sd.f_sgrp sd_sgrp, ");
|
||||||
|
results.Add(" sd.f_tsno sd_tsno, ");
|
||||||
|
results.Add(" dd.f_dsgp dd_dsgp, ");
|
||||||
|
results.Add(" dg.f_name gd_name, ");
|
||||||
|
results.Add(" dd.f_name dd_name ");
|
||||||
|
results.Add(" from [SPCEPIWORLD].[dbo].[SGRP_DSC] sd ");
|
||||||
|
results.Add(" join [SPCEPIWORLD].[dbo].[DESC_DAT] dd ");
|
||||||
|
results.Add(" on sd.f_dsgp = dd.f_dsgp ");
|
||||||
|
results.Add(" and sd.f_desc = dd.f_desc ");
|
||||||
|
results.Add(" join [SPCEPIWORLD].[dbo].[DESC_GRP] dg ");
|
||||||
|
results.Add(" on dd.f_dsgp = dg.f_dsgp ");
|
||||||
|
results.Add($" where sd.f_sgrp = {subGroupId} ");
|
||||||
|
results.Add(" for json path ");
|
||||||
|
return string.Join(' ', results);
|
||||||
|
} // cSpell:enable
|
||||||
|
|
||||||
|
string IInfinityQSV4Repository.GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime)
|
||||||
|
{ // cSpell:disable
|
||||||
|
List<string> results = [];
|
||||||
|
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));
|
||||||
|
results.Add(" select case when iq.sl_loos is null then 0 else iq.sl_loos end + ");
|
||||||
|
results.Add(" case when iq.sl_uoos is null then 0 else iq.sl_uoos end + ");
|
||||||
|
results.Add(" iq.ev_count as iq_sum, ");
|
||||||
|
results.Add(" iq.sl_aflag, ");
|
||||||
|
results.Add(" iq.sl_loos, ");
|
||||||
|
results.Add(" iq.sl_uoos, ");
|
||||||
|
results.Add(" iq.se_sgrp, ");
|
||||||
|
results.Add(" iq.se_sgtm, ");
|
||||||
|
results.Add(" iq.se_tsno, ");
|
||||||
|
results.Add(" iq.td_test, ");
|
||||||
|
results.Add(" iq.pr_name, ");
|
||||||
|
results.Add(" iq.jd_name, ");
|
||||||
|
results.Add(" iq.pl_name, ");
|
||||||
|
results.Add(" iq.pd_name, ");
|
||||||
|
results.Add(" iq.td_name, ");
|
||||||
|
results.Add(" iq.se_val, ");
|
||||||
|
results.Add(" iq.sl_eflag, ");
|
||||||
|
results.Add(" iq.sl_scal, ");
|
||||||
|
results.Add(" iq.sl_sls, ");
|
||||||
|
results.Add(" iq.sl_usl ");
|
||||||
|
results.Add(" from ( ");
|
||||||
|
results.Add(" select ");
|
||||||
|
results.Add(" se.f_sgrp se_sgrp, ");
|
||||||
|
results.Add(" se.f_sgtm se_sgtm, ");
|
||||||
|
results.Add(" se.f_tsno se_tsno, ");
|
||||||
|
results.Add(" se.f_val se_val, ");
|
||||||
|
results.Add(" pr.f_name pr_name, ");
|
||||||
|
results.Add(" jd.f_name jd_name, ");
|
||||||
|
results.Add(" pl.f_name pl_name, ");
|
||||||
|
results.Add(" pd.f_name pd_name, ");
|
||||||
|
results.Add(" td.f_test td_test, ");
|
||||||
|
results.Add(" td.f_name td_name, ");
|
||||||
|
results.Add(" sl.f_eflag sl_eflag, ");
|
||||||
|
results.Add(" sl.f_aflag sl_aflag, ");
|
||||||
|
results.Add(" sl.f_scal sl_scal, ");
|
||||||
|
results.Add(" sl.f_lsl sl_sls, ");
|
||||||
|
results.Add(" sl.f_usl sl_usl, ");
|
||||||
|
results.Add(" case when sl.f_aflag is null or sl.f_aflag = 0 then null else ");
|
||||||
|
results.Add(" case when round(se.f_val, sl.F_scal, 1) < sl.f_lsl then 1 else 0 end ");
|
||||||
|
results.Add(" end as sl_loos, ");
|
||||||
|
results.Add(" case when sl.f_aflag is null or sl.f_aflag = 0 then null else ");
|
||||||
|
results.Add(" case when round(se.f_val, sl.F_scal, 1) > sl.f_usl then 1 else 0 end ");
|
||||||
|
results.Add(" end as sl_uoos, ");
|
||||||
|
results.Add(" (select count(ev.f_evnt) ");
|
||||||
|
results.Add(" from [spcepiworld].[dbo].[evnt_inf] ev ");
|
||||||
|
results.Add(" where ev.f_prcs = pr.f_prcs ");
|
||||||
|
results.Add(" and ev.f_part = pd.f_part ");
|
||||||
|
results.Add(" and ev.f_sgtm = se.f_sgtm ");
|
||||||
|
results.Add(" ) ev_count ");
|
||||||
|
results.Add(" from [spcepiworld].[dbo].[sgrp_ext] se ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[prcs_dat] pr ");
|
||||||
|
results.Add(" on se.f_prcs = pr.f_prcs ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[job_dat] jd ");
|
||||||
|
results.Add(" on se.f_job = jd.f_job ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[part_lot] pl ");
|
||||||
|
results.Add(" on se.f_lot = pl.f_lot ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[part_dat] pd ");
|
||||||
|
results.Add(" on se.f_part = pd.f_part ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[test_dat] td ");
|
||||||
|
results.Add(" on se.f_test = td.f_test ");
|
||||||
|
results.Add(" left join [spcepiworld].[dbo].[spec_lim] sl ");
|
||||||
|
results.Add(" on se.f_part = sl.f_part ");
|
||||||
|
results.Add(" and se.f_test = sl.f_test ");
|
||||||
|
results.Add(" where se.f_flag = 0 ");
|
||||||
|
results.Add(" and (sl.f_prcs is null or se.f_prcs = sl.f_prcs or sl.f_prcs = 0) ");
|
||||||
|
if (!string.IsNullOrEmpty(subGroupId))
|
||||||
|
results.Add($" and se.f_sgrp = {subGroupId.Split(" ")[0]} ");
|
||||||
|
if (!string.IsNullOrEmpty(process))
|
||||||
|
results.Add($" and pr.f_name = '{process}' ");
|
||||||
|
if (!string.IsNullOrEmpty(part))
|
||||||
|
results.Add($" and pd.f_name = '{part}' ");
|
||||||
|
if (!string.IsNullOrEmpty(job))
|
||||||
|
results.Add($" and jd.f_name = '{job}' ");
|
||||||
|
if (!string.IsNullOrEmpty(lot))
|
||||||
|
results.Add($" and pl.f_name = '{lot}' ");
|
||||||
|
if (!string.IsNullOrEmpty(dateTime) && (dateTime.Contains('-') || dateTime.Contains(' ') || dateTime.Contains(':')))
|
||||||
|
results.Add($" and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '{dateTime}' ");
|
||||||
|
results.Add(" ) as iq ");
|
||||||
|
results.Add(" order by iq.sl_loos + iq.sl_uoos + iq.ev_count desc, ");
|
||||||
|
results.Add(" iq.sl_aflag desc, ");
|
||||||
|
results.Add(" iq.se_sgrp, ");
|
||||||
|
results.Add(" iq.se_tsno, ");
|
||||||
|
results.Add(" iq.td_test ");
|
||||||
|
results.Add(" for json path ");
|
||||||
|
return string.Join(' ', results);
|
||||||
|
} // cSpell:enable
|
||||||
|
|
||||||
|
private JsonElement[] GetAllReactorsAsJsonElementElement()
|
||||||
|
{
|
||||||
|
JsonElement[]? results;
|
||||||
|
HttpClient httpClient = _HttpClientFactory.CreateClient();
|
||||||
|
Task<string> task = httpClient.GetStringAsync($"{_OpenInsightApplicationProgrammingInterface}/reactors");
|
||||||
|
task.Wait();
|
||||||
|
JsonElement? jsonElement = JsonSerializer.Deserialize<JsonElement>(task.Result);
|
||||||
|
if (jsonElement is null)
|
||||||
|
throw new NullReferenceException(nameof(jsonElement));
|
||||||
|
string json = jsonElement.Value.EnumerateObject().First().Value.ToString();
|
||||||
|
results = JsonSerializer.Deserialize<JsonElement[]>(json);
|
||||||
|
if (results is null)
|
||||||
|
throw new NullReferenceException(nameof(results));
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static StringBuilder GetForJsonPath(IDbConnectionFactory dbConnectionFactory, string commandText, bool useIqsConnection)
|
||||||
|
{
|
||||||
|
StringBuilder stringBuilder = new();
|
||||||
|
File.WriteAllText("../../.sql", commandText);
|
||||||
|
using DbConnection dbConnection = dbConnectionFactory.GetDbConnection(useIqsConnection);
|
||||||
|
DbCommand dbCommand = dbConnection.CreateCommand();
|
||||||
|
dbCommand.CommandText = commandText;
|
||||||
|
DbDataReader dbDataReader = dbCommand.ExecuteReader(CommandBehavior.SequentialAccess);
|
||||||
|
while (dbDataReader.Read())
|
||||||
|
_ = stringBuilder.Append(dbDataReader.GetString(0));
|
||||||
|
return stringBuilder;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void GetOI(InfinityQSV4 infinityQSV4)
|
||||||
|
{
|
||||||
|
IInfinityQSV4Repository infinityQSV4Repository = this;
|
||||||
|
if (string.IsNullOrEmpty(infinityQSV4.Part))
|
||||||
|
throw new ArgumentException(nameof(infinityQSV4.Part));
|
||||||
|
string json = infinityQSV4Repository.GetProductionSpecification(infinityQSV4.Part);
|
||||||
|
File.WriteAllText("../../.json", json);
|
||||||
|
ProdSpecRoot? prodSpec = JsonSerializer.Deserialize(json, ProdSpecRootSourceGenerationContext.Default.ProdSpecRoot);
|
||||||
|
if (prodSpec is null)
|
||||||
|
{
|
||||||
|
if (prodSpec is null)
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<string> Convert(int[] night)
|
||||||
|
{
|
||||||
|
List<string> results = new();
|
||||||
|
foreach (int reactor in night)
|
||||||
|
results.Add(reactor.ToString());
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ReadOnlyDictionary<int, Reactor> GetReactorsMatchingType(string? reactTypeFilter)
|
||||||
|
{
|
||||||
|
Dictionary<int, Reactor> results = new();
|
||||||
|
string json;
|
||||||
|
Reactor? reactor;
|
||||||
|
JsonElement[]? jsonElements = GetAllReactorsAsJsonElementElement();
|
||||||
|
foreach (JsonElement jsonElement in jsonElements)
|
||||||
|
{
|
||||||
|
json = jsonElement.EnumerateObject().First().Value.ToString();
|
||||||
|
if (reactTypeFilter is not null && !json.Contains(reactTypeFilter))
|
||||||
|
continue;
|
||||||
|
try
|
||||||
|
{ reactor = JsonSerializer.Deserialize(json, ReactorSourceGenerationContext.Default.Reactor); }
|
||||||
|
catch (Exception) { reactor = null; }
|
||||||
|
if (reactor is null || (reactTypeFilter is not null && reactor.ReactType != reactTypeFilter))
|
||||||
|
continue;
|
||||||
|
results.Add(reactor.ReactorNo, reactor);
|
||||||
|
}
|
||||||
|
return new(results);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static InfinityQSV4 GetInfinityQSV4(IDbConnectionFactory dbConnectionFactory, IInfinityQSV4Repository infinityQSV4Repository, string subGroupId)
|
||||||
|
{
|
||||||
|
InfinityQSV4 result;
|
||||||
|
string commandText = infinityQSV4Repository.GetCommandText(subGroupId, process: string.Empty, job: string.Empty, part: string.Empty, lot: string.Empty, dateTime: string.Empty);
|
||||||
|
StringBuilder stringBuilder = GetForJsonPath(dbConnectionFactory, commandText, useIqsConnection: false);
|
||||||
|
InfinityQSV4[]? results = stringBuilder.Length == 0 ? Array.Empty<InfinityQSV4>() : JsonSerializer.Deserialize(stringBuilder.ToString(), ResultInfinityQSV4SourceGenerationContext.Default.InfinityQSV4Array); // , new JsonSerializerOptions { PropertyNameCaseInsensitive = true }
|
||||||
|
if (results is null)
|
||||||
|
throw new NullReferenceException(nameof(results));
|
||||||
|
result = results.First();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<InfinityQSV4[]> IInfinityQSV4Repository.GetData(string subGroupId)
|
||||||
|
{
|
||||||
|
Result<InfinityQSV4[]>? result;
|
||||||
|
if (!string.IsNullOrEmpty(_MockRoot))
|
||||||
|
{
|
||||||
|
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV4Repository.GetData)}.json"));
|
||||||
|
result = JsonSerializer.Deserialize(json, ResultInfinityQSV4SourceGenerationContext.Default.ResultInfinityQSV4Array);
|
||||||
|
if (result is null)
|
||||||
|
throw new NullReferenceException(nameof(result));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IInfinityQSV4Repository infinityQSV4Repository = this;
|
||||||
|
InfinityQSV4 infinityQSV4 = GetInfinityQSV4(_DBConnectionFactory, infinityQSV4Repository, subGroupId);
|
||||||
|
GetOI(infinityQSV4);
|
||||||
|
string commandText = infinityQSV4Repository.GetCommandText(subGroupId, process: infinityQSV4.Process, job: infinityQSV4.Job, part: infinityQSV4.Part, lot: infinityQSV4.Lot, dateTime: string.Concat(infinityQSV4.SubGroupDateTime));
|
||||||
|
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText, useIqsConnection: false);
|
||||||
|
InfinityQSV4[]? results = stringBuilder.Length == 0 ? Array.Empty<InfinityQSV4>() : JsonSerializer.Deserialize(stringBuilder.ToString(), ResultInfinityQSV4SourceGenerationContext.Default.InfinityQSV4Array); // , new JsonSerializerOptions { PropertyNameCaseInsensitive = true }
|
||||||
|
if (results is null)
|
||||||
|
throw new NullReferenceException(nameof(results));
|
||||||
|
result = new()
|
||||||
|
{
|
||||||
|
Results = results,
|
||||||
|
TotalRows = results.Length,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<InfinityQSDescriptorV4[]> IInfinityQSV4Repository.GetDescriptors(string subGroupId)
|
||||||
|
{
|
||||||
|
Result<InfinityQSDescriptorV4[]>? result;
|
||||||
|
if (!string.IsNullOrEmpty(_MockRoot))
|
||||||
|
{
|
||||||
|
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV4Repository.GetDescriptors)}.json"));
|
||||||
|
result = JsonSerializer.Deserialize(json, ResultInfinityQSDescriptorV4SourceGenerationContext.Default.ResultInfinityQSDescriptorV4Array);
|
||||||
|
if (result is null)
|
||||||
|
throw new NullReferenceException(nameof(result));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IInfinityQSV4Repository infinityQSV4Repository = this;
|
||||||
|
string commandText = infinityQSV4Repository.GetCommandText(subGroupId);
|
||||||
|
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText, useIqsConnection: false);
|
||||||
|
InfinityQSDescriptorV4[]? results = stringBuilder.Length == 0 ? Array.Empty<InfinityQSDescriptorV4>() : JsonSerializer.Deserialize(stringBuilder.ToString(), ResultInfinityQSDescriptorV4SourceGenerationContext.Default.InfinityQSDescriptorV4Array); // , new JsonSerializerOptions { PropertyNameCaseInsensitive = true }
|
||||||
|
if (results is null)
|
||||||
|
throw new NullReferenceException(nameof(results));
|
||||||
|
result = new()
|
||||||
|
{
|
||||||
|
Results = results,
|
||||||
|
TotalRows = results.Length,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
string IInfinityQSV4Repository.GetCommandText(InfinityQSV4 infinityQSV4)
|
||||||
|
{ // cSpell:disable
|
||||||
|
List<string> results = [];
|
||||||
|
if (string.IsNullOrEmpty(infinityQSV4.Process))
|
||||||
|
throw new ArgumentException(nameof(infinityQSV4.Process));
|
||||||
|
if (string.IsNullOrEmpty(infinityQSV4.Part))
|
||||||
|
throw new ArgumentException(nameof(infinityQSV4.Part));
|
||||||
|
results.Add(" select ");
|
||||||
|
results.Add(" ev.f_evnt [ev_evnt], ");
|
||||||
|
results.Add(" ev.f_sgtm [ev_sgtm], ");
|
||||||
|
results.Add(" dateadd(HH, -7, (dateadd(SS, convert(bigint, ev.f_sgtm), '19700101'))) [ev_utc7], ");
|
||||||
|
results.Add(" pr.f_name [pr_name], ");
|
||||||
|
results.Add(" pd.f_name [pd_name], ");
|
||||||
|
results.Add(" td.f_test [td_test], ");
|
||||||
|
results.Add(" td.f_name [td_name], ");
|
||||||
|
results.Add(" ev.f_name [ev_name] ");
|
||||||
|
results.Add(" from [spcepiworld].[dbo].[evnt_inf] ev ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[prcs_dat] pr ");
|
||||||
|
results.Add(" on ev.f_prcs = pr.f_prcs ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[part_dat] pd ");
|
||||||
|
results.Add(" on ev.f_part = pd.f_part ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[test_dat] td ");
|
||||||
|
results.Add(" on ev.f_test = td.f_test ");
|
||||||
|
results.Add($" where pr.f_name = '{infinityQSV4.Process}' ");
|
||||||
|
results.Add($" and pd.f_name = '{infinityQSV4.Part}' ");
|
||||||
|
results.Add($" and ev.f_sgtm = {infinityQSV4.SubGroupDateTime} ");
|
||||||
|
results.Add(" for json path ");
|
||||||
|
return string.Join(' ', results);
|
||||||
|
} // cSpell:enable
|
||||||
|
|
||||||
|
Result<InfinityQSV4[]> IInfinityQSV4Repository.GetHeader(string subGroupId)
|
||||||
|
{
|
||||||
|
Result<InfinityQSV4[]>? result;
|
||||||
|
if (!string.IsNullOrEmpty(_MockRoot))
|
||||||
|
{
|
||||||
|
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV4Repository.GetHeader)}.json"));
|
||||||
|
result = JsonSerializer.Deserialize(json, ResultInfinityQSV4SourceGenerationContext.Default.ResultInfinityQSV4Array);
|
||||||
|
if (result is null)
|
||||||
|
throw new NullReferenceException(nameof(result));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IInfinityQSV4Repository infinityQSV4Repository = this;
|
||||||
|
InfinityQSV4 infinityQSV4 = GetInfinityQSV4(_DBConnectionFactory, infinityQSV4Repository, subGroupId);
|
||||||
|
InfinityQSV4[] results = new InfinityQSV4[] { infinityQSV4 };
|
||||||
|
result = new()
|
||||||
|
{
|
||||||
|
Results = results,
|
||||||
|
TotalRows = results.Length,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
string IInfinityQSV4Repository.GetCommandText(string process, string? part)
|
||||||
|
{ // cSpell:disable
|
||||||
|
List<string> results = [];
|
||||||
|
if (string.IsNullOrEmpty(process))
|
||||||
|
throw new ArgumentException(null, nameof(process));
|
||||||
|
if (string.IsNullOrEmpty(part))
|
||||||
|
throw new ArgumentException(null, nameof(part));
|
||||||
|
results.Add(" select [f_mean] as ProcessMean, ");
|
||||||
|
results.Add(" [f_sp] as ProcessSigma ");
|
||||||
|
results.Add(" from [spcepiworld].[dbo].[test_dat] test ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[ctrl_lim] ctrl ");
|
||||||
|
results.Add(" on test.f_test = ctrl.f_test ");
|
||||||
|
results.Add(" and test.f_tsgp = 1104848523 /* Product Data */ ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[part_dat] part ");
|
||||||
|
results.Add(" on part.f_part = ctrl.f_part ");
|
||||||
|
results.Add(" and ctrl.f_test = 1125073605 /* Average Sum of Defects */ ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[prcs_dat] process ");
|
||||||
|
results.Add(" on process.f_prcs = ctrl.f_prcs ");
|
||||||
|
results.Add(" where test.f_name = 'Average Sum of Defects' ");
|
||||||
|
results.Add($" and process.f_name = '{process}' ");
|
||||||
|
results.Add($" and part.f_name = '{part}' ");
|
||||||
|
results.Add(" for json path; ");
|
||||||
|
return string.Join(' ', results);
|
||||||
|
} // cSpell:enable
|
||||||
|
|
||||||
|
string IInfinityQSV4Repository.GetProductDataAverageSumOfDefectsProcessMeanProcessSigma(string process, string? recipe)
|
||||||
|
{
|
||||||
|
StringBuilder result;
|
||||||
|
if (!string.IsNullOrEmpty(_MockRoot))
|
||||||
|
{
|
||||||
|
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV4Repository.GetProductDataAverageSumOfDefectsProcessMeanProcessSigma)}.json"));
|
||||||
|
result = new(json);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IInfinityQSV4Repository infinityQSV4Repository = this;
|
||||||
|
string commandText = infinityQSV4Repository.GetCommandText(process, recipe);
|
||||||
|
result = GetForJsonPath(_DBConnectionFactory, commandText, useIqsConnection: false);
|
||||||
|
if (result.Length == 0)
|
||||||
|
result = new("{}");
|
||||||
|
}
|
||||||
|
return result.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
string IInfinityQSV4Repository.GetCommandText(List<string> eppReactorNumbers)
|
||||||
|
{ // cSpell:disable
|
||||||
|
List<string> results = [];
|
||||||
|
results.Add(" select se.f_sgrp, ");
|
||||||
|
results.Add(" dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgrp), '19700101'))) date_time, ");
|
||||||
|
results.Add(" iq.pr_name, ");
|
||||||
|
results.Add(" iq.pd_name, ");
|
||||||
|
results.Add(" max(case ");
|
||||||
|
results.Add(" when td.f_test = 1104769646 ");
|
||||||
|
results.Add(" then se.f_val ");
|
||||||
|
results.Add(" else null ");
|
||||||
|
results.Add(" end) as iq_value, ");
|
||||||
|
results.Add(" max(case ");
|
||||||
|
results.Add(" when td.f_test = 1312288843 ");
|
||||||
|
results.Add(" then se.f_val else null ");
|
||||||
|
results.Add(" end) as iq_temp_offset_percent ");
|
||||||
|
results.Add(" from ( ");
|
||||||
|
results.Add(" select ");
|
||||||
|
results.Add(" max(se.f_sgrp) se_max_sgrp, ");
|
||||||
|
results.Add(" se.f_test se_test, ");
|
||||||
|
results.Add(" pr.f_name pr_name, ");
|
||||||
|
results.Add(" pd.f_name pd_name ");
|
||||||
|
results.Add(" from [spcepiworld].[dbo].[sgrp_ext] se ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[prcs_dat] pr ");
|
||||||
|
results.Add(" on se.f_prcs = pr.f_prcs ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[part_dat] pd ");
|
||||||
|
results.Add(" on se.f_part = pd.f_part ");
|
||||||
|
results.Add(" where se.f_flag = 0 ");
|
||||||
|
results.Add($" and pr.f_name in ({string.Join(',', eppReactorNumbers)}) ");
|
||||||
|
results.Add(" and pd.f_name = '1090 - Full Load' ");
|
||||||
|
results.Add(" and se.f_test in (1104769646, 1312288843) ");
|
||||||
|
results.Add(" group by se.f_test, ");
|
||||||
|
results.Add(" pr.f_name, ");
|
||||||
|
results.Add(" pd.f_name ");
|
||||||
|
results.Add(" ) as iq ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[sgrp_ext] se ");
|
||||||
|
results.Add(" on iq.se_max_sgrp = se.f_sgrp ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[test_dat] td ");
|
||||||
|
results.Add(" on iq.se_test = td.f_test ");
|
||||||
|
results.Add(" and se.f_test = td.f_test ");
|
||||||
|
results.Add(" where se.f_flag = 0 ");
|
||||||
|
results.Add(" and td.f_test in (1104769646, 1312288843) ");
|
||||||
|
results.Add(" group by se.f_sgrp, ");
|
||||||
|
results.Add(" iq.pr_name, ");
|
||||||
|
results.Add(" iq.pd_name ");
|
||||||
|
results.Add(" order by iq.pr_name ");
|
||||||
|
results.Add(" for json path; ");
|
||||||
|
return string.Join(' ', results);
|
||||||
|
} // cSpell:enable
|
||||||
|
|
||||||
|
List<string[]> IInfinityQSV4Repository.GetEpiProTempVerificationRows(int[] night)
|
||||||
|
{
|
||||||
|
List<string[]>? results;
|
||||||
|
List<string> eppReactorNumbers = new();
|
||||||
|
List<string> nightSiftReactors = Convert(night);
|
||||||
|
ReadOnlyDictionary<int, Reactor> eppReactors = GetReactorsMatchingType("EPP");
|
||||||
|
foreach (KeyValuePair<int, Reactor> keyValuePair in eppReactors)
|
||||||
|
eppReactorNumbers.Add($"'{keyValuePair.Key}'");
|
||||||
|
if (!string.IsNullOrEmpty(_MockRoot))
|
||||||
|
{
|
||||||
|
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV4Repository.GetEpiProTempVerificationRows)}.json"));
|
||||||
|
results = JsonSerializer.Deserialize<List<string[]>>(json);
|
||||||
|
if (results is null)
|
||||||
|
throw new NullReferenceException(nameof(results));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bool found;
|
||||||
|
results = new();
|
||||||
|
int loadedCount;
|
||||||
|
Reactor? reactor;
|
||||||
|
string loadedRDS;
|
||||||
|
int reactorNumber;
|
||||||
|
TimeSpan timeSpan;
|
||||||
|
List<string> columns;
|
||||||
|
List<int> used = new();
|
||||||
|
List<int> dayShiftOrder = new();
|
||||||
|
long ticks = DateTime.Now.Ticks;
|
||||||
|
List<int> nightShiftOrder = new();
|
||||||
|
InfinityQS1090FullLoad infinityQS1090FullLoad;
|
||||||
|
IInfinityQSV4Repository infinityQSV4Repository = this;
|
||||||
|
string commandText = infinityQSV4Repository.GetCommandText(eppReactorNumbers);
|
||||||
|
StringBuilder stringBuilder = GetForJsonPath(_DBConnectionFactory, commandText, useIqsConnection: false);
|
||||||
|
InfinityQS1090FullLoad[]? infinityQS1090FullLoads = stringBuilder.Length == 0 ? Array.Empty<InfinityQS1090FullLoad>() : JsonSerializer.Deserialize(stringBuilder.ToString(), InfinityQS1090FullLoadArraySourceGenerationContext.Default.InfinityQS1090FullLoadArray);
|
||||||
|
if (infinityQS1090FullLoads is null)
|
||||||
|
throw new NullReferenceException(nameof(infinityQS1090FullLoads));
|
||||||
|
for (int i = 0; i < infinityQS1090FullLoads.Length; i++)
|
||||||
|
{
|
||||||
|
infinityQS1090FullLoad = infinityQS1090FullLoads[i];
|
||||||
|
if (infinityQS1090FullLoad.Reactor is null)
|
||||||
|
continue;
|
||||||
|
if (!int.TryParse(infinityQS1090FullLoad.Reactor, out reactorNumber))
|
||||||
|
continue;
|
||||||
|
if (!eppReactors.TryGetValue(reactorNumber, out reactor))
|
||||||
|
continue;
|
||||||
|
if (!nightSiftReactors.Contains(infinityQS1090FullLoad.Reactor))
|
||||||
|
dayShiftOrder.Add(i);
|
||||||
|
else
|
||||||
|
nightShiftOrder.Add(i);
|
||||||
|
}
|
||||||
|
for (int i = 0; i < infinityQS1090FullLoads.Length; i++)
|
||||||
|
{
|
||||||
|
if (used.Contains(i) || !dayShiftOrder.Contains(i))
|
||||||
|
continue;
|
||||||
|
infinityQS1090FullLoad = infinityQS1090FullLoads[i];
|
||||||
|
if (infinityQS1090FullLoad.Reactor is null)
|
||||||
|
continue;
|
||||||
|
if (!int.TryParse(infinityQS1090FullLoad.Reactor, out reactorNumber))
|
||||||
|
continue;
|
||||||
|
if (!eppReactors.TryGetValue(reactorNumber, out reactor))
|
||||||
|
continue;
|
||||||
|
used.Add(i);
|
||||||
|
found = false;
|
||||||
|
timeSpan = new(ticks - infinityQS1090FullLoad.SubGroupIdFormatted.Ticks);
|
||||||
|
loadedCount = reactor.LoadedRDS is null ? 0 : reactor.LoadedRDS.Count;
|
||||||
|
loadedRDS = reactor.LoadedRDS is null ? " " : reactor.LoadedRDS[0].ToString();
|
||||||
|
results.Add(new string[]{
|
||||||
|
reactor.ReactorNo.ToString(),
|
||||||
|
reactor.E10State,
|
||||||
|
loadedRDS,
|
||||||
|
infinityQS1090FullLoad.Value.ToString(),
|
||||||
|
infinityQS1090FullLoad.TemperatureOffsetPercentage.ToString(),
|
||||||
|
infinityQS1090FullLoad.SubGroupIdFormatted.ToString(),
|
||||||
|
Math.Floor(timeSpan.TotalHours).ToString()
|
||||||
|
});
|
||||||
|
for (int j = i + 1; j < infinityQS1090FullLoads.Length; j++)
|
||||||
|
{
|
||||||
|
if (used.Contains(j) || !nightShiftOrder.Contains(j))
|
||||||
|
continue;
|
||||||
|
infinityQS1090FullLoad = infinityQS1090FullLoads[j];
|
||||||
|
if (infinityQS1090FullLoad.Reactor is null)
|
||||||
|
continue;
|
||||||
|
if (!int.TryParse(infinityQS1090FullLoad.Reactor, out reactorNumber))
|
||||||
|
continue;
|
||||||
|
if (!eppReactors.TryGetValue(reactorNumber, out reactor))
|
||||||
|
continue;
|
||||||
|
used.Add(j);
|
||||||
|
found = true;
|
||||||
|
timeSpan = new(ticks - infinityQS1090FullLoad.SubGroupIdFormatted.Ticks);
|
||||||
|
loadedCount = reactor.LoadedRDS is null ? 0 : reactor.LoadedRDS.Count;
|
||||||
|
loadedRDS = reactor.LoadedRDS is null ? " " : reactor.LoadedRDS[0].ToString();
|
||||||
|
columns = new();
|
||||||
|
columns.AddRange(results[^1]);
|
||||||
|
columns.AddRange(new string[]
|
||||||
|
{
|
||||||
|
" ",
|
||||||
|
reactor.ReactorNo.ToString(),
|
||||||
|
reactor.E10State,
|
||||||
|
loadedRDS,
|
||||||
|
infinityQS1090FullLoad.Value.ToString(),
|
||||||
|
infinityQS1090FullLoad.TemperatureOffsetPercentage.ToString(),
|
||||||
|
infinityQS1090FullLoad.SubGroupIdFormatted.ToString(),
|
||||||
|
Math.Floor(timeSpan.TotalHours).ToString()
|
||||||
|
});
|
||||||
|
results[^1] = columns.ToArray();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!found)
|
||||||
|
{
|
||||||
|
columns = new();
|
||||||
|
columns.AddRange(results[^1]);
|
||||||
|
columns.Add(" ");
|
||||||
|
columns.Add(" ");
|
||||||
|
columns.Add(" ");
|
||||||
|
columns.Add(" ");
|
||||||
|
columns.Add(" ");
|
||||||
|
columns.Add(" ");
|
||||||
|
columns.Add(" ");
|
||||||
|
columns.Add(" ");
|
||||||
|
results[^1] = columns.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
string IInfinityQSV4Repository.GetEpiProTempVerification(int[] night)
|
||||||
|
{
|
||||||
|
StringBuilder result = new();
|
||||||
|
IInfinityQSV4Repository infinityQSV4Repository = this;
|
||||||
|
List<string[]> collection = infinityQSV4Repository.GetEpiProTempVerificationRows(night);
|
||||||
|
foreach (string[] row in collection)
|
||||||
|
{
|
||||||
|
_ = result.Append("<tr>");
|
||||||
|
foreach (string column in row)
|
||||||
|
_ = result.Append("<td>").Append(column).Append("</td>");
|
||||||
|
_ = result.Append("</tr>");
|
||||||
|
}
|
||||||
|
return result.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Reactor> IInfinityQSV4Repository.GetReactors()
|
||||||
|
{
|
||||||
|
List<Reactor> results = new();
|
||||||
|
ReadOnlyDictionary<int, Reactor> keyValuePairs = GetReactorsMatchingType(reactTypeFilter: null);
|
||||||
|
foreach (KeyValuePair<int, Reactor> keyValuePair in keyValuePairs)
|
||||||
|
results.Add(keyValuePair.Value);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
string IInfinityQSV4Repository.GetRunDataSheet(string rds)
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
HttpClient httpClient = _HttpClientFactory.CreateClient();
|
||||||
|
Task<string> task = httpClient.GetStringAsync($"{_OpenInsightApplicationProgrammingInterface}/materials/rds/{rds}");
|
||||||
|
task.Wait();
|
||||||
|
result = task.Result;
|
||||||
|
if (rds == "123456")
|
||||||
|
{
|
||||||
|
RunDataSheetRoot? runDataSheetRoot = JsonSerializer.Deserialize(result, RunDataSheetRootSourceGenerationContext.Default.RunDataSheetRoot);
|
||||||
|
if (runDataSheetRoot is not null)
|
||||||
|
{
|
||||||
|
List<string> lines = new();
|
||||||
|
foreach (char ch in runDataSheetRoot.RunDataSheet.PSN)
|
||||||
|
{
|
||||||
|
if (ch is '1')
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
result = string.Join(Environment.NewLine, lines);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
string IInfinityQSV4Repository.GetProductionSpecification(string part)
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
HttpClient httpClient = _HttpClientFactory.CreateClient();
|
||||||
|
Task<string> task = httpClient.GetStringAsync($"{_OpenInsightApplicationProgrammingInterface}/materials/prod_spec/{part}");
|
||||||
|
task.Wait();
|
||||||
|
result = task.Result;
|
||||||
|
if (part == "4992")
|
||||||
|
{
|
||||||
|
ProdSpecRoot? prodSpecRoot = JsonSerializer.Deserialize(result, ProdSpecRootSourceGenerationContext.Default.ProdSpecRoot);
|
||||||
|
if (prodSpecRoot is not null)
|
||||||
|
{
|
||||||
|
List<string> lines = new();
|
||||||
|
foreach (PrsStage prsStage in prodSpecRoot.ProdSpec.PrsStages)
|
||||||
|
{
|
||||||
|
if (prsStage.QaMetTests is null)
|
||||||
|
continue;
|
||||||
|
foreach (QaMetTest qaMetTest in prsStage.QaMetTests)
|
||||||
|
{
|
||||||
|
lines.Add(qaMetTest.Test);
|
||||||
|
// lines.Add(qaMetTest.Slots);
|
||||||
|
lines.Add(qaMetTest.Recipe);
|
||||||
|
lines.Add(qaMetTest.RecipePattern);
|
||||||
|
if (qaMetTest.Test != "THICK_ONLY")
|
||||||
|
continue;
|
||||||
|
lines.Add(qaMetTest.Min.ToString());
|
||||||
|
lines.Add(qaMetTest.Max.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = string.Join(Environment.NewLine, lines);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GetCommandText(string process, string? part, int? test)
|
||||||
|
{ // cSpell:disable
|
||||||
|
List<string> results = [];
|
||||||
|
if (string.IsNullOrEmpty(process))
|
||||||
|
throw new ArgumentException(null, nameof(process));
|
||||||
|
if (string.IsNullOrEmpty(part))
|
||||||
|
throw new ArgumentException(null, nameof(part));
|
||||||
|
if (test is null)
|
||||||
|
throw new ArgumentException(null, nameof(test));
|
||||||
|
results.Add(" select se_max_sgrp, se.f_val se_value ");
|
||||||
|
results.Add(" from ( ");
|
||||||
|
results.Add(" select ");
|
||||||
|
results.Add(" max(se.f_sgrp) se_max_sgrp ");
|
||||||
|
results.Add(" from [spcepiworld].[dbo].[sgrp_ext] se ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[prcs_dat] pr ");
|
||||||
|
results.Add(" on se.f_prcs = pr.f_prcs ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[part_dat] pd ");
|
||||||
|
results.Add(" on se.f_part = pd.f_part ");
|
||||||
|
results.Add(" where se.f_flag = 0 ");
|
||||||
|
results.Add(" and se.f_tsno = 1 ");
|
||||||
|
results.Add($" and pr.f_name = '{process}' ");
|
||||||
|
results.Add($" and pd.f_name = '{part}' ");
|
||||||
|
results.Add($" and se.f_test = {test.Value} ");
|
||||||
|
results.Add(" ) as iq ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[sgrp_ext] se ");
|
||||||
|
results.Add(" on se_max_sgrp = se.f_sgrp ");
|
||||||
|
results.Add(" where se.f_flag = 0 ");
|
||||||
|
results.Add(" and se.f_tsno = 1 ");
|
||||||
|
results.Add($" and se.f_test = {test.Value} ");
|
||||||
|
results.Add(" for json path ");
|
||||||
|
return string.Join(' ', results);
|
||||||
|
} // cSpell:enable
|
||||||
|
|
||||||
|
string IInfinityQSV4Repository.GetLastGroupIdWithValue(string process, string? part, int? test)
|
||||||
|
{
|
||||||
|
StringBuilder result;
|
||||||
|
if (!string.IsNullOrEmpty(_MockRoot))
|
||||||
|
{
|
||||||
|
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IInfinityQSV4Repository.GetLastGroupIdWithValue)}.json"));
|
||||||
|
result = new(json);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string commandText = GetCommandText(process, part, test);
|
||||||
|
result = GetForJsonPath(_DBConnectionFactory, commandText, useIqsConnection: false);
|
||||||
|
if (result.Length == 0)
|
||||||
|
result = new("{}");
|
||||||
|
}
|
||||||
|
return result.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -16,6 +16,7 @@ namespace OI.Metrology.Server.Repositories;
|
|||||||
|
|
||||||
public class MetrologyRepository : IMetrologyRepository
|
public class MetrologyRepository : IMetrologyRepository
|
||||||
{
|
{
|
||||||
|
|
||||||
private readonly string _MockRoot;
|
private readonly string _MockRoot;
|
||||||
private readonly string _RepositoryName;
|
private readonly string _RepositoryName;
|
||||||
private readonly IMemoryCache _MemoryCache;
|
private readonly IMemoryCache _MemoryCache;
|
||||||
@ -32,7 +33,8 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
protected DbProviderFactory GetDbProviderFactory(IDbConnection conn) =>
|
protected DbProviderFactory GetDbProviderFactory(IDbConnection conn) =>
|
||||||
DbProviderFactories.GetFactory(conn.GetType().Namespace);
|
DbProviderFactories.GetFactory(conn.GetType().Namespace);
|
||||||
|
|
||||||
internal static TransactionScope StartTransaction() => new();
|
internal static TransactionScope StartTransaction() =>
|
||||||
|
new();
|
||||||
|
|
||||||
protected void CacheItem(string key, object v)
|
protected void CacheItem(string key, object v)
|
||||||
{
|
{
|
||||||
@ -56,7 +58,7 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal ToolType GetToolTypeByName(string name)
|
ToolType IMetrologyRepository.GetToolTypeByName(string name)
|
||||||
{
|
{
|
||||||
ToolType cached;
|
ToolType cached;
|
||||||
string cacheKey = "GetToolTypeByName_" + name;
|
string cacheKey = "GetToolTypeByName_" + name;
|
||||||
@ -107,7 +109,7 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal long InsertToolDataJSON(JToken jsonrow, long headerId, List<ToolTypeMetadata> metaData, string tableName)
|
long IMetrologyRepository.InsertToolDataJSON(JToken jsonrow, long headerId, List<ToolTypeMetadata> metaData, string tableName)
|
||||||
{
|
{
|
||||||
long r = -1;
|
long r = -1;
|
||||||
using (DbConnection conn = _DBConnectionFactory.GetDbConnection())
|
using (DbConnection conn = _DBConnectionFactory.GetDbConnection())
|
||||||
@ -115,7 +117,8 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
bool isHeader = headerId <= 0;
|
bool isHeader = headerId <= 0;
|
||||||
|
|
||||||
// get fields from metadata
|
// get fields from metadata
|
||||||
List<ToolTypeMetadata> fields = metaData.Where(md => md.Header == isHeader).ToList();
|
List<ToolTypeMetadata> fields = metaData.Where(md =>
|
||||||
|
md.Header == isHeader).ToList();
|
||||||
|
|
||||||
// maps ApiName to ColumnName
|
// maps ApiName to ColumnName
|
||||||
Dictionary<string, string> fieldmap = new();
|
Dictionary<string, string> fieldmap = new();
|
||||||
@ -155,7 +158,8 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Find the container field in the json
|
// Find the container field in the json
|
||||||
JProperty contJP = jsonrow.Children<JProperty>().Where(c => string.Equals(c.Name.Trim(), containerField, StringComparison.OrdinalIgnoreCase)).SingleOrDefault();
|
JProperty contJP = jsonrow.Children<JProperty>().Where(c =>
|
||||||
|
string.Equals(c.Name.Trim(), containerField, StringComparison.OrdinalIgnoreCase)).SingleOrDefault();
|
||||||
|
|
||||||
if ((contJP is not null) && (contJP.Value is JArray array))
|
if ((contJP is not null) && (contJP.Value is JArray array))
|
||||||
{
|
{
|
||||||
@ -182,7 +186,7 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
_ = cmd.Parameters.Add(p);
|
_ = cmd.Parameters.Add(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected long InsertRowFromJSON(
|
private long InsertRowFromJSON(
|
||||||
IDbConnection conn,
|
IDbConnection conn,
|
||||||
string tableName,
|
string tableName,
|
||||||
JToken jsonrow,
|
JToken jsonrow,
|
||||||
@ -262,7 +266,7 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
return Convert.ToInt64(o);
|
return Convert.ToInt64(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal DataTable ExportData(string spName, DateTime startTime, DateTime endTime)
|
DataTable IMetrologyRepository.ExportData(string spName, DateTime startTime, DateTime endTime)
|
||||||
{
|
{
|
||||||
DataTable dt = new();
|
DataTable dt = new();
|
||||||
DateTime endTimeLocal = endTime.ToLocalTime();
|
DateTime endTimeLocal = endTime.ToLocalTime();
|
||||||
@ -312,7 +316,7 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal DataTable GetHeaders(int toolTypeId, DateTime? startTime, DateTime? endTime, int? pageNo, int? pageSize, long? headerId, out long totalRecords)
|
DataTable IMetrologyRepository.GetHeaders(int toolTypeId, string? startTime, string? endTime, int? pageNo, int? pageSize, long? headerId, out long totalRecords)
|
||||||
{
|
{
|
||||||
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
||||||
|
|
||||||
@ -324,7 +328,8 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
StringBuilder sb = new();
|
StringBuilder sb = new();
|
||||||
_ = sb.Append(
|
_ = sb.Append(
|
||||||
FormDynamicSelectQuery(
|
FormDynamicSelectQuery(
|
||||||
md.Where(m => m.Header == true).ToList(),
|
md.Where(m =>
|
||||||
|
m.Header == true).ToList(),
|
||||||
tt.HeaderTableName)
|
tt.HeaderTableName)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -341,16 +346,16 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (startTime.HasValue)
|
if (startTime is not null)
|
||||||
{
|
{
|
||||||
whereClause = "[Date] >= @StartTime ";
|
whereClause = "[Date] >= @StartTime ";
|
||||||
DateTime startTimeLocal = startTime.Value.ToLocalTime();
|
DateTime startTimeLocal = DateTime.Parse(startTime).ToLocalTime();
|
||||||
AddParameter(cmd, "@StartTime", startTimeLocal);
|
AddParameter(cmd, "@StartTime", startTimeLocal.ToString("yyyy-MM-dd HH:mm:ss"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (endTime.HasValue)
|
if (endTime is not null)
|
||||||
{
|
{
|
||||||
DateTime endTimeLocal = endTime.Value.ToLocalTime();
|
DateTime endTimeLocal = DateTime.Parse(endTime).ToLocalTime();
|
||||||
TimeSpan timeSpan = new(DateTime.Now.Ticks - endTimeLocal.Ticks);
|
TimeSpan timeSpan = new(DateTime.Now.Ticks - endTimeLocal.Ticks);
|
||||||
if (timeSpan.TotalMinutes > 5)
|
if (timeSpan.TotalMinutes > 5)
|
||||||
{
|
{
|
||||||
@ -358,7 +363,7 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
whereClause += "AND ";
|
whereClause += "AND ";
|
||||||
whereClause += "[Date] <= @EndTime ";
|
whereClause += "[Date] <= @EndTime ";
|
||||||
|
|
||||||
AddParameter(cmd, "@EndTime", endTimeLocal);
|
AddParameter(cmd, "@EndTime", endTimeLocal.ToString("yyyy-MM-dd HH:mm:ss"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -401,7 +406,7 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
return dt;
|
return dt;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal DataTable GetData(int toolTypeId, long headerid)
|
DataTable IMetrologyRepository.GetData(int toolTypeId, long headerid)
|
||||||
{
|
{
|
||||||
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
||||||
|
|
||||||
@ -413,7 +418,9 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
StringBuilder sb = new();
|
StringBuilder sb = new();
|
||||||
_ = sb.Append(
|
_ = sb.Append(
|
||||||
FormDynamicSelectQuery(
|
FormDynamicSelectQuery(
|
||||||
md.Where(m => m.Header == false).OrderBy(m => m.GridDisplayOrder).ToList(),
|
md.Where(m =>
|
||||||
|
m.Header == false).OrderBy(m =>
|
||||||
|
m.GridDisplayOrder).ToList(),
|
||||||
tt.DataTableName)
|
tt.DataTableName)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -492,17 +499,32 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
return dt;
|
return dt;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal Guid GetHeaderAttachmentID(int toolTypeId, long headerId)
|
Guid IMetrologyRepository.GetHeaderAttachmentID(int toolTypeId, long headerId)
|
||||||
|
{
|
||||||
|
Guid result;
|
||||||
|
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
||||||
|
|
||||||
|
using DbConnection conn = _DBConnectionFactory.GetDbConnection();
|
||||||
|
string sql =
|
||||||
|
$"SELECT AttachmentID FROM [{tt.HeaderTableName}] WHERE ID = @HeaderID";
|
||||||
|
result = conn.ExecuteScalar<Guid>(sql, param: new { HeaderID = headerId });
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IMetrologyRepository.SetHeaderAttachmentID(int toolTypeId, long headerId, string attachmentId)
|
||||||
{
|
{
|
||||||
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
||||||
|
|
||||||
using DbConnection conn = _DBConnectionFactory.GetDbConnection();
|
using DbConnection conn = _DBConnectionFactory.GetDbConnection();
|
||||||
string sql =
|
string sql =
|
||||||
$"UPDATE [{tt.HeaderTableName}] SET AttachmentID = NEWID() WHERE ID = @HeaderID AND AttachmentID IS NULL; " +
|
$"UPDATE [{tt.HeaderTableName}] SET AttachmentID = @AttachmentID WHERE ID = @HeaderID AND AttachmentID IS NULL; " +
|
||||||
$"SELECT AttachmentID FROM [{tt.HeaderTableName}] WHERE ID = @HeaderID";
|
$"SELECT AttachmentID FROM [{tt.HeaderTableName}] WHERE ID = @HeaderID";
|
||||||
return conn.ExecuteScalar<Guid>(sql, param: new { HeaderID = headerId });
|
Guid guid = conn.ExecuteScalar<Guid>(sql, param: new { HeaderID = headerId, AttachmentID = attachmentId });
|
||||||
|
if (attachmentId != guid.ToString())
|
||||||
|
throw new NotSupportedException($"{attachmentId} != {guid}");
|
||||||
}
|
}
|
||||||
internal string GetHeaderInsertDate(int toolTypeId, long headerId)
|
|
||||||
|
string IMetrologyRepository.GetHeaderInsertDate(int toolTypeId, long headerId)
|
||||||
{
|
{
|
||||||
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
||||||
|
|
||||||
@ -511,7 +533,8 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
$"SELECT CONVERT(varchar, case when [InsertDate] < [Date] or [Date] is null then [InsertDate] else [Date] end, 120) d FROM[{tt.HeaderTableName}] where ID = @HeaderID";
|
$"SELECT CONVERT(varchar, case when [InsertDate] < [Date] or [Date] is null then [InsertDate] else [Date] end, 120) d FROM[{tt.HeaderTableName}] where ID = @HeaderID";
|
||||||
return conn.ExecuteScalar<string>(sql, param: new { HeaderID = headerId });
|
return conn.ExecuteScalar<string>(sql, param: new { HeaderID = headerId });
|
||||||
}
|
}
|
||||||
internal string GetAttachmentInsertDateByGUID(string tableName, Guid attachmentId)
|
|
||||||
|
string IMetrologyRepository.GetAttachmentInsertDateByGUID(string tableName, Guid attachmentId)
|
||||||
{
|
{
|
||||||
using DbConnection conn = _DBConnectionFactory.GetDbConnection();
|
using DbConnection conn = _DBConnectionFactory.GetDbConnection();
|
||||||
string sql = "";
|
string sql = "";
|
||||||
@ -526,24 +549,27 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
|
|
||||||
return conn.ExecuteScalar<string>(sql, param: new { AttachmentID = attachmentId });
|
return conn.ExecuteScalar<string>(sql, param: new { AttachmentID = attachmentId });
|
||||||
}
|
}
|
||||||
internal void SetHeaderDirName(string tableName, long headerId, string dateDir)
|
|
||||||
|
void IMetrologyRepository.SetHeaderDirName(string tableName, long headerId, string dateDir)
|
||||||
{
|
{
|
||||||
using DbConnection conn = _DBConnectionFactory.GetDbConnection();
|
using DbConnection conn = _DBConnectionFactory.GetDbConnection();
|
||||||
_ = conn.Execute($"UPDATE [{tableName}] SET AttachDirName = @AttachDirName WHERE ID = @HeaderID;", new { HeaderID = headerId, AttachDirName = dateDir });
|
_ = conn.Execute($"UPDATE [{tableName}] SET AttachDirName = @AttachDirName WHERE ID = @HeaderID;", new { HeaderID = headerId, AttachDirName = dateDir });
|
||||||
}
|
}
|
||||||
|
|
||||||
internal Guid GetDataAttachmentID(int toolTypeId, long headerId, string title)
|
void IMetrologyRepository.SetDataAttachmentID(int toolTypeId, long headerId, string title, string attachmentId)
|
||||||
{
|
{
|
||||||
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
||||||
|
|
||||||
using DbConnection conn = _DBConnectionFactory.GetDbConnection();
|
using DbConnection conn = _DBConnectionFactory.GetDbConnection();
|
||||||
string sql =
|
string sql =
|
||||||
$"UPDATE [{tt.DataTableName}] SET AttachmentID = NEWID() WHERE HeaderID = @HeaderID AND Title = @Title AND AttachmentID IS NULL; " +
|
$"UPDATE [{tt.DataTableName}] SET AttachmentID = @AttachmentID WHERE HeaderID = @HeaderID AND Title = @Title AND AttachmentID IS NULL; " +
|
||||||
$"SELECT AttachmentID FROM [{tt.DataTableName}] WHERE HeaderID = @HeaderID AND Title = @Title";
|
$"SELECT AttachmentID FROM [{tt.DataTableName}] WHERE HeaderID = @HeaderID AND Title = @Title";
|
||||||
return conn.ExecuteScalar<Guid>(sql, param: new { HeaderID = headerId, Title = title });
|
Guid guid = conn.ExecuteScalar<Guid>(sql, param: new { HeaderID = headerId, AttachmentID = attachmentId, Title = title });
|
||||||
|
if (attachmentId != guid.ToString())
|
||||||
|
throw new NotSupportedException($"{attachmentId} != {guid}");
|
||||||
}
|
}
|
||||||
// J Ouellette Added
|
|
||||||
internal string GetDataInsertDate(int toolTypeId, long headerId, string title)
|
string IMetrologyRepository.GetDataInsertDate(int toolTypeId, long headerId, string title)
|
||||||
{
|
{
|
||||||
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
||||||
|
|
||||||
@ -560,7 +586,8 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
|
|
||||||
return conn.ExecuteScalar<string>(sql, param: new { HeaderID = headerId, Title = title });
|
return conn.ExecuteScalar<string>(sql, param: new { HeaderID = headerId, Title = title });
|
||||||
}
|
}
|
||||||
internal void SetDataDirName(string tableName, long headerId, string title, string dateDir)
|
|
||||||
|
void IMetrologyRepository.SetDataDirName(string tableName, long headerId, string title, string dateDir)
|
||||||
{
|
{
|
||||||
using DbConnection conn = _DBConnectionFactory.GetDbConnection();
|
using DbConnection conn = _DBConnectionFactory.GetDbConnection();
|
||||||
string sql =
|
string sql =
|
||||||
@ -568,13 +595,13 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
_ = conn.Execute(sql, param: new { HeaderID = headerId, Title = title, AttachDirName = dateDir });
|
_ = conn.Execute(sql, param: new { HeaderID = headerId, Title = title, AttachDirName = dateDir });
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void PurgeExistingData(int toolTypeId, string title)
|
void IMetrologyRepository.PurgeExistingData(int toolTypeId, string title)
|
||||||
{
|
{
|
||||||
using DbConnection conn = _DBConnectionFactory.GetDbConnection();
|
using DbConnection conn = _DBConnectionFactory.GetDbConnection();
|
||||||
_ = conn.Execute("PurgeExistingData", param: new { ToolTypeID = toolTypeId, Title = title }, commandType: CommandType.StoredProcedure);
|
_ = conn.Execute("PurgeExistingData", param: new { ToolTypeID = toolTypeId, Title = title }, commandType: CommandType.StoredProcedure);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal DataSet GetOIExportData(int toolTypeId, long headerid)
|
DataSet IMetrologyRepository.GetOIExportData(int toolTypeId, long headerid)
|
||||||
{
|
{
|
||||||
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
||||||
|
|
||||||
@ -626,7 +653,7 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
return results.ToArray();
|
return results.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal HeaderCommon[] GetHeaderTitles(int? toolTypeId, int? pageNo, int? pageSize, out long totalRecords)
|
HeaderCommon[] IMetrologyRepository.GetHeaderTitles(int? toolTypeId, int? pageNo, int? pageSize, out long totalRecords)
|
||||||
{
|
{
|
||||||
HeaderCommon[] headers;
|
HeaderCommon[] headers;
|
||||||
if (toolTypeId is not null && (pageNo is not null || pageSize is not null))
|
if (toolTypeId is not null && (pageNo is not null || pageSize is not null))
|
||||||
@ -662,7 +689,7 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
return headers;
|
return headers;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal IEnumerable<KeyValuePair<string, string>> GetHeaderFields(int toolTypeId, long headerid)
|
IEnumerable<KeyValuePair<string, string>> IMetrologyRepository.GetHeaderFields(int toolTypeId, long headerid)
|
||||||
{
|
{
|
||||||
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
||||||
|
|
||||||
@ -689,7 +716,9 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
if (dt.Rows.Count > 0)
|
if (dt.Rows.Count > 0)
|
||||||
dr = dt.Rows[0];
|
dr = dt.Rows[0];
|
||||||
|
|
||||||
foreach (ToolTypeMetadata m in md.Where(m => m.Header == true && m.TableDisplayOrder > 0).OrderBy(m => m.TableDisplayOrder))
|
foreach (ToolTypeMetadata m in md.Where(m =>
|
||||||
|
m.Header == true && m.TableDisplayOrder > 0).OrderBy(m =>
|
||||||
|
m.TableDisplayOrder))
|
||||||
{
|
{
|
||||||
string v = "";
|
string v = "";
|
||||||
if (dr is not null)
|
if (dr is not null)
|
||||||
@ -705,7 +734,7 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal IEnumerable<AwaitingDisposition> GetAwaitingDisposition()
|
IEnumerable<AwaitingDisposition> IMetrologyRepository.GetAwaitingDisposition()
|
||||||
{
|
{
|
||||||
IEnumerable<AwaitingDisposition>? r;
|
IEnumerable<AwaitingDisposition>? r;
|
||||||
if (!string.IsNullOrEmpty(_MockRoot))
|
if (!string.IsNullOrEmpty(_MockRoot))
|
||||||
@ -723,7 +752,7 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal int UpdateReviewDate(int toolTypeId, long headerId, bool clearDate)
|
int IMetrologyRepository.UpdateReviewDate(int toolTypeId, long headerId, bool clearDate)
|
||||||
{
|
{
|
||||||
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
||||||
|
|
||||||
@ -743,7 +772,7 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal Guid GetHeaderAttachmentIDByTitle(int toolTypeId, string title)
|
Guid IMetrologyRepository.GetHeaderAttachmentIDByTitle(int toolTypeId, string title)
|
||||||
{
|
{
|
||||||
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
||||||
|
|
||||||
@ -753,7 +782,7 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
return conn.ExecuteScalar<Guid>(sql, param: new { Title = title });
|
return conn.ExecuteScalar<Guid>(sql, param: new { Title = title });
|
||||||
}
|
}
|
||||||
|
|
||||||
internal Guid GetDataAttachmentIDByTitle(int toolTypeId, string title)
|
Guid IMetrologyRepository.GetDataAttachmentIDByTitle(int toolTypeId, string title)
|
||||||
{
|
{
|
||||||
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
ToolType tt = GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
||||||
|
|
||||||
@ -763,31 +792,13 @@ public class MetrologyRepository : IMetrologyRepository
|
|||||||
return conn.ExecuteScalar<Guid>(sql, param: new { Title = title });
|
return conn.ExecuteScalar<Guid>(sql, param: new { Title = title });
|
||||||
}
|
}
|
||||||
|
|
||||||
DataTable IMetrologyRepository.GetDataSharePoint(int toolTypeId, string headerId) => throw new NotImplementedException();
|
IEnumerable<ToolType> IMetrologyRepository.GetToolTypes() =>
|
||||||
|
GetToolTypes();
|
||||||
IEnumerable<ToolType> IMetrologyRepository.GetToolTypes() => GetToolTypes();
|
ToolType IMetrologyRepository.GetToolTypeByID(int id) =>
|
||||||
ToolType IMetrologyRepository.GetToolTypeByName(string name) => GetToolTypeByName(name);
|
GetToolTypeByID(id);
|
||||||
ToolType IMetrologyRepository.GetToolTypeByID(int id) => GetToolTypeByID(id);
|
TransactionScope IMetrologyRepository.StartTransaction() =>
|
||||||
IEnumerable<ToolTypeMetadata> IMetrologyRepository.GetToolTypeMetadataByToolTypeID(int id) => GetToolTypeMetadataByToolTypeID(id);
|
StartTransaction();
|
||||||
TransactionScope IMetrologyRepository.StartTransaction() => StartTransaction();
|
IEnumerable<ToolTypeMetadata> IMetrologyRepository.GetToolTypeMetadataByToolTypeID(int id) =>
|
||||||
void IMetrologyRepository.PurgeExistingData(int toolTypeId, string title) => PurgeExistingData(toolTypeId, title);
|
GetToolTypeMetadataByToolTypeID(id);
|
||||||
long IMetrologyRepository.InsertToolDataJSON(JToken jsonbody, long headerId, List<ToolTypeMetadata> metaData, string tableName) => InsertToolDataJSON(jsonbody, headerId, metaData, tableName);
|
|
||||||
DataTable IMetrologyRepository.ExportData(string spName, DateTime startTime, DateTime endTime) => ExportData(spName, startTime, endTime);
|
|
||||||
DataTable IMetrologyRepository.GetHeaders(int toolTypeId, DateTime? startTime, DateTime? endTime, int? pageNo, int? pageSize, long? headerid, out long totalRecords) => GetHeaders(toolTypeId, startTime, endTime, pageNo, pageSize, headerid, out totalRecords);
|
|
||||||
DataTable IMetrologyRepository.GetData(int toolTypeId, long headerId) => GetData(toolTypeId, headerId);
|
|
||||||
HeaderCommon[] IMetrologyRepository.GetHeaderTitles(int? toolTypeId, int? pageNo, int? pageSize, out long totalRecords) => GetHeaderTitles(toolTypeId, pageNo, pageSize, out totalRecords);
|
|
||||||
Guid IMetrologyRepository.GetHeaderAttachmentIDByTitle(int toolTypeId, string title) => GetHeaderAttachmentIDByTitle(toolTypeId, title);
|
|
||||||
Guid IMetrologyRepository.GetDataAttachmentIDByTitle(int toolTypeId, string title) => GetDataAttachmentIDByTitle(toolTypeId, title);
|
|
||||||
Guid IMetrologyRepository.GetHeaderAttachmentID(int toolTypeId, long headerId) => GetHeaderAttachmentID(toolTypeId, headerId);
|
|
||||||
string IMetrologyRepository.GetHeaderInsertDate(int toolTypeId, long headerId) => GetHeaderInsertDate(toolTypeId, headerId);
|
|
||||||
string IMetrologyRepository.GetAttachmentInsertDateByGUID(string tableName, Guid attachmentId) => GetAttachmentInsertDateByGUID(tableName, attachmentId);
|
|
||||||
void IMetrologyRepository.SetHeaderDirName(string tableName, long headerId, string dateDir) => SetHeaderDirName(tableName, headerId, dateDir);
|
|
||||||
Guid IMetrologyRepository.GetDataAttachmentID(int toolTypeId, long headerId, string title) => GetDataAttachmentID(toolTypeId, headerId, title);
|
|
||||||
string IMetrologyRepository.GetDataInsertDate(int toolTypeId, long headerId, string title) => GetDataInsertDate(toolTypeId, headerId, title);
|
|
||||||
void IMetrologyRepository.SetDataDirName(string tableName, long headerId, string title, string dateDir) => SetDataDirName(tableName, headerId, title, dateDir);
|
|
||||||
DataSet IMetrologyRepository.GetOIExportData(int toolTypeId, long headerid) => GetOIExportData(toolTypeId, headerid);
|
|
||||||
IEnumerable<KeyValuePair<string, string>> IMetrologyRepository.GetHeaderFields(int toolTypeId, long headerid) => GetHeaderFields(toolTypeId, headerid);
|
|
||||||
IEnumerable<AwaitingDisposition> IMetrologyRepository.GetAwaitingDisposition() => GetAwaitingDisposition();
|
|
||||||
int IMetrologyRepository.UpdateReviewDate(int toolTypeId, long headerId, bool clearDate) => UpdateReviewDate(toolTypeId, headerId, clearDate);
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,146 +0,0 @@
|
|||||||
using OI.Metrology.Server.Models;
|
|
||||||
using OI.Metrology.Shared.DataModels;
|
|
||||||
using OI.Metrology.Shared.Models.Stateless;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.Text.Json;
|
|
||||||
|
|
||||||
namespace OI.Metrology.Server.Repository;
|
|
||||||
|
|
||||||
public class ReactorsRepository : IReactorsRepository
|
|
||||||
{
|
|
||||||
|
|
||||||
private readonly AppSettings _AppSettings;
|
|
||||||
private readonly Dictionary<int, char> _SecondsToAlpha;
|
|
||||||
|
|
||||||
public ReactorsRepository(AppSettings appSettings)
|
|
||||||
{
|
|
||||||
_AppSettings = appSettings;
|
|
||||||
_SecondsToAlpha = new();
|
|
||||||
for (int i = 65; i < 91; i++)
|
|
||||||
{
|
|
||||||
if (i is 73 or 79)
|
|
||||||
continue;
|
|
||||||
_SecondsToAlpha.Add(i - 65, (char)i);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Result<int[]> IReactorsRepository.EvenReactors()
|
|
||||||
{
|
|
||||||
Result<int[]> results;
|
|
||||||
int[] collection = new int[] {
|
|
||||||
20,
|
|
||||||
22,
|
|
||||||
24,
|
|
||||||
26,
|
|
||||||
28,
|
|
||||||
30,
|
|
||||||
32,
|
|
||||||
34,
|
|
||||||
36,
|
|
||||||
38,
|
|
||||||
40,
|
|
||||||
42,
|
|
||||||
44,
|
|
||||||
46,
|
|
||||||
48,
|
|
||||||
50,
|
|
||||||
52,
|
|
||||||
54,
|
|
||||||
56,
|
|
||||||
58,
|
|
||||||
60,
|
|
||||||
62,
|
|
||||||
64,
|
|
||||||
66,
|
|
||||||
68,
|
|
||||||
70,
|
|
||||||
72,
|
|
||||||
74
|
|
||||||
};
|
|
||||||
results = new()
|
|
||||||
{
|
|
||||||
Results = collection,
|
|
||||||
TotalRows = collection.Length,
|
|
||||||
};
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
Result<int[]> IReactorsRepository.OddReactors()
|
|
||||||
{
|
|
||||||
Result<int[]> results;
|
|
||||||
int[] collection = new int[] {
|
|
||||||
21,
|
|
||||||
23,
|
|
||||||
25,
|
|
||||||
27,
|
|
||||||
29,
|
|
||||||
31,
|
|
||||||
33,
|
|
||||||
35,
|
|
||||||
37,
|
|
||||||
39,
|
|
||||||
41,
|
|
||||||
43,
|
|
||||||
45,
|
|
||||||
47,
|
|
||||||
49,
|
|
||||||
51,
|
|
||||||
53,
|
|
||||||
55,
|
|
||||||
57,
|
|
||||||
59,
|
|
||||||
61,
|
|
||||||
63,
|
|
||||||
65,
|
|
||||||
73,
|
|
||||||
75,
|
|
||||||
77,
|
|
||||||
79
|
|
||||||
};
|
|
||||||
results = new()
|
|
||||||
{
|
|
||||||
Results = collection,
|
|
||||||
TotalRows = collection.Length,
|
|
||||||
};
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
string? IReactorsRepository.GetKey(WorkMaterialOut workMaterialOut, bool save)
|
|
||||||
{
|
|
||||||
if (workMaterialOut is null)
|
|
||||||
throw new Exception();
|
|
||||||
if (workMaterialOut.Username is null || workMaterialOut.Username.Length < 2)
|
|
||||||
throw new ArgumentException(nameof(workMaterialOut.Username));
|
|
||||||
if (workMaterialOut.RunDataSheet is null || workMaterialOut.RunDataSheet.Length < 2)
|
|
||||||
throw new ArgumentException(nameof(workMaterialOut.RunDataSheet));
|
|
||||||
string? result = null;
|
|
||||||
char c;
|
|
||||||
string? fileName = null;
|
|
||||||
DateTime dateTime = DateTime.Now;
|
|
||||||
Calendar calendar = new CultureInfo("en-US").Calendar;
|
|
||||||
string json = JsonSerializer.Serialize(workMaterialOut, new JsonSerializerOptions { WriteIndented = true });
|
|
||||||
string weekOfYear = $"{dateTime:yyyy}_Week_{calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday):00}";
|
|
||||||
string directory = Path.Combine(_AppSettings.ApiExportPath, "WorkMaterialOut", "API", weekOfYear, dateTime.ToString("yyyy-MM-dd_HH"));
|
|
||||||
if (!Directory.Exists(directory))
|
|
||||||
_ = Directory.CreateDirectory(directory);
|
|
||||||
for (int i = 0; i < int.MaxValue; i++)
|
|
||||||
{
|
|
||||||
dateTime = dateTime.AddSeconds(i);
|
|
||||||
if (!_SecondsToAlpha.TryGetValue(dateTime.Second, out c))
|
|
||||||
continue;
|
|
||||||
fileName = Path.Combine(directory, $"WMO-{dateTime:mm}{c}.json");
|
|
||||||
if (!File.Exists(fileName))
|
|
||||||
{
|
|
||||||
result = $"{c}{dateTime:mm}";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (fileName is null)
|
|
||||||
throw new Exception();
|
|
||||||
if (save)
|
|
||||||
File.WriteAllText(fileName, json);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -3,7 +3,6 @@ using OI.Metrology.Shared.DataModels;
|
|||||||
using OI.Metrology.Shared.Models.Stateless;
|
using OI.Metrology.Shared.Models.Stateless;
|
||||||
using OI.Metrology.Shared.Services;
|
using OI.Metrology.Shared.Services;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Text;
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace OI.Metrology.Server.Repository;
|
namespace OI.Metrology.Server.Repository;
|
||||||
@ -13,10 +12,16 @@ public class ToolTypesRepository : IToolTypesRepository
|
|||||||
|
|
||||||
private readonly string _MockRoot;
|
private readonly string _MockRoot;
|
||||||
private readonly string _RepositoryName;
|
private readonly string _RepositoryName;
|
||||||
|
private readonly AppSettings _AppSettings;
|
||||||
|
private readonly IHttpClientFactory _HttpClientFactory;
|
||||||
|
private readonly IFileShareRepository _FileShareRepository;
|
||||||
|
|
||||||
public ToolTypesRepository(AppSettings appSettings)
|
public ToolTypesRepository(AppSettings appSettings, IHttpClientFactory httpClientFactory, IFileShareRepository fileShareRepository)
|
||||||
{
|
{
|
||||||
|
_AppSettings = appSettings;
|
||||||
_MockRoot = appSettings.MockRoot;
|
_MockRoot = appSettings.MockRoot;
|
||||||
|
_HttpClientFactory = httpClientFactory;
|
||||||
|
_FileShareRepository = fileShareRepository;
|
||||||
_RepositoryName = nameof(ToolTypesRepository)[..^10];
|
_RepositoryName = nameof(ToolTypesRepository)[..^10];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +83,7 @@ public class ToolTypesRepository : IToolTypesRepository
|
|||||||
|
|
||||||
// Gets headers, request/response format is to allow paging with igniteUI
|
// Gets headers, request/response format is to allow paging with igniteUI
|
||||||
// The headerid parameter is used for navigating directly to a header, when the button is clicked in Awaiting Dispo
|
// The headerid parameter is used for navigating directly to a header, when the button is clicked in Awaiting Dispo
|
||||||
Result<DataTable> IToolTypesRepository.GetHeaders(IMetrologyRepository metrologyRepository, int id, DateTime? datebegin, DateTime? dateend, int? page, int? pagesize, long? headerid)
|
Result<DataTable> IToolTypesRepository.GetHeaders(IMetrologyRepository metrologyRepository, int id, string? datebegin, string? dateend, int? page, int? pagesize, long? headerid)
|
||||||
{
|
{
|
||||||
Result<DataTable>? r;
|
Result<DataTable>? r;
|
||||||
if (!string.IsNullOrEmpty(_MockRoot))
|
if (!string.IsNullOrEmpty(_MockRoot))
|
||||||
@ -203,7 +208,7 @@ public class ToolTypesRepository : IToolTypesRepository
|
|||||||
return new(message, contentType, stream);
|
return new(message, contentType, stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
string? IToolTypesRepository.OIExport(IMetrologyRepository metrologyRepository, IAttachmentsService attachmentsService, string attachmentPath, Dictionary<string, string> tableToPath, int toolTypeId, long headerid)
|
string? IToolTypesRepository.OIExport(IMetrologyRepository metrologyRepository, IAttachmentsService attachmentsService, int toolTypeId, long headerid)
|
||||||
{
|
{
|
||||||
string? result;
|
string? result;
|
||||||
ToolType toolType = metrologyRepository.GetToolTypeByID(toolTypeId);
|
ToolType toolType = metrologyRepository.GetToolTypeByID(toolTypeId);
|
||||||
@ -211,16 +216,18 @@ public class ToolTypesRepository : IToolTypesRepository
|
|||||||
result = $"Invalid tool id [{toolTypeId}] [{headerid}]!";
|
result = $"Invalid tool id [{toolTypeId}] [{headerid}]!";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string? processDataStandardFormat = attachmentsService.GetProcessDataStandardFormat(metrologyRepository, attachmentPath, toolTypeId, headerid);
|
string? processDataStandardFormat = attachmentsService.GetProcessDataStandardFormat(metrologyRepository, toolTypeId, headerid);
|
||||||
if (processDataStandardFormat is null)
|
if (processDataStandardFormat is null)
|
||||||
result = $"Export file doesn't exist for [{toolTypeId}] [{headerid}] at <{attachmentPath}>!";
|
result = $"Export file doesn't exist for [{toolTypeId}] [{headerid}] at <{_AppSettings.EcMesaFileShareMetrologySi}>!";
|
||||||
else if (!tableToPath.TryGetValue(toolType.HeaderTableName, out string? directly))
|
else if (!_AppSettings.TableToPath.TryGetValue(toolType.HeaderTableName, out string? directly))
|
||||||
result = $"Export file doesn't exist for [{toolTypeId}] [{headerid}] at <{attachmentPath}>!";
|
result = $"Export file doesn't exist for [{toolTypeId}] [{headerid}] at <{_AppSettings.EcMesaFileShareMetrologySi}>!";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
File.Copy(processDataStandardFormat, Path.Combine(directly, $"Viewer_{Path.GetFileName(processDataStandardFormat)}"));
|
HttpClient httpClient = _HttpClientFactory.CreateClient();
|
||||||
|
httpClient.BaseAddress = new(_AppSettings.ApiFileShare);
|
||||||
|
_FileShareRepository.CopyFile(httpClient, processDataStandardFormat, Path.Combine(directly, $"Viewer_{Path.GetFileName(processDataStandardFormat)}"));
|
||||||
result = null;
|
result = null;
|
||||||
}
|
}
|
||||||
catch (Exception ex) { result = ex.Message; }
|
catch (Exception ex) { result = ex.Message; }
|
||||||
@ -229,96 +236,4 @@ public class ToolTypesRepository : IToolTypesRepository
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result<DataTable> IToolTypesRepository.GetExportData(IMetrologyRepository metrologyRepository, int toolTypeId, DateTime? datebegin, DateTime? dateend)
|
|
||||||
{
|
|
||||||
Result<DataTable>? r;
|
|
||||||
if (!string.IsNullOrEmpty(_MockRoot))
|
|
||||||
{
|
|
||||||
string json = File.ReadAllText(Path.Combine(string.Concat(AppContext.BaseDirectory, _MockRoot), $"{_RepositoryName}-{nameof(IToolTypesRepository.GetExportData)}.json"));
|
|
||||||
r = Newtonsoft.Json.JsonConvert.DeserializeObject<Result<DataTable>>(json);
|
|
||||||
if (r is null)
|
|
||||||
throw new NullReferenceException(nameof(r));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dateend ??= DateTime.Now;
|
|
||||||
datebegin ??= dateend.Value.AddMonths(-1);
|
|
||||||
ToolType tt = metrologyRepository.GetToolTypeByID(toolTypeId);
|
|
||||||
if (string.IsNullOrEmpty(tt.ExportSPName))
|
|
||||||
throw new NullReferenceException(nameof(tt.ExportSPName));
|
|
||||||
DataTable dataTable = metrologyRepository.ExportData(tt.ExportSPName, datebegin.Value, dateend.Value);
|
|
||||||
r = new()
|
|
||||||
{
|
|
||||||
Results = dataTable,
|
|
||||||
TotalRows = dataTable.Rows.Count,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static string FormatForCSV(string v)
|
|
||||||
{
|
|
||||||
StringBuilder result = new(v.Length + 2);
|
|
||||||
bool doubleQuoted = false;
|
|
||||||
if (v.StartsWith(' ') || v.EndsWith(' ') || v.Contains(',') || v.Contains('"'))
|
|
||||||
{
|
|
||||||
_ = result.Append('"');
|
|
||||||
doubleQuoted = true;
|
|
||||||
}
|
|
||||||
foreach (char c in v)
|
|
||||||
{
|
|
||||||
_ = c switch
|
|
||||||
{
|
|
||||||
'\r' or '\n' => result.Append(' '),
|
|
||||||
'"' => result.Append("\"\""),
|
|
||||||
_ => result.Append(c),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
if (doubleQuoted)
|
|
||||||
_ = result.Append('"');
|
|
||||||
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;
|
|
||||||
Result<DataTable> result;
|
|
||||||
IToolTypesRepository repository = this;
|
|
||||||
result = repository.GetExportData(metrologyRepository, toolTypeId, datebegin, dateend);
|
|
||||||
if (result.Results is null)
|
|
||||||
throw new NullReferenceException(nameof(result.Results));
|
|
||||||
StringBuilder stringBuilder = new();
|
|
||||||
_ = stringBuilder.AppendLine(GetColumnHeaders(result.Results));
|
|
||||||
foreach (DataRow dr in result.Results.Rows)
|
|
||||||
_ = stringBuilder.AppendLine(GetRowData(dr));
|
|
||||||
results = Encoding.UTF8.GetBytes(stringBuilder.ToString());
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
@ -4,17 +4,24 @@ namespace OI.Metrology.Server.Services;
|
|||||||
|
|
||||||
using OI.Metrology.Server.Models;
|
using OI.Metrology.Server.Models;
|
||||||
using OI.Metrology.Shared.DataModels;
|
using OI.Metrology.Shared.DataModels;
|
||||||
|
using OI.Metrology.Shared.Models;
|
||||||
using OI.Metrology.Shared.Models.Stateless;
|
using OI.Metrology.Shared.Models.Stateless;
|
||||||
using OI.Metrology.Shared.Services;
|
using OI.Metrology.Shared.Services;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
public class AttachmentsService : IAttachmentsService
|
public class AttachmentsService : IAttachmentsService
|
||||||
{
|
{
|
||||||
|
|
||||||
private readonly AppSettings _AppSettings;
|
private readonly AppSettings _AppSettings;
|
||||||
|
private readonly IHttpClientFactory _HttpClientFactory;
|
||||||
|
private readonly IFileShareRepository _FileShareRepository;
|
||||||
private readonly IMetrologyRepository _MetrologyRepository;
|
private readonly IMetrologyRepository _MetrologyRepository;
|
||||||
|
|
||||||
public AttachmentsService(AppSettings appSettings, IMetrologyRepository metrologyRepository)
|
public AttachmentsService(AppSettings appSettings, IHttpClientFactory httpClientFactory, IFileShareRepository fileShareRepository, IMetrologyRepository metrologyRepository)
|
||||||
{
|
{
|
||||||
_AppSettings = appSettings;
|
_AppSettings = appSettings;
|
||||||
|
_HttpClientFactory = httpClientFactory;
|
||||||
|
_FileShareRepository = fileShareRepository;
|
||||||
_MetrologyRepository = metrologyRepository;
|
_MetrologyRepository = metrologyRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,23 +34,16 @@ public class AttachmentsService : IAttachmentsService
|
|||||||
throw new NullReferenceException(nameof(tableName));
|
throw new NullReferenceException(nameof(tableName));
|
||||||
|
|
||||||
DateTime insertDate = Convert.ToDateTime(_MetrologyRepository.GetAttachmentInsertDateByGUID(tableName, attachmentId));
|
DateTime insertDate = Convert.ToDateTime(_MetrologyRepository.GetAttachmentInsertDateByGUID(tableName, attachmentId));
|
||||||
|
|
||||||
string year = insertDate.Year.ToString();
|
string year = insertDate.Year.ToString();
|
||||||
|
HttpClient httpClient = _HttpClientFactory.CreateClient();
|
||||||
|
Uri mesaFileShareMetrologySi = new(_AppSettings.EcMesaFileShareMetrologySi);
|
||||||
int weekNum = CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(insertDate, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
|
int weekNum = CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(insertDate, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
|
||||||
string directory = Path.Combine(_AppSettings.AttachmentPath, tableName + "_", year, $"WW{weekNum:00}", attachmentId.ToString());
|
Uri uri = _FileShareRepository.Append(mesaFileShareMetrologySi, "MetrologyAttachments", $"{tableName}_", year, $"WW{weekNum:00}", attachmentId.ToString(), filename);
|
||||||
if (!Directory.Exists(directory))
|
HttpResponseMessage httpResponseMessage = _FileShareRepository.ReadFile(httpClient, uri);
|
||||||
_ = Directory.CreateDirectory(directory);
|
if (httpResponseMessage.StatusCode != System.Net.HttpStatusCode.OK)
|
||||||
string fullPath = Path.Combine(directory, filename);
|
throw new Exception("File not found!");
|
||||||
|
return httpResponseMessage.Content.ReadAsStream();
|
||||||
// Check to see if file exists in the "New" directory structure, if not change the path back to the old. and check there
|
|
||||||
if (!File.Exists(fullPath))
|
|
||||||
{
|
|
||||||
fullPath = Path.Combine(_AppSettings.AttachmentPath, tableName, attachmentId.ToString(), filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!File.Exists(fullPath))
|
|
||||||
throw new Exception("File not found");
|
|
||||||
|
|
||||||
return new FileStream(fullPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Stream IAttachmentsService.GetAttachmentStreamByTitle(ToolType toolType, bool header, string title, string filename)
|
Stream IAttachmentsService.GetAttachmentStreamByTitle(ToolType toolType, bool header, string title, string filename)
|
||||||
@ -77,72 +77,70 @@ public class AttachmentsService : IAttachmentsService
|
|||||||
return GetAttachmentStream(tableName, attachmentId, filename);
|
return GetAttachmentStream(tableName, attachmentId, filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SaveAttachment(ToolType toolType, long headerId, string dataUniqueId, string filename, IFormFile uploadedFile)
|
void IAttachmentsService.SaveAttachment(ToolType toolType, Attachment attachment)
|
||||||
{
|
{
|
||||||
if (toolType is null)
|
if (toolType is null)
|
||||||
throw new Exception("Invalid tool type");
|
throw new Exception("Invalid tool type");
|
||||||
|
if (attachment.HeaderId is null)
|
||||||
using System.Transactions.TransactionScope trans = _MetrologyRepository.StartTransaction();
|
throw new NullReferenceException($"{nameof(attachment.HeaderId)}");
|
||||||
Guid attachmentId = Guid.Empty;
|
if (attachment.AttachmentId is null)
|
||||||
DateTime insertDate = new();
|
throw new NullReferenceException($"{nameof(attachment.AttachmentId)}");
|
||||||
string? tableName = "";
|
if (attachment.DestinationFileName is null)
|
||||||
|
throw new NullReferenceException($"{nameof(attachment.DestinationFileName)}");
|
||||||
if (string.IsNullOrWhiteSpace(dataUniqueId))
|
if (string.IsNullOrWhiteSpace(attachment.UniqueId))
|
||||||
{
|
throw new NullReferenceException($"{nameof(attachment.UniqueId)}");
|
||||||
attachmentId = _MetrologyRepository.GetHeaderAttachmentID(toolType.ID, headerId);
|
if (attachment.DestinationFileName != "Image.pdf")
|
||||||
insertDate = Convert.ToDateTime(_MetrologyRepository.GetHeaderInsertDate(toolType.ID, headerId));
|
_MetrologyRepository.SetHeaderAttachmentID(toolType.ID, attachment.HeaderId.Value, attachment.AttachmentId);
|
||||||
tableName = toolType.HeaderTableName;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
_MetrologyRepository.SetDataAttachmentID(toolType.ID, attachment.HeaderId.Value, attachment.UniqueId, attachment.AttachmentId);
|
||||||
attachmentId = _MetrologyRepository.GetDataAttachmentID(toolType.ID, headerId, dataUniqueId);
|
|
||||||
insertDate = Convert.ToDateTime(_MetrologyRepository.GetDataInsertDate(toolType.ID, headerId, dataUniqueId));
|
|
||||||
// Get Date for new directory name
|
|
||||||
tableName = toolType.DataTableName;
|
|
||||||
}
|
|
||||||
if (Equals(attachmentId, Guid.Empty))
|
|
||||||
throw new Exception("Invalid attachment ID");
|
|
||||||
|
|
||||||
string year = insertDate.Year.ToString();
|
|
||||||
int weekNum = CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(insertDate, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
|
|
||||||
string directory = Path.Combine(_AppSettings.AttachmentPath, $"{tableName}_", year, $"WW{weekNum:00}", attachmentId.ToString());
|
|
||||||
if (!Directory.Exists(directory))
|
|
||||||
_ = Directory.CreateDirectory(directory);
|
|
||||||
|
|
||||||
string fullPath = Path.Combine(directory, filename);
|
|
||||||
|
|
||||||
using (FileStream fileStream = new(fullPath, FileMode.Create, FileAccess.ReadWrite, FileShare.None))
|
|
||||||
uploadedFile.CopyTo(fileStream);
|
|
||||||
trans.Complete();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IAttachmentsService.SaveAttachment(ToolType toolType, long headerId, string dataUniqueId, string filename, object uploadedFile)
|
string? IAttachmentsService.GetProcessDataStandardFormat(IMetrologyRepository metrologyRepository, int toolTypeId, long headerId)
|
||||||
{
|
|
||||||
IFormFile formFile = (IFormFile)uploadedFile;
|
|
||||||
SaveAttachment(toolType, headerId, dataUniqueId, filename, formFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
string? IAttachmentsService.GetProcessDataStandardFormat(IMetrologyRepository metrologyRepository, string attachmentPath, int toolTypeId, long headerId)
|
|
||||||
{
|
{
|
||||||
string? result;
|
string? result;
|
||||||
string year;
|
|
||||||
int weekNum;
|
int weekNum;
|
||||||
|
string file;
|
||||||
|
string year;
|
||||||
string directory;
|
string directory;
|
||||||
string checkDirectory;
|
Task<string> json;
|
||||||
|
Uri weekDirectory;
|
||||||
|
Uri checkDirectory;
|
||||||
List<string> files = new();
|
List<string> files = new();
|
||||||
|
string[] collection = ["-", string.Empty];
|
||||||
|
NginxFileSystem[]? nginxFileSystemCollection;
|
||||||
|
Task<HttpResponseMessage> httpResponseMessage;
|
||||||
|
HttpClient httpClient = _HttpClientFactory.CreateClient();
|
||||||
|
Uri mesaFileShareMetrologySi = new(_AppSettings.EcMesaFileShareMetrologySi);
|
||||||
DateTime[] dateTimes = new DateTime[] { DateTime.Now, DateTime.Now.AddDays(-6.66) };
|
DateTime[] dateTimes = new DateTime[] { DateTime.Now, DateTime.Now.AddDays(-6.66) };
|
||||||
ToolType toolType = metrologyRepository.GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
ToolType toolType = metrologyRepository.GetToolTypeByID(toolTypeId) ?? throw new Exception("Invalid tool type ID");
|
||||||
foreach (DateTime dateTime in dateTimes)
|
foreach (DateTime dateTime in dateTimes)
|
||||||
{
|
{
|
||||||
year = dateTime.Year.ToString();
|
foreach (string item in collection)
|
||||||
weekNum = CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
|
{
|
||||||
directory = Path.Combine(_AppSettings.AttachmentPath, $"{toolType.HeaderTableName}_", year, $"WW{weekNum:00}");
|
year = dateTime.Year.ToString();
|
||||||
if (!Directory.Exists(directory))
|
weekNum = CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
|
||||||
_ = Directory.CreateDirectory(directory);
|
weekDirectory = _FileShareRepository.Append(mesaFileShareMetrologySi, "MetrologyAttachments", $"{toolType.HeaderTableName}_", year, $"WW{weekNum:00}");
|
||||||
checkDirectory = Path.Combine(directory, headerId.ToString());
|
checkDirectory = _FileShareRepository.Append(weekDirectory, $"{item}{headerId}");
|
||||||
if (!Directory.Exists(checkDirectory))
|
directory = Path.Combine(_AppSettings.EcMetrologySi, "MetrologyAttachments", $"{toolType.HeaderTableName}_", year, $"WW{weekNum:00}", $"{item}{headerId}");
|
||||||
continue;
|
httpResponseMessage = httpClient.GetAsync(checkDirectory);
|
||||||
files.AddRange(Directory.GetFiles(checkDirectory));
|
httpResponseMessage.Wait();
|
||||||
|
if (httpResponseMessage.Result.StatusCode != System.Net.HttpStatusCode.OK)
|
||||||
|
continue;
|
||||||
|
json = httpResponseMessage.Result.Content.ReadAsStringAsync();
|
||||||
|
json.Wait();
|
||||||
|
nginxFileSystemCollection = JsonSerializer.Deserialize(json.Result, NginxFileSystemCollectionSourceGenerationContext.Default.NginxFileSystemArray);
|
||||||
|
if (nginxFileSystemCollection is null)
|
||||||
|
continue;
|
||||||
|
foreach (NginxFileSystem nginxFileSystem in nginxFileSystemCollection)
|
||||||
|
{
|
||||||
|
if (!nginxFileSystem.Name.EndsWith(".pdsf"))
|
||||||
|
continue;
|
||||||
|
file = Path.Combine(directory, nginxFileSystem.Name);
|
||||||
|
files.Add(file);
|
||||||
|
}
|
||||||
|
if (files.Count != 0)
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (files.Count != 0)
|
if (files.Count != 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ public class SQLDbConnectionFactory : IDbConnectionFactory
|
|||||||
|
|
||||||
public SQLDbConnectionFactory(AppSettings appSettings) => _AppSettings = appSettings;
|
public SQLDbConnectionFactory(AppSettings appSettings) => _AppSettings = appSettings;
|
||||||
|
|
||||||
public DbConnection GetDbConnection(bool? useOI2Sql)
|
public DbConnection GetDbConnection(bool? useIqsConnection)
|
||||||
{
|
{
|
||||||
DbProviderFactories.RegisterFactory(
|
DbProviderFactories.RegisterFactory(
|
||||||
typeof(SqlConnection).Namespace,
|
typeof(SqlConnection).Namespace,
|
||||||
@ -22,11 +22,8 @@ public class SQLDbConnectionFactory : IDbConnectionFactory
|
|||||||
if (string.IsNullOrEmpty(_AppSettings.ConnectionString))
|
if (string.IsNullOrEmpty(_AppSettings.ConnectionString))
|
||||||
throw new Exception("Connection string is missing");
|
throw new Exception("Connection string is missing");
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(_AppSettings.OI2SqlConnectionString))
|
|
||||||
throw new Exception("Connection string is missing");
|
|
||||||
|
|
||||||
DbConnection dbConnection = SqlClientFactory.Instance.CreateConnection();
|
DbConnection dbConnection = SqlClientFactory.Instance.CreateConnection();
|
||||||
dbConnection.ConnectionString = useOI2Sql is not null && useOI2Sql.Value ? _AppSettings.OI2SqlConnectionString : _AppSettings.ConnectionString;
|
dbConnection.ConnectionString = useIqsConnection is null || !useIqsConnection.Value ? _AppSettings.ConnectionString : throw new Exception();
|
||||||
dbConnection.Open();
|
dbConnection.Open();
|
||||||
return dbConnection;
|
return dbConnection;
|
||||||
}
|
}
|
||||||
|
@ -98,8 +98,7 @@ public class SpreadingResistanceProfileService : ISpreadingResistanceProfileServ
|
|||||||
|
|
||||||
private static ReadOnlyCollection<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()
|
List<string> results = new() {
|
||||||
{
|
|
||||||
string.Empty, // 0
|
string.Empty, // 0
|
||||||
string.Empty, // 1
|
string.Empty, // 1
|
||||||
string.Empty, // 2
|
string.Empty, // 2
|
||||||
|
@ -1,96 +0,0 @@
|
|||||||
@using OI.Metrology.Shared.ViewModels
|
|
||||||
@model OI.Metrology.Shared.ViewModels.Export
|
|
||||||
@{
|
|
||||||
ViewData["Title"] = "Export Data";
|
|
||||||
}
|
|
||||||
|
|
||||||
<style>
|
|
||||||
td {
|
|
||||||
padding-bottom: 2em;
|
|
||||||
padding-right: 1em;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<h3>Export Data</h3>
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<form asp-controller="Export" asp-action="ExportData" method="post" class="form-inline">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="ToolType">Tool Type</label>
|
|
||||||
<div class="form-control" id="ToolType" name="ToolType"></div>
|
|
||||||
@Html.ValidationMessage("ToolType", new { @class = "text-danger" })
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="StartDate">Start Time</label>
|
|
||||||
<div class="form-control mb-2 mr-sm-2" id="StartDateControl"></div>
|
|
||||||
<div class="form-control mb-2 mr-sm-2" id="StartTimeControl"></div>
|
|
||||||
@Html.ValidationMessage("StartDate", new { @class = "text-danger" })
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="EndDate">End Time</label>
|
|
||||||
<div class="form-control mb-2 mr-sm-2" id="EndDateControl"></div>
|
|
||||||
<div class="form-control mb-2 mr-sm-2" id="EndTimeControl"></div>
|
|
||||||
@Html.ValidationMessage("EndDate", new { @class = "text-danger" })
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<button type="submit" class="btn btn-primary">Export Data</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
@Html.ValidationMessage("Exception", new { @class = "text-danger" })
|
|
||||||
</div>
|
|
||||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
|
|
||||||
var apiUrl = "@ViewBag.ApiUrl";
|
|
||||||
|
|
||||||
$("#ToolType").igCombo({
|
|
||||||
dataSource: apiUrl + '/tooltypes',
|
|
||||||
responseDataKey: "Results",
|
|
||||||
textKey: "ToolTypeName",
|
|
||||||
valueKey: "ID",
|
|
||||||
mode: "dropdown",
|
|
||||||
width: 150
|
|
||||||
});
|
|
||||||
|
|
||||||
var startTime = new Date("@Model.StartTime.ToString("yyyy-MM-ddTHH:mm")");
|
|
||||||
|
|
||||||
$("#StartDateControl").igDatePicker({
|
|
||||||
dateInputFormat: "date",
|
|
||||||
value: startTime,
|
|
||||||
width: 125,
|
|
||||||
inputName: "StartDate",
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#StartTimeControl").igTimePicker({
|
|
||||||
dateInputFormat: "time",
|
|
||||||
value: startTime,
|
|
||||||
width: 110,
|
|
||||||
inputName: "StartTime",
|
|
||||||
});
|
|
||||||
|
|
||||||
var endTime = new Date("@Model.EndTime.ToString("yyyy-MM-ddTHH:mm")");
|
|
||||||
|
|
||||||
$("#EndDateControl").igDatePicker({
|
|
||||||
dateInputFormat: "date",
|
|
||||||
value: endTime,
|
|
||||||
width: 125,
|
|
||||||
inputName: "EndDate",
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#EndTimeControl").igTimePicker({
|
|
||||||
dateInputFormat: "time",
|
|
||||||
value: endTime,
|
|
||||||
width: 110,
|
|
||||||
inputName: "EndTime",
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
@ -1,28 +0,0 @@
|
|||||||
@{
|
|
||||||
ViewData["Title"] = "Awaiting Disposition";
|
|
||||||
}
|
|
||||||
|
|
||||||
<h4>Awaiting Disposition</h4>
|
|
||||||
|
|
||||||
<div style="height: 450px;">
|
|
||||||
<table id="grid"></table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
|
||||||
<div class="col-xs-1">
|
|
||||||
<input type="button" id="OpenButton" value="Open" />
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-1">
|
|
||||||
<input type="button" id="RefreshButton" value="Refresh" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
|
|
||||||
initAwaitingDisposition("@ViewBag.ApiUrl");
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
@ -1,3 +0,0 @@
|
|||||||
@{
|
|
||||||
ViewData["Title"] = "Metrology Home Page";
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
@{
|
|
||||||
ViewData["Title"] = "Run Headers";
|
|
||||||
}
|
|
||||||
|
|
||||||
<style>
|
|
||||||
html,
|
|
||||||
body {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.container-fluid {
|
|
||||||
height: 90%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#HeaderGrid,
|
|
||||||
#FieldsGrid {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.FieldTitle {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<h4>Run Headers</h4>
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label for="ToolType">Tool Type:</label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div id="ToolType"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<table width="100%" height="80%">
|
|
||||||
<tr>
|
|
||||||
<td width="50%">
|
|
||||||
<table id="HeaderGrid"></table>
|
|
||||||
</td>
|
|
||||||
<td width="50%">
|
|
||||||
<table id="FieldsGrid"></table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
|
|
||||||
initRunHeaders("@ViewBag.ApiUrl");
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
@ -1,104 +0,0 @@
|
|||||||
@model OI.Metrology.Shared.ViewModels.RunInfo
|
|
||||||
@{
|
|
||||||
ViewData["Title"] = "Run Information";
|
|
||||||
}
|
|
||||||
<style>
|
|
||||||
#HeaderGridDiv,
|
|
||||||
#DetailsGridDiv {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<h4>Run Information</h4>
|
|
||||||
|
|
||||||
<form class="form-inline mb-4">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="ToolType">Tool Type</label>
|
|
||||||
<div class="form-control" id="ToolType"></div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="StartDate">Start Time</label>
|
|
||||||
<div class="form-control mb-2 mr-sm-2" id="StartDate"></div>
|
|
||||||
<div class="form-control mb-2 mr-sm-2" id="StartTime"></div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="EndDate">End Time</label>
|
|
||||||
<div class="form-control mb-2 mr-sm-2" id="EndDate"></div>
|
|
||||||
<div class="form-control mb-2 mr-sm-2" id="EndTime"></div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<input class="btn btn-primary" type="button" value="Load Headers" id="LoadHeadersButton" />
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="form-check-label" for="chkAutoRefresh">
|
|
||||||
Auto-Refresh
|
|
||||||
</label>
|
|
||||||
<input class="form-check-input" type="checkbox" id="chkAutoRefresh">
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="form-check-label" for="chkCopyOnGet">
|
|
||||||
Copy-On-Get
|
|
||||||
</label>
|
|
||||||
<input class="form-check-input" type="checkbox" id="chkCopyOnGet">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div style="height: 300px;" id="HeaderGridDiv">
|
|
||||||
<span id="ToolTypeID" hidden></span>
|
|
||||||
<table id="HeaderGrid"></table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
|
||||||
<div class="col-xs-1">
|
|
||||||
<input type="button" class="btn" id="GetDataButton" value="Get Data" disabled />
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-1">
|
|
||||||
<input type="button" class="btn" id="ReviewButton" value="Review" disabled />
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-1">
|
|
||||||
<input type="button" class="btn" id="RecipeParametersButton" value="Parameters" disabled />
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-1">
|
|
||||||
<input type="button" class="btn" id="ViewButton" value="View" disabled />
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-1">
|
|
||||||
<input type="button" class="btn" id="PinButton" value="Pin" disabled />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="DetailsDiv" hidden>
|
|
||||||
|
|
||||||
<span id="HeaderId" hidden></span>
|
|
||||||
<span id="HeaderAttachmentId" hidden></span>
|
|
||||||
<div style="padding-bottom: 20px;" id="DetailsGridDiv">
|
|
||||||
<table id="DetailsGrid"></table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="ExportDiv" style="margin-top: 10px;" hidden>
|
|
||||||
<input type="button" value="Send to OpenInsight" id="OIExportButton" />
|
|
||||||
<span id="OIExportResult" style="margin-left: 10px; font-weight: bold; color: #366b02;"></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p style="margin-top: 20px;">
|
|
||||||
<iframe id="DataAttachmentFrame" style="height:900px; border-width:thin; margin-right: 10px;" hidden></iframe>
|
|
||||||
<iframe id="HeaderAttachmentFrame" style="height:900px; border-width:thin;" hidden></iframe>
|
|
||||||
|
|
||||||
<div id="DataAttachmentDiv" hidden>
|
|
||||||
<canvas id="DataAttachmentCanvas"></canvas>
|
|
||||||
</div>
|
|
||||||
<div id="HeaderAttachmentDiv" hidden>
|
|
||||||
<canvas id="HeaderAttachmentCanvas"></canvas>
|
|
||||||
</div>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
|
|
||||||
initRunInfo("@ViewBag.ApiUrl", "@Model.ToolTypeID", "@Model.HeaderID", "@Model.HeaderAttachmentID");
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
@ -103,6 +103,6 @@
|
|||||||
$("#runDataSheet5").click(function () { runDataSheet(5, $(this).val()) });
|
$("#runDataSheet5").click(function () { runDataSheet(5, $(this).val()) });
|
||||||
$("#runDataSheet6").click(function () { runDataSheet(6, $(this).val()) });
|
$("#runDataSheet6").click(function () { runDataSheet(6, $(this).val()) });
|
||||||
$("#restartButton").click(function () { restartButton() });
|
$("#restartButton").click(function () { restartButton() });
|
||||||
initWorkMaterial("@ViewBag.ApiUrl");
|
initWorkMaterial("@ViewBag.ApiUrl", "");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -6,36 +6,42 @@
|
|||||||
<meta name="viewport" content="width=device-width" />
|
<meta name="viewport" content="width=device-width" />
|
||||||
<title>@ViewBag.Title</title>
|
<title>@ViewBag.Title</title>
|
||||||
|
|
||||||
<script src="~/js/modernizr-3.6.0-custom.js" type="text/javascript" asp-append-version="true"></script>
|
<script src="https://oi-metrology-viewer-prod.mes.infineon.com/js/modernizr-3.6.0-custom.js?no-cache=2024-06-18-10-54"
|
||||||
|
type="text/javascript"></script>
|
||||||
|
|
||||||
<link href="~/styles/bootstrap.min.css" rel="stylesheet" asp-append-version="true" />
|
<link href="https://oi-metrology-viewer-prod.mes.infineon.com/styles/bootstrap.min.css?no-cache=2024-06-18-10-54"
|
||||||
<link href="~/igniteui/css/themes/bootstrap3/default/infragistics.theme.css" rel="stylesheet"
|
rel="stylesheet" />
|
||||||
asp-append-version="true" />
|
<link
|
||||||
<link href="~/igniteui/css/structure/infragistics.css" rel="stylesheet" asp-append-version="true" />
|
href="https://oi-metrology-viewer-prod.mes.infineon.com/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?no-cache=2024-06-18-10-54"
|
||||||
<link href="~/styles/site.css" rel="stylesheet" asp-append-version="true" />
|
rel="stylesheet" />
|
||||||
|
<link
|
||||||
|
href="https://oi-metrology-viewer-prod.mes.infineon.com/igniteui/css/structure/infragistics.css?no-cache=2024-06-18-10-54"
|
||||||
|
rel="stylesheet" />
|
||||||
|
<link href="https://oi-metrology-viewer-prod.mes.infineon.com/styles/site-server.css?no-cache=2024-06-18-10-54"
|
||||||
|
rel="stylesheet" />
|
||||||
|
<link href="https://oi-metrology-viewer-prod.mes.infineon.com/styles/index.css?no-cache=2024-06-18-10-54"
|
||||||
|
rel="stylesheet" />
|
||||||
|
|
||||||
<script src="~/js/jquery-3.6.0.min.js" type="text/javascript" asp-append-version="true"></script>
|
<script src="https://oi-metrology-viewer-prod.mes.infineon.com/js/jquery-3.6.0.min.js?no-cache=2024-06-18-10-54"
|
||||||
<script src="~/js/jquery-ui.min.js" type="text/javascript" asp-append-version="true"></script>
|
type="text/javascript"></script>
|
||||||
<script src="~/igniteui/js/infragistics.core.js" type="text/javascript" asp-append-version="true"></script>
|
<script src="https://oi-metrology-viewer-prod.mes.infineon.com/js/jquery-ui.min.js?no-cache=2024-06-18-10-54"
|
||||||
<script src="~/igniteui/js/infragistics.lob.js" type="text/javascript" asp-append-version="true"></script>
|
type="text/javascript"></script>
|
||||||
<script src="~/igniteui/js/infragistics.dv.js" type="text/javascript" asp-append-version="true"></script>
|
<script
|
||||||
|
src="https://oi-metrology-viewer-prod.mes.infineon.com/igniteui/js/infragistics.core.js?no-cache=2024-06-18-10-54"
|
||||||
|
type="text/javascript"></script>
|
||||||
|
<script
|
||||||
|
src="https://oi-metrology-viewer-prod.mes.infineon.com/igniteui/js/infragistics.lob.js?no-cache=2024-06-18-10-54"
|
||||||
|
type="text/javascript"></script>
|
||||||
|
<script
|
||||||
|
src="https://oi-metrology-viewer-prod.mes.infineon.com/igniteui/js/infragistics.dv.js?no-cache=2024-06-18-10-54"
|
||||||
|
type="text/javascript"></script>
|
||||||
|
|
||||||
<script src="~/js/chart-4.3.0.min.js" type="module"></script>
|
<script src="https://oi-metrology-viewer-prod.mes.infineon.com/js/chart-4.3.0.min.js" type="module"></script>
|
||||||
|
|
||||||
<script src="~/js/common.js" type="text/javascript" asp-append-version="true"></script>
|
<script src="https://oi-metrology-viewer-prod.mes.infineon.com/js/common.js?no-cache=2024-06-18-10-54"
|
||||||
<script src="~/js/site.js" type="text/javascript" asp-append-version="true"></script>
|
type="text/javascript"></script>
|
||||||
<script>
|
<script src="https://oi-metrology-viewer-prod.mes.infineon.com/js/site-server.js?no-cache=2024-06-18-10-54"
|
||||||
$(document).ready(function () {
|
type="text/javascript"></script>
|
||||||
if (location.pathname == "/") {
|
|
||||||
route = "/AwaitingDispo";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
route = location.pathname;
|
|
||||||
}
|
|
||||||
$('ul.nav.navbar-nav').find('a[href="' + route + '"]')
|
|
||||||
.closest('li').addClass('alert-info');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@ -57,7 +63,9 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<div class="navbar-brand">
|
<div class="navbar-brand">
|
||||||
<a href="/"><img src="~/images/IFX_LOGO_RGB.png" height="20" /></a>
|
<a href="https://oi-metrology-viewer-prod.mes.infineon.com"><img
|
||||||
|
src="https://oi-metrology-viewer-prod.mes.infineon.com/images/IFX_LOGO_RGB.png"
|
||||||
|
height="20" /></a>
|
||||||
OI Metrology Viewer
|
OI Metrology Viewer
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -91,8 +99,10 @@
|
|||||||
|
|
||||||
<div id="MessageModal"></div>
|
<div id="MessageModal"></div>
|
||||||
|
|
||||||
<script src="~/js/bootstrap.min.js" type="text/javascript" asp-append-version="true"></script>
|
<script src="https://oi-metrology-viewer-prod.mes.infineon.com/js/bootstrap.min.js?no-cache=2024-06-18-10-54"
|
||||||
<script src="~/js/respond.min.js" type="text/javascript" asp-append-version="true"></script>
|
type="text/javascript"></script>
|
||||||
|
<script src="https://oi-metrology-viewer-prod.mes.infineon.com/js/respond.min.js?no-cache=2024-06-18-10-54"
|
||||||
|
type="text/javascript"></script>
|
||||||
@RenderSection("scripts", required: false)
|
@RenderSection("scripts", required: false)
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
183
Server/wwwroot/index.html
Normal file
183
Server/wwwroot/index.html
Normal file
@ -0,0 +1,183 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<title>Run Information</title>
|
||||||
|
|
||||||
|
<script src="https://metrology-viewer-prod.mes.infineon.com/js/modernizr-3.6.0-custom.js?no-cache=2024-06-18-10-54"
|
||||||
|
type="text/javascript"></script>
|
||||||
|
|
||||||
|
<link href="https://metrology-viewer-prod.mes.infineon.com/styles/bootstrap.min.css?no-cache=2024-06-18-10-54"
|
||||||
|
rel="stylesheet" />
|
||||||
|
<link
|
||||||
|
href="https://metrology-viewer-prod.mes.infineon.com/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?no-cache=2024-06-18-10-54"
|
||||||
|
rel="stylesheet" />
|
||||||
|
<link
|
||||||
|
href="https://metrology-viewer-prod.mes.infineon.com/igniteui/css/structure/infragistics.css?no-cache=2024-06-18-10-54"
|
||||||
|
rel="stylesheet" />
|
||||||
|
<link href="https://metrology-viewer-prod.mes.infineon.com/styles/site-server.css?no-cache=2024-06-18-10-54"
|
||||||
|
rel="stylesheet" />
|
||||||
|
<link href="https://metrology-viewer-prod.mes.infineon.com/styles/index.css?no-cache=2024-06-18-10-54"
|
||||||
|
rel="stylesheet" />
|
||||||
|
|
||||||
|
<script src="https://metrology-viewer-prod.mes.infineon.com/js/jquery-3.6.0.min.js?no-cache=2024-06-18-10-54"
|
||||||
|
type="text/javascript"></script>
|
||||||
|
<script src="https://metrology-viewer-prod.mes.infineon.com/js/jquery-ui.min.js?no-cache=2024-06-18-10-54"
|
||||||
|
type="text/javascript"></script>
|
||||||
|
<script
|
||||||
|
src="https://metrology-viewer-prod.mes.infineon.com/igniteui/js/infragistics.core.js?no-cache=2024-06-18-10-54"
|
||||||
|
type="text/javascript"></script>
|
||||||
|
<script
|
||||||
|
src="https://metrology-viewer-prod.mes.infineon.com/igniteui/js/infragistics.lob.js?no-cache=2024-06-18-10-54"
|
||||||
|
type="text/javascript"></script>
|
||||||
|
<script
|
||||||
|
src="https://metrology-viewer-prod.mes.infineon.com/igniteui/js/infragistics.dv.js?no-cache=2024-06-18-10-54"
|
||||||
|
type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script src="https://metrology-viewer-prod.mes.infineon.com/js/chart-4.3.0.min.js" type="module"></script>
|
||||||
|
|
||||||
|
<script src="https://metrology-viewer-prod.mes.infineon.com/js/common.js?no-cache=2024-06-18-10-54"
|
||||||
|
type="text/javascript"></script>
|
||||||
|
<script src="https://metrology-viewer-prod.mes.infineon.com/js/site-server.js?no-cache=2024-06-18-10-54"
|
||||||
|
type="text/javascript"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="navbar navbar-fixed-top">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<div class="navbar-brand">
|
||||||
|
<a href="https://metrology-viewer-prod.mes.infineon.com"><img
|
||||||
|
src="https://metrology-viewer-prod.mes.infineon.com/images/IFX_LOGO_RGB.png"
|
||||||
|
height="20" /></a>
|
||||||
|
OI Metrology Viewer
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="navbar-collapse collapse">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li><a href="https://metrology-viewer-prod.mes.infineon.com/awaiting-disposition.html">Awaiting
|
||||||
|
Disposition</a></li>
|
||||||
|
<li><a href="https://metrology-viewer-prod.mes.infineon.com/index.html" class="alert-info">Run
|
||||||
|
Information</a></li>
|
||||||
|
<li><a href="https://metrology-viewer-prod.mes.infineon.com/run-headers.html">Run Headers</a></li>
|
||||||
|
<li><a href="https://oi-metrology-viewer-prod.mes.infineon.com/Export" target="_blank">Export</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||||
|
</ul>
|
||||||
|
<p class="navbar-text navbar-right">
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="container-fluid body-content">
|
||||||
|
|
||||||
|
<h4>Run Information</h4>
|
||||||
|
|
||||||
|
<form class="form-inline mb-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="ToolType">Tool Type</label>
|
||||||
|
<div class="form-control" id="ToolType"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="StartDate">Start Time</label>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="StartDate"></div>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="StartTime"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="EndDate">End Time</label>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="EndDate"></div>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="EndTime"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input class="btn btn-primary" type="button" value="Load Headers" id="LoadHeadersButton" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-check-label" for="chkAutoRefresh">
|
||||||
|
Auto-Refresh
|
||||||
|
</label>
|
||||||
|
<input class="form-check-input" type="checkbox" id="chkAutoRefresh">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-check-label" for="chkCopyOnGet">
|
||||||
|
Copy-On-Get
|
||||||
|
</label>
|
||||||
|
<input class="form-check-input" type="checkbox" id="chkCopyOnGet">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div style="height: 300px;" id="HeaderGridDiv">
|
||||||
|
<span id="ToolTypeID" hidden></span>
|
||||||
|
<table id="HeaderGrid"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="GetDataButton" value="Get Data" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="ReviewButton" value="Review" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="RecipeParametersButton" value="Parameters" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="ViewButton" value="View" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="PinButton" value="Pin" disabled />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="DetailsDiv" hidden>
|
||||||
|
|
||||||
|
<span id="HeaderId" hidden></span>
|
||||||
|
<span id="HeaderAttachmentId" hidden></span>
|
||||||
|
<div style="padding-bottom: 20px;" id="DetailsGridDiv">
|
||||||
|
<table id="DetailsGrid"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="ExportDiv" style="margin-top: 10px;" hidden>
|
||||||
|
<input type="button" value="Send to OpenInsight" id="OIExportButton" />
|
||||||
|
<span id="OIExportResult" style="margin-left: 10px; font-weight: bold; color: #366b02;"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="margin-top: 20px;">
|
||||||
|
<iframe id="DataAttachmentFrame" style="height:900px; border-width:thin; margin-right: 10px;"
|
||||||
|
hidden></iframe>
|
||||||
|
<iframe id="HeaderAttachmentFrame" style="height:900px; border-width:thin;" hidden></iframe>
|
||||||
|
|
||||||
|
<div id="DataAttachmentDiv" hidden>
|
||||||
|
<canvas id="DataAttachmentCanvas"></canvas>
|
||||||
|
</div>
|
||||||
|
<div id="HeaderAttachmentDiv" hidden>
|
||||||
|
<canvas id="HeaderAttachmentCanvas"></canvas>
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<footer>
|
||||||
|
<p>© 2024 - Infineon Technologies</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="MessageModal"></div>
|
||||||
|
|
||||||
|
<script src="https://metrology-viewer-prod.mes.infineon.com/js/bootstrap.min.js?no-cache=2024-06-18-10-54"
|
||||||
|
type="text/javascript"></script>
|
||||||
|
<script src="https://metrology-viewer-prod.mes.infineon.com/js/respond.min.js?no-cache=2024-06-18-10-54"
|
||||||
|
type="text/javascript"></script>
|
||||||
|
<script src="https://metrology-viewer-prod.mes.infineon.com/js/index.js?no-cache=2024-06-18-10-54"
|
||||||
|
type="text/javascript"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -3,7 +3,7 @@ using System.Text.Json.Serialization;
|
|||||||
namespace OI.Metrology.Shared.DataModels;
|
namespace OI.Metrology.Shared.DataModels;
|
||||||
|
|
||||||
public record InfinityQS1090FullLoad([property: JsonPropertyName("f_sgrp")] int SubGroupId,
|
public record InfinityQS1090FullLoad([property: JsonPropertyName("f_sgrp")] int SubGroupId,
|
||||||
[property: JsonPropertyName("date_time")] DateTime SubGroupIdFormated,
|
[property: JsonPropertyName("date_time")] DateTime SubGroupIdFormatted,
|
||||||
[property: JsonPropertyName("pr_name")] string Reactor,
|
[property: JsonPropertyName("pr_name")] string Reactor,
|
||||||
[property: JsonPropertyName("pd_name")] string Part,
|
[property: JsonPropertyName("pd_name")] string Part,
|
||||||
[property: JsonPropertyName("iq_value")] float Value,
|
[property: JsonPropertyName("iq_value")] float Value,
|
||||||
|
21
Shared/DataModels/InfinityQSDescriptorV4.cs
Normal file
21
Shared/DataModels/InfinityQSDescriptorV4.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.DataModels;
|
||||||
|
|
||||||
|
public record InfinityQSDescriptorV4([property: JsonPropertyName("sd_sgrp")] int? SubGroupId,
|
||||||
|
[property: JsonPropertyName("sd_tsno")] int? SiteNumber,
|
||||||
|
[property: JsonPropertyName("dd_dsgp")] int? VariableNumber,
|
||||||
|
[property: JsonPropertyName("gd_name")] string? Variable,
|
||||||
|
[property: JsonPropertyName("dd_name")] string? Value);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
|
[JsonSerializable(typeof(InfinityQSDescriptorV4))]
|
||||||
|
public partial class InfinityQSDescriptorV4SourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
|
[JsonSerializable(typeof(Result<InfinityQSDescriptorV4[]>))]
|
||||||
|
public partial class ResultInfinityQSDescriptorV4SourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
24
Shared/DataModels/InfinityQSEventV4.cs
Normal file
24
Shared/DataModels/InfinityQSEventV4.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.DataModels;
|
||||||
|
|
||||||
|
public record InfinityQSEventV4([property: JsonPropertyName("ev_evnt")] int EventId,
|
||||||
|
[property: JsonPropertyName("ev_sgtm")] int SubGroupDateTimeId,
|
||||||
|
[property: JsonPropertyName("ev_utc7")] string SubGroupDateTime,
|
||||||
|
[property: JsonPropertyName("pr_name")] string Process,
|
||||||
|
[property: JsonPropertyName("pd_name")] string Part,
|
||||||
|
[property: JsonPropertyName("td_test")] int VariableNumber,
|
||||||
|
[property: JsonPropertyName("td_name")] string Variable,
|
||||||
|
[property: JsonPropertyName("ev_name")] string Name);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
|
[JsonSerializable(typeof(InfinityQSEventV4))]
|
||||||
|
public partial class InfinityQSEventV4SourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
|
[JsonSerializable(typeof(Result<InfinityQSEventV4[]>))]
|
||||||
|
public partial class ResultInfinityQSEventV4SourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
@ -5,7 +5,7 @@ namespace OI.Metrology.Shared.DataModels;
|
|||||||
public record InfinityQSV3([property: JsonPropertyName("iq_sum")] int SumOOS,
|
public record InfinityQSV3([property: JsonPropertyName("iq_sum")] int SumOOS,
|
||||||
[property: JsonPropertyName("sl_aflag")] int? AlarmFlag,
|
[property: JsonPropertyName("sl_aflag")] int? AlarmFlag,
|
||||||
[property: JsonPropertyName("sl_loos")] int? LowerOOS,
|
[property: JsonPropertyName("sl_loos")] int? LowerOOS,
|
||||||
[property: JsonPropertyName("sl_uoos")] int? UperOOS,
|
[property: JsonPropertyName("sl_uoos")] int? UpperOOS,
|
||||||
[property: JsonPropertyName("se_sgrp")] int SubGroupId,
|
[property: JsonPropertyName("se_sgrp")] int SubGroupId,
|
||||||
[property: JsonPropertyName("se_sgtm")] int SubGroupDateTime,
|
[property: JsonPropertyName("se_sgtm")] int SubGroupDateTime,
|
||||||
[property: JsonPropertyName("se_tsno")] int SiteNumber,
|
[property: JsonPropertyName("se_tsno")] int SiteNumber,
|
||||||
@ -19,7 +19,7 @@ public record InfinityQSV3([property: JsonPropertyName("iq_sum")] int SumOOS,
|
|||||||
[property: JsonPropertyName("sl_eflag")] int? EnableFlag,
|
[property: JsonPropertyName("sl_eflag")] int? EnableFlag,
|
||||||
[property: JsonPropertyName("sl_scal")] int? Scale,
|
[property: JsonPropertyName("sl_scal")] int? Scale,
|
||||||
[property: JsonPropertyName("sl_sls")] double? LowerSpecLimit,
|
[property: JsonPropertyName("sl_sls")] double? LowerSpecLimit,
|
||||||
[property: JsonPropertyName("sl_usl")] double? UperSpecLimit);
|
[property: JsonPropertyName("sl_usl")] double? UpperSpecLimit);
|
||||||
|
|
||||||
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
[JsonSerializable(typeof(InfinityQSV3))]
|
[JsonSerializable(typeof(InfinityQSV3))]
|
||||||
|
34
Shared/DataModels/InfinityQSV4.cs
Normal file
34
Shared/DataModels/InfinityQSV4.cs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.DataModels;
|
||||||
|
|
||||||
|
public record InfinityQSV4([property: JsonPropertyName("iq_sum")] int SumOOS,
|
||||||
|
[property: JsonPropertyName("sl_aflag")] int? AlarmFlag,
|
||||||
|
[property: JsonPropertyName("sl_loos")] int? LowerOOS,
|
||||||
|
[property: JsonPropertyName("sl_uoos")] int? UpperOOS,
|
||||||
|
[property: JsonPropertyName("se_sgrp")] int SubGroupId,
|
||||||
|
[property: JsonPropertyName("se_sgtm")] int SubGroupDateTime,
|
||||||
|
[property: JsonPropertyName("se_tsno")] int SiteNumber,
|
||||||
|
[property: JsonPropertyName("td_test")] int VariableNumber,
|
||||||
|
[property: JsonPropertyName("pr_name")] string? Process,
|
||||||
|
[property: JsonPropertyName("jd_name")] string? Job,
|
||||||
|
[property: JsonPropertyName("pl_name")] string? Lot,
|
||||||
|
[property: JsonPropertyName("pd_name")] string? Part,
|
||||||
|
[property: JsonPropertyName("td_name")] string? Variable,
|
||||||
|
[property: JsonPropertyName("se_val")] double? Value,
|
||||||
|
[property: JsonPropertyName("sl_eflag")] int? EnableFlag,
|
||||||
|
[property: JsonPropertyName("sl_scal")] int? Scale,
|
||||||
|
[property: JsonPropertyName("sl_sls")] double? LowerSpecLimit,
|
||||||
|
[property: JsonPropertyName("sl_usl")] double? UpperSpecLimit);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
|
[JsonSerializable(typeof(InfinityQSV4))]
|
||||||
|
public partial class InfinityQSV4SourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
|
[JsonSerializable(typeof(Result<InfinityQSV4[]>))]
|
||||||
|
public partial class ResultInfinityQSV4SourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
15
Shared/DataModels/WaferCounter.cs
Normal file
15
Shared/DataModels/WaferCounter.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
namespace OI.Metrology.Shared.DataModels;
|
||||||
|
|
||||||
|
public record WaferCounter(DateTime DateTime,
|
||||||
|
string DateTimeFormatted,
|
||||||
|
string EquipmentId,
|
||||||
|
string Message,
|
||||||
|
string Text,
|
||||||
|
int Total,
|
||||||
|
string SlotMap)
|
||||||
|
{
|
||||||
|
|
||||||
|
public static WaferCounter GetWaferCounter(string message) =>
|
||||||
|
new(DateTime.MinValue, string.Empty, string.Empty, message, string.Empty, 0, string.Empty);
|
||||||
|
|
||||||
|
}
|
17
Shared/Models/Attachment.cs
Normal file
17
Shared/Models/Attachment.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.Models;
|
||||||
|
|
||||||
|
public record Attachment(string? SubGroupId,
|
||||||
|
long? HeaderId,
|
||||||
|
string? HeaderIdDirectory,
|
||||||
|
string? UniqueId,
|
||||||
|
string? DestinationFileName,
|
||||||
|
string? SourceFileName,
|
||||||
|
string? AttachmentId);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||||
|
[JsonSerializable(typeof(Attachment))]
|
||||||
|
public partial class AttachmentSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
5
Shared/Models/CharacterizationInfo.cs
Normal file
5
Shared/Models/CharacterizationInfo.cs
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
namespace OI.Metrology.Shared.Models;
|
||||||
|
|
||||||
|
public record CharacterizationInfo(string? Lot,
|
||||||
|
DateTime LastWriteTime,
|
||||||
|
string[] Lines);
|
16
Shared/Models/CharacterizationParameters.cs
Normal file
16
Shared/Models/CharacterizationParameters.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.Models;
|
||||||
|
|
||||||
|
public record CharacterizationParameters([property: JsonPropertyName("area")] string? Area,
|
||||||
|
[property: JsonPropertyName("equipment-id")] string? EquipmentId,
|
||||||
|
[property: JsonPropertyName("search-pattern")] string? SearchPattern,
|
||||||
|
[property: JsonPropertyName("start-time")] string? StartTime,
|
||||||
|
[property: JsonPropertyName("end-time")] string? EndTime,
|
||||||
|
[property: JsonPropertyName("wafer-size")] string? WaferSize);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
|
[JsonSerializable(typeof(CharacterizationParameters))]
|
||||||
|
public partial class CharacterizationParametersSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
15
Shared/Models/Cleans.cs
Normal file
15
Shared/Models/Cleans.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.Models;
|
||||||
|
|
||||||
|
public record Cleans(
|
||||||
|
[property: JsonPropertyName("cleanRecipe")] string CleanRecipe,
|
||||||
|
[property: JsonPropertyName("cleanSigReq")] bool CleanSigReq
|
||||||
|
// [property: JsonPropertyName("cleanTools")] object[] cleanTools
|
||||||
|
);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
[JsonSerializable(typeof(Cleans))]
|
||||||
|
public partial class CleansSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
@ -12,8 +12,8 @@ public class DataResponse
|
|||||||
{
|
{
|
||||||
HeaderID = -1;
|
HeaderID = -1;
|
||||||
Success = false;
|
Success = false;
|
||||||
Errors = new List<string>();
|
Errors = new();
|
||||||
Warnings = new List<string>();
|
Warnings = new();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,9 +0,0 @@
|
|||||||
namespace OI.Metrology.Shared.Models;
|
|
||||||
|
|
||||||
public interface IWorkingDirectory
|
|
||||||
{
|
|
||||||
|
|
||||||
static string GetWorkingDirectory(string? executingAssemblyName, string subDirectoryName) =>
|
|
||||||
WorkingDirectory.GetWorkingDirectory(executingAssemblyName, subDirectoryName);
|
|
||||||
|
|
||||||
}
|
|
18
Shared/Models/Inspection.cs
Normal file
18
Shared/Models/Inspection.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.Models;
|
||||||
|
|
||||||
|
public record Inspection(
|
||||||
|
[property: JsonPropertyName("microscope")] bool Microscope,
|
||||||
|
[property: JsonPropertyName("brightlight")] bool Brightlight,
|
||||||
|
[property: JsonPropertyName("inspSigReq")] bool InspSigReq,
|
||||||
|
[property: JsonPropertyName("inspInterval")] int? InspInterval
|
||||||
|
// [property: JsonPropertyName("frontSide")] FrontSide FrontSide,
|
||||||
|
// [property: JsonPropertyName("backSide")] BackSide BackSide
|
||||||
|
);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
[JsonSerializable(typeof(Inspection))]
|
||||||
|
public partial class InspectionSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
21
Shared/Models/NginxFileSystem.cs
Normal file
21
Shared/Models/NginxFileSystem.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.Models;
|
||||||
|
|
||||||
|
public record NginxFileSystem(
|
||||||
|
[property: JsonPropertyName("name")] string Name,
|
||||||
|
[property: JsonPropertyName("type")] string Type,
|
||||||
|
[property: JsonPropertyName("mtime")] string MTime,
|
||||||
|
[property: JsonPropertyName("size")] float Size);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
|
[JsonSerializable(typeof(NginxFileSystem))]
|
||||||
|
public partial class NginxFileSystemSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
|
[JsonSerializable(typeof(NginxFileSystem[]))]
|
||||||
|
public partial class NginxFileSystemCollectionSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
29
Shared/Models/NginxFileSystemSortable.cs
Normal file
29
Shared/Models/NginxFileSystemSortable.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
using OI.Metrology.Shared.Models.Stateless;
|
||||||
|
using System.Globalization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.Models;
|
||||||
|
|
||||||
|
public record NginxFileSystemSortable(DateTime DateTime,
|
||||||
|
Uri Uri,
|
||||||
|
string Name,
|
||||||
|
float Size,
|
||||||
|
string Type)
|
||||||
|
{
|
||||||
|
|
||||||
|
public static List<NginxFileSystemSortable> Convert(IFileShareRepository fileShareRepository, Uri waferSizeUri, NginxFileSystem[]? collection)
|
||||||
|
{
|
||||||
|
List<NginxFileSystemSortable> results = new();
|
||||||
|
NginxFileSystemSortable nginxFileSystemSortable;
|
||||||
|
string nginxFormat = "ddd, dd MMM yyyy HH:mm:ss zzz";
|
||||||
|
foreach (NginxFileSystem nginxFileSystem in collection ?? Array.Empty<NginxFileSystem>())
|
||||||
|
{
|
||||||
|
if (DateTime.TryParseExact(nginxFileSystem.MTime.Replace("GMT", "+00:00"), nginxFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime dateTime))
|
||||||
|
nginxFileSystemSortable = new(dateTime, fileShareRepository.Append(waferSizeUri, nginxFileSystem.Name), nginxFileSystem.Name, nginxFileSystem.Size, nginxFileSystem.Type);
|
||||||
|
else
|
||||||
|
nginxFileSystemSortable = new(DateTime.MinValue, fileShareRepository.Append(waferSizeUri, nginxFileSystem.Name), nginxFileSystem.Name, nginxFileSystem.Size, nginxFileSystem.Type);
|
||||||
|
results.Add(nginxFileSystemSortable);
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
26
Shared/Models/ProdSpec.cs
Normal file
26
Shared/Models/ProdSpec.cs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.Models;
|
||||||
|
|
||||||
|
public record ProdSpec(
|
||||||
|
// [property: JsonPropertyName("keyId")] int KeyId,
|
||||||
|
// [property: JsonPropertyName("specType")] string SpecType,
|
||||||
|
// [property: JsonPropertyName("status")] string Status,
|
||||||
|
// [property: JsonPropertyName("minutesPerWafer")] double MinutesPerWafer,
|
||||||
|
// [property: JsonPropertyName("proveInTime")] int ProveInTime,
|
||||||
|
// [property: JsonPropertyName("layerType")] string LayerType,
|
||||||
|
// [property: JsonPropertyName("reactorType")] string ReactorType,
|
||||||
|
// [property: JsonPropertyName("susceptorType")] string SusceptorType,
|
||||||
|
// [property: JsonPropertyName("tubePressureType")] string TubePressureType,
|
||||||
|
// [property: JsonPropertyName("recipeLayers")] RecipeLayer[] RecipeLayers,
|
||||||
|
// [property: JsonPropertyName("prodVers")] ProdVer[] ProdVers,
|
||||||
|
// [property: JsonPropertyName("epiPart")] EpiPart EpiPart,
|
||||||
|
// [property: JsonPropertyName("custEpiParts")] CustEpiPart[] CustEpiParts,
|
||||||
|
[property: JsonPropertyName("prsStages")] PrsStage[] PrsStages
|
||||||
|
);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
[JsonSerializable(typeof(ProdSpec))]
|
||||||
|
public partial class ProdSpecSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
15
Shared/Models/ProdSpecRoot.cs
Normal file
15
Shared/Models/ProdSpecRoot.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.Models;
|
||||||
|
|
||||||
|
public record ProdSpecRoot(
|
||||||
|
[property: JsonPropertyName("prodSpec")] ProdSpec ProdSpec
|
||||||
|
// [property: JsonPropertyName("_links")] Links Links,
|
||||||
|
// [property: JsonPropertyName("_class")] string Class
|
||||||
|
);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
[JsonSerializable(typeof(ProdSpecRoot))]
|
||||||
|
public partial class ProdSpecRootSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
19
Shared/Models/PrsStage.cs
Normal file
19
Shared/Models/PrsStage.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.Models;
|
||||||
|
|
||||||
|
public record PrsStage(
|
||||||
|
[property: JsonPropertyName("keyId")] string KeyId,
|
||||||
|
[property: JsonPropertyName("psn")] int Psn,
|
||||||
|
[property: JsonPropertyName("stage")] string Stage,
|
||||||
|
[property: JsonPropertyName("cleans")] Cleans Cleans,
|
||||||
|
[property: JsonPropertyName("inspection")] Inspection Inspection,
|
||||||
|
[property: JsonPropertyName("surfscan")] Surfscan Surfscan,
|
||||||
|
[property: JsonPropertyName("qaMetTests")] QaMetTest[] QaMetTests
|
||||||
|
);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
[JsonSerializable(typeof(PrsStage))]
|
||||||
|
public partial class PrsStageSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
27
Shared/Models/QaMetTest.cs
Normal file
27
Shared/Models/QaMetTest.cs
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.Models;
|
||||||
|
|
||||||
|
public record QaMetTest(
|
||||||
|
[property: JsonPropertyName("test")] string Test,
|
||||||
|
[property: JsonPropertyName("property")] string Property,
|
||||||
|
[property: JsonPropertyName("propertyDesc")] string PropertyDesc,
|
||||||
|
[property: JsonPropertyName("toolClass")] string ToolClass,
|
||||||
|
[property: JsonPropertyName("recipe")] string Recipe,
|
||||||
|
[property: JsonPropertyName("recipePattern")] string RecipePattern,
|
||||||
|
[property: JsonPropertyName("min")] double Min,
|
||||||
|
[property: JsonPropertyName("max")] double Max,
|
||||||
|
// [property: JsonPropertyName("phaseMin")] object PhaseMin,
|
||||||
|
// [property: JsonPropertyName("slots")] object Slots,
|
||||||
|
[property: JsonPropertyName("wfrQty")] int WfrQty,
|
||||||
|
[property: JsonPropertyName("reactSched")] bool ReactSched,
|
||||||
|
[property: JsonPropertyName("interval")] int Interval,
|
||||||
|
[property: JsonPropertyName("start")] int Start,
|
||||||
|
[property: JsonPropertyName("sequence")] string Sequence
|
||||||
|
);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
[JsonSerializable(typeof(QaMetTest))]
|
||||||
|
public partial class QaMetTestSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
@ -39,5 +39,4 @@ public partial class ReactorSourceGenerationContext : JsonSerializerContext
|
|||||||
[JsonSerializable(typeof(Reactor[]))]
|
[JsonSerializable(typeof(Reactor[]))]
|
||||||
public partial class ReactorCollectionSourceGenerationContext : JsonSerializerContext
|
public partial class ReactorCollectionSourceGenerationContext : JsonSerializerContext
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
13
Shared/Models/RunDataSheet.cs
Normal file
13
Shared/Models/RunDataSheet.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.Models;
|
||||||
|
|
||||||
|
public record RunDataSheet(
|
||||||
|
[property: JsonPropertyName("PSN")] string PSN
|
||||||
|
);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
|
[JsonSerializable(typeof(RunDataSheet))]
|
||||||
|
public partial class RunDataSheetSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
16
Shared/Models/RunDataSheetRoot.cs
Normal file
16
Shared/Models/RunDataSheetRoot.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.Models;
|
||||||
|
|
||||||
|
public record RunDataSheetRoot(
|
||||||
|
[property: JsonPropertyName("rds")] RunDataSheet RunDataSheet,
|
||||||
|
[property: JsonPropertyName("prodSpec")] ProdSpec ProdSpec
|
||||||
|
// [property: JsonPropertyName("_links")] Links Links,
|
||||||
|
// [property: JsonPropertyName("_class")] string Class
|
||||||
|
);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||||
|
[JsonSerializable(typeof(RunDataSheetRoot))]
|
||||||
|
public partial class RunDataSheetRootSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
@ -14,5 +14,6 @@ public interface IAwaitingDispoController<T>
|
|||||||
T Index();
|
T Index();
|
||||||
T MarkAsReviewed(long headerid, int tooltypeid);
|
T MarkAsReviewed(long headerid, int tooltypeid);
|
||||||
T MarkAsAwaiting(long headerid, int tooltypeid);
|
T MarkAsAwaiting(long headerid, int tooltypeid);
|
||||||
|
T GetHeaderAttachmentID(int toolTypeId, long headerid);
|
||||||
|
|
||||||
}
|
}
|
@ -1,4 +1,5 @@
|
|||||||
using OI.Metrology.Shared.DataModels;
|
using OI.Metrology.Shared.DataModels;
|
||||||
|
using System.Data;
|
||||||
|
|
||||||
namespace OI.Metrology.Shared.Models.Stateless;
|
namespace OI.Metrology.Shared.Models.Stateless;
|
||||||
|
|
||||||
@ -9,5 +10,7 @@ public interface IExportRepository
|
|||||||
Result<HeaderCommon[]> GetHeaders(HeaderCommon headerCommon);
|
Result<HeaderCommon[]> GetHeaders(HeaderCommon headerCommon);
|
||||||
Result<HeaderCommon[]> GetLogistics(HeaderCommon headerCommon);
|
Result<HeaderCommon[]> GetLogistics(HeaderCommon headerCommon);
|
||||||
string GetProcessDataStandardFormat(HeaderCommon headerCommon);
|
string GetProcessDataStandardFormat(HeaderCommon headerCommon);
|
||||||
|
string GetCSVExport(IMetrologyRepository metrologyRepository, int toolTypeId, string? datebegin, string? dateend);
|
||||||
|
Result<DataTable> GetExportData(IMetrologyRepository metrologyRepository, int toolTypeId, string? datebegin, string? dateend);
|
||||||
|
|
||||||
}
|
}
|
20
Shared/Models/Stateless/IFileShareController.cs
Normal file
20
Shared/Models/Stateless/IFileShareController.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
namespace OI.Metrology.Shared.Models.Stateless;
|
||||||
|
|
||||||
|
public interface IFileShareController<T>
|
||||||
|
{
|
||||||
|
|
||||||
|
enum Action : int
|
||||||
|
{
|
||||||
|
Index = 0,
|
||||||
|
CopyFile = 1,
|
||||||
|
MoveFile = 2,
|
||||||
|
FileWrite = 3,
|
||||||
|
}
|
||||||
|
|
||||||
|
static string GetRouteName() => nameof(IFileShareController<T>)[1..^10];
|
||||||
|
|
||||||
|
T CopyFile(string from, string to);
|
||||||
|
T MoveFile(string from, string to);
|
||||||
|
T FileWrite(string path, string contents);
|
||||||
|
|
||||||
|
}
|
15
Shared/Models/Stateless/IFileShareRepository.cs
Normal file
15
Shared/Models/Stateless/IFileShareRepository.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
namespace OI.Metrology.Shared.Models.Stateless;
|
||||||
|
|
||||||
|
public interface IFileShareRepository
|
||||||
|
{
|
||||||
|
|
||||||
|
void CopyFile(string from, string to);
|
||||||
|
void MoveFile(string from, string to);
|
||||||
|
Uri Append(Uri uri, params string[] paths);
|
||||||
|
void FileWrite(string path, string contents);
|
||||||
|
HttpResponseMessage ReadFile(HttpClient httpClient, Uri uri);
|
||||||
|
void CopyFile(HttpClient httpClient, string from, string to);
|
||||||
|
void MoveFile(HttpClient httpClient, string from, string to);
|
||||||
|
List<CharacterizationInfo> GetArchiveData(CharacterizationParameters characterizationParameters);
|
||||||
|
List<NginxFileSystemSortable> GetNginxFileSystemSortableCollection(HttpClient httpClient, Uri uri, string? endsWith);
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace OI.Metrology.Shared.Models.Stateless;
|
namespace OI.Metrology.Shared.Models.Stateless;
|
||||||
|
|
||||||
public interface IInboundController<T>
|
public interface IInboundController<T>
|
||||||
@ -9,7 +11,7 @@ public interface IInboundController<T>
|
|||||||
}
|
}
|
||||||
|
|
||||||
static string GetRouteName() => nameof(IInboundController<T>)[1..^10];
|
static string GetRouteName() => nameof(IInboundController<T>)[1..^10];
|
||||||
T Post(string tooltype);
|
T Post(string tooltype, JsonElement? jsonElement);
|
||||||
T AttachFile(string tooltype, long headerid, string datauniqueid = "");
|
T AttachFile(string tooltype, Attachment? attachment);
|
||||||
|
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
using OI.Metrology.Shared.Services;
|
using OI.Metrology.Shared.Services;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace OI.Metrology.Shared.Models.Stateless;
|
namespace OI.Metrology.Shared.Models.Stateless;
|
||||||
|
|
||||||
@ -7,7 +8,7 @@ public interface IInboundRepository
|
|||||||
{
|
{
|
||||||
|
|
||||||
bool IsIPAddressAllowed(string inboundApiAllowedIPList, IPAddress? remoteIP);
|
bool IsIPAddressAllowed(string inboundApiAllowedIPList, IPAddress? remoteIP);
|
||||||
DataResponse Data(IMetrologyRepository metrologyRepository, IInboundDataService inboundDataService, string tooltype, string? json);
|
void AttachFile(IMetrologyRepository metrologyRepository, IAttachmentsService attachmentsService, string toolTypeName, Attachment? attachment);
|
||||||
string? AttachFile(IMetrologyRepository metrologyRepository, IAttachmentsService attachmentsService, string tooltype, long headerid, string datauniqueid, string fileName, object uploadedFile);
|
DataResponse Data(IMetrologyRepository metrologyRepository, IInboundDataService inboundDataService, string toolTypeName, JsonElement? jsonElement);
|
||||||
|
|
||||||
}
|
}
|
24
Shared/Models/Stateless/IInfinityQSV4Controller.cs
Normal file
24
Shared/Models/Stateless/IInfinityQSV4Controller.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
namespace OI.Metrology.Shared.Models.Stateless;
|
||||||
|
|
||||||
|
public interface IInfinityQSV4Controller<T>
|
||||||
|
{
|
||||||
|
|
||||||
|
enum Action : int
|
||||||
|
{
|
||||||
|
Index = 0,
|
||||||
|
MarkAsPinned = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
static string GetRouteName() => nameof(IInfinityQSV4Controller<T>)[1..^12];
|
||||||
|
static string GetRouteVersion() => nameof(IInfinityQSV4Controller<T>)[1..^10][^2..];
|
||||||
|
|
||||||
|
T GetData(string sub_group_id);
|
||||||
|
T GetHeader(string sub_group_id);
|
||||||
|
T GetDescriptors(string sub_group_id);
|
||||||
|
T GetEpiProTempVerification(int[] night);
|
||||||
|
T GetEpiProTempVerificationRows(int[] night);
|
||||||
|
T GetLastGroupIdWithValue(string process, string? part, int? test);
|
||||||
|
T GetProductDataAverageSumOfDefectsProcessMeanProcessSigma(string process, string? recipe);
|
||||||
|
T GetCommandText(string sub_group_id, string process, string job, string part, string lot, string date_time);
|
||||||
|
|
||||||
|
}
|
24
Shared/Models/Stateless/IInfinityQSV4Repository.cs
Normal file
24
Shared/Models/Stateless/IInfinityQSV4Repository.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using OI.Metrology.Shared.DataModels;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.Models.Stateless;
|
||||||
|
|
||||||
|
public interface IInfinityQSV4Repository
|
||||||
|
{
|
||||||
|
|
||||||
|
List<Reactor> GetReactors();
|
||||||
|
string GetRunDataSheet(string rds);
|
||||||
|
string GetCommandText(string subGroupId);
|
||||||
|
string GetEpiProTempVerification(int[] night);
|
||||||
|
string GetProductionSpecification(string part);
|
||||||
|
string GetCommandText(InfinityQSV4 infinityQSV2);
|
||||||
|
Result<InfinityQSV4[]> GetData(string subGroupId);
|
||||||
|
Result<InfinityQSV4[]> GetHeader(string subGroupId);
|
||||||
|
string GetCommandText(string process, string? part);
|
||||||
|
string GetCommandText(List<string> eppReactorNumbers);
|
||||||
|
List<string[]> GetEpiProTempVerificationRows(int[] night);
|
||||||
|
Result<InfinityQSDescriptorV4[]> GetDescriptors(string subGroupId);
|
||||||
|
string GetLastGroupIdWithValue(string process, string? part, int? test);
|
||||||
|
string GetProductDataAverageSumOfDefectsProcessMeanProcessSigma(string process, string? recipe);
|
||||||
|
string GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime);
|
||||||
|
|
||||||
|
}
|
@ -8,42 +8,30 @@ namespace OI.Metrology.Shared.Models.Stateless;
|
|||||||
public interface IMetrologyRepository
|
public interface IMetrologyRepository
|
||||||
{
|
{
|
||||||
|
|
||||||
|
ToolType GetToolTypeByID(int id);
|
||||||
|
TransactionScope StartTransaction();
|
||||||
IEnumerable<ToolType> GetToolTypes();
|
IEnumerable<ToolType> GetToolTypes();
|
||||||
ToolType GetToolTypeByName(string name);
|
ToolType GetToolTypeByName(string name);
|
||||||
ToolType GetToolTypeByID(int id);
|
|
||||||
|
|
||||||
IEnumerable<ToolTypeMetadata> GetToolTypeMetadataByToolTypeID(int id);
|
|
||||||
|
|
||||||
TransactionScope StartTransaction();
|
|
||||||
|
|
||||||
void PurgeExistingData(int toolTypeId, string title);
|
|
||||||
long InsertToolDataJSON(JToken jsonbody, long headerId, List<ToolTypeMetadata> metaData, string tableName);
|
|
||||||
|
|
||||||
DataTable ExportData(string spName, DateTime startTime, DateTime endTime);
|
|
||||||
|
|
||||||
DataTable GetHeaders(int toolTypeId, DateTime? startTime, DateTime? endTime, int? pageNo, int? pageSize, long? headerid, out long totalRecords);
|
|
||||||
DataTable GetData(int toolTypeId, long headerId);
|
DataTable GetData(int toolTypeId, long headerId);
|
||||||
DataTable GetDataSharePoint(int toolTypeId, string headerId);
|
void PurgeExistingData(int toolTypeId, string title);
|
||||||
|
|
||||||
HeaderCommon[] GetHeaderTitles(int? toolTypeId, int? pageNo, int? pageSize, out long totalRecords);
|
|
||||||
|
|
||||||
Guid GetHeaderAttachmentIDByTitle(int toolTypeId, string title);
|
|
||||||
Guid GetDataAttachmentIDByTitle(int toolTypeId, string title);
|
|
||||||
|
|
||||||
Guid GetHeaderAttachmentID(int toolTypeId, long headerId);
|
|
||||||
string GetHeaderInsertDate(int toolTypeId, long headerId);
|
|
||||||
string GetAttachmentInsertDateByGUID(string tableName, Guid attachmentId);
|
|
||||||
void SetHeaderDirName(string tableName, long headerId, string dateDir);
|
|
||||||
Guid GetDataAttachmentID(int toolTypeId, long headerId, string title);
|
|
||||||
string GetDataInsertDate(int toolTypeId, long headerId, string title);
|
|
||||||
|
|
||||||
void SetDataDirName(string tableName, long headerId, string title, string dateDir);
|
|
||||||
DataSet GetOIExportData(int toolTypeId, long headerid);
|
DataSet GetOIExportData(int toolTypeId, long headerid);
|
||||||
|
Guid GetHeaderAttachmentID(int toolTypeId, long headerId);
|
||||||
IEnumerable<KeyValuePair<string, string>> GetHeaderFields(int toolTypeId, long headerid);
|
|
||||||
|
|
||||||
IEnumerable<AwaitingDisposition> GetAwaitingDisposition();
|
IEnumerable<AwaitingDisposition> GetAwaitingDisposition();
|
||||||
|
string GetHeaderInsertDate(int toolTypeId, long headerId);
|
||||||
|
Guid GetDataAttachmentIDByTitle(int toolTypeId, string title);
|
||||||
|
Guid GetHeaderAttachmentIDByTitle(int toolTypeId, string title);
|
||||||
int UpdateReviewDate(int toolTypeId, long headerId, bool clearDate);
|
int UpdateReviewDate(int toolTypeId, long headerId, bool clearDate);
|
||||||
|
IEnumerable<ToolTypeMetadata> GetToolTypeMetadataByToolTypeID(int id);
|
||||||
|
string GetDataInsertDate(int toolTypeId, long headerId, string title);
|
||||||
|
void SetHeaderDirName(string tableName, long headerId, string dateDir);
|
||||||
|
DataTable ExportData(string spName, DateTime startTime, DateTime endTime);
|
||||||
|
string GetAttachmentInsertDateByGUID(string tableName, Guid attachmentId);
|
||||||
|
void SetHeaderAttachmentID(int toolTypeId, long headerId, string attachmentId);
|
||||||
|
void SetDataDirName(string tableName, long headerId, string title, string dateDir);
|
||||||
|
IEnumerable<KeyValuePair<string, string>> GetHeaderFields(int toolTypeId, long headerid);
|
||||||
|
void SetDataAttachmentID(int toolTypeId, long headerId, string title, string attachmentId);
|
||||||
|
HeaderCommon[] GetHeaderTitles(int? toolTypeId, int? pageNo, int? pageSize, out long totalRecords);
|
||||||
|
long InsertToolDataJSON(JToken jsonbody, long headerId, List<ToolTypeMetadata> metaData, string tableName);
|
||||||
|
DataTable GetHeaders(int toolTypeId, string? startTime, string? endTime, int? pageNo, int? pageSize, long? headerid, out long totalRecords);
|
||||||
|
|
||||||
}
|
}
|
@ -1,13 +0,0 @@
|
|||||||
|
|
||||||
using OI.Metrology.Shared.DataModels;
|
|
||||||
|
|
||||||
namespace OI.Metrology.Shared.Models.Stateless;
|
|
||||||
|
|
||||||
public interface IReactorsRepository
|
|
||||||
{
|
|
||||||
|
|
||||||
Result<int[]> EvenReactors();
|
|
||||||
Result<int[]> OddReactors();
|
|
||||||
string? GetKey(WorkMaterialOut workMaterialOut, bool save);
|
|
||||||
|
|
||||||
}
|
|
@ -11,7 +11,7 @@ public interface IToolTypesController<T>
|
|||||||
static string GetRouteName() => nameof(IToolTypesController<T>)[1..^10];
|
static string GetRouteName() => nameof(IToolTypesController<T>)[1..^10];
|
||||||
T Index();
|
T Index();
|
||||||
T GetToolTypeMetadata(int id, string sortby = "");
|
T GetToolTypeMetadata(int id, string sortby = "");
|
||||||
T GetHeaders(int id, DateTime? datebegin, DateTime? dateend, int? page, int? pagesize, long? headerid);
|
T GetHeaders(int id, string? datebegin, string? dateend, int? page, int? pagesize, long? headerid);
|
||||||
T GetHeaderTitles(int id, int? page, int? pagesize);
|
T GetHeaderTitles(int id, int? page, int? pagesize);
|
||||||
T GetHeaderFields(int id, long headerid);
|
T GetHeaderFields(int id, long headerid);
|
||||||
T GetData(int id, long headerid);
|
T GetData(int id, long headerid);
|
||||||
|
@ -8,13 +8,12 @@ public interface IToolTypesRepository
|
|||||||
{
|
{
|
||||||
|
|
||||||
Result<ToolTypeNameId[]> Index(IMetrologyRepository metrologyRepository);
|
Result<ToolTypeNameId[]> Index(IMetrologyRepository metrologyRepository);
|
||||||
Result<ToolTypeMetadataResult> GetToolTypeMetadata(IMetrologyRepository metrologyRepository, int id, string sortby = "");
|
|
||||||
Result<DataTable> GetHeaders(IMetrologyRepository metrologyRepository, int id, DateTime? datebegin, DateTime? dateend, int? page, int? pagesize, long? headerid);
|
|
||||||
Result<HeaderCommon[]> GetHeaderTitles(IMetrologyRepository metrologyRepository, int id, int? page, int? pagesize);
|
|
||||||
Result<ColumnValue[]> GetHeaderFields(IMetrologyRepository metrologyRepository, int id, long headerid);
|
|
||||||
Result<DataTable> GetData(IMetrologyRepository metrologyRepository, int id, long headerid);
|
Result<DataTable> GetData(IMetrologyRepository metrologyRepository, int id, long headerid);
|
||||||
|
Result<ColumnValue[]> GetHeaderFields(IMetrologyRepository metrologyRepository, int id, long headerid);
|
||||||
|
Result<HeaderCommon[]> GetHeaderTitles(IMetrologyRepository metrologyRepository, int id, int? page, int? pagesize);
|
||||||
|
Result<ToolTypeMetadataResult> GetToolTypeMetadata(IMetrologyRepository metrologyRepository, int id, string sortby = "");
|
||||||
|
string? OIExport(IMetrologyRepository metrologyRepository, IAttachmentsService attachmentsService, int toolTypeId, long headerid);
|
||||||
|
Result<DataTable> GetHeaders(IMetrologyRepository metrologyRepository, int id, string? datebegin, string? dateend, int? page, int? pagesize, long? headerid);
|
||||||
(string?, string?, Stream?) GetAttachment(IMetrologyRepository metrologyRepository, IAttachmentsService attachmentsService, int toolTypeId, string tabletype, string attachmentId, string filename);
|
(string?, string?, Stream?) GetAttachment(IMetrologyRepository metrologyRepository, IAttachmentsService attachmentsService, int toolTypeId, string tabletype, string attachmentId, string filename);
|
||||||
string? OIExport(IMetrologyRepository metrologyRepository, IAttachmentsService attachmentsService, string attachmentPath, Dictionary<string, string> tableToPath, int toolTypeId, long headerid);
|
|
||||||
Result<DataTable> GetExportData(IMetrologyRepository metrologyRepository, int toolTypeId, DateTime? datebegin, DateTime? dateend);
|
|
||||||
byte[] GetCSVExport(IMetrologyRepository metrologyRepository, int toolTypeId, DateTime? datebegin, DateTime? dateend);
|
|
||||||
}
|
}
|
16
Shared/Models/Stateless/IWaferCounterController.cs
Normal file
16
Shared/Models/Stateless/IWaferCounterController.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
namespace OI.Metrology.Shared.Models.Stateless;
|
||||||
|
|
||||||
|
public interface IWaferCounterController<T>
|
||||||
|
{
|
||||||
|
|
||||||
|
enum Action : int
|
||||||
|
{
|
||||||
|
Index = 0,
|
||||||
|
MarkAsPinned = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
static string GetRouteName() => nameof(IWaferCounterController<T>)[1..^10];
|
||||||
|
|
||||||
|
T GetLastQuantityAndSlotMap(string area, string waferSize, string text);
|
||||||
|
|
||||||
|
}
|
9
Shared/Models/Stateless/IWaferCounterRepository.cs
Normal file
9
Shared/Models/Stateless/IWaferCounterRepository.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
namespace OI.Metrology.Shared.Models.Stateless;
|
||||||
|
|
||||||
|
public interface IWaferCounterRepository
|
||||||
|
{
|
||||||
|
|
||||||
|
string? GetSlotMap(string line1, string line2);
|
||||||
|
DataModels.WaferCounter? GetLastQuantityAndSlotMap(string area, string waferSize, string text);
|
||||||
|
|
||||||
|
}
|
14
Shared/Models/Surfscan.cs
Normal file
14
Shared/Models/Surfscan.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.Models;
|
||||||
|
|
||||||
|
public record Surfscan(
|
||||||
|
[property: JsonPropertyName("surfscanSigReq")] bool SurfscanSigReq,
|
||||||
|
[property: JsonPropertyName("surfscanRecipes")] SurfscanRecipe[] SurfscanRecipes
|
||||||
|
);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
[JsonSerializable(typeof(Surfscan))]
|
||||||
|
public partial class SurfscanSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
16
Shared/Models/SurfscanRecipe.cs
Normal file
16
Shared/Models/SurfscanRecipe.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace OI.Metrology.Shared.Models;
|
||||||
|
|
||||||
|
public record SurfscanRecipe(
|
||||||
|
[property: JsonPropertyName("recipe")] string Recipe,
|
||||||
|
[property: JsonPropertyName("defects")] int Defects,
|
||||||
|
[property: JsonPropertyName("haze")] int Haze,
|
||||||
|
[property: JsonPropertyName("sampleSize")] int? SampleSize
|
||||||
|
);
|
||||||
|
|
||||||
|
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
[JsonSerializable(typeof(SurfscanRecipe))]
|
||||||
|
public partial class SurfscanRecipeSourceGenerationContext : JsonSerializerContext
|
||||||
|
{
|
||||||
|
}
|
@ -1,50 +0,0 @@
|
|||||||
namespace OI.Metrology.Shared.Models;
|
|
||||||
|
|
||||||
internal abstract class WorkingDirectory
|
|
||||||
{
|
|
||||||
|
|
||||||
internal static string GetWorkingDirectory(string? executingAssemblyName, string subDirectoryName)
|
|
||||||
{
|
|
||||||
string result = string.Empty;
|
|
||||||
if (executingAssemblyName is null)
|
|
||||||
throw new Exception();
|
|
||||||
string traceFile;
|
|
||||||
List<string> directories = new();
|
|
||||||
Environment.SpecialFolder[] specialFolders = new Environment.SpecialFolder[]
|
|
||||||
{
|
|
||||||
Environment.SpecialFolder.LocalApplicationData,
|
|
||||||
Environment.SpecialFolder.ApplicationData,
|
|
||||||
Environment.SpecialFolder.History,
|
|
||||||
Environment.SpecialFolder.CommonApplicationData,
|
|
||||||
Environment.SpecialFolder.InternetCache
|
|
||||||
};
|
|
||||||
foreach (Environment.SpecialFolder specialFolder in specialFolders)
|
|
||||||
directories.Add(Path.Combine(Environment.GetFolderPath(specialFolder), subDirectoryName, executingAssemblyName));
|
|
||||||
foreach (string directory in directories)
|
|
||||||
{
|
|
||||||
for (int i = 1; i < 3; i++)
|
|
||||||
{
|
|
||||||
if (i == 1)
|
|
||||||
result = directory;
|
|
||||||
else
|
|
||||||
result = string.Concat("D", directory[1..]);
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (!Directory.Exists(result))
|
|
||||||
_ = Directory.CreateDirectory(result);
|
|
||||||
traceFile = string.Concat(result, @"\", DateTime.Now.Ticks, ".txt");
|
|
||||||
File.WriteAllText(traceFile, traceFile);
|
|
||||||
File.Delete(traceFile);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
catch (Exception) { result = string.Empty; }
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(result))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (string.IsNullOrEmpty(result))
|
|
||||||
throw new Exception("Unable to set working directory!");
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -2,13 +2,13 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PackageId>OI.Metrology.Shared</PackageId>
|
<PackageId>OI.Metrology.Shared</PackageId>
|
||||||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
||||||
<Version>6.0.202.9999</Version>
|
<Version>8.0.100.9999</Version>
|
||||||
<Authors>Mike Phares</Authors>
|
<Authors>Mike Phares</Authors>
|
||||||
<Company>Infineon Technologies Americas Corp.</Company>
|
<Company>Infineon Technologies Americas Corp.</Company>
|
||||||
<IncludeSymbols>true</IncludeSymbols>
|
<IncludeSymbols>true</IncludeSymbols>
|
||||||
@ -29,8 +29,8 @@
|
|||||||
<DefineConstants>Linux</DefineConstants>
|
<DefineConstants>Linux</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Text.Json" Version="7.0.3" />
|
<PackageReference Include="System.Text.Json" Version="8.0.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -4,5 +4,5 @@ namespace OI.Metrology.Shared.Repositories;
|
|||||||
|
|
||||||
public interface IDbConnectionFactory
|
public interface IDbConnectionFactory
|
||||||
{
|
{
|
||||||
DbConnection GetDbConnection(bool? useOI2Sql = null);
|
DbConnection GetDbConnection(bool? useIqsConnection = null);
|
||||||
}
|
}
|
@ -1,12 +1,13 @@
|
|||||||
namespace OI.Metrology.Shared.Services;
|
namespace OI.Metrology.Shared.Services;
|
||||||
|
|
||||||
using DataModels;
|
using DataModels;
|
||||||
|
using OI.Metrology.Shared.Models;
|
||||||
using OI.Metrology.Shared.Models.Stateless;
|
using OI.Metrology.Shared.Models.Stateless;
|
||||||
|
|
||||||
public interface IAttachmentsService
|
public interface IAttachmentsService
|
||||||
{
|
{
|
||||||
Stream GetAttachmentStreamByTitle(ToolType toolType, bool header, string title, string filename);
|
Stream GetAttachmentStreamByTitle(ToolType toolType, bool header, string title, string filename);
|
||||||
Stream GetAttachmentStreamByAttachmentId(ToolType toolType, bool header, Guid attachmentId, string filename);
|
Stream GetAttachmentStreamByAttachmentId(ToolType toolType, bool header, Guid attachmentId, string filename);
|
||||||
void SaveAttachment(ToolType toolType, long headerId, string dataUniqueId, string filename, object uploadedFile);
|
string? GetProcessDataStandardFormat(IMetrologyRepository metrologyRepository, int toolTypeId, long headerId);
|
||||||
string? GetProcessDataStandardFormat(IMetrologyRepository metrologyRepository, string attachmentPath, int toolTypeId, long headerId);
|
void SaveAttachment(ToolType toolType, Attachment attachment);
|
||||||
}
|
}
|
5
Static/.vscode/mklink.md
vendored
Normal file
5
Static/.vscode/mklink.md
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# mklink
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mklink /J "D:\wwwRoot" "L:\DevOps\Mesa_FI\OI-Metrology\Static"
|
||||||
|
```
|
5
Static/.vscode/settings.json
vendored
Normal file
5
Static/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"cSpell.words": [
|
||||||
|
"Infineon"
|
||||||
|
]
|
||||||
|
}
|
28
Static/.vscode/tasks.json
vendored
Normal file
28
Static/.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "MakeDirctory",
|
||||||
|
"command": "mkdir",
|
||||||
|
"args": [
|
||||||
|
"D:\\web-sites\\OI-Metrology\\pp-6737ddfb-_______-OI-Metrology-Release"
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "CopySite",
|
||||||
|
"command": "robocopy",
|
||||||
|
"args": [
|
||||||
|
"L:\\DevOps\\Mesa_FI\\OI-Metrology\\Static",
|
||||||
|
"D:\\web-sites\\OI-Metrology\\pp-6737ddfb-_______-OI-Metrology-Release\\Static",
|
||||||
|
"/E",
|
||||||
|
"/MT:6",
|
||||||
|
"/NFL",
|
||||||
|
"/NDL",
|
||||||
|
"/NJH",
|
||||||
|
"/NJS"
|
||||||
|
],
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
161
Static/AwaitingDispo/index.html
Normal file
161
Static/AwaitingDispo/index.html
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<title>Run Information</title>
|
||||||
|
|
||||||
|
<script src="/js/modernizr-3.6.0-custom.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<link href="/styles/bootstrap.min.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?no-cache=2024-06-18-10-54"
|
||||||
|
rel="stylesheet" />
|
||||||
|
<link href="/igniteui/css/structure/infragistics.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/styles/site-server.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/styles/index.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
|
||||||
|
<script src="/js/jquery-3.6.0.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/jquery-ui.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.core.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.lob.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.dv.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script src="/js/chart-4.3.0.min.js" type="module"></script>
|
||||||
|
|
||||||
|
<script src="/js/common.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/site-server.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="navbar navbar-fixed-top">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<div class="navbar-brand">
|
||||||
|
<a href="/"><img src="/images/IFX_LOGO_RGB.png" height="20" /></a>
|
||||||
|
OI Metrology Viewer
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="navbar-collapse collapse">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li><a href="/awaiting-disposition.html">Awaiting Disposition</a></li>
|
||||||
|
<li><a href="/index.html" class="alert-info">Run Information</a></li>
|
||||||
|
<li><a href="/run-headers.html">Run Headers</a></li>
|
||||||
|
<li><a href="/files.html">Files</a></li>
|
||||||
|
<li><a href="/export.html">Export</a></li>
|
||||||
|
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||||
|
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||||
|
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||||
|
</ul>
|
||||||
|
<p class="navbar-text navbar-right">
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="container-fluid body-content">
|
||||||
|
|
||||||
|
<h4>Run Information</h4>
|
||||||
|
|
||||||
|
<form class="form-inline mb-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="ToolType">Tool Type</label>
|
||||||
|
<div class="form-control" id="ToolType"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="StartDate">Start Time</label>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="StartDate"></div>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="StartTime"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="EndDate">End Time</label>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="EndDate"></div>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="EndTime"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input class="btn btn-primary" type="button" value="Load Headers" id="LoadHeadersButton" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-check-label" for="chkAutoRefresh">
|
||||||
|
Auto-Refresh
|
||||||
|
</label>
|
||||||
|
<input class="form-check-input" type="checkbox" id="chkAutoRefresh">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-check-label" for="chkCopyOnGet">
|
||||||
|
Copy-On-Get
|
||||||
|
</label>
|
||||||
|
<input class="form-check-input" type="checkbox" id="chkCopyOnGet">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div style="height: 300px;" id="HeaderGridDiv">
|
||||||
|
<span id="ToolTypeID" hidden></span>
|
||||||
|
<table id="HeaderGrid"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="GetDataButton" value="Get Data" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="ReviewButton" value="Review" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="RecipeParametersButton" value="Parameters" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="ViewButton" value="View" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="PinButton" value="Pin" disabled />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="DetailsDiv" hidden>
|
||||||
|
|
||||||
|
<span id="HeaderId" hidden></span>
|
||||||
|
<span id="HeaderAttachmentId" hidden></span>
|
||||||
|
<div style="padding-bottom: 20px;" id="DetailsGridDiv">
|
||||||
|
<table id="DetailsGrid"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="ExportDiv" style="margin-top: 10px;" hidden>
|
||||||
|
<input type="button" value="Send to OpenInsight" id="OIExportButton" />
|
||||||
|
<span id="OIExportResult" style="margin-left: 10px; font-weight: bold; color: #366b02;"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="margin-top: 20px;">
|
||||||
|
<iframe id="DataAttachmentFrame" style="height:900px; border-width:thin; margin-right: 10px;"
|
||||||
|
hidden></iframe>
|
||||||
|
<iframe id="HeaderAttachmentFrame" style="height:900px; border-width:thin;" hidden></iframe>
|
||||||
|
|
||||||
|
<div id="DataAttachmentDiv" hidden>
|
||||||
|
<canvas id="DataAttachmentCanvas"></canvas>
|
||||||
|
</div>
|
||||||
|
<div id="HeaderAttachmentDiv" hidden>
|
||||||
|
<canvas id="HeaderAttachmentCanvas"></canvas>
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<footer>
|
||||||
|
<p>© 2024 - Infineon Technologies</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="MessageModal"></div>
|
||||||
|
|
||||||
|
<script src="/js/bootstrap.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/respond.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/index.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
161
Static/Export/index.html
Normal file
161
Static/Export/index.html
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<title>Run Information</title>
|
||||||
|
|
||||||
|
<script src="/js/modernizr-3.6.0-custom.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<link href="/styles/bootstrap.min.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?no-cache=2024-06-18-10-54"
|
||||||
|
rel="stylesheet" />
|
||||||
|
<link href="/igniteui/css/structure/infragistics.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/styles/site-server.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/styles/index.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
|
||||||
|
<script src="/js/jquery-3.6.0.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/jquery-ui.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.core.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.lob.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.dv.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script src="/js/chart-4.3.0.min.js" type="module"></script>
|
||||||
|
|
||||||
|
<script src="/js/common.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/site-server.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="navbar navbar-fixed-top">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<div class="navbar-brand">
|
||||||
|
<a href="/"><img src="/images/IFX_LOGO_RGB.png" height="20" /></a>
|
||||||
|
OI Metrology Viewer
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="navbar-collapse collapse">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li><a href="/awaiting-disposition.html">Awaiting Disposition</a></li>
|
||||||
|
<li><a href="/index.html" class="alert-info">Run Information</a></li>
|
||||||
|
<li><a href="/run-headers.html">Run Headers</a></li>
|
||||||
|
<li><a href="/files.html">Files</a></li>
|
||||||
|
<li><a href="/export.html">Export</a></li>
|
||||||
|
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||||
|
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||||
|
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||||
|
</ul>
|
||||||
|
<p class="navbar-text navbar-right">
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="container-fluid body-content">
|
||||||
|
|
||||||
|
<h4>Run Information</h4>
|
||||||
|
|
||||||
|
<form class="form-inline mb-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="ToolType">Tool Type</label>
|
||||||
|
<div class="form-control" id="ToolType"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="StartDate">Start Time</label>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="StartDate"></div>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="StartTime"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="EndDate">End Time</label>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="EndDate"></div>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="EndTime"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input class="btn btn-primary" type="button" value="Load Headers" id="LoadHeadersButton" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-check-label" for="chkAutoRefresh">
|
||||||
|
Auto-Refresh
|
||||||
|
</label>
|
||||||
|
<input class="form-check-input" type="checkbox" id="chkAutoRefresh">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-check-label" for="chkCopyOnGet">
|
||||||
|
Copy-On-Get
|
||||||
|
</label>
|
||||||
|
<input class="form-check-input" type="checkbox" id="chkCopyOnGet">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div style="height: 300px;" id="HeaderGridDiv">
|
||||||
|
<span id="ToolTypeID" hidden></span>
|
||||||
|
<table id="HeaderGrid"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="GetDataButton" value="Get Data" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="ReviewButton" value="Review" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="RecipeParametersButton" value="Parameters" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="ViewButton" value="View" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="PinButton" value="Pin" disabled />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="DetailsDiv" hidden>
|
||||||
|
|
||||||
|
<span id="HeaderId" hidden></span>
|
||||||
|
<span id="HeaderAttachmentId" hidden></span>
|
||||||
|
<div style="padding-bottom: 20px;" id="DetailsGridDiv">
|
||||||
|
<table id="DetailsGrid"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="ExportDiv" style="margin-top: 10px;" hidden>
|
||||||
|
<input type="button" value="Send to OpenInsight" id="OIExportButton" />
|
||||||
|
<span id="OIExportResult" style="margin-left: 10px; font-weight: bold; color: #366b02;"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="margin-top: 20px;">
|
||||||
|
<iframe id="DataAttachmentFrame" style="height:900px; border-width:thin; margin-right: 10px;"
|
||||||
|
hidden></iframe>
|
||||||
|
<iframe id="HeaderAttachmentFrame" style="height:900px; border-width:thin;" hidden></iframe>
|
||||||
|
|
||||||
|
<div id="DataAttachmentDiv" hidden>
|
||||||
|
<canvas id="DataAttachmentCanvas"></canvas>
|
||||||
|
</div>
|
||||||
|
<div id="HeaderAttachmentDiv" hidden>
|
||||||
|
<canvas id="HeaderAttachmentCanvas"></canvas>
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<footer>
|
||||||
|
<p>© 2024 - Infineon Technologies</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="MessageModal"></div>
|
||||||
|
|
||||||
|
<script src="/js/bootstrap.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/respond.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/index.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
161
Static/Metrology/AwaitingDispo/index.html
Normal file
161
Static/Metrology/AwaitingDispo/index.html
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<title>Run Information</title>
|
||||||
|
|
||||||
|
<script src="/js/modernizr-3.6.0-custom.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<link href="/styles/bootstrap.min.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?no-cache=2024-06-18-10-54"
|
||||||
|
rel="stylesheet" />
|
||||||
|
<link href="/igniteui/css/structure/infragistics.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/styles/site-server.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/styles/index.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
|
||||||
|
<script src="/js/jquery-3.6.0.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/jquery-ui.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.core.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.lob.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.dv.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script src="/js/chart-4.3.0.min.js" type="module"></script>
|
||||||
|
|
||||||
|
<script src="/js/common.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/site-server.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="navbar navbar-fixed-top">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<div class="navbar-brand">
|
||||||
|
<a href="/"><img src="/images/IFX_LOGO_RGB.png" height="20" /></a>
|
||||||
|
OI Metrology Viewer
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="navbar-collapse collapse">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li><a href="/awaiting-disposition.html">Awaiting Disposition</a></li>
|
||||||
|
<li><a href="/index.html" class="alert-info">Run Information</a></li>
|
||||||
|
<li><a href="/run-headers.html">Run Headers</a></li>
|
||||||
|
<li><a href="/files.html">Files</a></li>
|
||||||
|
<li><a href="/export.html">Export</a></li>
|
||||||
|
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||||
|
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||||
|
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||||
|
</ul>
|
||||||
|
<p class="navbar-text navbar-right">
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="container-fluid body-content">
|
||||||
|
|
||||||
|
<h4>Run Information</h4>
|
||||||
|
|
||||||
|
<form class="form-inline mb-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="ToolType">Tool Type</label>
|
||||||
|
<div class="form-control" id="ToolType"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="StartDate">Start Time</label>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="StartDate"></div>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="StartTime"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="EndDate">End Time</label>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="EndDate"></div>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="EndTime"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input class="btn btn-primary" type="button" value="Load Headers" id="LoadHeadersButton" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-check-label" for="chkAutoRefresh">
|
||||||
|
Auto-Refresh
|
||||||
|
</label>
|
||||||
|
<input class="form-check-input" type="checkbox" id="chkAutoRefresh">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-check-label" for="chkCopyOnGet">
|
||||||
|
Copy-On-Get
|
||||||
|
</label>
|
||||||
|
<input class="form-check-input" type="checkbox" id="chkCopyOnGet">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div style="height: 300px;" id="HeaderGridDiv">
|
||||||
|
<span id="ToolTypeID" hidden></span>
|
||||||
|
<table id="HeaderGrid"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="GetDataButton" value="Get Data" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="ReviewButton" value="Review" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="RecipeParametersButton" value="Parameters" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="ViewButton" value="View" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="PinButton" value="Pin" disabled />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="DetailsDiv" hidden>
|
||||||
|
|
||||||
|
<span id="HeaderId" hidden></span>
|
||||||
|
<span id="HeaderAttachmentId" hidden></span>
|
||||||
|
<div style="padding-bottom: 20px;" id="DetailsGridDiv">
|
||||||
|
<table id="DetailsGrid"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="ExportDiv" style="margin-top: 10px;" hidden>
|
||||||
|
<input type="button" value="Send to OpenInsight" id="OIExportButton" />
|
||||||
|
<span id="OIExportResult" style="margin-left: 10px; font-weight: bold; color: #366b02;"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="margin-top: 20px;">
|
||||||
|
<iframe id="DataAttachmentFrame" style="height:900px; border-width:thin; margin-right: 10px;"
|
||||||
|
hidden></iframe>
|
||||||
|
<iframe id="HeaderAttachmentFrame" style="height:900px; border-width:thin;" hidden></iframe>
|
||||||
|
|
||||||
|
<div id="DataAttachmentDiv" hidden>
|
||||||
|
<canvas id="DataAttachmentCanvas"></canvas>
|
||||||
|
</div>
|
||||||
|
<div id="HeaderAttachmentDiv" hidden>
|
||||||
|
<canvas id="HeaderAttachmentCanvas"></canvas>
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<footer>
|
||||||
|
<p>© 2024 - Infineon Technologies</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="MessageModal"></div>
|
||||||
|
|
||||||
|
<script src="/js/bootstrap.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/respond.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/index.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
161
Static/Metrology/Export/index.html
Normal file
161
Static/Metrology/Export/index.html
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<title>Run Information</title>
|
||||||
|
|
||||||
|
<script src="/js/modernizr-3.6.0-custom.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<link href="/styles/bootstrap.min.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?no-cache=2024-06-18-10-54"
|
||||||
|
rel="stylesheet" />
|
||||||
|
<link href="/igniteui/css/structure/infragistics.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/styles/site-server.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/styles/index.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
|
||||||
|
<script src="/js/jquery-3.6.0.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/jquery-ui.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.core.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.lob.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.dv.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script src="/js/chart-4.3.0.min.js" type="module"></script>
|
||||||
|
|
||||||
|
<script src="/js/common.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/site-server.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="navbar navbar-fixed-top">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<div class="navbar-brand">
|
||||||
|
<a href="/"><img src="/images/IFX_LOGO_RGB.png" height="20" /></a>
|
||||||
|
OI Metrology Viewer
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="navbar-collapse collapse">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li><a href="/awaiting-disposition.html">Awaiting Disposition</a></li>
|
||||||
|
<li><a href="/index.html" class="alert-info">Run Information</a></li>
|
||||||
|
<li><a href="/run-headers.html">Run Headers</a></li>
|
||||||
|
<li><a href="/files.html">Files</a></li>
|
||||||
|
<li><a href="/export.html">Export</a></li>
|
||||||
|
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||||
|
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||||
|
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||||
|
</ul>
|
||||||
|
<p class="navbar-text navbar-right">
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="container-fluid body-content">
|
||||||
|
|
||||||
|
<h4>Run Information</h4>
|
||||||
|
|
||||||
|
<form class="form-inline mb-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="ToolType">Tool Type</label>
|
||||||
|
<div class="form-control" id="ToolType"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="StartDate">Start Time</label>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="StartDate"></div>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="StartTime"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="EndDate">End Time</label>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="EndDate"></div>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="EndTime"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input class="btn btn-primary" type="button" value="Load Headers" id="LoadHeadersButton" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-check-label" for="chkAutoRefresh">
|
||||||
|
Auto-Refresh
|
||||||
|
</label>
|
||||||
|
<input class="form-check-input" type="checkbox" id="chkAutoRefresh">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-check-label" for="chkCopyOnGet">
|
||||||
|
Copy-On-Get
|
||||||
|
</label>
|
||||||
|
<input class="form-check-input" type="checkbox" id="chkCopyOnGet">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div style="height: 300px;" id="HeaderGridDiv">
|
||||||
|
<span id="ToolTypeID" hidden></span>
|
||||||
|
<table id="HeaderGrid"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="GetDataButton" value="Get Data" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="ReviewButton" value="Review" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="RecipeParametersButton" value="Parameters" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="ViewButton" value="View" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="PinButton" value="Pin" disabled />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="DetailsDiv" hidden>
|
||||||
|
|
||||||
|
<span id="HeaderId" hidden></span>
|
||||||
|
<span id="HeaderAttachmentId" hidden></span>
|
||||||
|
<div style="padding-bottom: 20px;" id="DetailsGridDiv">
|
||||||
|
<table id="DetailsGrid"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="ExportDiv" style="margin-top: 10px;" hidden>
|
||||||
|
<input type="button" value="Send to OpenInsight" id="OIExportButton" />
|
||||||
|
<span id="OIExportResult" style="margin-left: 10px; font-weight: bold; color: #366b02;"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="margin-top: 20px;">
|
||||||
|
<iframe id="DataAttachmentFrame" style="height:900px; border-width:thin; margin-right: 10px;"
|
||||||
|
hidden></iframe>
|
||||||
|
<iframe id="HeaderAttachmentFrame" style="height:900px; border-width:thin;" hidden></iframe>
|
||||||
|
|
||||||
|
<div id="DataAttachmentDiv" hidden>
|
||||||
|
<canvas id="DataAttachmentCanvas"></canvas>
|
||||||
|
</div>
|
||||||
|
<div id="HeaderAttachmentDiv" hidden>
|
||||||
|
<canvas id="HeaderAttachmentCanvas"></canvas>
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<footer>
|
||||||
|
<p>© 2024 - Infineon Technologies</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="MessageModal"></div>
|
||||||
|
|
||||||
|
<script src="/js/bootstrap.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/respond.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/index.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
161
Static/Metrology/RunHeaders/index.html
Normal file
161
Static/Metrology/RunHeaders/index.html
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<title>Run Information</title>
|
||||||
|
|
||||||
|
<script src="/js/modernizr-3.6.0-custom.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<link href="/styles/bootstrap.min.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?no-cache=2024-06-18-10-54"
|
||||||
|
rel="stylesheet" />
|
||||||
|
<link href="/igniteui/css/structure/infragistics.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/styles/site-server.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/styles/index.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
|
||||||
|
<script src="/js/jquery-3.6.0.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/jquery-ui.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.core.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.lob.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.dv.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script src="/js/chart-4.3.0.min.js" type="module"></script>
|
||||||
|
|
||||||
|
<script src="/js/common.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/site-server.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="navbar navbar-fixed-top">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<div class="navbar-brand">
|
||||||
|
<a href="/"><img src="/images/IFX_LOGO_RGB.png" height="20" /></a>
|
||||||
|
OI Metrology Viewer
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="navbar-collapse collapse">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li><a href="/awaiting-disposition.html">Awaiting Disposition</a></li>
|
||||||
|
<li><a href="/index.html" class="alert-info">Run Information</a></li>
|
||||||
|
<li><a href="/run-headers.html">Run Headers</a></li>
|
||||||
|
<li><a href="/files.html">Files</a></li>
|
||||||
|
<li><a href="/export.html">Export</a></li>
|
||||||
|
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||||
|
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||||
|
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||||
|
</ul>
|
||||||
|
<p class="navbar-text navbar-right">
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="container-fluid body-content">
|
||||||
|
|
||||||
|
<h4>Run Information</h4>
|
||||||
|
|
||||||
|
<form class="form-inline mb-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="ToolType">Tool Type</label>
|
||||||
|
<div class="form-control" id="ToolType"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="StartDate">Start Time</label>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="StartDate"></div>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="StartTime"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="EndDate">End Time</label>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="EndDate"></div>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="EndTime"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input class="btn btn-primary" type="button" value="Load Headers" id="LoadHeadersButton" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-check-label" for="chkAutoRefresh">
|
||||||
|
Auto-Refresh
|
||||||
|
</label>
|
||||||
|
<input class="form-check-input" type="checkbox" id="chkAutoRefresh">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-check-label" for="chkCopyOnGet">
|
||||||
|
Copy-On-Get
|
||||||
|
</label>
|
||||||
|
<input class="form-check-input" type="checkbox" id="chkCopyOnGet">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div style="height: 300px;" id="HeaderGridDiv">
|
||||||
|
<span id="ToolTypeID" hidden></span>
|
||||||
|
<table id="HeaderGrid"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="GetDataButton" value="Get Data" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="ReviewButton" value="Review" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="RecipeParametersButton" value="Parameters" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="ViewButton" value="View" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="PinButton" value="Pin" disabled />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="DetailsDiv" hidden>
|
||||||
|
|
||||||
|
<span id="HeaderId" hidden></span>
|
||||||
|
<span id="HeaderAttachmentId" hidden></span>
|
||||||
|
<div style="padding-bottom: 20px;" id="DetailsGridDiv">
|
||||||
|
<table id="DetailsGrid"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="ExportDiv" style="margin-top: 10px;" hidden>
|
||||||
|
<input type="button" value="Send to OpenInsight" id="OIExportButton" />
|
||||||
|
<span id="OIExportResult" style="margin-left: 10px; font-weight: bold; color: #366b02;"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="margin-top: 20px;">
|
||||||
|
<iframe id="DataAttachmentFrame" style="height:900px; border-width:thin; margin-right: 10px;"
|
||||||
|
hidden></iframe>
|
||||||
|
<iframe id="HeaderAttachmentFrame" style="height:900px; border-width:thin;" hidden></iframe>
|
||||||
|
|
||||||
|
<div id="DataAttachmentDiv" hidden>
|
||||||
|
<canvas id="DataAttachmentCanvas"></canvas>
|
||||||
|
</div>
|
||||||
|
<div id="HeaderAttachmentDiv" hidden>
|
||||||
|
<canvas id="HeaderAttachmentCanvas"></canvas>
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<footer>
|
||||||
|
<p>© 2024 - Infineon Technologies</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="MessageModal"></div>
|
||||||
|
|
||||||
|
<script src="/js/bootstrap.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/respond.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/index.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
161
Static/Metrology/RunInfo/index.html
Normal file
161
Static/Metrology/RunInfo/index.html
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<title>Run Information</title>
|
||||||
|
|
||||||
|
<script src="/js/modernizr-3.6.0-custom.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<link href="/styles/bootstrap.min.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?no-cache=2024-06-18-10-54"
|
||||||
|
rel="stylesheet" />
|
||||||
|
<link href="/igniteui/css/structure/infragistics.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/styles/site-server.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
<link href="/styles/index.css?no-cache=2024-06-18-10-54" rel="stylesheet" />
|
||||||
|
|
||||||
|
<script src="/js/jquery-3.6.0.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/jquery-ui.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.core.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.lob.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/igniteui/js/infragistics.dv.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script src="/js/chart-4.3.0.min.js" type="module"></script>
|
||||||
|
|
||||||
|
<script src="/js/common.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/site-server.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="navbar navbar-fixed-top">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<div class="navbar-brand">
|
||||||
|
<a href="/"><img src="/images/IFX_LOGO_RGB.png" height="20" /></a>
|
||||||
|
OI Metrology Viewer
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="navbar-collapse collapse">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li><a href="/awaiting-disposition.html">Awaiting Disposition</a></li>
|
||||||
|
<li><a href="/index.html" class="alert-info">Run Information</a></li>
|
||||||
|
<li><a href="/run-headers.html">Run Headers</a></li>
|
||||||
|
<li><a href="/files.html">Files</a></li>
|
||||||
|
<li><a href="/export.html">Export</a></li>
|
||||||
|
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||||
|
<li><a href="https://goto.infineon.com/oiwizard" target="_blank">OI Web Services</a></li>
|
||||||
|
<li><a href="/mes.html" target="_blank">FI Backlog</a></li>
|
||||||
|
</ul>
|
||||||
|
<p class="navbar-text navbar-right">
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="container-fluid body-content">
|
||||||
|
|
||||||
|
<h4>Run Information</h4>
|
||||||
|
|
||||||
|
<form class="form-inline mb-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="ToolType">Tool Type</label>
|
||||||
|
<div class="form-control" id="ToolType"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="StartDate">Start Time</label>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="StartDate"></div>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="StartTime"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="EndDate">End Time</label>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="EndDate"></div>
|
||||||
|
<div class="form-control mb-2 mr-sm-2" id="EndTime"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input class="btn btn-primary" type="button" value="Load Headers" id="LoadHeadersButton" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-check-label" for="chkAutoRefresh">
|
||||||
|
Auto-Refresh
|
||||||
|
</label>
|
||||||
|
<input class="form-check-input" type="checkbox" id="chkAutoRefresh">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-check-label" for="chkCopyOnGet">
|
||||||
|
Copy-On-Get
|
||||||
|
</label>
|
||||||
|
<input class="form-check-input" type="checkbox" id="chkCopyOnGet">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div style="height: 300px;" id="HeaderGridDiv">
|
||||||
|
<span id="ToolTypeID" hidden></span>
|
||||||
|
<table id="HeaderGrid"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="GetDataButton" value="Get Data" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="ReviewButton" value="Review" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="RecipeParametersButton" value="Parameters" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="ViewButton" value="View" disabled />
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1">
|
||||||
|
<input type="button" class="btn" id="PinButton" value="Pin" disabled />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="DetailsDiv" hidden>
|
||||||
|
|
||||||
|
<span id="HeaderId" hidden></span>
|
||||||
|
<span id="HeaderAttachmentId" hidden></span>
|
||||||
|
<div style="padding-bottom: 20px;" id="DetailsGridDiv">
|
||||||
|
<table id="DetailsGrid"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="ExportDiv" style="margin-top: 10px;" hidden>
|
||||||
|
<input type="button" value="Send to OpenInsight" id="OIExportButton" />
|
||||||
|
<span id="OIExportResult" style="margin-left: 10px; font-weight: bold; color: #366b02;"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p style="margin-top: 20px;">
|
||||||
|
<iframe id="DataAttachmentFrame" style="height:900px; border-width:thin; margin-right: 10px;"
|
||||||
|
hidden></iframe>
|
||||||
|
<iframe id="HeaderAttachmentFrame" style="height:900px; border-width:thin;" hidden></iframe>
|
||||||
|
|
||||||
|
<div id="DataAttachmentDiv" hidden>
|
||||||
|
<canvas id="DataAttachmentCanvas"></canvas>
|
||||||
|
</div>
|
||||||
|
<div id="HeaderAttachmentDiv" hidden>
|
||||||
|
<canvas id="HeaderAttachmentCanvas"></canvas>
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<footer>
|
||||||
|
<p>© 2024 - Infineon Technologies</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="MessageModal"></div>
|
||||||
|
|
||||||
|
<script src="/js/bootstrap.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/respond.min.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
<script src="/js/index.js?no-cache=2024-06-18-10-54" type="text/javascript"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user