Referente ao retorno, segue as considerações:

Item 1 - ok
Item 2 - ok
Item 3 - ok
Item 4 - ok
Item 5 - ok
Item 6 - Não encontrei irregularidade
Item 7 - Não encontrei irregularidade
Item 8 - ok


git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@78522 d1611594-4594-4d17-8e1d-87c2c4800839
master
walace 2018-01-31 11:10:58 +00:00
parent 87beba2b38
commit 858c661bea
3 changed files with 31 additions and 30 deletions

View File

@ -76,9 +76,9 @@ public class RelatorioGratuidade extends Relatorio {
if(agencia != null && !agencia.equals("")){
stmt.setInt("puntoventa_id", Integer.parseInt(agencia));
}
if(categoria != null && !categoria.equals("")){
stmt.setInt("categoria_id", Integer.parseInt(categoria));
}
// if(categoria != null && !categoria.equals("")){
// stmt.setInt("categoria_id", Integer.parseInt(categoria));
// }
if(orgaoConcedenteId != null){
stmt.setInt("orgao_concedente_id", orgaoConcedenteId);
}
@ -154,7 +154,7 @@ public class RelatorioGratuidade extends Relatorio {
sb.append("SELECT * ");
sb.append("FROM ");
sb.append(" (SELECT b.boleto_id,");
sb.append(" (SELECT b.boletooriginal_id, b.boleto_id,");
sb.append(" b.ccf,");
sb.append(" og.descorgao,");
sb.append(" b.feccreacion,");
@ -173,17 +173,17 @@ public class RelatorioGratuidade extends Relatorio {
sb.append(" b.descnumdoc,");
sb.append(" tar.preciooriginal,");
sb.append(" tar.precio,");
sb.append(" b.porccategoria,");
sb.append(" b.preciopagado,");
sb.append(" case when b.PRECIOBASE > 0 then TRUNC(((100 - (b.PRECIOPAGADO * 100) / b.PRECIOBASE)),2) else 0 end as porccategoria, ");
sb.append(" (select sum(bfpv.importe) from boleto_formapago bfpv where bfpv.boleto_id = b.boleto_id and bfpv.activo = 1) as preciopagado, ");;
sb.append(" u.cveusuario,");
sb.append(" ag.nombpuntoventa,");
sb.append(" e.nombempresa,");
sb.append(" ca.cvecategoria,");
sb.append(" b.desctipodoc,");
sb.append(" ca.desccategoria,");
sb.append(" tar.importepedagio,");
sb.append(" tar.importeseguro,");
sb.append(" tar.importetaxaembarque,");
sb.append(" b.importepedagio,");
sb.append(" b.importeseguro,");
sb.append(" b.importetaxaembarque,");
sb.append(" 'RESERVA' as indstatusboleto, ");
sb.append(" ori.cveparada codorigem,");
sb.append(" des.cveparada coddestino");
@ -219,12 +219,12 @@ public class RelatorioGratuidade extends Relatorio {
sb.append(" AND b.puntoventa_id = :puntoventa_id ");
}
if(!categoria.isEmpty()){
sb.append(" AND ca.categoria_id = :categoria_id ");
sb.append(" AND ca.categoria_id in ("+ categoria +") ");
}
sb.append(" ");
sb.append(" UNION ALL ");
sb.append(" ");
sb.append(" SELECT c.transacao_id,");
sb.append(" SELECT c.transacaooriginal_id, c.transacao_id,");
sb.append(" c.ccf,");
sb.append(" og.descorgao,");
sb.append(" c.feccreacion,");
@ -238,27 +238,28 @@ public class RelatorioGratuidade extends Relatorio {
sb.append(" c.fechorviaje,");
sb.append(" c.numasiento,");
sb.append(" c.numfoliosistema,");
sb.append(" case when c.tipoventa_id in(5,12,18,41,49) then 'PTA' when c.tipoventa_id = '81' then 'VENDA DE TRANSFERENCIA' else tv.desctipoventa end as desctipoventa, ");
sb.append(" case when c.tipoventa_id in(5,12,18,41,49) then 'PTA' when c.tipoventa_id = '81' then 'VENDA DE TRANSFERENCIA' when c.tipoventa_id = '82' then 'CONFIRM.VEND.ABERTO' when c.tipoventa_id = '8' then 'TROCA' else tv.desctipoventa end as desctipoventa, ");
sb.append(" c.nombpasajero,");
sb.append(" c.descnumdoc,");
sb.append(" tar.preciooriginal,");
sb.append(" tar.precio,");
sb.append(" c.porccategoria,");
sb.append(" c.preciopagado,");
sb.append(" case when c.PRECIOBASE > 0 then TRUNC(((100 - (c.PRECIOPAGADO * 100) / c.PRECIOBASE)),2) else 0 end as porccategoria, ");
sb.append(" (select sum(cfpv.importe) from caja_formapago cfpv where cfpv.caja_id = c.caja_id and cfpv.activo = 1) as preciopagado, ");
sb.append(" u.cveusuario,");
sb.append(" ag.nombpuntoventa,");
sb.append(" e.nombempresa,");
sb.append(" ca.cvecategoria,");
sb.append(" c.desctipodoc,");
sb.append(" ca.desccategoria,");
sb.append(" tar.importepedagio,");
sb.append(" tar.importeseguro,");
sb.append(" tar.importetaxaembarque,");
sb.append(" c.importepedagio,");
sb.append(" c.importeseguro,");
sb.append(" c.importetaxaembarque,");
sb.append(" case when c.indstatusboleto = 'V' then 'VENDIDO' when c.indstatusboleto = 'C' and c.motivocancelacion_id = 31 then 'CANCELADO' ");
sb.append(" when c.indstatusboleto = 'C' and c.motivocancelacion_id = 32 then 'DEVOLVIDO' ");
sb.append(" when c.indstatusboleto = 'C' and c.motivocancelacion_id = 37 then 'CANCEC. EMERG' ");
sb.append(" when c.indstatusboleto = 'E' and c.indreimpresion = 1 then 'ENTREGUE' ");
sb.append(" when c.indstatusboleto = 'T' and c.motivocancelacion_id = 10 or c.tipoventa_id = 8 then 'TROCA' ");
sb.append(" when c.indstatusboleto = 'T' and c.tipoventa_id = 81 or c.indstatusboleto = 'T' then 'TRANSFERÊNCIA' " );
sb.append(" when c.indstatusboleto = 'T' and c.tipoventa_id = 81 or c.tipoventa_id = 81 then 'TRANSFERÊNCIA' " );
sb.append(" when c.indstatusboleto = 'T' and c.tipoventa_id = 82 then 'CONFIRM.ABERTO' " );
sb.append(" when c.indstatusboleto = 'T' and c.tipoventa_id = 41 then 'CHECKIN REATIVADO' end as indstatusboleto, ");
sb.append(" ori.cveparada codorigem,");
@ -280,7 +281,7 @@ public class RelatorioGratuidade extends Relatorio {
sb.append(" AND tar.destino_id = c.destino_id and tar.activo = 1)");
sb.append(" JOIN empresa e ON e.empresa_id = c.empresacorrida_id");
sb.append(" JOIN orgao_concedente og ON og.orgaoconcedente_id = tar.orgaoconcedente_id");
sb.append(" WHERE 1=1 and (c.motivocancelacion_id IN (31,32) OR c.motivocancelacion_id IS NULL) ");
sb.append(" WHERE 1=1 and (c.motivocancelacion_id IN (31,32,37) OR c.motivocancelacion_id IS NULL) ");
sb.append(" AND (c.indreimpresion = 0 OR (c.indstatusboleto IN ('E','T') AND c.indreimpresion = 1))");
if (fecInicioViagem != null && fecFinalViagem != null) {
sb.append(" AND c.feccorrida BETWEEN :fecInicioViagem AND :fecFinalViagem ");
@ -295,10 +296,10 @@ public class RelatorioGratuidade extends Relatorio {
sb.append(" AND c.puntoventa_id = :puntoventa_id ");
}
if(!categoria.isEmpty()){
sb.append(" AND ca.categoria_id = :categoria_id ");
sb.append(" AND ca.categoria_id in ("+ categoria +") ");
}
sb.append(") ");
sb.append("ORDER BY 1");
sb.append("ORDER BY 1,2");
return sb.toString();
}

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="1152" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="1132" leftMargin="10" rightMargin="10" topMargin="20" bottomMargin="20" resourceBundle="RelatorioEmpresaCorrida" whenResourceMissingType="Empty" uuid="94834362-0ecc-46da-b0a2-5cdee355da3e">
<property name="ireport.zoom" value="0.9330147604194715"/>
<property name="ireport.x" value="203"/>
<property name="ireport.zoom" value="1.2418426461183167"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.2" value="pageHeader"/>
<parameter name="fecInicioViagem" class="java.lang.String">
@ -72,7 +72,7 @@
<textFieldExpression><![CDATA[$P{TITULO}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="37" width="82" height="23" uuid="e5d4714c-07cc-42ff-a7a8-76d6f6d3e716"/>
<reportElement x="0" y="37" width="109" height="23" uuid="e5d4714c-07cc-42ff-a7a8-76d6f6d3e716"/>
<textFieldExpression><![CDATA[$R{header.periodo.viagem}]]></textFieldExpression>
</textField>
<textField>
@ -89,7 +89,7 @@
<textFieldExpression><![CDATA[$R{header.pagina}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="82" y="37" width="232" height="23" uuid="4914d9e7-6ce8-4512-b1f8-13f3b572ac50"/>
<reportElement x="109" y="37" width="205" height="23" uuid="4914d9e7-6ce8-4512-b1f8-13f3b572ac50"/>
<textFieldExpression><![CDATA[( $P{fecInicioViagem} != null ? ($P{fecInicioViagem} + " à " + $P{fecFinalViagem}) : "" )]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy HH:mm">
@ -103,15 +103,15 @@
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}+" de"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="60" width="82" height="21" uuid="a79c03e0-bbe4-4b1c-8297-533a0d137b27"/>
<reportElement x="0" y="60" width="109" height="21" uuid="a79c03e0-bbe4-4b1c-8297-533a0d137b27"/>
<textFieldExpression><![CDATA[$R{header.periodo.venda}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="82" y="60" width="232" height="21" uuid="b31b00a3-1ced-4f9c-acb7-470646f7b335"/>
<reportElement x="109" y="60" width="205" height="21" uuid="b31b00a3-1ced-4f9c-acb7-470646f7b335"/>
<textFieldExpression><![CDATA[( $P{fecInicioVenda} != null ? ($P{fecInicioVenda} + " à " + $P{fecFinalVenda}) : "" )]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="81" width="82" height="20" uuid="8fb67bb3-6ff2-40d1-b338-714f199ea7f0"/>
<reportElement x="0" y="81" width="109" height="20" uuid="8fb67bb3-6ff2-40d1-b338-714f199ea7f0"/>
<textFieldExpression><![CDATA[$R{header.empresa}]]></textFieldExpression>
</textField>
<textField>
@ -328,7 +328,7 @@
<reportElement x="0" y="140" width="1132" height="1" uuid="8e2d6686-e4d7-43d5-b3a9-46adc3e58350"/>
</line>
<textField>
<reportElement x="82" y="81" width="232" height="20" uuid="3541e1b0-8dfe-404e-9461-64d10d85531a"/>
<reportElement x="109" y="81" width="205" height="20" uuid="3541e1b0-8dfe-404e-9461-64d10d85531a"/>
<textFieldExpression><![CDATA[$P{nomb_empresa}]]></textFieldExpression>
</textField>
</band>
@ -345,7 +345,7 @@
</textElement>
<textFieldExpression><![CDATA[$F{corridaId}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="HH:mm:ss" isBlankWhenNull="true">
<textField isStretchWithOverflow="true" pattern="HH:mm" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="314" y="0" width="28" height="23" uuid="4a68f71a-7be1-467a-b3eb-641a0c1f9a48"/>
<textElement textAlignment="Left">
<font size="6"/>