Gestito flag includi tara in peso e tipologia ripartizione per pedana in costi trasporto/oneri
This commit is contained in:
@@ -1,16 +1,22 @@
|
|||||||
package it.integry.ems.migration.model;import it.integry.ems.migration._base.BaseMigration;
|
package it.integry.ems.migration.model;
|
||||||
|
|
||||||
|
import it.integry.ems.migration._base.BaseMigration;
|
||||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||||
|
|
||||||
public class Migration_20240610184414 extends BaseMigration implements MigrationModelInterface{
|
public class Migration_20240610184414 extends BaseMigration implements MigrationModelInterface {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void up()throws Exception {
|
public void up() throws Exception {
|
||||||
if(isHistoryDB())
|
if (isHistoryDB())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
executeStatement("alter table vtb_vett ADD add_tara_in_calc_peso_trasp BIT DEFAULT 1 NOT NULL;");
|
||||||
|
executeStatement("alter table vtb_vett ADD tipo_ripartizione_costo_pedana INTEGER DEFAULT 0 NOT NULL;");
|
||||||
|
executeStatement("EXEC sp_addextendedproperty 'MS_Description', 'Ripartizione costo pedana in costi trasporto\\oneri: 0 - A PENANA, 1 = A COLLI, 2 = A PEZZI', 'SCHEMA', 'dbo', 'TABLE', 'vtb_vett','COLUMN', 'tipo_ripartizione_costo_pedana';");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void down()throws Exception{
|
public void down() throws Exception {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
package it.integry.ems_model.entity;
|
package it.integry.ems_model.entity;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import it.integry.ems_model.annotation.*;
|
import it.integry.ems_model.annotation.*;
|
||||||
import it.integry.ems_model.base.EntityBase;
|
import it.integry.ems_model.base.EntityBase;
|
||||||
|
import it.integry.ems_model.entity._enum.IBaseEnum;
|
||||||
import org.kie.api.definition.type.PropertyReactive;
|
import org.kie.api.definition.type.PropertyReactive;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -72,6 +74,12 @@ public class VtbVett extends EntityBase {
|
|||||||
@SqlField(value = "num_autoriz", maxLength = 40, nullable = true)
|
@SqlField(value = "num_autoriz", maxLength = 40, nullable = true)
|
||||||
private String numAutoriz;
|
private String numAutoriz;
|
||||||
|
|
||||||
|
@SqlField(value = "add_tara_in_calc_peso_trasp", nullable = false, defaultObjectValue = "1")
|
||||||
|
private Boolean addTaraInCalcPesoTrasp;
|
||||||
|
|
||||||
|
@SqlField(value = "tipo_ripartizione_costo_pedana", defaultObjectValue = "0")
|
||||||
|
private Integer tipoRipartizioneCostoPedana;
|
||||||
|
|
||||||
@EntityChild
|
@EntityChild
|
||||||
private List<VtbVetr> vtbVetr;
|
private List<VtbVetr> vtbVetr;
|
||||||
|
|
||||||
@@ -243,6 +251,23 @@ public class VtbVett extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean isAddTaraInCalcPesoTrasp() {
|
||||||
|
return addTaraInCalcPesoTrasp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public VtbVett setAddTaraInCalcPesoTrasp(Boolean addTaraInCalcPesoTrasp) {
|
||||||
|
this.addTaraInCalcPesoTrasp = addTaraInCalcPesoTrasp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTipoRipartizioneCostoPedana() {
|
||||||
|
return tipoRipartizioneCostoPedana;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTipoRipartizioneCostoPedana(Integer tipoRipartizioneCostoPedana) {
|
||||||
|
this.tipoRipartizioneCostoPedana = tipoRipartizioneCostoPedana;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void insertChilds() throws Exception {
|
protected void insertChilds() throws Exception {
|
||||||
for (VtbVetr vtbVetr : getVtbVetr()) {
|
for (VtbVetr vtbVetr : getVtbVetr()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user