Modifica export ordini EURITMO
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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_20241021161628 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (!isCustomerDb(IntegryCustomerDB.DolceBonta_DolceBo))
|
||||
return;
|
||||
|
||||
createSetup("EXPORT_ORDINI VENDITA", "EURITMO", "EAN_CLIENTE_ID_01390", "ZZ",
|
||||
null, false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
createSetup("EXPORT_ORDINI VENDITA", "EURITMO", "EAN_CLIENTE_ID_01600", "EN",
|
||||
null, false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -33,7 +33,7 @@ public class EuritmoOrdiniExportService extends BaseExportService {
|
||||
List<String> records = new ArrayList<String>();
|
||||
EntityExportResponse<List<File>> response = new EntityExportResponse<List<File>>();
|
||||
response.setResponse(new ArrayList<File>());
|
||||
String recordDTM = null;
|
||||
String recordDTM = null, codiceEan = null;
|
||||
|
||||
Map<String, String> setupGestMap = setupGest.getExportSetupSection(multiDBTransactionManager.getPrimaryConnection(), exporter.getType(), exporter.getFormat());
|
||||
String eanAzienda = setupGestMap.get(SetupGestKeySection.EAN_AZIENDA);
|
||||
@@ -78,6 +78,15 @@ public class EuritmoOrdiniExportService extends BaseExportService {
|
||||
|
||||
for (EuritmoTestataOrd testata : testate) {
|
||||
String eanCliente = setupGestMap.get("EAN_CLIENTE_" + testata.getCodAnag());
|
||||
String idCliente = UtilityString.streNull(setupGestMap.get("EAN_CLIENTE_ID_" + testata.getCodAnag()));
|
||||
|
||||
if (idCliente.equals("EN")){
|
||||
codiceEan = eanCliente.substring(0,7);
|
||||
} else if (idCliente.equals("ZZ")){
|
||||
codiceEan = eanCliente;
|
||||
} else {
|
||||
throw new Exception("Configurazione EAN_CLIENTE_ID non presente");
|
||||
}
|
||||
|
||||
// Creazione RECORD BGM
|
||||
String recordBGM =
|
||||
@@ -85,8 +94,8 @@ public class EuritmoOrdiniExportService extends BaseExportService {
|
||||
UtilityString.FillString(eanAzienda, ' ', 35, "R") +
|
||||
UtilityString.FillString("ZZ" , ' ', 4, "R") +
|
||||
UtilityString.FillString("" , ' ', 14, "R") +
|
||||
UtilityString.FillString(eanCliente.substring(0,7) , ' ', 35, "R") +
|
||||
UtilityString.FillString("EN" , ' ', 4, "R") +
|
||||
UtilityString.FillString(codiceEan , ' ', 35, "R") +
|
||||
UtilityString.FillString(idCliente , ' ', 4, "R") +
|
||||
UtilityString.FillString("" , ' ', 14, "R") +
|
||||
UtilityString.FillString("ORDRSP" , ' ', 6, "R") +
|
||||
UtilityString.FillString(testata.getNumDoc() , ' ', 35, "R") +
|
||||
|
||||
Reference in New Issue
Block a user