fixes bug #8776
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@66942 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
5637dc58e0
commit
23365a9877
|
@ -12,13 +12,14 @@ import java.util.Collection;
|
|||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.hibernate.Hibernate;
|
||||
|
@ -30,6 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
||||
import com.rjconsultores.ventaboletos.dao.ConferenciaComissaoDAO;
|
||||
import com.rjconsultores.ventaboletos.dao.ContaCorrenteAgenciaDAO;
|
||||
|
@ -705,10 +707,13 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
|
|||
.append("BO1.MOTIVOCANCELACION_ID \"motivoCancelacionOriginal1\", BO2.MOTIVOCANCELACION_ID \"motivoCancelacionOriginal2\", ")
|
||||
.append("NVL(tarifa.PRECIO,0) + NVL(tarifa.IMPORTEPEDAGIO,0) + NVL(tarifa.IMPORTETAXAEMBARQUE,0) + NVL(tarifa.IMPORTESEGURO,0) + NVL(tarifa.IMPORTEOUTROS,0) AS \"valorTabela\", ")
|
||||
.append("NVL(OCD.VALOR_PAGAR,0) AS \"valorPagarOcd\", NVL(OCD.VALOR_TARJETA,0) AS \"valorTarjetaOcd\", ")
|
||||
.append("B.INDCANCELACION AS \"indCancelacion\" ")
|
||||
.append("B.INDCANCELACION AS \"indCancelacion\", ")
|
||||
.append("BA.TIPOVENTA_ID AS \"tipoventaAnteriorId\", ")
|
||||
.append("BA.BOLETO_ID AS \"boletoAnteriorId\" ")
|
||||
.append("FROM BOLETO B ")
|
||||
.append("LEFT JOIN BOLETO BO1 ON BO1.BOLETO_ID = B.BOLETOORIGINAL_ID ")
|
||||
.append("LEFT JOIN BOLETO BO2 ON BO2.BOLETO_ID = BO1.BOLETOORIGINAL_ID ")
|
||||
.append("LEFT JOIN BOLETO BA ON BA.BOLETO_ID = B.BOLETOANTERIOR_ID ")
|
||||
.append("LEFT JOIN OCD OCD ON B.BOLETOORIGINAL_ID = OCD.BOLETO_ID ")
|
||||
.append("LEFT JOIN PARADA ORI ON ORI.PARADA_ID = B.ORIGEN_ID ")
|
||||
.append("LEFT JOIN CIUDAD CID ON CID.CIUDAD_ID = ORI.PARADA_ID ")
|
||||
|
@ -783,6 +788,8 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
|
|||
.addScalar("valorPagarOcd", Hibernate.BIG_DECIMAL)
|
||||
.addScalar("valorTarjetaOcd", Hibernate.BIG_DECIMAL)
|
||||
.addScalar("indCancelacion", Hibernate.BOOLEAN)
|
||||
.addScalar("tipoventaAnteriorId", Hibernate.INTEGER)
|
||||
.addScalar("boletoAnteriorId", Hibernate.LONG)
|
||||
.setResultTransformer(Transformers.aliasToBean(BoletoComissao.class));
|
||||
setParametros(qr, parametros);
|
||||
|
||||
|
@ -790,7 +797,7 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
|
|||
List<BoletoComissao> auxLsBoletoComissao = qr.list();
|
||||
for (BoletoComissao boletoComissao : auxLsBoletoComissao) {
|
||||
if (boletoComissao.getFormapagos() == null) {
|
||||
boletoComissao.setFormapagos(new HashSet<FormapagoVO>());
|
||||
boletoComissao.setFormapagos(new ArrayList<FormapagoVO>());
|
||||
}
|
||||
|
||||
if (lsBoletoComissao.contains(boletoComissao)) {
|
||||
|
@ -800,10 +807,18 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
|
|||
? boletoComissao.getComempcategoriaId() : aux.getComempcategoriaId());
|
||||
aux.setComempformapagoId(boletoComissao.getComempformapagoId() != null
|
||||
? boletoComissao.getComempformapagoId() : aux.getComempformapagoId());
|
||||
aux.getFormapagos().add(new FormapagoVO(boletoComissao.getFormapagoId(),
|
||||
boletoComissao.getDescpago(),
|
||||
boletoComissao.getIndconferenciafisicacomissao(),
|
||||
boletoComissao.getImporteFp()));
|
||||
|
||||
FormapagoVO formapagoVO = new FormapagoVO(boletoComissao.getFormapagoId(),
|
||||
boletoComissao.getDescpago(),
|
||||
boletoComissao.getIndconferenciafisicacomissao(),
|
||||
boletoComissao.getImporteFp());
|
||||
|
||||
if(aux.getFormapagos().contains(formapagoVO)) {
|
||||
formapagoVO = aux.getFormapagos().get(aux.getFormapagos().indexOf(formapagoVO));
|
||||
formapagoVO.setImporte(formapagoVO.getImporte().add(boletoComissao.getImporteFp()));
|
||||
} else {
|
||||
aux.getFormapagos().add(formapagoVO);
|
||||
}
|
||||
lsBoletoComissao.set(indice, aux);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -286,6 +286,10 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
|||
private Set<BoletoComissao> carregarBilhetesGapsVendidos(List<BoletoComissao> boletoComissaos, ComEmpConferencia comEmpConferencia) {
|
||||
Set<BoletoComissao> boletos = new HashSet<BoletoComissao>();
|
||||
for (BoletoComissao boletoComissao : boletoComissaos) {
|
||||
if(boletoComissao.getNumoperacion().equals("010047068229")) {
|
||||
System.out.println("");
|
||||
}
|
||||
|
||||
if (boletoComissao.isAbaGapVendido()) {
|
||||
|
||||
if (comEmpConferencia != null) {
|
||||
|
@ -379,7 +383,8 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
|||
BigDecimal total = BigDecimal.ZERO;
|
||||
if (lsBoletoComissao != null) {
|
||||
for (BoletoComissao boletoComissao : lsBoletoComissao) {
|
||||
if (lStatusBilhete == null || lStatusBilhete.contains(boletoComissao.getIndstatusboletoEnum())) {
|
||||
if ((lStatusBilhete == null || lStatusBilhete.contains(boletoComissao.getIndstatusboletoEnum())) &&
|
||||
!boletoComissao.isVendaBilheteConfirmaAberto(boletoComissao.getTipoVenta())) {
|
||||
total = total.add(boletoComissao.getTotal());
|
||||
}
|
||||
}
|
||||
|
@ -459,7 +464,6 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
|||
List<FormapagoVO> totalFormapagos = new ArrayList<FormapagoVO>();
|
||||
for (BoletoComissao boletoComissao : boletoComissaos) {
|
||||
if (boletoComissao.isTotalizarFormapago()) {
|
||||
|
||||
for (FormapagoVO formapagoBoleto : boletoComissao.getFormapagos()) {
|
||||
FormapagoVO formapago;
|
||||
if (totalFormapagos.contains(formapagoBoleto)) {
|
||||
|
@ -471,12 +475,10 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
|||
|
||||
if (boletoComissao.isStatusVendido() || boletoComissao.isStatusTroca()) {
|
||||
formapago.add(formapagoBoleto.getImporte());
|
||||
} else if (boletoComissao.isStatusCancelado() &&
|
||||
(boletoComissao.isMotivocancelacionCancelado() || boletoComissao.isMotivocancelacionDevolvido() || boletoComissao.isMotivocancelacionTrocado())) {
|
||||
} else if (boletoComissao.isAbaBilheteCancelado() || boletoComissao.isAbaBilheteDevolvido() || boletoComissao.isAbaGapCancelado() || boletoComissao.isAbaGapDevolvido()) {
|
||||
formapago.subtract(formapagoBoleto.getImporte());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,10 @@ package com.rjconsultores.ventaboletos.vo.comissao;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
||||
import com.rjconsultores.ventaboletos.constantes.DescricaoTipoVenta;
|
||||
import com.rjconsultores.ventaboletos.enums.IndStatusBoleto;
|
||||
|
@ -54,7 +56,7 @@ public class BoletoComissao {
|
|||
private Boolean indconferenciafisicacomissao;
|
||||
private BigDecimal importeFp;
|
||||
|
||||
private Set<FormapagoVO> formapagos;
|
||||
private List<FormapagoVO> formapagos;
|
||||
private BigDecimal icmsBase;
|
||||
private String nombusuario;
|
||||
private Integer comempformapagoId;
|
||||
|
@ -74,6 +76,9 @@ public class BoletoComissao {
|
|||
|
||||
private Boolean indCancelacion;
|
||||
|
||||
private Integer tipoventaAnteriorId;
|
||||
private Long boletoAnteriorId;
|
||||
|
||||
public Integer getEmpresaId() {
|
||||
return empresaId;
|
||||
}
|
||||
|
@ -329,11 +334,11 @@ public class BoletoComissao {
|
|||
this.indconferenciafisicacomissao = indconferenciafisicacomissao;
|
||||
}
|
||||
|
||||
public Set<FormapagoVO> getFormapagos() {
|
||||
public List<FormapagoVO> getFormapagos() {
|
||||
return formapagos;
|
||||
}
|
||||
|
||||
public void setFormapagos(Set<FormapagoVO> formapagos) {
|
||||
public void setFormapagos(List<FormapagoVO> formapagos) {
|
||||
this.formapagos = formapagos;
|
||||
}
|
||||
|
||||
|
@ -480,8 +485,12 @@ public class BoletoComissao {
|
|||
}
|
||||
|
||||
public Integer getTipoVentaOriginal() {
|
||||
return tipoVentaOriginal2 != null ? tipoVentaOriginal2
|
||||
: tipoVentaOriginal1 != null ? tipoVentaOriginal1 : tipoVenta;
|
||||
if(isVendaBilheteTroca(tipoVenta) || isVendaBilheteTransferencia(tipoVenta)) {
|
||||
return tipoVentaOriginal2 != null ? tipoVentaOriginal2
|
||||
: tipoVentaOriginal1 != null ? tipoVentaOriginal1
|
||||
: tipoventaAnteriorId != null ? tipoventaAnteriorId : tipoVenta;
|
||||
}
|
||||
return tipoVenta;
|
||||
}
|
||||
|
||||
public Integer getTipoVentaOriginal1() {
|
||||
|
@ -631,220 +640,6 @@ public class BoletoComissao {
|
|||
(isVendaBilheteAbertoManual(getTipoVentaOriginal()) && isStatusVendido() && isMotivocancelacionTransferido()); // Venda transferida;
|
||||
}
|
||||
|
||||
/** 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() && isMotivocancelacionGeracaoOcd()) // Venda devolvida com OCD
|
||||
|| (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
|
||||
|| (isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isMotivocancelacionGeracaoOcd()) // Novo bilhete da troca devolvido com OCD
|
||||
|| (isVendaBilheteTransferencia(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado()) // Novo bilhete transferido devolvido
|
||||
|| (isVendaBilheteTransferencia(getTipoVenta()) && isStatusTroca() && isMotivocancelacionGeracaoOcd()) // Novo bilhete transferido devolvido com OCD
|
||||
|| (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();
|
||||
}
|
||||
|
||||
/** 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()) || isVendaBilheteAberto(tipoVenta)) && 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 isBilheteAbertoDevolvidoComOcd() {
|
||||
return (isVendaBilheteConfirmaAberto(getTipoVenta()) || isVendaBilheteAberto(tipoVenta)) && isStatusCancelado() && isMotivocancelacionGeracaoOcd();
|
||||
}
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteNormalDevolvido() {
|
||||
return isVendaBilheteNormal(getTipoVenta()) && isMotivocancelacionDevolvido() && isStatusCancelado();
|
||||
}
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteNormalDevolvidoComOcd() {
|
||||
return isVendaBilheteNormal(getTipoVenta()) && isMotivocancelacionGeracaoOcd() && 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 isBilheteNormalTrocadoDevolvidoComOcd() {
|
||||
return isVendaBilheteTroca(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionGeracaoOcd();
|
||||
}
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteTrocadoDevolvidoComOcd() {
|
||||
return isVendaBilheteTroca(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionGeracaoOcd();
|
||||
}
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteNormalTransferidoDevolvido() {
|
||||
return isVendaBilheteTransferencia(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionDevolvido();
|
||||
}
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteNormalTransferidoTrocado() {
|
||||
return isVendaBilheteTransferencia(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionTrocado();
|
||||
}
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteNormalTransferidoDevolvidoComOcd() {
|
||||
return isVendaBilheteTransferencia(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionGeracaoOcd();
|
||||
}
|
||||
|
||||
/** ABA BILHETE CANCELADO */
|
||||
public boolean isBilheteNormalTrocadoCancelado() {
|
||||
return isVendaBilheteTroca(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionCancelado();
|
||||
}
|
||||
|
||||
/** ABA GAP VENDIDA */
|
||||
public boolean isBilheteGapVendido() {
|
||||
return (isVendaGap(getTipoVenta()) && isSemMotivocancelacion() && isStatusVendido()) // Gap sem alteração
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionEntregaGap()) // Gap entregue
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionEntregaGap()) // Gap entregue
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTrocado()) // Gap trocada
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTransferido()) // Gap transferida
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionCancelado()) // Gap cancelada
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionDevolvido()) // Gap devolvida
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionCheckin()) // Gap Checkin
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isSemMotivocancelacion()) // Gap Novo bilhete da troca
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido()) // Gap Novo bilhete da troca devolvido
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado()) // Gap Novo bilhete transferido devolvido
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido()) // Gap Novo bilhete da troca cancelado
|
||||
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado()); // Gap Novo bilhete transferido cancelado
|
||||
}
|
||||
|
||||
/** ABA GAP DEVOLVIDO */
|
||||
public boolean isBilheteGapTrocado() {
|
||||
return isVendaGap(getTipoVenta()) && isStatusCancelado()
|
||||
&& isMotivocancelacionTrocado() && isSemNumFolioSistema();
|
||||
}
|
||||
|
||||
/** ABA GAP DEVOLVIDO */
|
||||
public boolean isBilheteGapTrocadoDevolvido() {
|
||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionTrocado()
|
||||
&& isStatusCancelado() && isSemNumFolioSistema();
|
||||
}
|
||||
|
||||
/** ABA GAP DEVOLVIDO */
|
||||
public boolean isBilheteGapTrocadoDevolvidoComOcd() {
|
||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionGeracaoOcd()
|
||||
&& isStatusCancelado() && isSemNumFolioSistema();
|
||||
}
|
||||
|
||||
/** ABA GAP CANCELADO */
|
||||
public boolean isBilheteGapTrocadoCancelado() {
|
||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionCancelado()
|
||||
&& isStatusCancelado() && isSemNumFolioSistema();
|
||||
}
|
||||
|
||||
/** ABA GAP CANCELADO */
|
||||
public boolean isBilheteGapCancelado() {
|
||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionCancelado()
|
||||
&& isStatusCancelado() && isSemNumFolioSistema();
|
||||
}
|
||||
|
||||
/** ABA GAP DEVOLVIDO */
|
||||
public boolean isBilheteGapDevolvido() {
|
||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionDevolvido()
|
||||
&& isStatusCancelado() && isSemNumFolioSistema();
|
||||
}
|
||||
|
||||
/** ABA GAP DEVOLVIDO */
|
||||
public boolean isBilheteGapDevolvidoComOcd() {
|
||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionGeracaoOcd()
|
||||
&& 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();
|
||||
}
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteEntregaGapDevolvido() {
|
||||
return isVendaGap(getTipoVenta()) && isStatusCancelado()
|
||||
&& isMotivocancelacionDevolvido() && isComNumFolioSistema();
|
||||
}
|
||||
|
||||
/** ABA BILHETE DEVOLVIDO */
|
||||
public boolean isBilheteEntregaGapDevolvidoComOcd() {
|
||||
return isVendaGap(getTipoVenta()) && isStatusCancelado()
|
||||
&& isMotivocancelacionGeracaoOcd() && isComNumFolioSistema();
|
||||
}
|
||||
|
||||
/** ABA BILHETE CANCELADO */
|
||||
public boolean isBilheteEntregaGapCancelado() {
|
||||
return isVendaGap(getTipoVenta()) && isStatusCancelado()
|
||||
&& isMotivocancelacionCancelado() && isComNumFolioSistema();
|
||||
}
|
||||
|
||||
public boolean isStatusVendido() {
|
||||
return getIndstatusboletoEnum().equals(IndStatusBoleto.V);
|
||||
}
|
||||
|
@ -897,14 +692,6 @@ public class BoletoComissao {
|
|||
this.exigeConferenciaDevolvido = exigeConferenciaDevolvido;
|
||||
}
|
||||
|
||||
private boolean isSemNumFolioSistema() {
|
||||
return StringUtils.isBlank(getNumFolioSistema());
|
||||
}
|
||||
|
||||
private boolean isComNumFolioSistema() {
|
||||
return StringUtils.isNotBlank(getNumFolioSistema());
|
||||
}
|
||||
|
||||
public boolean isExigeConferenciaAba() {
|
||||
return exigeConferenciaAba;
|
||||
}
|
||||
|
@ -953,11 +740,7 @@ public class BoletoComissao {
|
|||
}
|
||||
|
||||
public boolean isBilheteGap() {
|
||||
return isBilheteGapVendido()
|
||||
|| isBilheteGapCancelado()
|
||||
|| isBilheteGapTrocado()
|
||||
|| isBilheteGapTrocadoCancelado()
|
||||
|| isBilheteGapTrocadoDevolvido();
|
||||
return isAbaGapVendido() || isAbaGapCancelado() || isAbaGapDevolvido();
|
||||
}
|
||||
|
||||
public boolean isTotalizarFormapago() {
|
||||
|
@ -970,20 +753,13 @@ public class BoletoComissao {
|
|||
}
|
||||
|
||||
private boolean isTotalizarTipovenda() {
|
||||
return isBilhetesManualVendido()
|
||||
|| isBilheteNormalVendido()
|
||||
|| isBilheteNormalTrocado()
|
||||
|| isBilheteNormalTrocadoCancelado()
|
||||
|| isBilheteNormalTrocadoDevolvido()
|
||||
|| isBilheteNormalCancelado()
|
||||
|| isBilheteNormalDevolvido()
|
||||
|| isBilheteAberto()
|
||||
|| isBilheteGapCancelado()
|
||||
|| isBilheteGapDevolvido()
|
||||
|| isBilheteGapVendido()
|
||||
|| isBilheteGapTrocadoCancelado()
|
||||
|| isBilheteGapTrocadoDevolvido()
|
||||
|| isBilhetesAbertoManualVendido();
|
||||
return isAbaBilheteCancelado() ||
|
||||
isAbaBilheteDevolvido() ||
|
||||
isAbaGapCancelado() ||
|
||||
isAbaGapDevolvido() ||
|
||||
isAbaBilheteManual() ||
|
||||
isAbaGapVendido() ||
|
||||
isAbaBilheteVendido();
|
||||
}
|
||||
|
||||
public String getOrderExigeConferencia() {
|
||||
|
@ -997,59 +773,96 @@ public class BoletoComissao {
|
|||
return "C";
|
||||
}
|
||||
|
||||
/** Define bilhete na aba de venda manual */
|
||||
public boolean isAbaBilheteManual() {
|
||||
return isBilhetesManualVendido() ||
|
||||
isBilhetesAbertoManualVendido();
|
||||
}
|
||||
|
||||
/** Define bilhete na aba de venda normal */
|
||||
public boolean isAbaBilheteVendido() {
|
||||
return isBilheteNormalVendido() ||
|
||||
isBilheteEntregaGap() ||
|
||||
isBilheteNormalChekin() ||
|
||||
isBilheteAberto() ||
|
||||
isBilheteConfirmaAbertoTroca() ||
|
||||
isBilheteEntregaAberto();
|
||||
if(isStatusCancelado()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(isMotivocancelacionTransferido()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(isVendaGap(getTipoVentaOriginal()) && !isStatusEntregue()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isStatusVendido() || isStatusEntregue() || isStatusTroca();
|
||||
}
|
||||
|
||||
/** Define bilhete na aba de venda manual cancelada */
|
||||
public boolean isAbaBilheteCancelado() {
|
||||
return isBilheteNormalCancelado() ||
|
||||
isBilheteNormalTrocadoCancelado() ||
|
||||
isBilheteConfirmadoAbertoCancelado() ||
|
||||
isBilheteEntregaGapCancelado();
|
||||
if(!isStatusCancelado()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(isVendaGap(getTipoVentaOriginal())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isMotivocancelacionCancelado();
|
||||
}
|
||||
|
||||
/** Define bilhete na aba de venda manual devolvida */
|
||||
public boolean isAbaBilheteDevolvido() {
|
||||
return isBilheteNormalDevolvido() ||
|
||||
isBilheteNormalTrocado() ||
|
||||
isBilheteNormalTrocadoDevolvido() ||
|
||||
isBilheteTrocadoDevolvido() ||
|
||||
isBilheteNormalTransferidoDevolvido() ||
|
||||
isBilheteNormalTransferidoTrocado() ||
|
||||
isBilheteAbertoDevolvido() ||
|
||||
isBilheteAbertoDevolvidoTrocado() ||
|
||||
isBilheteEntregaGapDevolvido() ||
|
||||
isBilheteEntregaGapTrocado() ||
|
||||
isBilheteAbertoDevolvidoComOcd() ||
|
||||
isBilheteEntregaGapDevolvidoComOcd() ||
|
||||
isBilheteNormalDevolvidoComOcd() ||
|
||||
isBilheteNormalTransferidoDevolvidoComOcd() ||
|
||||
isBilheteNormalTrocadoDevolvidoComOcd() ||
|
||||
isBilheteTrocadoDevolvidoComOcd();
|
||||
if(!isStatusCancelado()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(isVendaGap(getTipoVentaOriginal())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isMotivocancelacionDevolvido() || isMotivocancelacionGeracaoOcd() || isMotivocancelacionTrocado();
|
||||
}
|
||||
|
||||
/** Define bilhete na aba de gap */
|
||||
public boolean isAbaGapVendido() {
|
||||
return isBilheteGapVendido();
|
||||
if(isStatusCancelado()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(isMotivocancelacionTransferido()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isVendaGap(getTipoVentaOriginal())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isStatusVendido() || isStatusEntregue() || isStatusTroca();
|
||||
}
|
||||
|
||||
/** Define bilhete na aba de gap cancelada */
|
||||
public boolean isAbaGapCancelado() {
|
||||
return isBilheteGapCancelado();
|
||||
if(!isStatusCancelado()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isVendaGap(getTipoVentaOriginal())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isMotivocancelacionCancelado();
|
||||
}
|
||||
|
||||
/** Define bilhete na aba de gap devolvida */
|
||||
public boolean isAbaGapDevolvido() {
|
||||
return isBilheteGapDevolvido() ||
|
||||
isBilheteGapTrocado() ||
|
||||
isBilheteGapDevolvidoComOcd() ||
|
||||
isBilheteGapTrocadoDevolvidoComOcd();
|
||||
if(!isStatusCancelado()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isVendaGap(getTipoVentaOriginal())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isMotivocancelacionDevolvido() || isMotivocancelacionGeracaoOcd() || isMotivocancelacionTrocado();
|
||||
}
|
||||
|
||||
public BigDecimal getValorPagarOcd() {
|
||||
|
@ -1076,6 +889,20 @@ public class BoletoComissao {
|
|||
this.indCancelacion = indCancelacion;
|
||||
}
|
||||
|
||||
public Integer getTipoventaAnteriorId() {
|
||||
return tipoventaAnteriorId;
|
||||
}
|
||||
|
||||
public void setTipoventaAnteriorId(Integer tipoventaAnteriorId) {
|
||||
this.tipoventaAnteriorId = tipoventaAnteriorId;
|
||||
}
|
||||
|
||||
public Long getBoletoAnteriorId() {
|
||||
return boletoAnteriorId;
|
||||
}
|
||||
|
||||
public void setBoletoAnteriorId(Long boletoAnteriorId) {
|
||||
this.boletoAnteriorId = boletoAnteriorId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -16,6 +16,11 @@ public class FormapagoVO {
|
|||
super();
|
||||
}
|
||||
|
||||
public FormapagoVO(Integer formapagoId) {
|
||||
super();
|
||||
this.formapagoId = formapagoId;
|
||||
}
|
||||
|
||||
public FormapagoVO(Integer formapagoId, String descpago, Boolean indconferenciafisicacomissao, BigDecimal importeFp) {
|
||||
this();
|
||||
this.formapagoId = formapagoId;
|
||||
|
|
Loading…
Reference in New Issue