bug#15134
dev: qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@97657 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
75e794a954
commit
5a90691c09
|
@ -187,7 +187,9 @@ public class RelatorioMovimentacaoBilhete extends Relatorio {
|
|||
|
||||
lsDadosRelatorio.add(bean);
|
||||
|
||||
addCheckin(status, rset, lsDadosRelatorio, bean);
|
||||
addCheckin(rset, lsDadosRelatorio, bean);
|
||||
|
||||
addTitularidadeTrocada(rset, lsDadosRelatorio, bean);
|
||||
|
||||
filtrarStatus(status, lsDadosRelatorio);
|
||||
}
|
||||
|
@ -203,7 +205,7 @@ public class RelatorioMovimentacaoBilhete extends Relatorio {
|
|||
protected void processaParametros() throws Exception {
|
||||
}
|
||||
|
||||
private void addCheckin(RelatorioMovimentacaoBilheteStatusEnum status, ResultSet rset, List<RelatorioMovimentacaoBilheteBean> lsDadosRelatorio, RelatorioMovimentacaoBilheteBean bean) throws SQLException, CloneNotSupportedException {
|
||||
private void addCheckin(ResultSet rset, List<RelatorioMovimentacaoBilheteBean> lsDadosRelatorio, RelatorioMovimentacaoBilheteBean bean) throws SQLException, CloneNotSupportedException {
|
||||
if (rset.getInt("checkin") == 1) {
|
||||
RelatorioMovimentacaoBilheteBean beanNovo = bean.getClone();
|
||||
beanNovo.setStatus(RelatorioMovimentacaoBilheteStatusEnum.CHECK_IN.getStatusRelatorio());
|
||||
|
@ -211,6 +213,14 @@ public class RelatorioMovimentacaoBilhete extends Relatorio {
|
|||
}
|
||||
}
|
||||
|
||||
private void addTitularidadeTrocada(ResultSet rset, List<RelatorioMovimentacaoBilheteBean> lsDadosRelatorio, RelatorioMovimentacaoBilheteBean bean) throws SQLException, CloneNotSupportedException {
|
||||
if (rset.getInt("titularidade_trocada") == 1) {
|
||||
RelatorioMovimentacaoBilheteBean beanNovo = bean.getClone();
|
||||
beanNovo.setStatus(RelatorioMovimentacaoBilheteStatusEnum.TROCA_TITULARIDADE.getStatusRelatorio());
|
||||
lsDadosRelatorio.add(beanNovo);
|
||||
}
|
||||
}
|
||||
|
||||
private void filtrarStatus(RelatorioMovimentacaoBilheteStatusEnum status, List<RelatorioMovimentacaoBilheteBean> lsDadosRelatorio) {
|
||||
if (status != null) {
|
||||
Iterator<RelatorioMovimentacaoBilheteBean> iterator = lsDadosRelatorio.iterator();
|
||||
|
@ -218,10 +228,6 @@ public class RelatorioMovimentacaoBilhete extends Relatorio {
|
|||
while (iterator.hasNext()) {
|
||||
RelatorioMovimentacaoBilheteBean bean = iterator.next();
|
||||
|
||||
// if (!bean.getStatus().equalsIgnoreCase(status.getStatusRelatorio()) && !bean.getStatus().equalsIgnoreCase(status.getStatusRelatorioAnterior())) {
|
||||
// iterator.remove();
|
||||
// }
|
||||
|
||||
if (bean.getStatus().equalsIgnoreCase(status.getStatusRelatorio())) {
|
||||
continue;
|
||||
} else if (isPossuiElemento(status.getStatusRelatorioAnterior(), bean.getStatus())) {
|
||||
|
@ -298,7 +304,8 @@ public class RelatorioMovimentacaoBilhete extends Relatorio {
|
|||
sb.append(" 'N/A' as ccfnovo , ");
|
||||
sb.append(" 'N/A' as bpenovo, ");
|
||||
sb.append(" b.importetpp, ");
|
||||
sb.append(" 0 as checkin ");
|
||||
sb.append(" 0 as checkin, ");
|
||||
sb.append(" 0 as titularidade_trocada ");
|
||||
sb.append(" FROM boleto b");
|
||||
sb.append(" JOIN categoria ca ON b.categoria_id = ca.categoria_id");
|
||||
sb.append(" JOIN parada ori ON ori.parada_id = b.origen_id");
|
||||
|
@ -392,8 +399,7 @@ public class RelatorioMovimentacaoBilhete extends Relatorio {
|
|||
sb.append(" c.importepedagio,");
|
||||
sb.append(" c.importeseguro,");
|
||||
sb.append(" c.importetaxaembarque,");
|
||||
sb.append(" case when c.indstatusboleto = 'V' and (select count(*) from caja c1 join cambio_titularidad ct1 on ct1.boleto_id = c1.transacao_id where c1.activo=1 and c1.transacaooriginal_id=c.transacao_id)>0 then 'TITULARIDADE TROCADA' ");
|
||||
sb.append(" when c.indstatusboleto = 'V' then 'VENDIDO' ");
|
||||
sb.append(" case when c.indstatusboleto = 'V' then 'VENDIDO' ");
|
||||
sb.append(" when c.indstatusboleto = 'C' and c.motivocancelacion_id = 31 then 'CANCELADO' ");
|
||||
sb.append(" when c.indstatusboleto = 'C' and c.motivocancelacion_id = 32 then 'DEVOLVIDO' ");
|
||||
sb.append(" when c.indstatusboleto = 'C' and c.motivocancelacion_id = 37 then 'CANCEC. EMERG' ");
|
||||
|
@ -421,7 +427,7 @@ public class RelatorioMovimentacaoBilhete extends Relatorio {
|
|||
sb.append(" when c.indstatusboleto = 'C' and c.motivocancelacion_id = 27 then 'NO-SHOW' ");
|
||||
|
||||
// TITULARIDADE TROCADA e TROCA TITULARIDADE
|
||||
sb.append(" when c.indstatusboleto = 'V' and (select count(*) from caja c1 join cambio_titularidad ct1 on ct1.boleto_id = c1.transacao_id where c1.activo=1 and c1.transacaooriginal_id=c.transacao_id)>0 then 'TITULARIDADE TROCADA' ");
|
||||
// sb.append(" when c.indstatusboleto = 'V' and (select count(*) from caja c1 join cambio_titularidad ct1 on ct1.boleto_id = c1.transacao_id where c1.activo=1 and c1.transacaooriginal_id=c.transacao_id)>0 then 'TITULARIDADE TROCADA' ");
|
||||
sb.append(" when ct.cambiotitularidad_id is not null then 'TROCA TITULARIDADE' ");
|
||||
|
||||
// CHECKIN REATIVADO e REATIVADO
|
||||
|
@ -446,7 +452,8 @@ public class RelatorioMovimentacaoBilhete extends Relatorio {
|
|||
sb.append(" aidf_ori.subserie subserienovo, ");
|
||||
sb.append(" bpe_ori.num_bpe bpenovo, ");
|
||||
sb.append(" c.importetpp, ");
|
||||
sb.append(" case when c.indstatusboleto = 'V' and (select count(*) from boleto_checkin bc1 where bc1.activo=1 and bc1.boletooriginal_id=c.transacao_id)=0 and c.fechorviaje > c.fechorventa then 1 else 0 end as checkin ");
|
||||
sb.append(" case when c.indstatusboleto = 'V' and (select count(*) from boleto_checkin bc1 where bc1.activo=1 and bc1.boletooriginal_id=c.transacao_id)=0 and c.fechorviaje > c.fechorventa then 1 else 0 end as checkin, ");
|
||||
sb.append(" case when c.indstatusboleto = 'V' and (select count(*) from caja c1 join cambio_titularidad ct1 on ct1.boleto_id = c1.transacao_id where c1.activo=1 and c1.transacaooriginal_id=c.transacao_id)>0 then 1 else 0 end as titularidade_trocada ");
|
||||
sb.append(" FROM caja c");
|
||||
sb.append(" JOIN categoria ca ON c.categoria_id = ca.categoria_id");
|
||||
sb.append(" JOIN parada ori ON ori.parada_id = c.origen_id");
|
||||
|
|
Loading…
Reference in New Issue