edgar 2016-08-09 14:00:40 +00:00
parent 7e2c6a8b2a
commit ee4456aaf8
4 changed files with 105 additions and 237 deletions

View File

@ -13,7 +13,7 @@ public class RelatorioTabelaPreco extends Relatorio {
public RelatorioTabelaPreco(final Map<String, Object> parametros, Connection conexao) throws Exception { public RelatorioTabelaPreco(final Map<String, Object> parametros, Connection conexao) throws Exception {
super(parametros, conexao); super(parametros, conexao);
this.setCustomDataSource(new ArrayDataSource(this) { this.setCustomDataSource(new ArrayDataSource(this) {
public void initDados() throws Exception { public void initDados() throws Exception {
@ -102,7 +102,7 @@ public class RelatorioTabelaPreco extends Relatorio {
sql.append(" AND r.ORGAOCONCEDENTE_ID = " + parametros.get("ORGAO_CONCEDENTE_ID")); sql.append(" AND r.ORGAOCONCEDENTE_ID = " + parametros.get("ORGAO_CONCEDENTE_ID"));
} }
sql.append( "ORDER BY r.RUTA_ID, vt.FECINICIOVIGENCIA "); sql.append( " ORDER BY r.RUTA_ID, vt.FECINICIOVIGENCIA ");
return sql.toString(); return sql.toString();
} }

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?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" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="c092ef85-9334-4225-93d7-1acb7cf4d021"> <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" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="c092ef85-9334-4225-93d7-1acb7cf4d021">
<property name="ireport.zoom" value="1.4641000000000008"/> <property name="ireport.zoom" value="1.000000000000023"/>
<property name="ireport.x" value="501"/> <property name="ireport.x" value="0"/>
<property name="ireport.y" value="39"/> <property name="ireport.y" value="0"/>
<property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2" value="pageHeader"/> <property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2" value="pageHeader"/>
<property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.1" value="columnHeader"/> <property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.1" value="columnHeader"/>
<parameter name="NOME_RELATORIO" class="java.lang.String"/> <parameter name="NOME_RELATORIO" class="java.lang.String"/>
@ -37,111 +37,78 @@
<group name="ruta"> <group name="ruta">
<groupExpression><![CDATA[$F{linha}]]></groupExpression> <groupExpression><![CDATA[$F{linha}]]></groupExpression>
<groupHeader> <groupHeader>
<band height="36"> <band height="40">
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement uuid="e3c11bc0-5229-4925-b7fe-6a1e572ce946" x="0" y="0" width="801" height="18"/> <reportElement uuid="e3c11bc0-5229-4925-b7fe-6a1e572ce946" x="0" y="0" width="801" height="18"/>
<box>
<bottomPen lineWidth="0.5"/>
</box>
<textElement> <textElement>
<font size="14" isBold="true" pdfFontName="Helvetica-Bold"/> <font size="12" isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{linha}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{linha}]]></textFieldExpression>
</textField> </textField>
<textField pattern="" isBlankWhenNull="false"> <textField pattern="" isBlankWhenNull="false">
<reportElement uuid="d332e48b-a0ae-4382-96bd-cf5c708b560b" mode="Transparent" x="396" y="18" width="65" height="18" forecolor="#000000" backcolor="#FFFFFF"/> <reportElement uuid="d332e48b-a0ae-4382-96bd-cf5c708b560b" mode="Transparent" x="396" y="22" width="65" height="18" forecolor="#000000" backcolor="#FFFFFF"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> <font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/> <paragraph lineSpacing="Single"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.tarifa}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.tarifa}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement uuid="5790b9cc-35da-4f6d-85da-66acc015483b" x="0" y="18" width="151" height="18" isPrintWhenDetailOverflows="true"/> <reportElement uuid="5790b9cc-35da-4f6d-85da-66acc015483b" x="0" y="22" width="151" height="18" isPrintWhenDetailOverflows="true"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top"> <textElement textAlignment="Center" verticalAlignment="Top">
<font size="10"/> <font size="10" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.origem}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.origem}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="cc799fe5-534d-457f-bd27-6bd4f751e9f1" x="721" y="18" width="81" height="18"/> <reportElement uuid="cc799fe5-534d-457f-bd27-6bd4f751e9f1" x="721" y="22" width="81" height="18"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="10"/> <font size="10" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.total}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.total}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="ac55c68a-58e3-4b69-a6f0-eba5cfb4e222" x="526" y="18" width="65" height="18"/> <reportElement uuid="ac55c68a-58e3-4b69-a6f0-eba5cfb4e222" x="526" y="22" width="65" height="18"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="10"/> <font size="10" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.taxaEmbarque}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.taxaEmbarque}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="ddc57a6d-d56b-418a-967d-c0b99ef3c047" x="591" y="18" width="65" height="18"/> <reportElement uuid="ddc57a6d-d56b-418a-967d-c0b99ef3c047" x="591" y="22" width="65" height="18"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="10"/> <font size="10" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.seguro}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.seguro}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="d49e2013-dad9-4eda-9663-d4541c736bb8" x="656" y="18" width="65" height="18"/> <reportElement uuid="d49e2013-dad9-4eda-9663-d4541c736bb8" x="656" y="22" width="65" height="18"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="10"/> <font size="10" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.outros}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.outros}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="5231cff6-33f4-4afb-bdc1-e1bbc5fd27f8" x="302" y="18" width="94" height="18"/> <reportElement uuid="5231cff6-33f4-4afb-bdc1-e1bbc5fd27f8" x="302" y="22" width="94" height="18"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top"> <textElement textAlignment="Center" verticalAlignment="Top">
<font size="10"/> <font size="10" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.tipoClasse}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.tipoClasse}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="70beacf1-7122-49dc-bcde-524300505ee5" x="461" y="18" width="65" height="18"/> <reportElement uuid="70beacf1-7122-49dc-bcde-524300505ee5" x="461" y="22" width="65" height="18"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="10"/> <font size="10" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.pedagio}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.pedagio}]]></textFieldExpression>
</textField> </textField>
<textField pattern="" isBlankWhenNull="false"> <textField pattern="" isBlankWhenNull="false">
<reportElement uuid="0b205a4d-6128-4dac-bbd9-eb03ec6f3618" mode="Transparent" x="151" y="18" width="151" height="18" forecolor="#000000" backcolor="#FFFFFF"/> <reportElement uuid="0b205a4d-6128-4dac-bbd9-eb03ec6f3618" mode="Transparent" x="151" y="22" width="151" height="18" forecolor="#000000" backcolor="#FFFFFF"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none"> <textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> <font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/> <paragraph lineSpacing="Single"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.destino}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.destino}]]></textFieldExpression>
@ -153,32 +120,32 @@
<groupExpression><![CDATA[$F{dataVigenciaInicial}]]></groupExpression> <groupExpression><![CDATA[$F{dataVigenciaInicial}]]></groupExpression>
</group> </group>
<title> <title>
<band height="130"> <band height="69">
<textField pattern="" isBlankWhenNull="false"> <textField pattern="" isBlankWhenNull="false">
<reportElement uuid="136a5066-d141-4362-af36-0780f0d16542" mode="Transparent" x="0" y="0" width="457" height="35" forecolor="#000000" backcolor="#FFFFFF"/> <reportElement uuid="136a5066-d141-4362-af36-0780f0d16542" mode="Transparent" x="0" y="0" width="563" height="25" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> <font fontName="SansSerif" size="14" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/> <paragraph lineSpacing="Single"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$P{NOME_RELATORIO}]]></textFieldExpression> <textFieldExpression><![CDATA[$P{NOME_RELATORIO}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="a9d471fb-1e1d-4d9a-9783-bbf988931192" x="615" y="0" width="100" height="25"/> <reportElement uuid="a9d471fb-1e1d-4d9a-9783-bbf988931192" x="656" y="0" width="65" height="25"/>
<textElement textAlignment="Right"> <textElement textAlignment="Right">
<font size="9" isBold="true"/> <font size="8" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{cabecalho.dataHora}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{cabecalho.dataHora}]]></textFieldExpression>
</textField> </textField>
<textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="false"> <textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="false">
<reportElement uuid="0d200750-aabf-4c7e-b27b-c0e7af4802a9" mode="Transparent" x="715" y="0" width="86" height="25" forecolor="#000000" backcolor="#FFFFFF"/> <reportElement uuid="0d200750-aabf-4c7e-b27b-c0e7af4802a9" mode="Transparent" x="721" y="0" width="80" height="25" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> <font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/> <paragraph lineSpacing="Single"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField> </textField>
<textField pattern="" isBlankWhenNull="false"> <textField pattern="" isBlankWhenNull="false">
<reportElement uuid="bae9bec6-8c42-4bee-a070-34b0a7f1aee4" mode="Transparent" x="668" y="26" width="112" height="15" forecolor="#000000" backcolor="#FFFFFF"/> <reportElement uuid="bae9bec6-8c42-4bee-a070-34b0a7f1aee4" mode="Transparent" x="711" y="27" width="70" height="13" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> <font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/> <paragraph lineSpacing="Single"/>
@ -186,7 +153,7 @@
<textFieldExpression><![CDATA[$R{cabecalho.pagina}+" "+$V{PAGE_NUMBER}+" "+$R{cabecalho.de}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{cabecalho.pagina}+" "+$V{PAGE_NUMBER}+" "+$R{cabecalho.de}]]></textFieldExpression>
</textField> </textField>
<textField evaluationTime="Report" pattern="" isBlankWhenNull="false"> <textField evaluationTime="Report" pattern="" isBlankWhenNull="false">
<reportElement uuid="314e312c-8f24-42de-8354-3c1f7241a985" mode="Transparent" x="781" y="26" width="20" height="15" forecolor="#000000" backcolor="#FFFFFF"/> <reportElement uuid="314e312c-8f24-42de-8354-3c1f7241a985" mode="Transparent" x="781" y="27" width="20" height="13" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none"> <textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> <font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/> <paragraph lineSpacing="Single"/>
@ -194,270 +161,159 @@
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField> </textField>
<textField pattern="" isBlankWhenNull="false"> <textField pattern="" isBlankWhenNull="false">
<reportElement uuid="4e030613-9cee-443e-9eaa-b19fa3090976" mode="Transparent" x="701" y="42" width="100" height="15" forecolor="#000000" backcolor="#FFFFFF"/> <reportElement uuid="4e030613-9cee-443e-9eaa-b19fa3090976" mode="Transparent" x="563" y="0" width="93" height="25" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> <font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/> <paragraph lineSpacing="Single"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{cabecalho.impressorPor}+" "+$P{USUARIO}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{cabecalho.impressorPor}+" "+$P{USUARIO}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement uuid="64027797-62dc-4e02-8e40-958ac1511e0a" x="0" y="57" width="102" height="18" isPrintWhenDetailOverflows="true"/> <reportElement uuid="64027797-62dc-4e02-8e40-958ac1511e0a" x="0" y="27" width="62" height="13" isPrintWhenDetailOverflows="true"/>
<box> <box>
<bottomPen lineWidth="0.0"/> <bottomPen lineWidth="0.0"/>
</box> </box>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Justified" verticalAlignment="Top">
<font size="10" isBold="true" pdfFontName="Helvetica-Bold"/> <font size="9" isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.empresa} + ":"]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.empresa} + ":"]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="bcd47f18-94dc-4d33-96db-6d89795188d3" x="102" y="57" width="699" height="18"/> <reportElement uuid="bcd47f18-94dc-4d33-96db-6d89795188d3" x="62" y="27" width="148" height="13"/>
<textElement/> <textElement>
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$P{EMPRESA_ID} == null ? <textFieldExpression><![CDATA[$P{EMPRESA_ID} == null ?
"Todas" : "Todas" :
($P{EMPRESA_ID}.toString() + " - " + $P{EMPRESA})]]></textFieldExpression> ($P{EMPRESA_ID}.toString() + " - " + $P{EMPRESA})]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement uuid="049832ef-f634-42f9-95b1-ac2e1fe23b10" x="0" y="112" width="102" height="18" isPrintWhenDetailOverflows="true"/> <reportElement uuid="049832ef-f634-42f9-95b1-ac2e1fe23b10" x="0" y="40" width="62" height="13" isPrintWhenDetailOverflows="true"/>
<box> <box>
<bottomPen lineWidth="0.0"/> <bottomPen lineWidth="0.0"/>
</box> </box>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement verticalAlignment="Top">
<font size="10" isBold="true" pdfFontName="Helvetica-Bold"/> <font size="9" isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.linha} + ":"]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.linha} + ":"]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement uuid="df6b8946-988c-479c-8eeb-c8d40c94734b" x="102" y="112" width="586" height="18"/> <reportElement uuid="df6b8946-988c-479c-8eeb-c8d40c94734b" x="62" y="40" width="739" height="13"/>
<textElement/> <textElement>
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$P{LINHAS}]]></textFieldExpression> <textFieldExpression><![CDATA[$P{LINHAS}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement uuid="2d048310-1ec5-4711-b402-75ef3d3500d4" x="0" y="76" width="102" height="18" isPrintWhenDetailOverflows="true"/> <reportElement uuid="2d048310-1ec5-4711-b402-75ef3d3500d4" x="210" y="27" width="75" height="13" isPrintWhenDetailOverflows="true"/>
<box> <box>
<bottomPen lineWidth="0.0"/> <bottomPen lineWidth="0.0"/>
</box> </box>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="10" isBold="true" pdfFontName="Helvetica-Bold"/> <font size="9" isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.dataVigencia} + ":"]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.dataVigencia} + ":"]]></textFieldExpression>
</textField> </textField>
<textField pattern="dd/MM/yyyy"> <textField pattern="dd/MM/yyyy">
<reportElement uuid="40c47b73-ef86-4b76-a4bb-ec284d4e6f59" x="102" y="76" width="70" height="18"> <reportElement uuid="40c47b73-ef86-4b76-a4bb-ec284d4e6f59" x="285" y="27" width="70" height="13">
<printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} != null)]]></printWhenExpression> <printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} != null)]]></printWhenExpression>
</reportElement> </reportElement>
<textElement textAlignment="Right"/> <textElement textAlignment="Right">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$P{VIGENCIA_INICIAL}]]></textFieldExpression> <textFieldExpression><![CDATA[$P{VIGENCIA_INICIAL}]]></textFieldExpression>
</textField> </textField>
<textField pattern="dd/MM/yyyy"> <textField pattern="dd/MM/yyyy">
<reportElement uuid="12564f32-d986-46a6-a184-23b23ba50bcb" x="190" y="76" width="70" height="18"> <reportElement uuid="12564f32-d986-46a6-a184-23b23ba50bcb" x="373" y="27" width="70" height="13">
<printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} != null)]]></printWhenExpression> <printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} != null)]]></printWhenExpression>
</reportElement> </reportElement>
<textElement/> <textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$P{VIGENCIA_FINAL}]]></textFieldExpression> <textFieldExpression><![CDATA[$P{VIGENCIA_FINAL}]]></textFieldExpression>
</textField> </textField>
<staticText> <staticText>
<reportElement uuid="bdfc1a2c-9e77-418f-8169-50c67ad7f116" x="172" y="76" width="18" height="18"> <reportElement uuid="bdfc1a2c-9e77-418f-8169-50c67ad7f116" x="355" y="27" width="18" height="12">
<printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} != null)]]></printWhenExpression> <printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} != null)]]></printWhenExpression>
</reportElement> </reportElement>
<textElement textAlignment="Center"/> <textElement textAlignment="Center">
<font size="9"/>
</textElement>
<text><![CDATA[à]]></text> <text><![CDATA[à]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement uuid="1bba53bd-7d81-491b-b1de-11a0c570c5c7" x="102" y="76" width="158" height="18"> <reportElement uuid="1bba53bd-7d81-491b-b1de-11a0c570c5c7" x="285" y="27" width="158" height="13">
<printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} == null)]]></printWhenExpression> <printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} == null)]]></printWhenExpression>
</reportElement> </reportElement>
<textElement/> <textElement>
<font size="9"/>
</textElement>
<text><![CDATA[Todas]]></text> <text><![CDATA[Todas]]></text>
</staticText> </staticText>
<textField> <textField>
<reportElement uuid="82e75550-fae7-4cea-acf9-f9f56f083400" x="688" y="93" width="93" height="18"> <reportElement uuid="0241b100-99d6-4e53-abd1-0154defc75bc" x="537" y="27" width="174" height="13"/>
<printWhenExpression><![CDATA[false]]></printWhenExpression> <textElement>
</reportElement> <font size="9"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="10"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.empresa}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="abf746f7-be60-48af-9882-6723c50f4ae1" x="688" y="75" width="93" height="20">
<printWhenExpression><![CDATA[false]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{empresa}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="0241b100-99d6-4e53-abd1-0154defc75bc" x="102" y="94" width="586" height="18"/>
<textElement/>
<textFieldExpression><![CDATA[$P{ORGAO_CONCEDENTE_ID} == null ? <textFieldExpression><![CDATA[$P{ORGAO_CONCEDENTE_ID} == null ?
"Todas" : $P{ORGAO_CONCEDENTE}]]></textFieldExpression> "Todas" : $P{ORGAO_CONCEDENTE}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement uuid="afabe5dc-df90-4120-a42a-af1d3e6df583" x="0" y="94" width="102" height="18" isPrintWhenDetailOverflows="true"/> <reportElement uuid="afabe5dc-df90-4120-a42a-af1d3e6df583" x="444" y="27" width="93" height="13" isPrintWhenDetailOverflows="true"/>
<box> <box>
<bottomPen lineWidth="0.0"/> <bottomPen lineWidth="0.0"/>
</box> </box>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement verticalAlignment="Top">
<font size="10" isBold="true" pdfFontName="Helvetica-Bold"/> <font size="9" isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.orgacaoConcedente} + ":"]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.orgacaoConcedente} + ":"]]></textFieldExpression>
</textField> </textField>
</band> </band>
</title> </title>
<columnHeader>
<band height="18" splitType="Stretch">
<textField isStretchWithOverflow="true">
<reportElement uuid="337f441e-ca7f-402c-8407-f3406ec2b4b0" x="0" y="0" width="151" height="18" isPrintWhenDetailOverflows="true"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.origem}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="859d4892-377e-4313-8a88-6454a88ce936" x="656" y="0" width="65" height="18"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Top">
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.outros}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="d9a2225c-8883-4a35-9c16-8af9bcfe6577" x="461" y="0" width="65" height="18"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Top">
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.pedagio}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="0583701e-920a-473b-b1e4-6137f8d022df" mode="Transparent" x="396" y="0" width="65" height="18" forecolor="#000000" backcolor="#FFFFFF"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.tarifa}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="f9ea7239-48e1-4207-b957-dc4aadcaa590" mode="Transparent" x="151" y="0" width="151" height="18" forecolor="#000000" backcolor="#FFFFFF"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.destino}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="876fa163-5ff5-4eef-b32c-0f5b6b40672c" x="526" y="0" width="65" height="18"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Top">
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.taxaEmbarque}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="77a2f088-9771-472c-bffe-cd1345050e51" x="591" y="0" width="65" height="18"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Top">
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.seguro}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="8506ac47-d72f-4ef5-b53a-da3970fb7edc" x="302" y="0" width="94" height="18"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.tipoClasse}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="5860d60c-cf3f-4f05-a3e4-756baba65aba" x="721" y="0" width="81" height="18"/>
<box>
<topPen lineWidth="1.0"/>
<bottomPen lineWidth="0.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Top">
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.total}]]></textFieldExpression>
</textField>
</band>
</columnHeader>
<detail> <detail>
<band height="20" splitType="Stretch"> <band height="32" splitType="Stretch">
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement uuid="4a0efda0-b112-4092-8164-292ab7fb1950" x="0" y="0" width="151" height="20"/> <reportElement uuid="4a0efda0-b112-4092-8164-292ab7fb1950" x="0" y="2" width="151" height="20"/>
<textElement textAlignment="Center"/> <textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{origem}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{origem}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement uuid="f544e769-3f8c-4200-86ed-01f6c4024334" x="151" y="0" width="151" height="20"/> <reportElement uuid="f544e769-3f8c-4200-86ed-01f6c4024334" x="151" y="2" width="151" height="20"/>
<textElement textAlignment="Center"/> <textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{destino}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{destino}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00"> <textField isStretchWithOverflow="true" pattern="#,##0.00">
<reportElement uuid="b81fcb18-2337-4514-be27-fe7d3c88acc5" x="396" y="0" width="65" height="20"/> <reportElement uuid="b81fcb18-2337-4514-be27-fe7d3c88acc5" x="396" y="2" width="65" height="20"/>
<textElement textAlignment="Right"/> <textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{tarifa}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{tarifa}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00"> <textField isStretchWithOverflow="true" pattern="#,##0.00">
<reportElement uuid="8a545d22-875e-46cd-8011-444a8e884bca" x="461" y="0" width="65" height="20"/> <reportElement uuid="8a545d22-875e-46cd-8011-444a8e884bca" x="461" y="2" width="65" height="20"/>
<textElement textAlignment="Right"/> <textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{pedagio}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{pedagio}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00"> <textField isStretchWithOverflow="true" pattern="#,##0.00">
<reportElement uuid="6f76912d-0eef-439c-9fb8-236181d94033" x="656" y="0" width="65" height="20"/> <reportElement uuid="6f76912d-0eef-439c-9fb8-236181d94033" x="656" y="2" width="65" height="20"/>
<textElement textAlignment="Right"/> <textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{outros}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{outros}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00"> <textField isStretchWithOverflow="true" pattern="#,##0.00">
<reportElement uuid="ac958e4e-b8ad-4abc-b58a-1aaca4992db6" x="526" y="0" width="65" height="20"/> <reportElement uuid="ac958e4e-b8ad-4abc-b58a-1aaca4992db6" x="526" y="2" width="65" height="20"/>
<textElement textAlignment="Right"/> <textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{taxaEmbarque}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{taxaEmbarque}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00"> <textField isStretchWithOverflow="true" pattern="#,##0.00">
<reportElement uuid="72858663-765d-4843-bc51-ec6a80a0b7d0" x="591" y="0" width="65" height="20"/> <reportElement uuid="72858663-765d-4843-bc51-ec6a80a0b7d0" x="591" y="2" width="65" height="20"/>
<textElement textAlignment="Right"/> <textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{seguro}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{seguro}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement uuid="11f32d65-9824-47f6-95f5-482cce626d4b" x="302" y="0" width="94" height="20"/> <reportElement uuid="11f32d65-9824-47f6-95f5-482cce626d4b" x="302" y="2" width="94" height="20"/>
<textElement textAlignment="Center"/> <textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{tipoClasse}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{tipoClasse}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00"> <textField isStretchWithOverflow="true" pattern="#,##0.00">
<reportElement uuid="722229cf-1b78-459d-92fc-1a30615054a2" x="721" y="0" width="81" height="20"/> <reportElement uuid="722229cf-1b78-459d-92fc-1a30615054a2" x="721" y="2" width="81" height="20"/>
<textElement textAlignment="Right"/> <textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{tarifa}.doubleValue() + <textFieldExpression><![CDATA[$F{tarifa}.doubleValue() +
$F{pedagio}.doubleValue() + $F{pedagio}.doubleValue() +
@ -468,9 +324,9 @@ $F{outros}.doubleValue()]]></textFieldExpression>
</band> </band>
</detail> </detail>
<noData> <noData>
<band height="26"> <band height="28">
<textField> <textField>
<reportElement uuid="6f13c961-dd50-4e44-ba73-65e0752b8b83" x="-101" y="0" width="802" height="26"/> <reportElement uuid="6f13c961-dd50-4e44-ba73-65e0752b8b83" x="0" y="2" width="801" height="26"/>
<textElement textAlignment="Center" markup="none"> <textElement textAlignment="Center" markup="none">
<font size="11" isBold="true"/> <font size="11" isBold="true"/>
</textElement> </textElement>

