allineamento query setup
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20240408145448 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetupQuery("A_C",null,"SELECT 'A|Anagrafica' UNION ALL SELECT 'C|Consumi'", true);
|
||||
createSetupQuery("ACTIVITY_TYPE","Tipo attività","select activity_type_id from stb_activity_type where flag_tipologia = 'A' and flag_attiva = 'S'", true);
|
||||
createSetupQuery("ATTACH_LIBERI","Allegati liberi","SELECT stb_files_attached.id_attach, stb_files_attached.file_name, stb_files_attached.user_name, stb_files_attached.description, stb_files_attached.datetime_attach, stb_files_attached.file_size FROM stb_files_attached LEFT OUTER JOIN mrl_partita_mag_attached ON stb_files_attached.id_attach = mrl_partita_mag_attached.id_attach LEFT OUTER JOIN drl_ord_attached ON stb_files_attached.id_attach = drl_ord_attached.id_attach LEFT OUTER JOIN drl_doc_attached ON stb_files_attached.id_attach = drl_doc_attached.id_attach WHERE stb_files_attached.data_doc IS NULL AND stb_files_attached.num_doc IS NULL AND parent_id_attach IS NULL AND mrl_partita_mag_attached.id_attach IS NULL AND mrl_partita_mag_attached.id_attach IS NULL AND mrl_partita_mag_attached.id_attach IS NULL AND flag_lock = 'N' AND file_size > 0 ORDER BY stb_files_attached.file_name", true);
|
||||
createSetupQuery("COD_ALIQ","Aliquota","SELECT cod_aliq FROM gtb_aliq ORDER BY 1", true);
|
||||
createSetupQuery("COD_ANAG_CLIE","Cod. cliente","SELECT gtb_anag.cod_anag FROM gtb_anag INNER JOIN vtb_clie ON gtb_anag.cod_anag = vtb_clie.cod_anag AND vtb_clie.flag_stato = 'A' ORDER BY 1", true);
|
||||
createSetupQuery("COD_ANAG_FORN","Cod. fornitore","SELECT gtb_anag.cod_anag FROM gtb_anag INNER JOIN atb_forn ON gtb_anag.cod_anag = atb_forn.cod_anag AND atb_forn.flag_stato = 'A' ORDER BY 1", true);
|
||||
createSetupQuery("COD_ATIP","Tipo fornitore","SELECT cod_atip FROM atb_tipi ORDER BY 1", true);
|
||||
createSetupQuery("COD_CCAU","Causale contabile","SELECT cod_ccau FROM ctb_caus ORDER BY 1", true);
|
||||
createSetupQuery("COD_DTIP","Tipo Doc.","SELECT cod_dtip FROM dtb_tipi order by 1", true);
|
||||
createSetupQuery("COD_DTIP_A","Tipo Doc. Acq.","select cod_dtip from dtb_tipi where gestione = 'A' order by 1", true);
|
||||
createSetupQuery("COD_DTIP_L","Tipo Doc. Lav.","select cod_dtip from dtb_tipi where gestione = 'L' order by 1", true);
|
||||
createSetupQuery("COD_DTIP_L_CAR",null,"SELECT cod_dtip FROM dtb_tipi WHERE gestione = 'L' AND ( segno_qta_car > 0 OR segno_qta_scar < 0 )", true);
|
||||
createSetupQuery("COD_DTIP_L_SCAR",null,"SELECT cod_dtip FROM dtb_tipi WHERE gestione = 'L' AND ( segno_qta_car < 0 or segno_qta_scar > 0 )", true);
|
||||
createSetupQuery("COD_DTIP_V","Selezione tipo documento di vendita","select cod_dtip from dtb_tipi where gestione = 'V' and tipo_emissione = 'DIRETTA' order by 1", true);
|
||||
createSetupQuery("COD_JCOM","Commessa","SELECT cod_jcom FROM jtb_comt ORDER BY 1", true);
|
||||
createSetupQuery("COD_JFAS","Cod. fase","SELECT cod_jfas FROM jtb_fasi WHERE flag_attivo = 'S' ORDER BY 1", true);
|
||||
createSetupQuery("COD_JFLAV",null,"select cod_jflav from jtb_flav", true);
|
||||
createSetupQuery("COD_MDEP","Tutti i depositi","SELECT cod_mdep FROM mtb_depo ORDER BY 1", true);
|
||||
createSetupQuery("COD_MGRP","Gruppi merceologici","select cod_mgrp from mtb_grup", true);
|
||||
createSetupQuery("COD_PAGA","Tipo pagamento","SELECT cod_paga FROM gtb_paga WHERE flag_attivo = 'S' ORDER BY 1", true);
|
||||
createSetupQuery("COD_SPES","Cod. spesa","SELECT cod_spes FROM gtb_spes ORDER BY 1", true);
|
||||
createSetupQuery("COD_VAGE",null,"select cod_vage + '|'+ cod_vage + ' - ' + rag_soc from vtb_agen where data_fine_rap is null order by rag_soc", true);
|
||||
createSetupQuery("COD_VLIS",null,"SELECT cod_vlis FROM vtb_list WHERE flag_attivo = 'S'", true);
|
||||
createSetupQuery("COD_VVET",null,"select cod_vvet + '|'+rag_soc from vtb_vett", true);
|
||||
createSetupQuery("EQUI_PREZZO_VEN",null,"SELECT 'N|NON EQUIVALENTE NEL PREZZO' UNION ALL SELECT 'B|EQUIVALENTE NEL PREZZO BASE' UNION ALL SELECT 'V|EQUIVALENTE NEL PREZZO DI VENDITA' UNION ALL SELECT 'R|EQUIVALENTE NEL RICARICO' UNION ALL SELECT 'P|EQUIVALENTE NEL RICARICO E PREZZO DI VENDITA' UNION ALL SELECT 'T|EQUIVALENTE NEL PREZZO BASE, RICARICO E PREZZO DI VENDITA'", true);
|
||||
createSetupQuery("FLAG_3_STATI","flag con tre stati","SELECT 0 UNION ALL SELECT 1 UNION ALL SELECT 2", true);
|
||||
createSetupQuery("GRIGLIA_AGENTI",null,"SELECT DISTINCT cod_vage FROM vtb_agen_group", true);
|
||||
createSetupQuery("GRUPPI_UTENTI_W",null,"SELECT key_group, UPPER(user_group) FROM wtb_user_groups ORDER BY key_group", true);
|
||||
createSetupQuery("I_P",null,"SELECT 'I|INSERISCI' UNION ALL SELECT 'P|STAMPA'", true);
|
||||
createSetupQuery("LOAD_BOLLE_DESC",null,"select 'D|DATI DESTINATARIO' UNION ALL select 'O|ORDINE INTERNO + ORDINE CLIENTE'", true);
|
||||
createSetupQuery("MEZZO",null,"select mezzo from gtb_mezzo", true);
|
||||
createSetupQuery("PORTO",null,"select porto from gtb_porto", true);
|
||||
createSetupQuery("PRINTER_NAME","Nome stampante","SELECT name FROM stb_printers order by 1", true);
|
||||
createSetupQuery("PROCESSO",null,"select activity_type_id FROM stb_activity_type WHERE flag_attiva = 'S' AND flag_tipologia = 'P'", true);
|
||||
createSetupQuery("REPORT_NAME","Nome report","SELECT report_name FROM wtb_jrept ORDER BY 1", true);
|
||||
createSetupQuery("SI_NO","Flag S/N","SELECT 'S' UNION ALL SELECT 'N'", true);
|
||||
createSetupQuery("SIGNUP_MODE",null,"select 'MAILONLY', 'MAILONLY' UNION ALL SELECT 'CODANAG_PARTIVA', 'CODANAG_PARTIVA' UNION ALL SELECT 'REGISTRAZIONE_CLIENTI', 'REGISTRAZIONE_CLIENTI'", true);
|
||||
createSetupQuery("STATO_COMMESSA","Stato commessa","SELECT stato_commessa FROM jtb_com_stato WHERE flag_attivo = 'S' ORDER BY 1", true);
|
||||
createSetupQuery("STORED_PROCEDUR",null,"SELECT name FROM SYSOBJECTS WHERE XTYPE = 'p' AND category = 0 order BY name", true);
|
||||
createSetupQuery("TIPI_DEPO","Tipi deposito","SELECT cod_tipo_depo FROM mtb_depo_tipi", true);
|
||||
createSetupQuery("TIPO_CALC_TRASP",null,"SELECT 'PESO' UNION ALL SELECT 'COLLI'", true);
|
||||
createSetupQuery("TRUE_FALSE",null,"SELECT 'true' union all select 'false'", true);
|
||||
createSetupQuery("UNITA_MISURA",null,"select unt_mis from mtb_unt_mis where flag_attivo = 'S'", true);
|
||||
createSetupQuery("VAL_SCARICHI",null,"SELECT 'C|Costo ultimo' UNION ALL SELECT 'V|Valore vendita'", true);
|
||||
createSetupQuery("VAR_CAMPI_LIBER",null,"SELECT 'P|POSIZIONE ARTICOLO' UNION ALL SELECT 'M|MEDIA SETTIMANALE VENDITE'", true);
|
||||
createSetupQuery("YES_NO","","SELECT 'Yes' UNION SELECT 'No'", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user