fixed bug #7837: Corrigido o filtro que mostra bilhetes agrupados
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@59646 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
2f2319b53d
commit
a14b4d6be3
File diff suppressed because it is too large
Load Diff
|
@ -3,9 +3,7 @@ package com.rjconsultores.ventaboletos.vo.comissao;
|
|||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
||||
import com.rjconsultores.ventaboletos.constantes.DescricaoTipoVenta;
|
||||
import com.rjconsultores.ventaboletos.enums.IndStatusBoleto;
|
||||
|
@ -13,14 +11,17 @@ import com.rjconsultores.ventaboletos.enums.comissao.StatusLogConferencia;
|
|||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
|
||||
public class BoletoComissao {
|
||||
|
||||
|
||||
private Long boletoId;
|
||||
private Long boletoOriginalId;
|
||||
private Integer empresaId;
|
||||
private Integer puntoVentaId;
|
||||
private String datavenda;
|
||||
private Integer tipoVenta;
|
||||
private String indstatusboleto;
|
||||
private Integer motivoCancelacionId;
|
||||
private Integer motivoCancelacionOriginal1;
|
||||
private Integer motivoCancelacionOriginal2;
|
||||
private String descmotivocancelacion;
|
||||
private BigDecimal valorpagado;
|
||||
private BigDecimal seguro;
|
||||
|
@ -56,15 +57,16 @@ public class BoletoComissao {
|
|||
private Integer comempformapagoId;
|
||||
private Integer comempcategoriaId;
|
||||
private Long logconferenciaId;
|
||||
|
||||
|
||||
private boolean exigeConferenciaDevolvido;
|
||||
private Boolean indcarboletosdevolvidosconf;
|
||||
|
||||
|
||||
private boolean exigeConferenciaAba;
|
||||
|
||||
|
||||
private boolean conferido;
|
||||
|
||||
|
||||
private Date feccorrida;
|
||||
|
||||
private Integer corridaId;
|
||||
|
||||
public Integer getEmpresaId() {
|
||||
|
@ -187,6 +189,14 @@ public class BoletoComissao {
|
|||
this.boletoId = boletoId;
|
||||
}
|
||||
|
||||
public void setBoletoOriginalId(Long boletoOriginalId) {
|
||||
this.boletoOriginalId = boletoOriginalId;
|
||||
}
|
||||
|
||||
public Long getBoletoOriginalId() {
|
||||
return boletoOriginalId;
|
||||
}
|
||||
|
||||
public String getNumAsiento() {
|
||||
return numAsiento;
|
||||
}
|
||||
|
@ -285,7 +295,8 @@ public class BoletoComissao {
|
|||
if (getBoletoId() == null) {
|
||||
if (other.getBoletoId() != null)
|
||||
return false;
|
||||
} else if (!getBoletoId().equals(other.getBoletoId()))
|
||||
}
|
||||
else if (!getBoletoId().equals(other.getBoletoId()))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
@ -353,43 +364,49 @@ public class BoletoComissao {
|
|||
public void setNumAsientoVinculado(String numAsientoVinculado) {
|
||||
this.numAsientoVinculado = numAsientoVinculado;
|
||||
}
|
||||
|
||||
|
||||
public BigDecimal getTotal() {
|
||||
BigDecimal total = BigDecimal.ZERO;
|
||||
total = total.add(getValorpagado())
|
||||
.add(getEmbarque())
|
||||
.add(getSeguro())
|
||||
.add(getPedagio())
|
||||
.add(getSeguro());
|
||||
|
||||
return total;
|
||||
return BigDecimal.ZERO
|
||||
.add(getValorpagado())
|
||||
.add(getEmbarque())
|
||||
.add(getSeguro())
|
||||
.add(getPedagio())
|
||||
.add(getSeguro());
|
||||
}
|
||||
|
||||
|
||||
public String getDescTipoVenta() {
|
||||
return DescricaoTipoVenta.getDescricaoTipoVenta(getTipoVenta());
|
||||
}
|
||||
|
||||
|
||||
public String getSituacaoBilhete() {
|
||||
if(isOcd()) {
|
||||
if (isOcd()) {
|
||||
return "OCD";
|
||||
} else if((isStatusCancelado()) && (isMotivocancelacionDevolvido() || isMotivocancelacionCancelado()) && StringUtils.isNotBlank(getDescmotivocancelacion())) {
|
||||
}
|
||||
else if ((isStatusCancelado()) && (isMotivocancelacionDevolvido() || isMotivocancelacionCancelado())
|
||||
&& StringUtils.isNotBlank(getDescmotivocancelacion())) {
|
||||
return getDescmotivocancelacion();
|
||||
} else if((isStatusVendido() || isStatusCancelado()) && !isMotivocancelacionDevolvido() && !isMotivocancelacionCancelado()) {
|
||||
}
|
||||
else if ((isStatusVendido() || isStatusCancelado())
|
||||
&& !isMotivocancelacionDevolvido() && !isMotivocancelacionCancelado()) {
|
||||
if (isStatusCancelado() && isMotivocancelacionTrocado()) {
|
||||
return "B. VENDIDO TROCADO";
|
||||
} else if (isStatusVendido() && isMotivocancelacionTransferido()) {
|
||||
}
|
||||
else if (isStatusVendido() && isMotivocancelacionTransferido()) {
|
||||
return "B. VENDIDO TRANSFERIDO";
|
||||
}
|
||||
} else if(isStatusTroca()) {
|
||||
}
|
||||
else if (isStatusTroca()) {
|
||||
if (isVendaBilheteTroca(getTipoVenta()) || isVendaGap(getTipoVenta())) {
|
||||
return "B. DA TROCA";
|
||||
} else if (isVendaBilheteTransferencia(getTipoVenta()) || isVendaGap(getTipoVenta())) {
|
||||
}
|
||||
else if (isVendaBilheteTransferencia(getTipoVenta()) || isVendaGap(getTipoVenta())) {
|
||||
return "B. DA TRANSFERENCIA";
|
||||
} else if (isVendaBilheteConfirmaAberto(getTipoVenta())) {
|
||||
}
|
||||
else if (isVendaBilheteConfirmaAberto(getTipoVenta())) {
|
||||
return "CONFIRMAÇÃO ABERTO";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
IndStatusBoleto indStatusBoleto = IndStatusBoleto.getIndStatusBoleto(getIndstatusboleto());
|
||||
return indStatusBoleto != null ? indStatusBoleto.getValue() : "";
|
||||
}
|
||||
|
@ -429,11 +446,11 @@ public class BoletoComissao {
|
|||
public void setComempcategoriaId(Integer comempcategoriaId) {
|
||||
this.comempcategoriaId = comempcategoriaId;
|
||||
}
|
||||
|
||||
|
||||
public boolean isExigeConferencia() {
|
||||
return getComempcategoriaId() != null || getComempformapagoId() != null;
|
||||
}
|
||||
|
||||
|
||||
public boolean isExigeConferenciaBoletoDevolvido() {
|
||||
return exigeConferenciaDevolvido;
|
||||
}
|
||||
|
@ -463,7 +480,8 @@ public class BoletoComissao {
|
|||
}
|
||||
|
||||
public Integer getTipoVentaOriginal() {
|
||||
return tipoVentaOriginal2 != null ? tipoVentaOriginal2 : tipoVentaOriginal1 != null ? tipoVentaOriginal1 : tipoVenta;
|
||||
return tipoVentaOriginal2 != null ? tipoVentaOriginal2
|
||||
: tipoVentaOriginal1 != null ? tipoVentaOriginal1 : tipoVenta;
|
||||
}
|
||||
|
||||
public Integer getTipoVentaOriginal1() {
|
||||
|
@ -489,255 +507,299 @@ public class BoletoComissao {
|
|||
public void setOcdId(Integer ocdId) {
|
||||
this.ocdId = ocdId;
|
||||
}
|
||||
|
||||
|
||||
private boolean isBoletoOriginal() {
|
||||
return boletoOriginalId == null
|
||||
&& getMotivoCancelacionOriginal() != null
|
||||
&& getMotivoCancelacionOriginal() == Constantes.MVO_CANCEL_BOLETO_AGRUPAMENTO.intValue();
|
||||
}
|
||||
|
||||
public Integer getMotivoCancelacionOriginal() {
|
||||
return motivoCancelacionOriginal2 != null ? motivoCancelacionOriginal2 : motivoCancelacionOriginal1;
|
||||
}
|
||||
|
||||
public Integer getMotivoCancelacionOriginal1() {
|
||||
return motivoCancelacionOriginal1;
|
||||
}
|
||||
|
||||
public void setMotivoCancelacionOriginal1(Integer motivoCancelacionOriginal1) {
|
||||
this.motivoCancelacionOriginal1 = motivoCancelacionOriginal1;
|
||||
}
|
||||
|
||||
public Integer getMotivoCancelacionOriginal2() {
|
||||
return motivoCancelacionOriginal2;
|
||||
}
|
||||
|
||||
public void setMotivoCancelacionOriginal2(Integer motivoCancelacionOriginal2) {
|
||||
this.motivoCancelacionOriginal2 = motivoCancelacionOriginal2;
|
||||
}
|
||||
|
||||
public boolean isVendaManual(Integer tipoVenta) {
|
||||
return tipoVenta == Constantes.TPV_MANUAL.intValue();
|
||||
}
|
||||
|
||||
|
||||
public boolean isVendaGap(Integer tipoVenta) {
|
||||
return tipoVenta == Constantes.TPV_BOLETO_REMOTO.intValue() ||
|
||||
tipoVenta == Constantes.TPV_CALL_CENTER.intValue() ||
|
||||
tipoVenta == Constantes.TPV_POR_INTERNET.intValue();
|
||||
return tipoVenta == Constantes.TPV_BOLETO_REMOTO.intValue()
|
||||
|| tipoVenta == Constantes.TPV_CALL_CENTER.intValue()
|
||||
|| tipoVenta == Constantes.TPV_POR_INTERNET.intValue();
|
||||
}
|
||||
|
||||
|
||||
public boolean isVendaBilheteNormal(Integer tipoVenta) {
|
||||
return tipoVenta == Constantes.TPV_DIRECTO_NORMAL.intValue();
|
||||
}
|
||||
|
||||
|
||||
public boolean isVendaBilheteTroca(Integer tipoVenta) {
|
||||
return tipoVenta == Constantes.TPV_TRANSFERENCIAS.intValue();
|
||||
}
|
||||
|
||||
|
||||
public boolean isVendaBilheteTransferencia(Integer tipoVenta) {
|
||||
return tipoVenta == Constantes.TPV_CAMBIO_VIAJE.intValue();
|
||||
}
|
||||
|
||||
|
||||
public boolean isVendaBilheteManual(Integer tipoVenta) {
|
||||
return tipoVenta == Constantes.TPV_MANUAL.intValue();
|
||||
}
|
||||
|
||||
|
||||
public boolean isVendaBilheteAberto(Integer tipoVenta) {
|
||||
return tipoVenta == Constantes.TPV_BOLETO_ABIERTO.intValue();
|
||||
}
|
||||
|
||||
|
||||
public boolean isVendaBilheteConfirmaAberto(Integer tipoVenta) {
|
||||
return tipoVenta == Constantes.TPV_CONFIRMA_ABIERTO.intValue();
|
||||
}
|
||||
|
||||
|
||||
public boolean isVendaBilheteCheckin(Integer tipoVenta) {
|
||||
return tipoVenta == Constantes.TPV_CHECKIN_VIAGEM.intValue();
|
||||
}
|
||||
|
||||
|
||||
public boolean isSemMotivocancelacion() {
|
||||
return getMotivoCancelacionId() == null;
|
||||
}
|
||||
|
||||
|
||||
public boolean isMotivocancelacionAgrupamento() {
|
||||
return !isSemMotivocancelacion() && getMotivoCancelacionId() == Constantes.MVO_CANCEL_BOLETO_AGRUPAMENTO.intValue();
|
||||
}
|
||||
|
||||
|
||||
public boolean isMotivocancelacionCancelado() {
|
||||
return !isSemMotivocancelacion() && getMotivoCancelacionId() == Constantes.MVO_CANCEL_CANCELACION.intValue();
|
||||
}
|
||||
|
||||
|
||||
public boolean isMotivocancelacionDevolvido() {
|
||||
return !isSemMotivocancelacion() && (getMotivoCancelacionId() == Constantes.MVO_CANCEL_DEVOLUCAO.intValue() ||
|
||||
getMotivoCancelacionId() == Constantes.MVO_CANCEL_DEVOLUCAO_CONTIGENCIA_50.intValue() ||
|
||||
getMotivoCancelacionId() == Constantes.MVO_CANCEL_DEVOLUCAO_CONTIGENCIA_100.intValue());
|
||||
return !isSemMotivocancelacion() && (getMotivoCancelacionId() == Constantes.MVO_CANCEL_DEVOLUCAO.intValue()
|
||||
|| getMotivoCancelacionId() == Constantes.MVO_CANCEL_DEVOLUCAO_CONTIGENCIA_50.intValue()
|
||||
|| getMotivoCancelacionId() == Constantes.MVO_CANCEL_DEVOLUCAO_CONTIGENCIA_100.intValue());
|
||||
}
|
||||
|
||||
|
||||
public boolean isMotivocancelacionEntregaGap() {
|
||||
return !isSemMotivocancelacion() && getMotivoCancelacionId() == Constantes.MVO_CANCEL_BOLETO_ENTREGADO.intValue();
|
||||
return !isSemMotivocancelacion()
|
||||
&& getMotivoCancelacionId() == Constantes.MVO_CANCEL_BOLETO_ENTREGADO.intValue();
|
||||
}
|
||||
|
||||
public boolean isMotivocancelacionTransferido() {
|
||||
return !isSemMotivocancelacion() && getMotivoCancelacionId() == Constantes.MVO_CANCEL_TRANSFERENCIA.intValue();
|
||||
return !isSemMotivocancelacion()
|
||||
&& getMotivoCancelacionId() == Constantes.MVO_CANCEL_TRANSFERENCIA.intValue();
|
||||
}
|
||||
|
||||
|
||||
public boolean isMotivocancelacionTrocado() {
|
||||
return !isSemMotivocancelacion() && getMotivoCancelacionId() == Constantes.MVO_CANCEL_TROCA.intValue();
|
||||
return !isSemMotivocancelacion()
|
||||
&& getMotivoCancelacionId() == Constantes.MVO_CANCEL_TROCA.intValue();
|
||||
}
|
||||
|
||||
|
||||
public boolean isMotivocancelacionCheckin() {
|
||||
return !isSemMotivocancelacion() && getMotivoCancelacionId() == Constantes.MVO_CANCEL_CHECKIN.intValue();
|
||||
return !isSemMotivocancelacion()
|
||||
&& getMotivoCancelacionId() == Constantes.MVO_CANCEL_CHECKIN.intValue();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE MANUAL */
|
||||
public boolean isBilhetesManualVendido() {
|
||||
return isVendaBilheteManual(getTipoVenta()) && isStatusVendido();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE VENDIDO */
|
||||
public boolean isBilheteNormalVendido() {
|
||||
return (isVendaBilheteNormal(getTipoVenta()) && isSemMotivocancelacion() && isStatusVendido()) || // Venda sem alteração
|
||||
(isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTrocado()) || // Venda trocada
|
||||
(isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTransferido()) || // Venda transferida
|
||||
(isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionCancelado()) || // Venda cancelada
|
||||
(isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionDevolvido()) || // Venda devolvida
|
||||
(isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionAgrupamento()) || // Agrupamento de corrida
|
||||
(isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionCheckin()) || // Venda normal Checkin
|
||||
(isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCheckin()) || // Venda troca Checkin
|
||||
(isVendaBilheteTransferencia(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCheckin()) || // Venda transferencia Checkin
|
||||
(isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isSemMotivocancelacion()) || // Novo bilhete da troca
|
||||
(isVendaBilheteTroca(getTipoVenta()) && isStatusVendido() && isSemMotivocancelacion()) || // Novo bilhete de agrupamento de corrida
|
||||
(isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido()) || // Novo bilhete da troca devolvido
|
||||
(isVendaBilheteTransferencia(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado()) || // Novo bilhete transferido devolvido
|
||||
(isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido()) || // Novo bilhete da troca cancelado
|
||||
(isVendaBilheteTransferencia(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado()) || // Novo bilhete transferido cancelado
|
||||
(isVendaBilheteTransferencia(getTipoVenta()) && isStatusEntregue() && isSemMotivocancelacion()); // bilhete transferido entregue
|
||||
if (nombpasajero.startsWith("ABILIO"))
|
||||
System.out.println("break point");
|
||||
|
||||
return (isVendaBilheteNormal(getTipoVenta()) && isSemMotivocancelacion()
|
||||
&& isStatusVendido()) // Venda sem alteração
|
||||
|| (isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTrocado()) // Venda trocada
|
||||
|| (isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTransferido()) // Venda transferida
|
||||
|| (isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionCancelado()) // Venda cancelada
|
||||
|| (isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionDevolvido()) // Venda devolvida
|
||||
|| (isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionAgrupamento() && isBoletoOriginal()) // Agrupamento de corrida
|
||||
|| (isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionCheckin()) // Venda normal Checkin
|
||||
|| (isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCheckin()) // Venda troca Checkin
|
||||
|| (isVendaBilheteTransferencia(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCheckin()) // Venda transferencia Checkin
|
||||
|| (isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isSemMotivocancelacion()) // Novo bilhete da troca
|
||||
|| (isVendaBilheteTroca(getTipoVenta()) && isStatusVendido() && isSemMotivocancelacion()) // Novo bilhete de agrupamento de corrida
|
||||
|| (isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido()) // Novo bilhete da troca devolvido
|
||||
|| (isVendaBilheteTransferencia(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado()) // Novo bilhete transferido devolvido
|
||||
|| (isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido()) // Novo bilhete da troca cancelado
|
||||
|| (isVendaBilheteTransferencia(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado()) // Novo bilhete transferido cancelado
|
||||
|| (isVendaBilheteTransferencia(getTipoVenta()) && isStatusEntregue() && isSemMotivocancelacion()); // bilhete transferido entregue
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteNormalTrocado() {
|
||||
return isVendaBilheteNormal(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionTrocado();
|
||||
return isVendaBilheteNormal(getTipoVenta()) && isStatusCancelado()
|
||||
&& isMotivocancelacionTrocado();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE VENDIDO */
|
||||
public boolean isBilheteNormalChekin() {
|
||||
return isVendaBilheteCheckin(getTipoVenta()) && isStatusVendido();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE VENDIDO */
|
||||
public boolean isBilheteAberto() {
|
||||
return isVendaBilheteAberto(getTipoVenta()) && isStatusVendido();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE VENDIDO */
|
||||
public boolean isBilheteConfirmaAbertoTroca() {
|
||||
return isVendaBilheteConfirmaAberto(getTipoVenta()) && isStatusTroca();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE CANCELADO */
|
||||
public boolean isBilheteConfirmadoAbertoCancelado() {
|
||||
return isVendaBilheteConfirmaAberto(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionCancelado();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteAbertoDevolvido() {
|
||||
return isVendaBilheteConfirmaAberto(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionDevolvido();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteAbertoDevolvidoTrocado() {
|
||||
return isVendaBilheteConfirmaAberto(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionTrocado();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteEntregaAberto() {
|
||||
return isVendaBilheteAberto(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionTrocado();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteNormalDevolvido() {
|
||||
return isVendaBilheteNormal(getTipoVenta()) && isMotivocancelacionDevolvido() && isStatusCancelado();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE CANCELADO */
|
||||
public boolean isBilheteNormalCancelado() {
|
||||
return isVendaBilheteNormal(getTipoVenta()) && isMotivocancelacionCancelado() && isStatusCancelado();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteNormalTrocadoDevolvido() {
|
||||
return isVendaBilheteTroca(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionDevolvido();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteTrocadoDevolvido() {
|
||||
return isVendaBilheteTroca(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionTrocado();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteNormalTransferidoDevolvido() {
|
||||
return isVendaBilheteTransferencia(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionDevolvido();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE CANCELADO */
|
||||
public boolean isBilheteNormalTrocadoCancelado() {
|
||||
return isVendaBilheteTroca(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionCancelado();
|
||||
}
|
||||
|
||||
|
||||
/** ABA GAP VENDIDA */
|
||||
public boolean isBilheteGapVendido() {
|
||||
return (isVendaGap(getTipoVenta()) && isSemMotivocancelacion() && isStatusVendido() && isSemNumFolioSistema()) || // Gap sem alteração
|
||||
(isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionEntregaGap() && isSemNumFolioSistema()) || // Gap entregue
|
||||
(isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionEntregaGap() && isSemNumFolioSistema()) || // Gap entregue
|
||||
(isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTrocado() && isSemNumFolioSistema()) || // Gap trocada
|
||||
(isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTransferido() && isSemNumFolioSistema()) || // Gap transferida
|
||||
(isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionCancelado() && isSemNumFolioSistema()) || // Gap cancelada
|
||||
(isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionDevolvido() && isSemNumFolioSistema()) || // Gap devolvida
|
||||
(isVendaGap(getTipoVenta()) && isStatusTroca() && isSemMotivocancelacion() && isSemNumFolioSistema()) || // Gap Novo bilhete da troca
|
||||
(isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido() && isSemNumFolioSistema()) || // Gap Novo bilhete da troca devolvido
|
||||
(isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado() && isSemNumFolioSistema()) || // Gap Novo bilhete transferido devolvido
|
||||
(isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido() && isSemNumFolioSistema()) || // Gap Novo bilhete da troca cancelado
|
||||
(isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado() && isSemNumFolioSistema()); // Gap Novo bilhete transferido cancelado
|
||||
return (isVendaGap(getTipoVenta()) && isSemMotivocancelacion() && isStatusVendido()
|
||||
&& isSemNumFolioSistema()) // Gap sem alteração
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionEntregaGap() && isSemNumFolioSistema()) // Gap entregue
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionEntregaGap() && isSemNumFolioSistema()) // Gap entregue
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTrocado() && isSemNumFolioSistema()) // Gap trocada
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTransferido() && isSemNumFolioSistema()) // Gap transferida
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionCancelado() && isSemNumFolioSistema()) // Gap cancelada
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionDevolvido() && isSemNumFolioSistema()) // Gap devolvida
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isSemMotivocancelacion() && isSemNumFolioSistema()) // Gap Novo bilhete da troca
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido() && isSemNumFolioSistema()) // Gap Novo bilhete da troca devolvido
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado() && isSemNumFolioSistema()) // Gap Novo bilhete transferido devolvido
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido() && isSemNumFolioSistema()) // Gap Novo bilhete da troca cancelado
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado() && isSemNumFolioSistema()); // Gap Novo bilhete transferido cancelado
|
||||
}
|
||||
|
||||
|
||||
/** ABA GAP DEVOLVIDO */
|
||||
public boolean isBilheteGapTrocado() {
|
||||
return isVendaGap(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionTrocado() && isSemNumFolioSistema();
|
||||
return isVendaGap(getTipoVenta()) && isStatusCancelado()
|
||||
&& isMotivocancelacionTrocado() && isSemNumFolioSistema();
|
||||
}
|
||||
|
||||
|
||||
/** ABA GAP DEVOLVIDO */
|
||||
public boolean isBilheteGapTrocadoDevolvido() {
|
||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionTrocado() && isStatusCancelado() && isSemNumFolioSistema();
|
||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionTrocado()
|
||||
&& isStatusCancelado() && isSemNumFolioSistema();
|
||||
}
|
||||
|
||||
|
||||
/** ABA GAP CANCELADO */
|
||||
public boolean isBilheteGapTrocadoCancelado() {
|
||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionCancelado() && isStatusCancelado() && isSemNumFolioSistema();
|
||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionCancelado()
|
||||
&& isStatusCancelado() && isSemNumFolioSistema();
|
||||
}
|
||||
|
||||
|
||||
/** ABA GAP CANCELADO */
|
||||
public boolean isBilheteGapCancelado() {
|
||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionCancelado() && isStatusCancelado() && isSemNumFolioSistema();
|
||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionCancelado()
|
||||
&& isStatusCancelado() && isSemNumFolioSistema();
|
||||
}
|
||||
|
||||
|
||||
/** ABA GAP DEVOLVIDO */
|
||||
public boolean isBilheteGapDevolvido() {
|
||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionDevolvido() && isStatusCancelado() && isSemNumFolioSistema();
|
||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionDevolvido()
|
||||
&& isStatusCancelado() && isSemNumFolioSistema();
|
||||
}
|
||||
|
||||
/** ABA BILHETE VENDIDO */
|
||||
public boolean isBilheteEntregaGap() {
|
||||
return isVendaGap(getTipoVenta()) && isStatusEntregue() && isComNumFolioSistema();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteEntregaGapTrocado() {
|
||||
return isVendaGap(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionTrocado() && isComNumFolioSistema();
|
||||
return isVendaGap(getTipoVenta()) && isStatusCancelado()
|
||||
&& isMotivocancelacionTrocado() && isComNumFolioSistema();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteEntregaGapDevolvido() {
|
||||
return isVendaGap(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionDevolvido() && isComNumFolioSistema();
|
||||
return isVendaGap(getTipoVenta()) && isStatusCancelado()
|
||||
&& isMotivocancelacionDevolvido() && isComNumFolioSistema();
|
||||
}
|
||||
|
||||
|
||||
/** ABA BILHETE CANCELADO */
|
||||
public boolean isBilheteEntregaGapCancelado() {
|
||||
return isVendaGap(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionCancelado() && isComNumFolioSistema();
|
||||
return isVendaGap(getTipoVenta()) && isStatusCancelado()
|
||||
&& isMotivocancelacionCancelado() && isComNumFolioSistema();
|
||||
}
|
||||
|
||||
|
||||
public boolean isStatusVendido() {
|
||||
return getIndstatusboletoEnum().equals(IndStatusBoleto.V);
|
||||
}
|
||||
|
||||
|
||||
public boolean isStatusCancelado() {
|
||||
return getIndstatusboletoEnum().equals(IndStatusBoleto.C);
|
||||
}
|
||||
|
||||
|
||||
public boolean isStatusEntregue() {
|
||||
return getIndstatusboletoEnum().equals(IndStatusBoleto.E);
|
||||
}
|
||||
|
||||
|
||||
public boolean isStatusTroca() {
|
||||
return getIndstatusboletoEnum().equals(IndStatusBoleto.T);
|
||||
}
|
||||
|
||||
|
||||
public boolean isStatusExtraviado() {
|
||||
return getIndstatusboletoEnum().equals(IndStatusBoleto.X);
|
||||
}
|
||||
|
||||
|
||||
public boolean isStatusMarcado() {
|
||||
return getIndstatusboletoEnum().equals(IndStatusBoleto.M);
|
||||
}
|
||||
|
@ -749,7 +811,7 @@ public class BoletoComissao {
|
|||
public void setNombpasajero(String nombpasajero) {
|
||||
this.nombpasajero = nombpasajero;
|
||||
}
|
||||
|
||||
|
||||
public IndStatusBoleto getIndstatusboletoEnum() {
|
||||
return IndStatusBoleto.getIndStatusBoleto(getIndstatusboleto());
|
||||
}
|
||||
|
@ -769,11 +831,11 @@ public class BoletoComissao {
|
|||
public void setExigeConferenciaDevolvido(boolean exigeConferenciaDevolvido) {
|
||||
this.exigeConferenciaDevolvido = exigeConferenciaDevolvido;
|
||||
}
|
||||
|
||||
|
||||
private boolean isSemNumFolioSistema() {
|
||||
return StringUtils.isBlank(getNumFolioSistema());
|
||||
}
|
||||
|
||||
|
||||
private boolean isComNumFolioSistema() {
|
||||
return StringUtils.isNotBlank(getNumFolioSistema());
|
||||
}
|
||||
|
@ -801,55 +863,51 @@ public class BoletoComissao {
|
|||
public void setCorridaId(Integer corridaId) {
|
||||
this.corridaId = corridaId;
|
||||
}
|
||||
|
||||
|
||||
public String getFeccorridaServico() {
|
||||
StringBuilder str = new StringBuilder();
|
||||
if(getFeccorrida() != null) {
|
||||
if (getFeccorrida() != null) {
|
||||
str.append(DateUtil.getStringDate(getFeccorrida(), "dd/MM"));
|
||||
}
|
||||
|
||||
if(getCorridaId() != null) {
|
||||
if(str.length() > 0) {
|
||||
if (getCorridaId() != null) {
|
||||
if (str.length() > 0) {
|
||||
str.append(" - ");
|
||||
}
|
||||
|
||||
str.append(getCorridaId());
|
||||
}
|
||||
|
||||
|
||||
return str.toString();
|
||||
}
|
||||
|
||||
|
||||
public boolean isBilheteGap() {
|
||||
return isBilheteGapVendido() ||
|
||||
isBilheteGapCancelado() ||
|
||||
isBilheteGapTrocado() ||
|
||||
isBilheteGapTrocadoCancelado() ||
|
||||
isBilheteGapTrocadoDevolvido();
|
||||
return isBilheteGapVendido()
|
||||
|| isBilheteGapCancelado()
|
||||
|| isBilheteGapTrocado()
|
||||
|| isBilheteGapTrocadoCancelado()
|
||||
|| isBilheteGapTrocadoDevolvido();
|
||||
}
|
||||
|
||||
public boolean isTotalizarFormapago() {
|
||||
boolean totalizar = isTotalizarTipovenda();
|
||||
if(totalizar) {
|
||||
if (totalizar) {
|
||||
totalizar = !isOcd();
|
||||
}
|
||||
return totalizar;
|
||||
}
|
||||
|
||||
private boolean isTotalizarTipovenda() {
|
||||
return isBilhetesManualVendido() ||
|
||||
isBilheteNormalVendido() ||
|
||||
isBilheteNormalTrocado() ||
|
||||
isBilheteNormalTrocadoCancelado() ||
|
||||
isBilheteNormalTrocadoDevolvido() ||
|
||||
isBilheteNormalCancelado() ||
|
||||
isBilheteNormalDevolvido() ||
|
||||
isBilheteAberto() ||
|
||||
isBilheteGapCancelado() ||
|
||||
isBilheteGapDevolvido() ||
|
||||
isBilheteGapVendido() ||
|
||||
isBilheteGapTrocadoCancelado() ||
|
||||
isBilheteGapTrocadoDevolvido();
|
||||
|
||||
return isBilhetesManualVendido()
|
||||
|| isBilheteNormalVendido()
|
||||
|| isBilheteNormalTrocado()
|
||||
|| isBilheteNormalTrocadoCancelado()
|
||||
|| isBilheteNormalTrocadoDevolvido()
|
||||
|| isBilheteNormalCancelado()
|
||||
|| isBilheteNormalDevolvido()
|
||||
|| isBilheteAberto()
|
||||
|| isBilheteGapCancelado()
|
||||
|| isBilheteGapDevolvido()
|
||||
|| isBilheteGapVendido()
|
||||
|| isBilheteGapTrocadoCancelado()
|
||||
|| isBilheteGapTrocadoDevolvido();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue