fixes bug #6796
Conclusao modificações adm. git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@50128 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
353939319e
commit
6c3ff4ff23
|
@ -0,0 +1,7 @@
|
|||
package com.rjconsultores.ventaboletos.constantes;
|
||||
|
||||
public interface ConstantesTipoDesconto {
|
||||
int DESCONTO_POR_NUMERO_DOCUMENTO = 1,
|
||||
DESCONTO_POR_QUANTIDADE = 2,
|
||||
TIPO_DESCONTO_NAO_INFORMADO = 0;
|
||||
}
|
|
@ -8,6 +8,7 @@ import java.io.Serializable;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
|
@ -16,6 +17,7 @@ import javax.persistence.GeneratedValue;
|
|||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
|
@ -77,6 +79,12 @@ public class Convenio implements Serializable {
|
|||
@OneToMany(mappedBy = "convenio", cascade = CascadeType.ALL)
|
||||
private List<ConvenioPuntoVenta> convenioPuntoVentaList;
|
||||
|
||||
@OneToMany(mappedBy = "convenio", cascade = CascadeType.ALL)
|
||||
private List<ConvenioEmpresa> convenioEmpresaList;
|
||||
|
||||
@OneToMany(mappedBy = "convenio", cascade = CascadeType.ALL)
|
||||
private List<ConvenioRuta> convenioRutaList;
|
||||
|
||||
@Column(name = "FECVENTAINI")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecVentaInicial;
|
||||
|
@ -94,7 +102,19 @@ public class Convenio implements Serializable {
|
|||
private Date fecViajeFinal;
|
||||
|
||||
@Column(name = "INDDESCUENTONORMAL")
|
||||
private Boolean indDescuentoNormal;
|
||||
private Integer indDescuentoNormal;
|
||||
|
||||
@ManyToOne(cascade = CascadeType.ALL)
|
||||
@JoinColumn(name = "CLIENTE_ID", referencedColumnName = "CLIENTE_ID")
|
||||
private Cliente cliente;
|
||||
|
||||
public Cliente getCliente() {
|
||||
return cliente;
|
||||
}
|
||||
|
||||
public void setCliente(Cliente cliente) {
|
||||
this.cliente = cliente;
|
||||
}
|
||||
|
||||
public Convenio() {
|
||||
}
|
||||
|
@ -230,6 +250,42 @@ public class Convenio implements Serializable {
|
|||
this.convenioPuntoVentaList = convenioPuntoVentaList;
|
||||
}
|
||||
|
||||
public List<ConvenioEmpresa> getConvenioEmpresaList() {
|
||||
List<ConvenioEmpresa> tempList = new ArrayList<ConvenioEmpresa>();
|
||||
|
||||
if (convenioEmpresaList != null) {
|
||||
for (ConvenioEmpresa convenioEmpresa : this.convenioEmpresaList) {
|
||||
if (convenioEmpresa.getActivo()) {
|
||||
tempList.add(convenioEmpresa);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tempList;
|
||||
}
|
||||
|
||||
public List<ConvenioRuta> getConvenioRutaList() {
|
||||
List<ConvenioRuta> tempList = new ArrayList<ConvenioRuta>();
|
||||
|
||||
if (convenioRutaList != null) {
|
||||
for (ConvenioRuta convenioRuta : this.convenioRutaList) {
|
||||
if (convenioRuta.getActivo()) {
|
||||
tempList.add(convenioRuta);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tempList;
|
||||
}
|
||||
|
||||
public void setConvenioRutaList(List<ConvenioRuta> convenioRutaList) {
|
||||
this.convenioRutaList = convenioRutaList;
|
||||
}
|
||||
|
||||
public void setConvenioEmpresaList(List<ConvenioEmpresa> convenioEmpresaList) {
|
||||
this.convenioEmpresaList = convenioEmpresaList;
|
||||
}
|
||||
|
||||
public void setConvenioUsuarioList(List<ConvenioUsuario> convenioUsuarioList) {
|
||||
this.convenioUsuarioList = convenioUsuarioList;
|
||||
}
|
||||
|
@ -270,11 +326,11 @@ public class Convenio implements Serializable {
|
|||
this.fecViajeFinal = fecViajeFinal;
|
||||
}
|
||||
|
||||
public Boolean getIndDescuentoNormal() {
|
||||
public Integer getIndDescuentoNormal() {
|
||||
return indDescuentoNormal;
|
||||
}
|
||||
|
||||
public void setIndDescuentoNormal(Boolean indDescuentoNormal) {
|
||||
public void setIndDescuentoNormal(Integer indDescuentoNormal) {
|
||||
this.indDescuentoNormal = indDescuentoNormal;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,8 +33,16 @@ public class ConvenioDet implements Serializable {
|
|||
@Basic(optional = false)
|
||||
@Column(name = "CONVENIODET_ID")
|
||||
private Integer conveniodetId;
|
||||
@Column(name = "PORCDESCUENTO")
|
||||
|
||||
@Column(name = "PORCDESCUENTO") /* Refere-se ao desconto na tarifa */
|
||||
private BigDecimal porcdescuento;
|
||||
@Column(name = "PORCDESCUENTOTAXAEMBARQUE")
|
||||
private BigDecimal porcDescuentoTaxaEmbarque;
|
||||
@Column(name = "PORCDESCUENTOPEDAGIO")
|
||||
private BigDecimal porcDescuentoPedagio;
|
||||
@Column(name = "PORCDESCUENTOSEGURO")
|
||||
private BigDecimal porcDescuentoSeguro;
|
||||
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
@Column(name = "FECMODIF")
|
||||
|
@ -46,6 +54,8 @@ public class ConvenioDet implements Serializable {
|
|||
private Long numfolioinicial;
|
||||
@Column(name = "NUMFOLIOFINAL")
|
||||
private Long numfoliofinal;
|
||||
@Column(name = "QUANTIDADE")
|
||||
private Long quantidade;
|
||||
|
||||
public ConvenioDet() {
|
||||
}
|
||||
|
@ -110,6 +120,38 @@ public class ConvenioDet implements Serializable {
|
|||
this.numfoliofinal = numfoliofinal;
|
||||
}
|
||||
|
||||
public BigDecimal getPorcDescuentoTaxaEmbarque() {
|
||||
return porcDescuentoTaxaEmbarque;
|
||||
}
|
||||
|
||||
public void setPorcDescuentoTaxaEmbarque(BigDecimal porcDescuentoTaxaEmbarque) {
|
||||
this.porcDescuentoTaxaEmbarque = porcDescuentoTaxaEmbarque;
|
||||
}
|
||||
|
||||
public BigDecimal getPorcDescuentoPedagio() {
|
||||
return porcDescuentoPedagio;
|
||||
}
|
||||
|
||||
public void setPorcDescuentoPedagio(BigDecimal porcDescuentoPedagio) {
|
||||
this.porcDescuentoPedagio = porcDescuentoPedagio;
|
||||
}
|
||||
|
||||
public BigDecimal getPorcDescuentoSeguro() {
|
||||
return porcDescuentoSeguro;
|
||||
}
|
||||
|
||||
public void setPorcDescuentoSeguro(BigDecimal porcDescuentoSeguro) {
|
||||
this.porcDescuentoSeguro = porcDescuentoSeguro;
|
||||
}
|
||||
|
||||
public Long getQuantidade() {
|
||||
return quantidade;
|
||||
}
|
||||
|
||||
public void setQuantidade(Long quantidade) {
|
||||
this.quantidade = quantidade;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
|
@ -123,10 +165,12 @@ public class ConvenioDet implements Serializable {
|
|||
if (!(object instanceof ConvenioDet)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ConvenioDet other = (ConvenioDet) object;
|
||||
if ((this.conveniodetId == null && other.conveniodetId != null) || (this.conveniodetId != null && !this.conveniodetId.equals(other.conveniodetId))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
||||
@Entity
|
||||
@SequenceGenerator(name="CONVENIO_EMPRESA_SEQ", sequenceName="CONVENIO_EMPRESA_SEQ", allocationSize=1)
|
||||
@Table(name="CONVENIO_EMPRESA")
|
||||
public class ConvenioEmpresa implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "CONVENIO_EMPRESA_SEQ")
|
||||
@Column(name = "CONVENIOEMPRESA_ID")
|
||||
private Integer convenioEmpresaId;
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
@JoinColumn(name = "CONVENIO_ID", referencedColumnName = "CONVENIO_ID")
|
||||
@ManyToOne
|
||||
private Convenio convenio;
|
||||
@JoinColumn(name = "EMPRESA_ID", referencedColumnName = "EMPRESA_ID")
|
||||
@ManyToOne
|
||||
private Empresa empresa;
|
||||
|
||||
public Integer getConvenioEmpresaId() {
|
||||
return convenioEmpresaId;
|
||||
}
|
||||
public void setConvenioEmpresaId(Integer convenioEmpresaId) {
|
||||
this.convenioEmpresaId = convenioEmpresaId;
|
||||
}
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
public Date getFecmodif() {
|
||||
return fecmodif;
|
||||
}
|
||||
public void setFecmodif(Date fecmodif) {
|
||||
this.fecmodif = fecmodif;
|
||||
}
|
||||
public Integer getUsuarioId() {
|
||||
return usuarioId;
|
||||
}
|
||||
public void setUsuarioId(Integer usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
public Convenio getConvenio() {
|
||||
return convenio;
|
||||
}
|
||||
public void setConvenio(Convenio convenio) {
|
||||
this.convenio = convenio;
|
||||
}
|
||||
public Empresa getEmpresa() {
|
||||
return empresa;
|
||||
}
|
||||
public void setEmpresa(Empresa empresa) {
|
||||
this.empresa = empresa;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (convenioEmpresaId != null ? convenioEmpresaId.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
// TODO: Warning - this method won't work in the case the id fields are not set
|
||||
if (!(object instanceof ConvenioEmpresa)) {
|
||||
return false;
|
||||
}
|
||||
ConvenioEmpresa other = (ConvenioEmpresa) object;
|
||||
if ((this.convenioEmpresaId == null && other.convenioEmpresaId != null) || (this.convenioEmpresaId != null && !this.convenioEmpresaId.equals(other.convenioEmpresaId))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "com.rjconsultores.ventaboletos.entidad.ConvenioEmpresa[convenioEmpresaId=" + convenioEmpresaId + "]";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
||||
@Entity
|
||||
@SequenceGenerator(name="CONVENIO_RUTA_SEQ", sequenceName="CONVENIO_RUTA_SEQ", allocationSize=1)
|
||||
@Table(name="CONVENIO_RUTA")
|
||||
public class ConvenioRuta implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "CONVENIO_RUTA_SEQ")
|
||||
@Column(name = "CONVENIORUTA_ID")
|
||||
private Integer convenioRutaId;
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
@JoinColumn(name = "CONVENIO_ID", referencedColumnName = "CONVENIO_ID")
|
||||
@ManyToOne
|
||||
private Convenio convenio;
|
||||
@JoinColumn(name = "RUTA_ID", referencedColumnName = "RUTA_ID")
|
||||
@ManyToOne
|
||||
private Ruta ruta;
|
||||
|
||||
public Integer getConvenioRutaId() {
|
||||
return convenioRutaId;
|
||||
}
|
||||
public void setConvenioRutaId(Integer convenioRutaId) {
|
||||
this.convenioRutaId = convenioRutaId;
|
||||
}
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
public Date getFecmodif() {
|
||||
return fecmodif;
|
||||
}
|
||||
public void setFecmodif(Date fecmodif) {
|
||||
this.fecmodif = fecmodif;
|
||||
}
|
||||
public Integer getUsuarioId() {
|
||||
return usuarioId;
|
||||
}
|
||||
public void setUsuarioId(Integer usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
public Convenio getConvenio() {
|
||||
return convenio;
|
||||
}
|
||||
public void setConvenio(Convenio convenio) {
|
||||
this.convenio = convenio;
|
||||
}
|
||||
public Ruta getRuta() {
|
||||
return ruta;
|
||||
}
|
||||
public void setRuta(Ruta ruta) {
|
||||
this.ruta = ruta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (convenioRutaId != null ? convenioRutaId.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
// TODO: Warning - this method won't work in the case the id fields are not set
|
||||
if (!(object instanceof ConvenioRuta)) {
|
||||
return false;
|
||||
}
|
||||
ConvenioRuta other = (ConvenioRuta) object;
|
||||
if ((this.convenioRutaId == null && other.convenioRutaId != null) || (this.convenioRutaId != null && !this.convenioRutaId.equals(other.convenioRutaId))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "com.rjconsultores.ventaboletos.entidad.ConvenioRuta[convenioRutaId=" + convenioRutaId + "]";
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue