Merge remote-tracking branch 'origin/develop' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit

This commit is contained in:
2025-09-24 11:29:33 +02:00
2 changed files with 28 additions and 24 deletions

View File

@@ -15,7 +15,7 @@ public class Migration_20250923171606 extends BaseMigration implements Migration
executeStatement("alter table dbo.wtb_depo add default_depo tinyint not null default 0",
"create unique index ux_wtb_depo_depo_default_utente\n" +
" on dbo.wtb_depo (user_name)\n" +
" where dbo.wtb_depo.default_depo = 1");
" where default_depo = 1");
if (isCustomerDb(IntegryCustomerDB.Biolevante_Biolevante)){
executeStatement("update wtb_depo set default_depo = 1 where cod_mdep = '01'");

View File

@@ -106,33 +106,37 @@ public class DocumentiDirettiService {
entityList.addAll(mtbLisaCostoData);
}
List<EntityBase> entityRet = entityProcessor.processEntityList(entityList, true);
UtilityEntity.throwEntitiesException(entityRet);
try {
List<EntityBase> entityRet = entityProcessor.processEntityList(entityList, true);
UtilityEntity.throwEntitiesException(entityRet);
boolean salvaImballiAttiva = setupGest.getSetupBoolean("DTB_DOCT", "FATTURA_PEDANE", "ATTIVA");
boolean salvaImballiAttiva = setupGest.getSetupBoolean("DTB_DOCT", "FATTURA_PEDANE", "ATTIVA");
if (UtilityString.equalsIgnoreCase(gestione, "A")) {
List<MtbLisaCostoData> mtbLisaCostoData = documentService.popolaTabellaCosti(dtbDoct.getCodAnag(),
dtbDoct.getCodDtip(),
dtbDoct.getDataDoc(),
dtbDoct.getSerDoc(),
dtbDoct.getNumDoc(), false, false);
if (mtbLisaCostoData != null) {
entityRet = entityProcessor.processEntityList(mtbLisaCostoData, true);
UtilityEntity.throwEntitiesException(entityRet);
if (UtilityString.equalsIgnoreCase(gestione, "A")) {
List<MtbLisaCostoData> mtbLisaCostoData = documentService.popolaTabellaCosti(dtbDoct.getCodAnag(),
dtbDoct.getCodDtip(),
dtbDoct.getDataDoc(),
dtbDoct.getSerDoc(),
dtbDoct.getNumDoc(), false, false);
if (mtbLisaCostoData != null) {
entityRet = entityProcessor.processEntityList(mtbLisaCostoData, true);
UtilityEntity.throwEntitiesException(entityRet);
}
} else if (gestione.equalsIgnoreCase("V") && !UtilityString.isNullOrEmpty(dtbDoct.getCodFornTrasp()) &&
TipoEmissione.valueOf(UtilityHashMap.getValueIfExists(datiTipoDoc, "tipo_emissione")) == TipoEmissione.DIRETTA &&
!dtbDoct.getDtbDocImb().isEmpty() && salvaImballiAttiva) {
DtbDoct dtbDoctSave =
entityRet.stream().filter(x -> x instanceof DtbDoct && ((DtbDoct) x).getCodDtip().equals(dtbDoct.getCodDtip())).map(x -> (DtbDoct) x).findFirst().orElse(null);
saveDocImballi(dtbDoctSave, isInsert);
}
} else if (gestione.equalsIgnoreCase("V") &&
TipoEmissione.valueOf(UtilityHashMap.getValueIfExists(datiTipoDoc, "tipo_emissione")) == TipoEmissione.DIRETTA &&
!dtbDoct.getDtbDocImb().isEmpty() && salvaImballiAttiva) {
DtbDoct dtbDoctSave =
entityRet.stream().filter(x -> x instanceof DtbDoct && ((DtbDoct) x).getCodDtip().equals(dtbDoct.getCodDtip())).map(x -> (DtbDoct) x).findFirst().orElse(null);
saveDocImballi(dtbDoctSave, isInsert);
multiDBTransactionManager.commitAll();
return entityRet;
} catch (Exception e) {
multiDBTransactionManager.rollbackAll();
throw e;
}
multiDBTransactionManager.commitAll();
return entityRet;
}
private DtbDoct checkUDSForTransfer(DtbDoct dtbDoct, List<EntityBase> entityList, boolean isNewDoc) throws Exception {