fix bugs#AL-3303
parent
3a1311c2d8
commit
b3ce05c204
|
@ -70,6 +70,10 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraAnalitico extends Relato
|
|||
dataResult.put("SERVICO", rset.getBigDecimal("SERVICO"));
|
||||
dataResult.put("DATA_VIAGEM", rset.getDate("DATA_VIAGEM"));
|
||||
dataResult.put("CLASSE", rset.getString("CLASSE"));
|
||||
dataResult.put("EMPRESAAUTORIZADORA", rset.getString("EMPRESAAUTORIZADORA"));
|
||||
dataResult.put("EMPRESAAUTORIZADORA_ID", rset.getString("EMPRESAAUTORIZADORA_ID"));
|
||||
dataResult.put("NUMBPE", rset.getString("NUMBPE"));
|
||||
|
||||
String formasPagamento = rset.getString("descpago");
|
||||
setarAsFormasDePagamento(dataResult, formasPagamento);
|
||||
setarOsValoresDasFormasDePagamento(dataResult, formasPagamento);
|
||||
|
@ -113,10 +117,7 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraAnalitico extends Relato
|
|||
|
||||
private void setarParmetrosObrigatorios(Map<String, Object> parametros, NamedParameterStatement stmt)
|
||||
throws SQLException {
|
||||
stmt.setInt("EMPRESAAUTORIZADORA_ID",
|
||||
Integer.valueOf(parametros.get("EMPRESAAUTORIZADORA_ID").toString()));
|
||||
stmt.setInt("EMPRESA_ID", Integer.valueOf(parametros.get("EMPRESA_ID").toString()));
|
||||
|
||||
stmt.setTimestamp("DATA_INICIAL",
|
||||
new Timestamp(DateUtil.inicioFecha((Date) parametros.get("DATA_INICIAL")).getTime()));
|
||||
stmt.setTimestamp("DATA_FINAL",
|
||||
|
@ -143,7 +144,9 @@ 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(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 ");
|
||||
|
||||
sql.append(" from caja c ");
|
||||
sql.append(" join PUNTO_VENTA pv on c.PUNTOVENTA_ID = pv.PUNTOVENTA_ID ");
|
||||
|
@ -156,9 +159,12 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraAnalitico extends Relato
|
|||
sql.append(" join RUTA_EMPRESA re on re.ruta_id = c.ruta_id ");
|
||||
sql.append(" join CAJA_FORMAPAGO cf on cf.caja_id=c.caja_id ");
|
||||
sql.append(" join FORMA_PAGO fp on fp.formapago_id=cf.formapago_id ");
|
||||
sql.append(" INNER JOIN empresa e on re.empresa_id=e.empresa_id ");
|
||||
sql.append(" where ");
|
||||
sql.append(" m.EMPRESA_ID = :EMPRESA_ID ");
|
||||
sql.append(" and re.empresa_autorizadora_id = :EMPRESAAUTORIZADORA_ID ");
|
||||
sql.append(" and re.empresa_autorizadora_id in ( ");
|
||||
sql.append(parametros.get("EMPRESAAUTORIZADORA_ID"));
|
||||
sql.append(" ) ");
|
||||
sql.append(" and c.FECHORVENTA >= :DATA_INICIAL ");
|
||||
sql.append(" and c.FECHORVENTA <= :DATA_FINAL ");
|
||||
sql.append(" and ((c.indreimpresion = 1 ");
|
||||
|
@ -193,7 +199,10 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraAnalitico extends Relato
|
|||
sql.append(" c.preciopagado, ");
|
||||
sql.append(
|
||||
" (NVL(c.PRECIOPAGADO,0)+(NVL(c.IMPORTEPEDAGIO,0)+ NVL(c.IMPORTETAXAEMBARQUE,0)+ NVL(c.IMPORTESEGURO,0))), ");
|
||||
sql.append(" cs.descclase ");
|
||||
sql.append(" cs.descclase, ");
|
||||
sql.append(" e.empresa_id, ");
|
||||
sql.append(" e.nombempresa, ");
|
||||
sql.append(" c.num_bpe ");
|
||||
sql.append(" ORDER BY u.CVEUSUARIO, ");
|
||||
sql.append(" u.NOMBUSUARIO, ");
|
||||
sql.append(" pv.NUMPUNTOVENTA, ");
|
||||
|
@ -204,6 +213,7 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraAnalitico extends Relato
|
|||
sql.append(" ct.DESCCATEGORIA, ");
|
||||
sql.append(" c.FECCORRIDA, ");
|
||||
sql.append(" c.CORRIDA_ID ");
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -1,8 +1,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="RelatorioVendasBilheteiro" pageWidth="1900" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="1860" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="b92fb063-a827-4619-8a69-5c78e3afbb8c">
|
||||
<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="1661"/>
|
||||
<property name="ireport.y" value="42"/>
|
||||
<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"/>
|
||||
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
|
||||
|
@ -37,11 +37,91 @@
|
|||
<field name="VALORFORMAPAGO2" class="java.math.BigDecimal"/>
|
||||
<field name="FORMAPAGO3" class="java.lang.String"/>
|
||||
<field name="VALORFORMAPAGO3" class="java.math.BigDecimal"/>
|
||||
<field name="EMPRESAAUTORIZADORA_ID" class="java.lang.String"/>
|
||||
<field name="EMPRESAAUTORIZADORA" class="java.lang.String"/>
|
||||
<field name="NUMBPE" class="java.lang.String"/>
|
||||
<variable name="TOTAL_TARIFA" class="java.math.BigDecimal" resetType="Group" resetGroup="EMPRESA_AUTORIZADORA" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{TARIFA}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="TOTALGERAL_TARIFA" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{TARIFA}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="TOTAL_TXEMBARQUE" class="java.math.BigDecimal" resetType="Group" resetGroup="EMPRESA_AUTORIZADORA" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{TX_EMBARQUE}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="TOTALGERAL_TXEMBARQUE" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{TX_EMBARQUE}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="TOTAL_PEDAGIO" class="java.math.BigDecimal" resetType="Group" resetGroup="EMPRESA_AUTORIZADORA" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{PEDAGIO}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="TOTALGERAL_PEDAGIO" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{PEDAGIO}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="TOTAL_TOTALBILHETE" class="java.math.BigDecimal" resetType="Group" resetGroup="EMPRESA_AUTORIZADORA" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{TOTAL_BILHETE}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="TOTALGERAL_TOTALBILHETE" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{TOTAL_BILHETE}]]></variableExpression>
|
||||
</variable>
|
||||
<group name="EMPRESA_AUTORIZADORA">
|
||||
<groupExpression><![CDATA[$F{EMPRESAAUTORIZADORA_ID}]]></groupExpression>
|
||||
<groupHeader>
|
||||
<band height="14">
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="3ec93d43-1f08-475a-bd11-9bc53c203315" x="0" y="0" width="324" height="14"/>
|
||||
<textElement textAlignment="Left" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA["Empresa Autorizadora: "+$F{EMPRESAAUTORIZADORA}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</groupHeader>
|
||||
<groupFooter>
|
||||
<band height="20">
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00">
|
||||
<reportElement uuid="d4ba0dfb-85d4-4e41-9fd7-b624e4ad24c5" x="1096" y="0" width="50" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{TOTAL_TARIFA}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="a2e25eb6-f853-493c-9852-0d1644153a75" mode="Transparent" x="0" y="0" width="996" height="20"/>
|
||||
<textElement>
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA["Total Empresa"]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00">
|
||||
<reportElement uuid="06ead246-abed-4d06-bb77-5545903c4b01" x="996" y="0" width="50" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{TOTAL_TXEMBARQUE}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00">
|
||||
<reportElement uuid="05bfd805-a4f3-4c7f-9e9e-8678a608dc40" x="1046" y="0" width="50" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{TOTAL_PEDAGIO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00">
|
||||
<reportElement uuid="65b21855-710a-4f81-a195-58478b535628" x="1146" y="0" width="70" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{TOTAL_TOTALBILHETE}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</groupFooter>
|
||||
</group>
|
||||
<background>
|
||||
<band splitType="Stretch"/>
|
||||
</background>
|
||||
<pageHeader>
|
||||
<band height="57" splitType="Stretch">
|
||||
<band height="58">
|
||||
<textField pattern="dd/MM/yyyy" isBlankWhenNull="false">
|
||||
<reportElement uuid="42796e20-405c-441f-9fd9-b26238bc7cdb" mode="Transparent" x="44" y="15" width="51" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
||||
|
@ -136,7 +216,15 @@
|
|||
<columnHeader>
|
||||
<band height="19" splitType="Stretch">
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="175c2491-a0c4-47bb-bfb1-f8cbdfff876a" x="234" y="0" width="92" height="19"/>
|
||||
<reportElement uuid="671f2713-5e23-417e-97da-02549215500a" mode="Transparent" x="504" y="0" width="60" height="19" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<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"/>
|
||||
<textElement textAlignment="Left" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
|
@ -150,19 +238,19 @@
|
|||
<textFieldExpression><![CDATA["Cód. Agência"]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="1469ff85-4d82-4fa7-9746-6adc51b556e5" x="324" y="0" width="140" height="19"/>
|
||||
<reportElement uuid="1469ff85-4d82-4fa7-9746-6adc51b556e5" x="334" y="0" width="110" height="19"/>
|
||||
<textElement textAlignment="Left" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA["Nome Bilheteiro"]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="6aff357a-a730-44d1-88cb-80544d6fba00" mode="Transparent" x="466" y="0" width="80" height="19" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<reportElement uuid="6aff357a-a730-44d1-88cb-80544d6fba00" mode="Transparent" x="444" y="0" width="60" height="19" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA["Num. Passagem"]]></textFieldExpression>
|
||||
<textFieldExpression><![CDATA["N. Sistema"]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="e3bbc634-b28e-4fcb-a82b-988d8e080bb1" mode="Transparent" x="1046" y="0" width="50" height="19" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
|
@ -173,7 +261,7 @@
|
|||
<textFieldExpression><![CDATA["Pedágio"]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="11dfc2fe-48d3-4288-a074-7eb075924340" mode="Transparent" x="696" y="0" width="150" height="19" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<reportElement uuid="11dfc2fe-48d3-4288-a074-7eb075924340" mode="Transparent" x="706" y="0" width="140" height="19" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
|
@ -189,14 +277,14 @@
|
|||
<textFieldExpression><![CDATA["Tarifa"]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="4e544fca-dc45-44b3-a40e-1f6b2982961f" x="84" y="0" width="150" height="19"/>
|
||||
<reportElement uuid="4e544fca-dc45-44b3-a40e-1f6b2982961f" x="84" y="0" width="140" height="19"/>
|
||||
<textElement textAlignment="Left" markup="none">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[" Descrição Agência"]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="a9b82414-611c-4d1c-a369-e536f98ff6e4" mode="Transparent" x="546" y="0" width="150" height="19" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<reportElement uuid="a9b82414-611c-4d1c-a369-e536f98ff6e4" mode="Transparent" x="564" y="0" width="142" height="19" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
|
@ -305,49 +393,42 @@
|
|||
<detail>
|
||||
<band height="20" splitType="Stretch">
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="bc091860-adab-47d8-8352-982bc8e484a3" x="0" y="0" width="84" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font fontName="SansSerif" size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{CODIGO_AGENCIA}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="e3a43e5d-2326-47c4-9d47-8c4d69d18d99" x="84" y="0" width="150" height="20"/>
|
||||
<reportElement uuid="e3a43e5d-2326-47c4-9d47-8c4d69d18d99" x="84" 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="234" y="0" width="92" height="20"/>
|
||||
<reportElement uuid="82c36c16-1662-4af9-a285-c935ab350e79" x="224" y="0" width="110" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font fontName="SansSerif" size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{CODIGO_BILHETEIRO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="ef45dd24-19e8-4e92-9759-f8e7a5c990eb" x="324" y="0" width="140" height="20"/>
|
||||
<reportElement uuid="ef45dd24-19e8-4e92-9759-f8e7a5c990eb" x="334" y="0" width="110" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font fontName="SansSerif" size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{NOME_BILHETEIRO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="4cd8a33f-6aaa-47cb-949e-38c6b74d3d39" x="466" y="0" width="80" height="20"/>
|
||||
<reportElement uuid="4cd8a33f-6aaa-47cb-949e-38c6b74d3d39" x="444" y="0" width="60" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font fontName="SansSerif" size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{NUMERO_PASSAGEM}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="17011486-0d4c-4e22-b534-48e0bb025673" x="546" y="0" width="150" height="20"/>
|
||||
<reportElement uuid="17011486-0d4c-4e22-b534-48e0bb025673" x="564" y="0" width="142" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font fontName="SansSerif" size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{ORIGEM}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="false">
|
||||
<reportElement uuid="a89c84e4-0e13-4e85-a565-9eb0bc6e5423" x="696" y="0" width="150" height="20"/>
|
||||
<reportElement uuid="a89c84e4-0e13-4e85-a565-9eb0bc6e5423" x="706" y="0" width="140" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font fontName="SansSerif" size="8"/>
|
||||
</textElement>
|
||||
|
@ -458,12 +539,65 @@
|
|||
</textElement>
|
||||
<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"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font fontName="SansSerif" size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{CODIGO_AGENCIA}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement uuid="55fef3d9-6429-411e-ac82-9a866f0c9548" x="504" y="0" width="60" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font fontName="SansSerif" size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{NUMBPE}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</detail>
|
||||
<summary>
|
||||
<band height="50">
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00">
|
||||
<reportElement uuid="add74cc0-4939-49ac-b312-5728d0c84b3c" x="1096" y="0" width="50" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{TOTALGERAL_TARIFA}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="4969aebc-8a77-4643-8656-be28253ecab9" mode="Transparent" x="0" y="0" width="996" height="20"/>
|
||||
<textElement>
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA["Total Geral"]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00">
|
||||
<reportElement uuid="dedcc820-6920-4ebb-b20b-86552ef15c88" x="996" y="0" width="50" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{TOTALGERAL_TXEMBARQUE}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00">
|
||||
<reportElement uuid="74c9f5d0-242c-45a1-98e0-77ec4a50694a" x="1046" y="0" width="50" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{TOTALGERAL_PEDAGIO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="#,##0.00">
|
||||
<reportElement uuid="eda46e37-be64-4972-83c0-fcea207274e1" x="1146" y="0" width="70" height="20"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{TOTALGERAL_TOTALBILHETE}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</summary>
|
||||
<noData>
|
||||
<band height="20">
|
||||
<textField>
|
||||
<reportElement uuid="995c4c61-6291-4e5f-8d92-b75502a10466" x="103" y="0" width="530" height="20"/>
|
||||
<reportElement uuid="995c4c61-6291-4e5f-8d92-b75502a10466" x="84" y="0" width="530" height="20"/>
|
||||
<textElement markup="none">
|
||||
<font size="11" isBold="true"/>
|
||||
</textElement>
|
||||
|
|
|
@ -9,6 +9,7 @@ import java.util.Map;
|
|||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
|
@ -22,6 +23,7 @@ import org.zkoss.zul.Comboitem;
|
|||
import org.zkoss.zul.Datebox;
|
||||
import org.zkoss.zul.Paging;
|
||||
import org.zkoss.zul.Radio;
|
||||
import org.zkoss.zul.Row;
|
||||
import org.zkoss.zul.Textbox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
|
@ -88,18 +90,29 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraController extends MyGen
|
|||
private Radio radioSintetico;
|
||||
private Radio radioAnalitico;
|
||||
|
||||
private Row rowTipoReletario;
|
||||
|
||||
|
||||
|
||||
private static final Short EMPRESA_OPERADORA = 4;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
super.doAfterCompose(comp);
|
||||
lsEmpresaAutorizadora = buscarEmpresaDiferenteDeOperadora();
|
||||
lsEmpresaAutorizadora = buscarEmpresaDiferenteDeOperadora(true);
|
||||
lsEmpresa = buscarEmpresaOperadora();
|
||||
puntoVentaList.setItemRenderer(new RenderRelatorioVendasBilheteiro());
|
||||
puntoVentaSelList.setItemRenderer(new RenderRelatorioVendasBilheteiroSelecionados());
|
||||
usuarioList.setItemRenderer(new RenderRelatorioCheckinUsuario());
|
||||
usuarioSelList.setItemRenderer(new RenderRelatorioCheckinUsuariosSelecionados());
|
||||
rowTipoReletario.setVisible(false);
|
||||
setarValorInicialCmbEmpresa();
|
||||
}
|
||||
|
||||
private void setarValorInicialCmbEmpresa() {
|
||||
if(lsEmpresa!=null && !lsEmpresa.isEmpty()) {
|
||||
cmbEmpresa.setValue(lsEmpresa.get(0).toString());
|
||||
}
|
||||
}
|
||||
|
||||
public List<Empresa> getLsEmpresa() {
|
||||
|
@ -346,15 +359,21 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraController extends MyGen
|
|||
}
|
||||
}
|
||||
|
||||
private List<Empresa> buscarEmpresaDiferenteDeOperadora() {
|
||||
private List<Empresa> buscarEmpresaDiferenteDeOperadora(boolean isTodas) {
|
||||
List<Empresa> todasAsEmpresas = empresaService.obtenerTodos();
|
||||
List<Empresa> empOperadoras = new ArrayList<Empresa>();
|
||||
List<Empresa> emAutorizadora = new ArrayList<Empresa>();
|
||||
if(isTodas) {
|
||||
Empresa empresa = new Empresa();
|
||||
empresa.setEmpresaId(-1);
|
||||
empresa.setNombempresa("TODAS");
|
||||
emAutorizadora.add(empresa);
|
||||
}
|
||||
for (Empresa emp : todasAsEmpresas) {
|
||||
if (emp.getIndTipo() != EMPRESA_OPERADORA) {
|
||||
empOperadoras.add(emp);
|
||||
emAutorizadora.add(emp);
|
||||
}
|
||||
}
|
||||
return empOperadoras;
|
||||
return emAutorizadora;
|
||||
}
|
||||
|
||||
private List<Empresa> buscarEmpresaOperadora() {
|
||||
|
@ -373,12 +392,18 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraController extends MyGen
|
|||
}
|
||||
|
||||
private void executarRelatorio() throws Exception {
|
||||
Relatorio relatorio;
|
||||
|
||||
if(lsEmpresaAutorizadora.size()<=1) {
|
||||
Messagebox.show(Labels.getLabel("relatorioVendaBilhetePorEmpresaAutorizadoraController.naoexisteempresaautorizadora"),
|
||||
Labels.getLabel("relatorioVendaBilhetePorEmpresaAutorizadoraController.window.title"), Messagebox.OK,
|
||||
Messagebox.ERROR);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||
StringBuilder filtro = new StringBuilder();
|
||||
|
||||
|
||||
|
||||
carregaValoresEmpresaAutorizadora(parametros, filtro);
|
||||
carregaValoresEmpresa(parametros, filtro);
|
||||
carregaValoresAgencia(parametros, filtro);
|
||||
|
@ -489,7 +514,7 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraController extends MyGen
|
|||
filtro.append(" Empresa: ");
|
||||
|
||||
Comboitem itemEmpresa = cmbEmpresa.getSelectedItem();
|
||||
if (itemEmpresa != null) {
|
||||
if (itemEmpresa != null && !isEmpresaTodas(itemEmpresa)) {
|
||||
Empresa empresa = (Empresa) itemEmpresa.getValue();
|
||||
parametros.put("EMPRESA_ID", empresa.getEmpresaId());
|
||||
parametros.put("EMPRESA", empresa.getNombempresa());
|
||||
|
@ -499,17 +524,59 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraController extends MyGen
|
|||
}
|
||||
}
|
||||
|
||||
private boolean isEmpresaTodas(Comboitem itemEmpresa ) {
|
||||
Empresa empresa = (Empresa) itemEmpresa.getValue();
|
||||
return empresa.getEmpresaId().equals(-1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void carregaValoresEmpresaAutorizadora(Map<String, Object> parametros, StringBuilder filtro) {
|
||||
filtro.append(" Empresa Autorizadora: ");
|
||||
Comboitem itemEmpresaAutorizadora = cmbEmpresaAutorizadora.getSelectedItem();
|
||||
if (itemEmpresaAutorizadora != null) {
|
||||
if (!isEmpresaTodas(itemEmpresaAutorizadora)) {
|
||||
Empresa empresa = (Empresa) itemEmpresaAutorizadora.getValue();
|
||||
parametros.put("EMPRESAAUTORIZADORA_ID", empresa.getEmpresaId());
|
||||
parametros.put("EMPRESAAUTORIZADORA", empresa.getNombempresa());
|
||||
filtro.append(empresa.getNombempresa() + ";");
|
||||
} else {
|
||||
filtro.append(" Todas;");
|
||||
filtro.append("TODAS;");
|
||||
parametros.put("EMPRESAAUTORIZADORA_ID", carregarOsIdsDeTodasAsEmpresasAutorizadoras());
|
||||
}
|
||||
}
|
||||
|
||||
private String carregarOsIdsDeTodasAsEmpresasAutorizadoras() {
|
||||
List <Empresa> listEmpresasAutorizadora = buscarEmpresaDiferenteDeOperadora(false);
|
||||
StringBuilder string = new StringBuilder();
|
||||
|
||||
if(listEmpresasAutorizadora!=null && !listEmpresasAutorizadora.isEmpty()) {
|
||||
for(Empresa e : listEmpresasAutorizadora) {
|
||||
if(StringUtils.isNotBlank(string.toString())) {
|
||||
string.append(",");
|
||||
}
|
||||
string.append(e.getEmpresaId());
|
||||
}
|
||||
return string.toString();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private List<Integer> retornarListEmpresaAutorizadoraeIds() {
|
||||
List <Empresa> listEmpresasAutorizadora = buscarEmpresaDiferenteDeOperadora(false);
|
||||
List<Integer> listEmpresasAutorizadoraInteger = new ArrayList<Integer>();
|
||||
for (Empresa e : listEmpresasAutorizadora) {
|
||||
listEmpresasAutorizadoraInteger.add(e.getEmpresaId());
|
||||
}
|
||||
return listEmpresasAutorizadoraInteger;
|
||||
}
|
||||
|
||||
private Integer[] converterEmpresaAutorizadoraeEmArrayDeEmpresaId() {
|
||||
return converteListIdsEmArrayIds(retornarListEmpresaAutorizadoraeIds());
|
||||
}
|
||||
|
||||
private Integer[] converteListIdsEmArrayIds(List<Integer> ids) {
|
||||
Integer[] arrayIds = new Integer[ids.size()];
|
||||
arrayIds = ids.toArray(arrayIds);
|
||||
return arrayIds;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -417,7 +417,7 @@ indexController.mniRelatorioVendaEmbarcada.label = Venda Embarcada
|
|||
indexController.mniRelatorioCaixaOrgaoConcedente.label = Relatório Caixa por Órgão Concedente
|
||||
indexController.mniRelatorioW2I.label = Relatório Seguro W2I
|
||||
indexController.mniRelatorioTxEmbW2I.label = Relatório Taxa Embarque W2I
|
||||
indexController.mniRelatorioVendaPorEmpresaAutorizadora.label= Relatório de venda Por Empresa Autorizadora
|
||||
indexController.mniRelatorioVendaPorEmpresaAutorizadora.label= Relatório de Venda por Empresa Autorizadora
|
||||
|
||||
indexController.mnSubMenuImpressaoFiscal.label=Impressão Fiscal
|
||||
indexController.mnSubMenuRelatorioImpressaoFiscal.label=Importação Fiscal
|
||||
|
@ -1345,7 +1345,7 @@ relatorioPosicaoVendaBilheteIdosoController.tpTrecho.label = Trecho
|
|||
relatorioPosicaoVendaBilheteIdosoController.tpPassageiro.label = Passageiro
|
||||
|
||||
#Relatório de venda Por Empresa Autorizadora
|
||||
relatorioVendaBilhetePorEmpresaAutorizadoraController.window.title = Relatório de venda Por Empresa Autorizadora
|
||||
relatorioVendaBilhetePorEmpresaAutorizadoraController.window.title = Relatório de Venda Por Empresa Autorizadora
|
||||
relatorioVendaBilhetePorEmpresaAutorizadoraController.lbDatInicial.value = Data inicial
|
||||
relatorioVendaBilhetePorEmpresaAutorizadoraController.lbDatFinal.value = Data final
|
||||
relatorioVendaBilhetePorEmpresaAutorizadoraController.lbPuntoVenta.value = Agência
|
||||
|
@ -1362,9 +1362,9 @@ relatorioVendaBilhetePorEmpresaAutorizadoraController.lbLayoutDiario.value = Di
|
|||
relatorioVendaBilhetePorEmpresaAutorizadoraController.lbLayoutResumo.value = Resumo
|
||||
relatorioVendaBilhetePorEmpresaAutorizadoraController.analitico.value = Analitico
|
||||
relatorioVendaBilhetePorEmpresaAutorizadoraController.sintetico.value = Sintetico
|
||||
relatorioVendaBilhetePorEmpresaAutorizadoraController.nomeRelatorioAnalitico.value = Relatório analitico de venda Por Empresa Autorizadora
|
||||
relatorioVendaBilhetePorEmpresaAutorizadoraController.nomeRelatorioSintetico.value = Relatório sintetico de venda Por Empresa Autorizadora
|
||||
|
||||
relatorioVendaBilhetePorEmpresaAutorizadoraController.nomeRelatorioAnalitico.value = Relatório Analitico de Venda por Empresa Autorizadora
|
||||
relatorioVendaBilhetePorEmpresaAutorizadoraController.nomeRelatorioSintetico.value = Relatório Sintetico de Venda por Empresa Autorizadora
|
||||
relatorioVendaBilhetePorEmpresaAutorizadoraController.naoexisteempresaautorizadora = Não Existe Empresa Autorizadora no sistema
|
||||
# Pantalla Editar Classe
|
||||
editarClaseServicioController.window.title = Tipo de Classe
|
||||
editarClaseServicioController.btnApagar.tooltiptext = Eliminar
|
||||
|
|
|
@ -175,7 +175,8 @@
|
|||
</columns>
|
||||
<rows>
|
||||
|
||||
<row spans="3">
|
||||
<row spans="3" id="rowTipoReletario">
|
||||
|
||||
<radiogroup >
|
||||
<label
|
||||
value="${c:l('relatorioVendaBilhetePorEmpresaAutorizadoraController.analitico.value')}" />
|
||||
|
|
Loading…
Reference in New Issue