fixes bug #8301
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@63460 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
f1b79dcd6d
commit
de39b225a9
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
|
@ -3,17 +3,21 @@ package com.rjconsultores.ventaboletos.relatorios.impl;
|
|||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Tramo;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayDataSource;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||
|
||||
public class RelatorioTabelaPreco extends Relatorio {
|
||||
private Boolean isLayoutArtesp;
|
||||
|
||||
public RelatorioTabelaPreco(final Map<String, Object> parametros, Connection conexao) throws Exception {
|
||||
super(parametros, conexao);
|
||||
|
||||
|
||||
this.isLayoutArtesp = (Boolean) parametros.get("isLayoutArtesp");
|
||||
this.setCustomDataSource(new ArrayDataSource(this) {
|
||||
|
||||
public void initDados() throws Exception {
|
||||
|
@ -23,7 +27,7 @@ public class RelatorioTabelaPreco extends Relatorio {
|
|||
|
||||
while (rset.next()) {
|
||||
Map<String, Object> dataResult = new HashMap<String, Object>();
|
||||
|
||||
|
||||
dataResult.put("origem", rset.getString("origem"));
|
||||
dataResult.put("destino", rset.getString("destino"));
|
||||
dataResult.put("tarifa", rset.getBigDecimal("tarifa"));
|
||||
|
@ -38,7 +42,7 @@ public class RelatorioTabelaPreco extends Relatorio {
|
|||
dataResult.put("dataVigenciaFinal", rset.getDate("dataVigenciaFinal"));
|
||||
dataResult.put("idLinha", rset.getInt("idLinha"));
|
||||
dataResult.put("idVigencia", rset.getInt("idVigencia"));
|
||||
|
||||
|
||||
this.dados.add(dataResult);
|
||||
}
|
||||
|
||||
|
@ -85,26 +89,36 @@ public class RelatorioTabelaPreco extends Relatorio {
|
|||
sql.append("AND tr.ACTIVO = 1 ");
|
||||
sql.append("AND tr.ORIGEN_ID = t.ORIGEN_ID ");
|
||||
sql.append("AND tr.DESTINO_ID = t.DESTINO_ID ");
|
||||
|
||||
if(parametros.get("VIGENCIA_ID") != null){
|
||||
sql.append(" AND vt.VIGENCIATARIFA_ID = " + parametros.get("VIGENCIA_ID"));
|
||||
}
|
||||
|
||||
if (parametros.get("EMPRESA_ID") != null) {
|
||||
sql.append(" AND e.empresa_id = " + parametros.get("EMPRESA_ID"));
|
||||
}
|
||||
|
||||
if (parametros.get("LINHAS_ID") != null) {
|
||||
sql.append(" AND vt.VIGENCIATARIFA_ID = " + parametros.get("VIGENCIA_ID"));
|
||||
sql.append(" AND e.empresa_id = " + parametros.get("EMPRESA_ID"));
|
||||
|
||||
List<Long> linha = (List<Long>) parametros.get("LINHAS_ID");
|
||||
if (linha != null && !linha.isEmpty()) {
|
||||
sql.append(" AND r.RUTA_ID IN (" + parametros.get("LINHAS_ID") + ")");
|
||||
}
|
||||
|
||||
if(parametros.get("ORGAO_CONCEDENTE_ID") != null){
|
||||
|
||||
if (parametros.get("ORGAO_CONCEDENTE_ID") != null) {
|
||||
sql.append(" AND r.ORGAOCONCEDENTE_ID = " + parametros.get("ORGAO_CONCEDENTE_ID"));
|
||||
}
|
||||
|
||||
sql.append( " ORDER BY r.RUTA_ID, vt.FECINICIOVIGENCIA ");
|
||||
|
||||
return sql.toString();
|
||||
|
||||
if (parametros.get("origemId") != null) {
|
||||
sql.append(" AND tr.ORIGEN_ID= " + parametros.get("origemId"));
|
||||
}
|
||||
|
||||
if (parametros.get("destinoId") != null) {
|
||||
sql.append(" AND tr.DESTINO_ID= " + parametros.get("destinoId"));
|
||||
}
|
||||
|
||||
sql.append(" ORDER BY r.RUTA_ID, vt.FECINICIOVIGENCIA ");
|
||||
|
||||
return sql.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNome() {
|
||||
if (isLayoutArtesp) {
|
||||
return "RelatorioTabelaPrecoArtesp";
|
||||
}
|
||||
return this.getClass().getSimpleName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
#geral
|
||||
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||
|
||||
#Labels header
|
||||
label.origem=Origem
|
||||
label.destino=Destino
|
||||
label.tarifa=Tarifa
|
||||
label.pedagio=Pedágio
|
||||
label.taxaEmbarque=Taxa
|
||||
label.seguro=Seguro
|
||||
label.outros=Outros
|
||||
label.tipoClasse=Classe
|
||||
label.linha=Linha(s)
|
||||
label.empresa=Empresa
|
||||
label.dataVigencia=Vigência
|
||||
label.total=Total
|
||||
label.orgacaoConcedente=Orgão Concedente
|
||||
|
||||
label.totalSemSeguro=Total Sem Seguro Facultativo
|
||||
label.totalComSeguro=Total Com Seguro Facultativo
|
||||
label.valorSeguro=Valor do Seguro Facultativo
|
||||
label.msgAviso=A CONTRATAÇÃO DO SEGURO DE ACIDENTES PESSOAIS É FACULTATIVA
|
|
@ -0,0 +1,22 @@
|
|||
#geral
|
||||
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||
|
||||
#Labels header
|
||||
label.origem=Origem
|
||||
label.destino=Destino
|
||||
label.tarifa=Tarifa
|
||||
label.pedagio=Pedágio
|
||||
label.taxaEmbarque=Taxa
|
||||
label.seguro=Seguro
|
||||
label.outros=Outros
|
||||
label.tipoClasse=Classe
|
||||
label.linha=Linha(s)
|
||||
label.empresa=Empresa
|
||||
label.dataVigencia=Vigência
|
||||
label.total=Total
|
||||
label.orgacaoConcedente=Orgão Concedente
|
||||
|
||||
label.totalSemSeguro=Total Sem Seguro Facultativo
|
||||
label.totalComSeguro=Total Com Seguro Facultativo
|
||||
label.valorSeguro=Valor do Seguro Facultativo
|
||||
label.msgAviso=A CONTRATAÇÃO DO SEGURO DE ACIDENTES PESSOAIS É FACULTATIVA
|
Binary file not shown.
|
@ -0,0 +1,305 @@
|
|||
<?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="RelatorioTabelaPreco" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="5edc9f7a-8634-485f-96f7-c65a462aa868">
|
||||
<property name="ireport.zoom" value="1.4641000000000033"/>
|
||||
<property name="ireport.x" value="0"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<field name="origem" class="java.lang.String"/>
|
||||
<field name="destino" class="java.lang.String"/>
|
||||
<field name="tarifa" class="java.math.BigDecimal"/>
|
||||
<field name="pedagio" class="java.math.BigDecimal"/>
|
||||
<field name="seguro" class="java.math.BigDecimal"/>
|
||||
<field name="outros" class="java.math.BigDecimal"/>
|
||||
<field name="tipoClasse" class="java.lang.String"/>
|
||||
<field name="linha" class="java.lang.String"/>
|
||||
<field name="empresa" class="java.lang.String"/>
|
||||
<field name="dataVigenciaInicial" class="java.util.Date"/>
|
||||
<field name="dataVigenciaFinal" class="java.util.Date"/>
|
||||
<field name="taxaEmbarque" class="java.math.BigDecimal"/>
|
||||
<field name="idVigencia" class="java.lang.Integer"/>
|
||||
<field name="idLinha" class="java.lang.Integer"/>
|
||||
<variable name="total" class="java.lang.Double">
|
||||
<variableExpression><![CDATA[$F{tarifa}.doubleValue()
|
||||
+$F{pedagio}.doubleValue()
|
||||
+$F{taxaEmbarque}.doubleValue()]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="totalSeguro" class="java.lang.Double">
|
||||
<variableExpression><![CDATA[$F{tarifa}.doubleValue()
|
||||
+$F{pedagio}.doubleValue()
|
||||
+$F{seguro}.doubleValue()
|
||||
+$F{taxaEmbarque}.doubleValue()]]></variableExpression>
|
||||
</variable>
|
||||
<background>
|
||||
<band splitType="Stretch"/>
|
||||
</background>
|
||||
<title>
|
||||
<band height="30" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement uuid="5d83d8a8-01aa-4022-9583-6808e65d2ec8" mode="Opaque" x="0" y="0" width="264" height="29" backcolor="#FFFF66"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font size="14" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{origem}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="2c5b01a1-51db-478a-a307-83c9df5cea6e" x="264" y="0" width="538" height="29"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font size="14" isBold="true"/>
|
||||
<paragraph leftIndent="4"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{empresa}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</title>
|
||||
<pageHeader>
|
||||
<band height="20" splitType="Stretch">
|
||||
<staticText>
|
||||
<reportElement uuid="325e439b-ecaf-48cb-9c09-387c0649e47b" x="0" y="0" width="802" height="20"/>
|
||||
<textElement textAlignment="Center"/>
|
||||
<text><![CDATA[Tabela de Preços R$]]></text>
|
||||
</staticText>
|
||||
</band>
|
||||
</pageHeader>
|
||||
<columnHeader>
|
||||
<band height="25" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement uuid="2bc93d5d-8e74-4b8b-8808-080060e8cad1" mode="Opaque" x="0" y="0" width="321" height="24" forecolor="#000000" backcolor="#FFFF66"/>
|
||||
<box leftPadding="1" rightPadding="1">
|
||||
<pen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<topPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||
<font size="9" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.destino}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="74398eb5-f168-4dff-a38d-b23b11361b96" mode="Opaque" x="321" y="0" width="80" height="24" backcolor="#CCCCCC"/>
|
||||
<box leftPadding="1" rightPadding="1">
|
||||
<pen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<topPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||
<font size="9" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.tarifa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="571d26cc-b563-4f10-8d8a-1ee49678088a" mode="Opaque" x="401" y="1" width="80" height="24" backcolor="#CCCCCC"/>
|
||||
<box leftPadding="1" rightPadding="1">
|
||||
<pen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<topPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||
<font size="9" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.pedagio}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="78aa7d0c-aa5e-43b0-a7eb-5de12d80db4f" mode="Opaque" x="481" y="0" width="80" height="24" backcolor="#CCCCCC"/>
|
||||
<box leftPadding="1" rightPadding="1">
|
||||
<pen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<topPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||
<font size="9" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.taxaEmbarque}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="4a9bdb71-945e-48ce-a495-fdd4eee1b1e2" mode="Opaque" x="561" y="0" width="80" height="24" backcolor="#CCCCCC"/>
|
||||
<box leftPadding="1" rightPadding="1">
|
||||
<pen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<topPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||
<font size="9" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.totalSemSeguro}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="50b8dc32-c117-444f-b819-9b4c2ff954bd" mode="Opaque" x="722" y="0" width="80" height="24" backcolor="#CCCCCC"/>
|
||||
<box leftPadding="1" rightPadding="1">
|
||||
<pen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<topPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||
<font size="9" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.totalComSeguro}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="a08041c7-23de-4505-86bc-f009082b2faf" mode="Opaque" x="641" y="0" width="80" height="24" backcolor="#CCCCCC"/>
|
||||
<box leftPadding="1" rightPadding="1">
|
||||
<pen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<topPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||
<font size="9" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.valorSeguro}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</columnHeader>
|
||||
<detail>
|
||||
<band height="20" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement uuid="a36a0fa9-3f68-416b-ba5b-3221bb3b6353" x="0" y="0" width="321" height="20"/>
|
||||
<box topPadding="0" leftPadding="1" bottomPadding="0" rightPadding="1">
|
||||
<pen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<topPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement>
|
||||
<font size="10" isBold="true"/>
|
||||
<paragraph leftIndent="2"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{destino}+" ("+$F{tipoClasse}+")"]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00;-###0.00">
|
||||
<reportElement uuid="fefa6e89-eec1-424e-bc72-bec86ee9eb1b" x="322" y="0" width="80" height="20"/>
|
||||
<box topPadding="0" leftPadding="1" bottomPadding="0" rightPadding="1">
|
||||
<pen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<topPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="10" isBold="true"/>
|
||||
<paragraph rightIndent="2"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{tarifa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00;-###0.00">
|
||||
<reportElement uuid="8452d6c9-7348-4c6a-965f-e127b5fd9830" x="721" y="0" width="80" height="20"/>
|
||||
<box topPadding="0" leftPadding="1" bottomPadding="0" rightPadding="1">
|
||||
<pen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<topPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="10" isBold="true"/>
|
||||
<paragraph rightIndent="2"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{totalSeguro}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00;-###0.00">
|
||||
<reportElement uuid="4d222ca8-11b3-4979-8928-71b2995e3bdf" x="641" y="0" width="80" height="20"/>
|
||||
<box topPadding="0" leftPadding="1" bottomPadding="0" rightPadding="1">
|
||||
<pen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<topPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="10" isBold="true"/>
|
||||
<paragraph rightIndent="2"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{seguro}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00;-###0.00">
|
||||
<reportElement uuid="a7c2dd13-c0c0-4a7e-9782-b758b6176b1c" x="561" y="0" width="80" height="20"/>
|
||||
<box topPadding="0" leftPadding="1" bottomPadding="0" rightPadding="1">
|
||||
<pen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<topPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="10" isBold="true"/>
|
||||
<paragraph rightIndent="2"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{total}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00;-###0.00">
|
||||
<reportElement uuid="61b08629-ac62-475b-96c8-d88aedcf87ef" x="481" y="0" width="80" height="20"/>
|
||||
<box topPadding="0" leftPadding="1" bottomPadding="0" rightPadding="1">
|
||||
<pen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<topPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="10" isBold="true"/>
|
||||
<paragraph rightIndent="2"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{taxaEmbarque}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00;-###0.00">
|
||||
<reportElement uuid="4233bd79-2a8d-4b1b-88b7-a235f79b1227" x="402" y="0" width="80" height="20"/>
|
||||
<box topPadding="0" leftPadding="1" bottomPadding="0" rightPadding="1">
|
||||
<pen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<topPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<leftPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<bottomPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="10" isBold="true"/>
|
||||
<paragraph rightIndent="2"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{pedagio}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</detail>
|
||||
<pageFooter>
|
||||
<band height="46" splitType="Stretch">
|
||||
<rectangle>
|
||||
<reportElement uuid="88249295-7646-48b5-b723-522631570fc7" x="0" y="15" width="802" height="30" backcolor="#CCCCCC"/>
|
||||
<graphicElement>
|
||||
<pen lineWidth="0.0"/>
|
||||
</graphicElement>
|
||||
</rectangle>
|
||||
<textField>
|
||||
<reportElement uuid="b7957c63-89ec-4009-b196-373a274b59e1" mode="Opaque" x="172" y="15" width="630" height="29" backcolor="#CCCCCC"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font size="14" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.msgAviso}]]></textFieldExpression>
|
||||
</textField>
|
||||
<image>
|
||||
<reportElement uuid="a81f07bd-df73-4d40-a1bc-6593b855ecb0" x="0" y="15" width="172" height="29"/>
|
||||
<imageExpression><![CDATA["C:\\Users\\vpaiva\\Sources\\ventaboletosadm\\src\\java\\com\\rjconsultores\\ventaboletos\\relatorios\\imagens\\artesp.png"]]></imageExpression>
|
||||
</image>
|
||||
</band>
|
||||
</pageFooter>
|
||||
<noData>
|
||||
<band height="27">
|
||||
<textField>
|
||||
<reportElement uuid="5954ac3d-3873-40e1-b643-cd910fa11ef2" x="0" y="1" width="801" height="26"/>
|
||||
<textElement textAlignment="Center" markup="none">
|
||||
<font size="11" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</noData>
|
||||
</jasperReport>
|
|
@ -15,20 +15,27 @@ import org.zkoss.util.resource.Labels;
|
|||
import org.zkoss.zhtml.Messagebox;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Checkbox;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.ListModelArray;
|
||||
import org.zkoss.zul.ListModelList;
|
||||
import org.zkoss.zul.Paging;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||
import com.rjconsultores.ventaboletos.entidad.VigenciaTarifa;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioTabelaPreco;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
||||
import com.rjconsultores.ventaboletos.service.ParadaService;
|
||||
import com.rjconsultores.ventaboletos.service.TramoService;
|
||||
import com.rjconsultores.ventaboletos.service.VigenciaTarifaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
|
||||
|
@ -43,13 +50,11 @@ public class RelatorioTabelaPrecoController extends MyGenericForwardComposer {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private MyComboboxEstandar cmbVigencia;
|
||||
private List<VigenciaTarifa> lsVigencia;
|
||||
private MyComboboxEstandar cmbEmpresa;
|
||||
private List<Empresa> lsEmpresa;
|
||||
private MyComboboxEstandar cmbOrgaoConcedente;
|
||||
private List<OrgaoConcedente> lsOrcaoConcedente;
|
||||
@Autowired
|
||||
private transient PagedListWrapper<Ruta> plwRuta;
|
||||
private MyComboboxParada cmbOrigem;
|
||||
private MyComboboxEstandar cmbDestino;
|
||||
private Checkbox chkLayoutArtesp;
|
||||
|
||||
private Paging pagingLinha;
|
||||
private MyTextbox txtLinha;
|
||||
|
@ -62,12 +67,20 @@ public class RelatorioTabelaPrecoController extends MyGenericForwardComposer {
|
|||
private EmpresaService empresaService;
|
||||
@Autowired
|
||||
private OrgaoConcedenteService orgaocConcedenteService;
|
||||
|
||||
@Autowired
|
||||
private transient PagedListWrapper<Ruta> plwRuta;
|
||||
@Autowired
|
||||
private ParadaService paradaService;
|
||||
@Autowired
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
private List<Parada> destinoList;
|
||||
private List<VigenciaTarifa> lsVigencia;
|
||||
private List<Empresa> lsEmpresa;
|
||||
private List<OrgaoConcedente> lsOrcaoConcedente;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
lsVigencia = vigenciaTarifaService.obtenerTodos();
|
||||
lsEmpresa = empresaService.obtenerTodos();
|
||||
lsOrcaoConcedente = orgaocConcedenteService.obtenerTodos();
|
||||
|
@ -109,6 +122,16 @@ public class RelatorioTabelaPrecoController extends MyGenericForwardComposer {
|
|||
parametros.put("ORGAO_CONCEDENTE", orgaoConcedente.getDescOrgao());
|
||||
}
|
||||
|
||||
if (cmbOrigem.getSelectedItem() != null) {
|
||||
parametros.put("origemId", cmbOrigem.getSelectedObject().getParadaId());
|
||||
}
|
||||
|
||||
if (cmbDestino.getSelectedItem() != null) {
|
||||
parametros.put("destinoId", cmbDestino.getSelecteObject(Parada.class).getParadaId());
|
||||
}
|
||||
|
||||
parametros.put("isLayoutArtesp", chkLayoutArtesp.isChecked());
|
||||
|
||||
String rutaIds = "";
|
||||
String rutas = "";
|
||||
List<Ruta> lsLinhasSelecionadas = convertTypedList(linhaSelList.getData());
|
||||
|
@ -162,6 +185,22 @@ public class RelatorioTabelaPrecoController extends MyGenericForwardComposer {
|
|||
linhaSelList.addItemNovo(ruta);
|
||||
}
|
||||
|
||||
public void onChange$cmbOrigem(Event ev) {
|
||||
Parada origem = cmbOrigem.getSelectedObject();
|
||||
destinoList = paradaService.obterPossiveisDestinos(origem);
|
||||
cmbDestino.setModel(new ListModelList(destinoList));
|
||||
if (destinoList.isEmpty()) {
|
||||
cmbDestino.setSelectedIndex(-1);
|
||||
}
|
||||
|
||||
if (origem == null) {
|
||||
chkLayoutArtesp.setVisible(false);
|
||||
chkLayoutArtesp.setChecked(false);
|
||||
} else {
|
||||
chkLayoutArtesp.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void executarPesquisa() {
|
||||
HibernateSearchObject<Ruta> rutaBusqueda = new HibernateSearchObject<Ruta>(
|
||||
Ruta.class, pagingLinha.getPageSize());
|
||||
|
@ -176,6 +215,7 @@ public class RelatorioTabelaPrecoController extends MyGenericForwardComposer {
|
|||
OrgaoConcedente orgaoConcedente = (OrgaoConcedente) cmbOrgaoConcedente.getSelectedItem().getValue();
|
||||
rutaBusqueda.addFilterEqual("orgaoConcedente", orgaoConcedente);
|
||||
}
|
||||
|
||||
rutaBusqueda.addFilterILike("descruta", "%" + txtLinha.getValue() + "%");
|
||||
rutaBusqueda.addFilterEqual("activo", Boolean.TRUE);
|
||||
|
||||
|
@ -240,4 +280,8 @@ public class RelatorioTabelaPrecoController extends MyGenericForwardComposer {
|
|||
this.lsOrcaoConcedente = lsOrcaoConcedente;
|
||||
}
|
||||
|
||||
public List<Parada> getDestinoList() {
|
||||
return destinoList;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import org.zkoss.zul.Combobox;
|
|||
*
|
||||
* @author gleimar
|
||||
*/
|
||||
public class MyComboboxEstandar extends Combobox {
|
||||
public class MyComboboxEstandar extends Combobox {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -33,4 +33,11 @@ public class MyComboboxEstandar extends Combobox {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
public <T> T getSelecteObject(Class<T> cType) {
|
||||
if (this.getSelectedItem() != null) {
|
||||
return cType.cast(this.getSelectedItem().getValue());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import com.rjconsultores.ventaboletos.service.ParadaService;
|
|||
*
|
||||
* @author Administrador
|
||||
*/
|
||||
public class MyComboboxParada extends Combobox {
|
||||
public class MyComboboxParada extends Combobox {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static Logger log = Logger.getLogger(MyComboboxParada.class);
|
||||
|
@ -127,6 +127,13 @@ public class MyComboboxParada extends Combobox {
|
|||
|
||||
return super.getValue();
|
||||
}
|
||||
|
||||
public Parada getSelectedObject() {
|
||||
if (this.getSelectedItem() != null) {
|
||||
return (Parada) this.getSelectedItem().getValue();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isSinTodos() {
|
||||
return sinTodos;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# V. 1.4
|
||||
# V. 1.4
|
||||
# Para alterar esta planilha, seleccione Ferramentas | Planilhas
|
||||
# E abrir a planilha no editor.
|
||||
|
||||
|
@ -4527,6 +4527,7 @@ relatorioTabelaPrecoController.orgaoConcedente.value = Instituición Concedente
|
|||
relatorioTabelaPrecoController.lbEmpresa.value = Empresa
|
||||
relatorioTabelaPrecoController.lbLinha.value = Linea
|
||||
relatorioTabelaPrecoController.msg.informarLinha = Es obligatorio informar al menos una linea en el filtro.
|
||||
relatorioTabelaPrecoController.lbLayoutArtesp=Layout ARTESP
|
||||
|
||||
# Editar Motivo cancelación equivalencia
|
||||
editarMotivoCancelacionEquivalenciaController.window.title = Equivalencia motivo de cancelación
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# V. 1.4
|
||||
# V. 1.4
|
||||
# Para alterar esta planilha, selecione Ferramentas | Planilhas
|
||||
# E abrir a planilha no editor.
|
||||
|
||||
|
@ -4600,6 +4600,7 @@ relatorioTabelaPrecoController.orgaoConcedente.value = Orgão Concedente
|
|||
relatorioTabelaPrecoController.lbEmpresa.value = Empresa
|
||||
relatorioTabelaPrecoController.lbLinha.value = Linha
|
||||
relatorioTabelaPrecoController.msg.informarLinha = É obrigatório informar pelo menos uma linha no filtro.
|
||||
relatorioTabelaPrecoController.lbLayoutArtesp=Layout ARTESP
|
||||
|
||||
# Editar Motivo cancelamento equivalencia
|
||||
editarMotivoCancelacionEquivalenciaController.window.title = Equivalencia Motivo de Cancelamento
|
||||
|
|
|
@ -4,50 +4,58 @@
|
|||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winFiltroRelatorioTabelaPreco"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winFiltroRelatorioTabelaPreco"
|
||||
apply="${relatorioTabelaPrecoController}" contentStyle="overflow:auto"
|
||||
height="312px" width="550px" border="normal">
|
||||
height="312px" width="700px" border="normal">
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="25%" />
|
||||
<column width="30%" />
|
||||
<column width="15%" />
|
||||
<column width="30%" />
|
||||
<column width="11%" />
|
||||
<column width="36%" />
|
||||
<column width="17%" />
|
||||
<column width="36%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row spans="1,3">
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('relatorioTabelaPrecoController.vigencia')}" />
|
||||
<combobox id="cmbVigencia"
|
||||
buttonVisible="true"
|
||||
<combobox id="cmbVigencia" buttonVisible="true"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
model="@{winFiltroRelatorioTabelaPreco$composer.lsVigencia}"
|
||||
width="100%"
|
||||
constraint="no empty" />
|
||||
</row>
|
||||
<row spans="1,3">
|
||||
width="100%" constraint="no empty" />
|
||||
|
||||
<label
|
||||
value="${c:l('relatorioTabelaPrecoController.orgaoConcedente.value')}" />
|
||||
<combobox id="cmbOrgaoConcedente"
|
||||
buttonVisible="true"
|
||||
buttonVisible="true"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
model="@{winFiltroRelatorioTabelaPreco$composer.lsOrcaoConcedente}"
|
||||
width="100%" />
|
||||
</row>
|
||||
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('relatorioTabelaPrecoController.lbEmpresa.value')}" />
|
||||
<combobox id="cmbEmpresa"
|
||||
buttonVisible="true"
|
||||
<combobox id="cmbEmpresa" buttonVisible="true"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
model="@{winFiltroRelatorioTabelaPreco$composer.lsEmpresa}"
|
||||
width="100%"
|
||||
constraint="no empty" />
|
||||
width="100%" constraint="no empty" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label value="orgiem" />
|
||||
<combobox id="cmbOrigem" width="100%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada" />
|
||||
|
||||
<label value="destino" />
|
||||
<combobox id="cmbDestino" width="100%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
model="@{winFiltroRelatorioTabelaPreco$composer.destinoList}" />
|
||||
</row>
|
||||
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('relatorioTabelaPrecoController.lbLinha.value')}"/>
|
||||
value="${c:l('relatorioTabelaPrecoController.lbLinha.value')}" />
|
||||
<bandbox id="bbPesquisaLinha" width="100%"
|
||||
mold="rounded" readonly="true">
|
||||
<bandpopup>
|
||||
|
@ -66,8 +74,7 @@
|
|||
label="${c:l('relatorioCancelamentoVendaCartaoController.btnLimpar.label')}" />
|
||||
</hbox>
|
||||
<paging id="pagingLinha" pageSize="10" />
|
||||
<listbox id="linhaList"
|
||||
mold="paging"
|
||||
<listbox id="linhaList" mold="paging"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
vflex="true" height="100%" width="700px">
|
||||
<listhead>
|
||||
|
@ -95,6 +102,9 @@
|
|||
<toolbar>
|
||||
<button id="btnExecutarRelatorio" image="/gui/img/find.png"
|
||||
label="${c:l('relatorio.lb.btnExecutarRelatorio')}" />
|
||||
|
||||
<checkbox id="chkLayoutArtesp" visible="false"
|
||||
label="${c:l('relatorioTabelaPrecoController.lbLayoutArtesp')}" />
|
||||
</toolbar>
|
||||
</window>
|
||||
</zk>
|
||||
|
|
Loading…
Reference in New Issue