fixed bug #7112 - correções relatório tabela de preço

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@53250 d1611594-4594-4d17-8e1d-87c2c4800839
master
frederico 2016-02-24 20:21:23 +00:00
parent ad48df929a
commit a5e5b01c3c
3 changed files with 40 additions and 24 deletions

View File

@ -35,7 +35,8 @@ public class RelatorioTabelaPreco extends Relatorio {
dataResult.put("tipoClasse", rset.getString("tipoClasse")); dataResult.put("tipoClasse", rset.getString("tipoClasse"));
dataResult.put("linha", rset.getString("linha")); dataResult.put("linha", rset.getString("linha"));
dataResult.put("empresa", rset.getString("empresa")); dataResult.put("empresa", rset.getString("empresa"));
dataResult.put("dataVigencia", rset.getString("dataVigencia")); dataResult.put("dataVigenciaInicial", rset.getDate("dataVigenciaInicial"));
dataResult.put("dataVigenciaFinal", rset.getDate("dataVigenciaFinal"));
dataResult.put("idLinha", rset.getInt("idLinha")); dataResult.put("idLinha", rset.getInt("idLinha"));
dataResult.put("idVigencia", rset.getInt("idVigencia")); dataResult.put("idVigencia", rset.getInt("idVigencia"));
@ -64,7 +65,8 @@ public class RelatorioTabelaPreco extends Relatorio {
sql.append(" cs.DESCCLASE as tipoClasse, "); sql.append(" cs.DESCCLASE as tipoClasse, ");
sql.append(" r.DESCRUTA as linha, "); sql.append(" r.DESCRUTA as linha, ");
sql.append(" e.NOMBEMPRESA as empresa, "); sql.append(" e.NOMBEMPRESA as empresa, ");
sql.append(" vt.FECINICIOVIGENCIA || ' à ' || vt.FECFINVIGENCIA as dataVigencia, "); sql.append(" vt.FECINICIOVIGENCIA as dataVigenciaInicial, ");
sql.append(" vt.FECFINVIGENCIA as dataVigenciaFinal, ");
sql.append(" vt.VIGENCIATARIFA_ID as idVigencia, "); sql.append(" vt.VIGENCIATARIFA_ID as idVigencia, ");
sql.append(" vt.FECINICIOVIGENCIA as dataVigenciaInicial, "); sql.append(" vt.FECINICIOVIGENCIA as dataVigenciaInicial, ");
sql.append(" r.RUTA_ID as idLinha "); sql.append(" r.RUTA_ID as idLinha ");
@ -76,7 +78,7 @@ public class RelatorioTabelaPreco extends Relatorio {
sql.append("INNER JOIN MARCA m ON m.MARCA_ID = t.MARCA_ID "); sql.append("INNER JOIN MARCA m ON m.MARCA_ID = t.MARCA_ID ");
sql.append("INNER JOIN EMPRESA e ON e.EMPRESA_ID = m.EMPRESA_ID "); sql.append("INNER JOIN EMPRESA e ON e.EMPRESA_ID = m.EMPRESA_ID ");
sql.append("INNER JOIN VIGENCIA_TARIFA vt ON vt.VIGENCIATARIFA_ID = t.VIGENCIATARIFA_ID "); sql.append("INNER JOIN VIGENCIA_TARIFA vt ON vt.VIGENCIATARIFA_ID = t.VIGENCIATARIFA_ID ");
sql.append("WHERE (1 = 1) AND ROWNUM < 101 "); sql.append("WHERE (1 = 1) ");
if(parametros.get("VIGENCIA_ID") != null){ if(parametros.get("VIGENCIA_ID") != null){
sql.append(" AND vt.VIGENCIATARIFA_ID = " + parametros.get("VIGENCIA_ID")); sql.append(" AND vt.VIGENCIATARIFA_ID = " + parametros.get("VIGENCIA_ID"));

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.5"/> <property name="ireport.zoom" value="1.3636363636363642"/>
<property name="ireport.x" value="0"/> <property name="ireport.x" value="0"/>
<property name="ireport.y" value="68"/> <property name="ireport.y" value="2"/>
<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"/>
@ -27,7 +27,8 @@
<field name="tipoClasse" class="java.lang.String"/> <field name="tipoClasse" class="java.lang.String"/>
<field name="linha" class="java.lang.String"/> <field name="linha" class="java.lang.String"/>
<field name="empresa" class="java.lang.String"/> <field name="empresa" class="java.lang.String"/>
<field name="dataVigencia" 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="taxaEmbarque" class="java.math.BigDecimal"/>
<field name="idVigencia" class="java.lang.Integer"/> <field name="idVigencia" class="java.lang.Integer"/>
<field name="idLinha" class="java.lang.Integer"/> <field name="idLinha" class="java.lang.Integer"/>
@ -36,31 +37,45 @@
<groupHeader> <groupHeader>
<band height="18"> <band height="18">
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement uuid="e3c11bc0-5229-4925-b7fe-6a1e572ce946" x="0" y="0" width="559" height="18"/> <reportElement uuid="e3c11bc0-5229-4925-b7fe-6a1e572ce946" x="0" y="0" width="801" height="18"/>
<textElement> <textElement>
<font size="14" isBold="true" pdfFontName="Helvetica-Bold"/> <font size="14" isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{idLinha}.toString() + " - " + $F{linha}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{linha}]]></textFieldExpression>
</textField> </textField>
</band> </band>
</groupHeader> </groupHeader>
</group> </group>
<group name="vigencia"> <group name="vigencia">
<groupExpression><![CDATA[$F{dataVigencia}]]></groupExpression> <groupExpression><![CDATA[$F{dataVigenciaInicial}]]></groupExpression>
<groupHeader> <groupHeader>
<band height="18"> <band height="18">
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy"> <textField isStretchWithOverflow="true" pattern="dd/MM/yyyy">
<reportElement uuid="5c9ae216-19d0-48f6-a405-6ee51dcd55ef" x="0" y="0" width="322" height="18"/> <reportElement uuid="5c9ae216-19d0-48f6-a405-6ee51dcd55ef" x="0" y="0" width="70" height="18"/>
<textElement> <textElement textAlignment="Right">
<font size="9" isBold="true" pdfFontName="Helvetica-Bold"/> <font size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{dataVigencia}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{dataVigenciaInicial}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="05d39912-0360-4e0c-9ee8-9c69b2e24e6a" x="70" y="0" width="18" height="18"/>
<textElement textAlignment="Center">
<font isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement>
<text><![CDATA[à]]></text>
</staticText>
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy">
<reportElement uuid="0aa7a9a4-d0f4-40ac-b0f7-39300e76f184" x="88" y="0" width="70" height="18"/>
<textElement>
<font size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression><![CDATA[$F{dataVigenciaFinal}]]></textFieldExpression>
</textField> </textField>
</band> </band>
</groupHeader> </groupHeader>
</group> </group>
<title> <title>
<band height="124"> <band height="119">
<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="457" height="35" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
@ -119,11 +134,11 @@
<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="513" height="18"/> <reportElement uuid="bcd47f18-94dc-4d33-96db-6d89795188d3" x="102" y="57" width="699" height="18"/>
<textElement/> <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="75" width="102" height="18" isPrintWhenDetailOverflows="true"/> <reportElement uuid="049832ef-f634-42f9-95b1-ac2e1fe23b10" x="0" y="75" width="102" height="18" isPrintWhenDetailOverflows="true"/>
@ -136,11 +151,10 @@
<textFieldExpression><![CDATA[$R{label.linha} + ":"]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.linha} + ":"]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="df6b8946-988c-479c-8eeb-c8d40c94734b" x="102" y="75" width="511" height="18"/> <reportElement uuid="df6b8946-988c-479c-8eeb-c8d40c94734b" x="102" y="75" width="586" height="18"/>
<textElement/> <textElement/>
<textFieldExpression><![CDATA[$P{RUTA_ID} == null ? <textFieldExpression><![CDATA[$P{RUTA_ID} == null ?
"Todas" : "Todas" : $P{RUTA}]]></textFieldExpression>
($P{RUTA_ID}.toString() + " - " + $P{RUTA})]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement uuid="2d048310-1ec5-4711-b402-75ef3d3500d4" x="0" y="93" width="102" height="18" isPrintWhenDetailOverflows="true"/> <reportElement uuid="2d048310-1ec5-4711-b402-75ef3d3500d4" x="0" y="93" width="102" height="18" isPrintWhenDetailOverflows="true"/>
@ -153,28 +167,28 @@
<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="93" width="56" height="18"> <reportElement uuid="40c47b73-ef86-4b76-a4bb-ec284d4e6f59" x="102" y="93" width="70" height="18">
<printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} != null)]]></printWhenExpression> <printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} != null)]]></printWhenExpression>
</reportElement> </reportElement>
<textElement/> <textElement textAlignment="Right"/>
<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="176" y="93" width="56" height="18"> <reportElement uuid="12564f32-d986-46a6-a184-23b23ba50bcb" x="190" y="93" width="70" height="18">
<printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} != null)]]></printWhenExpression> <printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} != null)]]></printWhenExpression>
</reportElement> </reportElement>
<textElement/> <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="158" y="93" width="18" height="18"> <reportElement uuid="bdfc1a2c-9e77-418f-8169-50c67ad7f116" x="172" y="93" width="18" height="18">
<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"/>
<text><![CDATA[à]]></text> <text><![CDATA[à]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement uuid="1bba53bd-7d81-491b-b1de-11a0c570c5c7" x="102" y="93" width="130" height="18"> <reportElement uuid="1bba53bd-7d81-491b-b1de-11a0c570c5c7" x="102" y="93" width="158" height="18">
<printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} == null)]]></printWhenExpression> <printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} == null)]]></printWhenExpression>
</reportElement> </reportElement>
<textElement/> <textElement/>