diff --git a/Jenkinsfile b/Jenkinsfile
index 354da56d..16d23fad 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -12,7 +12,7 @@ pipeline {
steps {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
- withEnv(['NEXT_BUILD_NUMBER=1332']) {
+ withEnv(['NEXT_BUILD_NUMBER=1333']) {
// env.versionNumber = VersionNumber(versionNumberString : '6.12.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '6.12.${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-IO/Controllers/IOBController.cs b/MP-IO/Controllers/IOBController.cs
index 2d99f4ff..7f5844dd 100644
--- a/MP-IO/Controllers/IOBController.cs
+++ b/MP-IO/Controllers/IOBController.cs
@@ -325,6 +325,25 @@ namespace MP_IO.Controllers
return DataLayerObj.forceSplitOdl(id, true, true, 100);
}
+ ///
+ /// Chiude ODL precedente ed avvia uno nuovo (duplicandolo e sitemando quantità RIMANENTE), e CONFERMA produzione...
+ ///
+ /// GET: IOB/forceSplitOdl/SIMUL_03?doConfirm=true&qtyFromLast=true&roundStep=150
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Esito chiamata (OK/vuoto)
+ public string forceSplitOdlFull(string id, bool doConfirm, bool qtyFromLast, int roundStep)
+ {
+ // attenzione! poiché nell'URL il carattere "#" fiene filtrato ci aspettiamo il carattere "|" che poi trasformiamo ora in "#"
+ id = id.Replace("|", "#");
+ DataLayer DataLayerObj = new DataLayer();
+ return DataLayerObj.forceSplitOdl(id, doConfirm, qtyFromLast, roundStep);
+ }
+
///
/// Recupera COUNTER x macchina:
///
@@ -417,7 +436,7 @@ namespace MP_IO.Controllers
try
{
DataLayer DataLayerObj = new DataLayer();
- answ = DataLayerObj.currODL(id).ToString();
+ answ = $"{DataLayerObj.currODL(id)}";
}
catch (Exception exc)
{
diff --git a/MP-SITE/BasePage.cs b/MP-SITE/BasePage.cs
index 79991706..f124430c 100644
--- a/MP-SITE/BasePage.cs
+++ b/MP-SITE/BasePage.cs
@@ -5,18 +5,16 @@ namespace MP_SITE
{
public class BasePage : UserPage
{
+ #region Internal Fields
+
///
/// Oggetto datalayer specifico
///
internal DataLayer DataLayerObj = new DataLayer();
- public bool enableGraphJS
- {
- get
- {
- return memLayer.ML.CRB("enableGraphJS");
- }
- }
+ #endregion Internal Fields
+
+ #region Protected Properties
///
/// Prox pagina da aprire
@@ -34,6 +32,22 @@ namespace MP_SITE
}
}
+ #endregion Protected Properties
+
+ #region Public Properties
+
+ public bool enableGraphJS
+ {
+ get
+ {
+ return memLayer.ML.CRB("enableGraphJS");
+ }
+ }
+
+ #endregion Public Properties
+
+ #region Public Methods
+
///
/// effettua traduzione del lemma
///
@@ -53,5 +67,7 @@ namespace MP_SITE
{
return user_std.UtSn.TraduciEn(lemma);
}
+
+ #endregion Public Methods
}
}
\ No newline at end of file
diff --git a/MP-Site/WebUserControls/mod_sequencerStati.ascx.cs b/MP-Site/WebUserControls/mod_sequencerStati.ascx.cs
index eb2769ce..13d8a9ca 100644
--- a/MP-Site/WebUserControls/mod_sequencerStati.ascx.cs
+++ b/MP-Site/WebUserControls/mod_sequencerStati.ascx.cs
@@ -9,6 +9,48 @@ namespace MP_SITE.WebUserControls
{
public partial class mod_sequencerStati : System.Web.UI.UserControl
{
+ #region Protected Fields
+
+ protected objSequencer _grafico;
+
+ protected int _larghezza = 100;
+
+ protected double _min2plot = 0.0;
+
+ protected double _minRosso = 0.5;
+
+ protected double _minSpento = 0.5;
+
+ protected double _minVerde = 0.5;
+
+ protected int _timeSplits = 10;
+
+ protected string _titolo = "Sequencer";
+
+ ///
+ /// totale in minuti da plottare
+ ///
+ protected double totale = 1;
+
+ #endregion Protected Fields
+
+ #region Public Fields
+
+ public resoconti _resoconti;
+
+ #endregion Public Fields
+
+ #region Public Events
+
+ ///
+ /// evento di richeista zoom sui dati
+ ///
+ public event EventHandler eh_richiestaZoom;
+
+ #endregion Public Events
+
+ #region Public Properties
+
///
/// dati x grafico sequencer
///
@@ -24,62 +66,198 @@ namespace MP_SITE.WebUserControls
}
}
- public resoconti _resoconti;
- protected objSequencer _grafico;
- protected double _min2plot = 0.0;
- protected string _titolo = "Sequencer";
- protected int _larghezza = 100;
- protected int _timeSplits = 10;
- ///
- /// totale in minuti da plottare
- ///
- protected double totale = 1;
- ///
- /// numero dei segmenti del grafico
- ///
- public int numSplit { get; set; }
- protected double _minVerde = 0.5;
- protected double _minRosso = 0.5;
- protected double _minSpento = 0.5;
///
/// altezza max grafico
///
public int graphHeight { get; set; }
+
///
/// identificativo
///
public string identificativo { get; set; }
- protected void Page_Load(object sender, EventArgs e)
+ ///
+ /// larghezza totale del grafico (forzo a zero come minimo...)
+ ///
+ public int larghezza
{
- doUpdate();
+ get
+ {
+ return _larghezza;
+ }
+ set
+ {
+ if (value > 0)
+ {
+ _larghezza = value;
+ }
+ else
+ {
+ _larghezza = 0;
+ }
+ }
}
///
- /// disegna la tabella
+ /// valore minimo da plottare
///
- protected void plottaGrafico()
+ public double min2plot
{
- // a seconda del numero di eventi da plottare decido la procedura...
- DataLayer_generic.serieDatiDataTable dati = _grafico.serieDati;
- try
+ get
{
- // è la somma dei minuti totali dall'inizio alla fine...
- totale = _grafico.intervallo.fine.Subtract(_grafico.intervallo.inizio).TotalMinutes;
+ return _min2plot;
}
- catch
- { }
- int numCelle = dati.Rows.Count;
- if (numCelle <= numSplit) // se ho eventi <= _num split....
+ set
{
- plottaDettaglio(dati);
- }
- else // altrimenti raggruppo!
- {
- plottaGruppi(dati);
+ _min2plot = value;
}
}
+ ///
+ /// % minuma nel periodo per dire che sia rosso
+ ///
+ public double minRosso
+ {
+ get
+ {
+ return _minRosso;
+ }
+ set
+ {
+ _minRosso = value;
+ }
+ }
+
+ ///
+ /// % minuma nel periodo per dire che sia spento
+ ///
+ public double minSpento
+ {
+ get
+ {
+ return _minSpento;
+ }
+ set
+ {
+ _minSpento = value;
+ }
+ }
+
+ ///
+ /// % minuma nel periodo per dire che sia verde
+ ///
+ public double minVerde
+ {
+ get
+ {
+ return _minVerde;
+ }
+ set
+ {
+ _minVerde = value;
+ }
+ }
+
+ ///
+ /// numero dei segmenti del grafico
+ ///
+ public int numSplit { get; set; }
+
+ ///
+ /// titolo del grafico
+ ///
+ public string titolo
+ {
+ get
+ {
+ return _titolo;
+ }
+ set
+ {
+ _titolo = value;
+ }
+ }
+
+ #endregion Public Properties
+
+ #region Private Methods
+
+ ///
+ /// accoda i dati alla serie corretta
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ private void accodaDati(ref int tipo, ref DateTime inizio, ref DateTime fine, DataLayer_generic.serieDatiRow rigaPrec, string codV, string codG, string codR, string codB, string codS)
+ {
+ switch (rigaPrec.colore)
+ {
+ case "sVe":
+ tipo = 1;
+ Chart1.Series["SeqV"].Points.AddXY(tipo, inizio, fine);
+ // aggiungo tooltip
+ Chart1.Series["SeqV"].Points[Chart1.Series["SeqV"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codV);
+ Chart1.Series["SeqV"].Points[Chart1.Series["SeqV"].Points.Count - 1].PostBackValue = inizio.ToString();
+ break;
+
+ case "sGi":
+ tipo = 1;
+ Chart1.Series["SeqG"].Points.AddXY(tipo, inizio, fine);
+ // aggiungo tooltip
+ Chart1.Series["SeqG"].Points[Chart1.Series["SeqG"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codG);
+ Chart1.Series["SeqG"].Points[Chart1.Series["SeqG"].Points.Count - 1].PostBackValue = inizio.ToString();
+ break;
+
+ case "sRo":
+ tipo = 1;
+ Chart1.Series["SeqR"].Points.AddXY(tipo, inizio, fine);
+ // aggiungo tooltip
+ Chart1.Series["SeqR"].Points[Chart1.Series["SeqR"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codR);
+ Chart1.Series["SeqR"].Points[Chart1.Series["SeqR"].Points.Count - 1].PostBackValue = inizio.ToString();
+ break;
+
+ case "sBl":
+ tipo = 1;
+ Chart1.Series["SeqB"].Points.AddXY(tipo, inizio, fine);
+ // aggiungo tooltip
+ Chart1.Series["SeqB"].Points[Chart1.Series["SeqB"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codR);
+ Chart1.Series["SeqB"].Points[Chart1.Series["SeqB"].Points.Count - 1].PostBackValue = inizio.ToString();
+ break;
+
+ case "sGr":
+ tipo = 1;
+ Chart1.Series["SeqS"].Points.AddXY(tipo, inizio, fine);
+ // aggiungo tooltip
+ Chart1.Series["SeqS"].Points[Chart1.Series["SeqS"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codS);
+ Chart1.Series["SeqS"].Points[Chart1.Series["SeqS"].Points.Count - 1].PostBackValue = inizio.ToString();
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ ///
+ /// intercetta richiesta di zoom e zoomma sul giorno in esame...
+ ///
+ ///
+ ///
+ private void lnkb_Click(object sender, EventArgs e)
+ {
+ LinkButton lnk = (LinkButton)sender;
+ // calcolo il giorno...
+ memLayer.ML.setSessionVal("dataZoom", lnk.CommandArgument.ToString());
+ if (eh_richiestaZoom != null)
+ {
+ eh_richiestaZoom(this, new EventArgs());
+ }
+ }
///
/// popola il sequencer degli stati riportando tutti i singoli valori
@@ -177,77 +355,7 @@ namespace MP_SITE.WebUserControls
fine = rigaPrec.timeData.AddMinutes(rigaPrec.valore);
accodaDati(ref tipo, ref inizio, ref fine, rigaPrec, codV, codG, codR, codB, codS);
}
- ///
- /// accoda i dati alla serie corretta
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- private void accodaDati(ref int tipo, ref DateTime inizio, ref DateTime fine, DataLayer_generic.serieDatiRow rigaPrec, string codV, string codG, string codR, string codB, string codS)
- {
- switch (rigaPrec.colore)
- {
- case "sVe":
- tipo = 1;
- Chart1.Series["SeqV"].Points.AddXY(tipo, inizio, fine);
- // aggiungo tooltip
- Chart1.Series["SeqV"].Points[Chart1.Series["SeqV"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codV);
- Chart1.Series["SeqV"].Points[Chart1.Series["SeqV"].Points.Count - 1].PostBackValue = inizio.ToString();
- break;
- case "sGi":
- tipo = 1;
- Chart1.Series["SeqG"].Points.AddXY(tipo, inizio, fine);
- // aggiungo tooltip
- Chart1.Series["SeqG"].Points[Chart1.Series["SeqG"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codG);
- Chart1.Series["SeqG"].Points[Chart1.Series["SeqG"].Points.Count - 1].PostBackValue = inizio.ToString();
- break;
- case "sRo":
- tipo = 1;
- Chart1.Series["SeqR"].Points.AddXY(tipo, inizio, fine);
- // aggiungo tooltip
- Chart1.Series["SeqR"].Points[Chart1.Series["SeqR"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codR);
- Chart1.Series["SeqR"].Points[Chart1.Series["SeqR"].Points.Count - 1].PostBackValue = inizio.ToString();
- break;
- case "sBl":
- tipo = 1;
- Chart1.Series["SeqB"].Points.AddXY(tipo, inizio, fine);
- // aggiungo tooltip
- Chart1.Series["SeqB"].Points[Chart1.Series["SeqB"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codR);
- Chart1.Series["SeqB"].Points[Chart1.Series["SeqB"].Points.Count - 1].PostBackValue = inizio.ToString();
- break;
- case "sGr":
- tipo = 1;
- Chart1.Series["SeqS"].Points.AddXY(tipo, inizio, fine);
- // aggiungo tooltip
- Chart1.Series["SeqS"].Points[Chart1.Series["SeqS"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codS);
- Chart1.Series["SeqS"].Points[Chart1.Series["SeqS"].Points.Count - 1].PostBackValue = inizio.ToString();
- break;
- default:
- break;
- }
- }
- ///
- /// intercetta richiesta di zoom e zoomma sul giorno in esame...
- ///
- ///
- ///
- void lnkb_Click(object sender, EventArgs e)
- {
- LinkButton lnk = (LinkButton)sender;
- // calcolo il giorno...
- memLayer.ML.setSessionVal("dataZoom", lnk.CommandArgument.ToString());
- if (eh_richiestaZoom != null)
- {
- eh_richiestaZoom(this, new EventArgs());
- }
- }
///
/// popola il sequencer degli stati raggruppando perché troppi valori
///
@@ -256,7 +364,7 @@ namespace MP_SITE.WebUserControls
private void plottaGruppi(DataLayer_generic.serieDatiDataTable dati)
{
DataLayer_generic.serieDatiDataTable datiGrouped = new DataLayer_generic.serieDatiDataTable();
- // verifico se ho i dati in cache REDIS...
+ // verifico se ho i dati in cache REDIS...
double numGG = _grafico.intervallo.fine.Subtract(_grafico.intervallo.inizio).TotalDays;
logger.lg.scriviLog(string.Format("Richiesta dati legacySeq GROUPED per {0} {1} gg", _grafico.idxMacchina, numGG));
string rKey = DataLayer.mHash(string.Format("legacySeq:spl_{0}:mac_{1}_{2}_{3}", numSplit, _grafico.idxMacchina, _grafico.intervallo.inizio.ToString("yyyyMMdd_HHmmss"), _grafico.intervallo.fine.ToString("yyyyMMdd_HHmmss")).Replace(" ", "_"));
@@ -268,7 +376,7 @@ namespace MP_SITE.WebUserControls
try
{
needRecalc = false;
- // deserializzo
+ // deserializzo
datiGrouped = JsonConvert.DeserializeObject(redJson);
logger.lg.scriviLog("Recuperato " + rKey);
}
@@ -310,15 +418,19 @@ namespace MP_SITE.WebUserControls
case "sVe":
valV = valV + riga.valore;
break;
+
case "sGi":
valG = valG + riga.valore;
break;
+
case "sRo":
valR = valR + riga.valore;
break;
+
case "sBl":
valB = valB + riga.valore;
break;
+
case "sGr":
valS = valS + riga.valore;
break;
@@ -364,7 +476,7 @@ namespace MP_SITE.WebUserControls
}
//registro fine
logger.lg.scriviLog(string.Format("FINE calcolo dati per {0} {1}", _grafico.idxMacchina, rKey));
- // salvo sequenza in REDIS...
+ // salvo sequenza in REDIS...
string rData = JsonConvert.SerializeObject(datiGrouped);
// salvo in sessione l'oggetto... secondo durata impostata in web.config.. moltiplicata x numero gg...
memLayer.ML.setRSV(rKey, rData, 60 * memLayer.ML.CRI("seqCacheDurMin") * (int)numGG);
@@ -373,6 +485,30 @@ namespace MP_SITE.WebUserControls
plottaDettaglio(datiGrouped);
}
+ #endregion Private Methods
+
+ #region Protected Methods
+
+ ///
+ /// evento click su sequencer: zoom 2X
+ ///
+ ///
+ ///
+ protected void Chart1_Click(object sender, ImageMapEventArgs e)
+ {
+ // alzo evento
+ if (eh_richiestaZoom != null)
+ {
+ if (e != null)
+ {
+ ImageMapEventArgs evIM = e;
+ // salvo in sessione
+ memLayer.ML.setSessionVal("zoomCenter", e.PostBackValue);
+ eh_richiestaZoom(this, new EventArgs());
+ }
+ }
+ }
+
///
/// restituisce true se ci sono dati...
///
@@ -393,97 +529,40 @@ namespace MP_SITE.WebUserControls
return answ;
}
- ///
- /// valore minimo da plottare
- ///
- public double min2plot
+ protected void Page_Load(object sender, EventArgs e)
{
- get
+ doUpdate();
+ }
+
+ ///
+ /// disegna la tabella
+ ///
+ protected void plottaGrafico()
+ {
+ // a seconda del numero di eventi da plottare decido la procedura...
+ DataLayer_generic.serieDatiDataTable dati = _grafico.serieDati;
+ try
{
- return _min2plot;
+ // è la somma dei minuti totali dall'inizio alla fine...
+ totale = _grafico.intervallo.fine.Subtract(_grafico.intervallo.inizio).TotalMinutes;
}
- set
+ catch
+ { }
+ int numCelle = dati.Rows.Count;
+ if (numCelle <= numSplit) // se ho eventi <= _num split....
{
- _min2plot = value;
- }
- }
- ///
- /// titolo del grafico
- ///
- public string titolo
- {
- get
- {
- return _titolo;
- }
- set
- {
- _titolo = value;
- }
- }
- ///
- /// larghezza totale del grafico (forzo a zero come minimo...)
- ///
- public int larghezza
- {
- get
- {
- return _larghezza;
- }
- set
- {
- if (value > 0)
- {
- _larghezza = value;
- }
- else
- {
- _larghezza = 0;
- }
- }
- }
- ///
- /// % minuma nel periodo per dire che sia verde
- ///
- public double minVerde
- {
- get
- {
- return _minVerde;
- }
- set
- {
- _minVerde = value;
- }
- }
- ///
- /// % minuma nel periodo per dire che sia rosso
- ///
- public double minRosso
- {
- get
- {
- return _minRosso;
- }
- set
- {
- _minRosso = value;
- }
- }
- ///
- /// % minuma nel periodo per dire che sia spento
- ///
- public double minSpento
- {
- get
- {
- return _minSpento;
- }
- set
- {
- _minSpento = value;
+ plottaDettaglio(dati);
+ }
+ else // altrimenti raggruppo!
+ {
+ plottaGruppi(dati);
}
}
+
+ #endregion Protected Methods
+
+ #region Public Methods
+
///
/// aggiorna il controllo
///
@@ -499,31 +578,6 @@ namespace MP_SITE.WebUserControls
}
}
-
- ///
- /// evento di richeista zoom sui dati
- ///
- public event EventHandler eh_richiestaZoom;
- ///
- /// evento click su sequencer: zoom 2X
- ///
- ///
- ///
- protected void Chart1_Click(object sender, ImageMapEventArgs e)
- {
- // alzo evento
- if (eh_richiestaZoom != null)
- {
- if (e != null)
- {
- ImageMapEventArgs evIM = e;
- // salvo in sessione
- memLayer.ML.setSessionVal("zoomCenter", e.PostBackValue);
- eh_richiestaZoom(this, new EventArgs());
- }
- }
- }
-
-
+ #endregion Public Methods
}
}
\ No newline at end of file
diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs
index 4c13eafe..a22039b6 100644
--- a/MapoDb/DataLayer.cs
+++ b/MapoDb/DataLayer.cs
@@ -1206,7 +1206,7 @@ namespace MapoDb
try
{
rCall = memLayer.ML.getRSV(currODLHash(idxMacchina));
- if (rCall != null && rCall != "")
+ if (!string.IsNullOrEmpty(rCall))
{
answ = rCall;
}
@@ -1446,7 +1446,7 @@ namespace MapoDb
string rawData = memLayer.ML.getRSV(redKey);
if (string.IsNullOrEmpty(rawData))
{
- // registro VETO x altri split... 2 minuti
+ // registro VETO x altri split... 5 minuti
memLayer.ML.setRSV(redKey, $"Inizio SPLIT-ODL {DateTime.Now}", 300);
// calcolo la qta da gestire
int qtyConf = 0;
@@ -1506,6 +1506,11 @@ namespace MapoDb
Thread.Sleep(100);
// chiamo splitOdl
MapoDbObj.taODL.splitODL(currData[0].IdxODL, 0, idxMacchina, currData[0].TCRichAttr, currData[0].PzPallet, $"Nuovo ODL da forceSplitOdl", true, qtyNew);
+ // elimino eventuale ODL precedente...
+ string rKey = memLayer.ML.redHash($"ODL:{idxMacchina}");
+ memLayer.ML.setRSV(rKey, "");
+ // ricalcola ODL macchina
+ var newOdl = currODL(idxMacchina, true);
// attendo 1000 msec
Thread.Sleep(1000);
adesso = DateTime.Now;
@@ -1531,35 +1536,9 @@ namespace MapoDb
logger.lg.scriviLog($"Eccezione in forceSplitOdl{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
}
}
- return answ;
- }
-
- ///
- /// Aggiornamento parametro per macchina
- ///
- ///
- /// Parametro macchina come definito in file json
- ///
- ///
- public bool updateMachineParameter(string idxMacchina, string Original_uid, string reqValue)
- {
- bool answ = false;
- // recupero items...
- List dcList = getCurrObjItems(idxMacchina);
- // cerco quello da aggiornare
- objItem trovato = dcList.Find(obj => obj.uid == Original_uid);
- List list2Update = new List();
- // se trovato procedo
- if (trovato != null)
+ else
{
- // aggiorno valore richiesto + dt richiesta
- trovato.reqValue = reqValue;
- trovato.lastRequest = DateTime.Now;
- list2Update.Add(trovato);
- upsertCurrObjItems(idxMacchina, list2Update);
- // accodo in task 2 exe la richiesta di processing
- addTask4Machine(idxMacchina, taskType.setParameter, trovato.uid);
- answ = true;
+ logger.lg.scriviLog($"VETO ATTIVO | Richiesto forceSplitOdl per impianto {idxMacchina} | impossibile procedere");
}
return answ;
}
@@ -3344,6 +3323,36 @@ namespace MapoDb
return answ;
}
+ ///
+ /// Aggiornamento parametro per macchina
+ ///
+ ///
+ /// Parametro macchina come definito in file json
+ ///
+ ///
+ public bool updateMachineParameter(string idxMacchina, string Original_uid, string reqValue)
+ {
+ bool answ = false;
+ // recupero items...
+ List dcList = getCurrObjItems(idxMacchina);
+ // cerco quello da aggiornare
+ objItem trovato = dcList.Find(obj => obj.uid == Original_uid);
+ List list2Update = new List();
+ // se trovato procedo
+ if (trovato != null)
+ {
+ // aggiorno valore richiesto + dt richiesta
+ trovato.reqValue = reqValue;
+ trovato.lastRequest = DateTime.Now;
+ list2Update.Add(trovato);
+ upsertCurrObjItems(idxMacchina, list2Update);
+ // accodo in task 2 exe la richiesta di processing
+ addTask4Machine(idxMacchina, taskType.setParameter, trovato.uid);
+ answ = true;
+ }
+ return answ;
+ }
+
///
/// Effettua UPSERT elenco parametri correnti x IOB (se c'è UPDATE, se manca ADD)
///