fixes bug#0011951
dev: thiago qua: wallysson Implementação efetuada conforme evidência. git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@86665 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
f1f3e6ba48
commit
9aac43b27f
|
@ -5,10 +5,9 @@ import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayDataSource;
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayCustomDataSourceRelatorio;
|
||||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||||
import com.rjconsultores.ventaboletos.utils.FormataUtil;
|
import com.rjconsultores.ventaboletos.utils.FormataUtil;
|
||||||
|
@ -25,51 +24,86 @@ public class RelatorioHistoricoCompras extends Relatorio {
|
||||||
setCustomDataSource(new ArrayCustomDataSource(this));
|
setCustomDataSource(new ArrayCustomDataSource(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
private final class ArrayCustomDataSource extends ArrayDataSource {
|
private final class ArrayCustomDataSource extends ArrayCustomDataSourceRelatorio {
|
||||||
private ArrayCustomDataSource(Relatorio relatorio) throws Exception {
|
private ArrayCustomDataSource(Relatorio relatorio) throws Exception {
|
||||||
super(relatorio);
|
super(relatorio);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initDados() throws Exception {
|
protected void getSql(StringBuilder instrucaoSql, Map<String, Object> parametros) {
|
||||||
Connection conexao = this.relatorio.getConexao();
|
instrucaoSql.append(" SELECT ");
|
||||||
Map<String, Object> parametros = this.relatorio.getParametros();
|
instrucaoSql.append(" ca.fechorventa_h venda, ");
|
||||||
|
instrucaoSql.append(" ca.numfoliosistema bilhete, ");
|
||||||
|
instrucaoSql.append(" ca.corrida_id servico, ");
|
||||||
|
instrucaoSql.append(" o.descparada origem, ");
|
||||||
|
instrucaoSql.append(" d.descparada destino, ");
|
||||||
|
instrucaoSql.append(" u.cveusuario operador, ");
|
||||||
|
instrucaoSql.append(" ca.preciopagado + ca.importeoutros + ca.importepedagio + ca.importeseguro + ca.importetaxaembarque valor, ");
|
||||||
|
instrucaoSql.append(" ca.fechorviaje viagem, ");
|
||||||
|
instrucaoSql.append(" ca.numasiento poltrona, ");
|
||||||
|
instrucaoSql.append(" pv.numpuntoventa||'-'||pv.nombpuntoventa agencia, ");
|
||||||
|
instrucaoSql.append(" cli.numtelefonodos celular, ");
|
||||||
|
instrucaoSql.append(" cli.numtelefono telefone, ");
|
||||||
|
instrucaoSql.append(" cli.numfax comercial, ");
|
||||||
|
instrucaoSql.append(" cli.nombcliente nome, ");
|
||||||
|
instrucaoSql.append(" CASE ");
|
||||||
|
instrucaoSql.append(" WHEN cli.tipoidentificauno_id = 2 THEN cli.numidentificauno ");
|
||||||
|
instrucaoSql.append(" WHEN cli.tipoidentificados_id = 2 THEN cli.numidentificados ");
|
||||||
|
instrucaoSql.append(" ELSE NULL ");
|
||||||
|
instrucaoSql.append(" END ");
|
||||||
|
instrucaoSql.append(" cpf ");
|
||||||
|
instrucaoSql.append(" FROM ");
|
||||||
|
instrucaoSql.append(" caja ca ");
|
||||||
|
instrucaoSql.append(" INNER JOIN cliente cli ON ca.clientecomprador_id = cli.cliente_id ");
|
||||||
|
instrucaoSql.append(" INNER JOIN usuario u ON ca.usuario_id = u.usuario_id ");
|
||||||
|
instrucaoSql.append(" INNER JOIN punto_venta pv ON ca.puntoventa_id = pv.puntoventa_id ");
|
||||||
|
instrucaoSql.append(" INNER JOIN ruta r on ca.ruta_id = r.ruta_id ");
|
||||||
|
instrucaoSql.append(" LEFT JOIN parada o ON ca.origen_id = o.parada_id ");
|
||||||
|
instrucaoSql.append(" LEFT JOIN parada d ON ca.destino_id = d.parada_id ");
|
||||||
|
|
||||||
String sql = getSql(parametros);
|
if (parametros.get("dtVendaInicial") != null
|
||||||
|
&& parametros.get("dtEmbarqueInicial") != null) {
|
||||||
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
|
instrucaoSql.append(" WHERE ca.fechorventa_h BETWEEN :dt_venda_inicio and :dt_venda_fim ");
|
||||||
|
instrucaoSql.append(" and ca.fechorviaje BETWEEN :dt_embarque_inicio and :dt_embarque_fim ");
|
||||||
setParametrosConsultaSql(parametros, stmt);
|
} else if (parametros.get("dtVendaInicial") != null) {
|
||||||
|
instrucaoSql.append(" WHERE ca.fechorventa_h BETWEEN :dt_venda_inicio and :dt_venda_fim ");
|
||||||
ResultSet rset = stmt.executeQuery();
|
} else {
|
||||||
|
instrucaoSql.append(" WHERE ca.fechorviaje BETWEEN :dt_embarque_inicio and :dt_embarque_fim ");
|
||||||
while (rset.next()) {
|
|
||||||
|
|
||||||
Map<String, Object> dataResult = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
dataResult.put("venda", FormataUtil.formataDataToString((Date)rset.getTimestamp("venda"), "", "dd/MM/yyyy hh:mm"));
|
|
||||||
dataResult.put("bilhete", rset.getString("bilhete"));
|
|
||||||
dataResult.put("servico", rset.getString("servico"));
|
|
||||||
dataResult.put("origem", rset.getString("origem"));
|
|
||||||
dataResult.put("destino", rset.getString("destino"));
|
|
||||||
dataResult.put("operador", rset.getString("operador"));
|
|
||||||
dataResult.put("valor", rset.getBigDecimal("valor"));
|
|
||||||
dataResult.put("viagem", FormataUtil.formataDataToString((Date)rset.getTimestamp("viagem"), "", "dd/MM/yyyy hh:mm"));
|
|
||||||
dataResult.put("poltrona", rset.getString("poltrona"));
|
|
||||||
dataResult.put("agencia", rset.getString("agencia"));
|
|
||||||
dataResult.put("celular", rset.getString("celular"));
|
|
||||||
dataResult.put("telefone", rset.getString("telefone"));
|
|
||||||
dataResult.put("comercial", rset.getString("comercial"));
|
|
||||||
dataResult.put("nome", rset.getString("nome"));
|
|
||||||
dataResult.put("cpf", rset.getString("cpf"));
|
|
||||||
|
|
||||||
this.dados.add(dataResult);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.resultSet = rset;
|
if (parametros.get("puntoVentaId") != null) {
|
||||||
|
instrucaoSql.append(" and pv.puntoventa_id in("+parametros.get("puntoVentaId")+") ");
|
||||||
|
}
|
||||||
|
if (parametros.get("numRuta") != null) {
|
||||||
|
instrucaoSql.append(" and r.numruta in ("+obtemIdsParametrizadosParaString(parametros.get("numRuta").toString())+ ") ");
|
||||||
|
}
|
||||||
|
if (parametros.get("clienteId") != null) {
|
||||||
|
instrucaoSql.append(" and cli.cliente_id in("+parametros.get("clienteId")+") ");
|
||||||
|
}
|
||||||
|
instrucaoSql.append("order by ca.fechorventa_h");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setParametrosConsultaSql(Map<String, Object> parametros, NamedParameterStatement stmt) throws SQLException {
|
@Override
|
||||||
|
protected void populaValoresDataResult(Map<String, Object> dataResult, ResultSet resultSet) throws SQLException {
|
||||||
|
dataResult.put("venda", FormataUtil.formataDataToString((Date)resultSet.getTimestamp("venda"), "", "dd/MM/yyyy hh:mm"));
|
||||||
|
dataResult.put("bilhete", resultSet.getString("bilhete"));
|
||||||
|
dataResult.put("servico", resultSet.getString("servico"));
|
||||||
|
dataResult.put("origem", resultSet.getString("origem"));
|
||||||
|
dataResult.put("destino", resultSet.getString("destino"));
|
||||||
|
dataResult.put("operador", resultSet.getString("operador"));
|
||||||
|
dataResult.put("valor", resultSet.getBigDecimal("valor"));
|
||||||
|
dataResult.put("viagem", FormataUtil.formataDataToString((Date)resultSet.getTimestamp("viagem"), "", "dd/MM/yyyy hh:mm"));
|
||||||
|
dataResult.put("poltrona", resultSet.getString("poltrona"));
|
||||||
|
dataResult.put("agencia", resultSet.getString("agencia"));
|
||||||
|
dataResult.put("celular", resultSet.getString("celular"));
|
||||||
|
dataResult.put("telefone", resultSet.getString("telefone"));
|
||||||
|
dataResult.put("comercial", resultSet.getString("comercial"));
|
||||||
|
dataResult.put("nome", resultSet.getString("nome"));
|
||||||
|
dataResult.put("cpf", resultSet.getString("cpf"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void configuraParametrosConsultaSql(Map<String, Object> parametros, NamedParameterStatement stmt) throws SQLException {
|
||||||
if (parametros.get("dtVendaInicial") != null) {
|
if (parametros.get("dtVendaInicial") != null) {
|
||||||
stmt.setTimestamp("dt_venda_inicio", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("dtVendaInicial")).getTime()));
|
stmt.setTimestamp("dt_venda_inicio", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("dtVendaInicial")).getTime()));
|
||||||
stmt.setTimestamp("dt_venda_fim", new Timestamp(DateUtil.fimFecha((Date) parametros.get("dtVendaFinal")).getTime()));
|
stmt.setTimestamp("dt_venda_fim", new Timestamp(DateUtil.fimFecha((Date) parametros.get("dtVendaFinal")).getTime()));
|
||||||
|
@ -79,62 +113,6 @@ public class RelatorioHistoricoCompras extends Relatorio {
|
||||||
stmt.setTimestamp("dt_embarque_inicio", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("dtEmbarqueInicial")).getTime()));
|
stmt.setTimestamp("dt_embarque_inicio", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("dtEmbarqueInicial")).getTime()));
|
||||||
stmt.setTimestamp("dt_embarque_fim", new Timestamp(DateUtil.fimFecha((Date) parametros.get("dtEmbarqueFinal")).getTime()));
|
stmt.setTimestamp("dt_embarque_fim", new Timestamp(DateUtil.fimFecha((Date) parametros.get("dtEmbarqueFinal")).getTime()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getSql(Map<String, Object> parametros) {
|
|
||||||
StringBuilder sql = new StringBuilder();
|
|
||||||
sql.append(" SELECT ");
|
|
||||||
sql.append(" ca.fechorventa_h venda, ");
|
|
||||||
sql.append(" ca.numfoliosistema bilhete, ");
|
|
||||||
sql.append(" ca.corrida_id servico, ");
|
|
||||||
sql.append(" o.descparada origem, ");
|
|
||||||
sql.append(" d.descparada destino, ");
|
|
||||||
sql.append(" u.cveusuario operador, ");
|
|
||||||
sql.append(" ca.preciopagado + ca.importeoutros + ca.importepedagio + ca.importeseguro + ca.importetaxaembarque valor, ");
|
|
||||||
sql.append(" ca.fechorviaje viagem, ");
|
|
||||||
sql.append(" ca.numasiento poltrona, ");
|
|
||||||
sql.append(" pv.numpuntoventa||'-'||pv.nombpuntoventa agencia, ");
|
|
||||||
sql.append(" cli.numtelefonodos celular, ");
|
|
||||||
sql.append(" cli.numtelefono telefone, ");
|
|
||||||
sql.append(" cli.numfax comercial, ");
|
|
||||||
sql.append(" cli.nombcliente nome, ");
|
|
||||||
sql.append(" CASE ");
|
|
||||||
sql.append(" WHEN cli.tipoidentificauno_id = 2 THEN cli.numidentificauno ");
|
|
||||||
sql.append(" WHEN cli.tipoidentificados_id = 2 THEN cli.numidentificados ");
|
|
||||||
sql.append(" ELSE NULL ");
|
|
||||||
sql.append(" END ");
|
|
||||||
sql.append(" cpf ");
|
|
||||||
sql.append(" FROM ");
|
|
||||||
sql.append(" caja ca ");
|
|
||||||
sql.append(" INNER JOIN cliente cli ON ca.clientecomprador_id = cli.cliente_id ");
|
|
||||||
sql.append(" INNER JOIN usuario u ON ca.usuario_id = u.usuario_id ");
|
|
||||||
sql.append(" INNER JOIN punto_venta pv ON ca.puntoventa_id = pv.puntoventa_id ");
|
|
||||||
sql.append(" INNER JOIN ruta r on ca.ruta_id = r.ruta_id ");
|
|
||||||
sql.append(" LEFT JOIN parada o ON ca.origen_id = o.parada_id ");
|
|
||||||
sql.append(" LEFT JOIN parada d ON ca.destino_id = d.parada_id ");
|
|
||||||
|
|
||||||
if (parametros.get("dtVendaInicial") != null
|
|
||||||
&& parametros.get("dtEmbarqueInicial") != null) {
|
|
||||||
sql.append(" WHERE ca.fechorventa_h BETWEEN :dt_venda_inicio and :dt_venda_fim ");
|
|
||||||
sql.append(" and ca.fechorviaje BETWEEN :dt_embarque_inicio and :dt_embarque_fim ");
|
|
||||||
} else if (parametros.get("dtVendaInicial") != null) {
|
|
||||||
sql.append(" WHERE ca.fechorventa_h BETWEEN :dt_venda_inicio and :dt_venda_fim ");
|
|
||||||
} else {
|
|
||||||
sql.append(" WHERE ca.fechorviaje BETWEEN :dt_embarque_inicio and :dt_embarque_fim ");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parametros.get("puntoVentaId") != null) {
|
|
||||||
sql.append(" and pv.puntoventa_id in("+parametros.get("puntoVentaId")+") ");
|
|
||||||
}
|
|
||||||
if (parametros.get("numRuta") != null) {
|
|
||||||
sql.append(" and r.numruta in ("+obtemIdsParametrizadosParaString(parametros.get("numRuta").toString())+ ") ");
|
|
||||||
}
|
|
||||||
if (parametros.get("clienteId") != null) {
|
|
||||||
sql.append(" and cli.cliente_id in("+parametros.get("clienteId")+") ");
|
|
||||||
}
|
|
||||||
sql.append("order by ca.fechorventa_h");
|
|
||||||
return sql.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String obtemIdsParametrizadosParaString(String parametro) {
|
public String obtemIdsParametrizadosParaString(String parametro) {
|
||||||
|
@ -154,6 +132,7 @@ public class RelatorioHistoricoCompras extends Relatorio {
|
||||||
private boolean isIntermediario(String[] ids, int i) {
|
private boolean isIntermediario(String[] ids, int i) {
|
||||||
return (i > 0) && (i != ids.length);
|
return (i > 0) && (i != ids.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,85 @@
|
||||||
|
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayCustomDataSourceRelatorio;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||||
|
import com.rjconsultores.ventaboletos.utils.FormataUtil;
|
||||||
|
import com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso.ETipoPeriodoRelatorioPosicaoVendaBilheteIdoso;
|
||||||
|
import com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso.RelatorioPosicaoVendaBilheteIdosoController;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||||
|
|
||||||
|
public class RelatorioPosicaoVendaBilheteIdosoPorPassageiro extends Relatorio {
|
||||||
|
|
||||||
|
public RelatorioPosicaoVendaBilheteIdosoPorPassageiro(Map<String, Object> parametros, Connection conexao) {
|
||||||
|
super(parametros, conexao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void processaParametros() throws Exception {
|
||||||
|
setCustomDataSource(new ArrayCustomDataSource(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
private final class ArrayCustomDataSource extends ArrayCustomDataSourceRelatorio {
|
||||||
|
|
||||||
|
public ArrayCustomDataSource(Relatorio relatorio) throws Exception {
|
||||||
|
super(relatorio);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void getSql(StringBuilder instrucaoSql, Map<String, Object> parametros) {
|
||||||
|
instrucaoSql.append("SELECT R.DESCRUTA, CAT.DESCCATEGORIA, ");
|
||||||
|
instrucaoSql.append("ORIGEM.DESCPARADA ORIGEM, ");
|
||||||
|
instrucaoSql.append("DESTINO.DESCPARADA DESTINO, ");
|
||||||
|
instrucaoSql.append("C.FECHORVENTA_H DATA_VENDA, ");
|
||||||
|
instrucaoSql.append("C.FECCORRIDA DATA_VIAGEM, ");
|
||||||
|
instrucaoSql.append("C.NOMBPASAJERO NOME_PASSAGEIRO, ");
|
||||||
|
instrucaoSql.append("C.DESCNUMDOC DOCUMENTO ");
|
||||||
|
instrucaoSql.append("FROM CAJA C ");
|
||||||
|
instrucaoSql.append("INNER JOIN RUTA R ON C.RUTA_ID = R.RUTA_ID ");
|
||||||
|
instrucaoSql.append("INNER JOIN CATEGORIA CAT ON C.CATEGORIA_ID = CAT.CATEGORIA_ID ");
|
||||||
|
instrucaoSql.append("INNER JOIN PARADA ORIGEM ON ORIGEM.PARADA_ID = C.ORIGEN_ID ");
|
||||||
|
instrucaoSql.append("INNER JOIN PARADA DESTINO ON DESTINO.PARADA_ID = C.DESTINO_ID ");
|
||||||
|
instrucaoSql.append("WHERE ");
|
||||||
|
if (ETipoPeriodoRelatorioPosicaoVendaBilheteIdoso.VENDA.equals(
|
||||||
|
(ETipoPeriodoRelatorioPosicaoVendaBilheteIdoso)parametros.get("tpData"))) {
|
||||||
|
instrucaoSql.append("C.FECHORVENTA_H BETWEEN :dtInicial AND :dtFinal ");
|
||||||
|
} else {
|
||||||
|
instrucaoSql.append("C.FECCORRIDA BETWEEN :dtInicial AND :dtFinal ");
|
||||||
|
}
|
||||||
|
instrucaoSql.append("AND C.EMPRESACORRIDA_ID = :empresaId ");
|
||||||
|
instrucaoSql.append("AND C.CATEGORIA_ID IN ("+parametros.get("categoriaId").toString()+") ");
|
||||||
|
if (!RelatorioPosicaoVendaBilheteIdosoController.LISTAR_TODAS.equals(parametros.get("rutaId"))) {
|
||||||
|
instrucaoSql.append("AND C.RUTA_ID IN ("+parametros.get("rutaId").toString()+") ");
|
||||||
|
}
|
||||||
|
instrucaoSql.append("ORDER BY R.DESCRUTA, CAT.DESCCATEGORIA ");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void populaValoresDataResult(Map<String, Object> dataResult, ResultSet resultSet) throws SQLException {
|
||||||
|
dataResult.put("origem", resultSet.getString("origem"));
|
||||||
|
dataResult.put("destino", resultSet.getString("destino"));
|
||||||
|
dataResult.put("data_venda", FormataUtil.formataDataToString((Date)resultSet.getTimestamp("data_venda"), "", "dd/MM/yyyy"));
|
||||||
|
dataResult.put("data_viagem", FormataUtil.formataDataToString((Date)resultSet.getTimestamp("data_viagem"), "", "dd/MM/yyyy hh:mm"));
|
||||||
|
dataResult.put("nome_passageiro", resultSet.getString("nome_passageiro"));
|
||||||
|
dataResult.put("documento", resultSet.getString("documento"));
|
||||||
|
dataResult.put("descRuta", resultSet.getString("descruta"));
|
||||||
|
dataResult.put("descCategoria", resultSet.getString("desccategoria"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void configuraParametrosConsultaSql(Map<String, Object> parametros, NamedParameterStatement stmt) throws SQLException {
|
||||||
|
stmt.setTimestamp("dtInicial", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("dtInicial")).getTime()));
|
||||||
|
stmt.setTimestamp("dtFinal", new Timestamp(DateUtil.fimFecha((Date) parametros.get("dtFinal")).getTime()));
|
||||||
|
stmt.setObject("empresaId", parametros.get("empresaId"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,98 @@
|
||||||
|
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayCustomDataSourceRelatorio;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||||
|
import com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso.ETipoPeriodoRelatorioPosicaoVendaBilheteIdoso;
|
||||||
|
import com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso.RelatorioPosicaoVendaBilheteIdosoController;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||||
|
|
||||||
|
public class RelatorioPosicaoVendaBilheteIdosoPorTrecho extends Relatorio {
|
||||||
|
|
||||||
|
public RelatorioPosicaoVendaBilheteIdosoPorTrecho(Map<String, Object> parametros, Connection conexao) {
|
||||||
|
super(parametros, conexao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void processaParametros() throws Exception {
|
||||||
|
setCustomDataSource(new ArrayCustomDataSource(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
private final class ArrayCustomDataSource extends ArrayCustomDataSourceRelatorio {
|
||||||
|
|
||||||
|
public ArrayCustomDataSource(Relatorio relatorio) throws Exception {
|
||||||
|
super(relatorio);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void getSql(StringBuilder instrucaoSql, Map<String, Object> parametros) {
|
||||||
|
instrucaoSql.append("SELECT R.DESCRUTA, CAT.DESCCATEGORIA, ");
|
||||||
|
instrucaoSql.append("ORIGEM.DESCPARADA ORIGEM, ");
|
||||||
|
instrucaoSql.append("DESTINO.DESCPARADA DESTINO, ");
|
||||||
|
instrucaoSql.append("COUNT(C.CAJA_ID) QTDE, ");
|
||||||
|
instrucaoSql.append("COALESCE(C.IMPORTETAXAEMBARQUE, 0) TAXA_EMBARQUE, ");
|
||||||
|
instrucaoSql.append("COALESCE(C.PRECIOPAGADO, 0) + COALESCE(C.IMPORTEOUTROS, 0) + ");
|
||||||
|
instrucaoSql.append("COALESCE(C.IMPORTEPEDAGIO, 0) + COALESCE(C.IMPORTESEGURO, 0) + ");
|
||||||
|
instrucaoSql.append("COALESCE(C.IMPORTETAXAEMBARQUE, 0) FACIAL ");
|
||||||
|
instrucaoSql.append("FROM CAJA C ");
|
||||||
|
instrucaoSql.append("INNER JOIN RUTA R ON C.RUTA_ID = R.RUTA_ID ");
|
||||||
|
instrucaoSql.append("INNER JOIN CATEGORIA CAT ON C.CATEGORIA_ID = CAT.CATEGORIA_ID ");
|
||||||
|
instrucaoSql.append("INNER JOIN PARADA ORIGEM ON ORIGEM.PARADA_ID = C.ORIGEN_ID ");
|
||||||
|
instrucaoSql.append("INNER JOIN PARADA DESTINO ON DESTINO.PARADA_ID = C.DESTINO_ID ");
|
||||||
|
instrucaoSql.append("INNER JOIN TARIFA TAR ON (TAR.RUTA_ID = C.RUTA_ID ");
|
||||||
|
instrucaoSql.append(" AND TAR.MARCA_ID = C.MARCA_ID ");
|
||||||
|
instrucaoSql.append(" AND TAR.CLASESERVICIO_ID = C.CLASESERVICIO_ID ");
|
||||||
|
instrucaoSql.append(" AND TAR.ORIGEN_ID = C.ORIGEN_ID ");
|
||||||
|
instrucaoSql.append(" AND TAR.DESTINO_ID = C.DESTINO_ID AND TAR.ACTIVO = 1) ");
|
||||||
|
instrucaoSql.append("INNER JOIN VIGENCIA_TARIFA VT ON TAR.VIGENCIATARIFA_ID = VT.VIGENCIATARIFA_ID ");
|
||||||
|
instrucaoSql.append("WHERE ");
|
||||||
|
if (ETipoPeriodoRelatorioPosicaoVendaBilheteIdoso.VENDA.equals(
|
||||||
|
(ETipoPeriodoRelatorioPosicaoVendaBilheteIdoso)parametros.get("tpData"))) {
|
||||||
|
instrucaoSql.append("C.FECHORVENTA_H BETWEEN :dtInicial AND :dtFinal ");
|
||||||
|
} else {
|
||||||
|
instrucaoSql.append("C.FECCORRIDA BETWEEN :dtInicial AND :dtFinal ");
|
||||||
|
}
|
||||||
|
instrucaoSql.append("AND C.EMPRESACORRIDA_ID = :empresaId ");
|
||||||
|
instrucaoSql.append("AND C.CATEGORIA_ID IN ("+parametros.get("categoriaId").toString()+") ");
|
||||||
|
if (!RelatorioPosicaoVendaBilheteIdosoController.LISTAR_TODAS.equals(parametros.get("rutaId"))) {
|
||||||
|
instrucaoSql.append("AND C.RUTA_ID IN ("+parametros.get("rutaId").toString()+") ");
|
||||||
|
}
|
||||||
|
instrucaoSql.append("GROUP BY R.DESCRUTA, ");
|
||||||
|
instrucaoSql.append("CAT.DESCCATEGORIA, ");
|
||||||
|
instrucaoSql.append("ORIGEM.DESCPARADA, ");
|
||||||
|
instrucaoSql.append("DESTINO.DESCPARADA, ");
|
||||||
|
instrucaoSql.append("COALESCE(C.IMPORTETAXAEMBARQUE, 0), ");
|
||||||
|
instrucaoSql.append("COALESCE(C.PRECIOPAGADO, 0) + COALESCE(C.IMPORTEOUTROS, 0) + ");
|
||||||
|
instrucaoSql.append("COALESCE(C.IMPORTEPEDAGIO, 0) + COALESCE(C.IMPORTESEGURO, 0) + ");
|
||||||
|
instrucaoSql.append("COALESCE(C.IMPORTETAXAEMBARQUE, 0) ");
|
||||||
|
instrucaoSql.append("ORDER BY R.DESCRUTA, CAT.DESCCATEGORIA ");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void populaValoresDataResult(Map<String, Object> dataResult, ResultSet resultSet) throws SQLException {
|
||||||
|
dataResult.put("origem", resultSet.getString("origem"));
|
||||||
|
dataResult.put("destino", resultSet.getString("destino"));
|
||||||
|
dataResult.put("total", resultSet.getBigDecimal("taxa_embarque"));
|
||||||
|
dataResult.put("qtde", resultSet.getInt("qtde"));
|
||||||
|
dataResult.put("facial", resultSet.getBigDecimal("facial"));
|
||||||
|
dataResult.put("descRuta", resultSet.getString("descruta"));
|
||||||
|
dataResult.put("descCategoria", resultSet.getString("desccategoria"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void configuraParametrosConsultaSql(Map<String, Object> parametros, NamedParameterStatement stmt) throws SQLException {
|
||||||
|
stmt.setTimestamp("dtInicial", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("dtInicial")).getTime()));
|
||||||
|
stmt.setTimestamp("dtFinal", new Timestamp(DateUtil.fimFecha((Date) parametros.get("dtFinal")).getTime()));
|
||||||
|
stmt.setObject("empresaId", parametros.get("empresaId"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
#geral
|
||||||
|
msg.noData = No se pudo obtener datos con los par\u00E1metros reportados.
|
||||||
|
|
||||||
|
#Labels cabeçalho
|
||||||
|
cabecalho.relatorio=Relatório:
|
||||||
|
cabecalho.periodo=Período:
|
||||||
|
cabecalho.periodoA=à
|
||||||
|
cabecalho.dataHora=Data/Hora:
|
||||||
|
cabecalho.impressorPor=Impresso por:
|
||||||
|
cabecalho.pagina=Página
|
||||||
|
cabecalho.de=de
|
||||||
|
cabecalho.filtros=Filtros:
|
||||||
|
cabecalho.empresa=Empresa:
|
||||||
|
cabecalho.linhas=Linha:
|
|
@ -0,0 +1,16 @@
|
||||||
|
#geral
|
||||||
|
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||||
|
|
||||||
|
#Labels header
|
||||||
|
cabecalho.relatorio=Relatório:
|
||||||
|
cabecalho.periodo=Período:
|
||||||
|
cabecalho.periodoA=à
|
||||||
|
cabecalho.dataHora=Data/Hora:
|
||||||
|
cabecalho.impressorPor=Impresso por:
|
||||||
|
cabecalho.pagina=Página
|
||||||
|
cabecalho.de=de
|
||||||
|
cabecalho.filtros=Filtros:
|
||||||
|
cabecalho.empresa=Empresa:
|
||||||
|
cabecalho.linhas=Linha:
|
||||||
|
cabecalho.tipoData=Tipo de Data:
|
||||||
|
cabecalho.orgao=Orgão Concedente:
|
|
@ -0,0 +1,14 @@
|
||||||
|
#geral
|
||||||
|
msg.noData = No se pudo obtener datos con los par\u00E1metros reportados.
|
||||||
|
|
||||||
|
#Labels cabeçalho
|
||||||
|
cabecalho.relatorio=Relatório:
|
||||||
|
cabecalho.periodo=Período:
|
||||||
|
cabecalho.periodoA=à
|
||||||
|
cabecalho.dataHora=Data/Hora:
|
||||||
|
cabecalho.impressorPor=Impresso por:
|
||||||
|
cabecalho.pagina=Página
|
||||||
|
cabecalho.de=de
|
||||||
|
cabecalho.filtros=Filtros:
|
||||||
|
cabecalho.empresa=Empresa:
|
||||||
|
cabecalho.linhas=Linha:
|
|
@ -0,0 +1,16 @@
|
||||||
|
#geral
|
||||||
|
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||||
|
|
||||||
|
#Labels header
|
||||||
|
cabecalho.relatorio=Relatório:
|
||||||
|
cabecalho.periodo=Período:
|
||||||
|
cabecalho.periodoA=à
|
||||||
|
cabecalho.dataHora=Data/Hora:
|
||||||
|
cabecalho.impressorPor=Impresso por:
|
||||||
|
cabecalho.pagina=Página
|
||||||
|
cabecalho.de=de
|
||||||
|
cabecalho.filtros=Filtros:
|
||||||
|
cabecalho.empresa=Empresa:
|
||||||
|
cabecalho.linhas=Linha:
|
||||||
|
cabecalho.tipoData=Tipo de Data:
|
||||||
|
cabecalho.orgao=Orgão Concedente:
|
|
@ -140,8 +140,6 @@ public class RenderRelatorioJasper {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new Exception();
|
|
||||||
} finally {
|
} finally {
|
||||||
if (!StringUtils.isBlank(this.relatorio.getNome()) && this.relatorio.getNome().equalsIgnoreCase("RelatorioGratuidade")) {
|
if (!StringUtils.isBlank(this.relatorio.getNome()) && this.relatorio.getNome().equalsIgnoreCase("RelatorioGratuidade")) {
|
||||||
JRProperties.setProperty(JRParagraph.DEFAULT_TAB_STOP_WIDTH, "40");
|
JRProperties.setProperty(JRParagraph.DEFAULT_TAB_STOP_WIDTH, "40");
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,253 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="RelatorioPosicaoVendaBilheteIdosoPorPassageiro" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="7e37af0b-caa1-4f25-831c-5cbb2bb78560">
|
||||||
|
<property name="ireport.zoom" value="1.2100000000000002"/>
|
||||||
|
<property name="ireport.x" value="0"/>
|
||||||
|
<property name="ireport.y" value="0"/>
|
||||||
|
<parameter name="NOME_RELATORIO" class="java.lang.String"/>
|
||||||
|
<parameter name="empresa" class="java.lang.String"/>
|
||||||
|
<parameter name="linha" class="java.lang.String"/>
|
||||||
|
<parameter name="tipoData" class="java.lang.String"/>
|
||||||
|
<parameter name="periodo" class="java.lang.String"/>
|
||||||
|
<parameter name="orgao" class="java.lang.String"/>
|
||||||
|
<field name="origem" class="java.lang.String"/>
|
||||||
|
<field name="destino" class="java.lang.String"/>
|
||||||
|
<field name="data_venda" class="java.lang.String"/>
|
||||||
|
<field name="data_viagem" class="java.lang.String"/>
|
||||||
|
<field name="nome_passageiro" class="java.lang.String"/>
|
||||||
|
<field name="documento" class="java.lang.String"/>
|
||||||
|
<field name="descRuta" class="java.lang.String"/>
|
||||||
|
<field name="descCategoria" class="java.lang.String"/>
|
||||||
|
<variable name="contador" class="java.lang.Integer" resetType="Group" resetGroup="ruta" calculation="Count">
|
||||||
|
<variableExpression><![CDATA[$F{origem}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<group name="ruta">
|
||||||
|
<groupExpression><![CDATA[$F{descRuta}]]></groupExpression>
|
||||||
|
<groupHeader>
|
||||||
|
<band height="42">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="973583ee-63e4-4b32-a10e-b908debc4284" x="12" y="0" width="256" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{descRuta}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="ab86ac11-f143-40c3-8abf-f3666b2e7407" x="42" y="22" width="256" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{descCategoria}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</groupHeader>
|
||||||
|
<groupFooter>
|
||||||
|
<band height="25">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="b89cb198-1a50-430e-903e-d0059749b880" x="453" y="5" width="100" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$V{contador}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="8293e033-f13f-414b-901c-3428fbafff42" x="402" y="5" width="51" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<text><![CDATA[Qtde]]></text>
|
||||||
|
</staticText>
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="6661d4ec-4f67-44b6-95de-e7245a0ef65e" x="0" y="2" width="553" height="1"/>
|
||||||
|
</line>
|
||||||
|
</band>
|
||||||
|
</groupFooter>
|
||||||
|
</group>
|
||||||
|
<background>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</background>
|
||||||
|
<pageHeader>
|
||||||
|
<band height="141" splitType="Stretch">
|
||||||
|
<textField isStretchWithOverflow="true">
|
||||||
|
<reportElement uuid="e4d992c9-eb58-4b1e-878c-51ae5c729ab5" x="0" y="0" width="555" height="25"/>
|
||||||
|
<textElement textAlignment="Center">
|
||||||
|
<font size="14" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{NOME_RELATORIO}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="b6b378f0-944f-4749-9a9d-3e472361e7f7" x="0" y="39" width="100" height="20"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.empresa}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="8c699a77-f856-411f-9fac-501e7302c091" x="130" y="39" width="424" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{empresa}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="50284f0b-f675-46bb-8631-39946652702e" x="0" y="59" width="99" height="20"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.linhas}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="82bb8887-102e-4aac-a389-754fc985b623" x="130" y="59" width="424" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{linha}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="28aef032-0c0f-4e29-9f6a-5ae97f7be996" x="130" y="79" width="424" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{tipoData}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="acfcccfb-73e8-41a6-ac90-9aa1a86f6487" x="0" y="79" width="99" height="20"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.tipoData}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="9d5eb781-7cdf-4c6e-95a6-d16b53a2d20e" x="0" y="99" width="99" height="20"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.periodo}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="173b3e52-5b2e-4876-b40d-2774497dfbbe" x="130" y="99" width="424" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{periodo}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="ef42d3b8-d503-4309-a5ea-8f2b934d6ca9" x="0" y="139" width="554" height="1"/>
|
||||||
|
</line>
|
||||||
|
<textField isStretchWithOverflow="true">
|
||||||
|
<reportElement uuid="de253e75-48e4-4e9b-9dc7-726cce57dc72" x="0" y="119" width="99" height="20"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.orgao}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="35a35927-834b-4e52-83f8-a7e344cc8ce2" x="130" y="119" width="424" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{orgao}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</pageHeader>
|
||||||
|
<columnHeader>
|
||||||
|
<band height="20" splitType="Stretch">
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="7dfac679-5777-44d4-ad71-1d3f9a357d6c" x="0" y="0" width="100" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Origem]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="97304743-de9a-4844-8e9d-379d072740cf" x="100" y="0" width="100" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Destino]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="8d03ea0b-eb6f-4747-81d8-864d399fd64a" x="200" y="0" width="71" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Data Movimento]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="4c1e5926-c37e-456d-94ce-5e31e7c27757" x="271" y="0" width="85" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Data Partida]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="d00c3059-6ba6-49f0-bd00-8b6152b9dae5" x="356" y="0" width="127" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Nome]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="4f35ab49-374e-4e2c-9e74-228d741e9b57" x="483" y="0" width="72" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Documento]]></text>
|
||||||
|
</staticText>
|
||||||
|
</band>
|
||||||
|
</columnHeader>
|
||||||
|
<detail>
|
||||||
|
<band height="20" splitType="Stretch">
|
||||||
|
<textField isStretchWithOverflow="true">
|
||||||
|
<reportElement uuid="69fbf8f0-42ff-4ac1-b4c3-98cb8981756d" x="0" y="0" width="100" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{origem}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true">
|
||||||
|
<reportElement uuid="736fff80-1a77-49d3-ac6e-6db0455dea25" x="100" y="0" width="100" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{destino}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="24dc6a67-c61b-455b-92cf-6513bf0dd395" x="200" y="0" width="71" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{data_venda}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="1c152ef7-6a39-4213-89f2-6c132b72fec2" x="271" y="0" width="85" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{data_viagem}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true">
|
||||||
|
<reportElement uuid="baef4435-91db-4234-a7dd-4f4c68dd4934" x="356" y="0" width="127" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{nome_passageiro}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true">
|
||||||
|
<reportElement uuid="7b56a17d-dce8-44c3-9bfc-4e662ddb039a" x="483" y="0" width="72" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{documento}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</detail>
|
||||||
|
<summary>
|
||||||
|
<band height="20" splitType="Stretch">
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="d454cd13-ae90-46ff-8068-b10367b2dbad" x="402" y="0" width="51" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<text><![CDATA[Qtde Total]]></text>
|
||||||
|
</staticText>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="73cbc35e-9bc9-4bb0-a6e6-51ca0f2b49c5" x="455" y="0" width="100" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$V{REPORT_COUNT}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</summary>
|
||||||
|
<noData>
|
||||||
|
<band height="50">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="09b96c81-b864-4947-8a86-27e7e007139d" x="24" y="24" width="530" height="26"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="11" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</noData>
|
||||||
|
</jasperReport>
|
Binary file not shown.
|
@ -0,0 +1,295 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="RelatorioPosicaoVendaBilheteIdosoPorTrecho" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="7e37af0b-caa1-4f25-831c-5cbb2bb78560">
|
||||||
|
<property name="ireport.zoom" value="1.2100000000000002"/>
|
||||||
|
<property name="ireport.x" value="0"/>
|
||||||
|
<property name="ireport.y" value="0"/>
|
||||||
|
<parameter name="NOME_RELATORIO" class="java.lang.String"/>
|
||||||
|
<parameter name="empresa" class="java.lang.String"/>
|
||||||
|
<parameter name="linha" class="java.lang.String"/>
|
||||||
|
<parameter name="tipoData" class="java.lang.String"/>
|
||||||
|
<parameter name="periodo" class="java.lang.String"/>
|
||||||
|
<parameter name="orgao" class="java.lang.String"/>
|
||||||
|
<field name="origem" class="java.lang.String"/>
|
||||||
|
<field name="destino" class="java.lang.String"/>
|
||||||
|
<field name="qtde" class="java.lang.Integer"/>
|
||||||
|
<field name="total" class="java.math.BigDecimal"/>
|
||||||
|
<field name="facial" class="java.math.BigDecimal"/>
|
||||||
|
<field name="descRuta" class="java.lang.String"/>
|
||||||
|
<field name="descCategoria" class="java.lang.String"/>
|
||||||
|
<variable name="somaTotal" class="java.math.BigDecimal" resetType="Group" resetGroup="ruta" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{total}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="somaFacial" class="java.math.BigDecimal" resetType="Group" resetGroup="ruta" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{facial}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="somaDiferenca" class="java.math.BigDecimal" resetType="Group" resetGroup="ruta" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{facial}.subtract($F{total})]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="somaQtde" class="java.lang.Integer" resetType="Group" resetGroup="ruta" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{qtde}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="sumarioQtde" class="java.lang.Integer" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{qtde}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="sumarioTotal" class="java.math.BigDecimal" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{total}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="sumarioFacial" class="java.math.BigDecimal" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{facial}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="sumarioDiferenca" class="java.math.BigDecimal" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{facial}.subtract($F{total})]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<group name="ruta">
|
||||||
|
<groupExpression><![CDATA[$F{descRuta}]]></groupExpression>
|
||||||
|
<groupHeader>
|
||||||
|
<band height="42">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="973583ee-63e4-4b32-a10e-b908debc4284" x="12" y="0" width="256" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{descRuta}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="ab86ac11-f143-40c3-8abf-f3666b2e7407" x="42" y="22" width="256" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{descCategoria}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</groupHeader>
|
||||||
|
<groupFooter>
|
||||||
|
<band height="25">
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="6661d4ec-4f67-44b6-95de-e7245a0ef65e" x="0" y="2" width="553" height="1"/>
|
||||||
|
</line>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="02be5e12-1bf4-4ae7-be2b-7119cdb9d51f" x="200" y="3" width="58" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$V{somaQtde}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="2d4f29fa-4991-43e3-aa03-414d9dccc6c8" x="258" y="3" width="82" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$V{somaTotal}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="dbc6533a-e5b8-4244-be94-5088d27d92e4" x="343" y="3" width="100" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$V{somaFacial}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="f7f86ee7-8a55-4d16-9c13-66aef8d48781" x="443" y="3" width="100" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$V{somaDiferenca}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</groupFooter>
|
||||||
|
</group>
|
||||||
|
<background>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</background>
|
||||||
|
<pageHeader>
|
||||||
|
<band height="141" splitType="Stretch">
|
||||||
|
<textField isStretchWithOverflow="true">
|
||||||
|
<reportElement uuid="e4d992c9-eb58-4b1e-878c-51ae5c729ab5" x="0" y="0" width="555" height="25"/>
|
||||||
|
<textElement textAlignment="Center">
|
||||||
|
<font size="14" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{NOME_RELATORIO}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="b6b378f0-944f-4749-9a9d-3e472361e7f7" x="0" y="39" width="100" height="20"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.empresa}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="8c699a77-f856-411f-9fac-501e7302c091" x="130" y="39" width="424" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{empresa}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="50284f0b-f675-46bb-8631-39946652702e" x="0" y="59" width="99" height="20"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.linhas}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="82bb8887-102e-4aac-a389-754fc985b623" x="130" y="59" width="424" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{linha}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="28aef032-0c0f-4e29-9f6a-5ae97f7be996" x="130" y="79" width="424" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{tipoData}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="acfcccfb-73e8-41a6-ac90-9aa1a86f6487" x="0" y="79" width="99" height="20"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.tipoData}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="9d5eb781-7cdf-4c6e-95a6-d16b53a2d20e" x="0" y="99" width="99" height="20"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.periodo}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="173b3e52-5b2e-4876-b40d-2774497dfbbe" x="130" y="99" width="424" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{periodo}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="ef42d3b8-d503-4309-a5ea-8f2b934d6ca9" x="0" y="139" width="554" height="1"/>
|
||||||
|
</line>
|
||||||
|
<textField isStretchWithOverflow="true">
|
||||||
|
<reportElement uuid="de253e75-48e4-4e9b-9dc7-726cce57dc72" x="0" y="119" width="99" height="20"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{cabecalho.orgao}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="35a35927-834b-4e52-83f8-a7e344cc8ce2" x="130" y="119" width="424" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{orgao}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</pageHeader>
|
||||||
|
<columnHeader>
|
||||||
|
<band height="20" splitType="Stretch">
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="7dfac679-5777-44d4-ad71-1d3f9a357d6c" x="0" y="0" width="100" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Origem]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="97304743-de9a-4844-8e9d-379d072740cf" x="100" y="0" width="100" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Destino]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="dc20ea31-05a2-45bb-a86b-f1baa2108a86" x="200" y="0" width="58" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<text><![CDATA[Qtde]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="f7ec78e7-a39e-4f02-94bf-12d765b24a30" x="258" y="0" width="85" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<text><![CDATA[Total]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="3ea87f7f-b79b-4061-be53-a080e107f592" x="343" y="0" width="100" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<text><![CDATA[Facial]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="740d5e49-4d40-40d7-9825-3947ca5e2b51" x="443" y="0" width="100" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<text><![CDATA[Diferença]]></text>
|
||||||
|
</staticText>
|
||||||
|
</band>
|
||||||
|
</columnHeader>
|
||||||
|
<detail>
|
||||||
|
<band height="20" splitType="Stretch">
|
||||||
|
<textField isStretchWithOverflow="true">
|
||||||
|
<reportElement uuid="69fbf8f0-42ff-4ac1-b4c3-98cb8981756d" x="0" y="0" width="100" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{origem}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true">
|
||||||
|
<reportElement uuid="736fff80-1a77-49d3-ac6e-6db0455dea25" x="100" y="0" width="100" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{destino}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="c3a4a33a-d87b-4b9d-8274-fefc39323c65" x="200" y="0" width="58" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{qtde}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="ca0e3ec0-0d1b-4825-a12e-d8afbc9e39f6" x="258" y="0" width="85" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{total}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="5b9f9b09-2c90-4830-b7f8-e9df269de6bc" x="343" y="0" width="100" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{facial}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="08f30945-be1b-47ce-9506-759fc931cc51" x="443" y="0" width="100" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{facial}.subtract($F{total})]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</detail>
|
||||||
|
<summary>
|
||||||
|
<band height="25" splitType="Stretch">
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="abcf5522-5645-4739-9010-bd4cee9be11b" x="0" y="2" width="553" height="1"/>
|
||||||
|
</line>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="d2b97b16-c798-4ff5-b715-bfc2c4b13e70" x="99" y="3" width="100" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Total Geral:]]></text>
|
||||||
|
</staticText>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="89ae7594-cac1-4a05-b4c2-8a496928111b" x="200" y="3" width="58" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$V{sumarioQtde}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="1281f454-9b32-4db3-acc8-9c2734f0c988" x="258" y="3" width="85" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$V{sumarioTotal}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="ce657276-dd50-4d2b-a5d6-7a8c2dcb8f4b" x="343" y="3" width="100" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$V{sumarioFacial}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="5598f87e-a4b3-4fbb-9616-41c11699c424" x="443" y="3" width="100" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$V{sumarioDiferenca}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</summary>
|
||||||
|
<noData>
|
||||||
|
<band height="50">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="09b96c81-b864-4947-8a86-27e7e007139d" x="24" y="24" width="530" height="26"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="11" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</noData>
|
||||||
|
</jasperReport>
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.rjconsultores.ventaboletos.relatorios.utilitarios;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||||
|
|
||||||
|
public abstract class ArrayCustomDataSourceRelatorio extends ArrayDataSource {
|
||||||
|
|
||||||
|
public ArrayCustomDataSourceRelatorio(Relatorio relatorio) throws Exception {
|
||||||
|
super(relatorio);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initDados() throws Exception {
|
||||||
|
Connection conexao = this.relatorio.getConexao();
|
||||||
|
Map<String, Object> parametros = this.relatorio.getParametros();
|
||||||
|
StringBuilder instrucaoSql = new StringBuilder();
|
||||||
|
|
||||||
|
getSql(instrucaoSql, parametros);
|
||||||
|
|
||||||
|
NamedParameterStatement stmt = new NamedParameterStatement(conexao, instrucaoSql.toString());
|
||||||
|
|
||||||
|
configuraParametrosConsultaSql(parametros, stmt);
|
||||||
|
|
||||||
|
ResultSet rset = stmt.executeQuery();
|
||||||
|
|
||||||
|
while (rset.next()) {
|
||||||
|
Map<String, Object> dataResult = new HashMap<String, Object>();
|
||||||
|
populaValoresDataResult(dataResult, rset);
|
||||||
|
dados.add(dataResult);
|
||||||
|
}
|
||||||
|
resultSet = rset;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract void getSql(StringBuilder instrucaoSql, Map<String, Object> parametros);
|
||||||
|
protected abstract void populaValoresDataResult(Map<String, Object> dataResult, ResultSet resultSet) throws SQLException;
|
||||||
|
protected abstract void configuraParametrosConsultaSql(Map<String, Object> parametros, NamedParameterStatement stmt) throws SQLException;
|
||||||
|
}
|
|
@ -18,6 +18,7 @@ public class EspecializaLista<T> {
|
||||||
this.nomeMetodoPk = nomeMetodoPk;
|
this.nomeMetodoPk = nomeMetodoPk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public List<T> getLista() {
|
public List<T> getLista() {
|
||||||
return (List<T>)(Object)Arrays.asList(listBox.getData());
|
return (List<T>)(Object)Arrays.asList(listBox.getData());
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.eventos;
|
||||||
|
|
||||||
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.PagedListGenerico;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
|
||||||
|
|
||||||
|
public class EventListenerBtnLimparPesquisa implements EventListener {
|
||||||
|
|
||||||
|
private MyListbox listBox;
|
||||||
|
private MyTextbox txtPesquisa;
|
||||||
|
|
||||||
|
public EventListenerBtnLimparPesquisa(MyListbox listBox, MyTextbox txtPesquisa) {
|
||||||
|
this.listBox = listBox;
|
||||||
|
this.txtPesquisa = txtPesquisa;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEvent(Event arg0) throws Exception {
|
||||||
|
PagedListGenerico.limparPesquisaListBox(listBox, txtPesquisa);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,74 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.eventos;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
|
import org.zkoss.zkplus.spring.SpringUtil;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.PagedListGenerico;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
|
||||||
|
|
||||||
|
public abstract class EventListenerBtnPesquisar<T, U> implements EventListener {
|
||||||
|
|
||||||
|
private T service;
|
||||||
|
private MyTextbox textoDePesquisa;
|
||||||
|
private MyListbox listBox;
|
||||||
|
private String tituloRelatorio;
|
||||||
|
private Boolean possuiOpcaoTodos;
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public EventListenerBtnPesquisar(String beanService, MyListbox listBox, MyTextbox textoDePesquisa,
|
||||||
|
String tituloRelatorio) {
|
||||||
|
service = (T)SpringUtil.getBean(beanService);
|
||||||
|
this.textoDePesquisa = textoDePesquisa;
|
||||||
|
this.listBox = listBox;
|
||||||
|
this.tituloRelatorio = tituloRelatorio;
|
||||||
|
this.possuiOpcaoTodos = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEvent(Event arg0) throws Exception {
|
||||||
|
listBox.setData(obtemRegistrosPesquisa(service, textoDePesquisa.getText()));
|
||||||
|
PagedListGenerico.validarPagedListSemRegistro(listBox, tituloRelatorio);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected List<U> obtemRegistrosPesquisa(T service, String valorAPesquisar) {
|
||||||
|
List<U> retorno = buscaRegistros(service, valorAPesquisar);
|
||||||
|
if (possuiOpcaoTodos && "TODOS".contains(valorAPesquisar.toUpperCase())) {
|
||||||
|
retorno.add(incluiTodos(-1, "TODOS"));
|
||||||
|
}
|
||||||
|
return retorno;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract U incluiTodos(int valorPk, String valorDescricao);
|
||||||
|
|
||||||
|
protected abstract List<U> buscaRegistros(T service, String valorAPesquisar);
|
||||||
|
|
||||||
|
public T getService() {
|
||||||
|
return service;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyTextbox getTextoDePesquisa() {
|
||||||
|
return textoDePesquisa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyListbox getListBox() {
|
||||||
|
return listBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTituloRelatorio() {
|
||||||
|
return tituloRelatorio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean possuiOpcaoTodos() {
|
||||||
|
return possuiOpcaoTodos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EventListenerBtnPesquisar<T, U> comIncluiOpcaoTodos(Boolean possuiOpcaoTodos) {
|
||||||
|
this.possuiOpcaoTodos = possuiOpcaoTodos;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.eventos;
|
||||||
|
|
||||||
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.PagedListGenerico;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
|
|
||||||
|
public class EventListenerValidarInclusaoListBox<T> implements EventListener {
|
||||||
|
|
||||||
|
private MyListbox listbox;
|
||||||
|
private MyListbox listBoxAIncluir;
|
||||||
|
|
||||||
|
public EventListenerValidarInclusaoListBox(MyListbox listBox, MyListbox listBoxAIncluir) {
|
||||||
|
this.listbox = listBox;
|
||||||
|
this.listBoxAIncluir = listBoxAIncluir;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
@Override
|
||||||
|
public void onEvent(Event arg0) throws Exception {
|
||||||
|
PagedListGenerico.validarInclusaoLista((T) listBoxAIncluir.getSelected(), listbox);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso;
|
||||||
|
|
||||||
|
public enum ETipoPeriodoRelatorioPosicaoVendaBilheteIdoso {
|
||||||
|
|
||||||
|
VENDA(0, "Venda"), VIAGEM(1, "Viagem");
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
private String nome;
|
||||||
|
|
||||||
|
private ETipoPeriodoRelatorioPosicaoVendaBilheteIdoso(Integer id, String nome) {
|
||||||
|
this.id = id;
|
||||||
|
this.nome = nome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNome() {
|
||||||
|
return nome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ETipoPeriodoRelatorioPosicaoVendaBilheteIdoso getEnumById(Integer id) {
|
||||||
|
for (ETipoPeriodoRelatorioPosicaoVendaBilheteIdoso itemEnum : ETipoPeriodoRelatorioPosicaoVendaBilheteIdoso.values()) {
|
||||||
|
if (itemEnum.getId() == id) {
|
||||||
|
return itemEnum;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new IllegalArgumentException("Id não encontrado.");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,65 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso;
|
||||||
|
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
|
|
||||||
|
public enum ETipoRelatorioVendaBilheteIdoso {
|
||||||
|
|
||||||
|
TRECHO(0, "relatorioPosicaoVendaBilheteIdosoController.window.porTrecho.title", "com.rjconsultores.ventaboletos.relatorios.impl.RelatorioPosicaoVendaBilheteIdosoPorTrecho"),
|
||||||
|
PASSAGEIRO(1, "relatorioPosicaoVendaBilheteIdosoController.window.porPassageiro.title", "com.rjconsultores.ventaboletos.relatorios.impl.RelatorioPosicaoVendaBilheteIdosoPorPassageiro");
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
private String tituloRelatorio;
|
||||||
|
private String classeRelatorio;
|
||||||
|
|
||||||
|
private ETipoRelatorioVendaBilheteIdoso(Integer id, String tituloRelatorio, String classeRelatorio) {
|
||||||
|
this.id = id;
|
||||||
|
this.tituloRelatorio = tituloRelatorio;
|
||||||
|
this.classeRelatorio = classeRelatorio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTituloRelatorio() {
|
||||||
|
return tituloRelatorio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Class<?> getClasseRelatorio() throws ClassNotFoundException {
|
||||||
|
return Class.forName(classeRelatorio);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Relatorio getInstance(Map<String, Object> parametros, Connection conexao) {
|
||||||
|
try {
|
||||||
|
return (Relatorio) getClasseRelatorio().getConstructor(Map.class, Connection.class).newInstance(parametros, conexao);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (SecurityException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (InstantiationException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (InvocationTargetException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (NoSuchMethodException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ETipoRelatorioVendaBilheteIdoso getEnumById(Integer id) {
|
||||||
|
for (ETipoRelatorioVendaBilheteIdoso itemEnum : ETipoRelatorioVendaBilheteIdoso.values()) {
|
||||||
|
if (itemEnum.getId() == id) {
|
||||||
|
return itemEnum;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new IllegalArgumentException("Id não encontrado.");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso;
|
||||||
|
|
||||||
|
import static com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso.RelatorioPosicaoVendaBilheteIdosoController.TITULO_RELATORIO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.PagedListGenerico;
|
||||||
|
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||||
|
import com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.eventos.EventListenerBtnPesquisar;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MensagensUtils;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
|
||||||
|
|
||||||
|
public class EventListenerBtnPesquisarLinha extends EventListenerBtnPesquisar<RutaService, Ruta> {
|
||||||
|
|
||||||
|
private static final String MSG_INFORMAR_ORGAO_CONCEDENTE = "relatorioPosicaoVendaBilheteIdosoController.MSG.informarOrgaoConcedente";
|
||||||
|
private RelatorioPosicaoVendaBilheteIdosoController controller;
|
||||||
|
|
||||||
|
public EventListenerBtnPesquisarLinha(String beanService, MyListbox listBox,
|
||||||
|
MyTextbox textoDePesquisa, RelatorioPosicaoVendaBilheteIdosoController controller) {
|
||||||
|
super(beanService, listBox, textoDePesquisa, TITULO_RELATORIO);
|
||||||
|
this.controller = controller;
|
||||||
|
comIncluiOpcaoTodos(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEvent(Event arg0) throws Exception {
|
||||||
|
if (getOrgaoConcedenteSelecionado() != null) {
|
||||||
|
getListBox().setData(obtemRegistrosPesquisa(getService(), getTextoDePesquisa().getText()));
|
||||||
|
PagedListGenerico.validarPagedListSemRegistro(getListBox(), TITULO_RELATORIO);
|
||||||
|
} else {
|
||||||
|
MensagensUtils.showMessageInformation(MSG_INFORMAR_ORGAO_CONCEDENTE, TITULO_RELATORIO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private OrgaoConcedente getOrgaoConcedenteSelecionado() {
|
||||||
|
return controller.getCmbOrgaoConcedente().getSelectedItem() != null
|
||||||
|
? (OrgaoConcedente) controller.getCmbOrgaoConcedente().getSelectedItem().getValue() : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Ruta incluiTodos(int valorPk, String valorDescricao) {
|
||||||
|
return new Ruta(valorPk, valorDescricao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<Ruta> buscaRegistros(RutaService service, String valorAPesquisar) {
|
||||||
|
return service.buscaRuta(valorAPesquisar, getOrgaoConcedenteSelecionado());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
||||||
|
import com.rjconsultores.ventaboletos.service.CategoriaService;
|
||||||
|
import com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.eventos.EventListenerBtnPesquisar;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
|
||||||
|
|
||||||
|
public class EventListenerBtnPesquisarTipoPassagem extends EventListenerBtnPesquisar<CategoriaService, Categoria> {
|
||||||
|
|
||||||
|
public EventListenerBtnPesquisarTipoPassagem(String beanService, MyListbox listBox, MyTextbox textoDePesquisa,
|
||||||
|
String tituloRelatorio) {
|
||||||
|
super(beanService, listBox, textoDePesquisa, tituloRelatorio);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Categoria incluiTodos(int valorPk, String valorDescricao) {
|
||||||
|
Categoria categoria = new Categoria(valorPk);
|
||||||
|
categoria.setDesccategoria(valorDescricao);
|
||||||
|
return categoria;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<Categoria> buscaRegistros(CategoriaService service, String valorAPesquisar) {
|
||||||
|
return service.buscarCategoriaPesquisada(valorAPesquisar);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,98 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso;
|
||||||
|
|
||||||
|
import static com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso.RelatorioPosicaoVendaBilheteIdosoController.LISTAR_TODAS;
|
||||||
|
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.zkoss.util.resource.Labels;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
|
import com.rjconsultores.ventaboletos.utils.FormataUtil;
|
||||||
|
import com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.EspecializaLista;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.EventListenerExecutarRelatorio;
|
||||||
|
|
||||||
|
public class EventListenerExecutarRelatorioVendaBilheteIdoso extends EventListenerExecutarRelatorio<RelatorioPosicaoVendaBilheteIdosoController> {
|
||||||
|
|
||||||
|
private static final String MASCARA_DATA_COMPLETA = "dd/MM/yyyy hh:mm:ss";
|
||||||
|
|
||||||
|
public EventListenerExecutarRelatorioVendaBilheteIdoso(RelatorioPosicaoVendaBilheteIdosoController controller) {
|
||||||
|
super(controller);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean filtrosValidos(RelatorioPosicaoVendaBilheteIdosoController controller) {
|
||||||
|
return new ValidaFormRelatorioVendaBilheteIdoso(controller).isValido();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Relatorio configuraRelatorio(RelatorioPosicaoVendaBilheteIdosoController controller) throws SQLException {
|
||||||
|
return getTipoRelatorio().getInstance(getParametros(), controller.getDataSource().getConnection());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getTituloRelatorio() {
|
||||||
|
return getTipoRelatorio().getTituloRelatorio();
|
||||||
|
}
|
||||||
|
|
||||||
|
private ETipoRelatorioVendaBilheteIdoso getTipoRelatorio() {
|
||||||
|
return ETipoRelatorioVendaBilheteIdoso.getEnumById(Integer.valueOf(
|
||||||
|
(getController().getTipoRelatorio().getSelectedItem()).getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private ETipoPeriodoRelatorioPosicaoVendaBilheteIdoso getTipoDataSelecionada() {
|
||||||
|
return ETipoPeriodoRelatorioPosicaoVendaBilheteIdoso.getEnumById(Integer.valueOf(
|
||||||
|
(getController().getTipoData().getSelectedItem()).getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, Object> getParametros() {
|
||||||
|
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
parametros.put("NOME_RELATORIO", Labels.getLabel(getTituloRelatorio()));
|
||||||
|
parametros.put("dtInicial", getController().getDtInicial().getValue());
|
||||||
|
parametros.put("dtFinal", getController().getDtFinal().getValue());
|
||||||
|
parametros.put("periodo", obtemPeriodo());
|
||||||
|
parametros.put("tpData", getTipoDataSelecionada());
|
||||||
|
parametros.put("empresaId", getController().getEmpresaSelecionada().getEmpresaId());
|
||||||
|
parametros.put("empresa", getController().getEmpresaSelecionada().getNombempresa());
|
||||||
|
configuraParametrosLinha(parametros);
|
||||||
|
getParametroTipoPassagem(parametros);
|
||||||
|
parametros.put("tipoData", getTipoDataSelecionada().getNome());
|
||||||
|
parametros.put("orgao", ((OrgaoConcedente)getController().getCmbOrgaoConcedente().getSelectedItem().getValue()).getDescOrgao());
|
||||||
|
|
||||||
|
return parametros;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String obtemPeriodo() {
|
||||||
|
return FormataUtil.formataDataToString((Date)getController().getDtInicial().getValue(), "", MASCARA_DATA_COMPLETA)
|
||||||
|
+" até "+FormataUtil.formataDataToString((Date)getController().getDtFinal().getValue(), "", MASCARA_DATA_COMPLETA);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getParametroTipoPassagem(Map<String, Object> parametros) {
|
||||||
|
EspecializaLista<Categoria> especializaLista = new EspecializaLista<Categoria>(Categoria.class, getController().getTpPassagemSelList(), "getCategoriaId");
|
||||||
|
if (!especializaLista.getLista().isEmpty()) {
|
||||||
|
parametros.put("categoriaId", especializaLista.obtemIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void configuraParametrosLinha(Map<String, Object> parametros) {
|
||||||
|
EspecializaLista<Ruta> especializaLista = new EspecializaLista<Ruta>(Ruta.class, getController().getLinhaSelList(), "getRutaId");
|
||||||
|
parametros.put("rutaId", especializaLista.getLista().contains(new Ruta(LISTAR_TODAS)) ?
|
||||||
|
LISTAR_TODAS : especializaLista.obtemIds());
|
||||||
|
if (LISTAR_TODAS.equals(parametros.get("rutaId"))) {
|
||||||
|
parametros.put("linha", "TODAS");
|
||||||
|
} else {
|
||||||
|
StringBuilder linhas = new StringBuilder();
|
||||||
|
for (Ruta linha : especializaLista.getLista()) {
|
||||||
|
linhas.append(linha.getDescruta());
|
||||||
|
linhas.append(", ");
|
||||||
|
}
|
||||||
|
parametros.put("linha", linhas.substring(0, linhas.length()-2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso;
|
||||||
|
|
||||||
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
|
|
||||||
|
public class EventListenerRemoverItemListBox<T> implements EventListener {
|
||||||
|
|
||||||
|
private MyListbox listBoxARemover;
|
||||||
|
|
||||||
|
public EventListenerRemoverItemListBox(MyListbox listBoxARemover) {
|
||||||
|
this.listBoxARemover = listBoxARemover;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
@Override
|
||||||
|
public void onEvent(Event arg0) throws Exception {
|
||||||
|
listBoxARemover.removeItem((T) listBoxARemover.getSelected());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,239 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
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.zk.ui.Component;
|
||||||
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
|
import org.zkoss.zul.Button;
|
||||||
|
import org.zkoss.zul.Combobox;
|
||||||
|
import org.zkoss.zul.Datebox;
|
||||||
|
import org.zkoss.zul.Radiogroup;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
|
import com.rjconsultores.ventaboletos.enums.TypeEventListener;
|
||||||
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
||||||
|
import com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.eventos.EventListenerBtnLimparPesquisa;
|
||||||
|
import com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.eventos.EventListenerValidarInclusaoListBox;
|
||||||
|
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.MyTextbox;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRutaPersonalizado;
|
||||||
|
|
||||||
|
@Controller("relatorioPosicaoVendaBilheteIdosoController")
|
||||||
|
@Scope("prototype")
|
||||||
|
public class RelatorioPosicaoVendaBilheteIdosoController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
public static final String TITULO_RELATORIO = "indexController.mniRelatorioPosicaoVendaBilheteIdoso.label";
|
||||||
|
public static final Integer LISTAR_TODAS = -1;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private Datebox dtInicial;
|
||||||
|
private Datebox dtFinal;
|
||||||
|
private Radiogroup tipoData;
|
||||||
|
private Radiogroup tipoRelatorio;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private EmpresaService empresaService;
|
||||||
|
private List<Empresa> lsEmpresa;
|
||||||
|
private Combobox cmbEmpresa;
|
||||||
|
|
||||||
|
private MyListbox linhaList;
|
||||||
|
private MyListbox linhaSelList;
|
||||||
|
private MyTextbox txtPalavraPesquisaLinha;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OrgaoConcedenteService orgaoConcedenteService;
|
||||||
|
private List<OrgaoConcedente> lsOrgaoConcedente;
|
||||||
|
private Combobox cmbOrgaoConcedente;
|
||||||
|
|
||||||
|
private MyListbox tpPassagemList;
|
||||||
|
private MyListbox tpPassagemSelList;
|
||||||
|
private MyTextbox txtPalavraPesquisaTpPassagem;
|
||||||
|
private Button btnPesquisaLinha;
|
||||||
|
private Button btnLimparLinha;
|
||||||
|
private Button btnPesquisaTpPassagem;
|
||||||
|
private Button btnLimparTpPassagem;
|
||||||
|
private Button btnExecutarRelatorio;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataSource dataSource;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
|
lsEmpresa = empresaService.obtenerTodos();
|
||||||
|
lsOrgaoConcedente = orgaoConcedenteService.obtenerTodosExceto(-1);
|
||||||
|
super.doAfterCompose(comp);
|
||||||
|
configuraRenders();
|
||||||
|
configuraEventosComboOrgaoConcedente();
|
||||||
|
configuraEventosPesquisaLinha();
|
||||||
|
configuraEventosPesquisaTipoPassagem();
|
||||||
|
configuraEventosExecucaoRelatorio();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void configuraRenders() {
|
||||||
|
List<String> colunasLinhaRender = Arrays.asList("numRuta", "prefixo", "descruta");
|
||||||
|
linhaList.setItemRenderer(new RenderRutaPersonalizado(colunasLinhaRender));
|
||||||
|
linhaSelList.setItemRenderer(new RenderRutaPersonalizado(colunasLinhaRender).comBotaoExcluir());
|
||||||
|
tpPassagemList.setItemRenderer(new RenderCategoria());
|
||||||
|
tpPassagemSelList.setItemRenderer(new RenderCategoria().comBotaoExcluir());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void configuraEventosComboOrgaoConcedente() {
|
||||||
|
cmbOrgaoConcedente.addEventListener(TypeEventListener.ON_CTRL_KEY.getEvent(),
|
||||||
|
new EventListenerOnCtrlKeyComboOrgao());
|
||||||
|
cmbOrgaoConcedente.addEventListener(TypeEventListener.ON_CHANGE.getEvent(),
|
||||||
|
new EventListenerOnChangeComboOrgao());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void configuraEventosPesquisaLinha() {
|
||||||
|
btnPesquisaLinha.addEventListener(TypeEventListener.ON_CLICK.getEvent(),
|
||||||
|
new EventListenerBtnPesquisarLinha("rutaService", linhaList,
|
||||||
|
txtPalavraPesquisaLinha, this));
|
||||||
|
btnLimparLinha.addEventListener(TypeEventListener.ON_CLICK.getEvent(),
|
||||||
|
new EventListenerBtnLimparPesquisa(getLinhaList(), txtPalavraPesquisaLinha));
|
||||||
|
linhaSelList.addEventListener(TypeEventListener.ON_DOUBLE_CLICK.getEvent(),
|
||||||
|
new EventListenerRemoverItemListBox<Ruta>(linhaSelList));
|
||||||
|
linhaList.addEventListener(TypeEventListener.ON_DOUBLE_CLICK.getEvent(),
|
||||||
|
new EventListenerValidarInclusaoListBox<Ruta>(linhaSelList, linhaList));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void configuraEventosPesquisaTipoPassagem() {
|
||||||
|
btnPesquisaTpPassagem.addEventListener(TypeEventListener.ON_CLICK.getEvent(),
|
||||||
|
new EventListenerBtnPesquisarTipoPassagem("categoriaService", tpPassagemList, txtPalavraPesquisaTpPassagem, TITULO_RELATORIO));
|
||||||
|
btnLimparTpPassagem.addEventListener(TypeEventListener.ON_CLICK.getEvent(),
|
||||||
|
new EventListenerBtnLimparPesquisa(tpPassagemList, txtPalavraPesquisaTpPassagem));
|
||||||
|
tpPassagemSelList.addEventListener(TypeEventListener.ON_DOUBLE_CLICK.getEvent(),
|
||||||
|
new EventListenerRemoverItemListBox<Categoria>(tpPassagemSelList));
|
||||||
|
tpPassagemList.addEventListener(TypeEventListener.ON_DOUBLE_CLICK.getEvent(),
|
||||||
|
new EventListenerValidarInclusaoListBox<Ruta>(tpPassagemSelList, tpPassagemList));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void configuraEventosExecucaoRelatorio() {
|
||||||
|
btnExecutarRelatorio.addEventListener(TypeEventListener.ON_CLICK.getEvent(),
|
||||||
|
new EventListenerExecutarRelatorioVendaBilheteIdoso(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Empresa> getLsEmpresa() {
|
||||||
|
return lsEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<OrgaoConcedente> getLsOrgaoConcedente() {
|
||||||
|
return lsOrgaoConcedente;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Empresa getEmpresaSelecionada() {
|
||||||
|
return cmbEmpresa.getSelectedItem() != null
|
||||||
|
? (Empresa) cmbEmpresa.getSelectedItem().getValue() : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void limparValoresLinhasSelecionadas(Event ev) throws Exception {
|
||||||
|
(new EventListenerBtnLimparPesquisa(linhaList, txtPalavraPesquisaTpPassagem)).onEvent(ev);
|
||||||
|
linhaSelList.setData(new ArrayList<Ruta>());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Datebox getDtInicial() {
|
||||||
|
return dtInicial;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Datebox getDtFinal() {
|
||||||
|
return dtFinal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean possuiLinhaSelecionada() {
|
||||||
|
return linhaSelList.getSize() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean possuiTipoPassagemSelecionado() {
|
||||||
|
return tpPassagemSelList.getSize() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyListbox getLinhaList() {
|
||||||
|
return linhaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Radiogroup getTipoData() {
|
||||||
|
return tipoData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Radiogroup getTipoRelatorio() {
|
||||||
|
return tipoRelatorio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EmpresaService getEmpresaService() {
|
||||||
|
return empresaService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyListbox getLinhaSelList() {
|
||||||
|
return linhaSelList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyTextbox getTxtPalavraPesquisaLinha() {
|
||||||
|
return txtPalavraPesquisaLinha;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrgaoConcedenteService getOrgaoConcedenteService() {
|
||||||
|
return orgaoConcedenteService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyListbox getTpPassagemList() {
|
||||||
|
return tpPassagemList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyListbox getTpPassagemSelList() {
|
||||||
|
return tpPassagemSelList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyTextbox getTxtPalavraPesquisaTpPassagem() {
|
||||||
|
return txtPalavraPesquisaTpPassagem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Button getBtnPesquisaLinha() {
|
||||||
|
return btnPesquisaLinha;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Button getBtnLimparLinha() {
|
||||||
|
return btnLimparLinha;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataSource getDataSource() {
|
||||||
|
return dataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Combobox getCmbOrgaoConcedente() {
|
||||||
|
return cmbOrgaoConcedente;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Combobox getCmbEmpresa() {
|
||||||
|
return cmbEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final class EventListenerOnChangeComboOrgao implements EventListener {
|
||||||
|
@Override
|
||||||
|
public void onEvent(Event ev) throws Exception {
|
||||||
|
limparValoresLinhasSelecionadas(ev);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private final class EventListenerOnCtrlKeyComboOrgao implements EventListener {
|
||||||
|
@Override
|
||||||
|
public void onEvent(Event ev) throws Exception {
|
||||||
|
((MyComboboxEstandar) cmbOrgaoConcedente).setSelectedItem(null);
|
||||||
|
((MyComboboxEstandar) cmbOrgaoConcedente).close();
|
||||||
|
limparValoresLinhasSelecionadas(ev);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso;
|
||||||
|
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import org.zkoss.zul.Listcell;
|
||||||
|
import org.zkoss.zul.Listitem;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPersonalizado;
|
||||||
|
|
||||||
|
public class RenderCategoria extends RenderPersonalizado<Categoria> {
|
||||||
|
|
||||||
|
public RenderCategoria() {
|
||||||
|
super(Arrays.asList("desccategoria", "cvecategoria"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void incluirColunasRender(Listitem item, Object objeto) throws IllegalAccessException, InvocationTargetException {
|
||||||
|
super.incluirColunasRender(item, objeto);
|
||||||
|
Listcell lc;
|
||||||
|
try {
|
||||||
|
lc = new Listcell(((Categoria)objeto).getGrupoCategoria().getDescGrupo());
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
lc = new Listcell(" - ");
|
||||||
|
}
|
||||||
|
lc.setParent(item);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso;
|
||||||
|
|
||||||
|
public interface ValidaForm {
|
||||||
|
|
||||||
|
public boolean isValido();
|
||||||
|
}
|
|
@ -0,0 +1,74 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso;
|
||||||
|
|
||||||
|
import static com.rjconsultores.ventaboletos.web.gui.controladores.relatorios.vendabilheteidoso.RelatorioPosicaoVendaBilheteIdosoController.TITULO_RELATORIO;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.ValidarDatas;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MensagensUtils;
|
||||||
|
|
||||||
|
public class ValidaFormRelatorioVendaBilheteIdoso implements ValidaForm {
|
||||||
|
|
||||||
|
private static final String MSG_PERIODO_NAO_INFORMADO = "relatorioPosicaoVendaBilheteIdosoController.MSG.informarFiltroData";
|
||||||
|
private static final String MSG_PERIODO_INCOMPLETO = "relatorioPosicaoVendaBilheteIdosoController.MSG.informarData";
|
||||||
|
private static final String MSG_DATA_INICIAL_MAIOR_FINAL = "relatorioPosicaoVendaBilheteIdosoController.MSG.dataInicialMaiorFinal";
|
||||||
|
private static final String MSG_EMPRESA_NAO_INFORMADO = "relatorioPosicaoVendaBilheteIdosoController.MSG.informarEmpresa";
|
||||||
|
private static final String MSG_LINHA_NAO_INFORMADO = "relatorioPosicaoVendaBilheteIdosoController.MSG.informarLinha";
|
||||||
|
private static final String MSG_TP_PASSAGEM_NAO_INFORMADO = "relatorioPosicaoVendaBilheteIdosoController.MSG.informarTpPassagem";
|
||||||
|
|
||||||
|
private RelatorioPosicaoVendaBilheteIdosoController controller;
|
||||||
|
|
||||||
|
public ValidaFormRelatorioVendaBilheteIdoso(RelatorioPosicaoVendaBilheteIdosoController controller) {
|
||||||
|
this.controller = controller;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValido() {
|
||||||
|
return isDatasValidas()
|
||||||
|
&& isFiltrosValidos();
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isFiltrosValidos() {
|
||||||
|
return possuiEmpresaSelecionada()
|
||||||
|
&& possuiLinhaSelecionada()
|
||||||
|
&& possuiTipoPassagemSelecionado();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Boolean possuiTipoPassagemSelecionado() {
|
||||||
|
if (!controller.possuiTipoPassagemSelecionado()) {
|
||||||
|
MensagensUtils.showMessageInformation(MSG_TP_PASSAGEM_NAO_INFORMADO, TITULO_RELATORIO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Boolean possuiLinhaSelecionada() {
|
||||||
|
if (!controller.possuiLinhaSelecionada()) {
|
||||||
|
MensagensUtils.showMessageInformation(MSG_LINHA_NAO_INFORMADO, TITULO_RELATORIO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean possuiEmpresaSelecionada() {
|
||||||
|
if (controller.getEmpresaSelecionada() == null) {
|
||||||
|
MensagensUtils.showMessageInformation(MSG_EMPRESA_NAO_INFORMADO, TITULO_RELATORIO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isDatasValidas() {
|
||||||
|
ValidarDatas validadorData = new ValidarDatas(controller.getDtInicial(), controller.getDtFinal());
|
||||||
|
|
||||||
|
if (validadorData.isPeriodoNaoInformado()) {
|
||||||
|
MensagensUtils.showMessageInformation(MSG_PERIODO_NAO_INFORMADO, TITULO_RELATORIO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (validadorData.isPeriodoParcialmenteInformado()) {
|
||||||
|
MensagensUtils.showMessageInformation(MSG_PERIODO_INCOMPLETO, TITULO_RELATORIO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return !validadorData.validarDataInicioMaiorQueTermino(MSG_DATA_INICIAL_MAIOR_FINAL, TITULO_RELATORIO);
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,6 +15,7 @@ import java.math.RoundingMode;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -77,12 +78,12 @@ import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderCatalogoDeRutas;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderCatalogoDeRutas;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderCategoria;
|
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderClaseServicio;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderClaseServicio;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEmpresaModificacionMassivaTarifa;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEmpresaModificacionMassivaTarifa;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderMarca;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderMarca;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderMoneda;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderMoneda;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderOrgaoConcedenteModifMassPreco;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderOrgaoConcedenteModifMassPreco;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPersonalizado;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTipoPuntoVenta;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTipoPuntoVenta;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderVigenciaTarifaModificacionMassivaTarifa;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderVigenciaTarifaModificacionMassivaTarifa;
|
||||||
|
|
||||||
|
@ -289,7 +290,7 @@ public class ModificacionMasivaTarifasController extends MyGenericForwardCompose
|
||||||
rutaList.setItemRenderer(new RenderCatalogoDeRutas());
|
rutaList.setItemRenderer(new RenderCatalogoDeRutas());
|
||||||
orgaoConcedenteList.setItemRenderer(new RenderOrgaoConcedenteModifMassPreco());
|
orgaoConcedenteList.setItemRenderer(new RenderOrgaoConcedenteModifMassPreco());
|
||||||
tipoPuntoVentaList.setItemRenderer(new RenderTipoPuntoVenta());
|
tipoPuntoVentaList.setItemRenderer(new RenderTipoPuntoVenta());
|
||||||
categoriaList.setItemRenderer(new RenderCategoria());
|
categoriaList.setItemRenderer(new RenderPersonalizado<Categoria>(Arrays.asList("categoriaId", "desccategoria")));
|
||||||
vigenciaTarifaList.setItemRenderer(new RenderVigenciaTarifaModificacionMassivaTarifa());
|
vigenciaTarifaList.setItemRenderer(new RenderVigenciaTarifaModificacionMassivaTarifa());
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ import java.io.InputStream;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -56,11 +57,11 @@ import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderCatalogoDeRutas;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderCatalogoDeRutas;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderCategoria;
|
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderClaseServicio;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderClaseServicio;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEmpresaModificacionMassivaTarifa;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEmpresaModificacionMassivaTarifa;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderMarca;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderMarca;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderMoneda;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderMoneda;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPersonalizado;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTipoPuntoVenta;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTipoPuntoVenta;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -258,7 +259,7 @@ public class TarifaOficialExcelController extends MyGenericForwardComposer {
|
||||||
empresaList.setItemRenderer(new RenderEmpresaModificacionMassivaTarifa());
|
empresaList.setItemRenderer(new RenderEmpresaModificacionMassivaTarifa());
|
||||||
rutaList.setItemRenderer(new RenderCatalogoDeRutas());
|
rutaList.setItemRenderer(new RenderCatalogoDeRutas());
|
||||||
tipoPuntoVentaList.setItemRenderer(new RenderTipoPuntoVenta());
|
tipoPuntoVentaList.setItemRenderer(new RenderTipoPuntoVenta());
|
||||||
categoriaList.setItemRenderer(new RenderCategoria());
|
categoriaList.setItemRenderer(new RenderPersonalizado<Categoria>(Arrays.asList("categoriaId", "desccategoria")));
|
||||||
|
|
||||||
lsAddRmvMarcas = new ArrayList<Marca>();
|
lsAddRmvMarcas = new ArrayList<Marca>();
|
||||||
lsAddRmvClaseServico = new ArrayList<ClaseServicio>();
|
lsAddRmvClaseServico = new ArrayList<ClaseServicio>();
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.utilerias;
|
||||||
|
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.zkoss.util.resource.Labels;
|
||||||
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
|
|
||||||
|
public abstract class EventListenerExecutarRelatorio<T extends MyGenericForwardComposer> implements EventListener {
|
||||||
|
|
||||||
|
private T controller;
|
||||||
|
|
||||||
|
public EventListenerExecutarRelatorio(T controller) {
|
||||||
|
this.controller = controller;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEvent(Event arg0) throws Exception {
|
||||||
|
if (filtrosValidos(controller)) {
|
||||||
|
Relatorio relatorio = configuraRelatorio(controller);
|
||||||
|
Map<Object, Object> args = new HashMap<Object, Object>();
|
||||||
|
args.put("relatorio", relatorio);
|
||||||
|
|
||||||
|
(controller).openWindow("/component/reportView.zul",
|
||||||
|
Labels.getLabel(getTituloRelatorio()), args, MyGenericForwardComposer.MODAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract boolean filtrosValidos(T controller);
|
||||||
|
protected abstract Relatorio configuraRelatorio(T controller) throws SQLException;
|
||||||
|
protected abstract String getTituloRelatorio();
|
||||||
|
|
||||||
|
public T getController() {
|
||||||
|
return controller;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -24,14 +24,7 @@ public class MyComboboxEstandar extends Combobox {
|
||||||
this.setReadonly(true);
|
this.setReadonly(true);
|
||||||
this.setCtrlKeys("#del");
|
this.setCtrlKeys("#del");
|
||||||
|
|
||||||
this.addEventListener("onCtrlKey", new EventListener() {
|
this.addEventListener("onCtrlKey", new EventListenerOnCtrlKey());
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onEvent(Event event) throws Exception {
|
|
||||||
MyComboboxEstandar.this.setSelectedItem(null);
|
|
||||||
MyComboboxEstandar.this.close();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T> T getSelecteObject(Class<T> cType) {
|
public <T> T getSelecteObject(Class<T> cType) {
|
||||||
|
@ -40,4 +33,13 @@ public class MyComboboxEstandar extends Combobox {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private final class EventListenerOnCtrlKey implements EventListener {
|
||||||
|
@Override
|
||||||
|
public void onEvent(Event event) throws Exception {
|
||||||
|
MyComboboxEstandar.this.setSelectedItem(null);
|
||||||
|
MyComboboxEstandar.this.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios;
|
||||||
|
|
||||||
|
import org.zkoss.util.resource.Labels;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.constantes.ConstantesFuncionSistema;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||||
|
|
||||||
|
public class ItemMenuRelatorioPosicaoVendaBilheteIdoso extends DefaultItemMenuSistema {
|
||||||
|
|
||||||
|
public ItemMenuRelatorioPosicaoVendaBilheteIdoso() {
|
||||||
|
super("indexController.mniRelatorioPosicaoVendaBilheteIdoso.label");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getClaveMenu() {
|
||||||
|
return ConstantesFuncionSistema.CLAVE_POSICAO_VENDA_BILHETE_IDOSO;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ejecutar() {
|
||||||
|
PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioPosicaoVendaBilheteIdoso.zul",
|
||||||
|
Labels.getLabel("indexController.mniRelatorioPosicaoVendaBilheteIdoso.label"), getArgs(), desktop);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -142,6 +142,7 @@ analitico.gerenciais.tabPreco=com.rjconsultores.ventaboletos.web.utilerias.menu.
|
||||||
analitico.gerenciais.trip=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemRelatorioTripulacao
|
analitico.gerenciais.trip=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemRelatorioTripulacao
|
||||||
analitico.gerenciais.relatorioImpressaoPosterior=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioImpressaoPosterior
|
analitico.gerenciais.relatorioImpressaoPosterior=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioImpressaoPosterior
|
||||||
analitico.gerenciais.relatorioHistoricoCompras=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioHistoricoCompras
|
analitico.gerenciais.relatorioHistoricoCompras=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioHistoricoCompras
|
||||||
|
analitico.gerenciais.relatorioHistoricoCompras=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioPosicaoVendaBilheteIdoso
|
||||||
analitico.gerenciais.operacionais=com.rjconsultores.ventaboletos.web.utilerias.menu.item.analitico.gerenciais.operacionais.SubMenuRelatorioOperacionais
|
analitico.gerenciais.operacionais=com.rjconsultores.ventaboletos.web.utilerias.menu.item.analitico.gerenciais.operacionais.SubMenuRelatorioOperacionais
|
||||||
analitico.gerenciais.operacionais.aproveitamento=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioAproveitamento
|
analitico.gerenciais.operacionais.aproveitamento=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioAproveitamento
|
||||||
analitico.gerenciais.operacionais.resumoLinhas=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioResumoLinhas
|
analitico.gerenciais.operacionais.resumoLinhas=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioResumoLinhas
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
/*
|
|
||||||
* To change this template, choose Tools | Templates
|
|
||||||
* and open the template in the editor.
|
|
||||||
*/
|
|
||||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
|
||||||
import org.zkoss.zul.Listcell;
|
|
||||||
import org.zkoss.zul.Listitem;
|
|
||||||
import org.zkoss.zul.ListitemRenderer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author Administrador
|
|
||||||
*/
|
|
||||||
public class RenderCategoria implements ListitemRenderer {
|
|
||||||
|
|
||||||
public void render(Listitem lstm, Object o) throws Exception {
|
|
||||||
Categoria categoria = (Categoria) o;
|
|
||||||
|
|
||||||
Listcell lc = new Listcell();
|
|
||||||
|
|
||||||
lc = new Listcell(categoria.getCategoriaId().toString());
|
|
||||||
lc.setParent(lstm);
|
|
||||||
|
|
||||||
lc = new Listcell(categoria.getDesccategoria());
|
|
||||||
lc.setParent(lstm);
|
|
||||||
|
|
||||||
lstm.setAttribute("data", categoria);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -58,13 +58,14 @@ public class RenderPersonalizado<T> implements ListitemRenderer {
|
||||||
String nomeMetodo = obtemMetodoGet(coluna);
|
String nomeMetodo = obtemMetodoGet(coluna);
|
||||||
for (Method method : methods) {
|
for (Method method : methods) {
|
||||||
if (method.getName().equals(nomeMetodo)) {
|
if (method.getName().equals(nomeMetodo)) {
|
||||||
|
Listcell lc;
|
||||||
try {
|
try {
|
||||||
Listcell lc = new Listcell(method.invoke((T)objeto).toString());
|
lc = new Listcell(method.invoke((T)objeto).toString());
|
||||||
lc.setParent(item);
|
|
||||||
break;
|
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
e.getMessage();
|
lc = new Listcell(" - ");
|
||||||
}
|
}
|
||||||
|
lc.setParent(item);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -308,6 +308,7 @@ indexController.mniRelatorioServicoBloqueadoVendaInternet.label = Corrida bloque
|
||||||
indexController.mniRelatorioDocumentosFiscais.label = Report Documentos Fiscais
|
indexController.mniRelatorioDocumentosFiscais.label = Report Documentos Fiscais
|
||||||
indexController.mniRelatorioVendasConexao.label = Reporte Ventas Conexion
|
indexController.mniRelatorioVendasConexao.label = Reporte Ventas Conexion
|
||||||
indexController.mniRelatorioHistoricoCompras.label = Reporte Histórico de Compras
|
indexController.mniRelatorioHistoricoCompras.label = Reporte Histórico de Compras
|
||||||
|
indexController.mniRelatorioPosicaoVendaBilheteIdoso.label = Reporte Posición de Venta del Billete Anciano
|
||||||
|
|
||||||
indexController.mniRelatorioRemessaCNAB.label = Remessa de Lote (CNAB 400)
|
indexController.mniRelatorioRemessaCNAB.label = Remessa de Lote (CNAB 400)
|
||||||
|
|
||||||
|
@ -846,6 +847,38 @@ relatorioHistoricoComprasController.MSG.dataInicialEmbarqueMaiorFinal = Data ini
|
||||||
relatorioHistoricoComprasController.btnPesquisa.label = Pesquisar
|
relatorioHistoricoComprasController.btnPesquisa.label = Pesquisar
|
||||||
relatorioHistoricoComprasController.btnLimpar.label = Limpar
|
relatorioHistoricoComprasController.btnLimpar.label = Limpar
|
||||||
|
|
||||||
|
#Relatorio Posição Venda Bilhetes Idoso
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.window.porPassageiro.title = POSIÇÃO DE VENDA DO BILHETE IDOSO POR LINHA ANALÍTICO (POR PASSAGEIRO)
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.window.porTrecho.title = POSIÇÃO DE VENDA DO BILHETE IDOSO POR LINHA ANALÍTICO (POR TRECHO)
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lblDataIni.value = Período Inicial
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lblDataFin.value = Período Final
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.MSG.informarFiltroData = Favor informar o filtro de data.
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.MSG.dataInicialMaiorFinal = Período inicial maior que período final.
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.MSG.informarData = Favor informar o período completo.
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.PorData.value = Por Data
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbPorDataVenda.label = Venda
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbPorDataViagem.label = Viagem
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lblEmpresa.value = Empresa
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.MSG.informarEmpresa = Favor informar o filtro de empresa.
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lblOrgao.value = Órgão Concedente
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbLinha.value = Linha
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.MSG.informarLinha = Favor informar ao menos uma linha.
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.btnPesquisa.label = Pesquisar
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.btnLimpar.label = Limpar
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbLinha.label = Linha
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbNumRuta.label = Num. Linha
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbPrefixo.label = Prefixo
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbOrgao.label = Orgão Concedente
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.MSG.informarOrgaoConcedente = Favor informar o orgão concedente.
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbTpPassagem.value = Tipo de Passagem
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.MSG.informarTpPassagem = Favor informar ao menos um tipo de passagem.
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbDescCategoria.label = Descrição
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbSigla.label = Sigla
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbGrupoCategoria.label = Grupo de Categoria
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.TpRelatorio.value = Tipo de Relatório
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.tpTrecho.label = Trecho
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.tpPassageiro.label = Passageiro
|
||||||
|
|
||||||
#Relatório Documentos Fiscais
|
#Relatório Documentos Fiscais
|
||||||
relatorioDocumentosFiscaisController.window.title = Reporte Documentos Fiscais
|
relatorioDocumentosFiscaisController.window.title = Reporte Documentos Fiscais
|
||||||
relatorioDocumentosFiscaisController.lbDatInicial.value = Fecha Inicial
|
relatorioDocumentosFiscaisController.lbDatInicial.value = Fecha Inicial
|
||||||
|
|
|
@ -327,6 +327,7 @@ indexController.mniRelatorioServicoBloqueadoVendaInternet.label = Serviço Bloqu
|
||||||
indexController.mniRelatorioDocumentosFiscais.label = Relatório Documentos Fiscais
|
indexController.mniRelatorioDocumentosFiscais.label = Relatório Documentos Fiscais
|
||||||
indexController.mniRelatorioVendasConexao.label = Relatório Vendas de Conexão
|
indexController.mniRelatorioVendasConexao.label = Relatório Vendas de Conexão
|
||||||
indexController.mniRelatorioHistoricoCompras.label = Relatório Histórico de Compras
|
indexController.mniRelatorioHistoricoCompras.label = Relatório Histórico de Compras
|
||||||
|
indexController.mniRelatorioPosicaoVendaBilheteIdoso.label = Relatório Posição de Venda do Bilhete Idoso
|
||||||
|
|
||||||
indexController.mnSubMenuImpressaoFiscal.label=Impressão Fiscal
|
indexController.mnSubMenuImpressaoFiscal.label=Impressão Fiscal
|
||||||
indexController.mnSubMenuRelatorioImpressaoFiscal.label=Importação Fiscal
|
indexController.mnSubMenuRelatorioImpressaoFiscal.label=Importação Fiscal
|
||||||
|
@ -957,6 +958,38 @@ relatorioHistoricoComprasController.MSG.dataInicialEmbarqueMaiorFinal = Data ini
|
||||||
relatorioHistoricoComprasController.btnPesquisa.label = Pesquisar
|
relatorioHistoricoComprasController.btnPesquisa.label = Pesquisar
|
||||||
relatorioHistoricoComprasController.btnLimpar.label = Limpar
|
relatorioHistoricoComprasController.btnLimpar.label = Limpar
|
||||||
|
|
||||||
|
#Relatorio Posição Venda Bilhetes Idoso
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.window.porPassageiro.title = POSIÇÃO DE VENDA DO BILHETE IDOSO POR LINHA ANALÍTICO (POR PASSAGEIRO)
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.window.porTrecho.title = POSIÇÃO DE VENDA DO BILHETE IDOSO POR LINHA ANALÍTICO (POR TRECHO)
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lblDataIni.value = Período Inicial
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lblDataFin.value = Período Final
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.MSG.informarFiltroData = Favor informar o filtro de data.
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.MSG.dataInicialMaiorFinal = Período inicial maior que período final.
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.MSG.informarData = Favor informar o período completo.
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.PorData.value = Por Data
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbPorDataVenda.label = Venda
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbPorDataViagem.label = Viagem
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lblEmpresa.value = Empresa
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.MSG.informarEmpresa = Favor informar o filtro de empresa.
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lblOrgao.value = Órgão Concedente
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbLinha.value = Linha
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.MSG.informarLinha = Favor informar ao menos uma linha.
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.btnPesquisa.label = Pesquisar
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.btnLimpar.label = Limpar
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbLinha.label = Linha
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbNumRuta.label = Num. Linha
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbPrefixo.label = Prefixo
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbOrgao.label = Orgão Concedente
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.MSG.informarOrgaoConcedente = Favor informar o orgão concedente.
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbTpPassagem.value = Tipo de Passagem
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.MSG.informarTpPassagem = Favor informar ao menos um tipo de passagem.
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbDescCategoria.label = Descrição
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbSigla.label = Sigla
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.lbGrupoCategoria.label = Grupo de Categoria
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.TpRelatorio.value = Tipo de Relatório
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.tpTrecho.label = Trecho
|
||||||
|
relatorioPosicaoVendaBilheteIdosoController.tpPassageiro.label = Passageiro
|
||||||
|
|
||||||
# Pantalla Editar Classe
|
# Pantalla Editar Classe
|
||||||
editarClaseServicioController.window.title = Tipo de Classe
|
editarClaseServicioController.window.title = Tipo de Classe
|
||||||
editarClaseServicioController.btnApagar.tooltiptext = Eliminar
|
editarClaseServicioController.btnApagar.tooltiptext = Eliminar
|
||||||
|
|
|
@ -0,0 +1,216 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<?page contentType="text/html;charset=UTF-8"?>
|
||||||
|
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||||
|
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winFiltroRelatorioPosicaoVendaBilheteIdoso"?>
|
||||||
|
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||||
|
|
||||||
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
|
<window id="winFiltroRelatorioPosicaoVendaBilheteIdoso" apply="${relatorioPosicaoVendaBilheteIdosoController}"
|
||||||
|
contentStyle="overflow:auto"
|
||||||
|
height="480x" width="728px" border="normal">
|
||||||
|
<grid fixedLayout="true">
|
||||||
|
<columns>
|
||||||
|
<column width="25%" />
|
||||||
|
<column width="30%" />
|
||||||
|
<column width="15%" />
|
||||||
|
<column width="30%" />
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row spans="1, 3">
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioPosicaoVendaBilheteIdosoController.PorData.value')}" />
|
||||||
|
<radiogroup id="tipoData">
|
||||||
|
<radio
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbPorDataVenda.label')}"
|
||||||
|
value="0"
|
||||||
|
checked="true" />
|
||||||
|
<radio
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbPorDataViagem.label')}"
|
||||||
|
value="1"/>
|
||||||
|
</radiogroup>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioPosicaoVendaBilheteIdosoController.lblDataIni.value')}" />
|
||||||
|
<datebox id="dtInicial" width="100%" mold="rounded"
|
||||||
|
format="dd/MM/yyyy" maxlength="10" />
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioPosicaoVendaBilheteIdosoController.lblDataFin.value')}" />
|
||||||
|
<datebox id="dtFinal" width="100%" mold="rounded"
|
||||||
|
format="dd/MM/yyyy" maxlength="10" />
|
||||||
|
</row>
|
||||||
|
<row spans="1,3">
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioPosicaoVendaBilheteIdosoController.lblEmpresa.value')}" />
|
||||||
|
<combobox id="cmbEmpresa" mold="rounded"
|
||||||
|
buttonVisible="true"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
|
model="@{winFiltroRelatorioPosicaoVendaBilheteIdoso$composer.lsEmpresa}"
|
||||||
|
width="100%" />
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioPosicaoVendaBilheteIdosoController.lblOrgao.value')}" />
|
||||||
|
<combobox id="cmbOrgaoConcedente" mold="rounded"
|
||||||
|
buttonVisible="true"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
|
model="@{winFiltroRelatorioPosicaoVendaBilheteIdoso$composer.lsOrgaoConcedente}"
|
||||||
|
width="100%" />
|
||||||
|
</row>
|
||||||
|
<row spans="1,3">
|
||||||
|
<label value="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbLinha.value')}" />
|
||||||
|
<bandbox id="bbPesquisaLinha" width="100%"
|
||||||
|
mold="rounded" readonly="true">
|
||||||
|
<bandpopup>
|
||||||
|
<vbox>
|
||||||
|
<hbox>
|
||||||
|
<label value="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbLinha.value')}" />
|
||||||
|
<textbox id="txtPalavraPesquisaLinha"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"
|
||||||
|
width="300px" mold="rounded" />
|
||||||
|
<button id="btnPesquisaLinha"
|
||||||
|
image="/gui/img/find.png"
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.btnPesquisa.label')}" />
|
||||||
|
<button id="btnLimparLinha"
|
||||||
|
image="/gui/img/eraser.png"
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.btnLimpar.label')}" />
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
<listbox id="linhaList" mold="paging"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
|
vflex="true" height="100%" width="700px">
|
||||||
|
<listhead>
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbNumRuta.label')}"
|
||||||
|
width="18%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbPrefixo.label')}"
|
||||||
|
width="20%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('lb.dec')}" width="35%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbOrgao.label')}"
|
||||||
|
width="27%" />
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
<paging id="pagingLinha" pageSize="10" />
|
||||||
|
</vbox>
|
||||||
|
</bandpopup>
|
||||||
|
</bandbox>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<cell colspan="4">
|
||||||
|
<borderlayout height="100px">
|
||||||
|
|
||||||
|
<center border="0">
|
||||||
|
<listbox id="linhaSelList"
|
||||||
|
mold="paging"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
|
vflex="true" height="100%" width="700px">
|
||||||
|
<listhead>
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbNumRuta.label')}"
|
||||||
|
width="18%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbPrefixo.label')}"
|
||||||
|
width="20%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('lb.dec')}" width="30%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbOrgao.label')}"
|
||||||
|
width="22%" />
|
||||||
|
<listheader width="10%" />
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
</center>
|
||||||
|
</borderlayout>
|
||||||
|
</cell>
|
||||||
|
</row>
|
||||||
|
<row spans="1,3">
|
||||||
|
<label value="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbTpPassagem.value')}" />
|
||||||
|
<bandbox id="bbPesquisaTpPassagem" width="100%"
|
||||||
|
mold="rounded" readonly="true">
|
||||||
|
<bandpopup>
|
||||||
|
<vbox>
|
||||||
|
<hbox>
|
||||||
|
<label value="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbTpPassagem.value')}" />
|
||||||
|
<textbox id="txtPalavraPesquisaTpPassagem"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"
|
||||||
|
width="300px" mold="rounded" />
|
||||||
|
<button id="btnPesquisaTpPassagem"
|
||||||
|
image="/gui/img/find.png"
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.btnPesquisa.label')}" />
|
||||||
|
<button id="btnLimparTpPassagem"
|
||||||
|
image="/gui/img/eraser.png"
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.btnLimpar.label')}" />
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
<listbox id="tpPassagemList" mold="paging"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
|
vflex="true" height="100%" width="700px">
|
||||||
|
<listhead>
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbDescCategoria.label')}"
|
||||||
|
width="40%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbSigla.label')}"
|
||||||
|
width="20%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbGrupoCategoria.label')}"
|
||||||
|
width="40%" />
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
<paging id="pagingTpPassagem" pageSize="10" />
|
||||||
|
</vbox>
|
||||||
|
</bandpopup>
|
||||||
|
</bandbox>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<cell colspan="4">
|
||||||
|
<borderlayout height="100px">
|
||||||
|
|
||||||
|
<center border="0">
|
||||||
|
<listbox id="tpPassagemSelList"
|
||||||
|
mold="paging"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
|
vflex="true" height="100%" width="700px">
|
||||||
|
<listhead>
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbDescCategoria.label')}"
|
||||||
|
width="35%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbSigla.label')}"
|
||||||
|
width="20%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.lbGrupoCategoria.label')}"
|
||||||
|
width="35%" />
|
||||||
|
<listheader width="10%" />
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
</center>
|
||||||
|
</borderlayout>
|
||||||
|
</cell>
|
||||||
|
</row>
|
||||||
|
<row spans="1, 3">
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioPosicaoVendaBilheteIdosoController.TpRelatorio.value')}" />
|
||||||
|
<radiogroup id="tipoRelatorio">
|
||||||
|
<radio
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.tpTrecho.label')}"
|
||||||
|
value="0"
|
||||||
|
checked="true" />
|
||||||
|
<radio
|
||||||
|
label="${c:l('relatorioPosicaoVendaBilheteIdosoController.tpPassageiro.label')}"
|
||||||
|
value="1"/>
|
||||||
|
</radiogroup>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
|
||||||
|
<toolbar>
|
||||||
|
<button id="btnExecutarRelatorio" image="/gui/img/find.png"
|
||||||
|
label="${c:l('relatorio.lb.btnExecutarRelatorio')}" />
|
||||||
|
</toolbar>
|
||||||
|
</window>
|
||||||
|
</zk>
|
||||||
|
|
Loading…
Reference in New Issue