- Nova funcionalidade de categoria com tempo para ativar e desativar
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@25194 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
6f761e8733
commit
79769b2929
|
@ -12,6 +12,7 @@ import javax.persistence.Basic;
|
||||||
import javax.persistence.CascadeType;
|
import javax.persistence.CascadeType;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.FetchType;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
|
|
|
@ -80,6 +80,11 @@ public class CategoriaDescuento implements Serializable {
|
||||||
private Boolean indImporteTxEmbarque;
|
private Boolean indImporteTxEmbarque;
|
||||||
@Column(name = "INDIMPORTEPEDAGIO")
|
@Column(name = "INDIMPORTEPEDAGIO")
|
||||||
private Boolean indImportePedagio;
|
private Boolean indImportePedagio;
|
||||||
|
@Column(name = "TIEMPOACTIVAR")
|
||||||
|
private Integer tiempoActivar;
|
||||||
|
@Column(name = "TIEMPODESACTIVAR")
|
||||||
|
private Integer tiempoDesactivar;
|
||||||
|
|
||||||
|
|
||||||
public enum DisponibilidadeFeriado {
|
public enum DisponibilidadeFeriado {
|
||||||
// Declaração dos enum
|
// Declaração dos enum
|
||||||
|
@ -311,4 +316,37 @@ public class CategoriaDescuento implements Serializable {
|
||||||
this.indImportePedagio = indImportePedagio;
|
this.indImportePedagio = indImportePedagio;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getTiempoActivar() {
|
||||||
|
return tiempoActivar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTiempoActivar(Integer hora,Integer minuto) {
|
||||||
|
setTiempoDesactivar(null);
|
||||||
|
hora = (hora == null)?0:hora;
|
||||||
|
minuto = (minuto == null)?0:minuto;
|
||||||
|
|
||||||
|
int totalMinutos = (hora*60)+minuto;
|
||||||
|
setTiempoActivar( (totalMinutos == 0)?null:totalMinutos);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTiempoActivar(Integer tiempoActivar) {
|
||||||
|
this.tiempoActivar = tiempoActivar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTiempoDesactivar() {
|
||||||
|
return tiempoDesactivar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTiempoDesactivar(Integer hora,Integer minuto) {
|
||||||
|
setTiempoActivar(null);
|
||||||
|
hora = (hora == null)?0:hora;
|
||||||
|
minuto = (minuto == null)?0:minuto;
|
||||||
|
|
||||||
|
int totalMinutos = (hora*60)+minuto;
|
||||||
|
setTiempoDesactivar( (totalMinutos == 0)?null:totalMinutos);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTiempoDesactivar(Integer tiempoDesactivar) {
|
||||||
|
this.tiempoDesactivar = tiempoDesactivar;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue