Attivazione nuova gestione produzione

This commit is contained in:
2025-11-18 17:26:52 +01:00
parent 71ffc5b4cf
commit 8fe752e595

View File

@@ -1,15 +1,33 @@
package it.integry.ems.migration.model;import it.integry.ems.migration._base.BaseMigration; package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomerDB;
import it.integry.ems.migration._base.MigrationModelInterface; import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251117170957 extends BaseMigration implements MigrationModelInterface{ public class Migration_20251117170957 extends BaseMigration implements MigrationModelInterface {
@Override @Override
public void up()throws Exception { public void up() throws Exception {
if(isHistoryDB()) if (isHistoryDB())
return; return;
if (!isCustomerDb(IntegryCustomerDB.Gramm_Gramm))
return;
executeStatement("update stb_gest_setup set value = 'S' where gest_name = 'DTB_ORDT' and key_section in ('NUOVA_PROCEDURA','DISABLE_TRIGGER_ORDL')");
executeStatement("update stb_gest_sync set syncronize = 'R' where gest_name like 'lord%'");
executeStatement("update stb_gest_sync set syncronize = 'R' where gest_name like 'pord%'");
executeStatement("insert into stb_abil \n" +
"select case when gest_name = 'lordi' then 'LG081' else 'AG031' end , user_name, 'S', case when gest_name = 'lordi' then 'lordi_tab' else 'pordi_tab' end from stb_abil \n" +
"where gest_name in ('lordi','pordi') and case when gest_name = 'lordi' then 'LG081' else 'AG031' end + user_name not in (select cod_opz + user_name from stb_abil where cod_opz in ('LG081','AG031'))");
executeStatement("update stb_abil set flag_abil = 'N' where gest_name in ('lordi','pordi')");
} }
@Override @Override
public void down()throws Exception { public void down() throws Exception {
} }
} }