fixes bug#24650

qua:
dev:

Colocado um botão radio no filtro de relatorio de segunda via  para escolher o tipo de relatorio 

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@113529 d1611594-4594-4d17-8e1d-87c2c4800839
master
walace 2022-07-26 18:37:25 +00:00
parent 9b7038acd2
commit 8079f70d59
10 changed files with 508 additions and 0 deletions

View File

@ -0,0 +1,164 @@
package com.rjconsultores.ventaboletos.relatorios.impl;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
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.RelatorioSegundaViaBean;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioSegundaViaSeguroOpcionalBean;
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
public class RelatorioSegundaViaSeguroOpcional extends Relatorio {
private static Logger log = Logger.getLogger(RelatorioSegundaViaSeguroOpcional.class);
private SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
private List<RelatorioSegundaViaSeguroOpcionalBean> lsDadosRelatorio;
public RelatorioSegundaViaSeguroOpcional(Map<String, Object> parametros, Connection conexao) throws Exception {
super(parametros, conexao);
this.setCustomDataSource(new DataSource(this) {
@Override
public void initDados() throws Exception {
Map<String, Object> parametros = this.relatorio.getParametros();
Date dataInicial = (Date) parametros.get("dataInicial");
Date dataFinal = (Date) parametros.get("dataFinal");
Integer empresaId = (Integer) parametros.get("empresaId");
Integer puntoVentaId = (Integer) parametros.get("puntoVentaId");
String sql = getSqlDados(dataInicial, dataFinal, empresaId, puntoVentaId);
ResultSet rset = null;
NamedParameterStatement stmt = null;
Connection conexao = this.relatorio.getConexao();
stmt = new NamedParameterStatement(conexao, sql);
stmt.setTimestamp("dataInicial", getDataHoraInicial(dataInicial));
stmt.setTimestamp("dataFinal", getDataHoraFinal(dataFinal));
parametros.put("dataInicial", sdf.format(dataInicial));
parametros.put("dataFinal", sdf.format(dataFinal));
try {
rset = stmt.executeQuery();
lsDadosRelatorio = new ArrayList<RelatorioSegundaViaSeguroOpcionalBean>();
while (rset.next()) {
lsDadosRelatorio.add(criarRelatorioSegundaViaBean(rset));
}
setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio));
} 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 RelatorioSegundaViaSeguroOpcionalBean criarRelatorioSegundaViaBean(ResultSet rset) throws SQLException {
RelatorioSegundaViaSeguroOpcionalBean r = new RelatorioSegundaViaSeguroOpcionalBean();
r.setBilheteiro(rset.getString("bilheteiro"));
r.setBilhete(rset.getString("numfoliosistema"));
r.setDataVenda(rset.getDate("dataVenda"));
r.setDataViagem(rset.getDate("dataViagem"));
r.setSeguro(rset.getBigDecimal("seguro"));
r.setNomeAgencia(rset.getString("nomeAgencia"));
r.setLinha(rset.getString("linha"));
r.setNumBpe(rset.getString("numBpe"));
r.setNumeroApolice(rset.getString("numeroApolice"));
return r;
}
});
}
public void setLsDadosRelatorio(List<RelatorioSegundaViaSeguroOpcionalBean> lsDadosRelatorio) {
this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio));
this.lsDadosRelatorio = lsDadosRelatorio;
}
private String getSqlDados(Date dataInicial, Date dataFinal, Integer empresaId, Integer puntoVentaId) {
StringBuilder sql = new StringBuilder();
sql.append("SELECT DISTINCT B.BOLETO_ID, ");
sql.append(" PT.NOMBPUNTOVENTA AS nomeAgencia, ");
sql.append(" USUARIO.NOMBUSUARIO AS bilheteiro, ");
sql.append(" B.FECHORVENTA AS dataVenda, ");
sql.append(" B.FECHORVIAJE AS dataViagem, ");
sql.append(" R.DESCRUTA AS linha,");
sql.append(" B.NUMFOLIOSISTEMA as numfoliosistema, ");
sql.append(" SEG.VALOR AS seguro, ");
sql.append(" B.NUM_BPE AS numBpe, ");
sql.append(" SEG.NUMSEGURO AS numeroApolice ");
sql.append("FROM BOLETO B ");
sql.append("INNER JOIN EVENTO_EXTRA EE ON (EE.BOLETO_ID = B.BOLETO_ID) ");
sql.append("INNER JOIN USUARIO USUARIO ON B.USUARIO_ID = USUARIO.USUARIO_ID ");
sql.append("INNER JOIN RUTA R ON R.RUTA_ID = B.RUTA_ID ");
sql.append("INNER JOIN PUNTO_VENTA PT ON PT.PUNTOVENTA_ID = B.PUNTOVENTA_ID ");
sql.append("INNER JOIN SEGPOLV SEG ON (SEG.BOLETO_ID = B.BOLETO_ID) ");
sql.append("WHERE EE.INDSEGUNDAVIAIMPRESSA = 1 AND B.MOTIVOREIMPRESION_ID = 99 ");
if (dataInicial != null && dataFinal != null) {
sql.append(" AND EE.FECSEGUNDAVIA BETWEEN :dataInicial and :dataFinal ");
}
if (empresaId != null && empresaId != -1) {
sql.append(" AND B.EMPRESACORRIDA_ID = " + empresaId);
}
if (puntoVentaId != null && puntoVentaId != -1) {
sql.append(" AND B.PUNTOVENTA_ID = " + puntoVentaId);
}
sql.append(" ORDER BY B.NUMFOLIOSISTEMA, B.BOLETO_ID ");
return sql.toString();
}
@Override
protected void processaParametros() throws Exception {
}
private Timestamp getDataHoraInicial(Date dataInicial) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(dataInicial);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
return new Timestamp(calendar.getTime().getTime());
}
private Timestamp getDataHoraFinal(Date dataFinal) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(dataFinal);
calendar.set(Calendar.HOUR_OF_DAY, 23);
calendar.set(Calendar.MINUTE, 59);
calendar.set(Calendar.SECOND, 59);
return new Timestamp(calendar.getTime().getTime());
}
}

