Merge branch 'develop' into feature/Feature-FatturaDiffertita
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good

# Conflicts:
#	ems-core/src/main/java/it/integry/ems/migration/model/Migration_20241209150324.java
#	ems-core/src/main/java/it/integry/ems/rules/businessLogic/DocumentBusinessLogic.java
#	ems-core/src/main/java/it/integry/ems_model/entity/DtbDocImb.java
This commit is contained in:
2024-12-09 19:41:31 +01:00
6 changed files with 72 additions and 31 deletions

View File

@@ -22,8 +22,8 @@ public class Migration_20241209150324 extends BaseMigration implements Migration
" ser_doc varchar(2) not null,\n" + " ser_doc varchar(2) not null,\n" +
" num_doc int not null,\n" + " num_doc int not null,\n" +
" cod_tcol varchar(5) not null,\n" + " cod_tcol varchar(5) not null,\n" +
" num_pedane_cons int not null default 0,\n" + " num_imb_cons int not null default 0,\n" +
" num_pedane_rese int not null default 0,\n" + " num_imb_resi int not null default 0,\n" +
" tipo_reso TINYINT not null default 0 )", " tipo_reso TINYINT not null default 0 )",
"alter table dtb_doc_imb add constraint pk_dtb_doc_imb primary key (id);", "alter table dtb_doc_imb add constraint pk_dtb_doc_imb primary key (id);",
"alter table dtb_doc_imb add constraint fk_dtb_doc_imb_dtb_doct FOREIGN KEY(cod_anag, cod_Dtip, data_doc, ser_doc, num_doc) "+ "alter table dtb_doc_imb add constraint fk_dtb_doc_imb_dtb_doct FOREIGN KEY(cod_anag, cod_Dtip, data_doc, ser_doc, num_doc) "+

View File

@@ -0,0 +1,19 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20241209163928 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
executeStatement("ALTER TABLE gtb_porto ADD flag_fattura_vettore bit not null default 0");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,31 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20241209170734 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createSetupQuery("SI_NO", "SI_NO", "SELECT 'S' UNION ALL SELECT 'N'");
createSetup("PICKING", "SETUP", "ENABLE_ART_CREATION", "N",
"Permette agli utenti di creare gli articoli", false, "SI_NO", false, false,
true, false, false, null, false, "SELECT 'S' UNION ALL SELECT 'N'");
createSetupQuery("COD_MGRP", "COD_MGRP", "SELECT COD_MGRP FROM MTB_GRUP");
createSetup("PICKING", "SETUP", "ENABLE_ART_CREATION_GRP_MERC", null,
"Vincola la creazione degli articoli solo ad alcuni gruppi merceologici", false, "COD_MGRP", false, false,
true, false, false, null, false, "SELECT COD_MGRP FROM MTB_GRUP");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -1144,19 +1144,5 @@ public class DocumentBusinessLogic {
} }
public static void regDocImballi(Connection conn, DtbDoct dtbDoct) throws Exception {
if ( !dtbDoct.getGestione().equalsIgnoreCase("V") || dtbDoct.getDtbTipi().getTipoEmissioneEnum() == TipoEmissione.DIFFERITA) return;
if ( dtbDoct.getDtbDocImb() == null || dtbDoct.getDtbDocImb().size() == 0) return;
String sql =
Query.format(
"SELECT fattura_pedane_separate FROM vtb_clie WHERE cod_anag = %s",
dtbDoct.getCodAnag());
boolean fatturaPedaneSeparate = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(conn, sql);
if (fatturaPedaneSeparate || dtbDoct.getIncoterms().equalsIgnoreCase("")){
}
}
} }

View File

