wilian 2016-04-20 21:40:05 +00:00
parent 210f25ffcf
commit d9a67778b6
2 changed files with 17 additions and 8 deletions

View File

@ -499,11 +499,11 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
} }
public boolean isBilhetesNormalVendido(BoletoComissao boletoComissao) { public boolean isBilhetesNormalVendido(BoletoComissao boletoComissao) {
return (boletoComissao.getTipoVenta() == Constantes.TPV_DIRECTO_NORMAL.intValue() || return (boletoComissao.getTipoVenta() == Constantes.TPV_DIRECTO_NORMAL.intValue() || boletoComissao.getTipoVenta() == Constantes.TPV_CHECKIN_VIAGEM.intValue())
boletoComissao.getTipoVentaOriginal() == Constantes.TPV_DIRECTO_NORMAL.intValue()) && &&
(boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.V.getShortValue()) || (boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.V.getShortValue()) &&
(boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.T.getShortValue()) && (boletoComissao.getMotivoCancelacionId() == null ||
boletoComissao.getMotivoCancelacionId() == null)); boletoComissao.getMotivoCancelacionId() == Constantes.MVO_CANCEL_TROCA.intValue()));
} }
public boolean isBilhetesImpresso(BoletoComissao boletoComissao) { public boolean isBilhetesImpresso(BoletoComissao boletoComissao) {
@ -528,7 +528,6 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
public boolean isBilhetesNormalTrocado(BoletoComissao boletoComissao) { public boolean isBilhetesNormalTrocado(BoletoComissao boletoComissao) {
return (boletoComissao.getTipoVenta() == Constantes.TPV_TRANSFERENCIAS.intValue() && return (boletoComissao.getTipoVenta() == Constantes.TPV_TRANSFERENCIAS.intValue() &&
(boletoComissao.getTipoVentaOriginal() == Constantes.TPV_DIRECTO_NORMAL.intValue()) && (boletoComissao.getTipoVentaOriginal() == Constantes.TPV_DIRECTO_NORMAL.intValue()) &&
boletoComissao.getMotivoCancelacionId() != null &&
boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.T.getShortValue())) boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.T.getShortValue()))
|| ||
(boletoComissao.getTipoVenta() == Constantes.TPV_TRANSFERENCIAS.intValue() && (boletoComissao.getTipoVenta() == Constantes.TPV_TRANSFERENCIAS.intValue() &&
@ -543,14 +542,15 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
} }
public boolean isBilhetesNormalTranferido(BoletoComissao boletoComissao) { public boolean isBilhetesNormalTranferido(BoletoComissao boletoComissao) {
return boletoComissao.getTipoVenta() == Constantes.TPV_CAMBIO_VIAJE.intValue() && return (boletoComissao.getTipoVenta() == Constantes.TPV_CAMBIO_VIAJE.intValue()) &&
boletoComissao.getTipoVentaOriginal() == Constantes.TPV_DIRECTO_NORMAL.intValue() && boletoComissao.getTipoVentaOriginal() == Constantes.TPV_DIRECTO_NORMAL.intValue() &&
boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.T.getShortValue()); boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.T.getShortValue());
} }
public boolean isBilhetesGapVendido(BoletoComissao boletoComissao) { public boolean isBilhetesGapVendido(BoletoComissao boletoComissao) {
return boletoComissao.getTipoVenta() == Constantes.TPV_BOLETO_REMOTO.intValue() && return boletoComissao.getTipoVenta() == Constantes.TPV_BOLETO_REMOTO.intValue() &&
boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.V.getShortValue()); (boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.V.getShortValue()) ||
boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.T.getShortValue()));
} }
public boolean isBilhetesGapCancelado(BoletoComissao boletoComissao) { public boolean isBilhetesGapCancelado(BoletoComissao boletoComissao) {

View File

@ -366,6 +366,15 @@ public class BoletoComissao {
} else if(getIndstatusboleto().equalsIgnoreCase(IndStatusBoleto.C.getShortValue()) && } else if(getIndstatusboleto().equalsIgnoreCase(IndStatusBoleto.C.getShortValue()) &&
StringUtils.isNotBlank(getDescmotivocancelacion())) { StringUtils.isNotBlank(getDescmotivocancelacion())) {
return getDescmotivocancelacion(); return getDescmotivocancelacion();
} else if(getIndstatusboleto().equalsIgnoreCase(IndStatusBoleto.T.getShortValue())) {
if (tipoVenta == Constantes.TPV_TRANSFERENCIAS.intValue()) {
return "TROCADO";
} else if (tipoVenta == Constantes.TPV_CAMBIO_VIAJE.intValue()) {
return "TRANSFERIDO";
} else {
IndStatusBoleto indStatusBoleto = IndStatusBoleto.getIndStatusBoleto(getIndstatusboleto());
return indStatusBoleto != null ? indStatusBoleto.getValue() : "";
}
} else { } else {
IndStatusBoleto indStatusBoleto = IndStatusBoleto.getIndStatusBoleto(getIndstatusboleto()); IndStatusBoleto indStatusBoleto = IndStatusBoleto.getIndStatusBoleto(getIndstatusboleto());
return indStatusBoleto != null ? indStatusBoleto.getValue() : ""; return indStatusBoleto != null ? indStatusBoleto.getValue() : "";