diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBPeSubstituido.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBPeSubstituido.java new file mode 100644 index 000000000..e1d8217a2 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBPeSubstituido.java @@ -0,0 +1,225 @@ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayDataSource; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.utilerias.DateUtil; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +public class RelatorioBPeSubstituido extends Relatorio { + + public RelatorioBPeSubstituido(Map parametros, Connection conexao) throws Exception { + + super(parametros, conexao); + + this.setCustomDataSource(new ArrayDataSource(this) { + + public void initDados() throws Exception { + Connection conexao = this.relatorio.getConexao(); + Map parametros = this.relatorio.getParametros(); + + String sql = getSql(parametros); + + Date dtInicio = (Date) parametros.get("DATA_INICIO"); + Date dtFim = (Date) parametros.get("DATA_FIM"); + + NamedParameterStatement ps = new NamedParameterStatement(conexao, sql.toString()); + if(dtInicio != null && dtFim != null) { + ps.setString("dataInicio", DateUtil.getStringDate(dtInicio, "dd/MM/yyyy") + " 00:00:00"); + ps.setString("dataFinal", DateUtil.getStringDate(dtFim, "dd/MM/yyyy") + " 23:59:59"); + } + + ps.setString("empresa_id", (String) parametros.get("EMPRESA_ID") ); + + ResultSet rset = ps.executeQuery(); + + while (rset.next()) { + Map dataResult = new HashMap(); + + dataResult.put("cod_origem_venda", rset.getString("cod_origem_venda")); + dataResult.put("cod_destino_venda", rset.getString("cod_destino_venda")); + dataResult.put("desc_origem_venda", rset.getString("desc_origem_venda")); + dataResult.put("desc_destino_venda", rset.getString("desc_destino_venda")); + dataResult.put("cod_origem_remarcado", rset.getString("cod_origem_remarcado")); + dataResult.put("cod_destino_remarcado", rset.getString("cod_destino_remarcado")); + dataResult.put("desc_origem_remarcado", rset.getString("desc_origem_remarcado")); + dataResult.put("desc_destino_remarcado", rset.getString("desc_destino_remarcado")); + dataResult.put("tpp_venda", rset.getBigDecimal("tpp_venda")); + dataResult.put("tpp_remarcado", rset.getBigDecimal("tpp_remarcado")); + dataResult.put("bilhete_venda", rset.getString("bilhete_venda")); + dataResult.put("bilhete_remarcado", rset.getString("bilhete_remarcado")); + dataResult.put("assento_venda", rset.getString("assento_venda")); + dataResult.put("assento_remarcado", rset.getString("assento_remarcado")); + dataResult.put("data_viagem", rset.getDate("data_viagem")); + dataResult.put("data_viagem_remarcado", rset.getDate("data_viagem_remarcado")); + dataResult.put("tarifa_venda", rset.getBigDecimal("tarifa_venda")); + dataResult.put("tarifa_remarcado", rset.getBigDecimal("tarifa_remarcado")); + dataResult.put("desconto_venda", rset.getBigDecimal("desconto_venda")); + dataResult.put("multa", rset.getBigDecimal("multa")); + dataResult.put("valor_passagem_venda", rset.getBigDecimal("valor_passagem_venda")); + dataResult.put("valor_passagem_remarcado", rset.getBigDecimal("valor_passagem_remarcado")); + dataResult.put("taxa_embarque_venda", rset.getBigDecimal("taxa_embarque_venda")); + dataResult.put("taxa_embarque_remarcado", rset.getBigDecimal("taxa_embarque_remarcado")); + dataResult.put("seguro_venda", rset.getBigDecimal("seguro_venda")); + dataResult.put("seguro_remarcado", rset.getBigDecimal("seguro_remarcado")); + dataResult.put("pedagio_venda", rset.getBigDecimal("pedagio_venda")); + dataResult.put("pedagio_remarcado", rset.getBigDecimal("pedagio_remarcado")); + dataResult.put("cliente_venda", rset.getString("cliente_venda")); + dataResult.put("cliente_remarcado", rset.getString("cliente_remarcado")); + dataResult.put("tipo_documento_venda", rset.getString("tipo_documento_venda")); + dataResult.put("tipo_documento_remarcado", rset.getString("tipo_documento_remarcado")); + dataResult.put("documento_venda", rset.getString("documento_venda")); + dataResult.put("documento_remarcado", rset.getString("documento_remarcado")); + dataResult.put("servico_venda", rset.getString("servico_venda")); + dataResult.put("servico_remarcado", rset.getString("servico_remarcado")); + dataResult.put("data_venda", rset.getDate("data_venda")); + dataResult.put("data_remarcacao", rset.getDate("data_remarcacao")); + dataResult.put("agencia_venda", rset.getString("agencia_venda")); + dataResult.put("agencia_remarcado", rset.getString("agencia_remarcado")); + dataResult.put("chbpe_original", rset.getString("chbpe_original")); + dataResult.put("chbpe_remarcado", rset.getString("chbpe_remarcado")); + dataResult.put("num_bpe_original", rset.getString("num_bpe_original")); + dataResult.put("num_bpe_remarcado", rset.getString("num_bpe_remarcado")); + dataResult.put("numserie_original", rset.getString("numserie_original")); + dataResult.put("numserie_remarcado", rset.getString("numserie_remarcado")); + dataResult.put("qrcode_original", rset.getString("qrcode_original")); + dataResult.put("qrcode_remarcado", rset.getString("qrcode_remarcado")); + dataResult.put("valor_total_venda", rset.getBigDecimal("valor_total_venda")); + dataResult.put("valor_total_remarcado", rset.getBigDecimal("valor_total_remarcado")); + + this.dados.add(dataResult); + } + + this.resultSet = rset; + } + }); + } + + @Override + protected void processaParametros() throws Exception { + } + + private String getSql(Map parametros) { + + StringBuilder sql = new StringBuilder(1400); + + String estados = (String) parametros.get("ESTADOS_ID"); + String empresaId = (String) parametros.get("EMPRESA_ID"); + String puntoVentaId = (String) parametros.get("PUNTOVENTA_ID"); + + sql.append(" SELECT "); + sql.append(" origem.cveparada cod_origem_venda, "); + sql.append(" destino.cveparada cod_destino_venda, "); + sql.append(" origem.descparada desc_origem_venda, "); + sql.append(" destino.descparada desc_destino_venda, "); + sql.append(" po.cveparada cod_origem_remarcado, "); + sql.append(" pd.cveparada cod_destino_remarcado, "); + sql.append(" po.descparada desc_origem_remarcado, "); + sql.append(" pd.descparada desc_destino_remarcado, "); + sql.append(" coalesce(original.importetpp, 0) tpp_venda, "); + sql.append(" coalesce(remarcado.importetpp, 0) tpp_remarcado, "); + sql.append(" remarcado.numfoliosistema bilhete_remarcado, "); + sql.append(" remarcado.fechorviaje data_viagem_remarcado, "); + sql.append(" remarcado.numasiento assento_remarcado, "); + sql.append(" original.numasiento assento_venda, "); + sql.append(" original.numfoliosistema bilhete_venda, "); + sql.append(" original.fechorviaje data_viagem, "); + sql.append(" coalesce(original.preciobase, 0) tarifa_venda, "); + sql.append(" coalesce(original.preciopricing, 0) desconto_venda, "); + sql.append(" coalesce(original.preciopagado, 0) valor_passagem_venda, "); + sql.append(" coalesce(remarcado.preciopagado, 0) valor_passagem_remarcado, "); + sql.append(" coalesce(remarcado.preciobase, 0) tarifa_remarcado, "); + sql.append(" coalesce(original.importetaxaembarque, 0) taxa_embarque_venda, "); + sql.append(" coalesce(remarcado.importetaxaembarque, 0) taxa_embarque_remarcado, "); + sql.append(" coalesce(original.importeseguro, 0) seguro_venda, "); + sql.append(" coalesce(remarcado.importeseguro, 0) seguro_remarcado, "); + sql.append(" coalesce(original.importepedagio, 0) pedagio_venda, "); + sql.append(" coalesce(remarcado.importepedagio, 0) pedagio_remarcado, "); + sql.append(" original.nombpasajero cliente_venda, "); + sql.append(" remarcado.nombpasajero cliente_remarcado, "); + sql.append(" original.desctipodoc tipo_documento_remarcado, "); + sql.append(" remarcado.desctipodoc tipo_documento_venda, "); + sql.append(" remarcado.descnumdoc documento_remarcado, "); + sql.append(" original.descnumdoc documento_venda, "); + sql.append(" original.corrida_id servico_venda, "); + sql.append(" remarcado.corrida_id servico_remarcado, "); + sql.append(" remarcado.fechorventa data_remarcacao, "); + sql.append(" original.fechorventa data_venda, "); + sql.append(" ptv.nombpuntoventa agencia_venda, "); + sql.append(" ptr.nombpuntoventa agencia_remarcado, "); + sql.append(" bpe.chbpe chbpe_original, "); + sql.append(" original.num_bpe num_bpe_original, "); + sql.append(" original.numserie_bpe numserie_original, "); + sql.append(" bpe.qrcode qrcode_original, "); + sql.append(" bper.chbpe chbpe_remarcado, "); + sql.append(" remarcado.num_bpe num_bpe_remarcado, "); + sql.append(" coalesce(remarcado.numserie_bpe, '1') numserie_remarcado, "); + sql.append(" bper.qrcode qrcode_remarcado, "); + sql.append(" ( select "); + sql.append(" coalesce(impingreso, 0) "); + sql.append(" FROM evento_extra "); + sql.append(" WHERE boleto_id = remarcado.boleto_id "); + sql.append(" ) AS multa, "); + sql.append(" ( "); + sql.append(" SELECT "); + sql.append(" SUM(coalesce(bfpv.importe, 0)) "); + sql.append(" FROM "); + sql.append(" boleto_formapago bfpv "); + sql.append(" WHERE "); + sql.append(" bfpv.boleto_id = original.boleto_id "); + sql.append(" AND bfpv.activo = 1 "); + sql.append(" ) AS valor_total_venda, "); + sql.append(" ( "); + sql.append(" SELECT "); + sql.append(" SUM(coalesce(bfpr.importe, 0)) "); + sql.append(" FROM "); + sql.append(" boleto_formapago bfpr "); + sql.append(" WHERE "); + sql.append(" bfpr.boleto_id = remarcado.boleto_id "); + sql.append(" AND bfpr.activo = 1 "); + sql.append(" ) AS valor_total_remarcado "); + sql.append(" FROM "); + sql.append(" bpe bpe "); + sql.append(" INNER JOIN boleto original ON original.boleto_id = bpe.boleto_id AND bpe.activo = 1 "); + sql.append(" INNER JOIN BPE bper on bper.bpesubstituicao_id = bpe.bpe_id and bper.activo = 1 "); + sql.append(" INNER JOIN boleto remarcado ON remarcado.boleto_id = bper.boleto_id "); + sql.append(" INNER JOIN parada origem ON origem.parada_id = original.origen_id "); + sql.append(" INNER JOIN parada destino ON destino.parada_id = original.destino_id "); + sql.append(" INNER JOIN parada po ON po.parada_id = remarcado.origen_id "); + sql.append(" INNER JOIN parada pd ON pd.parada_id = remarcado.destino_id "); + sql.append(" INNER JOIN punto_venta ptv ON ptv.puntoventa_id = original.puntoventa_id "); + sql.append(" INNER JOIN punto_venta ptr ON ptr.puntoventa_id = remarcado.puntoventa_id "); + sql.append(" INNER JOIN empresa e ON remarcado.empresacorrida_id = e.empresa_id "); + sql.append(" INNER JOIN empresa ev ON original.empresacorrida_id = ev.empresa_id "); + sql.append(" INNER JOIN ruta rr ON remarcado.ruta_id = rr.ruta_id "); + sql.append(" INNER JOIN ruta ro ON original.ruta_id = ro.ruta_id "); + sql.append(" "); + sql.append(" WHERE "); + sql.append(" bpe.CODSTAT IN ('100', '102') "); + sql.append(" AND bper.BPE_ID IS NOT NULL "); + + if (empresaId != null) { + sql.append(" AND original.empresacorrida_id = :empresa_id "); + } + + if (puntoVentaId != null) { + sql.append(" AND original.puntoventa_id IN ( " + puntoVentaId + " ) "); + } + + if (estados != null) { + sql.append(" AND bpe.uf IN ( " + estados + " )"); + } + + sql.append(" AND coalesce(original.fechorventa_h, original.fechorventa) >= to_date(:dataInicio, 'DD/MM/YYYY HH24:MI:SS') "); + sql.append(" AND coalesce(original.fechorventa_h, original.fechorventa) <= to_date(:dataFinal, 'DD/MM/YYYY HH24:MI:SS') "); + sql.append(" ORDER BY "); + sql.append(" agencia_remarcado, data_remarcacao "); + + return sql.toString(); + } +} \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBpeNumeracaoReuso.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBpeNumeracaoReuso.java new file mode 100644 index 000000000..139a50ff7 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBpeNumeracaoReuso.java @@ -0,0 +1,146 @@ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayDataSource; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioBpeNumeracaoReusoBean; +import com.rjconsultores.ventaboletos.utilerias.DateUtil; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; + +public class RelatorioBpeNumeracaoReuso extends Relatorio { + + private List lsDadosRelatorio; + + public RelatorioBpeNumeracaoReuso(Map parametros, Connection conexao) throws Exception { + + super(parametros, conexao); + + this.setCustomDataSource(new ArrayDataSource(this) { + + public void initDados() throws Exception { + Connection conexao = this.relatorio.getConexao(); + Map parametros = this.relatorio.getParametros(); + + String sql = getSql(parametros); + + Date dtInicio = (Date) parametros.get("DATA_INICIO"); + Date dtFim = (Date) parametros.get("DATA_FIM"); + + NamedParameterStatement ps = new NamedParameterStatement(conexao, sql.toString()); + if(dtInicio != null && dtFim != null) { + ps.setString("dataInicio", DateUtil.getStringDate(dtInicio, "dd/MM/yyyy") + " 00:00:00"); + ps.setString("dataFinal", DateUtil.getStringDate(dtFim, "dd/MM/yyyy") + " 23:59:59"); + } + + ResultSet rset = ps.executeQuery(); + lsDadosRelatorio = new ArrayList(); + + while (rset.next()) { + RelatorioBpeNumeracaoReusoBean bean = new RelatorioBpeNumeracaoReusoBean(); + bean.setEstado(rset.getString("estado")); + bean.setSerieBPE(rset.getString("serieBPE")); + bean.setNumeroBPE( rset.getInt("numeroBPE")); + lsDadosRelatorio.add(bean); + } + buscarInicialFinalPorUf(); + setLsDadosRelatorio(lsDadosRelatorio); + this.resultSet = rset; + } + }); + } + + @Override + protected void processaParametros() throws Exception { + } + + private String getSql(Map parametros) { + + + String estados = (String) parametros.get("ESTADOS_ID"); + String empresaId = (String) parametros.get("EMPRESA_ID"); + Date dtInicio = (Date) parametros.get("DATA_INICIO"); + Date dtFim = (Date) parametros.get("DATA_FIM"); + + String sql = getSql( estados, empresaId, dtInicio, dtFim); + + return sql.toString(); + } + + private String getSql(String estados, String empresaId, Date dtInicio, Date dtFim) { + + StringBuilder sql = new StringBuilder(); + + sql.append("select tabela.estado as estado , tabela.serieBPE as serieBPE, to_number(tabela.numeroBPE) as numeroBPE, estadoId as estadoId from ( select (to_number(bol.num_bpe) + 1) as numeroBPE, BOL.NUMSERIE_BPE as serieBPE, E.NOMBESTADO as estado, e.estado_id as estadoId "); + sql.append(" FROM BOLETO bol "); + sql.append(" LEFT outer JOIN BOLETO r on bol.num_bpe + 1 = r.num_bpe "); + sql.append(" inner join parada origem on origem.parada_id = bol.origen_id "); + sql.append(" inner join ciudad cidade on cidade.ciudad_id = origem.ciudad_id "); + sql.append(" inner join estado e on (e.estado_id = cidade.estado_id) "); + if (empresaId != null) { + sql.append(" AND bol.EMPRESACORRIDA_ID IN( " + empresaId + " ) "); + } + if (estados != null) { + sql.append(" AND e.ESTADO_ID IN ( " + estados + " )"); + } + sql.append(" and bol.fechorventa between to_date(:dataInicio,'dd/MM/yyyy hh24:mi:ss') and to_date(:dataFinal,'dd/MM/yyyy hh24:mi:ss') "); + sql.append(" minus "); + sql.append("select to_number(bol.num_bpe) as numeroBPE , BOL.NUMSERIE_BPE as serieBPE, E.NOMBESTADO as estado, e.estado_id as estadoId "); + sql.append(" FROM BOLETO bol "); + sql.append(" inner join parada origem on origem.parada_id = bol.origen_id "); + sql.append(" inner join ciudad cidade on cidade.ciudad_id = origem.ciudad_id "); + sql.append(" inner join estado e on (e.estado_id = cidade.estado_id) "); + if (empresaId != null) { + sql.append(" AND bol.EMPRESACORRIDA_ID IN( " + empresaId + " ) "); + } + if (estados != null) { + sql.append(" AND e.ESTADO_ID IN ( " + estados + " )"); + } + sql.append(" ) tabela "); + sql.append(" group by tabela.estado, tabela.serieBPE, numeroBPE, estadoId "); + sql.append(" ORDER BY tabela.estado, tabela.serieBPE, tabela.numeroBPE ASC "); + return sql.toString(); + } + public void setLsDadosRelatorio(List lsDadosRelatorio) { + this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio)); + this.lsDadosRelatorio = lsDadosRelatorio; + } + private void buscarInicialFinalPorUf() { + + String estado = ""; + List bpes = new ArrayList(); + Map estados = converterListaParaMap(lsDadosRelatorio); + + for (Map.Entry entry : estados.entrySet()) { + estado = entry.getValue(); + if(estado != null){ + for (RelatorioBpeNumeracaoReusoBean relatorio2 : lsDadosRelatorio) { + if(estado.equals(relatorio2.getEstado())){ + bpes.add(relatorio2.getNumeroBPE()); + } + } + for (RelatorioBpeNumeracaoReusoBean relatorio2 : lsDadosRelatorio) { + if(estado.equals(relatorio2.getEstado())){ + relatorio2.setFinalAutorizado(bpes.get(bpes.size()-1)); + } + } + } + } + } + + public Map converterListaParaMap(List list) { + Map map = new HashMap(); + for (RelatorioBpeNumeracaoReusoBean relatorio : list) { + map.put(relatorio.getEstado(), relatorio.getEstado()); + } + return map; + } +} \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioCheckinAberto.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioCheckinAberto.java new file mode 100644 index 000000000..840cc3ce5 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioCheckinAberto.java @@ -0,0 +1,160 @@ +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.relatorios.utilitarios.DataSource; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioCheckinAbertoBean; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; + +public class RelatorioCheckinAberto extends Relatorio { + + public static final String DATA_INICIO_SERVICO = "DATA_INICIO_SERVICO"; + public static final String DATA_FIM_SERVICO = "DATA_FIM_SERVICO"; + public static final String DATA_INICIO_ENCERRAMENTO = "DATA_INICIO_ENCERRAMENTO"; + public static final String DATA_FIM_ENCERRAMENTO = "DATA_FIM_ENCERRAMENTO"; + private List lsDadosRelatorio; + + public RelatorioCheckinAberto(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 dataInicioServico = null; + if (parametros.containsKey(DATA_INICIO_SERVICO)) { + dataInicioServico = parametros.get(DATA_INICIO_SERVICO).toString() + " 00:00"; + } + + String dataFimServico = null; + if (parametros.containsKey(DATA_FIM_SERVICO)) { + dataFimServico = parametros.get(DATA_FIM_SERVICO).toString() + " 23:59"; + } + + String dataInicioEncerramento = null; + if (parametros.containsKey(DATA_INICIO_ENCERRAMENTO)) { + dataInicioEncerramento = parametros.get(DATA_INICIO_ENCERRAMENTO).toString() + " 00:00"; + } + + String dataFimEncerramento = null; + if (parametros.containsKey(DATA_FIM_ENCERRAMENTO)) { + dataFimEncerramento = parametros.get(DATA_FIM_ENCERRAMENTO).toString() + " 23:59"; + } + + Integer empresa_id = (Integer) parametros.get("empresa_id"); + Integer localidade_id = (Integer) parametros.get("localidade_id"); + + String sql = getSql(dataInicioServico, dataFimServico, dataInicioEncerramento, dataFimEncerramento, empresa_id, localidade_id); + + NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql); + + if (dataInicioServico != null && dataFimServico != null) { + stmt.setString("dataInicioServico", dataInicioServico); + stmt.setString("dataFimServico", dataFimServico); + } + + if (dataInicioEncerramento != null && dataFimEncerramento != null) { + stmt.setString("dataInicioEncerramento", dataInicioEncerramento); + stmt.setString("dataFimEncerramento", dataFimEncerramento); + } + + if (empresa_id != null) { + stmt.setInt("empresa_id", empresa_id); + } + + if (localidade_id != null) { + stmt.setInt("localidade_id", localidade_id); + } + + ResultSet rs = stmt.executeQuery(); + + lsDadosRelatorio = new ArrayList(); + + SimpleDateFormat formatadorData = new SimpleDateFormat("dd/MM/yyyy"); + SimpleDateFormat formatadorDataHora = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); + + while (rs.next()) { + RelatorioCheckinAbertoBean bean = new RelatorioCheckinAbertoBean(); + bean.setServico(rs.getInt("servico")); + bean.setDataServico(formatadorData.format(rs.getDate("data_servico"))); + bean.setLocalidade(rs.getString("localidade")); + //bean.setUsuario(rs.getString("usuario")); + + lsDadosRelatorio.add(bean); + } + + if (lsDadosRelatorio.size() > 0) { + setLsDadosRelatorio(lsDadosRelatorio); + } + } + }); + } + + @Override + protected void processaParametros() throws Exception { + if (parametros.containsKey(DATA_INICIO_SERVICO) && parametros.containsKey(DATA_FIM_SERVICO)) { + this.parametros.put("PERIODO_SERVICO", parametros.get(DATA_INICIO_SERVICO) + " à " + parametros.get(DATA_FIM_SERVICO)); + } + + if (parametros.containsKey(DATA_INICIO_ENCERRAMENTO) && parametros.containsKey(DATA_FIM_ENCERRAMENTO)) { + this.parametros.put("PERIODO_ENCERRAMENTO", parametros.get(DATA_INICIO_ENCERRAMENTO) + " à " + parametros.get(DATA_FIM_ENCERRAMENTO)); + } + } + + private void setLsDadosRelatorio(List lsDadosRelatorio) { + this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio)); + this.lsDadosRelatorio = lsDadosRelatorio; + } + + private String getSql(String dataInicioServico, String dataFimServico, String dataInicioEncerramento, String dataFimEncerramento, Integer empresa_id, Integer localidade_id) { + StringBuilder sb = new StringBuilder(); + sb.append("select c.corrida_id as servico, "); + sb.append("c.feccorrida as data_servico, "); + sb.append("p.cveparada || ' - ' || p.descparada as localidade, "); + sb.append("cc.fechorcerrado as data_encerramento "); + sb.append("from corrida c "); + sb.append("join parada p on p.parada_id = c.origen_id "); + sb.append("left join checkin_cerrado cc on (c.corrida_id = cc.corrida_id and c.feccorrida=cc.feccorrida ) "); + + + if (empresa_id!=null) { + sb.append("join marca m on m.marca_id = c.marca_id "); + } + + sb.append("where c.activo = 1 "); + + sb.append(" and cc.corrida_id is null "); + + if (dataInicioServico != null && dataFimServico != null) { + sb.append("and c.feccorrida between to_date(:dataInicioServico, 'dd/mm/yyyy hh24:mi') and to_date(:dataFimServico, 'dd/mm/yyyy hh24:mi') "); + } + + if (dataInicioEncerramento != null && dataFimEncerramento != null) { + sb.append("and c.feccorrida between to_date(:dataInicioEncerramento, 'dd/mm/yyyy hh24:mi') and to_date(:dataFimEncerramento, 'dd/mm/yyyy hh24:mi') "); + } + + if (empresa_id != null) { + sb.append("and m.empresa_id = :empresa_id "); + } + + if (localidade_id != null) { + sb.append("and p.parada_id = :localidade_id "); + } + + sb.append("order by 2, 1, 4, 3"); + + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioCteos.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioCteos.java new file mode 100644 index 000000000..a495d0598 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioCteos.java @@ -0,0 +1,124 @@ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayDataSource; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.utilerias.DateUtil; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +public class RelatorioCteos extends Relatorio { + + public RelatorioCteos(Map parametros, Connection conexao) throws Exception { + + super(parametros, conexao); + + this.setCustomDataSource(new ArrayDataSource(this) { + + public void initDados() throws Exception { + Connection conexao = this.relatorio.getConexao(); + Map parametros = this.relatorio.getParametros(); + + String sql = getSql(parametros); + + Date dtInicio = (Date) parametros.get("DATA_INICIO"); + Date dtFim = (Date) parametros.get("DATA_FIM"); + + NamedParameterStatement ps = new NamedParameterStatement(conexao, sql.toString()); + if(dtInicio != null && dtFim != null) { + ps.setString("dataInicio", DateUtil.getStringDate(dtInicio, "dd/MM/yyyy") + " 00:00:00"); + ps.setString("dataFinal", DateUtil.getStringDate(dtFim, "dd/MM/yyyy") + " 23:59:59"); + } + + ResultSet rset = ps.executeQuery(); + + while (rset.next()) { + Map dataResult = new HashMap(); + + dataResult.put("empresa_id", rset.getString("empresa_id")); + dataResult.put("nombempresa", rset.getString("nombempresa")); + dataResult.put("dtvenda", rset.getString("dtvenda")); + dataResult.put("num_bpe", rset.getString("num_bpe")); + dataResult.put("origem", rset.getString("origem")); + dataResult.put("destino", rset.getString("destino")); + dataResult.put("uforigem", rset.getString("uforigem")); + dataResult.put("ufdestino", rset.getString("ufdestino")); + dataResult.put("dtviagem", rset.getString("dtviagem")); + dataResult.put("valor", rset.getBigDecimal("valor")); + dataResult.put("chbpe", rset.getString("chbpe")); + dataResult.put("protocolo", rset.getString("protocolo")); + dataResult.put("num_bpe", rset.getString("num_bpe")); + dataResult.put("numserie_bpe", rset.getString("numserie_bpe")); + dataResult.put("evento", rset.getString("evento")); + dataResult.put("qtd", rset.getString("qtd")); + + this.dados.add(dataResult); + } + + this.resultSet = rset; + } + }); + } + + @Override + protected void processaParametros() throws Exception { + } + + private String getSql(Map parametros) { + + StringBuilder sql = new StringBuilder(1400); + + String estados = (String) parametros.get("ESTADOS_ID"); + String empresaId = (String) parametros.get("EMPRESA_ID"); + + sql.append(" SELECT "); + sql.append(" ep.empresa_id, "); + sql.append(" ep.nombempresa , "); + sql.append(" to_char(coalesce(bpe.dt_venda, bol.fechorventa), 'dd/mm/yyyy') AS dtvenda, "); + sql.append(" bol.num_bpe, "); + sql.append(" coalesce(bol.numserie_bpe, '1') AS numserie_bpe, "); + sql.append(" to_char(bol.fechorviaje, 'dd/mm/yyyy HH24:MI') AS dtviagem, "); + sql.append(" bpe.chbpe, "); + sql.append(" ori.descparada AS origem, "); + sql.append(" e.cveestado AS uforigem, "); + sql.append(" dest.descparada AS destino, "); + sql.append(" desta.cveestado AS ufdestino, "); + sql.append(" 'EXCESSO BAGAGEM' AS evento, "); + sql.append(" 1 AS qtd, "); + sql.append(" coalesce(bpe.valorpago, bol.preciopagado) AS valor, "); + sql.append(" bpe.nprot AS protocolo "); + sql.append(" FROM "); + sql.append(" bpe bpe "); + sql.append(" LEFT JOIN boleto bol ON bol.boleto_id = bpe.boleto_id AND bpe.activo = 1 "); + sql.append(" LEFT JOIN estado e ON e.codibge = bpe.uf "); + sql.append(" LEFT JOIN marca ma ON bol.marca_id = ma.marca_id "); + sql.append(" LEFT JOIN empresa ep ON ma.empresa_id = ep.empresa_id "); + sql.append(" LEFT JOIN parada ori ON bol.origen_id = ori.parada_id "); + sql.append(" LEFT JOIN parada dest ON bol.destino_id = dest.parada_id "); + sql.append(" LEFT JOIN ciudad dcit on dest.ciudad_id = dcit.ciudad_id "); + sql.append(" LEFT JOIN estado desta ON dcit.estado_id = desta.estado_id "); + sql.append(" WHERE "); + sql.append(" e.activo = 1 "); + sql.append(" and bpe.codstat = 135 "); + sql.append(" AND bpe.tipoevento = 110117 "); + + if (empresaId != null) { + sql.append(" AND ep.EMPRESA_ID IN ( " + empresaId + " ) "); + } + + if (estados != null) { + sql.append(" AND e.ESTADO_ID IN ( " + estados + " )"); + } + + sql.append(" AND coalesce(bol.fechorventa_h, bol.fechorventa) >= to_date(:dataInicio, 'DD/MM/YYYY HH24:MI:SS') "); + sql.append(" AND coalesce(bol.fechorventa_h, bol.fechorventa) <= to_date(:dataFinal, 'DD/MM/YYYY HH24:MI:SS') "); + sql.append(" ORDER BY "); + sql.append(" ep.empresa_id,dtvenda, origem "); + + return sql.toString(); + } +} \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioLogAuditoria.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioLogAuditoria.java new file mode 100644 index 000000000..fc194bb10 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioLogAuditoria.java @@ -0,0 +1,44 @@ +/** + * + */ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.sql.Connection; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import com.rjconsultores.ventaboletos.entidad.LogAuditoria; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.LogAuditoriaBean; + +import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; + +public class RelatorioLogAuditoria extends RelatorioDemandas { + public RelatorioLogAuditoria(Map parametros, Connection conexao, List list) throws Exception { + super(parametros, conexao); + + List listaBean = new ArrayList(); + + for (Object object : list) { + LogAuditoria log = (LogAuditoria)object; + LogAuditoriaBean bean = new LogAuditoriaBean(); + + bean.setIdAuditado(log.getIdAuditado()); + bean.setCampoAlterado(log.getCampoAlterado()); + bean.setEmpresa(log.getEmpresa() != null ? log.getEmpresa().getNombempresa() : ""); + bean.setUsuario(log.getUsuario() != null ? log.getUsuario().getNombusuario() : ""); + bean.setClasseAlterada(log.getClasseAlterada()); + bean.setClassePrincipal(log.getClassePrincipal()); + bean.setTela(log.getTela()); + bean.setDataAlteracao(log.getFecmodif()); + bean.setCampoAlterado(log.getCampoAlterado()); + bean.setValorAtual(log.getValorNovo()); + bean.setValorAnterior(log.getValorAnterior()); + bean.setTipoAlteracao(log.getTipoAlteracao()); + listaBean.add(bean); + } + setCollectionDataSource(new JRBeanCollectionDataSource(listaBean)); + + + } +} diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioVendasCartoesAlternativo.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioVendasCartoesAlternativo.java new file mode 100644 index 000000000..253a1ccf3 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioVendasCartoesAlternativo.java @@ -0,0 +1,240 @@ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.math.BigDecimal; +import java.sql.Connection; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.apache.log4j.Logger; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.Estacion; +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; +import com.rjconsultores.ventaboletos.entidad.Usuario; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioVendasCartoesBean; +import com.rjconsultores.ventaboletos.utilerias.DateUtil; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; + +public class RelatorioVendasCartoesAlternativo extends Relatorio { + + private static Logger log = Logger.getLogger(RelatorioVendasCartoesAlternativo.class); + + List list = null; + + public RelatorioVendasCartoesAlternativo(Map parametros, Connection conexao, final Boolean buscarPorDataDaVenda) throws Exception { + super(parametros, conexao); + + this.setCustomDataSource(new DataSource(this) { + + public void initDados() throws Exception { + Connection conexao = this.relatorio.getConexao(); + Map parametros = this.relatorio.getParametros(); + + NamedParameterStatement stmt = null; + ResultSet rset = null; + + String dataInicial = parametros.get("DATA_INICIAL").toString() + " 00:00:00"; + String dataFinal = parametros.get("DATA_FINAL").toString() + " 23:59:59"; + Empresa empresa = (Empresa) parametros.get("EMPRESA"); + PuntoVenta puntoVenta = (PuntoVenta) parametros.get("PUNTOVENTA"); + Usuario usuario = (Usuario) parametros.get("USUARIO"); + Estacion estacao = (Estacion) parametros.get("ESTACION"); + String tipoAgencias = (String) parametros.get("TIPOPUNTOVENTA"); + + String sql = getSql(dataInicial, dataFinal, empresa, puntoVenta, tipoAgencias, usuario, estacao, buscarPorDataDaVenda); + + log.info("query=" + sql); + + try { + stmt = new NamedParameterStatement(conexao, sql); + + if (empresa != null) { + stmt.setInt("empresaId", empresa.getEmpresaId()); + } + if (puntoVenta != null) { + stmt.setInt("puntoventaId", puntoVenta.getPuntoventaId()); + } + if (dataInicial != null) { + stmt.setString("dataInicial", dataInicial); + } + if (dataFinal != null) { + stmt.setString("dataFinal", dataFinal); + } + if (estacao != null) { + stmt.setInt("estacionId", estacao.getEstacionId()); + } + if (usuario != null) { + stmt.setInt("usuarioId", usuario.getUsuarioId()); + } + + rset = stmt.executeQuery(); + + list = new ArrayList(); + BigDecimal valorTotal = BigDecimal.ZERO; + while (rset.next()) { + + RelatorioVendasCartoesBean bean = new RelatorioVendasCartoesBean(); + + bean.setDataVenda(rset.getDate("dataVenda")); + bean.setDataOperacao(rset.getString("dataOperacao") != null ? DateUtil.getDateFromString(rset.getString("dataOperacao"), "ddMMyy") : null); + bean.setDescPagamento(rset.getString("descPagamento") != null ? rset.getString("descPagamento") : null); + bean.setValor(rset.getBigDecimal("valor") != null ? rset.getBigDecimal("valor") : null); + bean.setAutorizacao(rset.getString("autorizacao") != null ? rset.getString("autorizacao") : null); + bean.setQtdParcelas(rset.getInt("qtdParcelas")); + + valorTotal = valorTotal.add(bean.getValor() != null ? bean.getValor() : BigDecimal.ZERO); + bean.setValorTotal(valorTotal); + + list.add(bean); + } + } catch (Exception e) { + log.error(e.getMessage(), e); + } finally { + if (rset != null && !rset.isClosed()) { + rset.close(); + } + if (stmt != null && !stmt.isClosed()) { + stmt.close(); + } + } + } + }); + + this.setCollectionDataSource(new JRBeanCollectionDataSource(list)); + } + + // private RelatorioVendasCartoesBean calcTotalValor(RelatorioVendasCartoesBean bean) { + // BigDecimal valorTotal = bean.getValorTotal().add(bean.getValorTotal()); + // bean.setValorTotal(valorTotal); + // return bean; + // } + + @Override + protected void processaParametros() throws Exception { + } + + private String getSql(String dataInicial, String dataFinal, Empresa empresa, PuntoVenta puntoVenta, String tipoAgencias, Usuario usuario, Estacion estacion, Boolean buscarPorDataDaVenda) { + + StringBuilder sb = new StringBuilder(); + + sb.append("SELECT caja.descpago as descPagamento,"); + sb.append(" to_char(caja.dataoperacao, 'ddMMyyyy') as dataOperacao,"); + sb.append(" caja.autorizacao as autorizacao,"); + sb.append(" coalesce(caja.qtdparcelas, 1) as qtdParcelas ,"); + sb.append(" trunc(caja.datavenda) as dataVenda, "); + sb.append(" sum(caja.preco) as valor "); + sb.append("FROM"); + sb.append(" (SELECT fp.descpago AS descpago,"); + sb.append(" ct.fecoperacion AS dataoperacao,"); + sb.append(" ct.numautorizacion AS autorizacao,"); + sb.append(" ct.cantparcelas AS qtdparcelas,"); + sb.append(" c.fechorventa AS datavenda,"); + sb.append(" case when c.motivocancelacion_id is null then cfp.importe else cfp.importe * -1 end AS preco"); + sb.append(" FROM caja c"); + sb.append(" INNER JOIN caja_formapago cfp ON c.caja_id=cfp.caja_id AND cfp.activo = 1 "); + sb.append(" INNER JOIN marca ma on ma.marca_id = c.marca_id "); + sb.append(" INNER JOIN forma_pago fp ON cfp.formapago_id=fp.formapago_id"); + sb.append(" LEFT JOIN caja_det_pago cdp ON (c.caja_id = cdp.caja_id and cdp.cajaformapago_id = cfp.cajaformapago_id)"); + sb.append(" LEFT JOIN caja_tarjeta ct ON (ct.cajadetpago_id = cdp.cajadetpago_id)"); + sb.append(" INNER JOIN punto_venta pt ON (pt.puntoventa_id = c.puntoventa_id) "); + sb.append(" WHERE c.indreimpresion = 0 "); + + if (empresa != null) { + sb.append("and ma.empresa_id = :empresaId "); + } + + if (puntoVenta != null) { + sb.append("AND c.puntoventa_id = :puntoventaId "); + } + + if (estacion != null) { + sb.append("AND c.estacion_id = :estacionId "); + } + + if (usuario != null) { + sb.append(" and c.usuario_id = :usuarioId "); + } + + if (dataInicial != null && buscarPorDataDaVenda) { + sb.append("AND c.fechorventa >= TO_DATE(:dataInicial, 'DD/MM/YYYY HH24:MI:SS') "); + } else if (dataInicial != null && !buscarPorDataDaVenda) { + sb.append("AND c.feccorte >= TO_DATE(:dataInicial, 'DD/MM/YYYY HH24:MI:SS') "); + } + + if (dataFinal != null && buscarPorDataDaVenda) { + sb.append("AND c.fechorventa <= TO_DATE(:dataFinal, 'DD/MM/YYYY HH24:MI:SS') "); + } else if (dataInicial != null && !buscarPorDataDaVenda) { + sb.append("AND c.feccorte <= TO_DATE(:dataFinal, 'DD/MM/YYYY HH24:MI:SS') "); + } + + sb.append(tipoAgencias.equals("-1") || tipoAgencias.equals("TODAS") ? "" : " and pt.tipoptovta_id not in (" + tipoAgencias + ") "); + + sb.append(" AND fp.formapago_id IN(2,3)"); + sb.append(" AND c.activo = 1 "); + + sb.append(" UNION "); + sb.append(" SELECT "); + sb.append(" fp.descpago as descpago, "); + sb.append(" ct.fecoperacion as dataoperacao, "); + sb.append(" ct.numautorizacion as autorizacao, "); + sb.append(" coalesce(ct.cantparcelas, 1) as qtdparcelas, "); + sb.append(" coalesce(c.fechorventa, cd.fechorvta) as datavenda, "); + sb.append(" case when cdp.importe < 0 and fp.formapago_id in (3, 2) then 0 else cdp.importe end as preco "); + sb.append(" FROM caja_diversos cd "); + sb.append(" JOIN caja_diversos_pago cdp on cdp.cajadiversos_id = cd.cajadiversos_id "); + sb.append(" INNER JOIN forma_pago fp on fp.formapago_id = cdp.formapago_id "); + sb.append(" INNER JOIN evento_extra ee on ee.eventoextra_id = cd.eventoextra_id "); + sb.append(" LEFT JOIN boleto c on c.boleto_id = ee.boleto_id "); + sb.append(" LEFT JOIN caja_tarjeta ct on ( cdp.cajatarjeta_id = ct.cajatarjeta_id) "); + sb.append(" WHERE cd.activo = 1 "); + sb.append(" AND (ee.boleto_id is null or ee.boleto_id = c.boleto_id) "); + sb.append(" AND fp.formapago_id in (3, 2) "); + + if (empresa != null) { + sb.append("and ee.empresa_id = :empresaId "); + } + + if (puntoVenta != null) { + sb.append("AND cd.puntoventa_id = :puntoventaId "); + } + + if (estacion != null) { + sb.append("AND cd.estacion_id = :estacionId "); + } + + if (usuario != null) { + sb.append(" AND cd.usuario_id = :usuarioId "); + } + + if (dataInicial != null && buscarPorDataDaVenda) { + sb.append(" AND cd.fechorvta >= TO_DATE(:dataInicial, 'DD/MM/YYYY HH24:MI:SS') "); + } else if (dataInicial != null && !buscarPorDataDaVenda) { + sb.append(" AND cd.feccorte >= TO_DATE(:dataInicial, 'DD/MM/YYYY HH24:MI:SS') "); + } + + if (dataFinal != null && buscarPorDataDaVenda) { + sb.append(" AND cd.fechorvta <= TO_DATE(:dataFinal, 'DD/MM/YYYY HH24:MI:SS') "); + } else if (dataInicial != null && !buscarPorDataDaVenda) { + sb.append(" AND cd.feccorte <= TO_DATE(:dataFinal, 'DD/MM/YYYY HH24:MI:SS') "); + } + + sb.append(tipoAgencias.equals("-1") || tipoAgencias.equals("TODAS") ? "" : " and pt.tipoptovta_id not in (" + tipoAgencias + ") "); + sb.append(" ) caja "); + + sb.append("GROUP BY caja.descpago,"); + sb.append(" to_char(caja.dataoperacao, 'ddMMyyyy'),"); + sb.append(" caja.autorizacao,"); + sb.append(" caja.qtdparcelas,"); + sb.append(" trunc(caja.datavenda) "); + sb.append("ORDER BY caja.descpago, trunc(caja.datavenda), caja.autorizacao"); + + return sb.toString(); + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBPeSubstituido_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBPeSubstituido_es.properties new file mode 100644 index 000000000..45918e811 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBPeSubstituido_es.properties @@ -0,0 +1,56 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.nome=Relatório BPe Substituído +cabecalho.relatorio=Relatório: +cabecalho.periodo=Período: +cabecalho.periodoA=à +cabecalho.dataHora=Data/Hora: +cabecalho.impressorPor=Impressor por: +cabecalho.pagina=Página +cabecalho.de=de +cabecalho.filtros=Filtros: +cabecalho.puntoventa=Agência +label.nomeVendaAgencia=Agência Atendimento +label.nomeAgenciaEmissao=Agência Emissão +label.documento=Doc. +label.dataRemarcacao=Data Rem. +label.dataVenda=Data Venda +label.dataServico=Data Serv. +label.origem= Origem +label.destino=Destino +label.codOrigem= Cod.O +label.codDestino=Cod.D +label.formaPagamento=Forma Pag. +label.servico=Servi. +label.poltrona= Poltrona +label.dataInicial=Data Inicial: +label.dataFinal=Data Final: +label.empresa=Empresa: +label.agencia=Agência: +label.situacao=Situacao +label.bilhete=Bilhete +label.bilheteiro=Bilheteiro +label.valorDiferenca=Diferenca +label.valorMulta=Multa +label.tarifa=Tarifa +label.tarifaVenda=Tarifa Venda +label.seguro=Seguro +label.pedagio=Pedagio +label.taxaEmbarque=Taxa Emb. +label.cliente=Cliente +label.bilheteOriginal=Bilhete Original +label.bilheteRemarcado=Bilhete Remarcado +label.linha=Linha +label.horaServico=Horário +label.chave=CH.BPe +label.numBpe=Nº BPe +label.tipoDocumento=Tp.Doc +label.tipoVenda=Tp.Venda +label.tipoPassagem=Tp.Pass +label.percentualDesconto=Perc.Desc +label.valorTotal=Vlr.Tot.Cob +label.valorPassagem=Vlr.Passagem +label.tpp=TPP +label.siglaTipoPassagem=Sig.Tp.Pas \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBPeSubstituido_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBPeSubstituido_pt_BR.properties new file mode 100644 index 000000000..58e7049ad --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBPeSubstituido_pt_BR.properties @@ -0,0 +1,55 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.nome=Relatório BPe Substituído +cabecalho.relatorio=Relatório: +cabecalho.periodo=Período: +cabecalho.periodoA=à +cabecalho.dataHora=Data/Hora: +cabecalho.impressorPor=Impressor por: +cabecalho.pagina=Página +cabecalho.de=de +cabecalho.filtros=Filtros: +cabecalho.puntoventa=Agência +label.nomeVendaAgencia=Agência Atendimento +label.nomeAgenciaEmissao=Agência Emissão +label.documento=Doc. +label.dataRemarcacao=Data Rem. +label.dataVenda=Data Venda +label.dataServico=Data Serv. +label.origem= Origem +label.destino=Destino +label.codOrigem= Cod.O +label.codDestino=Cod.D +label.formaPagamento=Forma Pag. +label.servico=Servi. +label.poltrona= Poltrona +label.dataInicial=Data Inicial: +label.dataFinal=Data Final: +label.empresa=Empresa: +label.agencia=Agência: +label.situacao=Situacao +label.bilhete=Bilhete +label.valorDiferenca=Diferenca +label.valorMulta=Multa +label.tarifa=Tarifa +label.tarifaVenda=Tarifa Venda +label.seguro=Seguro +label.pedagio=Pedagio +label.taxaEmbarque=Taxa Emb. +label.cliente=Cliente +label.bilheteOriginal=Bilhete Original +label.bilheteRemarcado=Bilhete Remarcado +label.linha=Linha +label.horaServico=Horário +label.chave=CH.BPe +label.numBpe=Nº BPe +label.tipoDocumento=Tp.Doc +label.tipoVenda=Tp.Venda +label.tipoPassagem=Tp.Pass +label.percentualDesconto=Perc.Desc +label.valorTotal=Vlr.Tot.Cob +label.valorPassagem=Vlr.Passagem +label.tpp=TPP +label.siglaTipoPassagem=Sig.Tp.Pas \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBpeNumeracaoReuso_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBpeNumeracaoReuso_es.properties new file mode 100644 index 000000000..8a6d36489 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBpeNumeracaoReuso_es.properties @@ -0,0 +1,32 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.relatorio=Relatório: +cabecalho.periodo=Período: +cabecalho.periodoA=à +cabecalho.dataHora=Data/Hora: +cabecalho.impressorPor=Impressor por: +cabecalho.pagina=Página +cabecalho.de=de +cabecalho.filtros=Filtros: + +label.dataVenda=Data Venda +label.horaVenda=Hora Venda +label.origem=Origem +label.destino=Destino +label.dataViagem=Data Viagem +label.valorBPe=Valor +label.origemPV= Loc. Venda +label.valortarifa=Tarifa +label.valortaxa=Taxa +label.valorpedagio=Pedágio +label.valorseguro=Seguro +label.valoroutros=Outros +label.chaveAcesso=Chave Acesso +label.protocolo=Protocolo +label.numBPe=Núm. BPe +label.serie=Série +label.status=Status +label.obs=Observação +header.filtro.total=Total Geral: \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBpeNumeracaoReuso_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBpeNumeracaoReuso_pt_BR.properties new file mode 100644 index 000000000..63b5c15c9 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBpeNumeracaoReuso_pt_BR.properties @@ -0,0 +1,32 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.relatorio=Relatório: +cabecalho.periodo=Período: +cabecalho.periodoA=à +cabecalho.dataHora=Data/Hora: +cabecalho.impressorPor=Impressor por: +cabecalho.pagina=Página +cabecalho.de=de +cabecalho.filtros=Filtros: +header.filtro.total=Total Geral: + +label.dataVenda=Data Venda +label.horaVenda=Hora Venda +label.origem=Origem +label.destino=Destino +label.dataViagem=Data Viagem +label.valorBPe=Valor +label.origemPV= Loc. Venda +label.valortarifa=Tarifa +label.valortaxa=Taxa +label.valorpedagio=Pedágio +label.valorseguro=Seguro +label.valoroutros=Outros +label.chaveAcesso=Chave Acesso +label.protocolo=Protocolo +label.numBPe=Núm. BPe +label.serie=Série +label.status=Status +label.obs=Observação \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCheckinAberto_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCheckinAberto_es.properties new file mode 100644 index 000000000..458ad2c1f --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCheckinAberto_es.properties @@ -0,0 +1,18 @@ +#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.servico=Período Serviço\: +header.periodo.encerramento=Período Encerramento\: +header.empresa=Empresa\: + +#Labels detail +detail.servico=Serviço +detail.data.servico=Data Serviço +detail.localidade=Localidade +detail.data.encerramento=Data Encerramento +detail.usuario.operacao=Usuário da Operação +detail.imei=Dispositivo \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCheckinAberto_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCheckinAberto_pt_BR.properties new file mode 100644 index 000000000..37934eabb --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCheckinAberto_pt_BR.properties @@ -0,0 +1,18 @@ +#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.servico=Período Serviço\: +header.periodo.encerramento=Período Encerramento\: +header.empresa=Empresa\: + +#Labels detail +detail.servico=Serviço +detail.data.servico=Data Serviço +detail.localidade=Origem do Serviço +detail.data.encerramento=Data Encerramento +detail.usuario.operacao=Usuário da Operação +detail.imei=Dispositivo \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCteos_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCteos_es.properties new file mode 100644 index 000000000..6e31d16d5 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCteos_es.properties @@ -0,0 +1,27 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.relatorio=Relatório: +cabecalho.periodo=Período: +cabecalho.periodoA=à +cabecalho.dataHora=Data/Hora: +cabecalho.impressorPor=Impressor por: +cabecalho.pagina=Página +cabecalho.de=de +cabecalho.filtros=Filtros: +header.filtro.total=Total Geral: + +label.dataVenda=Data Bpe +label.origem=Origem +label.destino=Destino +label.dataViagem=Data Viagem +label.valorBPe=Valor +label.chaveAcesso=Chave Acesso +label.protocolo=Protocolo +label.numBPe=Núm. BPe +label.serie=Série +label.empresaId=Cod. Empresa +label.nomeEmpresa=Empresa +label.evento=Evento +label.qtd=Qtd. \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCteos_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCteos_pt_BR.properties new file mode 100644 index 000000000..8cde6371d --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioCteos_pt_BR.properties @@ -0,0 +1,28 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.relatorio=Relatório: +cabecalho.periodo=Período: +cabecalho.periodoA=à +cabecalho.dataHora=Data/Hora: +cabecalho.impressorPor=Impressor por: +cabecalho.pagina=Página +cabecalho.de=de +cabecalho.filtros=Filtros: +header.filtro.total=Total Geral: + +label.dataVenda=Data Bpe +label.origem=Origem +label.destino=Destino +label.dataViagem=Data Viagem +label.valorBPe=Valor +label.chaveAcesso=Chave Acesso +label.protocolo=Protocolo +label.numBPe=Núm. BPe +label.serie=Série +label.empresaId=Cod. Empre. +label.nomeEmpresa=Empresa +label.evento=Evento +label.qtd=Qtd. +label.serie=Série \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioLogAuditoria_es_MX.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioLogAuditoria_es_MX.properties new file mode 100644 index 000000000..d0e8c3ee9 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioLogAuditoria_es_MX.properties @@ -0,0 +1,19 @@ +TITULO = Relatório Log de Auditoria +PERIODO = PERÍODO +header.data.hora=Data/Hora\: +cabecalho.impressorPor=Impresso por + +DATA_ALTERACAO = DATA ATLERAÇÃO +ID_AUDITADO = ID AUDITADO +EMPRESA = EMPRESA +USUARIO = USUARIO +TIPO_ALTERACAO = TIPO ALTERAÇÃO +TELA = TELA +CAMPO_ALTERADO = CAMPO ALTERADO +VALOR_ATUAL = VALOR ATUAL +VALOR_ANTERIOR = VALOR ANTERIOR +CLASSE_ALTERADA = CLASSE ALTERADA +CLASSE_PRINCIPAL = CLASSE PRINCIPAL + + +msg.noData=Não foi possivel obter dados com os parâmetros informados. \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioLogAuditoria_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioLogAuditoria_pt_BR.properties new file mode 100644 index 000000000..d0e8c3ee9 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioLogAuditoria_pt_BR.properties @@ -0,0 +1,19 @@ +TITULO = Relatório Log de Auditoria +PERIODO = PERÍODO +header.data.hora=Data/Hora\: +cabecalho.impressorPor=Impresso por + +DATA_ALTERACAO = DATA ATLERAÇÃO +ID_AUDITADO = ID AUDITADO +EMPRESA = EMPRESA +USUARIO = USUARIO +TIPO_ALTERACAO = TIPO ALTERAÇÃO +TELA = TELA +CAMPO_ALTERADO = CAMPO ALTERADO +VALOR_ATUAL = VALOR ATUAL +VALOR_ANTERIOR = VALOR ANTERIOR +CLASSE_ALTERADA = CLASSE ALTERADA +CLASSE_PRINCIPAL = CLASSE PRINCIPAL + + +msg.noData=Não foi possivel obter dados com os parâmetros informados. \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioVendasCartoesAlternativo_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioVendasCartoesAlternativo_es.properties new file mode 100644 index 000000000..ed7325185 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioVendasCartoesAlternativo_es.properties @@ -0,0 +1,35 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. +msg.a=à + +#Labels header +header.titulo.relatorio=Relatório Vendas de Cartões +header.periodo=Per\u00EDodo\: +header.data.hora=Data/Hora\: +header.pagina=P\u00E1gina\: +header.filtro=Filtro\: +header.filtro.servico=Servi\u00E7o\: +header.filtro.empresa=Empresa: +header.filtro.agencia=Agência: +header.filtro.estacao=Estação: +header.filtro.bilheteiro=Bilheteiro: +header.filtro.grupo=Grupo de Linhas\: + +#Labels detail + +detail.dataOperacao=Data Operação +detail.dataVenda=Data Venda +detail.autorizacao=Autorização +detail.qtdParcelas=Quantidade Parcelas +detail.valorTotal=Valor Total +detail.valor=Valor R$ + +#Group + +group.total=Total Geral: +sub.total=Sub Total: +total.debito=Total Débito: +total.credito=Total Crédito: +linhas=Linhas + + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioVendasCartoesAlternativo_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioVendasCartoesAlternativo_pt_BR.properties new file mode 100644 index 000000000..ed7325185 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioVendasCartoesAlternativo_pt_BR.properties @@ -0,0 +1,35 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. +msg.a=à + +#Labels header +header.titulo.relatorio=Relatório Vendas de Cartões +header.periodo=Per\u00EDodo\: +header.data.hora=Data/Hora\: +header.pagina=P\u00E1gina\: +header.filtro=Filtro\: +header.filtro.servico=Servi\u00E7o\: +header.filtro.empresa=Empresa: +header.filtro.agencia=Agência: +header.filtro.estacao=Estação: +header.filtro.bilheteiro=Bilheteiro: +header.filtro.grupo=Grupo de Linhas\: + +#Labels detail + +detail.dataOperacao=Data Operação +detail.dataVenda=Data Venda +detail.autorizacao=Autorização +detail.qtdParcelas=Quantidade Parcelas +detail.valorTotal=Valor Total +detail.valor=Valor R$ + +#Group + +group.total=Total Geral: +sub.total=Sub Total: +total.debito=Total Débito: +total.credito=Total Crédito: +linhas=Linhas + + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBPeSubstituido.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBPeSubstituido.jasper new file mode 100644 index 000000000..f972cbfc6 Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBPeSubstituido.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBPeSubstituido.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBPeSubstituido.jrxml new file mode 100644 index 000000000..8828d552b --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBPeSubstituido.jrxml @@ -0,0 +1,781 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <band height="93"> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="49ab1647-150e-479d-a1d6-1911439f9372" mode="Transparent" x="107" y="82" width="54" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.dataRemarcacao}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="36adfbd2-baef-4050-b4dd-b2c17cec1f8f" mode="Transparent" x="248" y="82" width="107" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.origem}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="dabaae73-0430-44ac-b5ca-07bb8943d1e1" mode="Transparent" x="379" y="82" width="107" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.destino}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="7105fabd-e019-4de6-bb8b-6ac0d194c121" mode="Transparent" x="0" y="82" width="107" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.agencia}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="24600b7b-f380-4bd5-8d27-9c7e29cb9a59" mode="Transparent" x="486" y="82" width="28" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.poltrona}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="16f23967-8aa7-4eeb-8138-3587989cc6cd" mode="Transparent" x="514" y="82" width="33" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.bilhete}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="e17fff3d-04bd-4ce0-86a6-81785d6045ed" mode="Transparent" x="1086" y="82" width="33" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.tarifa}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="70a4673b-db31-4291-be71-17255ce1c03f" mode="Transparent" x="1119" y="82" width="38" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.seguro}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="6495c82f-0698-4a95-ac7a-3c6838c5269c" mode="Transparent" x="1157" y="82" width="31" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.pedagio}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="8d9bd3b8-178e-4e33-a047-35fc979993f7" mode="Transparent" x="161" y="82" width="63" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.dataServico}]]></textFieldExpression> + </textField> + <staticText> + <reportElement uuid="d7f6fbb0-f726-4dca-8903-4f19fc26462e" mode="Opaque" x="0" y="67" width="1242" height="15" backcolor="#33CC00"/> + <textElement textAlignment="Center"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Bilhete Remarcado]]></text> + </staticText> + <staticText> + <reportElement uuid="03422950-8ba2-4ba7-8f65-447c3458253e" mode="Opaque" x="1242" y="67" width="1209" height="15" backcolor="#FFFF00"/> + <textElement textAlignment="Center"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Bilhete Original]]></text> + </staticText> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="236d0e6f-34ca-45f4-a6a4-adf15b284342" mode="Transparent" x="547" y="82" width="28" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.numBpe}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="06be7125-9ea5-4635-a8ad-24e1a3945351" mode="Transparent" x="771" y="82" width="171" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.cliente}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="b0058a06-fa48-44f8-b740-1b9559ddc266" mode="Transparent" x="942" y="82" width="33" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.tipoDocumento}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="93f28873-6879-483a-89ac-45deb0248a4f" mode="Transparent" x="975" y="82" width="45" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.documento}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="7eb33017-a1c9-490e-bf3e-247f53d1a553" mode="Transparent" x="575" y="82" width="196" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.chave}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="6264791d-5f03-4d0f-8440-63e81e60fde3" mode="Transparent" x="1020" y="82" width="31" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.valorPassagem}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="451020ec-55a8-449a-a276-3405eb82cc50" mode="Transparent" x="1051" y="82" width="35" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.valorTotal}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="e5b4dab9-d599-4174-96d6-b1484925b103" mode="Transparent" x="1188" y="82" width="21" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.tpp}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="bb591b6f-5e16-4dbe-942f-11b4bfc0864b" mode="Transparent" x="1209" y="82" width="33" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.valorMulta}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="8471eaf2-18d7-44c4-9825-950f797e4c54" mode="Transparent" x="224" y="82" width="24" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.codOrigem}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="c841ad4a-de72-4bd2-9171-15ef10523696" mode="Transparent" x="355" y="82" width="24" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.codDestino}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="false"> + <reportElement uuid="d9f2f9b3-255b-4e61-8ced-75a973ce41d0" mode="Transparent" x="0" y="0" width="2158" height="46" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="16" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$P{nome_relatorio}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="dc20d664-f848-4aae-bc5c-3424007aaed3" x="2158" y="0" width="211" height="15"/> + <textElement textAlignment="Right"> + <font size="9" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.dataHora}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="false"> + <reportElement uuid="4b441767-c36f-4834-9377-5d99b4a1cc9c" mode="Transparent" x="2158" y="15" width="267" height="16" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.pagina}+" "+$V{PAGE_NUMBER}+" "+$R{cabecalho.de}]]></textFieldExpression> + </textField> + <textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="false"> + <reportElement uuid="52bfc867-bd17-427f-93fd-2f454dfaebba" mode="Transparent" x="2371" y="0" width="80" height="15" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> + </textField> + <textField evaluationTime="Report" pattern="" isBlankWhenNull="false"> + <reportElement uuid="162d6c25-279f-4642-b541-2d46b24382d9" mode="Transparent" x="2425" y="15" width="26" height="16" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + <textField isStretchWithOverflow="true"> + <reportElement uuid="00f6b2c3-d2d1-4a8d-bde4-b83b029ab508" x="0" y="46" width="2451" height="21"/> + <box leftPadding="2"> + <topPen lineWidth="0.75"/> + <bottomPen lineWidth="0.75"/> + </box> + <textElement verticalAlignment="Middle"> + <font size="12" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$P{FILTROS}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="false"> + <reportElement uuid="1607d941-f50d-4023-a70d-7c34b3969260" stretchType="RelativeToBandHeight" mode="Transparent" x="2158" y="31" width="293" height="15" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.impressorPor}+" "+$P{usuario_nome}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="543ab691-bfc2-4de1-84ed-5110c0154332" mode="Transparent" x="2399" y="82" width="31" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.pedagio}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="a0f4dfbc-b79c-47f6-a3c1-1011d1f30970" mode="Transparent" x="1756" y="82" width="33" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.bilhete}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="5e2918f3-1195-4044-9ecd-20eb2e500bc4" mode="Transparent" x="2262" y="82" width="31" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.valorPassagem}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="98855d07-a57a-4fde-b42c-1fa516de7d43" mode="Transparent" x="2328" y="82" width="33" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.tarifa}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="014faa80-f886-4629-9fbc-f1de7942259e" mode="Transparent" x="1817" y="82" width="196" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.chave}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="e8c02a9e-1919-49f4-b3a9-1e7a8b425afc" mode="Transparent" x="2013" y="82" width="171" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.cliente}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="fc93fe5b-3b99-4a6e-b7e3-af2190acd700" mode="Transparent" x="1728" y="82" width="28" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.poltrona}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="ae2a0538-0666-49ec-b2a5-a460fde316b7" mode="Transparent" x="1621" y="82" width="107" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.destino}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="7d8318f7-2d57-48ce-9b29-9eb5e2b6c184" mode="Transparent" x="1466" y="82" width="24" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.codOrigem}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="a8e97f17-f1a9-4b5b-a78c-699e39bbad54" mode="Transparent" x="2293" y="82" width="35" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.valorTotal}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="3a1326ee-27a1-46ea-b0ec-7076da1f746c" mode="Transparent" x="1349" y="82" width="54" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.dataRemarcacao}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="0df0e1eb-7899-4a89-b1ab-bd96b0bf458b" mode="Transparent" x="2430" y="82" width="21" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.tpp}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="80a01629-4b9e-4e3d-b94e-c8eebda58465" mode="Transparent" x="2184" y="82" width="33" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.tipoDocumento}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="b623608f-cdaa-4672-ae99-3cf70628d61a" mode="Transparent" x="1490" y="82" width="107" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.origem}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="4d24353a-42f9-41e4-a5b1-3597c45a5c93" mode="Transparent" x="2217" y="82" width="45" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.documento}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="0dd69179-4670-460c-b474-50f068a207fa" mode="Transparent" x="2361" y="82" width="38" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.seguro}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="a115ad10-6cc8-4f5e-bef2-7577c9cf1038" mode="Transparent" x="1403" y="82" width="63" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.dataServico}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="1e7cbf6c-3ecd-40b3-a0a4-f8649e36d353" mode="Transparent" x="1597" y="82" width="24" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.codDestino}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="dc8189f7-334c-46e1-911a-7960ab828d75" mode="Transparent" x="1242" y="82" width="107" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.agencia}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement uuid="277aa553-fd1c-45e1-a306-f992d10741d4" mode="Transparent" x="1789" y="82" width="28" height="11" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.numBpe}]]></textFieldExpression> + </textField> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBpeNumeracaoReuso.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBpeNumeracaoReuso.jasper new file mode 100644 index 000000000..9abdc94e4 Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBpeNumeracaoReuso.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBpeNumeracaoReuso.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBpeNumeracaoReuso.jrxml new file mode 100644 index 000000000..b4756b5aa --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBpeNumeracaoReuso.jrxml @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCheckinAberto.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCheckinAberto.jasper new file mode 100644 index 000000000..a64c25ecd Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCheckinAberto.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCheckinAberto.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCheckinAberto.jrxml new file mode 100644 index 000000000..72802b783 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCheckinAberto.jrxml @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + <band splitType="Stretch"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCteos.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCteos.jasper new file mode 100644 index 000000000..c86195b41 Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCteos.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCteos.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCteos.jrxml new file mode 100644 index 000000000..e1d4cb67c --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioCteos.jrxml @@ -0,0 +1,333 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <band height="93" splitType="Stretch"> + <textField pattern="" isBlankWhenNull="false"> + <reportElement uuid="da52f710-3882-4beb-ba6f-870e03f6800d" mode="Transparent" x="0" y="0" width="798" height="57" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="16" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$P{NOME_RELATORIO}]]></textFieldExpression> + </textField> + <textField evaluationTime="Report" pattern="" isBlankWhenNull="false"> + <reportElement uuid="2f4f1314-9363-4e6d-822f-c85c1890998b" mode="Transparent" x="1065" y="25" width="25" height="16" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="false"> + <reportElement uuid="c8a70b8d-369e-48ae-a911-a5d9692316f7" stretchType="RelativeToBandHeight" mode="Transparent" x="798" y="42" width="292" height="15" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.impressorPor}+" "+$P{USUARIO}]]></textFieldExpression> + </textField> + <textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="false"> + <reportElement uuid="ad4bbfb8-582d-4aa2-904d-8dfe60e54442" mode="Transparent" x="1009" y="0" width="80" height="25" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="false"> + <reportElement uuid="8601bf20-f5f8-4fed-9445-7adfe580d236" mode="Transparent" x="798" y="25" width="267" height="16" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.pagina}+" "+$V{PAGE_NUMBER}+" "+$R{cabecalho.de}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="b48a0903-0b2a-4ae5-ae04-811d097a9f91" x="798" y="0" width="211" height="25"/> + <textElement textAlignment="Right"> + <font size="9" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.dataHora}]]></textFieldExpression> + </textField> + <textField isStretchWithOverflow="true"> + <reportElement uuid="aff6535e-c25b-4f31-ad3a-baacc52e4974" x="-1" y="57" width="1091" height="21"/> + <box> + <topPen lineWidth="0.75"/> + <bottomPen lineWidth="0.75"/> + </box> + <textElement verticalAlignment="Middle"> + <font size="12" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$P{FILTROS}]]></textFieldExpression> + </textField> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioLogAuditoria.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioLogAuditoria.jasper new file mode 100644 index 000000000..d7885364c Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioLogAuditoria.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioLogAuditoria.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioLogAuditoria.jrxml new file mode 100644 index 000000000..ec3ff6eb3 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioLogAuditoria.jrxml @@ -0,0 +1,267 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasCartoesAlternativo.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasCartoesAlternativo.jasper new file mode 100644 index 000000000..872ca2d46 Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasCartoesAlternativo.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasCartoesAlternativo.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasCartoesAlternativo.jrxml new file mode 100644 index 000000000..5745f8172 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasCartoesAlternativo.jrxml @@ -0,0 +1,268 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <band splitType="Stretch"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/LogAuditoriaBean.java b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/LogAuditoriaBean.java new file mode 100644 index 000000000..a46bcb977 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/LogAuditoriaBean.java @@ -0,0 +1,107 @@ +package com.rjconsultores.ventaboletos.relatorios.utilitarios; + +import java.util.Date; + +public class LogAuditoriaBean { + + private String idAuditado; + private String empresa; + private String valorAnterior; + private String valorAtual; + private String campoAlterado; + private String classeAlterada; + private String classePrincipal; + private String tela; + private String tipoAlteracao; + private Date dataAlteracao; + private String usuario; + + public String getIdAuditado() { + return idAuditado; + } + + public void setIdAuditado(String idAuditado) { + this.idAuditado = idAuditado; + } + + public String getEmpresa() { + return empresa; + } + + public void setEmpresa(String empresa) { + this.empresa = empresa; + } + + public String getValorAnterior() { + return valorAnterior; + } + + public void setValorAnterior(String valorAnterior) { + this.valorAnterior = valorAnterior; + } + + public String getValorAtual() { + return valorAtual; + } + + public void setValorAtual(String valorAtual) { + this.valorAtual = valorAtual; + } + + public String getCampoAlterado() { + return campoAlterado; + } + + public void setCampoAlterado(String campoAlterado) { + this.campoAlterado = campoAlterado; + } + + public String getClasseAlterada() { + return classeAlterada; + } + + public void setClasseAlterada(String classeAlterada) { + this.classeAlterada = classeAlterada; + } + + public String getClassePrincipal() { + return classePrincipal; + } + + public void setClassePrincipal(String classePrincipal) { + this.classePrincipal = classePrincipal; + } + + public String getTela() { + return tela; + } + + public void setTela(String tela) { + this.tela = tela; + } + + public String getTipoAlteracao() { + return tipoAlteracao; + } + + public void setTipoAlteracao(String tipoAlteracao) { + this.tipoAlteracao = tipoAlteracao; + } + + public Date getDataAlteracao() { + return dataAlteracao; + } + + public void setDataAlteracao(Date dataAlteracao) { + this.dataAlteracao = dataAlteracao; + } + + public String getUsuario() { + return usuario; + } + + public void setUsuario(String usuario) { + this.usuario = usuario; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioBpeNumeracaoReusoBean.java b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioBpeNumeracaoReusoBean.java new file mode 100644 index 000000000..320b684a0 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioBpeNumeracaoReusoBean.java @@ -0,0 +1,67 @@ +package com.rjconsultores.ventaboletos.relatorios.utilitarios; + +public class RelatorioBpeNumeracaoReusoBean { + + private Integer numeroBPE; + private Integer finalAutorizado; + private String estado; + private String serieBPE; + + public Integer getFinalAutorizado() { + return finalAutorizado; + } + + public void setFinalAutorizado(Integer finalAutorizado) { + this.finalAutorizado = finalAutorizado; + } + + public String getEstado() { + return estado; + } + + public void setEstado(String estado) { + this.estado = estado; + } + + public Integer getNumeroBPE() { + return numeroBPE; + } + + public void setNumeroBPE(Integer numeroBPE) { + this.numeroBPE = numeroBPE; + } + + public String getSerieBPE() { + return serieBPE; + } + + public void setSerieBPE(String serieBPE) { + this.serieBPE = serieBPE; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((estado == null) ? 0 : estado.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + RelatorioBpeNumeracaoReusoBean other = (RelatorioBpeNumeracaoReusoBean) obj; + if (estado == null) { + if (other.estado != null) + return false; + } else if (!estado.equals(other.estado)) + return false; + return true; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioCheckinAbertoBean.java b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioCheckinAbertoBean.java new file mode 100644 index 000000000..4e8fa9d76 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioCheckinAbertoBean.java @@ -0,0 +1,59 @@ +package com.rjconsultores.ventaboletos.relatorios.utilitarios; + +public class RelatorioCheckinAbertoBean { + + private Integer servico; + private String dataServico; + private String localidade; + private String dataEncerramento; + private String usuario; + private String imei; + + public Integer getServico() { + return servico; + } + + public void setServico(Integer servico) { + this.servico = servico; + } + + public String getDataServico() { + return dataServico; + } + + public void setDataServico(String dataServico) { + this.dataServico = dataServico; + } + + public String getLocalidade() { + return localidade; + } + + public void setLocalidade(String localidade) { + this.localidade = localidade; + } + + public String getDataEncerramento() { + return dataEncerramento; + } + + public void setDataEncerramento(String dataEncerramento) { + this.dataEncerramento = dataEncerramento; + } + + public String getUsuario() { + return usuario; + } + + public void setUsuario(String usuario) { + this.usuario = usuario; + } + + public String getImei() { + return imei; + } + + public void setImei(String imei) { + this.imei = imei; + } +} \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioBPeSubstituidoController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioBPeSubstituidoController.java new file mode 100644 index 000000000..d1a7c9beb --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioBPeSubstituidoController.java @@ -0,0 +1,319 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios; + +import java.util.ArrayList; +import java.util.Arrays; +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.zhtml.Messagebox; +import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zul.Bandbox; +import org.zkoss.zul.Comboitem; +import org.zkoss.zul.Datebox; +import org.zkoss.zul.Paging; +import org.zkoss.zul.Textbox; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.Estado; +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioBPeSubstituido; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.service.EmpresaService; +import com.rjconsultores.ventaboletos.service.EstadoService; +import com.rjconsultores.ventaboletos.utilerias.DateUtil; +import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; +import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar; +import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; +import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; +import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; +import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper; +import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEstadoSimple; +import com.trg.search.Filter; + +@Controller("relatorioBPeSubstituidoController") +@Scope("prototype") +public class RelatorioBPeSubstituidoController extends MyGenericForwardComposer { + + private static final long serialVersionUID = 1L; + + private Datebox dtInicio; + private Datebox dtFim; + private MyComboboxEstandar cmbEmpresa; + private MyListbox estadoList; + + private List lsEmpresa; + private List lsEstado; + + @Autowired + private DataSource dataSourceRead; + @Autowired + private EmpresaService empresaService; + @Autowired + private EstadoService estadoService; + + @Autowired + private transient PagedListWrapper plwPuntoVenta; + private ArrayList lsNumPuntoVenta = new ArrayList(); + private MyListbox puntoVentaList; + private Paging pagingPuntoVenta; + private Bandbox bbPesquisaPuntoVenta; + private Textbox txtPalavraPesquisa; + private MyListbox puntoVentaSelList; + + @Override + public void doAfterCompose(Component comp) throws Exception { + lsEmpresa = empresaService.obtenerTodos(); + lsEstado = estadoService.obtenerTodos(); + super.doAfterCompose(comp); + + estadoList.setItemRenderer(new RenderEstadoSimple()); + estadoList.setData(lsEstado); + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + private void executarRelatorio() throws Exception { + Map parametros = new HashMap(); + StringBuilder filtro = new StringBuilder(); + + if (!validar()) { + return; + } + + if (dtInicio.getValue() != null && dtFim.getValue() != null) { + filtro.append("Data: ") + .append(DateUtil.getStringDate(dtInicio.getValue(), "dd/MM/yyyy")) + .append(" - ") + .append(DateUtil.getStringDate(dtFim.getValue(), "dd/MM/yyyy")) + .append(";"); + parametros.put("DATA_INICIO", (java.util.Date) dtInicio.getValue()); + parametros.put("DATA_FIM", (java.util.Date) dtFim.getValue()); + } + + parametros.put("nome_relatorio", Labels.getLabel("relatorioBPeSubstituidoController.window.title")); + parametros.put("usuario", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString()); + parametros.put("usuario_nome", UsuarioLogado.getUsuarioLogado().getNombusuario()); + + filtro.append("UF: "); + String estadosIds = ""; + String UFs = ""; + List lsEstadosSelecionados = estadoList.getItensSelecionados(); + + if (!lsEstadosSelecionados.isEmpty()) { + for (int i = 0; i < lsEstadosSelecionados.size(); i++) { + Estado estado = (Estado) lsEstadosSelecionados.get(i); + UFs = UFs + estado.getCveestado() + ","; + estadosIds = estadosIds + estado.getCodibge() + ","; + } + + estadosIds = estadosIds.substring(0, estadosIds.length() - 1); + UFs = UFs.substring(0, UFs.length() - 1); + parametros.put("ESTADOS_ID", estadosIds); + filtro.append(UFs).append(";"); + } else { + filtro.append("Todos; "); + } + + filtro.append("Agência: "); + String pvIds = ""; + String PVs = ""; + lsNumPuntoVenta = new ArrayList(Arrays.asList(puntoVentaSelList.getData())); + + if (lsNumPuntoVenta.size() > 0) { + for (PuntoVenta p : lsNumPuntoVenta) { + PVs = PVs + p.getNombpuntoventa() + ","; + pvIds = pvIds + p.getPuntoventaId() + ","; + } + + pvIds = pvIds.substring(0, pvIds.length() - 1); + PVs = PVs.substring(0, PVs.length() - 1); + parametros.put("PUNTOVENTA_ID", pvIds); + filtro.append(PVs).append(";"); + } else { + filtro.append("Todas; "); + } + + + filtro.append("Empresa: "); + if (cmbEmpresa.getSelectedItem() == null ) { + filtro.append(" Todas; "); + }else{ + Comboitem itemEmpresa = cmbEmpresa.getSelectedItem(); + if (itemEmpresa != null) { + Empresa empresa = (Empresa) itemEmpresa.getValue(); + parametros.put("EMPRESA_ID", String.valueOf(empresa.getEmpresaId())); + filtro.append(empresa.getNombempresa()).append(";"); + } else { + filtro.append(" Todas; "); + } + } + + parametros.put("FILTROS", filtro.toString()); + + Relatorio relatorio = new RelatorioBPeSubstituido(parametros, dataSourceRead.getConnection()); + + Map args = new HashMap(); + args.put("relatorio", relatorio); + + openWindow("/component/reportView.zul", + Labels.getLabel("relatorioBPeSubstituidoController.window.title"), args, MODAL); + } + + private boolean validar() { + + try { + if (dtInicio.getValue() == null || dtFim.getValue() == null) { + Messagebox.show(Labels.getLabel("relatorioBPeSubstituidoController.data.obrigatoria"), + Labels.getLabel("relatorioBPeSubstituidoController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + return false; + } + + if(dtInicio.getValue().after(dtFim.getValue())){ + Messagebox.show(Labels.getLabel("relatorioBPeSubstituidoController.MSG.dataInicialMaiorFinal"), + Labels.getLabel("relatorioBPeSubstituidoController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + return false; + } + + } catch (InterruptedException ex) { + return false; + } + return true; + } + + public void onClick$btnExecutarRelatorio(Event ev) throws Exception { + executarRelatorio(); + } + + public void onDoubleClick$puntoVentaList(Event ev) { + PuntoVenta puntoVentaSel = (PuntoVenta) puntoVentaList.getSelected(); + puntoVentaSelList.addItemNovo(puntoVentaSel); + } + + public void onDoubleClick$puntoVentaSelList(Event ev) { + PuntoVenta puntoVentaSel = (PuntoVenta) puntoVentaSelList.getSelected(); + puntoVentaSelList.removeItem(puntoVentaSel); + } + + public void onSelect$puntoVentaList(Event ev) { + } + + public void onClick$btnLimpar(Event ev) { + limparPesquisaAgencia(); + } + + public void onClick$btnPesquisa(Event ev) { + executarPesquisa(); + } + + private void executarPesquisa() { + HibernateSearchObject puntoVentaBusqueda = + new HibernateSearchObject(PuntoVenta.class, + pagingPuntoVenta.getPageSize()); + + puntoVentaBusqueda.addFilterOr(Filter.like("nombpuntoventa", "%" + txtPalavraPesquisa.getText().trim().toUpperCase().concat("%")), Filter.like("numPuntoVenta", "%" + txtPalavraPesquisa.getText().trim().toUpperCase().concat("%"))); + + puntoVentaBusqueda.addSortAsc("nombpuntoventa"); + + puntoVentaBusqueda.addFilterEqual("activo", Boolean.TRUE); + + plwPuntoVenta.init(puntoVentaBusqueda, puntoVentaList, pagingPuntoVenta); + + if (puntoVentaList.getData().length == 0) { + try { + Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), + Labels.getLabel("relatorioReceitaDiariaAgenciaController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + } catch (InterruptedException ex) { + } + } + } + + private void limparPesquisaAgencia() { + puntoVentaList.clearSelection(); + + lsNumPuntoVenta.clear(); + this.bbPesquisaPuntoVenta.setValue(""); + } + + public Datebox getDtInicio() { + return dtInicio; + } + + public void setDtInicio(Datebox dtInicio) { + this.dtInicio = dtInicio; + } + + public Datebox getDtFim() { + return dtFim; + } + + public void setDtFim(Datebox dtFim) { + this.dtFim = dtFim; + } + + public MyComboboxEstandar getCmbEmpresa() { + return cmbEmpresa; + } + + public void setCmbEmpresa(MyComboboxEstandar cmbEmpresa) { + this.cmbEmpresa = cmbEmpresa; + } + + public MyListbox getEstadoList() { + return estadoList; + } + + public void setEstadoList(MyListbox estadoList) { + this.estadoList = estadoList; + } + + public List getLsEmpresa() { + return lsEmpresa; + } + + public void setLsEmpresa(List lsEmpresa) { + this.lsEmpresa = lsEmpresa; + } + + public List getLsEstado() { + return lsEstado; + } + + public void setLsEstado(List lsEstado) { + this.lsEstado = lsEstado; + } + + public EmpresaService getEmpresaService() { + return empresaService; + } + + public void setEmpresaService(EmpresaService empresaService) { + this.empresaService = empresaService; + } + + public DataSource getDataSourceRead() { + return dataSourceRead; + } + + public void setDataSourceRead(DataSource dataSourceRead) { + this.dataSourceRead = dataSourceRead; + } + + public EstadoService getEstadoService() { + return estadoService; + } + + public void setEstadoService(EstadoService estadoService) { + this.estadoService = estadoService; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioCheckinEnacerramentoAbertoController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioCheckinEnacerramentoAbertoController.java new file mode 100644 index 000000000..aad84d8cd --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioCheckinEnacerramentoAbertoController.java @@ -0,0 +1,140 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios; + +import java.text.SimpleDateFormat; +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.Checkbox; +import org.zkoss.zul.Datebox; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.Parada; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioCheckinAberto; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioEncerramentoCheckin; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.service.EmpresaService; +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.MyGenericForwardComposer; + +//Mantis 15199 + +@Controller("relatorioEncerramentoCheckinController") +@Scope("prototype") +@SuppressWarnings("serial") +public class RelatorioCheckinEnacerramentoAbertoController extends MyGenericForwardComposer { + + @Autowired + private DataSource dataSourceRead; + + @Autowired + private EmpresaService empresaService; + + private Datebox dataInicioServico; + private Datebox dataFimServico; + private Datebox dataInicioEncerramento; + private Datebox dataFimEncerramento; + private MyComboboxEstandar cmbEmpresa; + private MyComboboxParada cmbLocalidade; + private List lsEmpresas; + private Checkbox chcEncerrado; + private Checkbox chcAberto; + + @Override + public void doAfterCompose(Component comp) throws Exception { + super.doAfterCompose(comp); + lsEmpresas = empresaService.obtenerTodos(); + chcEncerrado.setChecked(Boolean.TRUE); + } + + public void onClick$btnExecutarRelatorio(Event ev) throws Exception { + executarRelatorio(); + } + + private void executarRelatorio() throws Exception { + Map parametros = new HashMap(); + + // Datas + putParametrosDate(parametros, RelatorioEncerramentoCheckin.DATA_INICIO_SERVICO, this.dataInicioServico.getValue()); + putParametrosDate(parametros, RelatorioEncerramentoCheckin.DATA_FIM_SERVICO, this.dataFimServico.getValue()); + putParametrosDate(parametros, RelatorioEncerramentoCheckin.DATA_INICIO_ENCERRAMENTO, this.dataInicioEncerramento.getValue()); + putParametrosDate(parametros, RelatorioEncerramentoCheckin.DATA_FIM_ENCERRAMENTO, this.dataFimEncerramento.getValue()); + + // Validação datas + if (parametros.containsKey(RelatorioEncerramentoCheckin.DATA_INICIO_SERVICO) && !parametros.containsKey(RelatorioEncerramentoCheckin.DATA_FIM_SERVICO) || !parametros.containsKey(RelatorioEncerramentoCheckin.DATA_INICIO_SERVICO) && parametros.containsKey(RelatorioEncerramentoCheckin.DATA_FIM_SERVICO)) { + MensagensUtils.showMessageInformation(Labels.getLabel("relatorioEncerramentoCheckinController.data.servico.obrigatoria"), Labels.getLabel("relatorioEncerramentoCheckinController.window.title")); + return; + } + + if (parametros.containsKey(RelatorioEncerramentoCheckin.DATA_INICIO_ENCERRAMENTO) && !parametros.containsKey(RelatorioEncerramentoCheckin.DATA_FIM_ENCERRAMENTO) || !parametros.containsKey(RelatorioEncerramentoCheckin.DATA_INICIO_ENCERRAMENTO) && parametros.containsKey(RelatorioEncerramentoCheckin.DATA_FIM_ENCERRAMENTO)) { + MensagensUtils.showMessageInformation(Labels.getLabel("relatorioEncerramentoCheckinController.data.encerramento.obrigatoria"), Labels.getLabel("relatorioEncerramentoCheckinController.window.title")); + return; + } + + if (!parametros.containsKey(RelatorioEncerramentoCheckin.DATA_INICIO_SERVICO) && !parametros.containsKey(RelatorioEncerramentoCheckin.DATA_FIM_SERVICO) && !parametros.containsKey(RelatorioEncerramentoCheckin.DATA_INICIO_ENCERRAMENTO) && !parametros.containsKey(RelatorioEncerramentoCheckin.DATA_FIM_ENCERRAMENTO)) { + MensagensUtils.showMessageInformation(Labels.getLabel("relatorioEncerramentoCheckinController.data.obrigatoria"), Labels.getLabel("relatorioEncerramentoCheckinController.window.title")); + return; + } + + // Empresa + if (cmbEmpresa.getSelectedIndex() != -1) { + Empresa empresa = (Empresa) cmbEmpresa.getSelectedItem().getValue(); + parametros.put("empresa_id", empresa.getEmpresaId()); + parametros.put("EMPRESA", empresa.getNombempresa()); + } else { + parametros.put("EMPRESA", "TODAS"); + } + + // Localidade + if (cmbLocalidade.getSelectedIndex() != -1) { + parametros.put("localidade_id", ((Parada) cmbLocalidade.getSelectedItem().getValue()).getParadaId()); + } + + Relatorio relatorio = null; + if(chcEncerrado.isChecked()) { + parametros.put("TITULO", Labels.getLabel("relatorioEncerramentoCheckinController.window.title")); + relatorio = new RelatorioEncerramentoCheckin(parametros, dataSourceRead.getConnection()); + }else { + parametros.put("TITULO", Labels.getLabel("relatorioCheckinAbertoController.window.title")); + relatorio = new RelatorioCheckinAberto(parametros, dataSourceRead.getConnection()); + } + + + Map args = new HashMap(); + args.put("relatorio", relatorio); + + if(chcEncerrado.isChecked()) { + openWindow("/component/reportView.zul", Labels.getLabel("relatorioEncerramentoCheckinController.window.title"), args, MODAL); + }else { + openWindow("/component/reportView.zul", Labels.getLabel("relatorioCheckinAbertoController.window.title"), args, MODAL); + } + + } + + private void putParametrosDate(Map parametros, String nomeParametro, Date data) { + if (data != null) { + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + parametros.put(nomeParametro, sdf.format(data)); + } + } + + // gets/sets + public List getLsEmpresas() { + return lsEmpresas; + } + + public void setLsEmpresas(List lsEmpresas) { + this.lsEmpresas = lsEmpresas; + } +} \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioCteosController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioCteosController.java new file mode 100644 index 000000000..341abd4e4 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioCteosController.java @@ -0,0 +1,243 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios; + +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.zhtml.Messagebox; +import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zul.Combobox; +import org.zkoss.zul.Comboitem; +import org.zkoss.zul.Datebox; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.Estado; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioCteos; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.service.EmpresaService; +import com.rjconsultores.ventaboletos.service.EstadoService; +import com.rjconsultores.ventaboletos.utilerias.DateUtil; +import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; +import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar; +import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; +import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; +import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEstadoUf; + +@Controller("relatorioCteosController") +@Scope("prototype") +public class RelatorioCteosController extends MyGenericForwardComposer { + + private static final long serialVersionUID = 1L; + + private Datebox dtInicio; + private Datebox dtFim; + private MyComboboxEstandar cmbEmpresa; + private Combobox cmbPuntoVenta; + private MyListbox estadoList; + + private List lsEmpresa; + private List lsEstado; + + @Autowired + private DataSource dataSourceRead; + @Autowired + private EmpresaService empresaService; + @Autowired + private EstadoService estadoService; + + @Override + public void doAfterCompose(Component comp) throws Exception { + lsEmpresa = empresaService.obtenerTodos(); + lsEstado = estadoService.obtenerTodos(); + super.doAfterCompose(comp); + + estadoList.setItemRenderer(new RenderEstadoUf()); + estadoList.setData(lsEstado); + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + private void executarRelatorio() throws Exception { + Map parametros = new HashMap(); + StringBuilder filtro = new StringBuilder(); + + if (!validar()) { + return; + } + + if (dtInicio.getValue() != null && dtFim.getValue() != null) { + filtro.append("Data: ") + .append(DateUtil.getStringDate(dtInicio.getValue(), "dd/MM/yyyy")) + .append(" - ") + .append(DateUtil.getStringDate(dtFim.getValue(), "dd/MM/yyyy")) + .append(";"); + parametros.put("DATA_INICIO", (java.util.Date) dtInicio.getValue()); + parametros.put("DATA_FIM", (java.util.Date) dtFim.getValue()); + } + + parametros.put("NOME_RELATORIO", Labels.getLabel("relatorioCteosController.window.title")); + parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString()); + parametros.put("USUARIO_NOME", UsuarioLogado.getUsuarioLogado().getNombusuario()); + + filtro.append("UF: "); + String estadosIds = ""; + String UFs = ""; + List lsEstadosSelecionados = estadoList.getItensSelecionados(); + + if (!lsEstadosSelecionados.isEmpty()) { + for (int i = 0; i < lsEstadosSelecionados.size(); i++) { + Estado estado = (Estado) lsEstadosSelecionados.get(i); + UFs = UFs + estado.getCveestado() + ","; + estadosIds = estadosIds + estado.getEstadoId() + ","; + } + + estadosIds = estadosIds.substring(0, estadosIds.length() - 1); + UFs = UFs.substring(0, UFs.length() - 1); + parametros.put("ESTADOS_ID", estadosIds); + } else { + filtro.append("Todos "); + } + + filtro.append(UFs).append(";"); + + filtro.append("Empresa: "); + + + if (cmbEmpresa.getSelectedItem() == null ) { + filtro.append(" Todas; "); + }else{ + Comboitem itemEmpresa = cmbEmpresa.getSelectedItem(); + if (itemEmpresa != null) { + Empresa empresa = (Empresa) itemEmpresa.getValue(); + parametros.put("EMPRESA_ID", String.valueOf(empresa.getEmpresaId())); + filtro.append(empresa.getNombempresa()).append(";"); + } else { + filtro.append(" Todas; "); + } + } + + parametros.put("FILTROS", filtro.toString()); + + Relatorio relatorio = new RelatorioCteos(parametros, dataSourceRead.getConnection()); + + Map args = new HashMap(); + args.put("relatorio", relatorio); + + openWindow("/component/reportView.zul", + Labels.getLabel("relatorioCteosController.window.title"), args, MODAL); + } + + private boolean validar() { + + try { + if (dtInicio.getValue() == null || dtFim.getValue() == null) { + Messagebox.show(Labels.getLabel("relatorioCteosController.data.obrigatoria"), + Labels.getLabel("relatorioCteosController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + return false; + } + + if(dtInicio.getValue().after(dtFim.getValue())){ + Messagebox.show(Labels.getLabel("relatorioCteosController.MSG.dataInicialMaiorFinal"), + Labels.getLabel("relatorioCteosController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + return false; + } + + } catch (InterruptedException ex) { + return false; + } + return true; + } + + public void onClick$btnExecutarRelatorio(Event ev) throws Exception { + executarRelatorio(); + } + + public Datebox getDtInicio() { + return dtInicio; + } + + public void setDtInicio(Datebox dtInicio) { + this.dtInicio = dtInicio; + } + + public Datebox getDtFim() { + return dtFim; + } + + public void setDtFim(Datebox dtFim) { + this.dtFim = dtFim; + } + + public MyComboboxEstandar getCmbEmpresa() { + return cmbEmpresa; + } + + public void setCmbEmpresa(MyComboboxEstandar cmbEmpresa) { + this.cmbEmpresa = cmbEmpresa; + } + + public Combobox getCmbPuntoVenta() { + return cmbPuntoVenta; + } + + public void setCmbPuntoVenta(Combobox cmbPuntoVenta) { + this.cmbPuntoVenta = cmbPuntoVenta; + } + + public MyListbox getEstadoList() { + return estadoList; + } + + public void setEstadoList(MyListbox estadoList) { + this.estadoList = estadoList; + } + + public List getLsEmpresa() { + return lsEmpresa; + } + + public void setLsEmpresa(List lsEmpresa) { + this.lsEmpresa = lsEmpresa; + } + + public List getLsEstado() { + return lsEstado; + } + + public void setLsEstado(List lsEstado) { + this.lsEstado = lsEstado; + } + + public EmpresaService getEmpresaService() { + return empresaService; + } + + public void setEmpresaService(EmpresaService empresaService) { + this.empresaService = empresaService; + } + + public DataSource getDataSourceRead() { + return dataSourceRead; + } + + public void setDataSourceRead(DataSource dataSourceRead) { + this.dataSourceRead = dataSourceRead; + } + + public EstadoService getEstadoService() { + return estadoService; + } + + public void setEstadoService(EstadoService estadoService) { + this.estadoService = estadoService; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/remessa/ImportarRetornoBancarioController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/remessa/ImportarRetornoBancarioController.java new file mode 100644 index 000000000..c1e6e44f1 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/remessa/ImportarRetornoBancarioController.java @@ -0,0 +1,108 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.remessa; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Controller; +import org.zkoss.util.media.Media; +import org.zkoss.util.resource.Labels; +import org.zkoss.zhtml.Filedownload; +import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zk.ui.event.UploadEvent; +import org.zkoss.zul.Messagebox; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.service.EmpresaService; +import com.rjconsultores.ventaboletos.service.ImportacaoRetornoBancarioService; +import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar; +import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; + +@Controller("importarRetornoBancarioController") +@Scope("prototype") +public class ImportarRetornoBancarioController extends MyGenericForwardComposer { + + private static final long serialVersionUID = 1L; + @Autowired + private ImportacaoRetornoBancarioService importacaoRetornoBancarioService; + + @Autowired + private EmpresaService empresaService; + + private List lsEmpresa; + private MyComboboxEstandar cmbEmpresa; + + @Override + public void doAfterCompose(Component comp) throws Exception { + super.doAfterCompose(comp); + + lsEmpresa = new ArrayList(); + lsEmpresa.addAll(empresaService.obtenerTodos()); + } + + public void onUpload(UploadEvent event) throws IOException, InterruptedException { + final String resultado; + + if (cmbEmpresa.getSelectedItem() == null){ + Messagebox.show(Labels.getLabel("relatorioRetornoBancario.MSG.erroSemEmpresa"), + Labels.getLabel("importarClientesController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + return; + } + + Media media = event.getMedia(); + if(media.getName().toLowerCase().endsWith(".ret")){ + Empresa empresa = (Empresa) cmbEmpresa.getSelectedItem().getValue(); + ByteArrayInputStream bais = new ByteArrayInputStream( media.getByteData()) ; + resultado = importacaoRetornoBancarioService.lerArquivo(bais, empresa); + }else{ + Messagebox.show(Labels.getLabel("relatorioRetornoBancario.MSG.extensaoInvalida"), + Labels.getLabel("importarRetornoBancarioController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + return; + } + + if (resultado.startsWith("Arquivo Processado com sucesso")) { + Messagebox.show("Arquivo Processado com sucesso", + Labels.getLabel("importarRetornoBancarioController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + }else if (resultado.startsWith("Arquivo Processado com ressalvas")) { + Messagebox.show("Arquivo Processado com ressalvas", + Labels.getLabel("importarRetornoBancarioController.window.title"), + Messagebox.OK, Messagebox.EXCLAMATION); + } else { + Messagebox.show(resultado, + Labels.getLabel("importarRetornoBancarioController.window.title"), + Messagebox.OK, Messagebox.ERROR); + } + + Messagebox.show("Deseja baixar arquivo com detalhes do processamento?", + Labels.getLabel("importarRetornoBancarioController.window.title"), + Messagebox.OK | Messagebox.CANCEL, + Messagebox.QUESTION, + new org.zkoss.zk.ui.event.EventListener(){ + public void onEvent(Event e){ + if(Messagebox.ON_OK.equals(e.getName())){ + InputStream is = new ByteArrayInputStream(resultado.getBytes()); + Filedownload.save(is, "application/txt", "detalhe_processamento.txt"); + } + } + } + ); + + } + + public List getLsEmpresa() { + return lsEmpresa; + } + + public void setLsEmpresa(List lsEmpresa) { + this.lsEmpresa = lsEmpresa; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/api/ApiCallRunnable.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/api/ApiCallRunnable.java new file mode 100644 index 000000000..4e40b1b83 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/api/ApiCallRunnable.java @@ -0,0 +1,126 @@ +package com.rjconsultores.ventaboletos.web.utilerias.api; + +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Date; + +import javax.xml.bind.DatatypeConverter; + +import org.apache.http.HttpResponse; +import org.apache.http.auth.UsernamePasswordCredentials; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.auth.BasicScheme; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.log4j.Logger; + +import com.nimbusds.jose.JOSEException; +import com.nimbusds.jose.JWSAlgorithm; +import com.nimbusds.jose.JWSHeader; +import com.nimbusds.jose.JWSObject; +import com.nimbusds.jose.Payload; +import com.nimbusds.jose.crypto.MACSigner; +import com.nimbusds.jwt.JWTClaimsSet; + +public class ApiCallRunnable implements Runnable { + + private static Logger log = Logger.getLogger(ApiCallRunnable.class); + private static final int minutesExpireToken = 10; + private static final String secret = "#KO&Fm4_k.sU9M8`6Mx'F\\\"H:*Qxu]6F4r,)JmZ2Jwafd)I.2[RET'1:)VQ6mG9,"; + + private final String url; + private final String tenant; + private String retorno; + private String urlBase; + + public String getUrl() { + return url; + } + + public String getTenant() { + return tenant; + } + + public String getRetorno() { + return retorno; + } + + public void setRetorno(String retorno) { + this.retorno = retorno; + } + + public String getUrlBase() { + return urlBase; + } + + public void setUrlBase(String urlBase) { + this.urlBase = urlBase; + } + + public ApiCallRunnable(String url, String tenant, String urlOriginal) { + this.url = url; + this.tenant = tenant; + this.urlBase = urlOriginal; + } + + public void run() { + HttpClient client = new DefaultHttpClient(); + HttpGet request = new HttpGet(url); + UsernamePasswordCredentials creds = null; + + try { + creds = new UsernamePasswordCredentials("internal", getToken()); + request.addHeader(new BasicScheme().authenticate(creds, request)); + + if (tenant != null) { + request.addHeader("x-tenant-id", tenant); + } + + HttpResponse response = client.execute(request); + if (response != null && response.getStatusLine() != null) { + log.info(String.format(":: Response Status Code %d :: Headers = %s", response.getStatusLine().getStatusCode(),Arrays.toString(response.getAllHeaders()))); + } + + Integer codigoRetorno = (response != null && response.getStatusLine() != null) ? response.getStatusLine().getStatusCode() : null; + + retorno = montarMensagemRetorno(tenant, urlBase, codigoRetorno, null); + + } catch (Exception e) { + retorno = montarMensagemRetorno(tenant, urlBase, null, e.getMessage()); + log.error("Ocorreu um erro ao executar a requisição de limpar cache de localidade da API", e); + } + } + private String montarMensagemRetorno(String tenant, String url, Integer codigoRetorno, String mensagemErro) { + + StringBuilder mensagemRetorno = new StringBuilder(); + mensagemRetorno.append("ULR -> ").append(url).append("\n"); + mensagemRetorno.append("tenant -> ").append(tenant).append("\n"); + if (mensagemErro == null) { + mensagemRetorno.append("Resposta -> ").append((codigoRetorno != null && codigoRetorno.equals(200)) ? "Solicitação de limpeza de cache executada com sucesso, código " + codigoRetorno : "Erro ao enviar solicitação, código " + codigoRetorno); + } else { + mensagemRetorno.append("Resposta -> ").append(mensagemErro); + } + + return mensagemRetorno.toString(); + } + private String getToken() throws JOSEException { + long ttlMillis = minutesExpireToken * 60000; + long nowMillis = System.currentTimeMillis(); + long expMillis = nowMillis + ttlMillis; + + JWTClaimsSet claims = new JWTClaimsSet.Builder() + .claim("sub", new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(new Date())) + .claim("userId", "adm") + .claim("role", "ROLE_TOKEN") + .claim("exp", expMillis) + .build(); + + JWSObject jwsObject = new JWSObject(new JWSHeader(JWSAlgorithm.HS256), + new Payload(claims.toJSONObject())); + + jwsObject.sign(new MACSigner(DatatypeConverter.parseBase64Binary(secret))); + + return jwsObject.serialize(); + } + +} \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/analitico/gerenciais/bpe/SubMenuRelatorioBpe.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/analitico/gerenciais/bpe/SubMenuRelatorioBpe.java new file mode 100644 index 000000000..158673616 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/analitico/gerenciais/bpe/SubMenuRelatorioBpe.java @@ -0,0 +1,16 @@ +package com.rjconsultores.ventaboletos.web.utilerias.menu.item.analitico.gerenciais.bpe; + +import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema; + +public class SubMenuRelatorioBpe extends DefaultItemMenuSistema { + + public SubMenuRelatorioBpe() { + super("indexController.mniRelatoriosBpe.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS"; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioBPeSubstituido.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioBPeSubstituido.java new file mode 100644 index 000000000..fbe9e7ca6 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioBPeSubstituido.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 ItemMenuRelatorioBPeSubstituido extends DefaultItemMenuSistema { + + public ItemMenuRelatorioBPeSubstituido() { + super("indexController.mniRelatorioBPeSubstituido.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOBPESUBSTITUIDO"; + } + + @Override + public void ejecutar() { + PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioBPeSubstituido.zul", + Labels.getLabel("relatorioBPeSubstituidoController.window.title"), getArgs(), desktop); + + } +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioCteos.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioCteos.java new file mode 100644 index 000000000..4d5a91838 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioCteos.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 ItemMenuRelatorioCteos extends DefaultItemMenuSistema { + + public ItemMenuRelatorioCteos() { + super("indexController.mniRelatorioCteos.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOCTEOS"; + } + + @Override + public void ejecutar() { + PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioCteos.zul", + Labels.getLabel("relatorioCteosController.window.title"), getArgs(), desktop); + + } +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioRetornoBancario.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioRetornoBancario.java new file mode 100644 index 000000000..03bc4d4d4 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioRetornoBancario.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 ItemMenuRelatorioRetornoBancario extends DefaultItemMenuSistema { + + public ItemMenuRelatorioRetornoBancario() { + super("indexController.mniRelatorioRetornoBancario.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIORETORNOBANCARIO"; + } + + @Override + public void ejecutar() { + PantallaUtileria.openWindow("/gui/relatorios/importarRetornoBancario.zul", + Labels.getLabel("relatorioRetornoBancario.window.title"), getArgs(), desktop); + + } +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/seguridad/ItemMenuLimparCacheEmbarcadaAPI.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/seguridad/ItemMenuLimparCacheEmbarcadaAPI.java new file mode 100644 index 000000000..519e7265c --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/seguridad/ItemMenuLimparCacheEmbarcadaAPI.java @@ -0,0 +1,105 @@ +package com.rjconsultores.ventaboletos.web.utilerias.menu.item.seguridad; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.springframework.context.ApplicationContext; +import org.zkoss.util.resource.Labels; +import org.zkoss.zk.ui.util.Clients; +import org.zkoss.zul.Messagebox; + +import com.rjconsultores.ventaboletos.service.ConstanteService; +import com.rjconsultores.ventaboletos.web.utilerias.api.ApiCallRunnable; +import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema; +import com.rjconsultores.ventaboletos.web.utilerias.spring.AppContext; + +public class ItemMenuLimparCacheEmbarcadaAPI extends DefaultItemMenuSistema { + private static Logger log = Logger.getLogger(ItemMenuLimparCacheEmbarcadaAPI.class); + + + public ItemMenuLimparCacheEmbarcadaAPI() { + super("indexController.mniLimparCacheEmbarcadaAPI.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.SEGURIDAD.MENU.RECARREGARCACHEEMBARCADASINCRONIZACAOAPI"; + } + + @Override + public void ejecutar() { + + try { + + int resp = Messagebox.show( + Labels.getLabel("limparCacheEmbarcadaAPI.message.pergunta"), + Labels.getLabel("limparCacheEmbarcadaAPI.title"), Messagebox.YES | Messagebox.NO, Messagebox.QUESTION); + + if (resp == Messagebox.YES) { + + String[] urls = getURLSAPI(); + + if (urls == null || urls.length == 0) { + Clients.alert(org.zkoss.util.resource.Labels.getLabel("limparCacheEmbarcadaAPI.message.naoconfigurado"), + org.zkoss.util.resource.Labels.getLabel("limparCacheEmbarcadaAPI.title"), Messagebox.INFORMATION); + return; + } + + for (String url : urls) { + + if (StringUtils.isBlank(url) || url.contains("|")) { + Clients.alert(org.zkoss.util.resource.Labels.getLabel("limparCacheEmbarcadaAPI.message.naoconfigurado"), + org.zkoss.util.resource.Labels.getLabel("limparCacheEmbarcadaAPI.title"), Messagebox.INFORMATION); + return; + } + + String tenant = StringUtils.substringBetween(url, "[", "]"); + if (tenant != null) { + url = url.replaceAll("\\[.*?\\]", ""); + } + String urlBase = url; + url = montarUrlRequest(url); + + ApiCallRunnable cache = new ApiCallRunnable(url, tenant, urlBase); + Thread thread = new Thread(cache); + thread.start(); + thread.join(); + + Clients.alert(cache.getRetorno(), org.zkoss.util.resource.Labels.getLabel("limparCacheEmbarcadaAPI.title"), Messagebox.INFORMATION); + } + + } + + } catch (Exception e) { + Clients.alert(e.getMessage(), + org.zkoss.util.resource.Labels.getLabel("limparCacheEmbarcadaAPI.title"), Messagebox.ERROR); + log.error(e.getMessage(), e); + } + + } + + private String montarUrlRequest(String url) { + + url = url.toLowerCase(); + + if (!url.endsWith("/")) { + url += "/"; + } + + return url.concat("adm/limparCacheSincronizacaoTramos"); + } + + private String[] getURLSAPI() { + ApplicationContext appContext = AppContext.getApplicationContext(); + ConstanteService constanteService = (ConstanteService) appContext.getBean("constanteService"); + String constante = constanteService.buscarURLAPIEmb(); + + if (StringUtils.isBlank(constante)){ + log.debug("Não foi encontrado a constante específica para a API da Embarcada. Será buscado o endereço da api de Venda"); + + constante = constanteService.buscarURLAPI(); + } + + return constante == null ? null : constante.split("\\|"); + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/seguridad/MenuAPI.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/seguridad/MenuAPI.java new file mode 100644 index 000000000..af03afd82 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/seguridad/MenuAPI.java @@ -0,0 +1,16 @@ +package com.rjconsultores.ventaboletos.web.utilerias.menu.item.seguridad; + +import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema; + +public class MenuAPI extends DefaultItemMenuSistema { + + public MenuAPI() { + super("indexController.mniAPI.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.SEGURIDAD.MENU.API"; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderEixoConexionRutaRemoveSelecionada.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderEixoConexionRutaRemoveSelecionada.java new file mode 100644 index 000000000..6d1c6a5ed --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderEixoConexionRutaRemoveSelecionada.java @@ -0,0 +1,52 @@ + +package com.rjconsultores.ventaboletos.web.utilerias.render; + +import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zul.Button; +import org.zkoss.zul.Listcell; +import org.zkoss.zul.Listitem; +import org.zkoss.zul.ListitemRenderer; + +import com.rjconsultores.ventaboletos.entidad.Parada; + +/** + * + * @author Valdevir + */ +public class RenderEixoConexionRutaRemoveSelecionada implements ListitemRenderer { + + private EventListener listenerGenerico; + + public RenderEixoConexionRutaRemoveSelecionada(EventListener listenerGenerico) { + super(); + this.listenerGenerico = listenerGenerico; + } + + public void render(Listitem lstm, Object o) throws Exception { + Parada parada = (Parada) o; + + Listcell lc = new Listcell(parada.getDescparada().toString()); + lc.setParent(lstm); + + lc = new Listcell(); + + if(!Boolean.TRUE.equals(parada.getIsParadaConexaoRutaExcluida())) { + Button btnRemoverPermissao = new Button(); + btnRemoverPermissao.setAttribute("data", o); + btnRemoverPermissao.addEventListener("onClick", listenerGenerico); + btnRemoverPermissao.setImage("/gui/img/remove.png"); + lc.appendChild(btnRemoverPermissao); + + }else { + Button btnAddPermissao = new Button(); + btnAddPermissao.setAttribute("data", o); + btnAddPermissao.addEventListener("onClick", listenerGenerico); + btnAddPermissao.setImage("/gui/img/add.png"); + lc.appendChild(btnAddPermissao); + } + + lc.setParent(lstm); + + lstm.setAttribute("data", parada); + } +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderParada.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderParada.java new file mode 100644 index 000000000..2dddc8858 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderParada.java @@ -0,0 +1,20 @@ +package com.rjconsultores.ventaboletos.web.utilerias.render; + +import org.zkoss.zul.Listcell; +import org.zkoss.zul.Listitem; +import org.zkoss.zul.ListitemRenderer; + +import com.rjconsultores.ventaboletos.entidad.Parada; + +public class RenderParada implements ListitemRenderer { + + public void render(Listitem lstm, Object o) throws Exception { + Parada parada = (Parada) o; + + Listcell lc = new Listcell(parada.getCveparada() + " - " + parada.getDescparada()); + lc.setParent(lstm); + + lstm.setAttribute("data", parada); + + } +}