bug #8396
bug #8389 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@63612 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
69770f8a4a
commit
911803c7f7
|
@ -12,6 +12,8 @@ import java.util.List;
|
||||||
import javax.persistence.Basic;
|
import javax.persistence.Basic;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.EnumType;
|
||||||
|
import javax.persistence.Enumerated;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
|
@ -21,6 +23,8 @@ import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.enums.TipoFormapago;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Administrador
|
* @author Administrador
|
||||||
|
@ -60,6 +64,9 @@ public class FormaPago implements Serializable {
|
||||||
private List<PricingFormapago> pricingFormapagoList;
|
private List<PricingFormapago> pricingFormapagoList;
|
||||||
@Column(name = "INDCONFERENCIAFISICACOMISSAO")
|
@Column(name = "INDCONFERENCIAFISICACOMISSAO")
|
||||||
private Boolean indconferenciafisicacomissao;
|
private Boolean indconferenciafisicacomissao;
|
||||||
|
@Column(name = "TIPO_PAGO")
|
||||||
|
@Enumerated(EnumType.ORDINAL)
|
||||||
|
private TipoFormapago tipoFormapago;
|
||||||
|
|
||||||
public FormaPago() {
|
public FormaPago() {
|
||||||
super();
|
super();
|
||||||
|
@ -213,4 +220,12 @@ public class FormaPago implements Serializable {
|
||||||
public void setIndconferenciafisicacomissao(Boolean indconferenciafisicacomissao) {
|
public void setIndconferenciafisicacomissao(Boolean indconferenciafisicacomissao) {
|
||||||
this.indconferenciafisicacomissao = indconferenciafisicacomissao;
|
this.indconferenciafisicacomissao = indconferenciafisicacomissao;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TipoFormapago getTipoFormapago() {
|
||||||
|
return tipoFormapago;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTipoFormapago(TipoFormapago tipoFormapago) {
|
||||||
|
this.tipoFormapago = tipoFormapago;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,8 @@ public class PacoteTarifa implements Serializable {
|
||||||
@JoinColumn(name = "TIPOTARIFAPACOTE_ID", referencedColumnName = "TIPOTARIFAPACOTE_ID")
|
@JoinColumn(name = "TIPOTARIFAPACOTE_ID", referencedColumnName = "TIPOTARIFAPACOTE_ID")
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private TipoTarifaPacote tipoTarifaPacote;
|
private TipoTarifaPacote tipoTarifaPacote;
|
||||||
|
@Column(name = "INDVENDAWEB")
|
||||||
|
private Boolean indvendaweb;
|
||||||
|
|
||||||
public PacoteTarifa() {
|
public PacoteTarifa() {
|
||||||
super();
|
super();
|
||||||
|
@ -126,7 +128,7 @@ public class PacoteTarifa implements Serializable {
|
||||||
return true;
|
return true;
|
||||||
if (obj == null)
|
if (obj == null)
|
||||||
return false;
|
return false;
|
||||||
if (getClass() != obj.getClass())
|
if (!(obj instanceof PacoteTarifa))
|
||||||
return false;
|
return false;
|
||||||
PacoteTarifa other = (PacoteTarifa) obj;
|
PacoteTarifa other = (PacoteTarifa) obj;
|
||||||
if (pacotetarifaId == null) {
|
if (pacotetarifaId == null) {
|
||||||
|
@ -142,4 +144,12 @@ public class PacoteTarifa implements Serializable {
|
||||||
return "PacoteTarifa [pacotetarifaId=" + pacotetarifaId + ", activo=" + activo + ", fecmodif=" + fecmodif + ", usuarioId=" + usuarioId + ", pacote=" + pacote + ", tipoTarifaPacote=" + tipoTarifaPacote + "]";
|
return "PacoteTarifa [pacotetarifaId=" + pacotetarifaId + ", activo=" + activo + ", fecmodif=" + fecmodif + ", usuarioId=" + usuarioId + ", pacote=" + pacote + ", tipoTarifaPacote=" + tipoTarifaPacote + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean getIndvendaweb() {
|
||||||
|
return indvendaweb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndvendaweb(Boolean indvendaweb) {
|
||||||
|
this.indvendaweb = indvendaweb;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.rjconsultores.ventaboletos.enums;
|
||||||
|
|
||||||
|
import org.zkoss.util.resource.Labels;
|
||||||
|
|
||||||
|
public enum TipoFormapago {
|
||||||
|
|
||||||
|
DINHEIRO(0,Labels.getLabel("editarFormaPagoController.lblDinheiro.label")),
|
||||||
|
DEBITO(1,Labels.getLabel("editarFormaPagoController.lblDebito.label")),
|
||||||
|
CREDITO(2,Labels.getLabel("editarFormaPagoController.lblCredito.label")),
|
||||||
|
NOTA_CREDITO(3,Labels.getLabel("editarFormaPagoController.lblNotaCredito.label")),
|
||||||
|
TROCA_PASSAGEM(4,Labels.getLabel("editarFormaPagoController.lblTrocaPassagem.label")),
|
||||||
|
IMPRESSAO_PASSAGEM(5,Labels.getLabel("editarFormaPagoController.lblImpressaoPassagem.label")),
|
||||||
|
ORDEM_SERVICO(6,Labels.getLabel("editarFormaPagoController.lblOrdemServico.label")),
|
||||||
|
BOLETO_ABERTO(7,Labels.getLabel("editarFormaPagoController.lblBoletoAberto.label")),
|
||||||
|
PACOTE(8,Labels.getLabel("editarFormaPagoController.lblPacote.label")),
|
||||||
|
RESERVA(9,Labels.getLabel("editarFormaPagoController.lblReserva.label")),
|
||||||
|
CHEQUE(10,Labels.getLabel("editarFormaPagoController.lblCheque.label")),
|
||||||
|
DEPOSITO(11,Labels.getLabel("editarFormaPagoController.lblDeposito.label"));
|
||||||
|
|
||||||
|
private Integer valor;
|
||||||
|
private String descricao;
|
||||||
|
|
||||||
|
private TipoFormapago(Integer valor, String descricao) {
|
||||||
|
this.valor = valor;
|
||||||
|
this.descricao = descricao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescricao() {
|
||||||
|
return descricao;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return getDescricao();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getValor() {
|
||||||
|
return valor;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -9,7 +9,7 @@ import com.rjconsultores.ventaboletos.entidad.TipoTarifaPacote;
|
||||||
|
|
||||||
public interface PacoteTarifaService extends GenericService<PacoteTarifa, Integer> {
|
public interface PacoteTarifaService extends GenericService<PacoteTarifa, Integer> {
|
||||||
|
|
||||||
public PacoteTarifa vincularPacoteTarifa(PacoteTarifa pacoteTarifa, Pacote pacote, TipoTarifaPacote tipoTarifaPacote, BigDecimal tarifa);
|
public PacoteTarifa vincularPacoteTarifa(PacoteTarifa pacoteTarifa, Pacote pacote, TipoTarifaPacote tipoTarifaPacote, BigDecimal tarifa, Boolean indvendaweb);
|
||||||
|
|
||||||
public PacoteTarifa buscaPacoteTarifa(Pacote pacote, TipoTarifaPacote tipoTarifaPacote);
|
public PacoteTarifa buscaPacoteTarifa(Pacote pacote, TipoTarifaPacote tipoTarifaPacote);
|
||||||
|
|
||||||
|
|
|
@ -63,12 +63,13 @@ public class PacoteTarifaServiceImpl implements PacoteTarifaService {
|
||||||
|
|
||||||
@Transactional(readOnly = false)
|
@Transactional(readOnly = false)
|
||||||
@Override
|
@Override
|
||||||
public PacoteTarifa vincularPacoteTarifa(PacoteTarifa pacoteTarifa, Pacote pacote, TipoTarifaPacote tipoTarifaPacote, BigDecimal tarifa) {
|
public PacoteTarifa vincularPacoteTarifa(PacoteTarifa pacoteTarifa, Pacote pacote, TipoTarifaPacote tipoTarifaPacote, BigDecimal tarifa, Boolean indvendaweb) {
|
||||||
|
|
||||||
if (pacoteTarifa == null) {
|
if (pacoteTarifa == null) {
|
||||||
pacoteTarifa = new PacoteTarifa();
|
pacoteTarifa = new PacoteTarifa();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pacoteTarifa.setIndvendaweb(indvendaweb);
|
||||||
pacoteTarifa.setTarifa(tarifa);
|
pacoteTarifa.setTarifa(tarifa);
|
||||||
pacoteTarifa.setTipoTarifaPacote(tipoTarifaPacote);
|
pacoteTarifa.setTipoTarifaPacote(tipoTarifaPacote);
|
||||||
pacoteTarifa.setPacote(pacote);
|
pacoteTarifa.setPacote(pacote);
|
||||||
|
|
Loading…
Reference in New Issue