modifiche a importazione file tuttogelo
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
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;
|
||||
|
||||
public class Migration_20250117100620 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetup("IMPORT_DOCUMENTI", "TUTTOGELO_RIFORD", "ATTIVO", "N",
|
||||
"Inserire S/N per attivare/disattivare il tipo di importazione", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
createSetup("IMPORT_DOCUMENTI", "TUTTOGELO_RIFORD", "EMAIL_FOR_LOG", null,
|
||||
"Inserire il file l'indirizzo email per inviare il log dell'importazione", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
createSetup("IMPORT_DOCUMENTI", "TUTTOGELO_RIFORD", "FILE_FILTER", null,
|
||||
"Inserire il criterio di filtro dei file o il nome del file specifio (seguire la sintassi di java)", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
createSetup("IMPORT_DOCUMENTI", "TUTTOGELO_RIFORD", "GG_CANC_FILE", null,
|
||||
"Giorni per la cancellazione dei file dalla cartella di appoggio", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
createSetup("IMPORT_DOCUMENTI", "TUTTOGELO_RIFORD", "IMPORT_REST", "S",
|
||||
"Inserire S/N per attivare/disattivare il salvataggio con i servizi REST", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
createSetup("IMPORT_DOCUMENTI", "TUTTOGELO_RIFORD", "LISTENING", "N",
|
||||
"Se LISTENIG = 'N' la procedura di importazione non si potrà mai mettere in ascolto sulla directory perchè nella procedura vengono prese in considerazione più file.", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
createSetup("IMPORT_DOCUMENTI", "TUTTOGELO_RIFORD", "PATH_FILE", null,
|
||||
"Directory contente i file da importare.", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
createSetup("IMPORT_DOCUMENTI", "TUTTOGELO_RIFORD", "PATH_FILE_IMPORTED", null,
|
||||
"Directory dove vengono spostati i file dopo l'importazione.", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
|
||||
createSetup("IMPORT_DOCUMENTI", "TUTTOGELO_RIFORD", "TIPI_DOCUMENTO", null,
|
||||
"Tipi documento su cui assegnare i riferimenti.", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
|
||||
createSetup("IMPORT_DOCUMENTI", "TUTTOGELO_RIFORD", "PARTITA_IVA", null,
|
||||
"Partita Iva del fornitore.", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
|
||||
createSetup("IMPORT_DOCUMENTI", "TUTTOGELO_RIFORD", "USE_PART_IVA_AZIENDA", "S",
|
||||
"Usa partita iva per riconoscere l'azienda.", false, "SI_NO", false, false,
|
||||
false, false, false, null, false, null);
|
||||
|
||||
if (!isCustomerDb(IntegryCustomerDB.Carelli_Carelli)) return;
|
||||
|
||||
updateSetupValue("IMPORT_DOCUMENTI", "TUTTOGELO_RIFORD", "TIPI_DOCUMENTO", "BA|BA1|FTIA|FRCDF|FAD" );
|
||||
updateSetupValue("IMPORT_DOCUMENTI", "TUTTOGELO_RIFORD", "ATTIVO", "S" );
|
||||
updateSetupValue("IMPORT_DOCUMENTI", "TUTTOGELO_RIFORD", "LISTENING", "S" );
|
||||
updateSetupValue("IMPORT_DOCUMENTI", "TUTTOGELO_RIFORD", "PARTITA_IVA", "04741490728" );
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
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;
|
||||
|
||||
public class Migration_20250117104057 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isCustomerDb(IntegryCustomerDB.Carelli_Carelli) || isCustomerDb(IntegryCustomerDB.Carelli_GestFood) || isCustomerDb(IntegryCustomerDB.Carelli_Panimal)) {
|
||||
executeStatement("\n" +
|
||||
"insert into mtb_depo_intercode(cod_forn, intercode, cod_mdep)\n" +
|
||||
"select gtb_anag.cod_anag, mtb_depo.cod_mdep, mtb_depo.cod_mdep\n" +
|
||||
"from gtb_anag inner join atb_forn on gtb_anag.cod_anag = atb_forn.cod_anag\n" +
|
||||
"cross apply (select * from mtb_depo where mtb_depo.flag_movimentabile = 's' and cod_vlis is not null) mtb_depo\n" +
|
||||
"where gtb_anag.part_iva = '04741490728' and \n" +
|
||||
"atb_forn.flag_stato = 'A'\n" +
|
||||
"and not exists(select * from mtb_depo_intercode where mtb_depo.cod_mdep = mtb_depo_intercode.cod_mdep and gtb_anag.cod_anag = mtb_depo_intercode.cod_forn )");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -160,6 +160,7 @@ public class DocumentiImporter extends BaseEntityImporter<List<EntityBase>> impl
|
||||
break;
|
||||
case APULIA_RIFORD:
|
||||
case PAZIENZA_RIFORD:
|
||||
case TUTTOGELO_RIFORD:
|
||||
entities = getContextBean(DocumentiAcquistoImportService.class)
|
||||
.importApuliaRifOrd(type, format, requestDto, anomalie, headless);
|
||||
break;
|
||||
@@ -238,6 +239,7 @@ public class DocumentiImporter extends BaseEntityImporter<List<EntityBase>> impl
|
||||
GELORENT("GELORENT"),
|
||||
APULIA_RIFORD("APULIA_RIFORD"),
|
||||
PAZIENZA_RIFORD("PAZIENZA_RIFORD"),
|
||||
TUTTOGELO_RIFORD("TUTTOGELO_RIFORD"),
|
||||
CASSETTO_FISCALE("CASSETTO_FISCALE"),
|
||||
TESI("TESI"),
|
||||
FILCONAD("FILCONAD");
|
||||
|
||||
@@ -1027,6 +1027,11 @@ public class DocumentiAcquistoImportService {
|
||||
HashMap<String, Object> result = UtilityDB.executeSimpleQueryOnlyFirstRow(connection, sql);
|
||||
|
||||
if (result == null) {
|
||||
sql =
|
||||
Query.format("SELECT CAST(count(*) as bit) FROM mtb_depo WHERE cod_mdep = %s", rifOrdApulia.getCodicePv());
|
||||
|
||||
|
||||
|
||||
anomalie.add(
|
||||
AnomalieDTO.info(String.format("Nessun deposito agganciato all'intercode %s", rifOrdApulia.getCodicePv()))
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user