Cambio modalità reinvio (meno pezzi...)

This commit is contained in:
Samuele E. Locatelli
2019-12-16 19:53:01 +01:00
parent dd795578bb
commit bd1df470ee
3 changed files with 12 additions and 9 deletions
+10 -4
View File
@@ -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;
}
+1 -4
View File
@@ -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;
}
}
}
Vendored
+1 -1
View File
@@ -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'