\ No newline at end of file
diff --git a/MP-TAB-SERV/Components/TechSheetDetail.razor.cs b/MP-TAB-SERV/Components/TechSheetDetail.razor.cs
new file mode 100644
index 00000000..885b880d
--- /dev/null
+++ b/MP-TAB-SERV/Components/TechSheetDetail.razor.cs
@@ -0,0 +1,6 @@
+namespace MP_TAB_SERV.Components
+{
+ public partial class TechSheetDetail
+ {
+ }
+}
\ No newline at end of file
diff --git a/MP-TAB-SERV/Pages/IobInfo.razor b/MP-TAB-SERV/Pages/IobInfo.razor
index 2050c2f2..dcf4d33a 100644
--- a/MP-TAB-SERV/Pages/IobInfo.razor
+++ b/MP-TAB-SERV/Pages/IobInfo.razor
@@ -9,5 +9,5 @@ else
-
+
}
diff --git a/MP.Data/DTO/IobInfoDTO.cs b/MP.Data/DTO/IobInfoDTO.cs
new file mode 100644
index 00000000..a0fd39ec
--- /dev/null
+++ b/MP.Data/DTO/IobInfoDTO.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MP.Data.DTO
+{
+ public class IobInfoDTO
+ {
+ public string name { get; set; } = "ND";
+ public string IP { get; set; } = "::1";
+ public string iType { get; set; } = "Win";
+ }
+}
diff --git a/MP.Data/Services/TabDataService.cs b/MP.Data/Services/TabDataService.cs
index 75e34186..2e0a3dc4 100644
--- a/MP.Data/Services/TabDataService.cs
+++ b/MP.Data/Services/TabDataService.cs
@@ -1,5 +1,6 @@
using Microsoft.Extensions.Configuration;
using MP.Data.DatabaseModels;
+using MP.Data.DTO;
using Newtonsoft.Json;
using NLog;
using StackExchange.Redis;
@@ -157,6 +158,32 @@ namespace MP.Data.Services
return result;
}
+
+
+
+ public async Task IobInfo(string IdxMacchina)
+ {
+ string source = "DB";
+ Stopwatch sw = new Stopwatch();
+ sw.Start();
+ IobInfoDTO? result = new IobInfoDTO();
+ // cerco in redis...
+ string currKey = $"{moonProRedisBaseKey}:{IdxMacchina}";
+ RedisValue rawData = await redisDb.StringGetAsync(currKey);
+ if (!string.IsNullOrEmpty($"{rawData}"))
+ {
+ result = JsonConvert.DeserializeObject($"{rawData}");
+ source = "REDIS";
+ }
+ if (result == null)
+ {
+ result = new IobInfoDTO();
+ }
+ sw.Stop();
+ Log.Debug($"IobInfo | {source} | {sw.Elapsed.TotalMilliseconds}ms");
+ return result;
+ }
+
public void Dispose()
{
// Clear database controller
@@ -414,6 +441,7 @@ namespace MP.Data.Services
private static Logger Log = LogManager.GetCurrentClassLogger();
private string redisBaseKey = "MP:TAB:Cache";
+ private string moonProRedisBaseKey = "MoonPro:SQL2016DEV:MoonPro:hM2IOB";
#endregion Private Fields
}