diff --git a/Jenkinsfile b/Jenkinsfile
index dc6aa61d..a03ca1e5 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -18,7 +18,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
- withEnv(['NEXT_BUILD_NUMBER=1176']) {
+ withEnv(['NEXT_BUILD_NUMBER=1179']) {
// env.versionNumber = VersionNumber(versionNumberString : '6.6.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '6.6.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'MAPO'
diff --git a/MP-TAB/Controlli.aspx b/MP-TAB/Controlli.aspx
index 7c182ba9..42b03105 100644
--- a/MP-TAB/Controlli.aspx
+++ b/MP-TAB/Controlli.aspx
@@ -13,8 +13,22 @@
+
+
+
+
+
+
+
ELABORAZIONE IN CORSO
+
+
+
+
+
diff --git a/MP-TAB/Controlli.aspx.designer.cs b/MP-TAB/Controlli.aspx.designer.cs
index 18d66410..a66fdc32 100644
--- a/MP-TAB/Controlli.aspx.designer.cs
+++ b/MP-TAB/Controlli.aspx.designer.cs
@@ -30,6 +30,15 @@ namespace MoonProTablet {
///
protected global::MoonProTablet.WebUserControls.mod_controlliProd mod_controlliProd;
+ ///
+ /// Controllo updtRicerca.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.UpdateProgress updtRicerca;
+
///
/// Controllo mod_elencoControlli.
///
diff --git a/MP-TAB/DettaglioMacchina.aspx.cs b/MP-TAB/DettaglioMacchina.aspx.cs
index 78806806..37bbc514 100644
--- a/MP-TAB/DettaglioMacchina.aspx.cs
+++ b/MP-TAB/DettaglioMacchina.aspx.cs
@@ -24,14 +24,6 @@ namespace MoonProTablet
* --exec dbo.stp_RC_getLast @IdxMacchina=N'SIMUL_03'
* --exec dbo.stp_LMJ_getByTipo @TipoLink=N'DetMacc'
* --exec dbo.stp_LMJ_getByTipo @TipoLink=N'DetMacc'
- *
- *
- *
- *
- *
- *
- *
- *
*
* */
diff --git a/MP-TAB/Scarti.aspx b/MP-TAB/Scarti.aspx
index f9211fd4..eb5a8170 100644
--- a/MP-TAB/Scarti.aspx
+++ b/MP-TAB/Scarti.aspx
@@ -14,8 +14,22 @@
+
+
+
+
+
+
+
+
ELABORAZIONE IN CORSO
+
+
+
+
+
diff --git a/MP-TAB/Scarti.aspx.designer.cs b/MP-TAB/Scarti.aspx.designer.cs
index 1bd5511b..dc2337a4 100644
--- a/MP-TAB/Scarti.aspx.designer.cs
+++ b/MP-TAB/Scarti.aspx.designer.cs
@@ -30,6 +30,15 @@ namespace MoonProTablet {
///
protected global::MoonProTablet.WebUserControls.mod_regScarti mod_regScarti1;
+ ///
+ /// Controllo updtRicerca.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.UpdateProgress updtRicerca;
+
///
/// Controllo mod_elencoScarti.
///
diff --git a/MP-TAB/Web.config b/MP-TAB/Web.config
index e762e7e3..cb517662 100644
--- a/MP-TAB/Web.config
+++ b/MP-TAB/Web.config
@@ -54,7 +54,7 @@
-
+
diff --git a/MP-TAB/WebUserControls/mod_ODL.ascx b/MP-TAB/WebUserControls/mod_ODL.ascx
index 33c0e4cc..29bed4da 100644
--- a/MP-TAB/WebUserControls/mod_ODL.ascx
+++ b/MP-TAB/WebUserControls/mod_ODL.ascx
@@ -42,7 +42,7 @@
+
+
+
+
+
+
+
+
ELABORAZIONE IN CORSO
-
+
-
-
-
-
-
+
+
+
diff --git a/MP-TAB/WebUserControls/mod_confProd.ascx.cs b/MP-TAB/WebUserControls/mod_confProd.ascx.cs
index ed2d27df..eabdaa29 100644
--- a/MP-TAB/WebUserControls/mod_confProd.ascx.cs
+++ b/MP-TAB/WebUserControls/mod_confProd.ascx.cs
@@ -1,7 +1,6 @@
using MapoDb;
using SteamWare;
using System;
-using System.Threading;
using System.Web.UI;
namespace MoonProTablet.WebUserControls
@@ -270,21 +269,48 @@ namespace MoonProTablet.WebUserControls
get
{
bool answ = true;
- // carico i dati preliminari: ODL
- int idxOdl = 0; // userò ODL del turno
- try
- {
- idxOdl = DataLayer.obj.taODL.getByMacchinaAperto(idxMacchina)[0].IdxODL;
- }
- catch
- {
- logger.lg.scriviLog(string.Format("Errore a recuperare ODL per la macchina {0}", idxMacchina), tipoLog.ERROR);
- }
// se ODL > 0 è ok!!!
answ = (idxOdl > 0);
return answ;
}
}
+ ///
+ /// ODL correntemente sulla macchina
+ /// - cerca in Redis (TTL 5 sec)
+ /// - altrimenti recupera da DB...
+ ///
+ protected int idxOdl
+ {
+ get
+ {
+ // userò ODL del turno
+ int answ = 0;
+ // cerco da redis...
+ int.TryParse(DataLayer.currODL(idxMacchina, true), out answ);
+#if false
+ string redKey = memLayer.ML.redHash($"ODL:{idxMacchina}");
+ string _idxOdl = memLayer.ML.getRSV(redKey);
+ if (_idxOdl != null && _idxOdl != "")
+ {
+ int.TryParse(_idxOdl, out answ);
+ }
+ else
+ {
+ try
+ {
+ answ = DataLayer.obj.taODL.getByMacchinaAperto(idxMacchina)[0].IdxODL;
+ memLayer.ML.setRSV(redKey, answ.ToString(), 5);
+ }
+ catch
+ {
+ logger.lg.scriviLog(string.Format("Errore a recuperare ODL per la macchina {0}", idxMacchina), tipoLog.ERROR);
+ }
+ }
+#endif
+ return answ;
+ }
+ }
+
///
/// idx macchina selezionata
///
@@ -498,9 +524,5 @@ namespace MoonProTablet.WebUserControls
}
}
- protected void lbtTest_Click(object sender, EventArgs e)
- {
- Thread.Sleep(3000);
- }
}
}
\ No newline at end of file
diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs
index 3da1e882..36d521c2 100644
--- a/MapoDb/DataLayer.cs
+++ b/MapoDb/DataLayer.cs
@@ -1389,7 +1389,7 @@ namespace MapoDb
try
{
rCall = memLayer.ML.getRSV(currODLHash(idxMacchina));
- if (rCall != "" && rCall != null)
+ if (rCall != null && rCall != "")
{
answ = rCall;
}
@@ -1414,11 +1414,22 @@ namespace MapoDb
public static string currODL(string idxMacchina, bool forceDb)
{
string answ = "";
+ // faccio comunque verifica se sia stato letto da poco il valore... x cui anceh a fronte di richeista lettura da DB per 3 sec tengo buono valore in cache redis...
+ string rKey = memLayer.ML.redHash($"ODL:{idxMacchina}");
+ string _idxOdl = memLayer.ML.getRSV(rKey);
if (forceDb)
{
- answ = MapoDb.obj.currODL(idxMacchina);
- // salvo in redis...
- saveCurrODL(idxMacchina, answ);
+ if (_idxOdl != null && _idxOdl != "")
+ {
+ answ = _idxOdl;
+ }
+ else
+ {
+ answ = MapoDb.obj.currODL(idxMacchina);
+ // salvo in redis...
+ saveCurrODL(idxMacchina, answ);
+ memLayer.ML.setRSV(rKey, answ, 3);
+ }
}
else
{