From bd1df470eee9fc6db68693be5b3cd84a6d065628 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 16 Dec 2019 19:53:01 +0100 Subject: [PATCH] =?UTF-8?q?Cambio=20modalit=C3=A0=20reinvio=20(meno=20pezz?= =?UTF-8?q?i...)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IOB-WIN/IobGeneric.cs | 14 ++++++++++---- IOB-WIN/IobSimula.cs | 5 +---- Jenkinsfile | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/IOB-WIN/IobGeneric.cs b/IOB-WIN/IobGeneric.cs index 1b35cbd7..a88fed09 100644 --- a/IOB-WIN/IobGeneric.cs +++ b/IOB-WIN/IobGeneric.cs @@ -980,7 +980,7 @@ namespace IOB_WIN lgInfo("Lettura contapezzi da TCiclo dall'url {0} --> num pz: {1}", urlGetPzCountRec, currServerCount); } // controllo: SE NON HO ODL... - if (lastIdxODL == "" || lastIdxODL == "0") + if (string.IsNullOrEmpty(lastIdxODL) || lastIdxODL == "0") { // NON AGGIORNO contapezzi = lastCountCNC; @@ -988,7 +988,7 @@ namespace IOB_WIN } else { - if (currServerCount != "") + if (!string.IsNullOrEmpty(currServerCount)) { // se "-1" resto a ultimo... if (currServerCount != "-1") @@ -3099,11 +3099,11 @@ namespace IOB_WIN if (enableSendPzCountBlock) { // se รจ abilitata verifico differenza: se ho DELTA > 3 --> invio un blocco <= maxSendPzCountBlock - if (delta > 2) + if (delta > 3) { // init obj display newDisplayData currDispData = new newDisplayData(); - numIncr = delta > maxSendPzCountBlock ? maxSendPzCountBlock : delta - 1; + numIncr = delta > maxSendPzCountBlock + 1 ? maxSendPzCountBlock : delta - 2; // invio il num max di pezzi ammesso in blocco! lgInfo($"Predisposizione chiamata incremento contapezzi in blocco per {numIncr} pezzi"); lastUrl = $"{urlAddPzCount}{numIncr}"; @@ -3355,6 +3355,12 @@ namespace IOB_WIN { lgError($"Eccezione in forceSplitOdl{Environment.NewLine}{exc}"); } + // se fatto --> resetto contapezzi!!! + if (fatto) + { + lastCountCNC = 0; + contapezzi = 0; + } return fatto; } diff --git a/IOB-WIN/IobSimula.cs b/IOB-WIN/IobSimula.cs index 89ad3f5e..c8bbb347 100644 --- a/IOB-WIN/IobSimula.cs +++ b/IOB-WIN/IobSimula.cs @@ -358,13 +358,10 @@ namespace IOB_WIN DateTime inizioOdl = DateTime.Now.AddDays(-1); string rawDataInizio = callUrl(urlInizioOdlIob, true); DateTime.TryParse(rawDataInizio, out inizioOdl); - if (DateTime.Now.Subtract(inizioOdl).TotalMinutes>60) + if (DateTime.Now.Subtract(inizioOdl).TotalMinutes > 60) { // invio reset ODL... forceSplitOdl(); - // resetto i contapezzi! - lastCountCNC = 0; - contapezzi = 0; } } } diff --git a/Jenkinsfile b/Jenkinsfile index e461a795..acf94b83 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=595']) { + withEnv(['NEXT_BUILD_NUMBER=596']) { // env.versionNumber = VersionNumber(versionNumberString : '2.6.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '2.6.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO-IOB-WIN'