fixes bug#24149

dev: Celio
qua:

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@111695 d1611594-4594-4d17-8e1d-87c2c4800839
master
fabio 2022-04-05 21:33:48 +00:00
parent 44a178dd45
commit 45ce420e9a
4 changed files with 179 additions and 121 deletions

View File

@ -14,8 +14,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
public class RelatorioReceitaServico extends Relatorio {
public RelatorioReceitaServico(Map<String, Object> parametros, Connection conexao) throws Exception
{
public RelatorioReceitaServico(Map<String, Object> parametros, Connection conexao) throws Exception {
super(parametros, conexao);
this.setCustomDataSource(new ArrayDataSource(this) {
@ -51,8 +50,6 @@ public class RelatorioReceitaServico extends Relatorio {
if (parametros.get("CLASESERVICIO_ID") != null && (!parametros.get("CLASESERVICIO_ID").equals("")))
stmt.setInt("CLASESERVICIO_ID", (Integer) parametros.get("CLASESERVICIO_ID"));
// else
// stmt.setNull("CLASESERVICIO_ID", java.sql.Types.INTEGER);
ResultSet rset = stmt.executeQuery();
@ -73,6 +70,7 @@ public class RelatorioReceitaServico extends Relatorio {
dataResult.put("total", rset.getBigDecimal("total"));
dataResult.put("tipo", rset.getString("tipo"));
dataResult.put("agencia", rset.getString("agencia"));
dataResult.put("telefone", rset.getString("telefone"));
dataResult.put("dataHoraCompra", rset.getTimestamp("dataHoraCompra"));
dataResult.put("passageiro", !(rset.getString("passageiro") == null) ? rset.getString("passageiro") : "");
dataResult.put("nrBilhete", !(rset.getString("nrBilhete") == null) ? rset.getString("nrBilhete") : "");
@ -107,6 +105,7 @@ public class RelatorioReceitaServico extends Relatorio {
sql.append("p.nombpuntoventa AS agencia, ");
sql.append("b.fechorventa AS dataHoraCompra, ");
sql.append("b.nombpasajero AS passageiro, ");
sql.append("b.desctelefono AS telefone, ");
sql.append("b.NUMFOLIOSISTEMA AS nrBilhete ");
sql.append("FROM BOLETO b ");
sql.append("INNER JOIN marca mar ON b.marca_id = mar.marca_id ");

View File

@ -1,6 +1,6 @@
<?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="RelatorioReceitaServico" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="c092ef85-9334-4225-93d7-1acb7cf4d021">
<property name="ireport.zoom" value="1.2100000000000002"/>
<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="RelatorioReceitaServico" pageWidth="882" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="842" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="c092ef85-9334-4225-93d7-1acb7cf4d021">
<property name="ireport.zoom" value="1.331000000000001"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2" value="pageHeader"/>
@ -29,6 +29,7 @@
<field name="passageiro" class="java.lang.String"/>
<field name="nrBilhete" class="java.lang.String"/>
<field name="preciobase" class="java.math.BigDecimal"/>
<field name="telefone" class="java.lang.String"/>
<variable name="totalizador" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[$F{total}]]></variableExpression>
</variable>
@ -45,9 +46,9 @@
<band splitType="Stretch"/>
</background>
<pageHeader>
<band height="82" splitType="Stretch">
<band height="65" splitType="Stretch">
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="136a5066-d141-4362-af36-0780f0d16542" mode="Transparent" x="11" y="0" width="257" height="35" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement uuid="136a5066-d141-4362-af36-0780f0d16542" mode="Transparent" x="1" y="0" width="699" height="28" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="15" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
@ -55,7 +56,7 @@
<textFieldExpression><![CDATA[$P{NOME_RELATORIO}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="3dca1764-758d-4e1c-80c0-85cc02e47813" mode="Transparent" x="11" y="35" width="72" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement uuid="3dca1764-758d-4e1c-80c0-85cc02e47813" mode="Transparent" x="1" y="28" width="49" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
@ -63,7 +64,7 @@
<textFieldExpression><![CDATA[$R{cabecalho.periodo}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="8948c0fc-e878-45e2-8505-7934add98ab9" mode="Transparent" x="150" y="35" width="10" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement uuid="8948c0fc-e878-45e2-8505-7934add98ab9" mode="Transparent" x="100" y="28" width="10" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
@ -71,7 +72,7 @@
<textFieldExpression><![CDATA[$R{cabecalho.periodoA}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy" isBlankWhenNull="false">
<reportElement uuid="7f1b9715-baaf-4e20-9a9d-a7ec4c696587" mode="Transparent" x="83" y="35" width="66" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement uuid="7f1b9715-baaf-4e20-9a9d-a7ec4c696587" mode="Transparent" x="50" y="28" width="50" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
@ -79,7 +80,7 @@
<textFieldExpression><![CDATA[$P{DATA_INICIAL}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy" isBlankWhenNull="false">
<reportElement uuid="64632058-9466-479c-ae28-0a11c9ed2c7f" mode="Transparent" x="160" y="35" width="66" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement uuid="64632058-9466-479c-ae28-0a11c9ed2c7f" mode="Transparent" x="110" y="28" width="46" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
@ -87,33 +88,30 @@
<textFieldExpression><![CDATA[$P{DATA_FINAL}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="a9d471fb-1e1d-4d9a-9783-bbf988931192" x="554" y="0" width="122" height="25"/>
<textElement textAlignment="Right">
<reportElement uuid="a9d471fb-1e1d-4d9a-9783-bbf988931192" x="700" y="0" width="57" height="13"/>
<textElement textAlignment="Left">
<font size="9" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{cabecalho.dataHora}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="false">
<reportElement uuid="0d200750-aabf-4c7e-b27b-c0e7af4802a9" mode="Transparent" x="691" y="0" width="111" height="25" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement uuid="0d200750-aabf-4c7e-b27b-c0e7af4802a9" mode="Transparent" x="757" y="0" width="85" height="13" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
<line>
<reportElement uuid="bbf33a72-515f-42fc-8c79-e859aebca31d" x="0" y="54" width="802" height="5"/>
</line>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="bae9bec6-8c42-4bee-a070-34b0a7f1aee4" mode="Transparent" x="571" y="27" width="105" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<reportElement uuid="bae9bec6-8c42-4bee-a070-34b0a7f1aee4" mode="Transparent" x="700" y="13" width="57" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{cabecalho.pagina}+" "+$V{PAGE_NUMBER}+" "+$R{cabecalho.de}]]></textFieldExpression>
</textField>
<textField evaluationTime="Report" pattern="" isBlankWhenNull="false">
<reportElement uuid="314e312c-8f24-42de-8354-3c1f7241a985" mode="Transparent" x="691" y="27" width="35" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement uuid="314e312c-8f24-42de-8354-3c1f7241a985" mode="Transparent" x="757" y="13" width="85" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
@ -121,329 +119,410 @@
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="4e030613-9cee-443e-9eaa-b19fa3090976" mode="Transparent" x="468" y="42" width="208" height="12" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<reportElement uuid="4e030613-9cee-443e-9eaa-b19fa3090976" mode="Transparent" x="700" y="28" width="57" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{cabecalho.impressorPor}+" "+$P{USUARIO}]]></textFieldExpression>
<textFieldExpression><![CDATA[$R{cabecalho.impressorPor}]]></textFieldExpression>
</textField>
<line>
<reportElement uuid="6ca45088-a58d-43b3-b196-8fc26e128fbf" x="0" y="77" width="802" height="5"/>
</line>
<textField>
<reportElement uuid="b29d0494-2695-420b-bdc1-b13c08bdbcda" x="0" y="59" width="802" height="14"/>
<reportElement uuid="b29d0494-2695-420b-bdc1-b13c08bdbcda" x="0" y="51" width="842" height="14"/>
<box>
<topPen lineWidth="0.75"/>
<bottomPen lineWidth="0.75"/>
</box>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$P{FILTROS}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="469acc35-aa0a-41d9-ad44-544cf484879a" mode="Transparent" x="757" y="28" width="85" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$P{USUARIO}]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<columnHeader>
<band height="61" splitType="Stretch">
<band height="12" splitType="Stretch">
<staticText>
<reportElement uuid="5f9a0ea4-15d3-4bad-953a-0dc6f3f6ef51" x="1" y="33" width="48" height="28"/>
<reportElement uuid="5f9a0ea4-15d3-4bad-953a-0dc6f3f6ef51" x="1" y="0" width="38" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement textAlignment="Left">
<font size="7" isItalic="false"/>
</textElement>
<text><![CDATA[Data]]></text>
</staticText>
<staticText>
<reportElement uuid="fa0a31b5-6a94-4b0c-b730-4b6ef8f2304c" x="49" y="33" width="51" height="28"/>
<reportElement uuid="fa0a31b5-6a94-4b0c-b730-4b6ef8f2304c" x="39" y="0" width="51" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement textAlignment="Left">
<font size="7" isBold="true" isItalic="false"/>
</textElement>
<text><![CDATA[Serviço]]></text>
</staticText>
<staticText>
<reportElement uuid="a797bc17-1810-47b7-a3e1-510cc6403454" x="100" y="33" width="66" height="28"/>
<reportElement uuid="a797bc17-1810-47b7-a3e1-510cc6403454" x="90" y="0" width="66" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement textAlignment="Left">
<font size="7" isBold="false" isItalic="false"/>
</textElement>
<text><![CDATA[Empresa]]></text>
</staticText>
<staticText>
<reportElement uuid="765ebd99-b6de-4c8e-910d-b3e5bf9db573" x="166" y="33" width="30" height="28"/>
<reportElement uuid="765ebd99-b6de-4c8e-910d-b3e5bf9db573" x="156" y="0" width="30" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement textAlignment="Left">
<font size="7" isItalic="false"/>
</textElement>
<text><![CDATA[Origem]]></text>
</staticText>
<staticText>
<reportElement uuid="2f3b9ac0-165c-4718-96c8-a37f005b5b82" x="196" y="33" width="33" height="28"/>
<reportElement uuid="2f3b9ac0-165c-4718-96c8-a37f005b5b82" x="186" y="0" width="30" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement textAlignment="Left">
<font size="7" isItalic="false"/>
</textElement>
<text><![CDATA[Destino]]></text>
</staticText>
<staticText>
<reportElement uuid="9eb87b55-da02-478a-b21d-c7b727dbaafe" x="229" y="33" width="68" height="28"/>
<reportElement uuid="9eb87b55-da02-478a-b21d-c7b727dbaafe" x="216" y="0" width="68" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement textAlignment="Left">
<font size="7" isItalic="false"/>
</textElement>
<text><![CDATA[Classe]]></text>
</staticText>
<staticText>
<reportElement uuid="fe1e6ace-6d95-4089-8f28-d926554bf65d" x="297" y="33" width="40" height="28"/>
<textElement textAlignment="Left">
<font size="7" isItalic="false"/>
</textElement>
<text><![CDATA[Tarifa]]></text>
</staticText>
<staticText>
<reportElement uuid="52d26417-4766-44b3-aaa7-b468c124feda" x="374" y="33" width="34" height="28"/>
<reportElement uuid="52d26417-4766-44b3-aaa7-b468c124feda" x="361" y="0" width="34" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement textAlignment="Left">
<font size="7" isItalic="false"/>
</textElement>
<text><![CDATA[TUT]]></text>
</staticText>
<staticText>
<reportElement uuid="3f6afcbf-9dfe-4f1b-b937-45dbc9ace8a2" x="408" y="33" width="41" height="28"/>
<reportElement uuid="3f6afcbf-9dfe-4f1b-b937-45dbc9ace8a2" x="395" y="0" width="41" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement textAlignment="Left">
<font size="7" isItalic="false" isStrikeThrough="false"/>
</textElement>
<text><![CDATA[Pedágio]]></text>
</staticText>
<staticText>
<reportElement uuid="182474d6-668a-4847-9db6-ba65c41119aa" x="449" y="33" width="40" height="28"/>
<reportElement uuid="182474d6-668a-4847-9db6-ba65c41119aa" x="436" y="0" width="40" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement textAlignment="Left">
<font size="7" isItalic="false"/>
</textElement>
<text><![CDATA[Total]]></text>
</staticText>
<staticText>
<reportElement uuid="a7b14fa8-3b89-4f4d-b265-63eb3d930b04" x="489" y="33" width="40" height="28"/>
<reportElement uuid="a7b14fa8-3b89-4f4d-b265-63eb3d930b04" x="476" y="0" width="40" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<text><![CDATA[Tipo]]></text>
</staticText>
<staticText>
<reportElement uuid="10f27b7d-5cc9-423c-a196-330c78cdb69e" x="529" y="33" width="73" height="28"/>
<reportElement uuid="10f27b7d-5cc9-423c-a196-330c78cdb69e" x="516" y="0" width="73" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<text><![CDATA[Agência]]></text>
</staticText>
<staticText>
<reportElement uuid="f2097833-6bd3-4523-b457-44ed6cc4abd6" x="602" y="33" width="43" height="28"/>
<reportElement uuid="f2097833-6bd3-4523-b457-44ed6cc4abd6" x="589" y="0" width="38" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<text><![CDATA[Data]]></text>
</staticText>
<staticText>
<reportElement uuid="44b2bf55-871a-4eaa-97d4-74bee2a89769" x="678" y="33" width="57" height="28"/>
<reportElement uuid="44b2bf55-871a-4eaa-97d4-74bee2a89769" x="660" y="0" width="77" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<text><![CDATA[Passageiro]]></text>
</staticText>
<staticText>
<reportElement uuid="2abbc372-a813-4da6-8ce1-e5901a15b430" x="735" y="33" width="39" height="28"/>
<reportElement uuid="2abbc372-a813-4da6-8ce1-e5901a15b430" x="785" y="0" width="39" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<text><![CDATA[Nr bilhete ]]></text>
</staticText>
<staticText>
<reportElement uuid="2bd47a58-e591-4b32-bdd4-fa43ece0c581" x="774" y="33" width="28" height="28"/>
<reportElement uuid="2bd47a58-e591-4b32-bdd4-fa43ece0c581" x="824" y="0" width="18" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<text><![CDATA[Status]]></text>
</staticText>
<line>
<reportElement uuid="a11636cc-5ee1-44cc-8cd1-cbe2ebc47abb" x="0" y="56" width="802" height="5"/>
</line>
<staticText>
<reportElement uuid="bceca474-7703-4bf0-a0da-d8e15b70aeca" x="645" y="33" width="33" height="28"/>
<reportElement uuid="bceca474-7703-4bf0-a0da-d8e15b70aeca" x="627" y="0" width="33" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<text><![CDATA[Hora]]></text>
</staticText>
<staticText>
<reportElement uuid="39e49959-967f-4fd2-8b92-a0331dcce1e3" x="337" y="33" width="37" height="28"/>
<reportElement uuid="39e49959-967f-4fd2-8b92-a0331dcce1e3" x="324" y="0" width="37" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement textAlignment="Left">
<font size="7" isItalic="false"/>
</textElement>
<text><![CDATA[Original]]></text>
</staticText>
<staticText>
<reportElement uuid="ba3a04df-c753-4e07-88b8-132742d097a0" x="737" y="0" width="48" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement>
<font size="7" isBold="true" isItalic="false"/>
</textElement>
<text><![CDATA[Telefone]]></text>
</staticText>
<staticText>
<reportElement uuid="fe1e6ace-6d95-4089-8f28-d926554bf65d" x="284" y="0" width="40" height="12"/>
<box>
<bottomPen lineWidth="0.75"/>
</box>
<textElement textAlignment="Left">
<font size="7" isItalic="false"/>
</textElement>
<text><![CDATA[Tarifa]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="23" splitType="Stretch">
<band height="12" splitType="Stretch">
<textField>
<reportElement uuid="b15ada19-a1c0-4feb-9734-3a6c624bbfe6" x="49" y="0" width="51" height="20"/>
<reportElement uuid="b15ada19-a1c0-4feb-9734-3a6c624bbfe6" x="39" y="0" width="51" height="12"/>
<textElement>
<font size="7" isBold="true" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{servico}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="c35afacb-b160-4ace-b7be-c2e2f54ac1c0" x="100" y="0" width="66" height="20"/>
<reportElement uuid="c35afacb-b160-4ace-b7be-c2e2f54ac1c0" x="90" y="0" width="66" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{empresa}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="fd8ae360-3ae2-4adc-8c3a-fcfb19551d22" x="166" y="0" width="30" height="20"/>
<reportElement uuid="fd8ae360-3ae2-4adc-8c3a-fcfb19551d22" x="156" y="0" width="30" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{origem}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="29ae3fa8-9db1-46c8-bcf7-cb9aa7bc6eb3" x="196" y="0" width="33" height="20"/>
<reportElement uuid="29ae3fa8-9db1-46c8-bcf7-cb9aa7bc6eb3" x="186" y="0" width="30" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{destino}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="7265d085-4188-44a0-8e04-e5efdb0d5ccf" x="229" y="0" width="68" height="20"/>
<reportElement uuid="7265d085-4188-44a0-8e04-e5efdb0d5ccf" x="216" y="0" width="68" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{classe}]]></textFieldExpression>
</textField>
<textField pattern="¤ #,##0.00">
<reportElement uuid="6430daa4-d318-4f4a-87ff-2ea4de9d492e" x="297" y="0" width="41" height="20"/>
<reportElement uuid="6430daa4-d318-4f4a-87ff-2ea4de9d492e" x="284" y="0" width="41" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{tarifa}]]></textFieldExpression>
</textField>
<textField pattern="¤ #,##0.00">
<reportElement uuid="49faea3b-2ce4-469a-b07c-3b4869aaa9e5" x="374" y="0" width="34" height="20"/>
<reportElement uuid="49faea3b-2ce4-469a-b07c-3b4869aaa9e5" x="361" y="0" width="34" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{tut}]]></textFieldExpression>
</textField>
<textField pattern="¤ #,##0.00">
<reportElement uuid="16461919-04ea-48df-af5c-7f0d7dcb7fab" x="408" y="0" width="41" height="20"/>
<reportElement uuid="16461919-04ea-48df-af5c-7f0d7dcb7fab" x="395" y="0" width="41" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{pedagio}]]></textFieldExpression>
</textField>
<textField pattern="¤ #,##0.00">
<reportElement uuid="97be07ba-bdb1-4bf2-91af-554b580ee3fa" x="449" y="0" width="40" height="20"/>
<reportElement uuid="97be07ba-bdb1-4bf2-91af-554b580ee3fa" x="436" y="0" width="40" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{total}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="8cf0c102-4e42-4f6d-8922-8edc808fdc0f" x="489" y="0" width="40" height="20"/>
<reportElement uuid="8cf0c102-4e42-4f6d-8922-8edc808fdc0f" x="476" y="0" width="40" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{tipo}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="0ecedfc0-febb-40e0-b5ca-168b5a296646" x="529" y="0" width="73" height="20"/>
<reportElement uuid="0ecedfc0-febb-40e0-b5ca-168b5a296646" x="516" y="0" width="73" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{agencia}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="8229beec-daa6-4357-a4c9-f475d7a873aa" x="602" y="0" width="43" height="20"/>
<reportElement uuid="8229beec-daa6-4357-a4c9-f475d7a873aa" x="589" y="0" width="38" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy").format($F{dataHoraCompra})]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="8e67c346-5c72-4a92-beee-9dd9ad647bb1" x="678" y="0" width="57" height="20"/>
<reportElement uuid="8e67c346-5c72-4a92-beee-9dd9ad647bb1" x="660" y="0" width="77" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{passageiro}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="9a639996-146c-42c9-a8fd-f947a59310f4" x="735" y="0" width="39" height="20"/>
<reportElement uuid="9a639996-146c-42c9-a8fd-f947a59310f4" x="785" y="0" width="39" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{nrBilhete}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy">
<reportElement uuid="bfb9d635-bbc1-4e92-890a-df8299bc8daa" x="0" y="0" width="49" height="20"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{data}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="8d419689-a353-4332-8e39-222dde198168" x="645" y="0" width="33" height="20"/>
<reportElement uuid="8d419689-a353-4332-8e39-222dde198168" x="627" y="0" width="33" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[new SimpleDateFormat("HH:mm:ss").format($F{dataHoraCompra})]]></textFieldExpression>
</textField>
<textField pattern="¤ #,##0.00">
<reportElement uuid="48c368c2-dd11-4724-a5e9-b3f139464d4a" x="338" y="0" width="36" height="20"/>
<reportElement uuid="48c368c2-dd11-4724-a5e9-b3f139464d4a" x="325" y="0" width="36" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{preciobase}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="1f6449f5-835f-41f2-8c41-94eb91e54fa2" x="774" y="0" width="28" height="20"/>
<reportElement uuid="1f6449f5-835f-41f2-8c41-94eb91e54fa2" x="824" y="0" width="18" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[""]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy">
<reportElement uuid="bfb9d635-bbc1-4e92-890a-df8299bc8daa" x="1" y="0" width="38" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{data}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="7dedf3ee-5d5b-48e0-b56c-5fea86d1d80c" stretchType="RelativeToBandHeight" x="737" y="0" width="48" height="12"/>
<textElement>
<font size="7" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{telefone}]]></textFieldExpression>
</textField>
</band>
</detail>
<summary>
<band height="100" splitType="Stretch">
<band height="77" splitType="Stretch">
<textField pattern="¤ #,##0.00">
<reportElement uuid="4bbf9db6-cc01-4cc0-98fa-7522eb890d4c" x="144" y="78" width="178" height="20"/>
<textElement>
<reportElement uuid="4bbf9db6-cc01-4cc0-98fa-7522eb890d4c" x="186" y="60" width="98" height="14"/>
<box leftPadding="1"/>
<textElement textAlignment="Right">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$V{totalizador}]]></textFieldExpression>
</textField>
<textField pattern="¤ #,##0.00">
<reportElement uuid="381ba8fc-878f-4419-8c93-758a607e9ba3" x="144" y="18" width="178" height="20"/>
<textElement/>
<reportElement uuid="381ba8fc-878f-4419-8c93-758a607e9ba3" x="186" y="18" width="98" height="14"/>
<box leftPadding="1"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$V{TOTAL_TARIFA}]]></textFieldExpression>
</textField>
<textField pattern="¤ #,##0.00">
<reportElement uuid="a36d2d34-3721-4796-93ec-3cf838aebf85" x="144" y="38" width="178" height="20"/>
<textElement/>
<reportElement uuid="a36d2d34-3721-4796-93ec-3cf838aebf85" x="186" y="32" width="98" height="14"/>
<box leftPadding="1"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$V{TOTAL_TUT}]]></textFieldExpression>
</textField>
<textField pattern="¤ #,##0.00">
<reportElement uuid="219227d5-1615-4876-a810-c6393957ccd0" x="144" y="58" width="178" height="20"/>
<textElement/>
<reportElement uuid="219227d5-1615-4876-a810-c6393957ccd0" x="186" y="46" width="98" height="14"/>
<box leftPadding="1"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$V{TOTAL_PEDAGIO}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="d4600e8d-457a-47cf-aa81-84b1231728fe" x="15" y="18" width="100" height="20"/>
<reportElement uuid="d4600e8d-457a-47cf-aa81-84b1231728fe" x="1" y="18" width="185" height="14"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Total Tarifa]]></text>
</staticText>
<staticText>
<reportElement uuid="5b0f4977-d53a-4fcb-a16f-88c1edd8493b" x="15" y="38" width="100" height="20"/>
<reportElement uuid="5b0f4977-d53a-4fcb-a16f-88c1edd8493b" x="1" y="32" width="185" height="14"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Total Tut]]></text>
</staticText>
<staticText>
<reportElement uuid="f6849b27-f317-458b-b4f3-8d96a150962e" x="15" y="58" width="100" height="20"/>
<reportElement uuid="f6849b27-f317-458b-b4f3-8d96a150962e" x="1" y="46" width="185" height="14"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Total Pedágio]]></text>
</staticText>
<staticText>
<reportElement uuid="9f5fda19-bdf2-4600-ba05-aa2ded9c6a89" x="15" y="79" width="100" height="20"/>
<reportElement uuid="9f5fda19-bdf2-4600-ba05-aa2ded9c6a89" x="1" y="60" width="185" height="14"/>
<textElement textAlignment="Right"/>
<text><![CDATA[Total Receita]]></text>
</staticText>
@ -452,8 +531,8 @@
<noData>
<band height="50">
<textField>
<reportElement uuid="6f13c961-dd50-4e44-ba73-65e0752b8b83" x="46" y="24" width="530" height="26"/>
<textElement markup="none">
<reportElement uuid="6f13c961-dd50-4e44-ba73-65e0752b8b83" x="-1" y="0" width="843" height="50"/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
<font size="11" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>