View File

@ -0,0 +1,41 @@
cabecalho.nome=Relatório Segunda Via de Seguro Opcional
cabecalho.periodo=Período
cabecalho.periodoA=à
cabecalho.puntoVenta=Agência:
cabecalho.empresa=Empresa:
label.servico=Serviço
label.dataEmbarque=Data Embarque
label.dataSegundaVia=Data Seg.Via
label.origem=Origem
label.destino=Destino
label.codOrigem=Cod.O
label.codDestino=Cod.D
label.poltrona=Poltrona
label.dataVenda=Data Venda
label.bilheteiro=Bilheteiro
label.bilhete=Bilhete
label.puntoVenta=Agência
label.tarifa=Tarifa
label.taxa=Taxa
label.seguro=Valor Apólice
label.pedagio=Pedágio
label.coo=Coo
label.preImpresso=Pre Imp.
label.serieImpFiscal=Série
label.nomeEmpresa=Empresa
label.nomeAgencia=Agência
label.dataServico=Data Serviço
label.horaServico=Hrs.Servic
label.horaTransacao=Hora Trans.
label.linha=Linha
label.ccf=ccf
label.ecfOriginal=ECF.ORI
label.ecfSegundaVia=ECF.2º via
label.utr=UTR
label.tpp=TPP
label.siglaTipoPassagem=Sigl.Tip.Pass
label.tipoPassagem=Tp.Pass
label.valorTotal=Vlr.Tot
msg.noData=Não foi possivel obter dados com os parâmetros informados.
label.numBpe=BP-e
label.numeroApolice=Número Apólice

View File

@ -0,0 +1,41 @@
cabecalho.nome=Relatório Segunda Via de Seguro Opcional
cabecalho.periodo=Período
cabecalho.periodoA=à
cabecalho.puntoVenta=Agência:
cabecalho.empresa=Empresa:
label.servico=Serviço
label.dataEmbarque=Data Embarque
label.dataSegundaVia=Data Seg.Via
label.origem=Origem
label.destino=Destino
label.codOrigem=Cod.O
label.codDestino=Cod.D
label.poltrona=Poltrona
label.dataVenda=Data Venda
label.bilheteiro=Bilheteiro
label.bilhete=Bilhete
label.puntoVenta=Agência
label.tarifa=Tarifa
label.taxa=Taxa
label.seguro=Valor Apólice
label.pedagio=Pedágio
label.coo=Coo
label.preImpresso=Pre Imp.
label.serieImpFiscal=Série
label.nomeEmpresa=Empresa
label.nomeAgencia=Agência
label.dataServico=Data Serviço
label.horaServico=Hrs.Servic
label.horaTransacao=Hora Trans.
label.linha=Linha
label.ccf=ccf
label.ecfOriginal=ECF.ORI
label.ecfSegundaVia=ECF.2º via
label.utr=UTR
label.tpp=TPP
label.siglaTipoPassagem=Sigl.Tip.Pass
label.tipoPassagem=Tp.Pass
label.valorTotal=Vlr.Tot
msg.noData=Não foi possivel obter dados com os parâmetros informados.
label.numBpe=BP-e
label.numeroApolice=Número Apólice

