fixes bug#18345

dev:fabio.faria 
qua:Débora
Ajustes na ordenação na consulta e acrescentei no nome da linha o valor Ida ou Volta.

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@100544 d1611594-4594-4d17-8e1d-87c2c4800839
master
guilherme.lopes 2020-03-06 14:07:52 +00:00
parent 39279e77dc
commit 8b835a0704
2 changed files with 14 additions and 12 deletions

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="RelatorioResumoLinhas" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isFloatColumnFooter="true" uuid="efbc89d4-6f08-4ea5-802f-d4f48ed208e2"> <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="RelatorioResumoLinhas" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isFloatColumnFooter="true" uuid="efbc89d4-6f08-4ea5-802f-d4f48ed208e2">
<property name="ireport.zoom" value="1.7715610000000084"/> <property name="ireport.zoom" value="3.138428376721017"/>
<property name="ireport.x" value="0"/> <property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/> <property name="ireport.y" value="332"/>
<style name="textStyle" isDefault="true" fontSize="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false"/> <style name="textStyle" isDefault="true" fontSize="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
<style name="table"> <style name="table">
<box> <box>
@ -48,7 +48,7 @@
FROM ( FROM (
SELECT TAB.RUTA_ID, TAB.NUMRUTA, TAB.DESCRUTA, TAB.TARIFA, TAB.ASSENTOS, TAB.ROLOPERATIVO_ID, SELECT TAB.INDSENTIDOIDA, TAB.RUTA_ID, TAB.NUMRUTA, TAB.DESCRUTA, TAB.TARIFA, TAB.ASSENTOS, TAB.ROLOPERATIVO_ID,
TAB.INTERESTADUAL, TAB.GRUPO_LINHA, TAB.EXTENSAO_KM, TAB.CVE_CLASE_SERVICIO, TAB.INTERESTADUAL, TAB.GRUPO_LINHA, TAB.EXTENSAO_KM, TAB.CVE_CLASE_SERVICIO,
SUM(NVL(TAB.RECEITA_SEGURO,0)) AS RECEITA_SEGURO, SUM(NVL(TAB.RECEITA_BAGAGEM,0)) AS RECEITA_BAGAGEM, SUM(NVL(TAB.RECEITA_SEGURO,0)) AS RECEITA_SEGURO, SUM(NVL(TAB.RECEITA_BAGAGEM,0)) AS RECEITA_BAGAGEM,
SUM(NVL(TAB.RECEITA_SEGURO_OUTROS,0)) AS RECEITA_SEGURO_OUTROS, SUM(NVL(TAB.RECEITA_TARIFA,0)) AS RECEITA_TARIFA, SUM(NVL(TAB.RECEITA_SEGURO_OUTROS,0)) AS RECEITA_SEGURO_OUTROS, SUM(NVL(TAB.RECEITA_TARIFA,0)) AS RECEITA_TARIFA,
@ -71,9 +71,10 @@ FROM (SELECT TAB1.*,
GROUP BY CO.FECCORRIDA, CO.RUTA_ID, BO.PRECIOBASE, BO.NUMKMVIAJE) PE GROUP BY CO.FECCORRIDA, CO.RUTA_ID, BO.PRECIOBASE, BO.NUMKMVIAJE) PE
WHERE PE.FECCORRIDA = TAB1.FECCORRIDA AND PE.RUTA_ID = TAB1.RUTA_ID) PASSAGEIROS_EQUIVALENTE WHERE PE.FECCORRIDA = TAB1.FECCORRIDA AND PE.RUTA_ID = TAB1.RUTA_ID) PASSAGEIROS_EQUIVALENTE
FROM (SELECT RT.RUTA_ID, FROM (SELECT RT.RUTA_ID,
RT.INDSENTIDOIDA,
RT.NUMRUTA, RT.NUMRUTA,
CR.FECCORRIDA, CR.FECCORRIDA,
RT.DESCRUTA DESCRUTA, CONCAT(RT.DESCRUTA, CASE WHEN RT.INDSENTIDOIDA = 0 THEN ' - VOLTA' ELSE ' - IDA' END) DESCRUTA,
TF.PRECIO TARIFA, TF.PRECIO TARIFA,
DA.CANTASIENTOS ASSENTOS, DA.CANTASIENTOS ASSENTOS,
RO.ROLOPERATIVO_ID, RO.ROLOPERATIVO_ID,
@ -143,9 +144,10 @@ FROM (SELECT TAB1.*,
RO.ROLOPERATIVO_ID, RO.ROLOPERATIVO_ID,
GR.DESCGRUPO, GR.DESCGRUPO,
CO.ESTADO_ID, CO.ESTADO_ID,
CD.ESTADO_ID) TAB1) TAB CD.ESTADO_ID,
RT.INDSENTIDOIDA) TAB1) TAB
GROUP BY TAB.RUTA_ID, TAB.NUMRUTA, TAB.DESCRUTA, TAB.TARIFA, TAB.ASSENTOS, TAB.ROLOPERATIVO_ID, GROUP BY TAB.RUTA_ID, TAB.NUMRUTA, TAB.DESCRUTA, TAB.TARIFA, TAB.ASSENTOS, TAB.ROLOPERATIVO_ID,
TAB.INTERESTADUAL, TAB.GRUPO_LINHA, TAB.EXTENSAO_KM, TAB.CVE_CLASE_SERVICIO) SUB TAB.INTERESTADUAL, TAB.GRUPO_LINHA, TAB.EXTENSAO_KM, TAB.CVE_CLASE_SERVICIO, TAB.INDSENTIDOIDA) SUB
WHERE WHERE
(DECODE(NVL(SUB.VIAGENS_TOTAL,0), 0, 1, NVL(SUB.VIAGENS_TOTAL,0)) != 0) (DECODE(NVL(SUB.VIAGENS_TOTAL,0), 0, 1, NVL(SUB.VIAGENS_TOTAL,0)) != 0)
AND DECODE(NVL(SUB.VIAGENS_TOTAL,0), 0, 1, NVL(SUB.VIAGENS_TOTAL,0)) != 0 AND DECODE(NVL(SUB.VIAGENS_TOTAL,0), 0, 1, NVL(SUB.VIAGENS_TOTAL,0)) != 0
@ -154,7 +156,7 @@ WHERE
AND DECODE(NVL(SUB.VIAGENS_TOTAL,0), 0, 1, NVL(SUB.VIAGENS_TOTAL,0)) != 0 AND DECODE(NVL(SUB.VIAGENS_TOTAL,0), 0, 1, NVL(SUB.VIAGENS_TOTAL,0)) != 0
AND DECODE(NVL(SUB.TARIFA,0), 0, 1, NVL(SUB.TARIFA,0)) != 0 AND DECODE(NVL(SUB.TARIFA,0), 0, 1, NVL(SUB.TARIFA,0)) != 0
AND (NVL(SUB.ASSENTOS,0) * NVL(SUB.KM_RODADO,0)) != 0 AND (NVL(SUB.ASSENTOS,0) * NVL(SUB.KM_RODADO,0)) != 0
]]> ORDER BY SUB.DESCRUTA, SUB.INDSENTIDOIDA, SUB.ASSENTOS, SUB.TARIFA]]>
</queryString> </queryString>
<field name="RUTA_ID" class="java.math.BigDecimal"/> <field name="RUTA_ID" class="java.math.BigDecimal"/>
<field name="NUMRUTA" class="java.lang.String"/> <field name="NUMRUTA" class="java.lang.String"/>
@ -746,14 +748,14 @@ WHERE
<columnHeader> <columnHeader>
<band height="32" splitType="Stretch"> <band height="32" splitType="Stretch">
<staticText> <staticText>
<reportElement uuid="69af5fee-1749-41a5-bf3d-e53db355ddd2" x="0" y="16" width="25" height="14"/> <reportElement uuid="69af5fee-1749-41a5-bf3d-e53db355ddd2" x="0" y="16" width="15" height="14"/>
<textElement textAlignment="Right" verticalAlignment="Middle"> <textElement textAlignment="Right" verticalAlignment="Middle">
<font size="6"/> <font size="6"/>
</textElement> </textElement>
<text><![CDATA[Cod.]]></text> <text><![CDATA[Cod.]]></text>
</staticText> </staticText>
<staticText> <staticText>
<reportElement uuid="f39411fa-dfc8-4b51-a705-53b2ed781e10" mode="Transparent" x="25" y="16" width="131" height="14" forecolor="#000000" backcolor="#FFFFFF"/> <reportElement uuid="f39411fa-dfc8-4b51-a705-53b2ed781e10" mode="Transparent" x="15" y="16" width="131" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none"> <textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
<font fontName="SansSerif" size="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> <font fontName="SansSerif" size="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/> <paragraph lineSpacing="Single"/>
@ -987,16 +989,16 @@ WHERE
</band> </band>
</columnHeader> </columnHeader>
<detail> <detail>
<band height="9" splitType="Stretch"> <band height="16" splitType="Stretch">
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement uuid="3806ad9e-a061-446b-b913-8e5154e42c17" x="0" y="0" width="25" height="9"/> <reportElement uuid="3806ad9e-a061-446b-b913-8e5154e42c17" x="0" y="0" width="15" height="9"/>
<textElement textAlignment="Right" verticalAlignment="Middle"> <textElement textAlignment="Right" verticalAlignment="Middle">
<font size="5"/> <font size="5"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{NUMRUTA}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{NUMRUTA}]]></textFieldExpression>
</textField> </textField>
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement uuid="9c07acec-d267-4686-b7b0-edbb1899fc95" x="25" y="0" width="131" height="9"/> <reportElement uuid="9c07acec-d267-4686-b7b0-edbb1899fc95" x="15" y="0" width="141" height="16"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/> <textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{DESCRUTA}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{DESCRUTA}]]></textFieldExpression>
</textField> </textField>