diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioEmpresaCorrida.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioEmpresaCorrida.java index 47dd01f5c..567d2ee93 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioEmpresaCorrida.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioEmpresaCorrida.java @@ -2,6 +2,7 @@ package com.rjconsultores.ventaboletos.relatorios.impl; import java.sql.Connection; import java.sql.ResultSet; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -11,14 +12,13 @@ import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioEmpresaCorridaBean; -import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioLinhasHorarioBean; import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; public class RelatorioEmpresaCorrida extends Relatorio { private List lsDadosRelatorio; - public RelatorioEmpresaCorrida(Map parametros, Connection conexao, final boolean empresaCorrida) throws Exception { + public RelatorioEmpresaCorrida(Map parametros, Connection conexao) throws Exception { super(parametros, conexao); this.setCustomDataSource(new DataSource(this) { @@ -29,32 +29,34 @@ public class RelatorioEmpresaCorrida extends Relatorio { Map parametros = this.relatorio.getParametros(); - @SuppressWarnings("unchecked") String fecInicio = parametros.get("fecInicio").toString(); - @SuppressWarnings("unchecked") String fecFinal = parametros.get("fecFinal").toString(); - String sql = getSql(fecInicio, fecFinal, empresaCorrida); + String sql = getSql(fecInicio, fecFinal); System.out.println(sql); NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql); ResultSet rset = null; + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + stmt.setDate("fecInicio", new java.sql.Date(sdf.parse(fecInicio).getTime())); + stmt.setDate("fecFinal", new java.sql.Date(sdf.parse(fecFinal).getTime())); + rset = stmt.executeQuery(); lsDadosRelatorio = new ArrayList(); while (rset.next()) { RelatorioEmpresaCorridaBean empresaCorridaBean = new RelatorioEmpresaCorridaBean(); - empresaCorridaBean.setCorridaId(rset.getInt("corridaId")); - empresaCorridaBean.setEmpresa(rset.getString("empresa")); - empresaCorridaBean.setCoche(Integer.parseInt(rset.getString("coche"))); - empresaCorridaBean.setDestino(rset.getString("destino")); - empresaCorridaBean.setDia(rset.getDate("dia")); - empresaCorridaBean.setHora(rset.getString("hora")); - empresaCorridaBean.setKmts(rset.getInt("kmts")); - empresaCorridaBean.setOrigem(rset.getString("origem")); + empresaCorridaBean.setAbonos(rset.getBigDecimal("abonos")); + empresaCorridaBean.setBoletos(rset.getBigDecimal("boletos")); + empresaCorridaBean.setEmpresa(rset.getString("nombempresa")); + empresaCorridaBean.setKmOnibusArrendados(rset.getInt("kmOnibusArrendados")); + empresaCorridaBean.setKmOnibusProprio(rset.getInt("kmOnibusProprio")); + empresaCorridaBean.setKmTotal(rset.getInt("kmTotal")); + empresaCorridaBean.setLinea(rset.getString("linea")); + empresaCorridaBean.setPasajerosTransportados(rset.getInt("passageirosTransp")); lsDadosRelatorio.add(empresaCorridaBean); } @@ -76,25 +78,82 @@ public class RelatorioEmpresaCorrida extends Relatorio { protected void processaParametros() throws Exception { } - private String getSql(String fecInicio, String fecFinal, boolean empresaCorrida) { + private String getSql(String fecInicio, String fecFinal) { StringBuffer sql = new StringBuffer(); - - sql.append(" select c.corrida_Id corridaId, e.nombempresa empresa, c.feccorrida dia, a.numautobus coche, "); - sql.append(" o.cveparada origem, d.cveparada destino, "); - sql.append(" to_char(c.fechorsalida, 'HH24:MI') Hora, t.cantkmreal KMTS "); - sql.append(" from corrida c "); - sql.append(" left join parada o on o.parada_id = c.origen_id "); - sql.append(" left join parada d on d.parada_id = c.destino_id "); - sql.append(" left join tramo t on t.origen_id = c.origen_id and t.destino_id = c.destino_id "); - sql.append(" inner join autobus a on a.autobus_id = c.autobus_id "); - if (empresaCorrida){ - sql.append(" left join empresa e on e.empresa_id = c.empresacorrida_id "); - } else { - sql.append(" left join empresa e on e.empresa_id = a.empresa_id "); - } - sql.append(" where extract(month from c.feccorrida) = 6 "); - sql.append(" and c.activo = 1 and c.feccorrida between to_date('" + fecInicio + "', 'DD/MM/YYYY') and to_date('" + fecFinal + "', 'DD/MM/YYYY') "); - sql.append(" order by e.nombempresa, c.feccorrida "); + + sql.append("SELECT DISTINCT empresa_id, "); + sql.append(" nombempresa, "); + sql.append(" Concat(o.descparada, Concat('-', d.descparada)) "); + sql.append(" linea, "); + sql.append(" (SELECT COALESCE(Sum(preciopagado), 0) "); + sql.append(" FROM boleto b1 "); + sql.append(" WHERE b1.motivocancelacion_id IS NULL "); + sql.append(" AND b1.empresacorrida_id = empresa_id "); + sql.append(" AND b1.origen_id = b.origen_id "); + sql.append(" AND b1.destino_id = b.destino_id "); + sql.append(" AND b1.fechorventa BETWEEN :fecInicio AND :fecFinal) boletos, "); + sql.append(" (SELECT COALESCE(Sum(preciopagado), 0) "); + sql.append(" FROM boleto b1 "); + sql.append(" WHERE b1.motivocancelacion_id IS NOT NULL "); + sql.append(" AND b1.empresacorrida_id = empresa_id "); + sql.append(" AND b1.origen_id = b.origen_id "); + sql.append(" AND b1.destino_id = b.destino_id "); + sql.append(" AND b1.fechorventa BETWEEN :fecInicio AND :fecFinal) abonos, "); + sql.append(" (SELECT COALESCE(Sum(cantkmreal), 0) "); + sql.append(" FROM tramo t, "); + sql.append(" boleto b1, "); + sql.append(" autobus a, "); + sql.append(" corrida c "); + sql.append(" WHERE t.origen_id = b1.origen_id "); + sql.append(" AND t.destino_id = b1.destino_id "); + sql.append(" AND c.corrida_id = b1.corrida_id "); + sql.append(" AND a.autobus_id = c.autobus_id "); + sql.append(" AND b1.empresacorrida_id = empresa_id "); + sql.append(" AND a.empresa_id = empresa_id "); + sql.append(" AND b1.origen_id = b.origen_id "); + sql.append(" AND b1.destino_id = b.destino_id "); + sql.append(" AND b1.fechorventa BETWEEN :fecInicio AND :fecFinal) kmOnibusProprio, "); + sql.append(" (SELECT COALESCE(Sum(cantkmreal), 0) "); + sql.append(" FROM tramo t, "); + sql.append(" boleto b1, "); + sql.append(" autobus a, "); + sql.append(" corrida c "); + sql.append(" WHERE t.origen_id = b1.origen_id "); + sql.append(" AND t.destino_id = b1.destino_id "); + sql.append(" AND c.corrida_id = b1.corrida_id "); + sql.append(" AND a.autobus_id = c.autobus_id "); + sql.append(" AND b1.empresacorrida_id = empresa_id "); + sql.append(" AND a.empresa_id <> empresa_id "); + sql.append(" AND b1.origen_id = b.origen_id "); + sql.append(" AND b1.destino_id = b.destino_id "); + sql.append(" AND b1.fechorventa BETWEEN :fecInicio AND :fecFinal) kmOnibusArrendados, "); + sql.append(" (SELECT COALESCE(Sum(cantkmreal), 0) "); + sql.append(" FROM tramo t, "); + sql.append(" boleto b1 "); + sql.append(" WHERE t.origen_id = b1.origen_id "); + sql.append(" AND t.destino_id = b1.destino_id "); + sql.append(" AND b1.empresacorrida_id = empresa_id "); + sql.append(" AND b1.origen_id = b.origen_id "); + sql.append(" AND b1.destino_id = b.destino_id "); + sql.append(" AND b1.fechorventa BETWEEN :fecInicio AND :fecFinal) kmTotal, "); + sql.append(" (SELECT COALESCE(Count(boleto_id), 0) "); + sql.append(" FROM boleto b1 "); + sql.append(" WHERE b1.empresacorrida_id = empresa_id "); + sql.append(" AND b1.motivocancelacion_id IS NULL "); + sql.append(" AND b1.origen_id = b.origen_id "); + sql.append(" AND b1.destino_id = b.destino_id "); + sql.append(" AND b1.fechorventa BETWEEN :fecInicio AND :fecFinal) passageirosTransp "); + sql.append("FROM empresa, "); + sql.append(" parada o, "); + sql.append(" parada d, "); + sql.append(" boleto b "); + sql.append("WHERE o.parada_id = b.origen_id "); + sql.append(" AND d.parada_id = b.destino_id "); + sql.append(" AND b.motivocancelacion_id IS NULL "); + sql.append(" AND b.empresacorrida_id = empresa_id "); + sql.append(" AND b.fechorventa BETWEEN :fecInicio AND :fecFinal "); + sql.append("ORDER BY empresa_id, "); + sql.append(" linea "); return sql.toString(); } diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioEmpresaOnibus.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioEmpresaOnibus.java new file mode 100644 index 000000000..db8f766a9 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioEmpresaOnibus.java @@ -0,0 +1,95 @@ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; + +import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioEmpresaCorridaBean; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioEmpresaOnibusBean; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +public class RelatorioEmpresaOnibus extends Relatorio { + + private List lsDadosRelatorio; + + public RelatorioEmpresaOnibus(Map parametros, Connection conexao) throws Exception { + super(parametros, conexao); + + this.setCustomDataSource(new DataSource(this) { + @Override + public void initDados() throws Exception { + + Connection conexao = this.relatorio.getConexao(); + + Map parametros = this.relatorio.getParametros(); + + String fecInicio = parametros.get("fecInicio").toString(); + String fecFinal = parametros.get("fecFinal").toString(); + + String sql = getSql(fecInicio, fecFinal); + + System.out.println(sql); + + NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql); + ResultSet rset = null; + + rset = stmt.executeQuery(); + + lsDadosRelatorio = new ArrayList(); + + while (rset.next()) { + RelatorioEmpresaOnibusBean empresaOnibusBean = new RelatorioEmpresaOnibusBean(); + empresaOnibusBean.setCorridaId(rset.getInt("corridaId")); + empresaOnibusBean.setEmpresa(rset.getString("empresa")); + empresaOnibusBean.setCoche(Integer.parseInt(rset.getString("coche"))); + empresaOnibusBean.setDestino(rset.getString("destino")); + empresaOnibusBean.setDia(rset.getDate("dia")); + empresaOnibusBean.setHora(rset.getString("hora")); + empresaOnibusBean.setKmts(rset.getInt("kmts")); + empresaOnibusBean.setOrigem(rset.getString("origem")); + + lsDadosRelatorio.add(empresaOnibusBean); + } + + if (lsDadosRelatorio.size() > 0) { + + setLsDadosRelatorio(lsDadosRelatorio); + } + } + }); + } + + public void setLsDadosRelatorio(List lsDadosRelatorio) { + this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio)); + this.lsDadosRelatorio = lsDadosRelatorio; + } + + @Override + protected void processaParametros() throws Exception { + } + + private String getSql(String fecInicio, String fecFinal) { + StringBuffer sql = new StringBuffer(); + + sql.append(" select c.corrida_Id corridaId, e.nombempresa empresa, c.feccorrida dia, a.numautobus coche, "); + sql.append(" o.cveparada origem, d.cveparada destino, "); + sql.append(" to_char(c.fechorsalida, 'HH24:MI') Hora, t.cantkmreal KMTS "); + sql.append(" from corrida c "); + sql.append(" left join parada o on o.parada_id = c.origen_id "); + sql.append(" left join parada d on d.parada_id = c.destino_id "); + sql.append(" left join tramo t on t.origen_id = c.origen_id and t.destino_id = c.destino_id "); + sql.append(" inner join autobus a on a.autobus_id = c.autobus_id "); + sql.append(" left join empresa e on e.empresa_id = a.empresa_id "); + sql.append(" where extract(month from c.feccorrida) = 6 "); + sql.append(" and c.activo = 1 and c.feccorrida between to_date('" + fecInicio + "', 'DD/MM/YYYY') and to_date('" + fecFinal + "', 'DD/MM/YYYY') "); + sql.append(" order by e.nombempresa, c.feccorrida "); + + return sql.toString(); + } +} diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioEmpresaCorrida_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioEmpresaCorrida_es.properties index d00d8ed86..6f7d3b84b 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioEmpresaCorrida_es.properties +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioEmpresaCorrida_es.properties @@ -13,13 +13,13 @@ header.filtro.grupo=Grupo de l #Labels detail -detail.dia=Dia -detail.coche=Coche -detail.origen=Origen -detail.destino=Destino -detail.hora=Hora -detail.kmts=Kmts -detail.corridaId=Corrida +detail.linea=Línea origen - destino +detail.boletos=Recaudaciones Boletos ($) +detail.abonos=Recaudaciones abonos ($) +detail.kmOnibusProprio=Distancia recorrida ómnibus propios (km) +detail.kmOnibusArrendados=Distancia recorrida ómnibus arrendados (km) +detail.kmTotal=Distancia recorrida total (km) +detail.pasajerosTransportados=Pasajeros transportados linhas=Líneas diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioEmpresaOnibus_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioEmpresaOnibus_es.properties new file mode 100644 index 000000000..d00d8ed86 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioEmpresaOnibus_es.properties @@ -0,0 +1,25 @@ +#geral +msg.noData=No se pudo obtener datos con los parámetros reportados. +msg.a=a + +#Labels header +header.periodo=Período: +header.data.hora=Fecha/Hora\: +header.pagina=Página\: +header.filtro=Filtro\: +header.filtro.servico=Servicio\: +header.filtro.linha=Línea\: +header.filtro.grupo=Grupo de líneas\: + +#Labels detail + +detail.dia=Dia +detail.coche=Coche +detail.origen=Origen +detail.destino=Destino +detail.hora=Hora +detail.kmts=Kmts +detail.corridaId=Corrida + +linhas=Líneas + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioEmpresaCorrida_pt_BR2.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioEmpresaOnibus_pt_BR2.properties similarity index 100% rename from src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioEmpresaCorrida_pt_BR2.properties rename to src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioEmpresaOnibus_pt_BR2.properties diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioEmpresaCorrida.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioEmpresaCorrida.jasper index 471282848..d857be62f 100644 Binary files a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioEmpresaCorrida.jasper and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioEmpresaCorrida.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioEmpresaCorrida.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioEmpresaCorrida.jrxml index 7395a97e0..f51ca9c32 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioEmpresaCorrida.jrxml +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioEmpresaCorrida.jrxml @@ -1,8 +1,8 @@ - - + + @@ -15,102 +15,137 @@ - - - - - - + + + + + + + - - - + + + + + + + + + + + + + + + + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - + - + - + - + - - + + - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -165,55 +200,55 @@ - + - - + + - + - - + + - + - - - + + + - - - - - - - - + - - + + - + - - + + - + - + - + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioEmpresaOnibus.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioEmpresaOnibus.jasper new file mode 100644 index 000000000..305389cfc Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioEmpresaOnibus.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioEmpresaOnibus.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioEmpresaOnibus.jrxml new file mode 100644 index 000000000..020cfccb9 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioEmpresaOnibus.jrxml @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioEmpresaCorridaBean.java b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioEmpresaCorridaBean.java index ab8ef112a..04505777c 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioEmpresaCorridaBean.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioEmpresaCorridaBean.java @@ -1,62 +1,62 @@ package com.rjconsultores.ventaboletos.relatorios.utilitarios; -import java.util.Date; +import java.math.BigDecimal; public class RelatorioEmpresaCorridaBean { - protected Integer corridaId; protected String empresa; - protected Date dia; - protected Integer coche; - protected String origem; - protected String destino; - protected String hora; - protected Integer kmts; - public Date getDia() { - return dia; - } - public void setDia(Date dia) { - this.dia = dia; - } - public Integer getCoche() { - return coche; - } - public void setCoche(Integer coche) { - this.coche = coche; - } - public String getOrigem() { - return origem; - } - public void setOrigem(String origem) { - this.origem = origem; - } - public String getDestino() { - return destino; - } - public void setDestino(String destino) { - this.destino = destino; - } - public String getHora() { - return hora; - } - public void setHora(String hora) { - this.hora = hora; - } - public Integer getKmts() { - return kmts; - } - public void setKmts(Integer kmts) { - this.kmts = kmts; - } + protected String linea; + protected BigDecimal boletos; + protected BigDecimal abonos; + protected Integer kmOnibusProprio; + protected Integer kmOnibusArrendados; + protected Integer kmTotal; + protected Integer pasajerosTransportados; public String getEmpresa() { return empresa; } public void setEmpresa(String empresa) { this.empresa = empresa; } - public Integer getCorridaId() { - return corridaId; + public String getLinea() { + return linea; } - public void setCorridaId(Integer corridaId) { - this.corridaId = corridaId; + public void setLinea(String linea) { + this.linea = linea; + } + public BigDecimal getBoletos() { + return boletos; + } + public void setBoletos(BigDecimal boletos) { + this.boletos = boletos; + } + public BigDecimal getAbonos() { + return abonos; + } + public void setAbonos(BigDecimal abonos) { + this.abonos = abonos; + } + public Integer getKmOnibusProprio() { + return kmOnibusProprio; + } + public void setKmOnibusProprio(Integer kmOnibusProprio) { + this.kmOnibusProprio = kmOnibusProprio; + } + public Integer getKmOnibusArrendados() { + return kmOnibusArrendados; + } + public void setKmOnibusArrendados(Integer kmOnibusArrendados) { + this.kmOnibusArrendados = kmOnibusArrendados; + } + public Integer getKmTotal() { + return kmTotal; + } + public void setKmTotal(Integer kmTotal) { + this.kmTotal = kmTotal; + } + public Integer getPasajerosTransportados() { + return pasajerosTransportados; + } + public void setPasajerosTransportados(Integer pasajerosTransportados) { + this.pasajerosTransportados = pasajerosTransportados; } } diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioEmpresaOnibusBean.java b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioEmpresaOnibusBean.java new file mode 100644 index 000000000..70054cd41 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioEmpresaOnibusBean.java @@ -0,0 +1,62 @@ +package com.rjconsultores.ventaboletos.relatorios.utilitarios; + +import java.util.Date; + +public class RelatorioEmpresaOnibusBean { + protected Integer corridaId; + protected String empresa; + protected Date dia; + protected Integer coche; + protected String origem; + protected String destino; + protected String hora; + protected Integer kmts; + public Date getDia() { + return dia; + } + public void setDia(Date dia) { + this.dia = dia; + } + public Integer getCoche() { + return coche; + } + public void setCoche(Integer coche) { + this.coche = coche; + } + public String getOrigem() { + return origem; + } + public void setOrigem(String origem) { + this.origem = origem; + } + public String getDestino() { + return destino; + } + public void setDestino(String destino) { + this.destino = destino; + } + public String getHora() { + return hora; + } + public void setHora(String hora) { + this.hora = hora; + } + public Integer getKmts() { + return kmts; + } + public void setKmts(Integer kmts) { + this.kmts = kmts; + } + public String getEmpresa() { + return empresa; + } + public void setEmpresa(String empresa) { + this.empresa = empresa; + } + public Integer getCorridaId() { + return corridaId; + } + public void setCorridaId(Integer corridaId) { + this.corridaId = corridaId; + } +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioEmpresaCorridaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioEmpresaCorridaController.java index 49ea7a6bd..146a7d536 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioEmpresaCorridaController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioEmpresaCorridaController.java @@ -15,6 +15,7 @@ import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.event.Event; import org.zkoss.zul.Datebox; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioEmpresaOnibus; import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioEmpresaCorrida; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; @@ -40,7 +41,7 @@ public class RelatorioEmpresaCorridaController extends MyGenericForwardComposer parametros.put("fecFinal", sdf.format(this.datFinal.getValue())); parametros.put("TITULO", Labels.getLabel("relatorioEmpresaCorridaController.window.title")); - Relatorio relatorio = new RelatorioEmpresaCorrida(parametros, dataSource.getConnection(), true); + Relatorio relatorio = new RelatorioEmpresaCorrida(parametros, dataSource.getConnection()); Map args = new HashMap(); args.put("relatorio", relatorio); diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioEmpresaOnibusController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioEmpresaOnibusController.java index 32b1d96e1..49dec40ef 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioEmpresaOnibusController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioEmpresaOnibusController.java @@ -15,7 +15,7 @@ import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.event.Event; import org.zkoss.zul.Datebox; -import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioEmpresaCorrida; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioEmpresaOnibus; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; @@ -23,7 +23,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; @Scope("prototype") public class RelatorioEmpresaOnibusController extends MyGenericForwardComposer { private static final long serialVersionUID = 1L; - private static Logger log = Logger.getLogger(RelatorioEmpresaCorridaController.class); + private static Logger log = Logger.getLogger(RelatorioEmpresaOnibusController.class); @Autowired private DataSource dataSource; @@ -40,7 +40,7 @@ public class RelatorioEmpresaOnibusController extends MyGenericForwardComposer { parametros.put("fecFinal", sdf.format(this.datFinal.getValue())); parametros.put("TITULO", Labels.getLabel("relatorioEmpresaOnibusController.window.title")); - Relatorio relatorio = new RelatorioEmpresaCorrida(parametros, dataSource.getConnection(), false); + Relatorio relatorio = new RelatorioEmpresaOnibus(parametros, dataSource.getConnection()); Map args = new HashMap(); args.put("relatorio", relatorio);