View File

@ -1,6 +1,5 @@
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -124,16 +123,13 @@ public class RelatorioReceitaServicoController extends MyGenericForwardComposer
} catch (InterruptedException ex) {
ex.printStackTrace();
}
} else
{
} else {
Relatorio relatorio;
Map<String, Object> parametros = new HashMap<String, Object>();
StringBuilder filtro = new StringBuilder();
if (null != txtCorridaId.getValue() && !("".equals(txtCorridaId.getValue())))
{
if (null != txtCorridaId.getValue() && !("".equals(txtCorridaId.getValue()))){
filtro.append("Serviço: ");
filtro.append(txtCorridaId.getValue() + "; ");
parametros.put("CORRIDA_ID", txtCorridaId.getValue());
@ -142,19 +138,6 @@ public class RelatorioReceitaServicoController extends MyGenericForwardComposer
parametros.put("CORRIDA_ID", null);
}
filtro.append("Início período: ");
Calendar cal = Calendar.getInstance();
cal.setTime(datInicial.getValue());
filtro.append(cal.get(Calendar.DATE) + "/");
filtro.append((cal.get(Calendar.MONTH) + 1) + "/");
filtro.append(cal.get(Calendar.YEAR) + "; ");
filtro.append("Fim período: ");
cal.setTime(datFinal.getValue());
filtro.append(cal.get(Calendar.DATE) + "/");
filtro.append((cal.get(Calendar.MONTH) + 1) + "/");
filtro.append(cal.get(Calendar.YEAR) + "; ");
parametros.put("DATA_INICIAL", (java.util.Date) datInicial.getValue());
parametros.put("DATA_FINAL", (java.util.Date) datFinal.getValue());
@ -164,8 +147,7 @@ public class RelatorioReceitaServicoController extends MyGenericForwardComposer
if (origem.getParadaId() != -1) {
parametros.put("ORIGEN_ID", origem.getParadaId());
filtro.append("Origem: " + origem.getCveparada() + "; ");
}
else {
} else {
parametros.put("ORIGEN_ID", null);
filtro.append("Origem: Todas; ");
}
@ -177,8 +159,7 @@ public class RelatorioReceitaServicoController extends MyGenericForwardComposer
Comboitem cbiDestino = cmbParadaDestino.getSelectedItem();
if (cbiDestino != null) {
Parada destino = (Parada) cbiDestino.getValue();
if (destino.getParadaId() != -1)
{
if (destino.getParadaId() != -1) {
parametros.put("DESTINO_ID", destino.getParadaId());
filtro.append("Destino: " + destino.getCveparada() + "; ");
} else {
@ -206,8 +187,7 @@ public class RelatorioReceitaServicoController extends MyGenericForwardComposer
if (clase.getClaseservicioId() == -1) {
parametros.put("CLASESERVICIO_ID", "");
filtro.append("Classe: " + clase.getDescclase() + "; ");
}
else {
} else {
parametros.put("CLASESERVICIO_ID", clase.getClaseservicioId());
}
filtro.append("Classe: " + clase.getDescclase() + "; ");