@@ -61,14 +61,14 @@ public class DtbDocImb extends EntityBase {
@FK(tableName = MtbTcol.ENTITY, columnName = "cod_tcol") @FK(tableName = MtbTcol.ENTITY, columnName = "cod_tcol")
private String codTcol; private String codTcol;
@SqlField(value = "num_pedane_cons", nullable = false) @SqlField(value = "num_imb_cons", nullable = false)
private Integer numPedaneCons; private Integer numImbCons;
@SqlField(value = "num_pedane_rese", nullable = false) @SqlField(value = "num_imb_resi", nullable = false)
private Integer numPedaneRese; private Integer numImbResi;
@SqlField(value = "tipo_reso", nullable = false) @SqlField(value = "tipo_reso", nullable = false)
private Byte tipoReso; private Short tipoReso;
public Long getId() { public Long getId() {
return id; return id;
@@ -133,29 +133,29 @@ public class DtbDocImb extends EntityBase {
return this; return this;
} }
public Integer getNumPedaneCons() { public Integer getNumImbCons() {
return numPedaneCons; return numImbCons;
} }
public DtbDocImb setNumPedaneCons(Integer numPedaneCons) { public DtbDocImb setNumImbCons(Integer numImbCons) {
this.numPedaneCons = numPedaneCons; this.numImbCons = numImbCons;
return this; return this;
} }
public Integer getNumPedaneRese() { public Integer getNumImbResi() {
return numPedaneRese; return numImbResi;
} }
public DtbDocImb setNumPedaneRese(Integer numPedaneRese) { public DtbDocImb setNumImbResi(Integer numImbResi) {
this.numPedaneRese = numPedaneRese; this.numImbResi = numImbResi;
return this; return this;
} }
public Byte getTipoReso() { public Short getTipoReso() {
return tipoReso; return tipoReso;
} }
public DtbDocImb setTipoReso(Byte tipoReso) { public DtbDocImb setTipoReso(Short tipoReso) {
this.tipoReso = tipoReso; this.tipoReso = tipoReso;
return this; return this;
} }

View File

@@ -1589,6 +1589,9 @@ public class DtbDoct extends DtbBaseDocT implements EquatableEntityInterface<Dtb
for (DrlDocAttached drlDocAttached : getDrlDocAttached()) { for (DrlDocAttached drlDocAttached : getDrlDocAttached()) {
drlDocAttached.manageWithParentConnection(connection, drlDocAttached.getOperation(), dataCompleting, entityHolder); drlDocAttached.manageWithParentConnection(connection, drlDocAttached.getOperation(), dataCompleting, entityHolder);
} }
for (DtbDocImb dtbDocImb : getDtbDocImb()) {
dtbDocImb.manageWithParentConnection(connection, dtbDocImb.getOperation(), dataCompleting, entityHolder);
}
for (ArlSchaccDoc arlSchaccDoc : getArlSchaccDoc()) { for (ArlSchaccDoc arlSchaccDoc : getArlSchaccDoc()) {
arlSchaccDoc.manageWithParentConnection(connection, arlSchaccDoc.getOperation(), dataCompleting, entityHolder); arlSchaccDoc.manageWithParentConnection(connection, arlSchaccDoc.getOperation(), dataCompleting, entityHolder);
} }
@@ -1644,6 +1647,8 @@ public class DtbDoct extends DtbBaseDocT implements EquatableEntityInterface<Dtb
dtbDocr.deleteAllEntities(connection, this); dtbDocr.deleteAllEntities(connection, this);
DtbDocs dtbDocs = new DtbDocs(); DtbDocs dtbDocs = new DtbDocs();
dtbDocs.deleteAllEntities(connection, this); dtbDocs.deleteAllEntities(connection, this);
DtbDocImb dtbDocImb = new DtbDocImb();
dtbDocImb.deleteAllEntities(connection, this);
DtbDocCarat dtbDocCarat = new DtbDocCarat(); DtbDocCarat dtbDocCarat = new DtbDocCarat();
dtbDocCarat.deleteAllEntities(connection, this); dtbDocCarat.deleteAllEntities(connection, this);
DrlDocAttached drlDocAttached = new DrlDocAttached(); DrlDocAttached drlDocAttached = new DrlDocAttached();