diff --git a/Jenkinsfile b/Jenkinsfile index 42853442..a24fa8eb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=1264']) { + withEnv(['NEXT_BUILD_NUMBER=1265']) { // 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 a9a9103d..8d1818c4 100644 --- a/MP-IO/Controllers/IOBController.cs +++ b/MP-IO/Controllers/IOBController.cs @@ -1042,6 +1042,32 @@ namespace MP_IO.Controllers return answ; } /// + /// SALVA in blocco un incremento pezzi x macchina: + /// + /// GET: IOB/savePzCountInc/5?qty=10 + /// + /// + /// codice macchina + /// num peziz da salvare in blocco + /// + public string savePzCountInc(string id, string qty) + { + string answ = ""; + DateTime dataOraEvento = DateTime.Now; + // salvo SEMPRE log x questo tipo di dati! + logger.lg.scriviLog($"Salvataggio incremento contapezzi:{Environment.NewLine}idxMacchina: {id}{Environment.NewLine}pezzi: {qty}", tipoLog.INFO); + try + { + answ = DataLayer.saveCaricoPezzi(id, qty); + } + catch (Exception exc) + { + logger.lg.scriviLog($"Errore in savePzCountInc{Environment.NewLine}{exc}"); + answ = "NO"; + } + return answ; + } + /// /// Salva associazione tra macchina, device IOB chiamante e sue info /// /// Id della macchina diff --git a/MP-LAND/Web.config b/MP-LAND/Web.config index 219824e3..804ab05d 100644 --- a/MP-LAND/Web.config +++ b/MP-LAND/Web.config @@ -58,218 +58,218 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs index 30b78a8a..5d75fb01 100644 --- a/MapoDb/DataLayer.cs +++ b/MapoDb/DataLayer.cs @@ -1003,6 +1003,43 @@ namespace MapoDb return answ; } /// + /// Processa registrazione EVENTO CONTEGGIO PEZZI x una data macchina IOB + /// + /// Macchina + /// Pezzi da registrare + /// + public static string saveCaricoPezzi(string idxMacchina, string qty) + { + // 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)) + { + int numPzIncr = -1; + int.TryParse(qty, out numPzIncr); + // se il conteggio è >= 0 SALVO evento... + if (numPzIncr >= 0) + { + // registro evento 120 --> contapezzi in blocco !!!HARD CODED!!! !!!FIXME!!! + int idxEvento = 120; + MapoDb.obj.scriviRigaEventoBarcode(idxMacchina, idxEvento, "", qty); + } + // registro in risposta che è andato tutto bene... ovvero la qty richiesta... + answ = qty; + } + else + { + string errore = "Errore: mancano parametri macchina/incremento"; + logger.lg.scriviLog(errore, tipoLog.ERROR); + answ = errore; + } + return answ; + } + /// /// Salvataggio su della mappa di memoria dell'IOB x ulteriori impieghi /// ///