fixes bug#AL-3391
parent
d5ca7547e7
commit
b360b07e43
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>ventaboletosadm</artifactId>
|
<artifactId>ventaboletosadm</artifactId>
|
||||||
<version>1.34.4</version>
|
<version>1.34.5</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
|
@ -140,7 +140,11 @@ public class RelatorioIndiceIRK extends Relatorio {
|
||||||
sb.append(" sum(receitaminima) AS receitaminima,");
|
sb.append(" sum(receitaminima) AS receitaminima,");
|
||||||
sb.append(" sum(diferencareceita) AS diferencareceita,");
|
sb.append(" sum(diferencareceita) AS diferencareceita,");
|
||||||
sb.append(" prefixo, ");
|
sb.append(" prefixo, ");
|
||||||
sb.append(" passageiros ");
|
sb.append(" passageiros, ");
|
||||||
|
sb.append(" CASE ");
|
||||||
|
sb.append(" WHEN tipo_servico = 1 THEN 'O' ");
|
||||||
|
sb.append(" WHEN tipo_servico = 2 THEN 'E' ");
|
||||||
|
sb.append(" END AS tipoServico");
|
||||||
sb.append(" FROM ");
|
sb.append(" FROM ");
|
||||||
sb.append(" (SELECT DISTINCT servico,");
|
sb.append(" (SELECT DISTINCT servico,");
|
||||||
sb.append(" rutaid,");
|
sb.append(" rutaid,");
|
||||||
|
@ -159,7 +163,8 @@ public class RelatorioIndiceIRK extends Relatorio {
|
||||||
sb.append(" indiceirkminimo * extensao * qtdCorrida AS receitaminima,");
|
sb.append(" indiceirkminimo * extensao * qtdCorrida AS receitaminima,");
|
||||||
sb.append(" (SUM(passagens) + SUM(pedagio) + SUM(txembarque) + SUM(seguro)) - (indiceirkminimo * extensao * qtdCorrida) AS diferencareceita,");
|
sb.append(" (SUM(passagens) + SUM(pedagio) + SUM(txembarque) + SUM(seguro)) - (indiceirkminimo * extensao * qtdCorrida) AS diferencareceita,");
|
||||||
sb.append(" prefixo, ");
|
sb.append(" prefixo, ");
|
||||||
sb.append(" count(passageiros) AS passageiros ");
|
sb.append(" count(passageiros) AS passageiros, ");
|
||||||
|
sb.append(" tipo_servico ");
|
||||||
sb.append(" FROM ");
|
sb.append(" FROM ");
|
||||||
|
|
||||||
sb.append("( WITH corridas AS ( ");
|
sb.append("( WITH corridas AS ( ");
|
||||||
|
@ -212,7 +217,8 @@ public class RelatorioIndiceIRK extends Relatorio {
|
||||||
sb.append(" r.prefixo AS prefixo, ");
|
sb.append(" r.prefixo AS prefixo, ");
|
||||||
sb.append(" cos.hora, ");
|
sb.append(" cos.hora, ");
|
||||||
sb.append(" cos.quantidade AS qtdcorrida, ");
|
sb.append(" cos.quantidade AS qtdcorrida, ");
|
||||||
sb.append(" COUNT(distinct cj.transacao_id) AS passageiros ");
|
sb.append(" COUNT(distinct cj.transacao_id) AS passageiros, ");
|
||||||
|
sb.append(" co.tiposervicio_id AS tipo_servico ");
|
||||||
sb.append("FROM ");
|
sb.append("FROM ");
|
||||||
sb.append(" caja cj ");
|
sb.append(" caja cj ");
|
||||||
sb.append(" INNER JOIN ruta r ON ( cj.ruta_id = r.ruta_id ) ");
|
sb.append(" INNER JOIN ruta r ON ( cj.ruta_id = r.ruta_id ) ");
|
||||||
|
@ -255,7 +261,8 @@ public class RelatorioIndiceIRK extends Relatorio {
|
||||||
sb.append(" cj.preciopagado, ");
|
sb.append(" cj.preciopagado, ");
|
||||||
sb.append(" r.prefixo, ");
|
sb.append(" r.prefixo, ");
|
||||||
sb.append(" cos.hora, ");
|
sb.append(" cos.hora, ");
|
||||||
sb.append(" cos.quantidade ");
|
sb.append(" cos.quantidade, ");
|
||||||
|
sb.append(" co.tiposervicio_id ");
|
||||||
sb.append("ORDER BY ");
|
sb.append("ORDER BY ");
|
||||||
sb.append(" r.descruta ");
|
sb.append(" r.descruta ");
|
||||||
|
|
||||||
|
@ -269,7 +276,8 @@ public class RelatorioIndiceIRK extends Relatorio {
|
||||||
sb.append(" hora,");
|
sb.append(" hora,");
|
||||||
sb.append(" extensao,");
|
sb.append(" extensao,");
|
||||||
sb.append(" prefixo,");
|
sb.append(" prefixo,");
|
||||||
sb.append(" qtdCorrida");
|
sb.append(" qtdCorrida, ");
|
||||||
|
sb.append(" tipo_servico ");
|
||||||
sb.append(" ORDER BY descruta, ");
|
sb.append(" ORDER BY descruta, ");
|
||||||
sb.append(" hora)tabela ");
|
sb.append(" hora)tabela ");
|
||||||
sb.append("GROUP BY servico,");
|
sb.append("GROUP BY servico,");
|
||||||
|
@ -280,7 +288,8 @@ public class RelatorioIndiceIRK extends Relatorio {
|
||||||
sb.append(" indiceirkminimo,");
|
sb.append(" indiceirkminimo,");
|
||||||
sb.append(" hora,");
|
sb.append(" hora,");
|
||||||
sb.append(" prefixo, ");
|
sb.append(" prefixo, ");
|
||||||
sb.append(" passageiros ");
|
sb.append(" passageiros, ");
|
||||||
|
sb.append(" CASE WHEN tipo_servico = 1 THEN 'O' WHEN tipo_servico = 2 THEN 'E' END ");
|
||||||
sb.append("ORDER BY descruta,");
|
sb.append("ORDER BY descruta,");
|
||||||
sb.append(" sentido,");
|
sb.append(" sentido,");
|
||||||
sb.append(" hora");
|
sb.append(" hora");
|
||||||
|
@ -316,6 +325,7 @@ public class RelatorioIndiceIRK extends Relatorio {
|
||||||
relatorioIndiceIRK.setDiferencaReceitas((BigDecimal) rset.getObject("diferencareceita"));
|
relatorioIndiceIRK.setDiferencaReceitas((BigDecimal) rset.getObject("diferencareceita"));
|
||||||
relatorioIndiceIRK.setPrefixoLinha((String) rset.getObject("prefixo"));
|
relatorioIndiceIRK.setPrefixoLinha((String) rset.getObject("prefixo"));
|
||||||
relatorioIndiceIRK.setPassageiros((BigDecimal) rset.getObject("passageiros"));
|
relatorioIndiceIRK.setPassageiros((BigDecimal) rset.getObject("passageiros"));
|
||||||
|
relatorioIndiceIRK.setTipoServico((String) rset.getObject("tipoServico"));
|
||||||
|
|
||||||
lsDadosRelatorio.add(relatorioIndiceIRK);
|
lsDadosRelatorio.add(relatorioIndiceIRK);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,7 @@ detail.linha=Linha
|
||||||
detail.irkMinimo= IRK Mínimo
|
detail.irkMinimo= IRK Mínimo
|
||||||
detail.receitaMinima= Receita Mínima
|
detail.receitaMinima= Receita Mínima
|
||||||
detail.diferencaReceitas= Diferença de Receitas
|
detail.diferencaReceitas= Diferença de Receitas
|
||||||
|
detail.tipoServico=Tipo de Servi\u00E7os
|
||||||
|
|
||||||
|
|
||||||
#Group
|
#Group
|
||||||
|
|
|
@ -40,6 +40,7 @@ detail.linha=Linha
|
||||||
detail.irkMinimo= IRK Mínimo
|
detail.irkMinimo= IRK Mínimo
|
||||||
detail.receitaMinima= Receita Mínima
|
detail.receitaMinima= Receita Mínima
|
||||||
detail.diferencaReceitas= Diferença de Receitas
|
detail.diferencaReceitas= Diferença de Receitas
|
||||||
|
detail.tipoServico=Tipo de Servi\u00E7os
|
||||||
|
|
||||||
|
|
||||||
#Group
|
#Group
|
||||||
|
|
Binary file not shown.
|
@ -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="RelatorioLinhasHorario" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="ae2cbb01-bc79-4d18-8206-3b59273fe793">
|
<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="RelatorioLinhasHorario" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="ae2cbb01-bc79-4d18-8206-3b59273fe793">
|
||||||
<property name="ireport.zoom" value="1.8181818181818352"/>
|
<property name="ireport.zoom" value="1.8181818181818352"/>
|
||||||
<property name="ireport.x" value="106"/>
|
<property name="ireport.x" value="0"/>
|
||||||
<property name="ireport.y" value="96"/>
|
<property name="ireport.y" value="0"/>
|
||||||
<style name="diferencaReceitaNegativa" forecolor="#000000">
|
<style name="diferencaReceitaNegativa" forecolor="#000000">
|
||||||
<conditionalStyle>
|
<conditionalStyle>
|
||||||
<conditionExpression><![CDATA[($F{diferencaReceitas}.compareTo(BigDecimal.ZERO)) < 1]]></conditionExpression>
|
<conditionExpression><![CDATA[($F{diferencaReceitas}.compareTo(BigDecimal.ZERO)) < 1]]></conditionExpression>
|
||||||
|
@ -46,6 +46,7 @@
|
||||||
<field name="descDestinoTrecho" class="java.lang.String"/>
|
<field name="descDestinoTrecho" class="java.lang.String"/>
|
||||||
<field name="descOrigemTrecho" class="java.lang.String"/>
|
<field name="descOrigemTrecho" class="java.lang.String"/>
|
||||||
<field name="passageiros" class="java.math.BigDecimal"/>
|
<field name="passageiros" class="java.math.BigDecimal"/>
|
||||||
|
<field name="tipoServico" class="java.lang.String"/>
|
||||||
<variable name="total_group" class="java.math.BigDecimal" resetType="Group" resetGroup="groupRuta" calculation="Sum">
|
<variable name="total_group" class="java.math.BigDecimal" resetType="Group" resetGroup="groupRuta" calculation="Sum">
|
||||||
<variableExpression><![CDATA[$F{total}]]></variableExpression>
|
<variableExpression><![CDATA[$F{total}]]></variableExpression>
|
||||||
</variable>
|
</variable>
|
||||||
|
@ -210,7 +211,7 @@
|
||||||
<textFieldExpression><![CDATA[$F{irkMinimo}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$F{irkMinimo}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField pattern="#,##0;-#,##0" isBlankWhenNull="true">
|
<textField pattern="#,##0;-#,##0" isBlankWhenNull="true">
|
||||||
<reportElement uuid="1c992ccd-05a7-4e56-9711-0b62b67b3baf" x="266" y="0" width="68" height="11"/>
|
<reportElement uuid="1c992ccd-05a7-4e56-9711-0b62b67b3baf" x="288" y="0" width="46" height="11"/>
|
||||||
<textElement textAlignment="Right">
|
<textElement textAlignment="Right">
|
||||||
<font size="6" isBold="true"/>
|
<font size="6" isBold="true"/>
|
||||||
</textElement>
|
</textElement>
|
||||||
|
@ -287,7 +288,7 @@
|
||||||
<textFieldExpression><![CDATA[$F{irkMinimo}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$F{irkMinimo}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField pattern="#,##0;-#,##0" isBlankWhenNull="true">
|
<textField pattern="#,##0;-#,##0" isBlankWhenNull="true">
|
||||||
<reportElement uuid="b541fe11-dc8b-44d5-a4c9-72bff5a4105a" x="266" y="1" width="68" height="9"/>
|
<reportElement uuid="b541fe11-dc8b-44d5-a4c9-72bff5a4105a" x="288" y="1" width="46" height="9"/>
|
||||||
<textElement textAlignment="Right">
|
<textElement textAlignment="Right">
|
||||||
<font size="6" isBold="true"/>
|
<font size="6" isBold="true"/>
|
||||||
</textElement>
|
</textElement>
|
||||||
|
@ -360,7 +361,7 @@
|
||||||
<textFieldExpression><![CDATA[$R{detail.hora}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$R{detail.hora}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField>
|
<textField>
|
||||||
<reportElement uuid="30b30f3d-c4f3-40a2-825a-812ae5475414" x="203" y="80" width="63" height="10"/>
|
<reportElement uuid="30b30f3d-c4f3-40a2-825a-812ae5475414" x="255" y="80" width="33" height="10"/>
|
||||||
<textElement textAlignment="Center" markup="none">
|
<textElement textAlignment="Center" markup="none">
|
||||||
<font size="6" isBold="true"/>
|
<font size="6" isBold="true"/>
|
||||||
</textElement>
|
</textElement>
|
||||||
|
@ -441,12 +442,19 @@
|
||||||
<textFieldExpression><![CDATA[$R{detail.servico}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$R{detail.servico}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField evaluationTime="Report">
|
<textField evaluationTime="Report">
|
||||||
<reportElement uuid="dc5f8cf0-661b-42ea-89c5-1d188b7f56a2" x="266" y="80" width="68" height="10"/>
|
<reportElement uuid="dc5f8cf0-661b-42ea-89c5-1d188b7f56a2" x="288" y="80" width="46" height="10"/>
|
||||||
<textElement textAlignment="Right">
|
<textElement textAlignment="Right">
|
||||||
<font size="6" isBold="true"/>
|
<font size="6" isBold="true"/>
|
||||||
</textElement>
|
</textElement>
|
||||||
<textFieldExpression><![CDATA[$R{detail.passageiros}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$R{detail.passageiros}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="e2363c9c-3380-4c18-8589-eea80fbab227" x="203" y="80" width="52" height="10"/>
|
||||||
|
<textElement textAlignment="Center" markup="none">
|
||||||
|
<font size="6" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{detail.tipoServico}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
</band>
|
</band>
|
||||||
</pageHeader>
|
</pageHeader>
|
||||||
<columnHeader>
|
<columnHeader>
|
||||||
|
@ -476,7 +484,7 @@
|
||||||
<textFieldExpression><![CDATA[$F{irk}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$F{irk}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField isBlankWhenNull="true">
|
<textField isBlankWhenNull="true">
|
||||||
<reportElement uuid="d5b5f4cf-5f24-4f8c-8a81-b86bc0420d08" style="diferencaReceitaNegativa" x="203" y="0" width="63" height="11"/>
|
<reportElement uuid="d5b5f4cf-5f24-4f8c-8a81-b86bc0420d08" style="diferencaReceitaNegativa" x="255" y="0" width="33" height="11"/>
|
||||||
<textElement textAlignment="Center">
|
<textElement textAlignment="Center">
|
||||||
<font size="6"/>
|
<font size="6"/>
|
||||||
</textElement>
|
</textElement>
|
||||||
|
@ -525,12 +533,19 @@
|
||||||
<textFieldExpression><![CDATA[$F{servico}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$F{servico}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField pattern="#,##0;-#,##0">
|
<textField pattern="#,##0;-#,##0">
|
||||||
<reportElement uuid="d40d7b49-a758-4c9d-8690-536e28421010" style="diferencaReceitaNegativa" x="266" y="0" width="68" height="11"/>
|
<reportElement uuid="d40d7b49-a758-4c9d-8690-536e28421010" style="diferencaReceitaNegativa" x="288" y="0" width="46" height="11"/>
|
||||||
<textElement textAlignment="Right">
|
<textElement textAlignment="Right">
|
||||||
<font size="6"/>
|
<font size="6"/>
|
||||||
</textElement>
|
</textElement>
|
||||||
<textFieldExpression><![CDATA[$F{passageiros}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$F{passageiros}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="c6775b6c-61fd-447c-80ab-e8b7e000e27b" style="diferencaReceitaNegativa" x="203" y="0" width="52" height="11"/>
|
||||||
|
<textElement textAlignment="Center">
|
||||||
|
<font size="6"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{tipoServico}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
</band>
|
</band>
|
||||||
</detail>
|
</detail>
|
||||||
<columnFooter>
|
<columnFooter>
|
||||||
|
@ -594,7 +609,7 @@
|
||||||
<textFieldExpression><![CDATA[$V{kmRodado_total}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$V{kmRodado_total}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField isStretchWithOverflow="true" pattern="#,##0;-#,##0" isBlankWhenNull="true">
|
<textField isStretchWithOverflow="true" pattern="#,##0;-#,##0" isBlankWhenNull="true">
|
||||||
<reportElement uuid="adfa7fb1-a180-4f4e-8d10-5f7182a29413" positionType="Float" x="266" y="0" width="68" height="14"/>
|
<reportElement uuid="adfa7fb1-a180-4f4e-8d10-5f7182a29413" positionType="Float" x="288" y="0" width="46" height="14"/>
|
||||||
<textElement textAlignment="Right">
|
<textElement textAlignment="Right">
|
||||||
<font size="6" isBold="true" isStrikeThrough="false"/>
|
<font size="6" isBold="true" isStrikeThrough="false"/>
|
||||||
</textElement>
|
</textElement>
|
||||||
|
|
|
@ -102,6 +102,11 @@ public class RelatorioIndiceIRKBean {
|
||||||
|
|
||||||
private BigDecimal passageiros;
|
private BigDecimal passageiros;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tipo de serviço da corrida
|
||||||
|
*/
|
||||||
|
private String tipoServico;
|
||||||
|
|
||||||
public Integer getRutaId() {
|
public Integer getRutaId() {
|
||||||
return rutaId;
|
return rutaId;
|
||||||
}
|
}
|
||||||
|
@ -286,5 +291,13 @@ public class RelatorioIndiceIRKBean {
|
||||||
this.passageiros = passageiros;
|
this.passageiros = passageiros;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTipoServico() {
|
||||||
|
return tipoServico;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTipoServico(String tipoServico) {
|
||||||
|
this.tipoServico = tipoServico;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue