diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html
index 416babf1..cc6d4acd 100644
--- a/MP-TAB-SERV/Resources/ChangeLog.html
+++ b/MP-TAB-SERV/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
-
Versione: 6.16.2312.1117
+
Versione: 6.16.2312.1119
Note di rilascio:
-
diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt
index 37708e5b..81fa670d 100644
--- a/MP-TAB-SERV/Resources/VersNum.txt
+++ b/MP-TAB-SERV/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2312.1117
+6.16.2312.1119
diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml
index 333426eb..2203e907 100644
--- a/MP-TAB-SERV/Resources/manifest.xml
+++ b/MP-TAB-SERV/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2312.1117
+ 6.16.2312.1119
https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/MP-TAB-SERV.zip
https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/ChangeLog.html
false
diff --git a/MP-TAB-SERV/compilerconfig.json b/MP-TAB-SERV/compilerconfig.json
index 81657133..0ae6cb7f 100644
--- a/MP-TAB-SERV/compilerconfig.json
+++ b/MP-TAB-SERV/compilerconfig.json
@@ -34,5 +34,9 @@
{
"outputFile": "Components/ProdPlanMan.razor.css",
"inputFile": "Components/ProdPlanMan.razor.less"
+ },
+ {
+ "outputFile": "Components/CheckControls.razor.css",
+ "inputFile": "Components/CheckControls.razor.less"
}
]
\ No newline at end of file
diff --git a/MP.Data/Controllers/MpTabController.cs b/MP.Data/Controllers/MpTabController.cs
index e7311b81..5edb6991 100644
--- a/MP.Data/Controllers/MpTabController.cs
+++ b/MP.Data/Controllers/MpTabController.cs
@@ -54,51 +54,6 @@ namespace MP.Data.Controllers
return dbResult;
}
-
- ///
- /// Elenco operatori
- ///
- ///
- public List ElencoOperatori()
- {
- List dbResult = new List();
- using (var dbCtx = new MoonProContext(_configuration))
- {
- dbResult = dbCtx
- .DbOperatori
- .Where(s => s.MatrOpr > 0)
- .AsNoTracking()
- .OrderBy(x => x.MatrOpr)
- .ToList();
- }
- return dbResult;
- }
-
- ///
- /// login operatori
- ///
- /// ///
- /// ///
- ///
- public AnagOperatoriModel OperatoreSearch(int matrOpr, string authKey)
- {
- AnagOperatoriModel dbResult = null;
- AnagOperatoriModel answ = new AnagOperatoriModel();
- using (var dbCtx = new MoonProContext(_configuration))
- {
- dbResult = dbCtx
- .DbOperatori
- .Where(s => (s.MatrOpr > 0) && (s.MatrOpr == matrOpr) && (s.authKey == authKey))
- .AsNoTracking()
- .FirstOrDefault();
- if (dbResult != null)
- {
- answ = dbResult;
- }
- }
- return answ;
- }
-
///
/// Registrato ACK allarme
///
@@ -560,6 +515,25 @@ namespace MP.Data.Controllers
return fatto;
}
+ ///
+ /// Elenco operatori
+ ///
+ ///
+ public List ElencoOperatori()
+ {
+ List dbResult = new List();
+ using (var dbCtx = new MoonProContext(_configuration))
+ {
+ dbResult = dbCtx
+ .DbOperatori
+ .Where(s => s.MatrOpr > 0)
+ .AsNoTracking()
+ .OrderBy(x => x.MatrOpr)
+ .ToList();
+ }
+ return dbResult;
+ }
+
//stp_DDB_getNextByMacchinaFrom
///
/// Eliminazione record EventList (SE trovato)
@@ -1264,6 +1238,33 @@ namespace MP.Data.Controllers
return answ;
}
+ ///
+ /// login operatori
+ ///
+ /// ///
+ ///
+ /// ///
+ ///
+ ///
+ public AnagOperatoriModel OperatoreSearch(int matrOpr, string authKey)
+ {
+ AnagOperatoriModel dbResult = null;
+ AnagOperatoriModel answ = new AnagOperatoriModel();
+ using (var dbCtx = new MoonProContext(_configuration))
+ {
+ dbResult = dbCtx
+ .DbOperatori
+ .Where(s => (s.MatrOpr > 0) && (s.MatrOpr == matrOpr) && (s.authKey == authKey))
+ .AsNoTracking()
+ .FirstOrDefault();
+ if (dbResult != null)
+ {
+ answ = dbResult;
+ }
+ }
+ return answ;
+ }
+
///
/// Stato prod macchina
///
@@ -1444,6 +1445,29 @@ namespace MP.Data.Controllers
return fatto;
}
+ /// Restituisce elenco Ultimi RC macchina
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public List RegControlliLast(string idxMacchina)
+ {
+ List dbResult = new List();
+ using (var dbCtx = new MoonProContext(_configuration))
+ {
+ var IdxMacc = new SqlParameter("@IdxMacchina", idxMacchina);
+
+ dbResult = dbCtx
+ .DbSetRegControlli
+ .FromSqlRaw("EXEC stp_RC_getLast @IdxMacchina", IdxMacc)
+ .AsNoTracking()
+ .ToList();
+ }
+ return dbResult;
+ }
+
///
/// Aggiunta record RegistroScarti
///
diff --git a/MP.Data/Services/TabDataService.cs b/MP.Data/Services/TabDataService.cs
index baa9cbb9..70427841 100644
--- a/MP.Data/Services/TabDataService.cs
+++ b/MP.Data/Services/TabDataService.cs
@@ -1942,6 +1942,42 @@ namespace MP.Data.Services
return result;
}
+ ///
+ /// Restituisce elenco ULTIMI RC x macchina
+ ///
+ ///
+ ///
+ public async Task
> RegControlliLast(string idxMacchina)
+ {
+ // setup parametri costanti
+ string source = "DB";
+ Stopwatch sw = new Stopwatch();
+ sw.Start();
+ List? result = new List();
+ // cerco in redis...
+ string currKey = $"{redisBaseKey}:RecContr:{idxMacchina}:LAST";
+ RedisValue rawData = await redisDb.StringGetAsync(currKey);
+ if (rawData.HasValue)
+ {
+ result = JsonConvert.DeserializeObject>($"{rawData}");
+ source = "REDIS";
+ }
+ else
+ {
+ result = dbTabController.RegControlliLast(idxMacchina);
+ // serializzp e salvo...
+ rawData = JsonConvert.SerializeObject(result);
+ await redisDb.StringSetAsync(currKey, rawData, FastCache);
+ }
+ if (result == null)
+ {
+ result = new List();
+ }
+ sw.Stop();
+ Log.Debug($"RegControlliLast | {source} | {sw.Elapsed.TotalMilliseconds}ms");
+ return result;
+ }
+
///
/// Registra controllo
///