Inserção de coluna orgao concedente no relatório de gratuidade de evidar duplicidade das linhas

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@75820 d1611594-4594-4d17-8e1d-87c2c4800839
master
alexandre.lima 2017-10-30 13:02:02 +00:00
parent 09286f3443
commit ba595330d4
6 changed files with 36 additions and 10 deletions

View File

@ -134,6 +134,7 @@ public class RelatorioGratuidade extends Relatorio {
gratuidadeBean.setStatus(rset.getString("INDSTATUSBOLETO"));
gratuidadeBean.setCodOrigem(rset.getString("codOrigem"));
gratuidadeBean.setCodDestino(rset.getString("codDestino"));
gratuidadeBean.setDescorgao(rset.getString("descorgao"));
lsDadosRelatorio.add(gratuidadeBean);
}
@ -157,7 +158,7 @@ public class RelatorioGratuidade extends Relatorio {
private String getSql(String empresa, String agencia, String ruta, String fecInicioViagem, String fecFinalViagem, String fecInicioVenda, String fecFinalVenda, String origem, String destino, String categoria) {
StringBuffer sql = new StringBuffer();
String orderBy = "";
sql.append("SELECT b.feccreacion, ori.cveparada origen, des.cveparada destino, ori.descparada descorigen, des.descparada descdestino, b.numkmviaje, ");
sql.append("SELECT og.descorgao, b.feccreacion, ori.cveparada origen, des.cveparada destino, ori.descparada descorigen, des.descparada descdestino, b.numkmviaje, ");
sql.append("r.descruta, b.corrida_id, b.fechorviaje, b.numasiento, b.numfoliosistema, tv.desctipoventa, b.nombpasajero, b.descnumdoc, tar.preciooriginal, ");
sql.append("b.porccategoria, b.preciopagado, u.cveusuario, ag.nombpuntoventa, e.nombempresa, C.cvecategoria, ti.DESCTIPO, ");
sql.append("c.DESCCATEGORIA, tar.IMPORTEPEDAGIO, tar.IMPORTESEGURO, tar.IMPORTETAXAEMBARQUE, b.DESCNUMDOC, b.INDSTATUSBOLETO, ori.CVEPARADA codOrigem, des.CVEPARADA codDestino ");
@ -178,6 +179,7 @@ public class RelatorioGratuidade extends Relatorio {
sql.append(" AND tar.destino_id = b.destino_id) ");
sql.append("JOIN empresa e ON e.empresa_id = b.empresacorrida_id ");
sql.append("LEFT JOIN TIPO_IDENTIFICACION ti ON ti.TIPOIDENTIFICACION_ID = b.TIPOIDENTIFICACIONDOC_ID ");
sql.append("join ORGAO_CONCEDENTE og on og.ORGAOCONCEDENTE_ID = tar.ORGAOCONCEDENTE_ID ");
sql.append("WHERE 1=1 ");
if (fecInicioViagem != null && fecFinalViagem != null) {
sql.append(" AND b.feccorrida BETWEEN :fecInicioViagem AND :fecFinalViagem ");

View File

@ -30,6 +30,7 @@ detail.desconto=Desc.(%)
detail.tarifadesconto=Tarifa
detail.bilheteiro=Bilheteiro
detail.agencia=Agência
detail.total=Orgão
detail.total=Total Quantidade:

View File

@ -44,6 +44,7 @@ detail.status=Status
detail.codOrigem=Cod. Origem
detail.codDestino=Cod. Destino
detail.total=Total Quantidade:
detail.total=Orgão
linhas=Linhas

View File

@ -1,7 +1,7 @@
<?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="RelatorioEmpresaCorrida" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="822" leftMargin="10" rightMargin="10" topMargin="20" bottomMargin="20" resourceBundle="RelatorioEmpresaCorrida" whenResourceMissingType="Empty" uuid="94834362-0ecc-46da-b0a2-5cdee355da3e">
<property name="ireport.zoom" value="2.1961500000000127"/>
<property name="ireport.x" value="0"/>
<property name="ireport.x" value="1071"/>
<property name="ireport.y" value="136"/>
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.2" value="pageHeader"/>
<parameter name="fecInicioViagem" class="java.lang.String">
@ -49,6 +49,7 @@
<field name="dataMd" class="java.lang.String"/>
<field name="codOrigem" class="java.lang.String"/>
<field name="codDestino" class="java.lang.String"/>
<field name="descorgao" class="java.lang.String"/>
<variable name="qtde" class="java.lang.Integer" calculation="Count">
<variableExpression><![CDATA[$F{km}]]></variableExpression>
</variable>
@ -232,28 +233,28 @@
<textFieldExpression><![CDATA[$R{detail.rg}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="1fe1fad6-d193-4dc1-9696-5614ff9a10d0" x="701" y="40" width="30" height="27"/>
<reportElement uuid="1fe1fad6-d193-4dc1-9696-5614ff9a10d0" x="701" y="40" width="21" height="27"/>
<textElement textAlignment="Center">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$R{detail.status}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="f3655778-94dd-4fb6-8c84-cf32416201e0" x="731" y="40" width="30" height="27"/>
<reportElement uuid="f3655778-94dd-4fb6-8c84-cf32416201e0" x="722" y="40" width="20" height="27"/>
<textElement>
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$R{detail.seguro}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="b68a4e34-b6e9-4006-8373-707c4e37eb31" x="761" y="40" width="30" height="27"/>
<reportElement uuid="b68a4e34-b6e9-4006-8373-707c4e37eb31" x="742" y="40" width="29" height="27"/>
<textElement>
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$R{detail.utr}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="c74391a0-cc07-44f7-90af-3036910e6bb3" x="791" y="40" width="31" height="27"/>
<reportElement uuid="c74391a0-cc07-44f7-90af-3036910e6bb3" x="772" y="40" width="26" height="27"/>
<textElement>
<font size="6"/>
</textElement>
@ -273,6 +274,13 @@
</textElement>
<textFieldExpression><![CDATA[$R{detail.codDestino}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="d1507aa6-eaf3-4e5e-8178-6452c4da0854" x="798" y="40" width="24" height="27"/>
<textElement>
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$R{detail.pedagio}]]></textFieldExpression>
</textField>
</band>
</groupHeader>
</group>
@ -465,21 +473,21 @@
<textFieldExpression><![CDATA[$F{numfoliosistema}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement uuid="9e5ccd79-6850-4b3c-bfa1-405a96d3f826" x="791" y="0" width="31" height="23"/>
<reportElement uuid="9e5ccd79-6850-4b3c-bfa1-405a96d3f826" x="772" y="0" width="26" height="23"/>
<textElement textAlignment="Left">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{pedagio}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement uuid="32e01305-63ee-444c-a4a7-e9246621ca83" x="761" y="0" width="30" height="23"/>
<reportElement uuid="32e01305-63ee-444c-a4a7-e9246621ca83" x="742" y="0" width="29" height="23"/>
<textElement textAlignment="Left">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{utr}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement uuid="bff1a8a9-115f-4abf-811a-92ac988ca380" x="731" y="0" width="30" height="23"/>
<reportElement uuid="bff1a8a9-115f-4abf-811a-92ac988ca380" x="722" y="0" width="20" height="23"/>
<textElement textAlignment="Left">
<font size="6"/>
</textElement>
@ -507,7 +515,7 @@
<textFieldExpression><![CDATA[$F{rg}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="c6379bbf-bdfb-4600-b6ec-e1e9a6640c6d" x="701" y="0" width="30" height="23"/>
<reportElement uuid="c6379bbf-bdfb-4600-b6ec-e1e9a6640c6d" x="701" y="0" width="21" height="23"/>
<textElement textAlignment="Center">
<font size="6"/>
</textElement>
@ -534,6 +542,13 @@
</textElement>
<textFieldExpression><![CDATA[$F{codDestino}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
<reportElement uuid="490de404-9c54-4fad-be6d-9b1d1041b3dd" x="798" y="0" width="24" height="23"/>
<textElement textAlignment="Left">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{descorgao}]]></textFieldExpression>
</textField>
</band>
</detail>
<summary>

View File

@ -35,7 +35,14 @@ public class RelatorioGratuidadeBean {
private Date dataMd;
private String codOrigem;
private String codDestino;
private String descorgao;
public String getDescorgao() {
return descorgao;
}
public void setDescorgao(String descorgao) {
this.descorgao = descorgao;
}
public String getCodOrigem() {
return codOrigem;
}