diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioMovimentacaoBilhete.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioMovimentacaoBilhete.java new file mode 100644 index 000000000..7b87699cf --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioMovimentacaoBilhete.java @@ -0,0 +1,505 @@ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import com.rjconsultores.ventaboletos.constantes.Constantes; +import com.rjconsultores.ventaboletos.enums.RelatorioMovimentacaoBilheteStatusEnum; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioGratuidadeBean; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; + +public class RelatorioMovimentacaoBilhete extends Relatorio { + + private List lsDadosRelatorio; + + public RelatorioMovimentacaoBilhete(Map parametros, Connection conexao) throws Exception { + super(parametros, conexao); + + this.setCustomDataSource(new DataSource(this) { + @Override + public void initDados() throws Exception { + + Connection conexao = this.relatorio.getConexao(); + + Map parametros = this.relatorio.getParametros(); + + String fecInicioViagem = null; + if (parametros.containsKey("fecInicioViagem")) { + fecInicioViagem = parametros.get("fecInicioViagem").toString() + " 00:00"; + } + + String fecFinalViagem = null; + if (parametros.containsKey("fecFinalViagem")) { + fecFinalViagem = parametros.get("fecFinalViagem").toString() + " 23:59"; + } + + String fecInicioVenda = null; + if (parametros.containsKey("fecInicioVenda")) { + fecInicioVenda = parametros.get("fecInicioVenda").toString() + " 00:00"; + } + + String fecFinalVenda = null; + if (parametros.containsKey("fecFinalVenda")) { + fecFinalVenda = parametros.get("fecFinalVenda").toString() + " 23:59"; + } + + Integer empresa_id = (Integer) parametros.get("empresa_id"); + Integer agencia_id = (Integer) parametros.get("agencia_id"); + Integer ruta_id = (Integer) parametros.get("ruta_id"); + Integer origem_id = (Integer) parametros.get("origem_id"); + Integer destino_id = (Integer) parametros.get("destino_id"); + Integer orgaoConcedente_id = (Integer) parametros.get("orgao_concedente_id"); + RelatorioMovimentacaoBilheteStatusEnum status = (RelatorioMovimentacaoBilheteStatusEnum) parametros.get("status"); + String categoria_id = (String) parametros.get("categoria_id"); + Integer mcAlteracaoPoltrona = (Integer) (parametros.get("mcAlteracaoPoltrona") != null ? parametros.get("mcAlteracaoPoltrona") : null); + + String sql = getSql(fecInicioViagem, fecFinalViagem, fecInicioVenda, fecFinalVenda, empresa_id, agencia_id, ruta_id, origem_id, destino_id, orgaoConcedente_id, status, categoria_id, mcAlteracaoPoltrona); + + NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql); + + if (fecInicioViagem != null) { + stmt.setString("fecInicioViagem", fecInicioViagem); + } + + if (fecFinalViagem != null) { + stmt.setString("fecFinalViagem", fecFinalViagem); + } + + if (fecInicioVenda != null) { + stmt.setString("fecInicioVenda", fecInicioVenda); + } + + if (fecFinalVenda != null) { + stmt.setString("fecFinalVenda", fecFinalVenda); + } + + if (empresa_id != null) { + stmt.setInt("empresa_id", empresa_id); + } + + if (agencia_id != null) { + stmt.setInt("puntoventa_id", agencia_id); + } + + if (ruta_id != null) { + stmt.setInt("ruta_id", ruta_id); + } + + if (origem_id != null) { + stmt.setInt("origem_id", origem_id); + } + + if (destino_id != null) { + stmt.setInt("destino_id", destino_id); + } + + if (orgaoConcedente_id != null && !orgaoConcedente_id.equals(-1)) { + stmt.setInt("orgao_concedente_id", orgaoConcedente_id); + } + + if (mcAlteracaoPoltrona != null) { + stmt.setInt("mcAlteracaoPoltrona", mcAlteracaoPoltrona); + } + + stmt.setString("bpeEventoAlteracaoPoltrona", Constantes.BPE_ALTERACAO_POLTRONA); + + ResultSet rset = stmt.executeQuery(); + + lsDadosRelatorio = new ArrayList(); + + SimpleDateFormat hora = new SimpleDateFormat("HH:mm"); + SimpleDateFormat data = new SimpleDateFormat("dd/MM/yyyy"); + + while (rset.next()) { + String indstatusboleto = rset.getString("INDSTATUSBOLETO"); + if (indstatusboleto == null) { + indstatusboleto = ""; + } + + if (!addBean(status, indstatusboleto)) { + continue; + } + + RelatorioGratuidadeBean gratuidadeBean = new RelatorioGratuidadeBean(); + gratuidadeBean.setTarifa(rset.getBigDecimal("precio")); + gratuidadeBean.setCcf(rset.getString("ccf")); + gratuidadeBean.setCorridaId(rset.getString("corrida_id")); + gratuidadeBean.setCveusuario(rset.getString("cveusuario")); + gratuidadeBean.setDescnumdoc(rset.getString("descnumdoc")); + gratuidadeBean.setDesctipoventa(rset.getString("desctipoventa")); + gratuidadeBean.setDestino(rset.getString("destino")); + gratuidadeBean.setFeccreacion(rset.getDate("feccreacion")); + gratuidadeBean.setFecdatviaje(rset.getTimestamp("fechorviaje") != null ? data.format(rset.getTimestamp("fechorviaje")) : ""); + gratuidadeBean.setFechorviaje(rset.getTimestamp("fechorviaje") != null ? hora.format(rset.getTimestamp("fechorviaje")) : ""); + gratuidadeBean.setKm(rset.getInt("numkmviaje")); + gratuidadeBean.setLinha(rset.getString("descruta")); + gratuidadeBean.setNombpasajero(rset.getString("nombpasajero")); + gratuidadeBean.setNombpuntoventa(rset.getString("nombpuntoventa")); + gratuidadeBean.setOrigen(rset.getString("origen")); + gratuidadeBean.setPorccategoria(rset.getBigDecimal("porccategoria")); + gratuidadeBean.setPreciooriginal(rset.getBigDecimal("preciooriginal")); + gratuidadeBean.setPreciopagado(rset.getBigDecimal("preciopagado")); + gratuidadeBean.setNombempresa(rset.getString("nombempresa")); + gratuidadeBean.setCvecategoria(rset.getString("cvecategoria")); + gratuidadeBean.setNumasiento(rset.getString("numasiento")); + gratuidadeBean.setDescorigen(rset.getString("descorigen")); + gratuidadeBean.setDescdestino(rset.getString("descdestino")); + gratuidadeBean.setNumfoliosistema(rset.getString("numfoliosistema")); + gratuidadeBean.setTipoDoc(rset.getString("desctipodoc")); + gratuidadeBean.setTipo(rset.getString("desccategoria")); + gratuidadeBean.setSeguro(rset.getBigDecimal("importeseguro")); + gratuidadeBean.setPedagio(rset.getBigDecimal("importepedagio")); + gratuidadeBean.setUtr(rset.getBigDecimal("importetaxaembarque")); + gratuidadeBean.setRg(rset.getString("DESCNUMDOC")); + gratuidadeBean.setStatus(indstatusboleto); + gratuidadeBean.setCodOrigem(rset.getString("codOrigem")); + gratuidadeBean.setCodDestino(rset.getString("codDestino")); + gratuidadeBean.setDescorgao(rset.getString("descorgao")); + + // Mantis 15134 + gratuidadeBean.setDireccionnumero(rset.getString("direccionnumero")); + gratuidadeBean.setDataEmissao(rset.getDate("fechorventa")); + gratuidadeBean.setNumRuta(rset.getString("numruta")); + gratuidadeBean.setPrefixo(rset.getString("prefixo")); + gratuidadeBean.setSerie(rset.getString("serie")); + gratuidadeBean.setSubserie(rset.getString("subserie")); + gratuidadeBean.setNumbpe(rset.getString("num_bpe")); + + if (indstatusboleto.equalsIgnoreCase("TROCA PASSAGEM") + || indstatusboleto.equalsIgnoreCase("TRANSFERÊNCIA") + || indstatusboleto.equalsIgnoreCase("REATIVADO") + || indstatusboleto.equalsIgnoreCase("TROCA TITULARIDADE") + || indstatusboleto.equalsIgnoreCase("TROCA POLTRONA")) { + gratuidadeBean.setSerienovo(rset.getString("serienovo")); + gratuidadeBean.setSubserienovo(rset.getString("subserienovo")); + gratuidadeBean.setCcfnovo(rset.getString("ccfnovo")); + gratuidadeBean.setBpenovo(rset.getString("bpenovo")); + } + + lsDadosRelatorio.add(gratuidadeBean); + } + + if (lsDadosRelatorio.size() > 0) { + setLsDadosRelatorio(lsDadosRelatorio); + } + } + }); + } + + @Override + protected void processaParametros() throws Exception { + } + + private boolean addBean(RelatorioMovimentacaoBilheteStatusEnum status, String indstatusboleto) { + if (status != null && !indstatusboleto.equals("")) { + return indstatusboleto.equalsIgnoreCase(status.getDescricao()) || indstatusboleto.equalsIgnoreCase(status.getRelacionado()); + } + + return true; + } + + private void setLsDadosRelatorio(List lsDadosRelatorio) { + this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio)); + this.lsDadosRelatorio = lsDadosRelatorio; + } + + private String getSql(String fecInicioViagem, String fecFinalViagem, String fecInicioVenda, String fecFinalVenda, Integer empresa_id, Integer agencia_id, Integer ruta_id, Integer origem_id, Integer destino_id, Integer orgaoConcedente_id, RelatorioMovimentacaoBilheteStatusEnum status, String categoria_id, Integer mcAlteracaoPoltrona) { + StringBuilder sb = new StringBuilder(); + sb.append("SELECT * "); + sb.append("FROM "); + sb.append(" (SELECT b.boletooriginal_id, b.boleto_id,"); + sb.append(" b.ccf,"); + sb.append(" og.descorgao,"); + sb.append(" b.feccreacion,"); + sb.append(" ori.cveparada origen,"); + sb.append(" des.cveparada destino,"); + sb.append(" ori.descparada descorigen,"); + sb.append(" des.descparada descdestino,"); + sb.append(" b.numkmviaje,"); + sb.append(" r.descruta,"); + sb.append(" b.corrida_id,"); + sb.append(" b.fechorviaje,"); + sb.append(" b.numasiento,"); + sb.append(" b.numfoliosistema,"); + sb.append(" case when b.tipoventa_id in(5,12,18,41,49) then 'PTA' else tv.desctipoventa end as desctipoventa, "); + sb.append(" b.nombpasajero,"); + sb.append(" b.descnumdoc,"); + sb.append(" tar.preciooriginal,"); + sb.append(" tar.precio,"); + sb.append(" case when b.PRECIOBASE > 0 then TRUNC(((100 - (b.PRECIOPAGADO * 100) / b.PRECIOBASE)),2) else 0 end as porccategoria, "); + sb.append(" (select sum(bfpv.importe) from boleto_formapago bfpv where bfpv.boleto_id = b.boleto_id and bfpv.activo = 1) as preciopagado, ");; + sb.append(" u.cveusuario,"); + sb.append(" ag.nombpuntoventa,"); + sb.append(" ag.direccionnumero,"); + sb.append(" e.nombempresa,"); + sb.append(" ca.cvecategoria,"); + sb.append(" b.desctipodoc,"); + sb.append(" ca.desccategoria,"); + sb.append(" b.importepedagio,"); + sb.append(" b.importeseguro,"); + sb.append(" b.importetaxaembarque, "); + sb.append(" case "); + sb.append(" when b.motivocancelacion_id = 11 "); + sb.append(" and b.indcancelacion = 0 then 'RESERVA' "); + sb.append(" when b.motivocancelacion_id = 9 then 'CONFIRMA RESERVA' "); + sb.append(" when b.motivocancelacion_id = 11 "); + sb.append(" and b.indcancelacion = 1 then 'LIBERA RESERVA' "); + sb.append(" when b.motivocancelacion_id = 12 then 'LIBERA.RESERVA AUTO' "); + sb.append(" when b.indreimpresion = 1 and b.motivoreimpresion_id = 99 then 'REIMPRESSO' "); + sb.append(" else b.indstatusboleto "); + sb.append(" end as indstatusboleto, "); + sb.append(" ori.cveparada codorigem,"); + sb.append(" des.cveparada coddestino,"); + sb.append(" b.fechorventa fechorventa,"); + sb.append(" r.numruta,"); + sb.append(" r.prefixo,"); + sb.append(" aidf.serie serie, "); + sb.append(" aidf.subserie subserie, "); + sb.append(" bpe.num_bpe num_bpe, "); + sb.append(" bpe.chbpe chbpe, "); + sb.append(" bpe.nprot nprot, "); + sb.append(" 'N/A' as serienovo , "); + sb.append(" 'N/A' as subserienovo , "); + sb.append(" 'N/A' as ccfnovo , "); + sb.append(" 'N/A' as bpenovo "); + 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"); + sb.append(" JOIN parada des ON des.parada_id = b.destino_id"); + sb.append(" JOIN ruta r ON r.ruta_id = b.ruta_id"); + sb.append(" JOIN tipo_venta tv ON tv.tipoventa_id = b.tipoventa_id"); + sb.append(" JOIN punto_venta ag ON ag.puntoventa_id = b.puntoventa_id"); + sb.append(" JOIN usuario u ON u.usuario_id = b.usuario_id"); + sb.append(" JOIN vigencia_tarifa vt ON b.fechorventa BETWEEN vt.feciniciovigencia AND vt.fecfinvigencia and vt.activo = 1"); + sb.append(" JOIN tarifa tar ON (tar.ruta_id = b.ruta_id"); + sb.append(" AND tar.marca_id = b.marca_id"); + sb.append(" AND tar.claseservicio_id = b.claseservicio_id"); + sb.append(" AND tar.vigenciatarifa_id = vt.vigenciatarifa_id"); + sb.append(" AND tar.origen_id = b.origen_id"); + sb.append(" AND tar.destino_id = b.destino_id and tar.activo = 1)"); + sb.append(" JOIN marca m on m.marca_id = b.marca_id"); + sb.append(" JOIN empresa e on e.empresa_id = m.empresa_id"); + sb.append(" JOIN orgao_concedente og ON og.orgaoconcedente_id = tar.orgaoconcedente_id"); + sb.append(" LEFT JOIN AIDF AIDF ON AIDF.AIDF_ID = B.AIDF_ID "); + sb.append(" left join bpe bpe on bpe.boleto_id = b.boleto_id "); + sb.append(" WHERE 1=1 and b.tipoventa_id = 15"); + sb.append(" AND b.indstatusboleto = 'S' "); + + if (fecInicioViagem != null && fecFinalViagem != null) { + sb.append("AND b.feccorrida BETWEEN TO_DATE(:fecInicioViagem,'dd/mm/yyyy hh24:mi') AND TO_DATE(:fecFinalViagem,'dd/mm/yyyy hh24:mi') "); + } + + if (fecInicioVenda != null && fecFinalVenda != null) { + sb.append("AND b.fechorventa BETWEEN TO_DATE(:fecInicioVenda,'dd/mm/yyyy hh24:mi') AND TO_DATE(:fecFinalVenda,'dd/mm/yyyy hh24:mi') "); + } + + if (empresa_id != null) { + sb.append("AND e.empresa_id = :empresa_id "); + } + + if (agencia_id != null) { + sb.append("AND b.puntoventa_id = :puntoventa_id "); + } + + if (ruta_id != null) { + sb.append("AND b.ruta_id = :ruta_id "); + } + + if (origem_id != null) { + sb.append("AND ori.parada_id = :origem_id "); + } + + if (destino_id != null) { + sb.append("AND des.parada_id = :destino_id "); + } + + if (categoria_id != null && !categoria_id.isEmpty()) { + sb.append("AND ca.categoria_id in (" + categoria_id + ") "); + } + + if (orgaoConcedente_id != null && !orgaoConcedente_id.equals(-1)) { + sb.append("AND r.orgaoconcedente_id = :orgao_concedente_id "); + } + + sb.append(" "); + sb.append(" UNION ALL "); + sb.append(" "); + sb.append(" SELECT c.transacaooriginal_id, c.transacao_id,"); + sb.append(" c.ccf,"); + sb.append(" og.descorgao,"); + sb.append(" c.feccreacion,"); + sb.append(" ori.cveparada origen,"); + sb.append(" des.cveparada destino,"); + sb.append(" ori.descparada descorigen,"); + sb.append(" des.descparada descdestino,"); + sb.append(" c.numkmviaje,"); + sb.append(" r.descruta,"); + sb.append(" c.corrida_id,"); + sb.append(" c.fechorviaje,"); + sb.append(" c.numasiento,"); + sb.append(" c.numfoliosistema,"); + sb.append(" case when c.numfoliopreimpreso is null then 'PTA' when c.tipoventa_id = '81' then 'VENDA DE TRANSFERENCIA' when c.tipoventa_id = '82' then 'CONFIRM.VEND.ABERTO' when c.tipoventa_id = '8' then 'TROCA' else tv.desctipoventa end as desctipoventa, "); + sb.append(" c.nombpasajero,"); + sb.append(" c.descnumdoc,"); + sb.append(" tar.preciooriginal,"); + sb.append(" tar.precio,"); + sb.append(" case when c.PRECIOBASE > 0 then TRUNC(((100 - (c.PRECIOPAGADO * 100) / c.PRECIOBASE)),2) else 0 end as porccategoria, "); + sb.append(" (select sum(cfpv.importe) from caja_formapago cfpv where cfpv.caja_id = c.caja_id and cfpv.activo = 1) as preciopagado, "); + sb.append(" u.cveusuario,"); + sb.append(" ag.nombpuntoventa,"); + sb.append(" ag.direccionnumero,"); + sb.append(" e.nombempresa,"); + sb.append(" ca.cvecategoria,"); + sb.append(" c.desctipodoc,"); + sb.append(" ca.desccategoria,"); + sb.append(" c.importepedagio,"); + sb.append(" c.importeseguro,"); + sb.append(" c.importetaxaembarque,"); + 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 then 'CHECK-IN' "); + 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' 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' "); + sb.append(" when c.indstatusboleto = 'E' and c.indreimpresion = 1 then 'ENTREGUE' "); + sb.append(" when (c.indstatusboleto = 'T' and c.tipoventa_id = 8) "); + sb.append(" or (c.indstatusboleto = 'T' and c.tipoventa_id not in (81,41,82) and ct.cambiotitularidad_id is null and (bpe.tipoevento is null or bpe.tipoevento <> :bpeEventoAlteracaoPoltrona)) "); + sb.append(" or (c.indstatusboleto = 'T' and c.motivocancelacion_id is null and c.tipoventa_id = 8 and (bpe.tipoevento is null or bpe.tipoevento <> :bpeEventoAlteracaoPoltrona)) "); + sb.append(" then 'TROCA' "); + sb.append(" when c.indstatusboleto = 'T' and c.motivocancelacion_id is null and bpe.tipoevento = :bpeEventoAlteracaoPoltrona then 'POLTRONA ALTERADA' "); + sb.append(" when c.indstatusboleto = 'T' and c.tipoventa_id = 81 then 'TRANSFERIDO' "); + sb.append(" when c.indstatusboleto = 'T' and c.tipoventa_id = 82 then 'CONFIRM.ABERTO' " ); + sb.append(" when c.indstatusboleto = 'C' and c.motivocancelacion_id = 10 then 'TROCA PASSAGEM' " ); + + if (mcAlteracaoPoltrona != null) { + sb.append(" when c.indstatusboleto = 'C' and c.indreimpresion = 1 and c.motivocancelacion_id = :mcAlteracaoPoltrona then 'TROCA POLTRONA' "); + } + + sb.append(" when c.indstatusboleto = 'C' and c.motivocancelacion_id = 27 then 'NO-SHOW' "); + sb.append(" when ct.cambiotitularidad_id is not null then 'TROCA TITULARIDADE' "); + sb.append(" when c.indstatusboleto = 'C' and c.motivocancelacion_id = 23 and (select count(*) from caja c1 where c1.transacao_id=c.transacaoanterior_id and c1.tipoventa_id=41)=0 then 'TRANSFERÊNCIA' "); + sb.append(" when c.indstatusboleto = 'T' and c.tipoventa_id = 41 then 'CHECKIN REATIVADO' "); + sb.append(" when c.indstatusboleto = 'C' and c.motivocancelacion_id = 23 and (select count(*) from caja c1 where c1.transacao_id=c.transacaoanterior_id and c1.tipoventa_id=41)>0 then 'REATIVADO' "); + sb.append(" when c.indreimpresion = 1 and c.motivoreimpresion_id = 99 then 'REIMPRESSO' "); + sb.append(" end as indstatusboleto,"); + sb.append(" ori.cveparada codorigem,"); + sb.append(" des.cveparada coddestino,"); + sb.append(" c.fechorventa fechorventa,"); + sb.append(" r.numruta,"); + sb.append(" r.prefixo,"); + sb.append(" aidf.serie serie, "); + sb.append(" aidf.subserie subserie, "); + sb.append(" bpe.num_bpe num_bpe, "); + sb.append(" bpe.chbpe chbpe, "); + sb.append(" bpe.nprot nprot, "); + sb.append(" cori.ccf as ccfnovo, "); + sb.append(" aidf_ori.serie serienovo, "); + sb.append(" aidf_ori.subserie subserienovo, "); + sb.append(" bpe_ori.num_bpe bpenovo "); + 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"); + sb.append(" JOIN parada des ON des.parada_id = c.destino_id"); + sb.append(" JOIN ruta r ON r.ruta_id = c.ruta_id"); + sb.append(" JOIN tipo_venta tv ON tv.tipoventa_id = c.tipoventa_id"); + sb.append(" JOIN punto_venta ag ON ag.puntoventa_id = c.puntoventa_id"); + sb.append(" JOIN usuario u ON u.usuario_id = c.usuario_id"); + sb.append(" JOIN vigencia_tarifa vt ON c.fechorventa BETWEEN vt.feciniciovigencia AND vt.fecfinvigencia"); + sb.append(" JOIN tarifa tar ON (tar.ruta_id = c.ruta_id"); + sb.append(" AND tar.marca_id = c.marca_id"); + sb.append(" AND tar.claseservicio_id = c.claseservicio_id"); + sb.append(" AND tar.vigenciatarifa_id = vt.vigenciatarifa_id"); + sb.append(" AND tar.origen_id = c.origen_id"); + sb.append(" AND tar.destino_id = c.destino_id and tar.activo = 1)"); + sb.append(" JOIN marca m on m.marca_id = c.marca_id"); + sb.append(" JOIN empresa e on e.empresa_id = m.empresa_id"); + sb.append(" JOIN orgao_concedente og ON og.orgaoconcedente_id = tar.orgaoconcedente_id"); + sb.append(" LEFT JOIN bpe bpe on bpe.boleto_id = c.transacao_id "); + sb.append(" LEFT JOIN cambio_titularidad ct on ct.boleto_id = c.transacao_id "); + sb.append(" LEFT JOIN AIDF AIDF ON AIDF.AIDF_ID = c.AIDF_ID "); + sb.append(" left join bpe bpe on bpe.boleto_id = c.transacao_id "); + sb.append(" left join caja cori on cori.transacao_id = c.transacaooriginal_id "); + sb.append(" LEFT JOIN AIDF aidf_ori ON aidf_ori.AIDF_ID = cori.AIDF_ID "); + sb.append(" left join bpe bpe_ori on bpe_ori.boleto_id = cori.transacao_id "); + sb.append(" WHERE 1=1 "); + sb.append(" and c.motivoreimpresion_id is null "); + sb.append(" and (c.motivocancelacion_id IN ("); + sb.append(carregarMotivosCancelacion(mcAlteracaoPoltrona)); + sb.append(") OR c.motivocancelacion_id IS NULL) "); + sb.append(" AND (c.indreimpresion = 0 "); + sb.append(" OR (c.indstatusboleto IN ('E','T') AND c.indreimpresion = 1) "); + sb.append(" OR (c.indstatusboleto = 'C' AND c.motivocancelacion_id = 27) "); + sb.append(" OR (c.indstatusboleto = 'C' AND c.motivocancelacion_id = 23) "); + + if (mcAlteracaoPoltrona != null) { + sb.append(" OR (c.indstatusboleto = 'C' AND c.indreimpresion = 1 AND c.motivocancelacion_id = :mcAlteracaoPoltrona) "); + } + + sb.append(" ) "); + + if (fecInicioViagem != null && fecFinalViagem != null) { + sb.append("AND c.feccorrida BETWEEN TO_DATE(:fecInicioViagem,'dd/mm/yyyy hh24:mi') AND TO_DATE(:fecFinalViagem,'dd/mm/yyyy hh24:mi') "); + } + + if (fecInicioVenda != null && fecFinalVenda != null) { + sb.append("AND c.fechorventa BETWEEN TO_DATE(:fecInicioVenda,'dd/mm/yyyy hh24:mi') AND TO_DATE(:fecFinalVenda,'dd/mm/yyyy hh24:mi') "); + } + + if (empresa_id != null) { + sb.append("AND e.empresa_id = :empresa_id "); + } + + if (agencia_id != null) { + sb.append("AND c.puntoventa_id = :puntoventa_id "); + } + + if (ruta_id != null) { + sb.append("AND c.ruta_id = :ruta_id "); + } + + if (origem_id != null) { + sb.append("AND ori.parada_id = :origem_id "); + } + + if (destino_id != null) { + sb.append("AND des.parada_id = :destino_id "); + } + + if (categoria_id != null && !categoria_id.isEmpty()) { + sb.append("AND ca.categoria_id in (" + categoria_id + ") "); + } + + if (orgaoConcedente_id != null && !orgaoConcedente_id.equals(-1)) { + sb.append("AND r.orgaoconcedente_id = :orgao_concedente_id "); + } + + sb.append(") "); + sb.append("ORDER BY 5, 15"); + + return sb.toString(); + } + + private String carregarMotivosCancelacion(Integer mcAlteracaoPoltrona) { + List motivosCancelacion = new ArrayList(); + motivosCancelacion.add(31); + motivosCancelacion.add(32); + motivosCancelacion.add(37); + motivosCancelacion.add(10); + motivosCancelacion.add(27); + motivosCancelacion.add(23); + + if(mcAlteracaoPoltrona != null) { + motivosCancelacion.add(mcAlteracaoPoltrona); + } + + return motivosCancelacion.toString().replaceAll("[\\[\\]]", ""); + } +} \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioMovimentacaoBilhete_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioMovimentacaoBilhete_es.properties new file mode 100644 index 000000000..9a30a9eea --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioMovimentacaoBilhete_es.properties @@ -0,0 +1,54 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. +msg.a=à + +#Labels header +header.data.hora=Data/Hora\: +header.pagina=Página\: +header.periodo.viagem=Período Viagem\: +header.periodo.venda=Período Venda\: +header.empresa=Empresa\: + +#Labels detail +detail.empresa=Empresa +detail.codigo.agencia=Cód. Ag. +detail.agencia=Agência +detail.bilheteiro=Bilheteiro +detail.dataMD=Data MD +detail.horaMD=Hora MD +detail.data.emissao=Dt Emis. +detail.hora.emissao=Hr Emis. +detail.data.servico=Dt Serviço +detail.servico=Serviço +detail.hora=Hora +detail.codigo.linha=Cod. Linha +detail.linha=Linha +detail.prefixo=Prefixo +detail.codigo.origem=Cod. Ori. +detail.origem=Origem +detail.codigo.destino=Cod. Dest. +detail.destino=Destino +detail.poltrona=Poltrona +detail.bilhete=Bilhete +detail.serie=Série +detail.subserie=Subsérie +detail.ccf=CCF +detail.bpe=BP-e +detail.passageiro=Passag. +detail.tipo.doc=Tipo Doc. +detail.documento=Doc. +detail.tipo.venda=Tipo Ven. +detail.tipo.passagem=Tipo Pas. +detail.tipo=Tipo +detail.preco=Preço +detail.desconto=Desc. (%) +detail.valor.cobrado=Vlr. Cob. +detail.tarifa=Tarifa +detail.seguro=Seguro +detail.pedagio=Pedágio +detail.utr=UTR +detail.tpp=TPP +detail.status=Status +detail.chave=Ch. BP-e +detail.protocolo=Pt. BP-e +detail.total=Total \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioMovimentacaoBilhete_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioMovimentacaoBilhete_pt_BR.properties new file mode 100644 index 000000000..d3d3cbd53 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioMovimentacaoBilhete_pt_BR.properties @@ -0,0 +1,54 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. +msg.a=à + +#Labels header +header.data.hora=Data/Hora\: +header.pagina=Página\: +header.periodo.viagem=Período Viagem\: +header.periodo.venda=Período Venda\: +header.empresa=Empresa\: + +#Labels detail +detail.empresa=Empresa +detail.codigo.agencia=Cód. Ag. +detail.agencia=Agência +detail.bilheteiro=Bilheteiro +detail.dataMD=Data MD +detail.horaMD=Hora MD +detail.data.emissao=Dt Emis. +detail.hora.emissao=Hr Emis. +detail.data.servico=Dt Serviço +detail.servico=Serviço +detail.hora=Hora +detail.codigo.linha=Cod. Linha +detail.linha=Linha +detail.prefixo=Prefixo +detail.codigo.origem=Cod. Ori. +detail.origem=Origem +detail.codigo.destino=Cod. Dest. +detail.destino=Destino +detail.poltrona=Poltrona +detail.bilhete=Bilhete +detail.serie=Série +detail.subserie=Subsérie +detail.ccf=CCF +detail.bpe=BP-e +detail.passageiro=Passag. +detail.tipo.doc=Tipo Doc. +detail.documento=Doc. +detail.tipo.venda=Tipo Ven. +detail.tipo.passagem=Tipo Pas. +detail.tipo=Tipo +detail.preco=Preço +detail.desconto=Desc. (%) +detail.valor.cobrado=Vlr. Cob. +detail.tarifa=Tarifa +detail.seguro=Seguro +detail.pedagio=Pedágio +detail.utr=UTR +detail.tpp=TPP +detail.status=Status +detail.chave=Ch. BP-e +detail.protocolo=Pt. BP-e +detail.total=Total: \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioMovimentacaoBilhete.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioMovimentacaoBilhete.jasper new file mode 100644 index 000000000..5b91e1108 Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioMovimentacaoBilhete.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioMovimentacaoBilhete.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioMovimentacaoBilhete.jrxml new file mode 100644 index 000000000..11c3d5738 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioMovimentacaoBilhete.jrxml @@ -0,0 +1,800 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <band height="128"> + <textField> + <reportElement uuid="652312bd-292a-424d-a234-5f157e3699c6" x="0" y="0" width="314" height="20"/> + <textElement> + <font size="14" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$P{TITULO}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="e5d4714c-07cc-42ff-a7a8-76d6f6d3e716" x="0" y="25" width="109" height="23"/> + <textElement/> + <textFieldExpression><![CDATA[$R{header.periodo.viagem}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="66b2d0f6-2bf1-4bc7-9ec0-a34444e04d60" x="920" y="0" width="106" height="15"/> + <textElement textAlignment="Right"/> + <textFieldExpression><![CDATA[$R{header.data.hora}]]></textFieldExpression> + </textField> + <textField evaluationTime="Report"> + <reportElement uuid="8ca68351-fc00-4f19-b94f-f2fd1f41964f" x="1082" y="15" width="50" height="15"/> + <textElement/> + <textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="be1692e9-f130-4d08-9173-6ca3e4699030" x="920" y="15" width="106" height="15"/> + <textElement textAlignment="Right"/> + <textFieldExpression><![CDATA[$R{header.pagina}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="4914d9e7-6ce8-4512-b1f8-13f3b572ac50" x="109" y="25" width="205" height="23"/> + <textElement/> + <textFieldExpression><![CDATA[( $P{fecInicioViagem} != null ? ($P{fecInicioViagem} + " à " + $P{fecFinalViagem}) : "" )]]></textFieldExpression> + </textField> + <textField pattern="dd/MM/yyyy HH:mm"> + <reportElement uuid="6f671365-868e-41a6-81ee-a308d1d91e1d" x="1030" y="0" width="102" height="15"/> + <textElement textAlignment="Center"/> + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="7548d623-fb6c-48d4-b8b7-504f5437a79a" x="1030" y="15" width="52" height="15"/> + <textElement textAlignment="Right"/> + <textFieldExpression><![CDATA[$V{PAGE_NUMBER} + " de"]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="a79c03e0-bbe4-4b1c-8297-533a0d137b27" x="0" y="48" width="109" height="21"/> + <textElement/> + <textFieldExpression><![CDATA[$R{header.periodo.venda}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="b31b00a3-1ced-4f9c-acb7-470646f7b335" x="109" y="48" width="205" height="21"/> + <textElement/> + <textFieldExpression><![CDATA[( $P{fecInicioVenda} != null ? ($P{fecInicioVenda} + " à " + $P{fecFinalVenda}) : "" )]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="8fb67bb3-6ff2-40d1-b338-714f199ea7f0" x="0" y="69" width="109" height="20"/> + <textElement/> + <textFieldExpression><![CDATA[$R{header.empresa}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="2c09f3ff-c554-4ce2-886e-eaab93fa15eb" x="250" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.hora}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="e18edb89-17f4-417e-8041-664f11245cbd" x="300" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.linha}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="67851ba5-cc9c-4f37-8857-9e3c5be9b362" x="175" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.hora.emissao}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="93fedb4f-18e2-4d95-82e8-2108d3eb135c" x="150" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.data.emissao}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="3de0b54a-0b10-4556-9b0a-ba8f19989716" x="200" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.data.servico}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="cc834009-ae90-46d4-8bbb-37578b69f621" x="475" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.bilhete}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="842c2e2b-0a9e-4a28-9010-9b0c814c5bcb" x="400" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.codigo.destino}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="94fe9e9b-e231-43b8-aeb8-7bc3eb2d61af" x="450" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.poltrona}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="952c3d60-ade1-4f57-8801-3ef6bc7f2333" x="550" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.ccf}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="e14732be-42a0-4f54-9eb2-52f10ece154b" x="575" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.bpe}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="b34ce751-6969-47b0-aeb7-fff00a5de1e3" x="600" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.passageiro}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="bb3d2388-6bda-4727-ba30-0a5f4612f1a8" x="75" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.bilheteiro}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="6b1fac8d-c098-4893-b1dd-7b64573f0173" x="500" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.serie}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="0948a2fc-fc39-4f2d-ab06-d7c97a66df39" x="325" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.prefixo}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="c4b5d11d-79a1-4850-8294-8ccaa0898bca" x="350" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.codigo.origem}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="2af7bea7-e8bf-424a-9813-c9d2be7c0459" x="100" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.dataMD}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="7b62e459-04bc-4227-be76-24bf5938d552" x="525" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.subserie}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="069eab80-7d6d-4dae-a598-c5014deb81f4" x="425" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.destino}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="5105aee2-c3ec-4571-a14c-06b69218decc" x="725" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.tipo}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="1fe1fad6-d193-4dc1-9696-5614ff9a10d0" x="750" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.preco}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="f3655778-94dd-4fb6-8c84-cf32416201e0" x="650" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.documento}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="b68a4e34-b6e9-4006-8373-707c4e37eb31" x="700" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.tipo.passagem}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="c74391a0-cc07-44f7-90af-3036910e6bb3" x="675" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.tipo.venda}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="aed6f61a-6566-451b-ba78-6964fb2c9f4e" x="225" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.servico}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="2f7626c2-fbea-4cb7-808c-2d7dbbd18ee2" x="275" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.codigo.linha}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="421120df-7852-4311-95a8-93478f8c4a5e" x="0" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.empresa}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="24ef9240-77fe-4c43-b065-4aa214805b3e" x="25" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.codigo.agencia}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="9e0176f6-a8ff-4246-8038-34155064d017" x="375" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.origem}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="97583aa4-45de-402c-8ce9-978c974d6e0c" x="625" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.tipo.doc}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="17200d3a-6195-42d1-bc36-ff2baffb56ce" x="125" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.horaMD}]]></textFieldExpression> + </textField> + <line> + <reportElement uuid="8e2d6686-e4d7-43d5-b3a9-46adc3e58350" x="0" y="127" width="1132" height="1"/> + </line> + <textField> + <reportElement uuid="3541e1b0-8dfe-404e-9461-64d10d85531a" x="109" y="69" width="205" height="20"/> + <textElement/> + <textFieldExpression><![CDATA[$P{nomb_empresa}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="7eac2d13-083c-4765-ba9c-bf61ea645a90" x="50" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.agencia}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="02881959-f862-4a2d-bcd4-ca90edd0b786" x="775" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.desconto}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="6e067b2f-b639-4822-b94f-4f0acb2dc6ca" x="1100" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.bpe}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="02464d08-2223-458e-909f-4292292df196" x="800" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.valor.cobrado}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="a1932a1e-2640-4ee2-a914-623ef8053cf4" x="825" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.tarifa}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="1395a506-7c42-4860-90ca-95ff0b844d0d" x="850" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.seguro}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="c0322d2b-02d0-42ae-b49f-f1d54e154c6b" x="875" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.pedagio}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="658e74a9-91d3-45b7-8214-be6ce1086506" x="900" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.utr}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="727fa0d5-2f10-4ab1-b547-59c425be1a71" x="925" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.tpp}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="fbb64c97-db89-4d47-8908-f3a330ea7f2c" x="950" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.status}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="4c49f3ac-3bdc-48dc-83b8-dc070495746a" x="975" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.chave}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="a4173145-a18f-4693-beff-416547ea596d" x="1075" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.ccf}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="346a2cf5-d4d0-4905-8e4a-b7b94f0cc2e2" x="1050" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.subserie}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="6abad66f-3399-4962-b3e2-a587694afde8" x="1025" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.serie}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="f9999f21-38b4-401d-be1c-b18908237e6a" x="1000" y="118" width="25" height="7"/> + <textElement> + <font size="5"/> + </textElement> + <textFieldExpression><![CDATA[$R{detail.protocolo}]]></textFieldExpression> + </textField> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioGratuidadeBean.java b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioGratuidadeBean.java index 43e5461b6..5d231edc8 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioGratuidadeBean.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioGratuidadeBean.java @@ -41,6 +41,21 @@ public class RelatorioGratuidadeBean { private String codDestino; private String descorgao; private String ccf; + + // Mantis 15134 + private String direccionnumero; + private Date dataEmissao; + private String numRuta; + private String prefixo; + private String serie; + private String subserie; + private String numbpe; + private String chavebpe; + private String protocolobpe; + private String serienovo = "N/A"; + private String subserienovo = "N/A"; + private String ccfnovo = "N/A"; + private String bpenovo = "N/A"; public String getFecdatviaje() { return fecdatviaje; @@ -258,6 +273,100 @@ public class RelatorioGratuidadeBean { public void setTpp(BigDecimal tpp) { this.tpp = tpp; } + public String getDireccionnumero() { + return direccionnumero; + } + public void setDireccionnumero(String direccionnumero) { + this.direccionnumero = direccionnumero; + } + public Date getDataEmissao() { + return dataEmissao; + } + public void setDataEmissao(Date dataEmissao) { + this.dataEmissao = dataEmissao; + } + public String getNumRuta() { + return numRuta; + } + public void setNumRuta(String numRuta) { + this.numRuta = numRuta; + } + public String getPrefixo() { + return prefixo; + } + public void setPrefixo(String prefixo) { + this.prefixo = prefixo; + } - -} + public String getSerie() { + return serie; + } + + public void setSerie(String serie) { + this.serie = serie; + } + + public String getSubserie() { + return subserie; + } + + public void setSubserie(String subserie) { + this.subserie = subserie; + } + + public String getNumbpe() { + return numbpe; + } + + public void setNumbpe(String numbpe) { + this.numbpe = numbpe; + } + + public String getChavebpe() { + return chavebpe; + } + + public void setChavebpe(String chavebpe) { + this.chavebpe = chavebpe; + } + + public String getProtocolobpe() { + return protocolobpe; + } + + public void setProtocolobpe(String protocolobpe) { + this.protocolobpe = protocolobpe; + } + + public String getSerienovo() { + return serienovo; + } + + public void setSerienovo(String serienovo) { + this.serienovo = serienovo; + } + + public String getSubserienovo() { + return subserienovo; + } + + public void setSubserienovo(String subserienovo) { + this.subserienovo = subserienovo; + } + + public String getCcfnovo() { + return ccfnovo; + } + + public void setCcfnovo(String ccfnovo) { + this.ccfnovo = ccfnovo; + } + + public String getBpenovo() { + return bpenovo; + } + + public void setBpenovo(String bpenovo) { + this.bpenovo = bpenovo; + } +} \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioMovimentacaoBilheteController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioMovimentacaoBilheteController.java new file mode 100644 index 000000000..91ed4ce6b --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioMovimentacaoBilheteController.java @@ -0,0 +1,267 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.sql.DataSource; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Controller; +import org.zkoss.util.resource.Labels; +import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zul.Datebox; + +import com.rjconsultores.ventaboletos.constantes.Constantes; +import com.rjconsultores.ventaboletos.entidad.Categoria; +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.MotivoCancelacion; +import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente; +import com.rjconsultores.ventaboletos.entidad.Parada; +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; +import com.rjconsultores.ventaboletos.entidad.Ruta; +import com.rjconsultores.ventaboletos.enums.RelatorioMovimentacaoBilheteStatusEnum; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioMovimentacaoBilhete; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.service.CategoriaService; +import com.rjconsultores.ventaboletos.service.EmpresaService; +import com.rjconsultores.ventaboletos.service.MotivoCancelacionService; +import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService; +import com.rjconsultores.ventaboletos.service.RutaService; +import com.rjconsultores.ventaboletos.web.utilerias.MensagensUtils; +import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar; +import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada; +import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta; +import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; +import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; + +//Mantis 15134 + +@Controller("relatorioMovimentacaoBilheteController") +@Scope("prototype") +@SuppressWarnings("serial") +public class RelatorioMovimentacaoBilheteController extends MyGenericForwardComposer { + + @Autowired + private DataSource dataSourceRead; + + @Autowired + private EmpresaService empresaService; + + @Autowired + private CategoriaService categoriaService; + + @Autowired + private RutaService rutaService; + + @Autowired + private OrgaoConcedenteService orgaoConcedenteService; + + @Autowired + private MotivoCancelacionService motivoCancelacionService; + + private Datebox datInicialViagem; + private Datebox datFinalViagem; + private Datebox datInicialVenda; + private Datebox datFinalVenda; + private MyComboboxEstandar cmbEmpresa; + private MyComboboxPuntoVenta cmbAgencia; + private MyComboboxEstandar cmbLinha; + private MyComboboxParada cmbOrigem; + private MyComboboxParada cmbDestino; + private MyComboboxEstandar cmbOrgaoConcedente; + private MyComboboxEstandar cmbStatus; + private MyComboboxEstandar cmbTipoGratuidade; + + private List lsEmpresas; + private List lsCategorias; + private List lsLinhas; + private List lsOrgaoConcedente; + private List lsStatus; + private List listSelectedTipoGratuidade; + private MyListbox selectedTipoGratuidadeList; + + @Override + public void doAfterCompose(Component comp) throws Exception { + super.doAfterCompose(comp); + + lsEmpresas = empresaService.obtenerTodos(); + lsCategorias = categoriaService.obtenerTodos(); + lsLinhas = rutaService.obtenerTodos(); + lsOrgaoConcedente = orgaoConcedenteService.obtenerTodos(); + lsStatus = RelatorioMovimentacaoBilheteStatusEnum.getListaOrdenada(); + listSelectedTipoGratuidade = new ArrayList(); + } + + public void onClick$btnRemoveTipoGratuidade(Event ev) { + Categoria categoria = (Categoria) selectedTipoGratuidadeList.getSelectedItem().getValue(); + listSelectedTipoGratuidade.remove(categoria); + selectedTipoGratuidadeList.setData(listSelectedTipoGratuidade); + } + + public void onClick$btnAddTipoTipoGratuidade(Event ev) { + if (cmbTipoGratuidade.getSelectedItem() != null) { + listSelectedTipoGratuidade.add((Categoria) cmbTipoGratuidade.getSelectedItem().getValue()); + selectedTipoGratuidadeList.setData(listSelectedTipoGratuidade); + selectedTipoGratuidadeList.setSelectedItem(null); + } + } + + public void onClick$btnExecutarRelatorio(Event ev) throws Exception { + executarRelatorio(); + } + + private void executarRelatorio() throws Exception { + Map parametros = new HashMap(); + parametros.put("TITULO", Labels.getLabel("relatorioMovimentacaoBilheteController.window.title")); + + // Datas + putParametrosDate(parametros, "fecInicioViagem", this.datInicialViagem.getValue()); + putParametrosDate(parametros, "fecFinalViagem", this.datFinalViagem.getValue()); + putParametrosDate(parametros, "fecInicioVenda", this.datInicialVenda.getValue()); + putParametrosDate(parametros, "fecFinalVenda", this.datFinalVenda.getValue()); + + // Validação datas + if (parametros.containsKey("fecInicioViagem") && !parametros.containsKey("fecFinalViagem") || !parametros.containsKey("fecInicioViagem") && parametros.containsKey("fecFinalViagem")) { + MensagensUtils.showMessageInformation(Labels.getLabel("relatorioMovimentacaoBilheteController.data.viagem.obrigatoria"), Labels.getLabel("relatorioMovimentacaoBilheteController.window.title")); + return; + } + + if (parametros.containsKey("fecInicioVenda") && !parametros.containsKey("fecFinalVenda") || !parametros.containsKey("fecInicioVenda") && parametros.containsKey("fecFinalVenda")) { + MensagensUtils.showMessageInformation(Labels.getLabel("relatorioMovimentacaoBilheteController.data.venda.obrigatoria"), Labels.getLabel("relatorioMovimentacaoBilheteController.window.title")); + return; + } + + if (!parametros.containsKey("fecInicioViagem") && !parametros.containsKey("fecFinalViagem") && !parametros.containsKey("fecInicioVenda") && !parametros.containsKey("fecFinalVenda")) { + MensagensUtils.showMessageInformation(Labels.getLabel("relatorioMovimentacaoBilheteController.data.obrigatoria"), Labels.getLabel("relatorioMovimentacaoBilheteController.window.title")); + return; + } + + // Empresa + if (cmbEmpresa.getSelectedIndex() != -1) { + Empresa empresa = (Empresa) cmbEmpresa.getSelectedItem().getValue(); + parametros.put("empresa_id", empresa.getEmpresaId()); + parametros.put("nomb_empresa", empresa.getNombempresa()); + } else { + parametros.put("nomb_empresa", "TODAS" ); + } + + // Agência + if (cmbAgencia.getSelectedIndex() != -1) { + parametros.put("agencia_id", ((PuntoVenta) cmbAgencia.getSelectedItem().getValue()).getPuntoventaId()); + } + + // Linha + if (cmbLinha.getSelectedIndex() != -1) { + parametros.put("ruta_id", ((Ruta) cmbLinha.getSelectedItem().getValue()).getRutaId()); + } + + // Origem + if (cmbOrigem.getSelectedIndex() != -1) { + parametros.put("origem_id", ((Parada) cmbOrigem.getSelectedItem().getValue()).getParadaId()); + } + + // Destino + if (cmbDestino.getSelectedIndex() != -1) { + parametros.put("destino_id", ((Parada) cmbDestino.getSelectedItem().getValue()).getParadaId()); + } + + // Orgão Concedente + if (cmbOrgaoConcedente.getSelectedIndex() != -1) { + OrgaoConcedente orgaoConcedente = (OrgaoConcedente) cmbOrgaoConcedente.getSelectedItem().getValue(); + parametros.put("orgao_concedente_id", orgaoConcedente.getOrgaoConcedenteId()); + parametros.put("orgao_concedente_desc", orgaoConcedente.getDescOrgao()); + } + + // Status + if (cmbStatus.getSelectedIndex() != -1) { + parametros.put("status", (RelatorioMovimentacaoBilheteStatusEnum) cmbStatus.getSelectedItem().getValue()); + } + + // Tipos de Passagens + if (!listSelectedTipoGratuidade.isEmpty()) { + String categoriasExpression = null; + + for (Categoria c : listSelectedTipoGratuidade) { + if (listSelectedTipoGratuidade.indexOf(c) == 0) { + categoriasExpression = c.getCategoriaId().toString(); + } else { + categoriasExpression += ", " + c.getCategoriaId().toString(); + } + } + + parametros.put("categoria_id", categoriasExpression); + } else if (cmbTipoGratuidade.getSelectedIndex() != -1) { + parametros.put("categoria_id", ((Categoria) cmbTipoGratuidade.getSelectedItem().getValue()).getCategoriaId().toString()); + } + + carregarParametroMotivoCancelamentoAlteracaoPoltrona(parametros); + + Relatorio relatorio = new RelatorioMovimentacaoBilhete(parametros, dataSourceRead.getConnection()); + + Map args = new HashMap(); + args.put("relatorio", relatorio); + + openWindow("/component/reportView.zul", Labels.getLabel("relatorioMovimentacaoBilheteController.window.title"), args, MODAL); + } + + private void carregarParametroMotivoCancelamentoAlteracaoPoltrona(Map parametros) { + MotivoCancelacion motivoCancelacion = motivoCancelacionService.findByCveSistema(Constantes.CVESISTEMA_MOTIVO_CANCELAMENTO_ALTERACAO_POLTRONA); + if(motivoCancelacion != null) { + parametros.put("mcAlteracaoPoltrona", motivoCancelacion.getMotivocancelacionId()); + } + } + + private void putParametrosDate(Map parametros, String nomeParametros, Date data) { + if (data != null) { + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + parametros.put(nomeParametros, sdf.format(data)); + } + } + + // gets/sets + public List getLsEmpresas() { + return lsEmpresas; + } + + public void setLsEmpresas(List lsEmpresas) { + this.lsEmpresas = lsEmpresas; + } + + public List getLsCategorias() { + return lsCategorias; + } + + public void setLsCategorias(List lsCategorias) { + this.lsCategorias = lsCategorias; + } + + public List getLsLinhas() { + return lsLinhas; + } + + public void setLsLinhas(List lsLinhas) { + this.lsLinhas = lsLinhas; + } + + public List getLsOrgaoConcedente() { + return lsOrgaoConcedente; + } + + public void setLsOrgaoConcedente(List lsOrgaoConcedente) { + this.lsOrgaoConcedente = lsOrgaoConcedente; + } + + public List getLsStatus() { + return lsStatus; + } + + public void setLsStatus(List lsStatus) { + this.lsStatus = lsStatus; + } +} \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioMovimentacaoBilhete.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioMovimentacaoBilhete.java new file mode 100644 index 000000000..1a522b5be --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioMovimentacaoBilhete.java @@ -0,0 +1,25 @@ +package com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios; + +import org.zkoss.util.resource.Labels; + +import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria; +import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema; + +public class ItemMenuRelatorioMovimentacaoBilhete extends DefaultItemMenuSistema { + + public ItemMenuRelatorioMovimentacaoBilhete() { + super("indexController.mniRelatorioMovimentacaoBilhete.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOMOVIMENTACAOBILHETE"; + } + + @Override + public void ejecutar() { + PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioMovimentacaoBilhete.zul", + Labels.getLabel("relatorioMovimentacaoBilheteController.window.title"), getArgs(), desktop); + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/menu_original.properties b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/menu_original.properties index 7eb44e580..2a8aeac2a 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/menu_original.properties +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/menu_original.properties @@ -174,6 +174,7 @@ analitico.gerenciais.estatisticos.relatorioMovimentoPorOrgaoConcedente=com.rjcon analitico.gerenciais.estatisticos.checkin=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioCheckin analitico.gerenciais.estatisticos.relatorioBaixasVendasInternet=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioBaixasVendasInternet analitico.gerenciais.estatisticos.relatorioVendaEmbarcada=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendaEmbarcada +analitico.gerenciais.estatisticos.movimentacaobilhete=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioMovimentacaoBilhete analitico.gerenciais.financeiro=com.rjconsultores.ventaboletos.web.utilerias.menu.item.analitico.gerenciais.financeiro.SubMenuRelatorioFinanceiro analitico.gerenciais.financeiro.receitaDiariaAgencia=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioReceitaDiariaAgencia analitico.gerenciais.financeiro.taxas=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioTaxasLinha diff --git a/web/WEB-INF/i3-label_es_MX.label b/web/WEB-INF/i3-label_es_MX.label index 45e6249dc..549be2d39 100644 --- a/web/WEB-INF/i3-label_es_MX.label +++ b/web/WEB-INF/i3-label_es_MX.label @@ -280,6 +280,7 @@ indexController.mniRelatorioSisdap.label=SISDAP indexController.mniRelatorioEmpresaCorrida.label = Reporte de la empresa corrida indexController.mniRelatorioEmpresaOnibus.label = Reporte de la empresa autobús indexController.mniRelatorioOCD.label = Reporte de OCD +indexController.mniRelatorioMovimentacaoBilhete.label = Movimentações de Bilhetes indexController.mniRelatorioGratuidade.label = Gratuidades indexController.mniRelatorioGratuidadeANTT.label = Gratuidades ANTT indexController.mniRelatorioExportacaoIdosoARTESP.label = Reporte Exportación Ancianos ARTESP @@ -8273,4 +8274,26 @@ viewTestEmailController.destinatario = Destinatário #relatorioVendasRequisicaoController relatorioVendasRequisicaoController.lbAgruparPor.label = Agrupar por relatorioVendasRequisicaoController.radioTipoRelatorioPorCliente.label = Ordem de Serviço - Secretaria -relatorioVendasRequisicaoController.cliente.label = Cliente \ No newline at end of file +relatorioVendasRequisicaoController.cliente.label = Cliente + +# Relatório Movimentação de Bilhetes +relatorioMovimentacaoBilheteController.window.title = Relatório Movimentações de Bilhetes +relatorioMovimentacaoBilheteController.data.viagem.obrigatoria = É necessário preencher a data inicial e final da viagem +relatorioMovimentacaoBilheteController.data.venda.obrigatoria = É necessário preencher a data inicial e final da venda +relatorioMovimentacaoBilheteController.data.obrigatoria = Data de Viagem ou Data de Venda são obrigatórias +relatorioMovimentacaoBilheteController.lbViagem = Viagem +relatorioMovimentacaoBilheteController.lbDataIniViagem.value = Data Início +relatorioMovimentacaoBilheteController.lbDataFinViagem.value = Data Final +relatorioMovimentacaoBilheteController.lbVenda = Venda +relatorioMovimentacaoBilheteController.lbDataIniVenda.value = Data Início +relatorioMovimentacaoBilheteController.lbDataFinVenda.value = Data Final +relatorioMovimentacaoBilheteController.lbEmpresa.value = Empresa +relatorioMovimentacaoBilheteController.lbAgencia.value = Agência +relatorioMovimentacaoBilheteController.lbLinha.value = Linha +relatorioMovimentacaoBilheteController.lbOrigem.value = Origem +relatorioMovimentacaoBilheteController.lbDestino.value = Destino +relatorioMovimentacaoBilheteController.lbOrgaoConcedente.value = Orgão Concedente +relatorioMovimentacaoBilheteController.lbStatus = Status +relatorioMovimentacaoBilheteController.lbTipoGratuidade.value = Tipos de Passagens +relatorioMovimentacaoBilheteController.lbRemoverLinha.value = Remover Linha +relatorioMovimentacaoBilheteController.lbAdicionarLinha.value = Adicionar Linha \ No newline at end of file diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index e037f406c..e07cded95 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -287,6 +287,7 @@ indexController.mniRelatorioSisdap.label=SISDAP indexController.mniRelatorioEmpresaCorrida.label = Empresa Corrida indexController.mniRelatorioEmpresaOnibus.label = Empresa Ônibus indexController.mniRelatorioOCD.label = Relatório de OCD +indexController.mniRelatorioMovimentacaoBilhete.label = Movimentações de Bilhetes indexController.mniRelatorioGratuidade.label = Relatório Tipo Passagem indexController.mniRelatorioGratuidadeANTT.label = Relatório Gratuidades ANTT indexController.mniRelatorioGratuidadeARTESP.label = Relatório Gratuidade ARTESP @@ -8779,4 +8780,26 @@ viewTestEmailController.destinatario = Destinatário #relatorioVendasRequisicaoController relatorioVendasRequisicaoController.lbAgruparPor.label = Agrupar por relatorioVendasRequisicaoController.radioTipoRelatorioPorCliente.label = Ordem de Serviço - Secretaria -relatorioVendasRequisicaoController.cliente.label = Cliente \ No newline at end of file +relatorioVendasRequisicaoController.cliente.label = Cliente + +# Relatório Movimentação de Bilhetes +relatorioMovimentacaoBilheteController.window.title = Relatório Movimentações de Bilhetes +relatorioMovimentacaoBilheteController.data.viagem.obrigatoria = É necessário preencher a data inicial e final da viagem +relatorioMovimentacaoBilheteController.data.venda.obrigatoria = É necessário preencher a data inicial e final da venda +relatorioMovimentacaoBilheteController.data.obrigatoria = Data de Viagem ou Data de Venda são obrigatórias +relatorioMovimentacaoBilheteController.lbViagem = Viagem +relatorioMovimentacaoBilheteController.lbDataIniViagem.value = Data Início +relatorioMovimentacaoBilheteController.lbDataFinViagem.value = Data Final +relatorioMovimentacaoBilheteController.lbVenda = Venda +relatorioMovimentacaoBilheteController.lbDataIniVenda.value = Data Início +relatorioMovimentacaoBilheteController.lbDataFinVenda.value = Data Final +relatorioMovimentacaoBilheteController.lbEmpresa.value = Empresa +relatorioMovimentacaoBilheteController.lbAgencia.value = Agência +relatorioMovimentacaoBilheteController.lbLinha.value = Linha +relatorioMovimentacaoBilheteController.lbOrigem.value = Origem +relatorioMovimentacaoBilheteController.lbDestino.value = Destino +relatorioMovimentacaoBilheteController.lbOrgaoConcedente.value = Orgão Concedente +relatorioMovimentacaoBilheteController.lbStatus = Status +relatorioMovimentacaoBilheteController.lbTipoGratuidade.value = Tipos de Passagens +relatorioMovimentacaoBilheteController.lbRemoverLinha.value = Remover Linha +relatorioMovimentacaoBilheteController.lbAdicionarLinha.value = Adicionar Linha \ No newline at end of file diff --git a/web/gui/relatorios/filtroRelatorioMovimentacaoBilhete.zul b/web/gui/relatorios/filtroRelatorioMovimentacaoBilhete.zul new file mode 100644 index 000000000..6e046fbb6 --- /dev/null +++ b/web/gui/relatorios/filtroRelatorioMovimentacaoBilhete.zul @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +