wilian 2016-09-08 20:00:38 +00:00
parent 2d8bf49733
commit 6e8cb37d4f
7 changed files with 353 additions and 413 deletions

View File

@ -1,274 +0,0 @@
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 RelatorioVendasBoletos extends Relatorio {
private static Logger log = Logger.getLogger(RelatorioVendasBoletos.class);
private SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
private List<RelatorioVendasPacotesBoletosBean> lsDadosRelatorio;
private Date fecInicio;
private Date fecFinal;
private Integer empresaId;
private Integer origenId;
private Integer destinoId;
public RelatorioVendasBoletos(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;
origenId = parametros.get("origenId") != null && !parametros.get("origenId").equals("null") ? Integer.valueOf(parametros.get("origenId").toString()) : null;
destinoId = parametros.get("destinoId") != null && !parametros.get("destinoId").equals("null") ? Integer.valueOf(parametros.get("destinoId").toString()) : null;
Connection conexao = this.relatorio.getConexao();
processarVendasPacote(conexao);
processarVendasPacoteCancelados(conexao);
setNomeSubReporte(nomeSubReporte);
setLsDadosRelatorio(lsDadosRelatorio);
}
});
}
private void processarVendasPacote(Connection conexao) {
ResultSet rset = null;
NamedParameterStatement stmt = null;
try {
stmt = carregarNamedParameterStatement(conexao, false);
rset = stmt.executeQuery();
if(lsDadosRelatorio == null) {
lsDadosRelatorio = new ArrayList<RelatorioVendasPacotesBoletosBean>();
}
while (rset.next()) {
RelatorioVendasPacotesBoletosBean relatorioVendasBoletosBean = carregarRelatorioVendasBoletosBean(rset);
Integer idx = carregarIndice(relatorioVendasBoletosBean);
if(idx != null) {
relatorioVendasBoletosBean = lsDadosRelatorio.get(idx);
}
relatorioVendasBoletosBean.setRelatorioVendasPacotesBoletosItemBeans(carregarItens(rset, relatorioVendasBoletosBean, relatorioVendasBoletosBean.getRelatorioVendasPacotesBoletosItemBeans()));
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);
}
}
}
private List<RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean> carregarItens(ResultSet rset, RelatorioVendasPacotesBoletosBean relatorioVendasPacotesBoletosBean, List<RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean> itens) throws SQLException {
RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean relatorioVendasPacotesBoletosItemBean = relatorioVendasPacotesBoletosBean.new RelatorioVendasPacotesBoletosItemBean();
relatorioVendasPacotesBoletosItemBean.setDesccategoria(rset.getString("desccategoria"));
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.setSpreciobase(rset.getBigDecimal("spreciobase"));
relatorioVendasPacotesBoletosItemBean.setDesconto(rset.getBigDecimal("desconto"));
if(itens == null) {
itens = new ArrayList<RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean>();
}
itens.add(relatorioVendasPacotesBoletosItemBean);
return itens;
}
private Integer carregarIndice(RelatorioVendasPacotesBoletosBean relatorioVendasBoletosBean) {
Integer idx = null;
if(lsDadosRelatorio.contains(relatorioVendasBoletosBean)) {
idx = lsDadosRelatorio.indexOf(relatorioVendasBoletosBean);
relatorioVendasBoletosBean = lsDadosRelatorio.get(idx);
}
return idx;
}
private RelatorioVendasPacotesBoletosBean carregarRelatorioVendasBoletosBean(ResultSet rset) throws SQLException {
RelatorioVendasPacotesBoletosBean relatorioVendasPacotesBoletosBean = new RelatorioVendasPacotesBoletosBean();
relatorioVendasPacotesBoletosBean.setDescdestino(rset.getString("destino"));
relatorioVendasPacotesBoletosBean.setDescorigen(rset.getString("origem"));
relatorioVendasPacotesBoletosBean.setCvedestino(rset.getString("cvedestino"));
relatorioVendasPacotesBoletosBean.setCveorigen(rset.getString("cveorigem"));
return relatorioVendasPacotesBoletosBean;
}
private void processarVendasPacoteCancelados(Connection conexao) {
ResultSet rset = null;
NamedParameterStatement stmt = null;
try {
stmt = carregarNamedParameterStatement(conexao, true);
rset = stmt.executeQuery();
if(lsDadosRelatorio == null) {
lsDadosRelatorio = new ArrayList<RelatorioVendasPacotesBoletosBean>();
}
while (rset.next()) {
RelatorioVendasPacotesBoletosBean relatorioVendasBoletosBean = carregarRelatorioVendasBoletosBean(rset);
Integer idx = carregarIndice(relatorioVendasBoletosBean);
if(idx != null) {
relatorioVendasBoletosBean = lsDadosRelatorio.get(idx);
}
relatorioVendasBoletosBean.setRelatorioVendasPacotesBoletosItemBeansCancelados(carregarItens(rset, relatorioVendasBoletosBean, relatorioVendasBoletosBean.getRelatorioVendasPacotesBoletosItemBeansCancelados()));
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);
}
}
}
private NamedParameterStatement carregarNamedParameterStatement(Connection conexao, boolean cancelados) throws SQLException {
String sql = getSqlPacotes(cancelados);
log.info(sql);
NamedParameterStatement 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);
}
if(origenId != null) {
stmt.setInt("origenId", origenId);
}
if(destinoId != null) {
stmt.setInt("destinoId", destinoId);
}
return stmt;
}
protected String getSqlPacotes(boolean cancelado) {
StringBuilder sQuery = new StringBuilder();
sQuery.append("SELECT DES.CVEPARADA AS CVEDESTINO, ORI.CVEPARADA AS CVEORIGEM, ORI.DESCPARADA AS ORIGEM, DES.DESCPARADA AS DESTINO, CAT.DESCCATEGORIA AS DESCCATEGORIA, ")
.append("COUNT(B.BOLETO_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("FROM BOLETO B ")
.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("LEFT JOIN CATEGORIA CAT ON CAT.CATEGORIA_ID = B.CATEGORIA_ID ")
.append("WHERE B.ACTIVO = 1 ");
if(!cancelado) {
sQuery.append("AND B.INDSTATUSBOLETO = 'V' ")
.append("AND B.MOTIVOCANCELACION_ID IS NULL ");
} else {
sQuery.append("AND B.MOTIVOCANCELACION_ID IS NOT NULL ");
}
if(empresaId != null) {
sQuery.append("AND B.EMPRESACORRIDA_ID = :empresaId ");
}
if(origenId != null) {
sQuery.append("AND B.ORIGEN_ID = :origenId ");
}
if(destinoId != null) {
sQuery.append("AND B.DESTINO_ID = :destinoId ");
}
if(fecInicio != null) {
sQuery.append("AND B.FECHORVENTA >= :fecInicio ");
}
if(fecFinal != null) {
sQuery.append("AND B.FECHORVENTA <= :fecFinal ");
}
sQuery.append("GROUP BY DES.CVEPARADA, ORI.CVEPARADA, ORI.DESCPARADA, DES.DESCPARADA, CAT.DESCCATEGORIA ")
.append("ORDER BY DES.CVEPARADA, ORI.CVEPARADA, ORI.DESCPARADA, DES.DESCPARADA, CAT.DESCCATEGORIA ");
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;
}
}

View File

@ -60,6 +60,8 @@ public class RelatorioVendasPacotesBoletos extends Relatorio {
Connection conexao = this.relatorio.getConexao(); Connection conexao = this.relatorio.getConexao();
processarVendasPacote(conexao); processarVendasPacote(conexao);
processarVendasAvulsas(conexao);
processarVendasAvulsasCancelados(conexao);
processarVendasPacoteTotais(); processarVendasPacoteTotais();
setNomeSubReporte(nomeSubReporte); setNomeSubReporte(nomeSubReporte);
@ -74,7 +76,7 @@ public class RelatorioVendasPacotesBoletos extends Relatorio {
NamedParameterStatement stmt = null; NamedParameterStatement stmt = null;
try { try {
stmt = carregarNamedParameterStatement(conexao, false); stmt = carregarNamedParameterStatementVendasPacotes(conexao, false);
rset = stmt.executeQuery(); rset = stmt.executeQuery();
if(lsDadosRelatorio == null) { if(lsDadosRelatorio == null) {
@ -85,13 +87,13 @@ public class RelatorioVendasPacotesBoletos extends Relatorio {
RelatorioVendasPacotesBoletosBean relatorioVendasBoletosBean = carregarRelatorioVendasBoletosBean(rset); RelatorioVendasPacotesBoletosBean relatorioVendasBoletosBean = carregarRelatorioVendasBoletosBean(rset);
Integer idx = carregarIndice(relatorioVendasBoletosBean); Integer idx = carregarIndice(relatorioVendasBoletosBean);
if(idx != null) { if(idx > -1) {
relatorioVendasBoletosBean = lsDadosRelatorio.get(idx); relatorioVendasBoletosBean = lsDadosRelatorio.get(idx);
} }
relatorioVendasBoletosBean.setRelatorioVendasPacotesBoletosItemBeans(carregarItens(rset, relatorioVendasBoletosBean, relatorioVendasBoletosBean.getRelatorioVendasPacotesBoletosItemBeans())); relatorioVendasBoletosBean.setRelatorioVendasPacotesBoletosItemBeans(carregarItens(rset, relatorioVendasBoletosBean, relatorioVendasBoletosBean.getRelatorioVendasPacotesBoletosItemBeans(), false));
if(idx != null) { if(idx > -1) {
lsDadosRelatorio.set(idx, relatorioVendasBoletosBean); lsDadosRelatorio.set(idx, relatorioVendasBoletosBean);
} else { } else {
lsDadosRelatorio.add(relatorioVendasBoletosBean); lsDadosRelatorio.add(relatorioVendasBoletosBean);
@ -115,7 +117,7 @@ public class RelatorioVendasPacotesBoletos extends Relatorio {
} }
private List<RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean> carregarItens(ResultSet rset, RelatorioVendasPacotesBoletosBean relatorioVendasPacotesBoletosBean, List<RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean> itens) throws SQLException { private List<RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean> carregarItens(ResultSet rset, RelatorioVendasPacotesBoletosBean relatorioVendasPacotesBoletosBean, List<RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean> itens, Boolean cancelado) throws SQLException {
RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean relatorioVendasPacotesBoletosItemBean = relatorioVendasPacotesBoletosBean.new RelatorioVendasPacotesBoletosItemBean(); RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean relatorioVendasPacotesBoletosItemBean = relatorioVendasPacotesBoletosBean.new RelatorioVendasPacotesBoletosItemBean();
relatorioVendasPacotesBoletosItemBean.setNumruta(rset.getString("numruta")); relatorioVendasPacotesBoletosItemBean.setNumruta(rset.getString("numruta"));
relatorioVendasPacotesBoletosItemBean.setDescruta(rset.getString("descruta")); relatorioVendasPacotesBoletosItemBean.setDescruta(rset.getString("descruta"));
@ -130,6 +132,8 @@ public class RelatorioVendasPacotesBoletos extends Relatorio {
relatorioVendasPacotesBoletosItemBean.setDesconto(rset.getBigDecimal("desconto")); relatorioVendasPacotesBoletosItemBean.setDesconto(rset.getBigDecimal("desconto"));
relatorioVendasPacotesBoletosItemBean.setSituacao(SituacaoVendaPacote.getSituacaoVendaPacote(rset.getInt("situacao"))); relatorioVendasPacotesBoletosItemBean.setSituacao(SituacaoVendaPacote.getSituacaoVendaPacote(rset.getInt("situacao")));
relatorioVendasPacotesBoletosItemBean.setQtdeImpresso(rset.getInt("qtdeimpresso")); relatorioVendasPacotesBoletosItemBean.setQtdeImpresso(rset.getInt("qtdeimpresso"));
relatorioVendasPacotesBoletosItemBean.setTipoVenda(rset.getString("tipovenda"));
relatorioVendasPacotesBoletosItemBean.setAvulsoCancelado(cancelado);
if(itens == null) { if(itens == null) {
itens = new ArrayList<RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean>(); itens = new ArrayList<RelatorioVendasPacotesBoletosBean.RelatorioVendasPacotesBoletosItemBean>();
@ -140,7 +144,7 @@ public class RelatorioVendasPacotesBoletos extends Relatorio {
} }
private Integer carregarIndice(RelatorioVendasPacotesBoletosBean relatorioVendasBoletosBean) { private Integer carregarIndice(RelatorioVendasPacotesBoletosBean relatorioVendasBoletosBean) {
Integer idx = null; Integer idx = -1;
if(lsDadosRelatorio.contains(relatorioVendasBoletosBean)) { if(lsDadosRelatorio.contains(relatorioVendasBoletosBean)) {
idx = lsDadosRelatorio.indexOf(relatorioVendasBoletosBean); idx = lsDadosRelatorio.indexOf(relatorioVendasBoletosBean);
relatorioVendasBoletosBean = lsDadosRelatorio.get(idx); relatorioVendasBoletosBean = lsDadosRelatorio.get(idx);
@ -158,8 +162,8 @@ public class RelatorioVendasPacotesBoletos extends Relatorio {
return relatorioVendasPacotesBoletosBean; return relatorioVendasPacotesBoletosBean;
} }
private NamedParameterStatement carregarNamedParameterStatement(Connection conexao, boolean cancelados) throws SQLException { private NamedParameterStatement carregarNamedParameterStatementVendasPacotes(Connection conexao, boolean cancelados) throws SQLException {
String sql = getSqlPacotes(cancelados); String sql = getSqlVendasPacotes(cancelados);
log.info(sql); log.info(sql);
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql); NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
@ -195,13 +199,14 @@ public class RelatorioVendasPacotesBoletos extends Relatorio {
return stmt; return stmt;
} }
protected String getSqlPacotes(boolean cancelado) { protected String getSqlVendasPacotes(boolean cancelado) {
StringBuilder sQuery = new StringBuilder(); StringBuilder sQuery = new StringBuilder();
sQuery.append("SELECT DES.CVEPARADA AS CVEDESTINO, ORI.CVEPARADA AS CVEORIGEM, ORI.DESCPARADA AS ORIGEM, DES.DESCPARADA AS DESTINO, R.NUMRUTA, R.DESCRUTA, PC.NOMCONVENIO, TTP.DESCTIPOTARIFA, VP.SITUACAO, ") sQuery.append("SELECT DES.CVEPARADA AS CVEDESTINO, ORI.CVEPARADA AS CVEORIGEM, ORI.DESCPARADA AS ORIGEM, DES.DESCPARADA AS DESTINO, R.NUMRUTA, R.DESCRUTA, PC.NOMCONVENIO, TTP.DESCTIPOTARIFA, VP.SITUACAO, ")
.append("SUM(CASE WHEN B.MOTIVOCANCELACION_ID = 16 THEN 1 ELSE 0 END) AS QTDEIMPRESSO, ") .append("SUM(CASE WHEN B.MOTIVOCANCELACION_ID = 16 THEN 1 ELSE 0 END) AS QTDEIMPRESSO, ")
.append("COUNT(TVP.TARIFAVENDAPACOTE_ID) AS QTDE, SUM(B.IMPORTETAXAEMBARQUE) AS SIMPORTETAXAEMBARQUE, SUM(B.IMPORTEPEDAGIO) AS SIMPORTEPEDAGIO, ") .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.IMPORTEOUTROS) AS SIMPORTEOUTROS, SUM(B.IMPORTESEGURO) AS SIMPORTESEGURO, SUM(B.PRECIOBASE) AS SPRECIOBASE, SUM(B.PRECIOBASE - B.PRECIOPAGADO) AS DESCONTO, ")
.append("'PACOTE' AS TIPOVENDA ")
.append("FROM VENDA_PACOTE VP ") .append("FROM VENDA_PACOTE VP ")
.append("INNER JOIN PACOTE P ON P.PACOTE_ID = VP.PACOTE_ID AND P.ACTIVO = 1 ") .append("INNER JOIN PACOTE P ON P.PACOTE_ID = VP.PACOTE_ID AND P.ACTIVO = 1 ")
.append("LEFT JOIN TARIFA_VENDA_PACOTE TVP ON TVP.VENDAPACOTE_ID = VP.VENDAPACOTE_ID ") .append("LEFT JOIN TARIFA_VENDA_PACOTE TVP ON TVP.VENDAPACOTE_ID = VP.VENDAPACOTE_ID ")
@ -250,8 +255,8 @@ public class RelatorioVendasPacotesBoletos extends Relatorio {
sQuery.append("AND TTP.TIPOTARIFAPACOTE_ID = :tipoTarifaPacoteId "); sQuery.append("AND TTP.TIPOTARIFAPACOTE_ID = :tipoTarifaPacoteId ");
} }
sQuery.append("GROUP BY DES.CVEPARADA, ORI.CVEPARADA, ORI.DESCPARADA, DES.DESCPARADA, R.NUMRUTA, R.DESCRUTA, PC.NOMCONVENIO, TTP.DESCTIPOTARIFA, VP.SITUACAO ") sQuery.append("GROUP BY DES.CVEPARADA, ORI.CVEPARADA, ORI.DESCPARADA, DES.DESCPARADA, R.NUMRUTA, R.DESCRUTA, PC.NOMCONVENIO, TTP.DESCTIPOTARIFA, VP.SITUACAO, 'PACOTE' ")
.append("ORDER BY DES.CVEPARADA, ORI.CVEPARADA, ORI.DESCPARADA, DES.DESCPARADA, R.NUMRUTA, R.DESCRUTA, PC.NOMCONVENIO, TTP.DESCTIPOTARIFA, VP.SITUACAO "); .append("ORDER BY DES.CVEPARADA, ORI.CVEPARADA, ORI.DESCPARADA, DES.DESCPARADA, R.NUMRUTA, R.DESCRUTA, PC.NOMCONVENIO, TTP.DESCTIPOTARIFA, VP.SITUACAO, 'PACOTE' ");
return sQuery.toString(); return sQuery.toString();
} }
@ -294,4 +299,182 @@ public class RelatorioVendasPacotesBoletos extends Relatorio {
this.lsDadosRelatorio = lsDadosRelatorio; this.lsDadosRelatorio = lsDadosRelatorio;
} }
private void processarVendasAvulsas(Connection conexao) {
ResultSet rset = null;
NamedParameterStatement stmt = null;
try {
stmt = carregarNamedParameterStatementVendasAvulsas(conexao, false);
rset = stmt.executeQuery();
if(lsDadosRelatorio == null) {
lsDadosRelatorio = new ArrayList<RelatorioVendasPacotesBoletosBean>();
}
while (rset.next()) {
RelatorioVendasPacotesBoletosBean relatorioVendasBoletosBean = carregarRelatorioVendasBoletosBean(rset);
Integer idx = carregarIndice(relatorioVendasBoletosBean);
if(idx > -1) {
relatorioVendasBoletosBean = lsDadosRelatorio.get(idx);
}
relatorioVendasBoletosBean.setRelatorioVendasPacotesBoletosItemBeans(carregarItens(rset, relatorioVendasBoletosBean, relatorioVendasBoletosBean.getRelatorioVendasPacotesBoletosItemBeans(), false));
if(idx > -1) {
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);
}
}
}
private NamedParameterStatement carregarNamedParameterStatementVendasAvulsas(Connection conexao, boolean cancelados) throws SQLException {
String sql = getSqlVendasAvulsos(cancelados);
log.info(sql);
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
if(fecVendaInicio != null) {
stmt.setTimestamp("fecInicio", fecVendaInicio);
}
if(fecVendaFinal != null) {
stmt.setTimestamp("fecFinal", fecVendaFinal);
}
if(fecPacoteInicio != null) {
stmt.setTimestamp("fecViajeInicio", fecPacoteInicio);
}
if(fecPacoteFinal != null) {
stmt.setTimestamp("fecViajeFinal", fecPacoteFinal);
}
if (empresaId != null && empresaId > 0){
stmt.setInt("empresaId", empresaId);
}
if(origenId != null) {
stmt.setInt("origenId", origenId);
}
if(destinoId != null) {
stmt.setInt("destinoId", destinoId);
}
return stmt;
}
protected String getSqlVendasAvulsos(boolean cancelado) {
StringBuilder sQuery = new StringBuilder();
sQuery.append("SELECT DES.CVEPARADA AS CVEDESTINO, ORI.CVEPARADA AS CVEORIGEM, ORI.DESCPARADA AS ORIGEM, DES.DESCPARADA AS DESTINO, ")
.append("CAT.DESCCATEGORIA AS DESCTIPOTARIFA, R.NUMRUTA, R.DESCRUTA, NULL AS SITUACAO, 1 AS QTDEIMPRESSO, NULL AS NOMCONVENIO, 'AVULSO' AS TIPOVENDA, ")
.append("COUNT(B.BOLETO_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("FROM BOLETO B ")
.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("LEFT JOIN CATEGORIA CAT ON CAT.CATEGORIA_ID = B.CATEGORIA_ID ")
.append("LEFT JOIN RUTA R ON R.RUTA_ID = B.RUTA_ID ")
.append("WHERE B.ACTIVO = 1 ");
if(!cancelado) {
sQuery.append("AND B.INDSTATUSBOLETO = 'V' ")
.append("AND B.MOTIVOCANCELACION_ID IS NULL ");
} else {
sQuery.append("AND B.MOTIVOCANCELACION_ID IS NOT NULL ");
}
if (empresaId != null && empresaId > 0){
sQuery.append("AND B.EMPRESACORRIDA_ID = :empresaId ");
}
if(origenId != null) {
sQuery.append("AND B.ORIGEN_ID = :origenId ");
}
if(destinoId != null) {
sQuery.append("AND B.DESTINO_ID = :destinoId ");
}
if(fecVendaInicio != null) {
sQuery.append("AND B.FECHORVENTA >= :fecInicio ");
}
if(fecVendaFinal != null) {
sQuery.append("AND B.FECHORVENTA <= :fecFinal ");
}
if(fecPacoteInicio != null) {
sQuery.append("AND B.FECHORVIAJE >= :fecViajeInicio ");
}
if(fecPacoteFinal != null) {
sQuery.append("AND B.FECHORVIAJE <= :fecViajeFinal ");
}
sQuery.append("GROUP BY DES.CVEPARADA, ORI.CVEPARADA, ORI.DESCPARADA, DES.DESCPARADA, CAT.DESCCATEGORIA, R.NUMRUTA, R.DESCRUTA, NULL, 1, NULL, 'AVULSO' ")
.append("ORDER BY DES.CVEPARADA, ORI.CVEPARADA, ORI.DESCPARADA, DES.DESCPARADA, CAT.DESCCATEGORIA, R.NUMRUTA, R.DESCRUTA, NULL, 1, NULL, 'AVULSO' ");
return sQuery.toString();
}
private void processarVendasAvulsasCancelados(Connection conexao) {
ResultSet rset = null;
NamedParameterStatement stmt = null;
try {
stmt = carregarNamedParameterStatementVendasAvulsas(conexao, true);
rset = stmt.executeQuery();
if(lsDadosRelatorio == null) {
lsDadosRelatorio = new ArrayList<RelatorioVendasPacotesBoletosBean>();
}
while (rset.next()) {
RelatorioVendasPacotesBoletosBean relatorioVendasBoletosBean = carregarRelatorioVendasBoletosBean(rset);
Integer idx = carregarIndice(relatorioVendasBoletosBean);
if(idx > -1) {
relatorioVendasBoletosBean = lsDadosRelatorio.get(idx);
}
relatorioVendasBoletosBean.setRelatorioVendasPacotesBoletosItemBeansCancelados(carregarItens(rset, relatorioVendasBoletosBean, relatorioVendasBoletosBean.getRelatorioVendasPacotesBoletosItemBeansCancelados(), true));
if(idx > -1) {
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);
}
}
}
} }

View File

@ -14,3 +14,4 @@ label.sim=Si
label.nao=No label.nao=No
label.ruta=Ruta label.ruta=Ruta
label.impresso=Impresso label.impresso=Impresso
label.tipoVenda=Tipo Venda

View File

@ -14,3 +14,4 @@ label.sim=Sim
label.nao=Não label.nao=Não
label.ruta=Rota label.ruta=Rota
label.impresso=Impresso label.impresso=Impresso
label.tipoVenda=Tipo Venda

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-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="RelatorioVendasPacotesBoletosItem" pageWidth="802" pageHeight="555" orientation="Landscape" columnWidth="802" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="f17327a0-45d8-4ec1-8350-688df66785dc"> <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="RelatorioVendasPacotesBoletosItem" 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="2.0"/> <property name="ireport.zoom" value="3.0"/>
<property name="ireport.x" value="822"/> <property name="ireport.x" value="1662"/>
<property name="ireport.y" value="0"/> <property name="ireport.y" value="0"/>
<field name="nomconvenio" class="java.lang.String"/> <field name="nomconvenio" class="java.lang.String"/>
<field name="desctipotarifa" class="java.lang.String"/> <field name="desctipotarifa" class="java.lang.String"/>
@ -17,6 +17,7 @@
<field name="cancelado" class="java.lang.Boolean"/> <field name="cancelado" class="java.lang.Boolean"/>
<field name="numDescRuta" class="java.lang.String"/> <field name="numDescRuta" class="java.lang.String"/>
<field name="impresso" class="java.lang.Boolean"/> <field name="impresso" class="java.lang.Boolean"/>
<field name="tipoVenda" class="java.lang.String"/>
<variable name="vQtde" class="java.lang.Long" calculation="Sum"> <variable name="vQtde" class="java.lang.Long" calculation="Sum">
<variableExpression><![CDATA[$F{qtde}]]></variableExpression> <variableExpression><![CDATA[$F{qtde}]]></variableExpression>
</variable> </variable>
@ -56,72 +57,72 @@
<columnHeader> <columnHeader>
<band height="24" splitType="Stretch"> <band height="24" splitType="Stretch">
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="137" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="ca0cfce0-945a-41b6-a2b6-07b599432260"/> <reportElement stretchType="RelativeToTallestObject" x="108" y="2" width="65" height="20" isPrintWhenDetailOverflows="true" uuid="ca0cfce0-945a-41b6-a2b6-07b599432260"/>
<textElement verticalAlignment="Top" markup="none"> <textElement verticalAlignment="Top" markup="none">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.desctipotarifa}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.desctipotarifa}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="218" y="2" width="73" height="20" isPrintWhenDetailOverflows="true" uuid="16b05797-4914-43d4-8ef5-1e999e6ee7eb"/> <reportElement stretchType="RelativeToTallestObject" x="174" y="2" width="61" height="20" isPrintWhenDetailOverflows="true" uuid="16b05797-4914-43d4-8ef5-1e999e6ee7eb"/>
<textElement verticalAlignment="Top" markup="none"> <textElement verticalAlignment="Top" markup="none">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.nomconvenio}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.nomconvenio}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="292" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="bc16a571-d1f3-4574-a521-3c6076317b8f"/> <reportElement stretchType="RelativeToTallestObject" x="237" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="bc16a571-d1f3-4574-a521-3c6076317b8f"/>
<textElement textAlignment="Center" verticalAlignment="Top" markup="none"> <textElement textAlignment="Center" verticalAlignment="Top" markup="none">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.qtde}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.qtde}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="339" y="2" width="44" height="20" isPrintWhenDetailOverflows="true" uuid="74894a72-7acf-43bc-abc7-a3ca0931f1c0"/> <reportElement stretchType="RelativeToTallestObject" x="284" y="2" width="44" height="20" isPrintWhenDetailOverflows="true" uuid="74894a72-7acf-43bc-abc7-a3ca0931f1c0"/>
<textElement textAlignment="Right" verticalAlignment="Top" markup="none"> <textElement textAlignment="Right" verticalAlignment="Top" markup="none">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.spreciobase}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.spreciobase}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="386" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="60d565a0-f9c1-4648-87a5-0acd7bcc95cb"/> <reportElement stretchType="RelativeToTallestObject" x="331" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="60d565a0-f9c1-4648-87a5-0acd7bcc95cb"/>
<textElement textAlignment="Right" verticalAlignment="Top" markup="none"> <textElement textAlignment="Right" verticalAlignment="Top" markup="none">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.simporteseguro}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.simporteseguro}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="434" y="2" width="50" height="20" isPrintWhenDetailOverflows="true" uuid="7351b458-41bf-4cf3-839a-9b17860cd029"/> <reportElement stretchType="RelativeToTallestObject" x="379" y="2" width="50" height="20" isPrintWhenDetailOverflows="true" uuid="7351b458-41bf-4cf3-839a-9b17860cd029"/>
<textElement textAlignment="Right" verticalAlignment="Top" markup="none"> <textElement textAlignment="Right" verticalAlignment="Top" markup="none">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.simportetaxaembarque}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.simportetaxaembarque}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="486" y="2" width="48" height="20" isPrintWhenDetailOverflows="true" uuid="b40f5fec-8d0e-47c6-9a02-c6b9f4f4cf40"/> <reportElement stretchType="RelativeToTallestObject" x="431" y="2" width="48" height="20" isPrintWhenDetailOverflows="true" uuid="b40f5fec-8d0e-47c6-9a02-c6b9f4f4cf40"/>
<textElement textAlignment="Right" verticalAlignment="Top" markup="none"> <textElement textAlignment="Right" verticalAlignment="Top" markup="none">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.simporteoutros}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.simporteoutros}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="641" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="7f2d56a0-8755-4192-be26-3c082bcde27f"/> <reportElement stretchType="RelativeToTallestObject" x="586" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="7f2d56a0-8755-4192-be26-3c082bcde27f"/>
<textElement textAlignment="Right" verticalAlignment="Top" markup="none"> <textElement textAlignment="Right" verticalAlignment="Top" markup="none">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.spreciopagado}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.spreciopagado}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="588" y="2" width="51" height="20" isPrintWhenDetailOverflows="true" uuid="637d297c-7275-4094-9f67-e6d36eff60a2"/> <reportElement stretchType="RelativeToTallestObject" x="533" y="2" width="51" height="20" isPrintWhenDetailOverflows="true" uuid="637d297c-7275-4094-9f67-e6d36eff60a2"/>
<textElement textAlignment="Right" verticalAlignment="Top" markup="none"> <textElement textAlignment="Right" verticalAlignment="Top" markup="none">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.desconto}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.desconto}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="536" y="2" width="49" height="20" isPrintWhenDetailOverflows="true" uuid="0d9ab795-d305-44a6-b12a-e0445e36613a"/> <reportElement stretchType="RelativeToTallestObject" x="481" y="2" width="49" height="20" isPrintWhenDetailOverflows="true" uuid="0d9ab795-d305-44a6-b12a-e0445e36613a"/>
<textElement textAlignment="Right" verticalAlignment="Top" markup="none"> <textElement textAlignment="Right" verticalAlignment="Top" markup="none">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.spreciototal}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.spreciototal}]]></textFieldExpression>
</textField> </textField>
@ -129,34 +130,34 @@
<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="4d4396e4-a34f-438e-a514-662f3dad27d3"/> <reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="4d4396e4-a34f-438e-a514-662f3dad27d3"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="217" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="93d54a79-3e12-4842-ad69-8df8a59f749d"/> <reportElement stretchType="RelativeToTallestObject" x="173" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="93d54a79-3e12-4842-ad69-8df8a59f749d"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="291" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="3445b238-a1d8-4edd-9746-987d4711d672"/> <reportElement stretchType="RelativeToTallestObject" x="236" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="3445b238-a1d8-4edd-9746-987d4711d672"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="338" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="693e1442-9a9b-4237-b8ce-a7368319bb8c"/> <reportElement stretchType="RelativeToTallestObject" x="283" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="693e1442-9a9b-4237-b8ce-a7368319bb8c"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="384" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="b9353306-7d23-4428-bde1-136a92c129d0"/> <reportElement stretchType="RelativeToTallestObject" x="329" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="b9353306-7d23-4428-bde1-136a92c129d0"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="433" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="c236d4ae-a2fe-4fce-80f1-aceabf3d47ad"/> <reportElement stretchType="RelativeToTallestObject" x="378" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="c236d4ae-a2fe-4fce-80f1-aceabf3d47ad"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="485" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="a7a71b94-542f-4ebc-9812-982fe947379b"/> <reportElement stretchType="RelativeToTallestObject" x="430" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="a7a71b94-542f-4ebc-9812-982fe947379b"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="535" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="ad00d26a-75cd-4fe1-bd28-a8346dcb1e82"/> <reportElement stretchType="RelativeToTallestObject" x="480" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="ad00d26a-75cd-4fe1-bd28-a8346dcb1e82"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="586" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="0960adca-3ca3-4f52-88af-70278652e9a6"/> <reportElement stretchType="RelativeToTallestObject" x="531" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="0960adca-3ca3-4f52-88af-70278652e9a6"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="640" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="a5133d51-f908-4ffe-9df8-d25f0b312ab9"/> <reportElement stretchType="RelativeToTallestObject" x="585" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="a5133d51-f908-4ffe-9df8-d25f0b312ab9"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="801" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="2cdb1883-2ec8-4373-90d1-35eaf7502cbc"/> <reportElement stretchType="RelativeToTallestObject" x="745" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="2cdb1883-2ec8-4373-90d1-35eaf7502cbc"/>
</line> </line>
<line> <line>
<reportElement positionType="Float" x="0" y="0" width="802" height="1" forecolor="#CCCCCC" uuid="0da94d15-8bfb-4954-84fb-9e277c593308"/> <reportElement positionType="Float" x="0" y="0" width="802" height="1" forecolor="#CCCCCC" uuid="0da94d15-8bfb-4954-84fb-9e277c593308"/>
@ -165,106 +166,116 @@
<reportElement positionType="Float" x="0" y="23" width="802" height="1" forecolor="#CCCCCC" uuid="64883292-c3bb-4786-a914-44d64bfc53c9"/> <reportElement positionType="Float" x="0" y="23" width="802" height="1" forecolor="#CCCCCC" uuid="64883292-c3bb-4786-a914-44d64bfc53c9"/>
</line> </line>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="746" y="2" width="53" height="20" isPrintWhenDetailOverflows="true" uuid="7fc23849-b39d-4673-811f-38cdfe3d0567"/> <reportElement stretchType="RelativeToTallestObject" x="691" y="2" width="53" height="20" isPrintWhenDetailOverflows="true" uuid="7fc23849-b39d-4673-811f-38cdfe3d0567"/>
<textElement textAlignment="Center" verticalAlignment="Top" markup="none"> <textElement textAlignment="Center" verticalAlignment="Top" markup="none">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.cancelado}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.cancelado}]]></textFieldExpression>
</textField> </textField>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="744" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="de0639f4-cea9-4a31-860a-6ceb480d15ba"/> <reportElement stretchType="RelativeToTallestObject" x="689" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="de0639f4-cea9-4a31-860a-6ceb480d15ba"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="136" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="798f77de-4a24-4d84-ac6d-4e7ebf9ee8ee"/> <reportElement stretchType="RelativeToTallestObject" x="106" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="798f77de-4a24-4d84-ac6d-4e7ebf9ee8ee"/>
</line> </line>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="1" y="2" width="135" height="20" isPrintWhenDetailOverflows="true" uuid="851e7282-6089-427f-8f2a-e83b5ad47551"/> <reportElement stretchType="RelativeToTallestObject" x="1" y="2" width="105" height="20" isPrintWhenDetailOverflows="true" uuid="851e7282-6089-427f-8f2a-e83b5ad47551"/>
<textElement verticalAlignment="Top" markup="none"> <textElement verticalAlignment="Top" markup="none">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.ruta}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.ruta}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="690" y="2" width="53" height="20" isPrintWhenDetailOverflows="true" uuid="b5a149a6-1465-4faa-88b9-b9eae375fe5e"/> <reportElement stretchType="RelativeToTallestObject" x="635" y="2" width="53" height="20" isPrintWhenDetailOverflows="true" uuid="b5a149a6-1465-4faa-88b9-b9eae375fe5e"/>
<textElement textAlignment="Center" verticalAlignment="Top" markup="none"> <textElement textAlignment="Center" verticalAlignment="Top" markup="none">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{label.impresso}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{label.impresso}]]></textFieldExpression>
</textField> </textField>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="688" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="5d6b01fa-fb39-4fd1-a48c-3324e49695f7"/> <reportElement stretchType="RelativeToTallestObject" x="633" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="5d6b01fa-fb39-4fd1-a48c-3324e49695f7"/>
</line>
<textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="747" y="2" width="53" height="20" isPrintWhenDetailOverflows="true" uuid="302a7d7c-0e02-4974-82ab-9f8acf13e4c0"/>
<textElement textAlignment="Center" verticalAlignment="Top" markup="none">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.tipoVenda}]]></textFieldExpression>
</textField>
<line>
<reportElement stretchType="RelativeToTallestObject" x="801" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="50256048-5700-4770-9fb1-1ccf167c34db"/>
</line> </line>
</band> </band>
</columnHeader> </columnHeader>
<detail> <detail>
<band height="24" splitType="Stretch"> <band height="24" splitType="Stretch">
<textField isStretchWithOverflow="true" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="137" y="2" width="79" height="20" isPrintWhenDetailOverflows="true" uuid="ebc048fd-2106-47f2-88f5-ff3710ec047e"/> <reportElement stretchType="RelativeToTallestObject" x="108" y="2" width="65" height="20" isPrintWhenDetailOverflows="true" uuid="ebc048fd-2106-47f2-88f5-ff3710ec047e"/>
<textElement verticalAlignment="Top"> <textElement verticalAlignment="Top">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{desctipotarifa}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{desctipotarifa}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="218" y="2" width="73" height="20" isPrintWhenDetailOverflows="true" uuid="9d3ec869-4da6-45a1-b59b-6e374b36a929"/> <reportElement stretchType="RelativeToTallestObject" x="174" y="2" width="61" height="20" isPrintWhenDetailOverflows="true" uuid="9d3ec869-4da6-45a1-b59b-6e374b36a929"/>
<textElement verticalAlignment="Top"> <textElement verticalAlignment="Top">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{nomconvenio}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{nomconvenio}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="292" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="be19e5aa-b241-4d2d-bd96-47b2e271cdf4"/> <reportElement stretchType="RelativeToTallestObject" x="237" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="be19e5aa-b241-4d2d-bd96-47b2e271cdf4"/>
<textElement textAlignment="Center" verticalAlignment="Top"> <textElement textAlignment="Center" verticalAlignment="Top">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{qtde}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{qtde}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="339" y="2" width="44" height="20" isPrintWhenDetailOverflows="true" uuid="5e343619-3254-4481-a3d3-00a33e144145"/> <reportElement stretchType="RelativeToTallestObject" x="284" y="2" width="44" height="20" isPrintWhenDetailOverflows="true" uuid="5e343619-3254-4481-a3d3-00a33e144145"/>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{spreciobase}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{spreciobase}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="386" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="43d5475f-18ce-4427-b971-8f374a01e9b1"/> <reportElement stretchType="RelativeToTallestObject" x="331" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="43d5475f-18ce-4427-b971-8f374a01e9b1"/>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{simporteseguro}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{simporteseguro}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="434" y="2" width="50" height="20" isPrintWhenDetailOverflows="true" uuid="e47fb86e-b5b3-4f8f-9200-3fc950e6631d"/> <reportElement stretchType="RelativeToTallestObject" x="379" y="2" width="50" height="20" isPrintWhenDetailOverflows="true" uuid="e47fb86e-b5b3-4f8f-9200-3fc950e6631d"/>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{simportetaxaembarque}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{simportetaxaembarque}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="486" y="2" width="48" height="20" isPrintWhenDetailOverflows="true" uuid="3f5483a5-9c57-4510-b040-24b0267396d8"/> <reportElement stretchType="RelativeToTallestObject" x="431" y="2" width="48" height="20" isPrintWhenDetailOverflows="true" uuid="3f5483a5-9c57-4510-b040-24b0267396d8"/>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{simporteoutros}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{simporteoutros}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="641" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="3348c997-2b2d-401f-a5d6-2a9e1e7abd51"/> <reportElement stretchType="RelativeToTallestObject" x="586" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="3348c997-2b2d-401f-a5d6-2a9e1e7abd51"/>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{spreciopagado}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{spreciopagado}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="588" y="2" width="51" height="20" isPrintWhenDetailOverflows="true" uuid="d81fe2cf-b81c-4f65-939c-6c7d54559360"/> <reportElement stretchType="RelativeToTallestObject" x="533" y="2" width="51" height="20" isPrintWhenDetailOverflows="true" uuid="d81fe2cf-b81c-4f65-939c-6c7d54559360"/>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{desconto}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{desconto}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="536" y="2" width="49" height="20" isPrintWhenDetailOverflows="true" uuid="010f06dc-7915-4d18-ace5-b0262e54c9e3"/> <reportElement stretchType="RelativeToTallestObject" x="481" y="2" width="49" height="20" isPrintWhenDetailOverflows="true" uuid="010f06dc-7915-4d18-ace5-b0262e54c9e3"/>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{spreciototal}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{spreciototal}]]></textFieldExpression>
</textField> </textField>
@ -272,34 +283,34 @@
<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="d00cf6c5-52f9-47b2-bd01-4f46ddd8bd11"/> <reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="d00cf6c5-52f9-47b2-bd01-4f46ddd8bd11"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="217" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="3a9d2b33-6d6a-4c4e-801b-224396ccfc48"/> <reportElement stretchType="RelativeToTallestObject" x="173" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="3a9d2b33-6d6a-4c4e-801b-224396ccfc48"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="291" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="a3d1b877-70ee-4b4d-8889-fd2753d5265b"/> <reportElement stretchType="RelativeToTallestObject" x="236" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="a3d1b877-70ee-4b4d-8889-fd2753d5265b"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="338" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="63d8ba46-8dd5-446b-9358-17fafe3f2637"/> <reportElement stretchType="RelativeToTallestObject" x="283" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="63d8ba46-8dd5-446b-9358-17fafe3f2637"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="384" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="a91fb857-041e-4bd6-8bd2-43ada54add97"/> <reportElement stretchType="RelativeToTallestObject" x="329" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="a91fb857-041e-4bd6-8bd2-43ada54add97"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="433" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="ceaa0870-2736-4794-abb5-53add3d11c5d"/> <reportElement stretchType="RelativeToTallestObject" x="378" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="ceaa0870-2736-4794-abb5-53add3d11c5d"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="485" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="bbc1b544-2ed6-4c95-ab0f-63697c6430cd"/> <reportElement stretchType="RelativeToTallestObject" x="430" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="bbc1b544-2ed6-4c95-ab0f-63697c6430cd"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="535" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="eb4f1c10-935f-456d-8cb4-15c565db2464"/> <reportElement stretchType="RelativeToTallestObject" x="480" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="eb4f1c10-935f-456d-8cb4-15c565db2464"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="586" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="928b086b-43cd-4ddc-b653-ecc0c22dfe69"/> <reportElement stretchType="RelativeToTallestObject" x="531" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="928b086b-43cd-4ddc-b653-ecc0c22dfe69"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="640" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="59bd1af6-ea28-464d-b287-4fd0dee3ddcf"/> <reportElement stretchType="RelativeToTallestObject" x="585" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="59bd1af6-ea28-464d-b287-4fd0dee3ddcf"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="801" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="cbbf8c84-fad3-4653-8aaa-6c9ad47872ab"/> <reportElement stretchType="RelativeToTallestObject" x="745" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="cbbf8c84-fad3-4653-8aaa-6c9ad47872ab"/>
</line> </line>
<line> <line>
<reportElement positionType="Float" x="0" y="23" width="802" height="1" forecolor="#CCCCCC" uuid="bc3a32cd-6bbd-464e-8a5a-6a742dff6cfc"/> <reportElement positionType="Float" x="0" y="23" width="802" height="1" forecolor="#CCCCCC" uuid="bc3a32cd-6bbd-464e-8a5a-6a742dff6cfc"/>
@ -308,34 +319,44 @@
<reportElement positionType="Float" x="0" y="0" width="802" height="1" forecolor="#CCCCCC" uuid="b561162c-d45a-48a9-b374-110b84f36fa3"/> <reportElement positionType="Float" x="0" y="0" width="802" height="1" forecolor="#CCCCCC" uuid="b561162c-d45a-48a9-b374-110b84f36fa3"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="744" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="48eb05b4-a6a0-458d-afb8-10e74183293f"/> <reportElement stretchType="RelativeToTallestObject" x="689" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="48eb05b4-a6a0-458d-afb8-10e74183293f"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="136" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="607a62b5-f460-4397-aa39-0ee6e134bd87"/> <reportElement stretchType="RelativeToTallestObject" x="106" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="607a62b5-f460-4397-aa39-0ee6e134bd87"/>
</line> </line>
<textField isStretchWithOverflow="true" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="1" y="2" width="135" height="20" isPrintWhenDetailOverflows="true" uuid="1b32916c-ca23-4aa7-89a0-b372dd04a7b9"/> <reportElement stretchType="RelativeToTallestObject" x="1" y="2" width="105" height="20" isPrintWhenDetailOverflows="true" uuid="1b32916c-ca23-4aa7-89a0-b372dd04a7b9"/>
<textElement verticalAlignment="Top"> <textElement verticalAlignment="Top">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{numDescRuta}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{numDescRuta}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="746" y="2" width="53" height="20" isPrintWhenDetailOverflows="true" uuid="874fe756-fcd5-4953-838d-dc51c9c44fca"/> <reportElement stretchType="RelativeToTallestObject" x="691" y="2" width="53" height="20" isPrintWhenDetailOverflows="true" uuid="874fe756-fcd5-4953-838d-dc51c9c44fca"/>
<textElement textAlignment="Center" verticalAlignment="Top" markup="none"> <textElement textAlignment="Center" verticalAlignment="Top" markup="none">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{cancelado} ? $R{label.sim} : $R{label.nao}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{cancelado} ? $R{label.sim} : $R{label.nao}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true"> <textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="690" y="2" width="53" height="20" isPrintWhenDetailOverflows="true" uuid="5f6e9872-8d74-474a-be0a-7a8af98fd9dd"/> <reportElement stretchType="RelativeToTallestObject" x="635" y="2" width="53" height="20" isPrintWhenDetailOverflows="true" uuid="5f6e9872-8d74-474a-be0a-7a8af98fd9dd"/>
<textElement textAlignment="Center" verticalAlignment="Top" markup="none"> <textElement textAlignment="Center" verticalAlignment="Top" markup="none">
<font size="8"/> <font size="6"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{impresso} ? $R{label.sim} : $R{label.nao}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{impresso} ? $R{label.sim} : $R{label.nao}]]></textFieldExpression>
</textField> </textField>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="688" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="70d0bce1-3fbf-462f-a6ed-0d2ed5ebea37"/> <reportElement stretchType="RelativeToTallestObject" x="633" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="70d0bce1-3fbf-462f-a6ed-0d2ed5ebea37"/>
</line>
<textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToTallestObject" x="747" y="2" width="53" height="20" isPrintWhenDetailOverflows="true" uuid="2934d1ac-d741-416a-8cbc-18c5a06628c1"/>
<textElement verticalAlignment="Top" markup="none">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{tipoVenda}]]></textFieldExpression>
</textField>
<line>
<reportElement stretchType="RelativeToTallestObject" x="801" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="f492becd-39b7-41ac-b275-91d1286bea89"/>
</line> </line>
</band> </band>
</detail> </detail>
@ -345,58 +366,58 @@
<pageFooter> <pageFooter>
<band height="24" splitType="Stretch"> <band height="24" splitType="Stretch">
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
<reportElement x="292" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="01e3adbf-f994-4e68-8909-370ff62d5fc2"/> <reportElement x="237" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="01e3adbf-f994-4e68-8909-370ff62d5fc2"/>
<textElement textAlignment="Center" verticalAlignment="Top"> <textElement textAlignment="Center" verticalAlignment="Top">
<font size="8" isBold="true"/> <font size="6" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$V{vQtde}]]></textFieldExpression> <textFieldExpression><![CDATA[$V{vQtde}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="339" y="2" width="44" height="20" isPrintWhenDetailOverflows="true" uuid="1e428984-8f32-401e-98cc-fb8058170b8b"/> <reportElement x="284" y="2" width="44" height="20" isPrintWhenDetailOverflows="true" uuid="1e428984-8f32-401e-98cc-fb8058170b8b"/>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="8" isBold="true"/> <font size="6" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$V{vSpreciobase}]]></textFieldExpression> <textFieldExpression><![CDATA[$V{vSpreciobase}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="386" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="0e5c22ef-c516-4077-bb87-4ecaac0c2527"/> <reportElement x="331" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="0e5c22ef-c516-4077-bb87-4ecaac0c2527"/>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="8" isBold="true"/> <font size="6" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$V{vSimporteseguro}]]></textFieldExpression> <textFieldExpression><![CDATA[$V{vSimporteseguro}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="434" y="2" width="50" height="20" isPrintWhenDetailOverflows="true" uuid="45d16415-14dc-4d11-bbdf-03947bc31864"/> <reportElement x="379" y="2" width="50" height="20" isPrintWhenDetailOverflows="true" uuid="45d16415-14dc-4d11-bbdf-03947bc31864"/>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="8" isBold="true"/> <font size="6" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$V{vSimportetaxaembarque}]]></textFieldExpression> <textFieldExpression><![CDATA[$V{vSimportetaxaembarque}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="486" y="2" width="48" height="20" isPrintWhenDetailOverflows="true" uuid="0cf0ae52-7f31-4e4f-b30f-2714b1e7e4ba"/> <reportElement x="431" y="2" width="48" height="20" isPrintWhenDetailOverflows="true" uuid="0cf0ae52-7f31-4e4f-b30f-2714b1e7e4ba"/>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="8" isBold="true"/> <font size="6" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$V{vSimporteoutros}]]></textFieldExpression> <textFieldExpression><![CDATA[$V{vSimporteoutros}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="536" y="2" width="49" height="20" isPrintWhenDetailOverflows="true" uuid="92daa21e-386c-4731-943c-0a925d98f38f"/> <reportElement x="481" y="2" width="49" height="20" isPrintWhenDetailOverflows="true" uuid="92daa21e-386c-4731-943c-0a925d98f38f"/>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="8" isBold="true"/> <font size="6" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$V{vSpreciototal}]]></textFieldExpression> <textFieldExpression><![CDATA[$V{vSpreciototal}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="588" y="2" width="51" height="20" isPrintWhenDetailOverflows="true" uuid="e83dea1b-ebc3-497d-bc18-44a13a3e103c"/> <reportElement x="533" y="2" width="51" height="20" isPrintWhenDetailOverflows="true" uuid="e83dea1b-ebc3-497d-bc18-44a13a3e103c"/>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="8" isBold="true"/> <font size="6" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$V{vDesconto}]]></textFieldExpression> <textFieldExpression><![CDATA[$V{vDesconto}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement x="641" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="0ce3d768-3e6d-4a7b-b3b0-706e811e2d26"/> <reportElement x="586" y="2" width="46" height="20" isPrintWhenDetailOverflows="true" uuid="0ce3d768-3e6d-4a7b-b3b0-706e811e2d26"/>
<textElement textAlignment="Right" verticalAlignment="Top"> <textElement textAlignment="Right" verticalAlignment="Top">
<font size="8" isBold="true"/> <font size="6" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$V{vSpreciopagado}]]></textFieldExpression> <textFieldExpression><![CDATA[$V{vSpreciopagado}]]></textFieldExpression>
</textField> </textField>
@ -407,37 +428,34 @@
<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="8e1b53c2-7074-4697-802a-ac1221f00cc8"/> <reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="8e1b53c2-7074-4697-802a-ac1221f00cc8"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="291" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="8fa9bc36-30f6-4f14-83b3-27b898d2a9ea"/> <reportElement stretchType="RelativeToTallestObject" x="236" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="8fa9bc36-30f6-4f14-83b3-27b898d2a9ea"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="338" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="4cbc3b36-2c22-40cc-8a80-4024e5cd1aa1"/> <reportElement stretchType="RelativeToTallestObject" x="283" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="4cbc3b36-2c22-40cc-8a80-4024e5cd1aa1"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="384" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="75adfdfa-56ba-45d6-895c-8f4d07352662"/> <reportElement stretchType="RelativeToTallestObject" x="329" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="75adfdfa-56ba-45d6-895c-8f4d07352662"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="433" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="494ed8c6-5e48-44f8-a8d9-70b557856d6c"/> <reportElement stretchType="RelativeToTallestObject" x="378" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="494ed8c6-5e48-44f8-a8d9-70b557856d6c"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="485" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="63f52a6e-506e-4442-bbcc-32d2c8c73a1f"/> <reportElement stretchType="RelativeToTallestObject" x="430" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="63f52a6e-506e-4442-bbcc-32d2c8c73a1f"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="535" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="47e4bc34-618c-4169-942d-422b2d00315f"/> <reportElement stretchType="RelativeToTallestObject" x="480" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="47e4bc34-618c-4169-942d-422b2d00315f"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="586" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="c2a082b0-b006-430b-8768-22339b2a6d71"/> <reportElement stretchType="RelativeToTallestObject" x="531" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="c2a082b0-b006-430b-8768-22339b2a6d71"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="640" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="7daf4d6b-c33d-4fe4-8ffa-9f11e56957c6"/> <reportElement stretchType="RelativeToTallestObject" x="585" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="7daf4d6b-c33d-4fe4-8ffa-9f11e56957c6"/>
</line>
<line>
<reportElement stretchType="RelativeToTallestObject" x="801" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="2f2a4651-90e2-4dc1-85a8-d67bf44dd03d"/>
</line> </line>
<line> <line>
<reportElement positionType="Float" x="0" y="0" width="802" height="1" forecolor="#CCCCCC" uuid="829fa1e8-3b8d-4349-b28e-085e73efcbbc"/> <reportElement positionType="Float" x="0" y="0" width="802" height="1" forecolor="#CCCCCC" uuid="829fa1e8-3b8d-4349-b28e-085e73efcbbc"/>
</line> </line>
<line> <line>
<reportElement stretchType="RelativeToTallestObject" x="688" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="d33af55b-f1f9-4e13-a001-9ab0c2242ae6"/> <reportElement stretchType="RelativeToTallestObject" x="633" y="0" width="1" height="24" forecolor="#CCCCCC" uuid="d33af55b-f1f9-4e13-a001-9ab0c2242ae6"/>
</line> </line>
</band> </band>
</pageFooter> </pageFooter>

View File

@ -45,7 +45,6 @@ public class RelatorioVendasPacotesBoletosBean {
private String descruta; private String descruta;
private String nomconvenio; private String nomconvenio;
private String desctipotarifa; private String desctipotarifa;
private String desccategoria;
private Long qtde; private Long qtde;
private BigDecimal simportetaxaembarque; private BigDecimal simportetaxaembarque;
private BigDecimal simportepedagio; private BigDecimal simportepedagio;
@ -55,6 +54,8 @@ public class RelatorioVendasPacotesBoletosBean {
private BigDecimal spreciobase; private BigDecimal spreciobase;
private SituacaoVendaPacote situacao; private SituacaoVendaPacote situacao;
private Integer qtdeImpresso; private Integer qtdeImpresso;
private String tipoVenda;
private Boolean avulsoCancelado;
public String getNomconvenio() { public String getNomconvenio() {
return nomconvenio; return nomconvenio;
@ -148,16 +149,12 @@ public class RelatorioVendasPacotesBoletosBean {
this.spreciobase = spreciobase; this.spreciobase = spreciobase;
} }
public String getDesccategoria() {
return desccategoria;
}
public void setDesccategoria(String desccategoria) {
this.desccategoria = desccategoria;
}
public Boolean getCancelado() { public Boolean getCancelado() {
return SituacaoVendaPacote.CANCELADO.equals(getSituacao()); if(getAvulsoCancelado() != null && getAvulsoCancelado()) {
return getAvulsoCancelado();
} else {
return SituacaoVendaPacote.CANCELADO.equals(getSituacao());
}
} }
public SituacaoVendaPacote getSituacao() { public SituacaoVendaPacote getSituacao() {
@ -196,12 +193,13 @@ public class RelatorioVendasPacotesBoletosBean {
public int hashCode() { public int hashCode() {
final int prime = 31; final int prime = 31;
int result = 1; int result = 1;
result = prime * result + ((desccategoria == null) ? 0 : desccategoria.hashCode());
result = prime * result + ((descruta == null) ? 0 : descruta.hashCode()); result = prime * result + ((descruta == null) ? 0 : descruta.hashCode());
result = prime * result + ((desctipotarifa == null) ? 0 : desctipotarifa.hashCode()); result = prime * result + ((desctipotarifa == null) ? 0 : desctipotarifa.hashCode());
result = prime * result + ((nomconvenio == null) ? 0 : nomconvenio.hashCode()); result = prime * result + ((nomconvenio == null) ? 0 : nomconvenio.hashCode());
result = prime * result + ((numruta == null) ? 0 : numruta.hashCode()); result = prime * result + ((numruta == null) ? 0 : numruta.hashCode());
result = prime * result + ((situacao == null) ? 0 : situacao.hashCode()); result = prime * result + ((situacao == null) ? 0 : situacao.hashCode());
result = prime * result + ((tipoVenda == null) ? 0 : tipoVenda.hashCode());
result = prime * result + ((avulsoCancelado == null) ? 0 : avulsoCancelado.hashCode());
return result; return result;
} }
@ -214,11 +212,6 @@ public class RelatorioVendasPacotesBoletosBean {
if (getClass() != obj.getClass()) if (getClass() != obj.getClass())
return false; return false;
RelatorioVendasPacotesBoletosItemBean other = (RelatorioVendasPacotesBoletosItemBean) obj; RelatorioVendasPacotesBoletosItemBean other = (RelatorioVendasPacotesBoletosItemBean) obj;
if (desccategoria == null) {
if (other.desccategoria != null)
return false;
} else if (!desccategoria.equals(other.desccategoria))
return false;
if (descruta == null) { if (descruta == null) {
if (other.descruta != null) if (other.descruta != null)
return false; return false;
@ -241,6 +234,8 @@ public class RelatorioVendasPacotesBoletosBean {
return false; return false;
if (situacao != other.situacao) if (situacao != other.situacao)
return false; return false;
if (tipoVenda != other.tipoVenda)
return false;
return true; return true;
} }
@ -256,6 +251,22 @@ public class RelatorioVendasPacotesBoletosBean {
return qtdeImpresso != null && qtdeImpresso > 0; return qtdeImpresso != null && qtdeImpresso > 0;
} }
public String getTipoVenda() {
return tipoVenda;
}
public void setTipoVenda(String tipoVenda) {
this.tipoVenda = tipoVenda;
}
public Boolean getAvulsoCancelado() {
return avulsoCancelado;
}
public void setAvulsoCancelado(Boolean avulsoCancelado) {
this.avulsoCancelado = avulsoCancelado;
}
} }
@Override @Override