View File

@ -5,7 +5,9 @@ import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.sql.DataSource; import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -15,6 +17,7 @@ import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Comboitem; import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Paging; import org.zkoss.zul.Paging;
import com.rjconsultores.ventaboletos.entidad.Empresa; import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente; import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
import com.rjconsultores.ventaboletos.entidad.Ruta; import com.rjconsultores.ventaboletos.entidad.Ruta;
@ -100,14 +103,19 @@ public class RelatorioTabelaPrecoController extends MyGenericForwardComposer {
parametros.put("EMPRESA", empresa.getNombempresa()); parametros.put("EMPRESA", empresa.getNombempresa());
} }
if (cmbOrgaoConcedente.getSelectedItem() != null) {
OrgaoConcedente orgaoConcedente = (OrgaoConcedente) cmbOrgaoConcedente.getSelectedItem().getValue();
parametros.put("ORGAO_CONCEDENTE_ID", orgaoConcedente.getOrgaoConcedenteId());
parametros.put("ORGAO_CONCEDENTE", orgaoConcedente.getDescOrgao());
}
String rutaIds = ""; String rutaIds = "";
String rutas = ""; String rutas = "";
List<Ruta> lsLinhasSelecionadas = convertTypedList(linhaSelList.getData()); List<Ruta> lsLinhasSelecionadas = convertTypedList(linhaSelList.getData());
if (lsLinhasSelecionadas.isEmpty()) { if (lsLinhasSelecionadas.isEmpty()) {
rutas = "Todas"; rutas = "Todas";
} } else {
else {
for (int i = 0; i < lsLinhasSelecionadas.size(); i++) { for (int i = 0; i < lsLinhasSelecionadas.size(); i++) {
Ruta ruta = lsLinhasSelecionadas.get(i); Ruta ruta = lsLinhasSelecionadas.get(i);
rutas += ruta.getDescruta() + ", "; rutas += ruta.getDescruta() + ", ";
@ -163,6 +171,11 @@ public class RelatorioTabelaPrecoController extends MyGenericForwardComposer {
Empresa empresa = (Empresa) itemEmpresa.getValue(); Empresa empresa = (Empresa) itemEmpresa.getValue();
rutaBusqueda.addFilterEqual("lsRutaEmpresa.empresa", empresa); rutaBusqueda.addFilterEqual("lsRutaEmpresa.empresa", empresa);
} }
if (cmbOrgaoConcedente.getSelectedItem() != null) {
OrgaoConcedente orgaoConcedente = (OrgaoConcedente) cmbOrgaoConcedente.getSelectedItem().getValue();
rutaBusqueda.addFilterEqual("orgaoConcedente", orgaoConcedente);
}
rutaBusqueda.addFilterILike("descruta", "%" + txtLinha.getValue() + "%"); rutaBusqueda.addFilterILike("descruta", "%" + txtLinha.getValue() + "%");
rutaBusqueda.addFilterEqual("activo", Boolean.TRUE); rutaBusqueda.addFilterEqual("activo", Boolean.TRUE);
@ -173,8 +186,7 @@ public class RelatorioTabelaPrecoController extends MyGenericForwardComposer {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("relatorioTabelaPrecoController.window.title"), Labels.getLabel("relatorioTabelaPrecoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION); Messagebox.OK, Messagebox.INFORMATION);
} } catch (InterruptedException ex) {
catch (InterruptedException ex) {
ex.printStackTrace(); ex.printStackTrace();
} }
} }