View File

@ -0,0 +1,236 @@
<?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="RelatorioSegundaViaSeguroOpcional" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="832" leftMargin="5" rightMargin="5" topMargin="20" bottomMargin="20" uuid="0a7b3817-e201-4a91-8edd-6102b120e19f">
<property name="ireport.zoom" value="3.5369215365000093"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="25"/>
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.1" value="title"/>
<property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2" value="columnHeader"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>
<parameter name="dataInicial" class="java.lang.String"/>
<parameter name="dataFinal" class="java.lang.String"/>
<parameter name="puntoVenta" class="java.lang.String"/>
<parameter name="empresa" class="java.lang.String"/>
<field name="bilheteiro" class="java.lang.String"/>
<field name="bilhete" class="java.lang.String"/>
<field name="coo" class="java.lang.Integer"/>
<field name="dataVenda" class="java.util.Date"/>
<field name="dataViagem" class="java.util.Date"/>
<field name="destino" class="java.lang.String"/>
<field name="origem" class="java.lang.String"/>
<field name="pedagio" class="java.math.BigDecimal"/>
<field name="preImpresso" class="java.lang.String"/>
<field name="puntoVenta" class="java.lang.Integer"/>
<field name="seguro" class="java.math.BigDecimal"/>
<field name="serieImpFiscal" class="java.lang.String"/>
<field name="servico" class="java.lang.String"/>
<field name="taxa" class="java.math.BigDecimal"/>
<field name="poltrona" class="java.lang.String"/>
<field name="tarifa" class="java.math.BigDecimal"/>
<field name="nomeEmpresa" class="java.lang.String"/>
<field name="nomeAgencia" class="java.lang.String"/>
<field name="dataServico" class="java.util.Date"/>
<field name="linha" class="java.lang.String"/>
<field name="descOrigem" class="java.lang.String"/>
<field name="descDestino" class="java.lang.String"/>
<field name="ccf" class="java.lang.String"/>
<field name="tipoPassagem" class="java.lang.String"/>
<field name="siglaTipoPassagem" class="java.lang.String"/>
<field name="ecf" class="java.lang.String"/>
<field name="valorTotal" class="java.math.BigDecimal"/>
<field name="dataSegundaVia" class="java.util.Date"/>
<field name="serieImpFiscalSegundaVia" class="java.lang.String"/>
<field name="utr" class="java.math.BigDecimal"/>
<field name="tpp" class="java.math.BigDecimal"/>
<field name="horaServico" class="java.lang.String"/>
<field name="numBpe" class="java.lang.String"/>
<field name="numeroApolice" class="java.lang.String"/>
<title>
<band height="109" splitType="Stretch">
<textField>
<reportElement uuid="6d12efc3-f23b-431a-bfb1-9950e6bfe6fc" x="53" y="61" width="259" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$P{puntoVenta}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="7830e707-ce31-4907-8665-aa462d023a82" x="0" y="20" width="603" height="20"/>
<textElement>
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{cabecalho.periodo} + " " + $P{dataInicial} + " " + $R{cabecalho.periodoA} + " " + $P{dataFinal}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="b148e230-ff82-488a-bcdd-5ceb2ea723e3" x="0" y="0" width="603" height="20"/>
<textElement markup="none">
<font size="14" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{cabecalho.nome}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy HH:mm">
<reportElement uuid="1f9eb9ba-8865-4a88-9dbb-471a1907d3c5" x="603" y="0" width="229" height="20"/>
<textElement textAlignment="Right">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="47f0b61e-1ba4-43e4-9a4a-c8e17972b943" x="0" y="61" width="53" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$R{cabecalho.puntoVenta}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="f4c6e5b9-844d-440a-9a47-719101152087" x="0" y="41" width="53" height="20"/>
<textElement markup="none"/>
<textFieldExpression><![CDATA[$R{cabecalho.empresa}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="6985a79c-5487-47e6-acf7-e94ef7c24073" x="53" y="41" width="259" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$P{empresa}]]></textFieldExpression>
</textField>
</band>
</title>
<columnHeader>
<band height="26">
<textField>
<reportElement uuid="6d81ffde-0d85-4b8c-8f3c-28a940854348" x="132" y="4" width="93" height="20"/>
<textElement markup="none">
<font size="7" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.bilheteiro}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="1ae18e81-d143-469b-9f83-d41bc75d47c9" x="370" y="4" width="67" height="20"/>
<textElement markup="none">
<font size="7" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.numBpe}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="7a67037e-c0b2-4d3c-9c7c-d53bcde3bb87" x="603" y="4" width="89" height="20"/>
<textElement markup="none">
<font size="7" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.seguro}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="20c30ade-bf6b-4b3a-a45b-fdf58088f6bb" x="0" y="4" width="132" height="20"/>
<textElement markup="none">
<font size="7" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.nomeAgencia}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="10ede63f-de68-46d8-a409-0cbe6c2e3895" x="437" y="4" width="92" height="20"/>
<textElement markup="none">
<font size="7" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.dataVenda}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="ab8e6a28-3de3-4379-a896-affeef5dbffe" x="529" y="4" width="74" height="20"/>
<textElement markup="none">
<font size="7" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.dataEmbarque}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="d67d17f7-33ea-42ac-bbd9-4867b1b9f916" x="692" y="4" width="140" height="20"/>
<textElement markup="none">
<font size="7" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.linha}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="d43654ff-292b-49c9-be1b-c4b29bb18800" x="225" y="4" width="87" height="20"/>
<textElement markup="none">
<font size="7" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.numeroApolice}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="b4841f88-9ca0-4c0c-aa26-6d0d1806d0db" x="312" y="4" width="58" height="20"/>
<textElement markup="none">
<font size="7" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.bilhete}]]></textFieldExpression>
</textField>
</band>
</columnHeader>
<detail>
<band height="29" splitType="Stretch">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="bc37d096-eb4b-4fc7-a9d2-2c68c619ce5c" stretchType="RelativeToTallestObject" x="132" y="0" width="93" height="29"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA[$F{bilheteiro}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="###0.00" isBlankWhenNull="true">
<reportElement uuid="9a20c316-fc88-45b8-9cba-8c5eac8778ef" stretchType="RelativeToTallestObject" x="603" y="0" width="89" height="29"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA[$F{seguro}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="497be5c7-0986-4ae6-911b-bec8d95c883c" stretchType="RelativeToTallestObject" x="0" y="0" width="132" height="29"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA[$F{nomeAgencia}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="HH:mm" isBlankWhenNull="true">
<reportElement uuid="c8dbf3c4-b98c-4c78-b38b-97a9b44906a2" stretchType="RelativeToTallestObject" x="437" y="0" width="92" height="29"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA[$F{dataVenda}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement uuid="6bc08e9d-d76f-443c-9598-c4945a1bc23a" stretchType="RelativeToTallestObject" x="529" y="0" width="74" height="29"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA[$F{dataViagem}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="3a133cad-d16b-48f7-96ac-23ae5b42f3a1" stretchType="RelativeToTallestObject" x="692" y="0" width="140" height="29"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA[$F{linha}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="bda7989d-d32c-4b0c-81b6-6c1fcf300ef9" stretchType="RelativeToTallestObject" x="225" y="0" width="87" height="29"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA[$F{numeroApolice}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="5c6d2acd-98de-4bc8-a82c-af0a72e8e2ce" stretchType="RelativeToTallestObject" x="312" y="0" width="58" height="29"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA[$F{bilhete}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="c7f146b9-18ea-43b2-90f9-c4535885c64b" stretchType="RelativeToTallestObject" x="370" y="0" width="67" height="29"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression><![CDATA[$F{numBpe}]]></textFieldExpression>
</textField>
</band>
</detail>
<noData>
<band height="20">
<textField isBlankWhenNull="true">
<reportElement uuid="4236d52e-7d65-4f66-8db1-c717eff5de62" positionType="Float" x="0" y="0" width="832" height="20" isPrintWhenDetailOverflows="true"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
</textField>
</band>
</noData>
</jasperReport>

View File

@ -0,0 +1,15 @@
package com.rjconsultores.ventaboletos.relatorios.utilitarios;
public class RelatorioSegundaViaSeguroOpcionalBean extends RelatorioSegundaViaBean {
private String numeroApolice;
public String getNumeroApolice() {
return numeroApolice;
}
public void setNumeroApolice(String numeroApolice) {
this.numeroApolice = numeroApolice;
}
}

View File

@ -20,6 +20,7 @@ import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta; import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioSegundaVia; import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioSegundaVia;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioSegundaViaBoleto; import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioSegundaViaBoleto;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioSegundaViaSeguroOpcional;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.service.EmpresaService; import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.service.PuntoVentaService; import com.rjconsultores.ventaboletos.service.PuntoVentaService;
@ -50,6 +51,7 @@ public class RelatorioSegundaViaController extends MyGenericForwardComposer {
private Radio rdTipoCaja; private Radio rdTipoCaja;
private Radio rdTipoBoleto; private Radio rdTipoBoleto;
private Radio rdTipoSeguroOpcional;
public void onClick$btnExecutarRelatorio(Event ev) throws Exception { public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
executarRelatorio(); executarRelatorio();
@ -77,6 +79,8 @@ public class RelatorioSegundaViaController extends MyGenericForwardComposer {
relatorio = new RelatorioSegundaVia(parametros, dataSourceRead.getConnection()); relatorio = new RelatorioSegundaVia(parametros, dataSourceRead.getConnection());
} else if(rdTipoBoleto.isChecked()) { } else if(rdTipoBoleto.isChecked()) {
relatorio = new RelatorioSegundaViaBoleto(parametros, dataSourceRead.getConnection()); relatorio = new RelatorioSegundaViaBoleto(parametros, dataSourceRead.getConnection());
} else if(rdTipoSeguroOpcional.isChecked()) {
relatorio = new RelatorioSegundaViaSeguroOpcional(parametros, dataSourceRead.getConnection());
} }
Map args = new HashMap(); Map args = new HashMap();

View File

@ -998,6 +998,8 @@ relatorioSegundaViaController.lbTipoCajaDescricao.value=Emite informe basado en
relatorioSegundaViaController.lbTipoBoleto.value=Ocupación relatorioSegundaViaController.lbTipoBoleto.value=Ocupación
relatorioSegundaViaController.lbTipoBoletoDescricao.value=Emite informe basado en la ocupación del servicio relatorioSegundaViaController.lbTipoBoletoDescricao.value=Emite informe basado en la ocupación del servicio
relatorioSegundaViaController.lbTipoRelatorio.value=Referência relatorioSegundaViaController.lbTipoRelatorio.value=Referência
relatorioSegundaViaController.lbTipoSeguroOpcional.value=Seguro Opcional
relatorioSegundaViaController.lbTipoSeguroOpcionalDescricao.value=Emite relatório de emissao de 2ª via de seguro opcional
#Relatório de Serviço Bloqueado na Venda Internet #Relatório de Serviço Bloqueado na Venda Internet
relatorioServicoBloqueadoVendaInternetController.window.title = Reporte corrida bgloqueada en venta internet relatorioServicoBloqueadoVendaInternetController.window.title = Reporte corrida bgloqueada en venta internet

View File

@ -1183,6 +1183,8 @@ relatorioSegundaViaController.lbTipoCajaDescricao.value=Emite relatório baseado
relatorioSegundaViaController.lbTipoBoleto.value=Ocupação relatorioSegundaViaController.lbTipoBoleto.value=Ocupação
relatorioSegundaViaController.lbTipoBoletoDescricao.value=Emite relatório baseado na ocupação do serviço relatorioSegundaViaController.lbTipoBoletoDescricao.value=Emite relatório baseado na ocupação do serviço
relatorioSegundaViaController.lbTipoRelatorio.value=Referência relatorioSegundaViaController.lbTipoRelatorio.value=Referência
relatorioSegundaViaController.lbTipoSeguroOpcional.value=Seguro Opcional
relatorioSegundaViaController.lbTipoSeguroOpcionalDescricao.value=Emite relatório de emissao de 2ª via de seguro opcional
#Relatorio Consulta Antt #Relatorio Consulta Antt
relatorioConsultaAnttController.window.title=Relatório Consulta ANTT relatorioConsultaAnttController.window.title=Relatório Consulta ANTT

View File

@ -57,6 +57,9 @@
<radio Id="rdTipoBoleto" value="2" <radio Id="rdTipoBoleto" value="2"
label="${c:l('relatorioSegundaViaController.lbTipoBoleto.value')}" label="${c:l('relatorioSegundaViaController.lbTipoBoleto.value')}"
tooltiptext="${c:l('relatorioSegundaViaController.lbTipoBoletoDescricao.value')}" /> tooltiptext="${c:l('relatorioSegundaViaController.lbTipoBoletoDescricao.value')}" />
<radio Id="rdTipoSeguroOpcional" value="2"
label="${c:l('relatorioSegundaViaController.lbTipoSeguroOpcional.value')}"
tooltiptext="${c:l('relatorioSegundaViaController.lbTipoSeguroOpcionalDescricao.value')}" />
</hbox> </hbox>
</radiogroup> </radiogroup>
</row> </row>