fixes bug#3303
parent
9cf79e7bcc
commit
ae7a632bee
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>br.com.rjconsultores</groupId>
|
||||
<artifactId>ventaboletosadm</artifactId>
|
||||
<version>1.26.2</version>
|
||||
<version>1.26.3</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -53,6 +53,7 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraAnalitico extends Relato
|
|||
}
|
||||
|
||||
private void carregarDataResult(ResultSet rset, Map<String, Object> dataResult) throws SQLException {
|
||||
dataResult.put("DATA_EVENTO", rset.getDate("DATA_EVENTO"));
|
||||
dataResult.put("CODIGO_AGENCIA", rset.getString("CODIGO_AGENCIA"));
|
||||
dataResult.put("NOME_AGENCIA", rset.getString("NOME_AGENCIA"));
|
||||
dataResult.put("CODIGO_BILHETEIRO", rset.getString("CODIGO_BILHETEIRO"));
|
||||
|
@ -83,11 +84,13 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraAnalitico extends Relato
|
|||
if (!StringUtils.isBlank(formasPagamento)) {
|
||||
final String[] formaPagamento = formasPagamento.split("\\;");
|
||||
if (formaPagamento.length > 1) {
|
||||
int contador = 0;
|
||||
while (contador < formaPagamento.length) {
|
||||
String valorformapago = "VALORFORMAPAGO" + contador+1;
|
||||
dataResult.put(valorformapago, formatarValorFormaDePagamento(formaPagamento[contador]));
|
||||
int contador = 1;
|
||||
int contadorFormaPagamento =0;
|
||||
while (contador <=formaPagamento.length) {
|
||||
String valorformapago = "VALORFORMAPAGO" + contador;
|
||||
dataResult.put(valorformapago, formatarValorFormaDePagamento(formaPagamento[contadorFormaPagamento]));
|
||||
contador ++;
|
||||
contadorFormaPagamento++;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -100,11 +103,14 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraAnalitico extends Relato
|
|||
if (!StringUtils.isBlank(formasPagamento)) {
|
||||
final String[] formaPagamento = formasPagamento.split("\\;");
|
||||
if (formaPagamento.length > 1) {
|
||||
int contador = 0;
|
||||
while (contador < formaPagamento.length) {
|
||||
String formaPago = "FORMAPAGO" + contador+1;
|
||||
dataResult.put(formaPago, formatarFormaDePagamento(formaPagamento[contador]));
|
||||
int contador = 1;
|
||||
int contadorFormaPagamento =0;
|
||||
while (contador <= formaPagamento.length) {
|
||||
String formaPago = "FORMAPAGO" + contador;
|
||||
dataResult.put(formaPago, formatarFormaDePagamento(formaPagamento[contadorFormaPagamento]));
|
||||
contador ++;
|
||||
contadorFormaPagamento ++;
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -125,7 +131,7 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraAnalitico extends Relato
|
|||
}
|
||||
|
||||
private void getSQL(Map<String, Object> parametros, StringBuilder sql) {
|
||||
sql.append(" select pv.NUMPUNTOVENTA CODIGO_AGENCIA, ");
|
||||
sql.append(" select c.feccreacion DATA_EVENTO, pv.NUMPUNTOVENTA CODIGO_AGENCIA, ");
|
||||
sql.append(" pv.NOMBPUNTOVENTA NOME_AGENCIA, ");
|
||||
sql.append(" u.CVEUSUARIO CODIGO_BILHETEIRO, ");
|
||||
sql.append(" u.NOMBUSUARIO NOME_BILHETEIRO, ");
|
||||
|
@ -144,7 +150,7 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraAnalitico extends Relato
|
|||
" (NVL(c.PRECIOPAGADO,0)+(NVL(c.IMPORTEPEDAGIO,0)+ NVL(c.IMPORTETAXAEMBARQUE,0)+ NVL(c.IMPORTESEGURO,0))) TOTAL_BILHETE, ");
|
||||
sql.append(" cs.DESCCLASE CLASSE, ");
|
||||
sql.append(
|
||||
" LISTAGG(fp.cvepago||' /'||CAST(cf.IMPORTE AS VARCHAR(10)),';') WITHIN GROUP( ORDER BY 1 DESC ) AS descpago, ");
|
||||
" LISTAGG(DISTINCT cf.cajaformapago_id||' /'|| fp.cvepago||' /'||CAST(cf.IMPORTE AS VARCHAR(10)),';') WITHIN GROUP( ORDER BY 1 DESC ) AS descpago, ");
|
||||
sql.append(" e.empresa_id EMPRESAAUTORIZADORA_ID, e.nombempresa EMPRESAAUTORIZADORA, ");
|
||||
sql.append(" c.num_bpe NUMBPE ");
|
||||
|
||||
|
@ -169,7 +175,7 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraAnalitico extends Relato
|
|||
sql.append(" and c.FECHORVENTA <= :DATA_FINAL ");
|
||||
sql.append(" and ((c.indreimpresion = 1 ");
|
||||
sql.append(
|
||||
" AND (c.motivoreimpresion_id = 99 or c.motivocancelacion_id in (27) )) or c.indreimpresion = 0) ");
|
||||
" AND (c.motivoreimpresion_id = 99 )) or c.indreimpresion = 0) ");
|
||||
if (parametros.get("NUMPUNTOVENTA") != null && !possuiFiltroTodos("NUMPUNTOVENTA")) {
|
||||
sql.append(" and pv.PUNTOVENTA_ID IN (" + parametros.get("NUMPUNTOVENTA").toString() + ")");
|
||||
}
|
||||
|
@ -177,6 +183,7 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraAnalitico extends Relato
|
|||
sql.append(" and u.NOMBUSUARIO like '" + parametros.get("BILHETEIRO") + "%'");
|
||||
}
|
||||
sql.append(" GROUP BY ");
|
||||
sql.append(" c.feccreacion, ");
|
||||
sql.append(" pv.numpuntoventa, ");
|
||||
sql.append(" pv.nombpuntoventa, ");
|
||||
sql.append(" u.cveusuario, ");
|
||||
|
@ -207,6 +214,7 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraAnalitico extends Relato
|
|||
sql.append(" u.NOMBUSUARIO, ");
|
||||
sql.append(" pv.NUMPUNTOVENTA, ");
|
||||
sql.append(" pv.NOMBPUNTOVENTA, ");
|
||||
sql.append(" c.feccreacion, ");
|
||||
sql.append(" c.NUMFOLIOSISTEMA, ");
|
||||
sql.append(" p_origen.DESCPARADA, ");
|
||||
sql.append(" p_destino.DESCPARADA, ");
|
||||
|
@ -227,7 +235,7 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraAnalitico extends Relato
|
|||
private String formatarFormaDePagamento(String formaDePagamento) {
|
||||
if (formaDePagamento != null) {
|
||||
final String[] formaPagamentoAuxilar = formaDePagamento.split("\\/");
|
||||
return formaPagamentoAuxilar[0];
|
||||
return formaPagamentoAuxilar[1];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -235,7 +243,7 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraAnalitico extends Relato
|
|||
private BigDecimal formatarValorFormaDePagamento(String formaDePagamento){
|
||||
if(formaDePagamento!=null){
|
||||
final String[] formaPagamentoAuxilar = formaDePagamento.split("\\/") ;
|
||||
return formaPagamentoAuxilar.length>1? new BigDecimal(formaPagamentoAuxilar[1].replace(",", ".").trim()):new BigDecimal("0.0");
|
||||
return formaPagamentoAuxilar.length>2? new BigDecimal(formaPagamentoAuxilar[2].replace(",", ".").trim()):new BigDecimal("0.0");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -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="RelatorioVendaBilhetePorEmpresaAutorizadora" pageWidth="1900" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="1860" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="b92fb063-a827-4619-8a69-5c78e3afbb8c">
|
||||
<property name="ireport.zoom" value="1.610510000000003"/>
|
||||
<property name="ireport.x" value="1719"/>
|
||||
<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"/>
|
||||
<property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2" value="columnHeader"/>
|
||||
|
@ -40,6 +40,7 @@
|
|||
<field name="EMPRESAAUTORIZADORA_ID" class="java.lang.String"/>
|
||||
<field name="EMPRESAAUTORIZADORA" class="java.lang.String"/>
|
||||
<field name="NUMBPE" class="java.lang.String"/>
|
||||
<field name="DATA_EVENTO" class="java.util.Date"/>
|
||||
<variable name="TOTAL_TARIFA" class="java.math.BigDecimal" resetType="Group" resetGroup="EMPRESA_AUTORIZADORA" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{TARIFA}!=null && $F{STATUS_PASSAGEM}.equals("CANCELADO")?$F{TARIFA}.multiply(new java.math.BigDecimal("-1") ):$F{TARIFA}]]></variableExpression>
|
||||
</variable>
|
||||
|
@ -228,14 +229,14 @@
|
|||
<textFieldExpression><![CDATA["N. BPE"]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="175c2491-a0c4-47bb-bfb1-f8cbdfff876a" x="224" y="0" width="110" height="19"/>
|
||||
<reportElement uuid="175c2491-a0c4-47bb-bfb1-f8cbdfff876a" x="254" y="0" width="80" height="19"/>
|
||||
<textElement textAlignment="Left" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA["Cód. Bilheteiro "]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="cf67c704-990d-476b-b216-6c6fc14f5016" x="0" y="0" width="84" height="19"/>
|
||||
<reportElement uuid="cf67c704-990d-476b-b216-6c6fc14f5016" x="74" y="0" width="40" height="19"/>
|
||||
<textElement textAlignment="Left" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
|
@ -281,7 +282,7 @@
|
|||
<textFieldExpression><![CDATA["Tarifa"]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="4e544fca-dc45-44b3-a40e-1f6b2982961f" x="84" y="0" width="140" height="19"/>
|
||||
<reportElement uuid="4e544fca-dc45-44b3-a40e-1f6b2982961f" x="114" y="0" width="140" height="19"/>
|
||||
<textElement textAlignment="Left" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
|
@ -392,19 +393,26 @@
|
|||
</textElement>
|
||||
<textFieldExpression><![CDATA["Vlr. Pago1"]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="16673147-602d-4f0d-9a90-8ec5c0be12f8" x="0" y="0" width="74" height="19"/>
|
||||
<textElement textAlignment="Left" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA["Data.Evento"]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</columnHeader>
|
||||
<detail>
|
||||
<band height="20" splitType="Stretch">
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="e3a43e5d-2326-47c4-9d47-8c4d69d18d99" x="84" y="0" width="140" height="20"/>
|
||||
<reportElement uuid="e3a43e5d-2326-47c4-9d47-8c4d69d18d99" x="114" y="0" width="140" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font fontName="SansSerif" size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{NOME_AGENCIA}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="82c36c16-1662-4af9-a285-c935ab350e79" x="224" y="0" width="110" height="20"/>
|
||||
<reportElement uuid="82c36c16-1662-4af9-a285-c935ab350e79" x="254" y="0" width="80" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font fontName="SansSerif" size="8"/>
|
||||
</textElement>
|
||||
|
@ -544,7 +552,7 @@
|
|||
<textFieldExpression><![CDATA[$F{VALORFORMAPAGO3}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="bc091860-adab-47d8-8352-982bc8e484a3" x="0" y="0" width="84" height="20"/>
|
||||
<reportElement uuid="bc091860-adab-47d8-8352-982bc8e484a3" x="74" y="0" width="40" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font fontName="SansSerif" size="8"/>
|
||||
</textElement>
|
||||
|
@ -557,6 +565,13 @@
|
|||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{NUMBPE}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="7913b2bf-8633-4f59-8168-75ea82fbcfb3" x="0" y="0" width="74" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font fontName="SansSerif" size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{DATA_EVENTO}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</detail>
|
||||
<summary>
|
||||
|
|
|
@ -38,6 +38,7 @@ public class MyComboboxEmpresa extends Combobox {
|
|||
|
||||
this.setAutodrop(false);
|
||||
this.setAutocomplete(false);
|
||||
|
||||
|
||||
this.addEventListener("onOK", new EventListener() {
|
||||
|
||||
|
|
Loading…
Reference in New Issue