modifiche su slim

This commit is contained in:
2025-09-15 09:09:54 +02:00
parent e570b32e05
commit b902879a26
3 changed files with 410 additions and 449 deletions

View File

@@ -0,0 +1,28 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomer;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20250912152309 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createSetupQuery("SI_NO", "SI_NO", "SELECT 'S' UNION ALL SELECT 'N'");
createSetup("w_ddocu_rc", "SETUP", "INVIO_EMAIL", "N",
"Attiva invio email direttamente dalla gestione", false, "SI_NO", false, false,
false, false, false, null, false, "SELECT 'S' UNION ALL SELECT 'N'");
if (isCustomer(IntegryCustomer.RossoGargano))
updateSetupValue("w_ddocu_rc", "SETUP", "INVIO_EMAIL", "S");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -43,7 +43,7 @@ public class Slim2kLogisticController {
try { try {
multiDBTransactionManager.setPrimaryDB(configuration); multiDBTransactionManager.setPrimaryDB(configuration);
logger.debug(requestDataDTO.getUsername() + " " + requestDataDTO.getPassword() + " " + requestDataDTO.getProfileDB()); logger.debug(requestDataDTO.getUsername() + " " + requestDataDTO.getPassword() + " " + requestDataDTO.getProfileDB());
list = slim2kLogisticService.importListeDiScarico(listType, listCode); list.add(ServiceRestResponse.createEntityPositiveResponse(slim2kLogisticService.importListeDiScarico(listType, listCode)));
} catch (Exception e) { } catch (Exception e) {
logger.error(request.getRequestURI(), e); logger.error(request.getRequestURI(), e);
list.add(new ServiceRestResponse(EsitoType.KO, configuration, e)); list.add(new ServiceRestResponse(EsitoType.KO, configuration, e));
@@ -63,9 +63,8 @@ public class Slim2kLogisticController {
@RequestParam(value = "doctype", required = false) String doctype) { @RequestParam(value = "doctype", required = false) String doctype) {
List<ServiceRestResponse> list = new ArrayList<ServiceRestResponse>(); List<ServiceRestResponse> list = new ArrayList<ServiceRestResponse>();
try { try {
multiDBTransactionManager.setPrimaryDB(configuration);
logger.debug(requestDataDTO.getUsername() + " " + requestDataDTO.getPassword() + " " + requestDataDTO.getProfileDB()); logger.debug(requestDataDTO.getUsername() + " " + requestDataDTO.getPassword() + " " + requestDataDTO.getProfileDB());
list = slim2kLogisticService.importListeDiCarico(scode, dcode, docdate, docnum, refdoc); list.add(ServiceRestResponse.createEntityPositiveResponse(slim2kLogisticService.importListeDiCarico(scode, dcode, docdate, docnum, refdoc)));
} catch (Exception e) { } catch (Exception e) {
logger.error(request.getRequestURI(), e); logger.error(request.getRequestURI(), e);
list.add(new ServiceRestResponse(EsitoType.KO, configuration, e)); list.add(new ServiceRestResponse(EsitoType.KO, configuration, e));