Relatorio Taxa Por Linha - Itens para homologação
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@30377 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
a7026d1011
commit
22472a3443
|
@ -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<String, Object> 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, ");
|
||||
|
|
Binary file not shown.
|
@ -1,7 +1,7 @@
|
|||
<?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="RelatorioTaxasLinha" pageWidth="595" pageHeight="842" whenNoDataType="NoDataSection" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="efbc89d4-6f08-4ea5-802f-d4f48ed208e2">
|
||||
<property name="ireport.zoom" value="2.0"/>
|
||||
<property name="ireport.x" value="0"/>
|
||||
<property name="ireport.x" value="229"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<style name="textStyle" isDefault="true" fontSize="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
|
||||
<style name="table">
|
||||
|
@ -343,7 +343,7 @@
|
|||
<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<text><![CDATA[V. Emb]]></text>
|
||||
<text><![CDATA[Q. Emb]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="32c20a27-414c-41be-86b2-0d23645acd18" x="147" y="1" width="88" height="11"/>
|
||||
|
@ -358,7 +358,7 @@
|
|||
<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<text><![CDATA[V. Ped]]></text>
|
||||
<text><![CDATA[Q. Ped]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="276a9b95-f7ce-44e7-a3a9-65f7fd6944fd" mode="Transparent" x="407" y="1" width="38" height="11" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
|
@ -366,7 +366,7 @@
|
|||
<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<text><![CDATA[V. Seg]]></text>
|
||||
<text><![CDATA[Q. Seg]]></text>
|
||||
</staticText>
|
||||
</band>
|
||||
</columnHeader>
|
||||
|
|
|
@ -36,6 +36,7 @@ import com.rjconsultores.ventaboletos.service.CorridaService;
|
|||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||
import com.rjconsultores.ventaboletos.service.GrupoRutaService;
|
||||
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
||||
|
@ -114,36 +115,8 @@ public class RelatorioLinhasHorarioController extends MyGenericForwardComposer {
|
|||
|
||||
parametros.put("TIPOSERVICIO_ID", tipoServico);
|
||||
|
||||
Timestamp dataInicio = new Timestamp(((java.util.Date) this.datInicial.getValue()).getTime());
|
||||
Timestamp dataFinal = new Timestamp(((java.util.Date) this.datFinal.getValue()).getTime());
|
||||
|
||||
GregorianCalendar auxDataInicio = (GregorianCalendar) GregorianCalendar.getInstance();
|
||||
auxDataInicio.setTimeInMillis(dataInicio.getTime());
|
||||
|
||||
int year = auxDataInicio.get(Calendar.YEAR);
|
||||
int month = auxDataInicio.get(Calendar.MONTH);
|
||||
int date = auxDataInicio.get(Calendar.DATE);
|
||||
|
||||
int hourOfDay = 00;
|
||||
int minute = 00;
|
||||
int second = 00;
|
||||
|
||||
auxDataInicio.set(year, month, date, hourOfDay, minute, second);
|
||||
dataInicio = new Timestamp(auxDataInicio.getTimeInMillis());
|
||||
|
||||
GregorianCalendar auxDataFinal = (GregorianCalendar) GregorianCalendar.getInstance();
|
||||
auxDataFinal.setTimeInMillis(dataFinal.getTime());
|
||||
|
||||
year = auxDataFinal.get(Calendar.YEAR);
|
||||
month = auxDataFinal.get(Calendar.MONTH);
|
||||
date = auxDataFinal.get(Calendar.DATE);
|
||||
|
||||
hourOfDay = 23;
|
||||
minute = 59;
|
||||
second = 59;
|
||||
|
||||
auxDataFinal.set(year, month, date, hourOfDay, minute, second);
|
||||
dataFinal = new Timestamp(auxDataFinal.getTimeInMillis());
|
||||
Timestamp dataInicio = new Timestamp((DateUtil.inicioFecha((java.util.Date) this.datInicial.getValue()).getTime()));
|
||||
Timestamp dataFinal = new Timestamp((DateUtil.fimFecha((java.util.Date) this.datFinal.getValue()).getTime()));
|
||||
|
||||
parametros.put("DATA_INICIO", dataInicio);
|
||||
parametros.put("DATA_FINAL", dataFinal);
|
||||
|
|
Loading…
Reference in New Issue