diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTaxasLinha.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTaxasLinha.java index 22c765378..aedcf3323 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTaxasLinha.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTaxasLinha.java @@ -5,6 +5,7 @@ package com.rjconsultores.ventaboletos.relatorios.impl; import java.math.BigDecimal; import java.sql.Connection; +import java.sql.Timestamp; import java.util.Date; import java.util.HashMap; import java.util.Map; @@ -13,6 +14,7 @@ import com.rjconsultores.ventaboletos.relatorios.negocio.CalculoImposto; import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource; import com.rjconsultores.ventaboletos.relatorios.utilitarios.ExceptionConfiguracao; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.utilerias.DateUtil; import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; /** @@ -36,11 +38,12 @@ public class RelatorioTaxasLinha extends Relatorio { Map parametros = this.relatorio.getParametros(); String puntosVentaIds = (String) parametros.get("NUMPUNTOVENTA"); String sql = getSql(puntosVentaIds); + NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql); stmt.setInt("TIPO_DATA", (Integer) parametros.get("TIPO_DATA")); - stmt.setDate("DATA_INICIAL", new java.sql.Date(((Date) parametros.get("DATA_INICIAL")).getTime())); - stmt.setDate("DATA_FINAL", new java.sql.Date(((Date) parametros.get("DATA_FINAL")).getTime())); + stmt.setTimestamp("DATA_INICIAL", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("DATA_INICIAL")).getTime())); + stmt.setTimestamp("DATA_FINAL", new Timestamp(DateUtil.fimFecha((Date) parametros.get("DATA_FINAL")).getTime())); if (parametros.get("EMPRESA_ID") != null) stmt.setInt("EMPRESA_ID", (Integer) parametros.get("EMPRESA_ID")); @@ -178,7 +181,7 @@ public class RelatorioTaxasLinha extends Relatorio { sql.append(" AND CJ.INDSTATUSOPERACION = 'F' "); sql.append(" AND CJ.INDREIMPRESION = 0 "); sql.append(" AND CJ.INDCANCELACION = 0 "); - sql.append(" AND DECODE(:TIPO_DATA, 1, CJ.FECCORRIDA, 2, CJ.FECHORVENTA) BETWEEN "); + sql.append(" AND DECODE(:TIPO_DATA, 1, CJ.FECHORVENTA, 2, CJ.FECCORRIDA) BETWEEN "); sql.append(" :DATA_INICIAL AND :DATA_FINAL "); sql.append(" AND EM.EMPRESA_ID = NVL(:EMPRESA_ID, EM.EMPRESA_ID) "); @@ -188,6 +191,7 @@ public class RelatorioTaxasLinha extends Relatorio { sql.append(" AND PO.PARADA_ID = NVL(:ORIGEN_ID, PO.PARADA_ID) "); sql.append(" AND PD.PARADA_ID = NVL(:DESTINO_ID, PD.PARADA_ID) "); + sql.append(" GROUP BY RT.PREFIXO, "); sql.append(" PO.DESCPARADA, "); sql.append(" PD.DESCPARADA, "); diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTaxasLinha.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTaxasLinha.jasper index 39d01b813..04d621f60 100644 Binary files a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTaxasLinha.jasper and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTaxasLinha.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTaxasLinha.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTaxasLinha.jrxml index 86a4d80f9..38f11b922 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTaxasLinha.jrxml +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTaxasLinha.jrxml @@ -1,7 +1,7 @@ - +