Merge branch 'master' into feature/RefactoringGestioneColli
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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_20251110111625 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetupQuery(null, null, "SELECT '1|Prezzo netto d''acquisto e ricalcola il prezzo di vendita (Ricarica fissa)' UNION SELECT '2|Prezzo netto d''acquisto e ricalcola ricarica (Prezzo di vendita fisso)' UNION SELECT '3|Prezzo netto d''acquisto e prezzo di vendita da prezzo lordo d''acquisto (Ricalcola ricarica)' UNION SELECT '4|Prezzo netto d''acquisto e ricalcola il prezzo di vendita (Ricarica fissa da Testata listino)' UNION SELECT '5|Prezzo netto d''acquisto, prezzo di vendita e ricarica fissa (Non ricalcolare prezzo)' UNION SELECT '6|Prezzo netto d''acquisto, prezzo di vendita = Prezzo Vendita Suggerito' UNION SELECT '7|Non ricalcolare il prezzo' ");
|
||||
createSetup("VTB_LIST", "LISV4LISA", "CALC_PRZ_BASE", null,
|
||||
"SELEZIONARE IL CRITERIO DI CALCOLO DEL PREZZO BASE", false, null, false, false,
|
||||
false, false, false, null, false, "SELECT '1|Prezzo netto d''acquisto e ricalcola il prezzo di vendita (Ricarica fissa)' UNION SELECT '2|Prezzo netto d''acquisto e ricalcola ricarica (Prezzo di vendita fisso)' UNION SELECT '3|Prezzo netto d''acquisto e prezzo di vendita da prezzo lordo d''acquisto (Ricalcola ricarica)' UNION SELECT '4|Prezzo netto d''acquisto e ricalcola il prezzo di vendita (Ricarica fissa da Testata listino)' UNION SELECT '5|Prezzo netto d''acquisto, prezzo di vendita e ricarica fissa (Non ricalcolare prezzo)' UNION SELECT '6|Prezzo netto d''acquisto, prezzo di vendita = Prezzo Vendita Suggerito' UNION SELECT '7|Non ricalcolare il prezzo' ");
|
||||
if (isCustomer(IntegryCustomer.Carelli))
|
||||
updateSetupValue("VTB_LIST", "LISV4LISA", "CALC_PRZ_BASE","1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
import it.integry.ems_model.entity.StbGestSetup;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityList;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class Migration_20251110184508 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
String sql = "SELECT DISTINCT wgsu.gest_name, wgsu.section, wgsu.key_section, 'S' AS flag_setup_user_web\n" +
|
||||
"FROM wtb_gest_setup_user wgsu\n" +
|
||||
"WHERE NOT EXISTS(SELECT sgs.gest_name, sgs.section, sgs.key_section\n" +
|
||||
" FROM stb_gest_setup sgs\n" +
|
||||
" WHERE wgsu.gest_name = sgs.gest_name\n" +
|
||||
" AND wgsu.section = sgs.section\n" +
|
||||
" AND wgsu.key_section = sgs.key_section)";
|
||||
|
||||
List<StbGestSetup> stbGestSetupsToCreate = UtilityDB.executeSimpleQueryDTO(connection, sql, StbGestSetup.class);
|
||||
|
||||
if (UtilityList.isNullOrEmpty(stbGestSetupsToCreate)) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (StbGestSetup stbGestSetup : stbGestSetupsToCreate) {
|
||||
stbGestSetup.setOperation(OperationType.INSERT);
|
||||
|
||||
stbGestSetup.manageWithParentConnection(connection);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -1224,10 +1224,10 @@ public class OrderImportService {
|
||||
List<VtbClie> listClie = new ArrayList<VtbClie>();
|
||||
findCodificaNazione(data.getCountryCode());
|
||||
anag.setPrecode(codAnagPrecode);
|
||||
anag.setRagSoc(data.getCompanyName().toUpperCase());
|
||||
anag.setIndirizzo(data.getAddress().toUpperCase());
|
||||
anag.setCap(data.getPostalCode().toUpperCase());
|
||||
anag.setCitta(data.getCity().toUpperCase());
|
||||
anag.setRagSoc(UtilityString.left(data.getCompanyName().toUpperCase(), 40));
|
||||
anag.setIndirizzo(UtilityString.left(data.getAddress().toUpperCase(), 255));
|
||||
anag.setCap(UtilityString.left(data.getPostalCode().toUpperCase(), 10));
|
||||
anag.setCitta(UtilityString.left(data.getCity().toUpperCase(), 30));
|
||||
anag.setNazione(mapNazioni.get(data.getCountryCode()));
|
||||
anag.setOperation(OperationType.INSERT);
|
||||
VtbClie clie = new VtbClie();
|
||||
|
||||
@@ -57,7 +57,12 @@ public class Lisv4LisaService {
|
||||
HashMap<String, String> setupSection = setupGest.getSetupSection(multiDBTransactionManager.getPrimaryConnection(), type, format);
|
||||
String emailForLog = setupSection.get("EMAIL_FOR_LOG");
|
||||
try {
|
||||
|
||||
if (lisv4LisaDTO.getCalcPrzBase() == null) {
|
||||
if (setupSection.get("CALC_PRZ_BASE") != null) {
|
||||
lisv4LisaDTO.setCalcPrzBase(setupSection.get("CALC_PRZ_BASE"));
|
||||
} else
|
||||
throw new Exception("Non è stato definito il criterio di attribuzione del prezzo base");
|
||||
}
|
||||
if (lisv4LisaDTO.getDataValidita() == null) {
|
||||
LocalDate today = UtilityLocalDate.getNow();
|
||||
Integer versione = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(),
|
||||
|
||||
@@ -318,6 +318,8 @@ public class SystemService {
|
||||
} else {
|
||||
foundUser = userCacheService.retrieveUser(dbName, username, password, requestDataDTO.getApplication());
|
||||
}
|
||||
if (foundUser != null && !profileDB.equalsIgnoreCase(foundUser.getProfileDb()))
|
||||
foundUser.setProfileDb(profileDB);
|
||||
} else {
|
||||
List<String> profiles = userCacheService.retrieveProfilesOfUser(username, password, requestDataDTO.getApplication());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user