diff --git a/MP-IO/Controllers/IOBController.cs b/MP-IO/Controllers/IOBController.cs
index f2ef9b10..9259f2cc 100644
--- a/MP-IO/Controllers/IOBController.cs
+++ b/MP-IO/Controllers/IOBController.cs
@@ -609,8 +609,8 @@ namespace MP_IO.Controllers
return answ;
}
- /// Creazione nuovo ODL dato CodArt + numPz
- /// GET: IOB/forceCreatePOdl/SIMUL_03?CodArt=ABCD_1234&numPz=5 Creazione nuovo ODL dato CodXdl + numPz
+ /// GET: IOB/forceCreatePOdl/SIMUL_03?CodXdl=ABCD_1234&numPz=5 IdxODL creato
public int forceCreatePOdl(string id, string CodArt, string CodGruppo, int numPz)
@@ -714,16 +714,16 @@ namespace MP_IO.Controllers
}
///
- /// Recupera ArtNum dato CodArt (per impianti che accettano solo INT in scrittura):
+ /// Recupera ArtNum dato CodXdl (per impianti che accettano solo INT in scrittura):
///
- /// GET: IOB/getArtNum/SIMUL_03?CodArt=ABC123
+ /// GET: IOB/getArtNum/SIMUL_03?CodXdl=ABC123
///
/// IdxMacchina (NON considerato)
- /// CodArt richiesto, se vuoto restituisce TUTTI i valori in tabella di decodifica
+ /// CodXdl richiesto, se vuoto restituisce TUTTI i valori in tabella di decodifica
/// Json contenente le righe delle codifiche attive Articolo/Numero
- public string getArtNum(string id,string CodArt = "")
+ public string getArtNum(string id, string CodArt = "")
{
- // iun realtà ID macchina non conta e lo ignoriamo...
+ // in realtà ID macchina non conta e lo ignoriamo...
string answ = "";
// scrivo keep alive!!! (se necessario, altrimenti è in cache...)
MapoDb.MapoDb connDb = new MapoDb.MapoDb();
@@ -740,6 +740,33 @@ namespace MP_IO.Controllers
return answ;
}
+ ///
+ /// Recupera codice numerico ODL/PODL dato CodXdl, in pratica la parte finale SENZA ODL/PODL
+ /// Funzione per impianti che accettano solo INT in scrittura:
+ ///
+ /// GET: IOB/getXdlNum/SIMUL_03?CodXdl=ODL00000123
+ ///
+ /// IdxMacchina (NON considerato)
+ /// CodXdl richiesto, se vuoto restituisce TUTTI i valori in tabella di decodifica
+ /// SINGOLO VALORE calcolato on the fly
+ public string getXdlNum(string id, string CodXdl = "")
+ {
+ // in realtà ID macchina non conta e lo ignoriamo...
+ string answ = "";
+ // scrivo keep alive!!! (se necessario, altrimenti è in cache...)
+ MapoDb.MapoDb connDb = new MapoDb.MapoDb();
+ DataLayer DataLayerObj = new DataLayer();
+ connDb.scriviKeepAlive(id, DateTime.Now);
+ try
+ {
+ // sostituisco PODL/ODL con "" e lascio zero iniziali (conversione INT in IOB)
+ answ = CodXdl.Replace("PODL", "").Replace("ODL", "");
+ }
+ catch
+ { }
+ return answ;
+ }
+
///
/// Recupera elenco articoli USATI:
///