diff --git a/Jenkinsfile b/Jenkinsfile index 4a30b593..c0984dbf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=1289']) { + withEnv(['NEXT_BUILD_NUMBER=1290']) { // env.versionNumber = VersionNumber(versionNumberString : '6.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '6.9.${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 a290e0e2..da20b4e6 100644 --- a/MP-IO/Controllers/IOBController.cs +++ b/MP-IO/Controllers/IOBController.cs @@ -705,7 +705,7 @@ namespace MP_IO.Controllers /// public string getCurrODL(string id) { - // attenzione! poiché nell'URL il carattere "#" fiene filtrato ci aspettiamo il carattere "|" che poi trasformiamo ora in "#" + // attenzione! poiché nell'URL il carattere "#" viene filtrato ci aspettiamo il carattere "|" che poi trasformiamo ora in "#" id = id.Replace("|", "#"); string answ = ""; try diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs index 4e6bf2dc..73394bed 100644 --- a/MapoDb/DataLayer.cs +++ b/MapoDb/DataLayer.cs @@ -1038,10 +1038,6 @@ namespace MapoDb { // default: 0, non registrato come cautela... string answ = "0"; - if (qty == null) - { - throw new ArgumentNullException(nameof(qty)); - } // controllo per proseguire if (!string.IsNullOrEmpty(idxMacchina) && !string.IsNullOrEmpty(qty)) { @@ -1054,14 +1050,16 @@ namespace MapoDb var currData = currODLRowTab(idxMacchina); // registro evento 120 --> contapezzi in blocco !!!HARD CODED!!! !!!FIXME!!! int idxEvento = 120; - MapoDb.obj.scriviRigaEventoBarcode(idxMacchina, idxEvento, currData[0].CodArticolo, qty); + // istanziato un NUOVO oggetto x scrivere... + MapoDb connDb = new MapoDb(); + connDb.scriviRigaEventoBarcode(idxMacchina, idxEvento, currData[0].CodArticolo, qty); } // registro in risposta che è andato tutto bene... ovvero la qty richiesta... answ = qty; } else { - string errore = "Errore: mancano parametri macchina/incremento"; + string errore = $"Errore: mancano parametri macchina/incremento: idxMacchina {idxMacchina} | qty {qty}"; logger.lg.scriviLog(errore, tipoLog.ERROR); answ = errore; } @@ -1229,7 +1227,13 @@ namespace MapoDb { if (idxMacchina != "" && currODL != "") { - memLayer.ML.setRSV(currODLHash(idxMacchina), currODL, memLayer.ML.CRI("currOdlCacheDur")); + int currOdlCacheDur = memLayer.ML.CRI("currOdlCacheDur"); + // se ODL fosse 0 USO DURATA CACHE 1/4... + if (currODL == "0") + { + currOdlCacheDur = currOdlCacheDur / 4; + } + memLayer.ML.setRSV(currODLHash(idxMacchina), currODL, currOdlCacheDur); // registro in risposta che è andato tutto bene... answ = "OK"; } @@ -1926,7 +1930,9 @@ namespace MapoDb } else { - answTab = MapoDb.obj.currODLTab(idxMacchina); + // istanzio un NUOVO oggetto lettura + MapoDb connDb = new MapoDb(); + answTab = connDb.currODLTab(idxMacchina); // salvo in redis... rCall = JsonConvert.SerializeObject(answTab); int currOdlRowCacheDur = memLayer.ML.CRI("currOdlRowCacheDur"); @@ -1940,7 +1946,9 @@ namespace MapoDb } else { - answTab = MapoDb.obj.currODLTab(idxMacchina); + // istanzio un NUOVO oggetto lettura + MapoDb connDb = new MapoDb(); + answTab = connDb.currODLTab(idxMacchina); } return answTab; }