aggiunta migratione e corretto servizio per selezione conto
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,22 @@
|
|||||||
|
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_20251121183801 extends BaseMigration implements MigrationModelInterface {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void up() throws Exception {
|
||||||
|
if (isHistoryDB())
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!isCustomer(IntegryCustomer.Materica) && !isCustomer(IntegryCustomer.Ime)) return;
|
||||||
|
updateSetupValue("CRM", "COD_CCON", "PREFISSO_I", "105000");
|
||||||
|
updateSetupValue("CRM", "COD_CCON", "DEFAULT", "111000");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void down() throws Exception {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -374,7 +374,7 @@ public class CRMUtility {
|
|||||||
gtbAnag.setCodAnag(codAnag);
|
gtbAnag.setCodAnag(codAnag);
|
||||||
gtbAnag.setOperation(OperationType.INSERT);
|
gtbAnag.setOperation(OperationType.INSERT);
|
||||||
|
|
||||||
CtbAnag ctbAnag = new CtbAnag().setCodCcon(getCodCcon(conn));
|
CtbAnag ctbAnag = new CtbAnag().setCodCcon(getCodCcon(codAnag, conn));
|
||||||
ctbAnag.setOperation(OperationType.INSERT);
|
ctbAnag.setOperation(OperationType.INSERT);
|
||||||
gtbAnag.setCtbAnag(ctbAnag);
|
gtbAnag.setCtbAnag(ctbAnag);
|
||||||
|
|
||||||
@@ -545,14 +545,14 @@ public class CRMUtility {
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getCodCcon(Connection conn) throws Exception {
|
private static String getCodCcon(String codAnag, Connection conn) throws Exception {
|
||||||
String codCcon;
|
String codCcon;
|
||||||
|
String prefissoCodAnag = (UtilityString.isNullOrEmpty(codAnag) || codAnag.length() < 1) ? "" : codAnag.substring(0, 1);
|
||||||
String sql = "SELECT value\n" +
|
String sql = "SELECT value\n" +
|
||||||
"FROM stb_gest_setup\n" +
|
"FROM stb_gest_setup\n" +
|
||||||
"WHERE gest_name = 'CRM'\n" +
|
"WHERE gest_name = 'CRM'\n" +
|
||||||
" AND section = 'COD_CCON'\n" +
|
" AND section = 'COD_CCON'\n" +
|
||||||
" AND key_section = 'PREFISSO_I'";
|
" AND key_section = 'PREFISSO_" + prefissoCodAnag + "'";
|
||||||
|
|
||||||
codCcon = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(conn, sql);
|
codCcon = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(conn, sql);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user