diff --git a/Jenkinsfile b/Jenkinsfile index 318049ec..098642a6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=1284']) { + withEnv(['NEXT_BUILD_NUMBER=1286']) { // 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' @@ -49,18 +49,14 @@ pipeline { /* compilo installers in base al BRANCH del cliente... */ if (env.BRANCH_NAME == "develop") { parallel ( - ADM_IO: { - sleep 2 + ADM_IO_MON: { bat "\"${tool 'MSBuild-15.0'}\" MP-ADM/MP-ADM.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m" bat "\"${tool 'MSBuild-15.0'}\" MP-IO/MP-IO.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m" - }, - LAND_MON: { - sleep 4 - bat "\"${tool 'MSBuild-15.0'}\" MP-LAND/MP-LAND.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m" bat "\"${tool 'MSBuild-15.0'}\" MP-MON/MP-MON.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m" }, - SITE_TAB: { - sleep 0 + LAND_SITE_TAB: { + sleep 2 + bat "\"${tool 'MSBuild-15.0'}\" MP-LAND/MP-LAND.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m" bat "\"${tool 'MSBuild-15.0'}\" MP-SITE/MP-SITE.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m" bat "\"${tool 'MSBuild-15.0'}\" MP-TAB/MP-TAB.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m" }, diff --git a/MapoDb/MapoDb.cs b/MapoDb/MapoDb.cs index cc59011a..dff798f1 100644 --- a/MapoDb/MapoDb.cs +++ b/MapoDb/MapoDb.cs @@ -180,6 +180,7 @@ namespace MapoDb /// private void checkCambiaStatoBatch(tipoInputEvento tipoInput, string IdxMacchina, DateTime InizioStato, int IdxTipo, string CodArt, string Value, int MatrOpr, string pallet) { + DS_applicazione.TransizioneStatiDataTable tabTransStati; DS_applicazione.TransizioneStatiRow rigaTransStati; switch (tipoInput) { @@ -187,13 +188,21 @@ namespace MapoDb // effettuo cambio stato INDIPENDENTEMENTE da stato precedente try { - rigaTransStati = taTranSt.GetUserForcedTransitions(IdxMacchina, IdxTipo)[0]; - // solo se cambia stato... - if (rigaTransStati.IdxStato != rigaTransStati.next_IdxStato) + tabTransStati = taTranSt.GetUserForcedTransitions(IdxMacchina, IdxTipo); + if (tabTransStati.Count > 0) { - taDiario.InsStatoBatch(IdxMacchina, InizioStato, rigaTransStati.next_IdxStato, CodArt, Value, MatrOpr, pallet); - // aggiorno MSE - DataLayer.obj.taMSE.forceRecalc(0, IdxMacchina); + rigaTransStati = tabTransStati[0]; + // solo se cambia stato... + if (rigaTransStati.IdxStato != rigaTransStati.next_IdxStato) + { + taDiario.InsStatoBatch(IdxMacchina, InizioStato, rigaTransStati.next_IdxStato, CodArt, Value, MatrOpr, pallet); + // aggiorno MSE + DataLayer.obj.taMSE.forceRecalc(0, IdxMacchina); + } + } + else + { + logger.lg.scriviLog($"Non trovata riga per: BARCODE | IdxMacchina: {IdxMacchina} | InizioStato: {InizioStato} | IdxTipo: {IdxTipo} | CodArt: {CodArt} | Value: {Value} | MatrOpr: {MatrOpr} | pallet: {pallet}", tipoLog.INFO); } } catch (Exception exc) @@ -206,15 +215,23 @@ namespace MapoDb // verifico se ci sia necessità di cambio stato try { - rigaTransStati = taTranSt.GetHwTransitions(IdxMacchina, IdxTipo)[0]; - if (rigaTransStati != null) + tabTransStati = taTranSt.GetHwTransitions(IdxMacchina, IdxTipo); + if (tabTransStati.Count > 0) { - // solo se cambia stato... - if (rigaTransStati.IdxStato != rigaTransStati.next_IdxStato) + rigaTransStati = tabTransStati[0]; + if (rigaTransStati != null) { - taDiario.InsStatoBatch(IdxMacchina, InizioStato, rigaTransStati.next_IdxStato, CodArt, Value, MatrOpr, pallet); + // solo se cambia stato... + if (rigaTransStati.IdxStato != rigaTransStati.next_IdxStato) + { + taDiario.InsStatoBatch(IdxMacchina, InizioStato, rigaTransStati.next_IdxStato, CodArt, Value, MatrOpr, pallet); + } } } + else + { + logger.lg.scriviLog($"Non trovata riga per: HW | IdxMacchina: {IdxMacchina} | InizioStato: {InizioStato} | IdxTipo: {IdxTipo} | CodArt: {CodArt} | Value: {Value} | MatrOpr: {MatrOpr} | pallet: {pallet}", tipoLog.INFO); + } } catch (Exception exc) {