fixes bug #6378
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@44999 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
97f22824c0
commit
870b16f548
|
@ -0,0 +1,183 @@
|
|||
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.Date;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioVendasPacotesBoletosBean;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||
|
||||
public class RelatorioVendasPacotesBoletos extends Relatorio {
|
||||
|
||||
private static Logger log = Logger.getLogger(RelatorioVendasPacotesBoletos.class);
|
||||
|
||||
private SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
|
||||
|
||||
private List<RelatorioVendasPacotesBoletosBean> lsDadosRelatorio;
|
||||
|
||||
private Date fecInicio;
|
||||
private Date fecFinal;
|
||||
private Integer empresaId;
|
||||
|
||||
public RelatorioVendasPacotesBoletos(Map<String, Object> parametros, Connection conexao, final String nomeSubReporte) throws Exception {
|
||||
super(parametros, conexao);
|
||||
|
||||
this.setCustomDataSource(new DataSource(this) {
|
||||
@Override
|
||||
public void initDados() throws Exception {
|
||||
Map<String, Object> parametros = this.relatorio.getParametros();
|
||||
fecInicio = new java.sql.Date(sdf.parse(parametros.get("fecInicio").toString()).getTime());
|
||||
fecFinal = new java.sql.Date(sdf.parse(parametros.get("fecFinal").toString()).getTime());
|
||||
empresaId = parametros.get("empresaId") != null && !parametros.get("empresaId").equals("null") ? Integer.valueOf(parametros.get("empresaId").toString()) : null;
|
||||
|
||||
Connection conexao = this.relatorio.getConexao();
|
||||
processarVendasPacote(conexao);
|
||||
|
||||
setNomeSubReporte(nomeSubReporte);
|
||||
setLsDadosRelatorio(lsDadosRelatorio);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void processarVendasPacote(Connection conexao) {
|
||||
ResultSet rset = null;
|
||||
NamedParameterStatement stmt = null;
|
||||
|
||||
try {
|
||||
String sql = getSqlPacotes();
|
||||
|
||||
log.info(sql);
|
||||
|
||||
stmt = new NamedParameterStatement(conexao, sql);
|
||||
|
||||
if(fecInicio != null) {
|
||||
stmt.setDate("fecInicio", fecInicio);
|
||||
}
|
||||
if(fecFinal != null) {
|
||||
stmt.setDate("fecFinal", fecFinal);
|
||||
}
|
||||
if (empresaId != null){
|
||||
stmt.setInt("empresaId", empresaId);
|
||||
}
|
||||
|
||||
rset = stmt.executeQuery();
|
||||
|
||||
if(lsDadosRelatorio == null) {
|
||||
lsDadosRelatorio = new ArrayList<RelatorioVendasPacotesBoletosBean>();
|
||||
}
|
||||
|
||||
while (rset.next()) {
|
||||
RelatorioVendasPacotesBoletosBean relatorioVendasBoletosBean = new RelatorioVendasPacotesBoletosBean();
|
||||
relatorioVendasBoletosBean.setDescdestino(rset.getString("destino"));
|
||||
relatorioVendasBoletosBean.setDescorigen(rset.getString("origem"));
|
||||
|
||||
Integer idx = null;
|
||||
if(lsDadosRelatorio.contains(relatorioVendasBoletosBean)) {
|
||||
idx = lsDadosRelatorio.indexOf(relatorioVendasBoletosBean);
|
||||
relatorioVendasBoletosBean = lsDadosRelatorio.get(idx);
|
||||
}
|
||||
|
||||
RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean relatorioVendasPacotesBoletosItemBean = new RelatorioVendasPacotesBoletosBean().new RelatorioVendasPacotesBoletosItemBean();
|
||||
relatorioVendasPacotesBoletosItemBean.setNomconvenio(rset.getString("nomconvenio"));
|
||||
relatorioVendasPacotesBoletosItemBean.setDesctipotarifa(rset.getString("desctipotarifa"));
|
||||
relatorioVendasPacotesBoletosItemBean.setQtde(rset.getLong("qtde"));
|
||||
relatorioVendasPacotesBoletosItemBean.setSimportetaxaembarque(rset.getBigDecimal("simportetaxaembarque"));
|
||||
relatorioVendasPacotesBoletosItemBean.setSimportepedagio(rset.getBigDecimal("simportepedagio"));
|
||||
relatorioVendasPacotesBoletosItemBean.setSimporteoutros(rset.getBigDecimal("simporteoutros"));
|
||||
relatorioVendasPacotesBoletosItemBean.setSimporteseguro(rset.getBigDecimal("simporteseguro"));
|
||||
relatorioVendasPacotesBoletosItemBean.setSpreciopagado(rset.getBigDecimal("spreciopagado"));
|
||||
relatorioVendasPacotesBoletosItemBean.setSpreciobase(rset.getBigDecimal("spreciobase"));
|
||||
relatorioVendasPacotesBoletosItemBean.setDesconto(rset.getBigDecimal("desconto"));
|
||||
|
||||
if(relatorioVendasBoletosBean.getRelatorioVendasPacotesBoletosItemBeans() == null) {
|
||||
relatorioVendasBoletosBean.setRelatorioVendasPacotesBoletosItemBeans(new ArrayList<RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean>());
|
||||
}
|
||||
relatorioVendasBoletosBean.getRelatorioVendasPacotesBoletosItemBeans().add(relatorioVendasPacotesBoletosItemBean);
|
||||
|
||||
if(idx != null) {
|
||||
lsDadosRelatorio.set(idx, relatorioVendasBoletosBean);
|
||||
} else {
|
||||
lsDadosRelatorio.add(relatorioVendasBoletosBean);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
} finally {
|
||||
try {
|
||||
if(rset != null) {
|
||||
rset.close();
|
||||
}
|
||||
if(stmt != null) {
|
||||
stmt.close();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected String getSqlPacotes() {
|
||||
StringBuilder sQuery = new StringBuilder();
|
||||
|
||||
sQuery.append("SELECT ORI.DESCPARADA AS ORIGEM, DES.DESCPARADA AS DESTINO, TVP.NOMCONVENIO, TTP.DESCTIPOTARIFA, ")
|
||||
.append("COUNT(TVP.TARIFAVENDAPACOTE_ID) AS QTDE, SUM(B.IMPORTETAXAEMBARQUE) AS SIMPORTETAXAEMBARQUE, SUM(B.IMPORTEPEDAGIO) AS SIMPORTEPEDAGIO, ")
|
||||
.append("SUM(B.IMPORTEOUTROS) AS SIMPORTEOUTROS, SUM(B.IMPORTESEGURO) AS SIMPORTESEGURO, SUM(B.PRECIOBASE) AS SPRECIOBASE, SUM(B.PRECIOBASE - B.PRECIOPAGADO) AS DESCONTO, ")
|
||||
.append("SUM(B.PRECIOPAGADO) AS SPRECIOPAGADO ")
|
||||
.append("FROM VENDA_PACOTE VP ")
|
||||
.append("LEFT JOIN PACOTE P ON P.PACOTE_ID = VP.PACOTE_ID ")
|
||||
.append("LEFT JOIN TARIFA_VENDA_PACOTE TVP ON TVP.VENDAPACOTE_ID = VP.VENDAPACOTE_ID ")
|
||||
.append("LEFT JOIN BOLETO B ON B.BOLETO_ID = TVP.BOLETO_ID ")
|
||||
.append("LEFT JOIN PACOTE_TARIFA PT ON PT.PACOTETARIFA_ID = TVP.PACOTETARIFA_ID ")
|
||||
.append("LEFT JOIN TIPO_TARIFA_PACOTE TTP ON TTP.TIPOTARIFAPACOTE_ID = PT.TIPOTARIFAPACOTE_ID ")
|
||||
.append("LEFT JOIN PARADA ORI ON ORI.PARADA_ID = B.ORIGEN_ID ")
|
||||
.append("LEFT JOIN PARADA DES ON DES.PARADA_ID = B.DESTINO_ID ")
|
||||
.append("WHERE P.ACTIVO = 1 ")
|
||||
.append("AND B.ACTIVO = 1 ")
|
||||
.append("AND B.INDSTATUSBOLETO = 'V' ")
|
||||
.append("AND B.MOTIVOCANCELACION_ID IS NULL ");
|
||||
|
||||
if(empresaId != null) {
|
||||
sQuery.append("AND P.EMPRESA_ID = :empresaId ");
|
||||
}
|
||||
|
||||
if(fecInicio != null) {
|
||||
sQuery.append("AND VP.DATAVENDA >= :fecInicio ");
|
||||
}
|
||||
|
||||
if(fecFinal != null) {
|
||||
sQuery.append("AND VP.DATAVENDA <= :fecFinal ");
|
||||
}
|
||||
|
||||
sQuery.append("GROUP BY ORI.DESCPARADA,DES.DESCPARADA,TVP.NOMCONVENIO,TTP.DESCTIPOTARIFA ")
|
||||
.append("ORDER BY ORI.DESCPARADA,DES.DESCPARADA,TVP.NOMCONVENIO,TTP.DESCTIPOTARIFA ");
|
||||
|
||||
return sQuery.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void processaParametros() throws Exception {
|
||||
}
|
||||
|
||||
public List<RelatorioVendasPacotesBoletosBean> getLsDadosRelatorio() {
|
||||
return lsDadosRelatorio;
|
||||
}
|
||||
|
||||
public void setLsDadosRelatorio(List<RelatorioVendasPacotesBoletosBean> lsDadosRelatorio) {
|
||||
this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio));
|
||||
this.lsDadosRelatorio = lsDadosRelatorio;
|
||||
}
|
||||
|
||||
}
|
|
@ -151,7 +151,8 @@ public class RelatorioVendasPacotesDetalhado extends Relatorio {
|
|||
.append("LEFT JOIN USUARIO U ON U.USUARIO_ID = VP.USUARIO_ID ")
|
||||
.append("WHERE P.ACTIVO = 1 ")
|
||||
.append("AND B.ACTIVO = 1 ")
|
||||
.append("AND B.INDSTATUSBOLETO = 'V' ");
|
||||
.append("AND B.INDSTATUSBOLETO = 'V' ")
|
||||
.append("AND B.MOTIVOCANCELACION_ID IS NULL ");;
|
||||
|
||||
if(empresaId != null) {
|
||||
sQuery.append("AND P.EMPRESA_ID = :empresaId ");
|
||||
|
|
|
@ -197,7 +197,8 @@ public class RelatorioVendasPacotesResumido extends Relatorio {
|
|||
.append("LEFT JOIN BOLETO B ON B.BOLETO_ID = TVP.BOLETO_ID ")
|
||||
.append("WHERE P.ACTIVO = 1 ")
|
||||
.append("AND B.ACTIVO = 1 ")
|
||||
.append("AND B.INDSTATUSBOLETO = 'V' ");
|
||||
.append("AND B.INDSTATUSBOLETO = 'V' ")
|
||||
.append("AND B.MOTIVOCANCELACION_ID IS NULL ");;
|
||||
|
||||
if(empresaId != null) {
|
||||
sQuery.append("AND P.EMPRESA_ID = :empresaId ");
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#Labels
|
||||
label.qtde=Qtde
|
||||
label.desctipotarifa=Tipo Tarifa
|
||||
label.nomconvenio=Convênio
|
||||
label.spreciobase=Valor Tarifário
|
||||
label.simporteseguro=Valor Seguro
|
||||
label.simportetaxaembarque=Taxa Embarque
|
||||
label.simporteoutros=Valor Serviço
|
||||
label.spreciopagado=Total c/ Desconto
|
||||
label.desconto=Desconto
|
||||
label.spreciototal=Valor Total
|
|
@ -0,0 +1,11 @@
|
|||
#Labels
|
||||
label.qtde=Qtde
|
||||
label.desctipotarifa=Tipo Tarifa
|
||||
label.nomconvenio=Convênio
|
||||
label.spreciobase=Valor Tarifário
|
||||
label.simporteseguro=Valor Seguro
|
||||
label.simportetaxaembarque=Taxa Embarque
|
||||
label.simporteoutros=Valor Serviço
|
||||
label.spreciopagado=Total c/ Desconto
|
||||
label.desconto=Desconto
|
||||
label.spreciototal=Valor Total
|
|
@ -0,0 +1,15 @@
|
|||
#geral
|
||||
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||
|
||||
#Labels cabeçalho
|
||||
cabecalho.nome=Relatório Vendas de Pacotes - Boletos
|
||||
cabecalho.relatorio=Relatório:
|
||||
cabecalho.periodo=Período:
|
||||
cabecalho.periodoA=à
|
||||
cabecalho.dataHora=Data/Hora:
|
||||
cabecalho.impressorPor=Impressor por:
|
||||
cabecalho.pagina=Página
|
||||
cabecalho.de=de
|
||||
cabecalho.filtros=Filtros:
|
||||
label.empresa=Empresa:
|
||||
label.trecho=Trecho:
|
|
@ -0,0 +1,15 @@
|
|||
#geral
|
||||
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||
|
||||
#Labels cabeçalho
|
||||
cabecalho.nome=Relatório Vendas de Pacotes - Boletos
|
||||
cabecalho.relatorio=Relatório:
|
||||
cabecalho.periodo=Período:
|
||||
cabecalho.periodoA=à
|
||||
cabecalho.dataHora=Data/Hora:
|
||||
cabecalho.impressorPor=Impressor por:
|
||||
cabecalho.pagina=Página
|
||||
cabecalho.de=de
|
||||
cabecalho.filtros=Filtros:
|
||||
label.empresa=Empresa:
|
||||
label.trecho=Trecho:
|
Binary file not shown.
|
@ -0,0 +1,108 @@
|
|||
<?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="RelatorioVendasPacotesBoletos" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="84b9dfcf-8ec5-4f51-80cc-7339e3b158b4">
|
||||
<property name="ireport.zoom" value="0.75"/>
|
||||
<property name="ireport.x" value="0"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<parameter name="empresa" class="java.lang.String"/>
|
||||
<parameter name="fecInicio" class="java.lang.String"/>
|
||||
<parameter name="fecFinal" class="java.lang.String"/>
|
||||
<parameter name="noDataRelatorio" class="java.lang.String"/>
|
||||
<parameter name="subreporte" class="net.sf.jasperreports.engine.JasperReport"/>
|
||||
<parameter name="SUBREPORT_RESOURCE_BUNDLE" class="java.util.ResourceBundle"/>
|
||||
<parameter name="trecho" class="java.lang.String"/>
|
||||
<queryString>
|
||||
<![CDATA[]]>
|
||||
</queryString>
|
||||
<field name="relatorioVendasPacotesBoletosItemBeans" class="java.util.List"/>
|
||||
<field name="descorigen" class="java.lang.String"/>
|
||||
<field name="descdestino" class="java.lang.String"/>
|
||||
<background>
|
||||
<band splitType="Stretch"/>
|
||||
</background>
|
||||
<title>
|
||||
<band height="62" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement x="0" y="0" width="620" height="20" uuid="43b2c28d-4760-4890-b00d-25e931e79c74"/>
|
||||
<textElement markup="none">
|
||||
<font size="14" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{cabecalho.nome}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="dd/MM/yyyy HH:mm">
|
||||
<reportElement x="638" y="0" width="164" height="20" uuid="4d1bcd65-c9a6-44b4-8dca-cc3c4c20c9a5"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="0" y="20" width="620" height="20" uuid="a16eb33b-78ca-4fb4-80c2-f5c85a0d09c3"/>
|
||||
<textElement>
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.empresa} + " " + $P{empresa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="0" y="40" width="620" height="20" uuid="fd05bd35-30d9-4baf-aa56-f8e5d3c3268b"/>
|
||||
<textElement>
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{cabecalho.periodo} + " " + $P{fecInicio} + " " + $R{cabecalho.periodoA} + " " + $P{fecFinal}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</title>
|
||||
<pageHeader>
|
||||
<band height="26" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement x="607" y="0" width="195" height="20" uuid="6a8a0843-7236-40a3-98ae-5fbf59b4cfec"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{cabecalho.pagina} + " " + $V{PAGE_NUMBER}+ " " + $R{cabecalho.de} + " " + $V{PAGE_NUMBER}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</pageHeader>
|
||||
<columnHeader>
|
||||
<band splitType="Stretch"/>
|
||||
</columnHeader>
|
||||
<detail>
|
||||
<band height="75" splitType="Stretch">
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement positionType="Float" x="0" y="7" width="802" height="20" isPrintWhenDetailOverflows="true" uuid="752263b1-e76b-41c5-a728-c17367094dab"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.trecho} + " " + $F{descorigen} + "/" + $F{descdestino}]]></textFieldExpression>
|
||||
</textField>
|
||||
<subreport isUsingCache="true">
|
||||
<reportElement positionType="Float" x="0" y="33" width="802" height="38" uuid="75fad27f-9275-4535-844a-316ac8365073"/>
|
||||
<subreportParameter name="REPORT_RESOURCE_BUNDLE">
|
||||
<subreportParameterExpression><![CDATA[$P{SUBREPORT_RESOURCE_BUNDLE}]]></subreportParameterExpression>
|
||||
</subreportParameter>
|
||||
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{relatorioVendasPacotesBoletosItemBeans})]]></dataSourceExpression>
|
||||
<subreportExpression><![CDATA[$P{subreporte}]]></subreportExpression>
|
||||
</subreport>
|
||||
<line>
|
||||
<reportElement positionType="Float" x="0" y="4" width="802" height="1" uuid="29d8e10c-62eb-4a5b-b71a-05bb44438009"/>
|
||||
</line>
|
||||
</band>
|
||||
</detail>
|
||||
<columnFooter>
|
||||
<band splitType="Stretch"/>
|
||||
</columnFooter>
|
||||
<pageFooter>
|
||||
<band splitType="Stretch"/>
|
||||
</pageFooter>
|
||||
<summary>
|
||||
<band splitType="Stretch"/>
|
||||
</summary>
|
||||
<noData>
|
||||
<band height="24">
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement positionType="Float" x="0" y="0" width="555" height="20" isPrintWhenDetailOverflows="true" uuid="d7df66c6-4dc0-4f3b-88f4-b22094d29091"/>
|
||||
<textElement verticalAlignment="Middle"/>
|
||||
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</noData>
|
||||
</jasperReport>
|
Binary file not shown.
|
@ -0,0 +1,270 @@
|
|||
<?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="RelatorioVendasPacotesDetalhadoItem" pageWidth="802" pageHeight="555" orientation="Landscape" columnWidth="802" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="f17327a0-45d8-4ec1-8350-688df66785dc">
|
||||
<property name="ireport.zoom" value="1.0"/>
|
||||
<property name="ireport.x" value="36"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<field name="nomconvenio" class="java.lang.String"/>
|
||||
<field name="desctipotarifa" class="java.lang.String"/>
|
||||
<field name="qtde" class="java.lang.Long"/>
|
||||
<field name="simportetaxaembarque" class="java.math.BigDecimal"/>
|
||||
<field name="simportepedagio" class="java.math.BigDecimal"/>
|
||||
<field name="simporteoutros" class="java.math.BigDecimal"/>
|
||||
<field name="simporteseguro" class="java.math.BigDecimal"/>
|
||||
<field name="desconto" class="java.math.BigDecimal"/>
|
||||
<field name="spreciopagado" class="java.math.BigDecimal"/>
|
||||
<field name="spreciobase" class="java.math.BigDecimal"/>
|
||||
<field name="spreciototal" class="java.math.BigDecimal"/>
|
||||
<variable name="vQtde" class="java.lang.Long" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{qtde}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="vSimportetaxaembarque" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{simportetaxaembarque}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="vSimportepedagio" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{simportepedagio}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="vSimporteoutros" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{simporteoutros}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="vSimporteseguro" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{simporteseguro}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="vDesconto" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{desconto}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="vSpreciopagado" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{spreciopagado}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="vSpreciobase" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{spreciobase}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="vSpreciototal" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{spreciototal}]]></variableExpression>
|
||||
</variable>
|
||||
<background>
|
||||
<band splitType="Stretch"/>
|
||||
</background>
|
||||
<title>
|
||||
<band splitType="Stretch"/>
|
||||
</title>
|
||||
<pageHeader>
|
||||
<band splitType="Stretch"/>
|
||||
</pageHeader>
|
||||
<columnHeader>
|
||||
<band height="21" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="0" y="1" width="75" height="20" isPrintWhenDetailOverflows="true" uuid="ca0cfce0-945a-41b6-a2b6-07b599432260"/>
|
||||
<textElement verticalAlignment="Middle" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.desctipotarifa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="75" y="1" width="119" height="20" isPrintWhenDetailOverflows="true" uuid="16b05797-4914-43d4-8ef5-1e999e6ee7eb"/>
|
||||
<textElement verticalAlignment="Middle" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.nomconvenio}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="194" y="1" width="47" height="20" isPrintWhenDetailOverflows="true" uuid="bc16a571-d1f3-4574-a521-3c6076317b8f"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.qtde}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="241" y="1" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="74894a72-7acf-43bc-abc7-a3ca0931f1c0"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.spreciobase}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="321" y="1" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="60d565a0-f9c1-4648-87a5-0acd7bcc95cb"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.simporteseguro}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="401" y="1" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="7351b458-41bf-4cf3-839a-9b17860cd029"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.simportetaxaembarque}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="481" y="1" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="b40f5fec-8d0e-47c6-9a02-c6b9f4f4cf40"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.simporteoutros}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="721" y="1" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="7f2d56a0-8755-4192-be26-3c082bcde27f"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.spreciopagado}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="641" y="1" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="637d297c-7275-4094-9f67-e6d36eff60a2"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.desconto}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement stretchType="RelativeToTallestObject" x="561" y="1" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="0d9ab795-d305-44a6-b12a-e0445e36613a"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.spreciototal}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</columnHeader>
|
||||
<detail>
|
||||
<band height="21" splitType="Stretch">
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="0" y="1" width="75" height="20" isPrintWhenDetailOverflows="true" uuid="ebc048fd-2106-47f2-88f5-ff3710ec047e"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{desctipotarifa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="75" y="1" width="119" height="20" isPrintWhenDetailOverflows="true" uuid="9d3ec869-4da6-45a1-b59b-6e374b36a929"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{nomconvenio}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="194" y="1" width="47" height="20" isPrintWhenDetailOverflows="true" uuid="be19e5aa-b241-4d2d-bd96-47b2e271cdf4"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{qtde}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="241" y="1" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="5e343619-3254-4481-a3d3-00a33e144145"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{spreciobase}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="321" y="1" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="43d5475f-18ce-4427-b971-8f374a01e9b1"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{simporteseguro}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="401" y="1" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="e47fb86e-b5b3-4f8f-9200-3fc950e6631d"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{simportetaxaembarque}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="481" y="1" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="3f5483a5-9c57-4510-b040-24b0267396d8"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{simporteoutros}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="721" y="1" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="3348c997-2b2d-401f-a5d6-2a9e1e7abd51"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{spreciopagado}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="641" y="1" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="d81fe2cf-b81c-4f65-939c-6c7d54559360"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{desconto}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="561" y="1" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="010f06dc-7915-4d18-ace5-b0262e54c9e3"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{spreciototal}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</detail>
|
||||
<columnFooter>
|
||||
<band splitType="Stretch"/>
|
||||
</columnFooter>
|
||||
<pageFooter>
|
||||
<band height="28" splitType="Stretch">
|
||||
<line>
|
||||
<reportElement positionType="Float" x="0" y="3" width="802" height="1" uuid="2c1bf6b9-f6f3-442b-a6ca-2c668a8e603a"/>
|
||||
</line>
|
||||
<textField pattern="" isBlankWhenNull="true">
|
||||
<reportElement x="194" y="4" width="47" height="20" isPrintWhenDetailOverflows="true" uuid="01e3adbf-f994-4e68-8909-370ff62d5fc2"/>
|
||||
<textElement textAlignment="Center">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{vQtde}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="241" y="4" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="1e428984-8f32-401e-98cc-fb8058170b8b"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{vSpreciobase}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="321" y="4" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="0e5c22ef-c516-4077-bb87-4ecaac0c2527"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{vSimporteseguro}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="401" y="4" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="45d16415-14dc-4d11-bbdf-03947bc31864"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{vSimportetaxaembarque}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="481" y="4" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="0cf0ae52-7f31-4e4f-b30f-2714b1e7e4ba"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{vSimporteoutros}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="561" y="4" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="92daa21e-386c-4731-943c-0a925d98f38f"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{vSpreciototal}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="641" y="4" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="e83dea1b-ebc3-497d-bc18-44a13a3e103c"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{vDesconto}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="721" y="4" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="0ce3d768-3e6d-4a7b-b3b0-706e811e2d26"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{vSpreciopagado}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</pageFooter>
|
||||
<summary>
|
||||
<band splitType="Stretch"/>
|
||||
</summary>
|
||||
</jasperReport>
|
|
@ -0,0 +1,206 @@
|
|||
package com.rjconsultores.ventaboletos.relatorios.utilitarios;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
public class RelatorioVendasPacotesBoletosBean {
|
||||
|
||||
private String descorigen;
|
||||
private String descdestino;
|
||||
|
||||
private List<RelatorioVendasPacotesBoletosItemBean> relatorioVendasPacotesBoletosItemBeans;
|
||||
|
||||
public String getDescorigen() {
|
||||
return descorigen;
|
||||
}
|
||||
|
||||
public void setDescorigen(String descorigen) {
|
||||
this.descorigen = descorigen;
|
||||
}
|
||||
|
||||
public String getDescdestino() {
|
||||
return descdestino;
|
||||
}
|
||||
|
||||
public void setDescdestino(String descdestino) {
|
||||
this.descdestino = descdestino;
|
||||
}
|
||||
|
||||
public List<RelatorioVendasPacotesBoletosItemBean> getRelatorioVendasPacotesBoletosItemBeans() {
|
||||
return relatorioVendasPacotesBoletosItemBeans;
|
||||
}
|
||||
|
||||
public void setRelatorioVendasPacotesBoletosItemBeans(List<RelatorioVendasPacotesBoletosItemBean> relatorioVendasPacotesBoletosItemBeans) {
|
||||
this.relatorioVendasPacotesBoletosItemBeans = relatorioVendasPacotesBoletosItemBeans;
|
||||
}
|
||||
|
||||
public class RelatorioVendasPacotesBoletosItemBean {
|
||||
|
||||
private String nomconvenio;
|
||||
private String desctipotarifa;
|
||||
private Long qtde;
|
||||
private BigDecimal simportetaxaembarque;
|
||||
private BigDecimal simportepedagio;
|
||||
private BigDecimal simporteoutros;
|
||||
private BigDecimal simporteseguro;
|
||||
private BigDecimal desconto;
|
||||
private BigDecimal spreciopagado;
|
||||
private BigDecimal spreciobase;
|
||||
|
||||
public String getNomconvenio() {
|
||||
return nomconvenio;
|
||||
}
|
||||
|
||||
public void setNomconvenio(String nomconvenio) {
|
||||
this.nomconvenio = nomconvenio;
|
||||
}
|
||||
|
||||
public String getDesctipotarifa() {
|
||||
return desctipotarifa;
|
||||
}
|
||||
|
||||
public void setDesctipotarifa(String desctipotarifa) {
|
||||
this.desctipotarifa = desctipotarifa;
|
||||
}
|
||||
|
||||
public Long getQtde() {
|
||||
return qtde;
|
||||
}
|
||||
|
||||
public void setQtde(Long qtde) {
|
||||
this.qtde = qtde;
|
||||
}
|
||||
|
||||
public BigDecimal getSimportetaxaembarque() {
|
||||
return simportetaxaembarque;
|
||||
}
|
||||
|
||||
public void setSimportetaxaembarque(BigDecimal simportetaxaembarque) {
|
||||
this.simportetaxaembarque = simportetaxaembarque;
|
||||
}
|
||||
|
||||
public BigDecimal getSimportepedagio() {
|
||||
return simportepedagio;
|
||||
}
|
||||
|
||||
public void setSimportepedagio(BigDecimal simportepedagio) {
|
||||
this.simportepedagio = simportepedagio;
|
||||
}
|
||||
|
||||
public BigDecimal getSimporteoutros() {
|
||||
return simporteoutros;
|
||||
}
|
||||
|
||||
public void setSimporteoutros(BigDecimal simporteoutros) {
|
||||
this.simporteoutros = simporteoutros;
|
||||
}
|
||||
|
||||
public BigDecimal getSimporteseguro() {
|
||||
return simporteseguro;
|
||||
}
|
||||
|
||||
public void setSimporteseguro(BigDecimal simporteseguro) {
|
||||
this.simporteseguro = simporteseguro;
|
||||
}
|
||||
|
||||
public BigDecimal getDesconto() {
|
||||
return desconto;
|
||||
}
|
||||
|
||||
public void setDesconto(BigDecimal desconto) {
|
||||
this.desconto = desconto;
|
||||
}
|
||||
|
||||
public BigDecimal getSpreciopagado() {
|
||||
return spreciopagado;
|
||||
}
|
||||
|
||||
public void setSpreciopagado(BigDecimal spreciopagado) {
|
||||
this.spreciopagado = spreciopagado;
|
||||
}
|
||||
|
||||
public BigDecimal getSpreciototal() {
|
||||
BigDecimal spreciototal = BigDecimal.ZERO;
|
||||
|
||||
spreciototal = simportetaxaembarque != null ? spreciototal.add(simportetaxaembarque) : spreciototal;
|
||||
spreciototal = simportepedagio != null ? spreciototal.add(simportepedagio) : spreciototal;
|
||||
spreciototal = simporteoutros != null ? spreciototal.add(simporteoutros) : spreciototal;
|
||||
spreciototal = simporteseguro != null ? spreciototal.add(simporteseguro) : spreciototal;
|
||||
spreciototal = spreciobase != null ? spreciototal.add(spreciobase) : spreciototal;
|
||||
|
||||
return spreciototal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((desctipotarifa == null) ? 0 : desctipotarifa.hashCode());
|
||||
result = prime * result + ((nomconvenio == null) ? 0 : nomconvenio.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
RelatorioVendasPacotesBoletosItemBean other = (RelatorioVendasPacotesBoletosItemBean) obj;
|
||||
if (desctipotarifa == null) {
|
||||
if (other.desctipotarifa != null)
|
||||
return false;
|
||||
} else if (!desctipotarifa.equals(other.desctipotarifa))
|
||||
return false;
|
||||
if (nomconvenio == null) {
|
||||
if (other.nomconvenio != null)
|
||||
return false;
|
||||
} else if (!nomconvenio.equals(other.nomconvenio))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public BigDecimal getSpreciobase() {
|
||||
return spreciobase;
|
||||
}
|
||||
|
||||
public void setSpreciobase(BigDecimal spreciobase) {
|
||||
this.spreciobase = spreciobase;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((descdestino == null) ? 0 : descdestino.hashCode());
|
||||
result = prime * result + ((descorigen == null) ? 0 : descorigen.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
RelatorioVendasPacotesBoletosBean other = (RelatorioVendasPacotesBoletosBean) obj;
|
||||
if (descdestino == null) {
|
||||
if (other.descdestino != null)
|
||||
return false;
|
||||
} else if (!descdestino.equals(other.descdestino))
|
||||
return false;
|
||||
if (descorigen == null) {
|
||||
if (other.descorigen != null)
|
||||
return false;
|
||||
} else if (!descorigen.equals(other.descorigen))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import net.sf.jasperreports.engine.JasperReport;
|
||||
import net.sf.jasperreports.engine.util.JRLoader;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.zkoss.util.resource.Labels;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Datebox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.Pacote;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioVendasPacotesBoletos;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||
import com.rjconsultores.ventaboletos.service.PacoteService;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
|
||||
@Controller("relatorioVendasPacotesBoletosController")
|
||||
@Scope("prototype")
|
||||
public class RelatorioVendasPacotesBoletosController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
|
||||
private List<Empresa> lsEmpresa;
|
||||
private Datebox dataInicial;
|
||||
private Datebox dataFinal;
|
||||
private MyComboboxEstandar cmbEmpresa;
|
||||
|
||||
public List<Empresa> getLsEmpresa() {
|
||||
return lsEmpresa;
|
||||
}
|
||||
|
||||
public void setLsEmpresa(List<Empresa> lsEmpresa) {
|
||||
this.lsEmpresa = lsEmpresa;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
lsEmpresa = empresaService.obtenerTodos();
|
||||
super.doAfterCompose(comp);
|
||||
}
|
||||
|
||||
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
|
||||
Date dataDe = dataInicial.getValue();
|
||||
Date dataAte = dataFinal.getValue();
|
||||
|
||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||
parametros.put("fecInicio", sdf.format(dataDe));
|
||||
parametros.put("fecFinal", sdf.format(dataAte));
|
||||
|
||||
Comboitem cbiEmpresa = cmbEmpresa.getSelectedItem();
|
||||
String empresaId = null;
|
||||
parametros.put("empresa", "");
|
||||
if (cbiEmpresa != null) {
|
||||
Empresa empresa = (Empresa) cbiEmpresa.getValue();
|
||||
empresaId = empresa.getEmpresaId().toString();
|
||||
parametros.put("empresa", empresa.getNombempresa());
|
||||
}
|
||||
parametros.put("empresaId", empresaId);
|
||||
|
||||
JasperReport subRelatorioVendasPacotesBoletosItens = (JasperReport) JRLoader.loadObject(this.getClass().getResourceAsStream("/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasPacotesBoletosItem.jasper"));
|
||||
parametros.put("subreporte", subRelatorioVendasPacotesBoletosItens);
|
||||
|
||||
Relatorio relatorio = new RelatorioVendasPacotesBoletos(parametros, dataSourceRead.getConnection(), "RelatorioVendasPacotesBoletosItem");
|
||||
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("relatorio", relatorio);
|
||||
|
||||
openWindow("/component/reportView.zul",
|
||||
Labels.getLabel("relatorioVendasPacotesBoletosController.window.title"), args, MODAL);
|
||||
}
|
||||
|
||||
}
|
|
@ -95,8 +95,8 @@ public class RelatorioVendasPacotesDetalhadoController extends MyGenericForwardC
|
|||
}
|
||||
parametros.put("pacoteId", pacoteId);
|
||||
|
||||
JasperReport subRelatorioVendasPacotesResumidoItens = (JasperReport) JRLoader.loadObject(this.getClass().getResourceAsStream("/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasPacotesDetalhadoItem.jasper"));
|
||||
parametros.put("subreporte", subRelatorioVendasPacotesResumidoItens);
|
||||
JasperReport subRelatorioVendasPacotesDetalhadoItens = (JasperReport) JRLoader.loadObject(this.getClass().getResourceAsStream("/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasPacotesDetalhadoItem.jasper"));
|
||||
parametros.put("subreporte", subRelatorioVendasPacotesDetalhadoItens);
|
||||
|
||||
Relatorio relatorio = new RelatorioVendasPacotesDetalhado(parametros, dataSourceRead.getConnection(), "RelatorioVendasPacotesDetalhadoItem");
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios;
|
||||
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||
|
||||
/**
|
||||
* @author Wilian Domingues
|
||||
*
|
||||
*/
|
||||
public class ItemMenuRelatorioVendasPacotesBoletos extends DefaultItemMenuSistema {
|
||||
|
||||
public ItemMenuRelatorioVendasPacotesBoletos() {
|
||||
super("indexController.mniRelatorioVendasPacotesBoletos.label");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClaveMenu() {
|
||||
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOVENDASPACOTESBOLETOS";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ejecutar() {
|
||||
PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioVendasPacotesBoletos.zul",
|
||||
Labels.getLabel("relatorioVendasPacotesBoletosController.window.title"), getArgs() ,desktop);
|
||||
}
|
||||
|
||||
}
|
|
@ -242,8 +242,9 @@ indexController.mniRelatorioCorridas.label = Reporte de Corridas
|
|||
indexController.mniRelatorioDemandas.label = Reporte de Demandas
|
||||
indexController.mniRelatorioReceitaServico.label = Relatório de Receita por Serviço
|
||||
indexController.mniPrecoApanhe.label = Preço Apanhe
|
||||
indexController.mniRelatorioVendasPacotesResumido.label = Ventas de Paquetes Resumido
|
||||
indexController.mniRelatorioVendasPacotesDetalhado.label = Ventas de Paquetes Detalhado
|
||||
indexController.mniRelatorioVendasPacotesResumido.label = Ventas de Paquetes - Resumido
|
||||
indexController.mniRelatorioVendasPacotesDetalhado.label = Ventas de Paquetes - Detalhado
|
||||
indexController.mniRelatorioVendasPacotesBoletos.label = Ventas de Pacotes - Boletos
|
||||
|
||||
indexController.mniSubMenuClientePacote.label=Pacote
|
||||
indexController.mniAlterarEnderecoApanhe.label=Alterar Endereço Apanhe
|
||||
|
@ -5278,14 +5279,21 @@ editarAlterarEnderecoApanheController.lhNumoperacion.label = Num Operacion
|
|||
editarAlterarEnderecoApanheController.lhDataPacote.label = Fecha Pacote
|
||||
|
||||
# Relatorio Vendas Pacotes Resumido
|
||||
relatorioVendasPacotesResumidoController.window.title = Relatório Vendas de Pacotes Resumido
|
||||
relatorioVendasPacotesResumidoController.window.title = Relatório Vendas de Pacotes - Resumido
|
||||
relatorioVendasPacotesResumidoController.lbDataIni.value = Fecha Inicio
|
||||
relatorioVendasPacotesResumidoController.lbDataFin.value = Fecha Final
|
||||
relatorioVendasPacotesResumidoController.lblEmpresa.value = Empresa
|
||||
|
||||
# Relatorio Vendas Pacotes Detalhado
|
||||
relatorioVendasPacotesDetalhadoController.window.title = Relatório Vendas de Pacotes Detalhado
|
||||
relatorioVendasPacotesDetalhadoController.window.title = Relatório Vendas de Pacotes - Detalhado
|
||||
relatorioVendasPacotesDetalhadoController.lbDataIni.value = Fecha Inicio
|
||||
relatorioVendasPacotesDetalhadoController.lbDataFin.value = Fecha Final
|
||||
relatorioVendasPacotesDetalhadoController.lblEmpresa.value = Empresa
|
||||
relatorioVendasPacotesDetalhadoController.lblPacote.value = Pacote
|
||||
relatorioVendasPacotesDetalhadoController.lblPacote.value = Pacote
|
||||
|
||||
# Relatorio Vendas Pacotes Boletos
|
||||
relatorioVendasPacotesBoletosController.window.title = Relatório Vendas de Pacotes - Boletos
|
||||
relatorioVendasPacotesBoletosController.lbDataIni.value = Fecha Inicio
|
||||
relatorioVendasPacotesBoletosController.lbDataFin.value = Fecha Final
|
||||
relatorioVendasPacotesBoletosController.lblEmpresa.value = Empresa
|
||||
relatorioVendasPacotesBoletosController.lblPacote.value = Pacote
|
|
@ -247,8 +247,9 @@ indexController.mniRelatorioCorridas.label = Relatório de Serviços
|
|||
indexController.mniRelatorioDemandas.label = Relatório de Demandas
|
||||
indexController.mniRelatorioReceitaServico.label = Relatório de Receita por Serviço
|
||||
indexController.mniPrecoApanhe.label = Preço Apanhe
|
||||
indexController.mniRelatorioVendasPacotesResumido.label = Vendas de Pacotes Resumido
|
||||
indexController.mniRelatorioVendasPacotesDetalhado.label = Ventas de Pacotes Detalhado
|
||||
indexController.mniRelatorioVendasPacotesResumido.label = Vendas de Pacotes - Resumido
|
||||
indexController.mniRelatorioVendasPacotesDetalhado.label = Ventas de Pacotes - Detalhado
|
||||
indexController.mniRelatorioVendasPacotesBoletos.label = Ventas de Pacotes - Boletos
|
||||
|
||||
indexController.mnSubMenuImpressaoFiscal.label=Impressão Fiscal
|
||||
indexController.mniTotnaofiscalEmpresa.label=Totalizadoes Não-fiscais
|
||||
|
@ -5405,14 +5406,21 @@ editarAlterarEnderecoApanheController.lhNumoperacion.label = Localizador
|
|||
editarAlterarEnderecoApanheController.lhDataPacote.label = Data Pacote
|
||||
|
||||
# Relatorio Vendas Pacotes Resumido
|
||||
relatorioVendasPacotesResumidoController.window.title = Relatório Vendas de Pacotes Resumido
|
||||
relatorioVendasPacotesResumidoController.window.title = Relatório Vendas de Pacotes - Resumido
|
||||
relatorioVendasPacotesResumidoController.lbDataIni.value = Data Inicial
|
||||
relatorioVendasPacotesResumidoController.lbDataFin.value = Data Final
|
||||
relatorioVendasPacotesResumidoController.lblEmpresa.value = Empresa
|
||||
|
||||
# Relatorio Vendas Pacotes Detalhado
|
||||
relatorioVendasPacotesDetalhadoController.window.title = Relatório Vendas de Pacotes Detalhado
|
||||
relatorioVendasPacotesDetalhadoController.window.title = Relatório Vendas de Pacotes - Detalhado
|
||||
relatorioVendasPacotesDetalhadoController.lbDataIni.value = Data Inicial
|
||||
relatorioVendasPacotesDetalhadoController.lbDataFin.value = Data Final
|
||||
relatorioVendasPacotesDetalhadoController.lblEmpresa.value = Empresa
|
||||
relatorioVendasPacotesDetalhadoController.lblPacote.value = Pacote
|
||||
relatorioVendasPacotesDetalhadoController.lblPacote.value = Pacote
|
||||
|
||||
# Relatorio Vendas Pacotes Boletos
|
||||
relatorioVendasPacotesBoletosController.window.title = Relatório Vendas de Pacotes - Boletos
|
||||
relatorioVendasPacotesBoletosController.lbDataIni.value = Data Inicial
|
||||
relatorioVendasPacotesBoletosController.lbDataFin.value = Data Final
|
||||
relatorioVendasPacotesBoletosController.lblEmpresa.value = Empresa
|
||||
relatorioVendasPacotesBoletosController.lblPacote.value = Pacote
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winFiltroRelatorioVendasPacotesDetalhado"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winFiltroRelatorioVendasPacotesDetalhado"
|
||||
apply="${relatorioVendasPacotesBoletosController}"
|
||||
contentStyle="overflow:auto" width="700px" border="normal">
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="20%" />
|
||||
<column width="30%" />
|
||||
<column width="20%" />
|
||||
<column width="30%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('relatorioVendasPacotesBoletosController.lblEmpresa.value')}" />
|
||||
<combobox id="cmbEmpresa" constraint="no empty"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="80%"
|
||||
model="@{winFiltroRelatorioVendasPacotesDetalhado$composer.lsEmpresa}" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('relatorioVendasPacotesBoletosController.lbDataIni.value')}" />
|
||||
<datebox id="dataInicial" width="100%" mold="rounded"
|
||||
format="dd/MM/yyyy" lenient="false" constraint="no empty"
|
||||
maxlength="10" />
|
||||
<label
|
||||
value="${c:l('relatorioVendasPacotesBoletosController.lbDataFin.value')}" />
|
||||
<datebox id="dataFinal" width="100%" mold="rounded"
|
||||
format="dd/MM/yyyy" lenient="false" constraint="no empty"
|
||||
maxlength="10" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<toolbar>
|
||||
<button id="btnExecutarRelatorio" image="/gui/img/find.png"
|
||||
label="${c:l('relatorio.lb.btnExecutarRelatorio')}" />
|
||||
</toolbar>
|
||||
</window>
|
||||
</zk>
|
||||
|
Loading…
Reference in New Issue