[CONSEGNA] Cambiati i tipi indirizzo per le personeRif che devo riceve la bolla firmata e non
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
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.IntegryCustomerDB;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20251111110443 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (isCustomer(IntegryCustomer.Salpar)){
|
||||
executeStatement("INSERT INTO stb_tipi_indirizzi\n" +
|
||||
"VALUES ('PUNTO VENDITA', 'ABRW'),\n" +
|
||||
" ('PUNTO VENDITA', 'ABTW'),\n" +
|
||||
" ('PUNTO VENDITA', 'BAMW'),\n" +
|
||||
" ('PUNTO VENDITA', 'BATW')");
|
||||
|
||||
executeStatement("UPDATE vtb_clie_pers_rif\n" +
|
||||
"SET tipo_indirizzo = 'PUNTO VENDITA'\n" +
|
||||
"WHERE tipo_indirizzo = 'UFFICIO ACQUISTI'");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -2186,7 +2186,7 @@ public class DocumentService {
|
||||
" INNER JOIN stb_tipi_indirizzi ON stb_tipi_indirizzi.tipo_indirizzo = vtb_clie_pers_rif.tipo_indirizzo\n" +
|
||||
"WHERE tipo_documento = %s\n" +
|
||||
" AND cod_anag = %s\n" +
|
||||
" AND stb_tipi_indirizzi.tipo_indirizzo = 'UFFICIO ACQUISTI'\n" +
|
||||
" AND stb_tipi_indirizzi.tipo_indirizzo = 'PUNTO VENDITA'\n" +
|
||||
" AND ((:codVdes IS NULL AND cod_vdes IS NULL) OR (:codVdes IS NOT NULL AND ISNULL(cod_vdes, :codVdes) = :codVdes))",
|
||||
codDtip, printDocumentRequest.getCodAnag()
|
||||
).replace(":codVdes", UtilityDB.valueToString(codVdes));
|
||||
|
||||
@@ -395,7 +395,7 @@ public class ConSegnaService {
|
||||
" INNER JOIN stb_tipi_indirizzi ON stb_tipi_indirizzi.tipo_indirizzo = vtb_clie_pers_rif.tipo_indirizzo\n" +
|
||||
"WHERE tipo_documento = %s\n" +
|
||||
" AND cod_anag = %s\n" +
|
||||
" AND stb_tipi_indirizzi.tipo_indirizzo = 'UFFICIO ACQUISTI'\n" +
|
||||
" AND stb_tipi_indirizzi.tipo_indirizzo IN ('PUNTO VENDITA', 'UFFICIO ACQUISTI')\n" +
|
||||
" AND ((:codVdes IS NULL AND cod_vdes IS NULL) OR (:codVdes IS NOT NULL AND ISNULL(cod_vdes, :codVdes) = :codVdes))",
|
||||
datiConsegna.getCodDtip(), datiConsegna.getCodAnag()
|
||||
).replace(":codVdes", UtilityDB.valueToString(datiConsegna.getCodVdes()));
|
||||
|
||||
Reference in New Issue
Block a user