Fixes bug #10346
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@78143 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
e57e53dcd3
commit
1a64429c95
|
@ -0,0 +1,133 @@
|
||||||
|
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioGratuidadeANTTBean;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||||
|
|
||||||
|
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
|
||||||
|
|
||||||
|
public class RelatorioGratuidadeANTT extends Relatorio {
|
||||||
|
|
||||||
|
private Integer orgaoConcedenteId;
|
||||||
|
|
||||||
|
private List<RelatorioGratuidadeANTTBean> lsDadosRelatorio;
|
||||||
|
|
||||||
|
public RelatorioGratuidadeANTT(Map<String, Object> parametros, Connection conexao) throws Exception {
|
||||||
|
super(parametros, conexao);
|
||||||
|
|
||||||
|
this.setCustomDataSource(new DataSource(this) {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initDados() throws Exception {
|
||||||
|
|
||||||
|
Connection conexao = this.relatorio.getConexao();
|
||||||
|
|
||||||
|
Map<String, Object> parametros = this.relatorio.getParametros();
|
||||||
|
|
||||||
|
String fecInicioVenda = null;
|
||||||
|
if (parametros.get("fecInicioVenda") != null) {
|
||||||
|
fecInicioVenda = parametros.get("fecInicioVenda").toString() + " 00:00:00";
|
||||||
|
}
|
||||||
|
String fecFinalVenda = null;
|
||||||
|
if (parametros.get("fecFinalVenda") != null) {
|
||||||
|
fecFinalVenda = parametros.get("fecFinalVenda").toString() + " 23:59:59";
|
||||||
|
}
|
||||||
|
|
||||||
|
String tipGratuIds = parametros.get("tipGratuIds").toString();
|
||||||
|
String linhaIds = parametros.get("linhaIds").toString();
|
||||||
|
|
||||||
|
String sql = getSql(fecInicioVenda, fecFinalVenda, linhaIds, tipGratuIds);
|
||||||
|
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss");
|
||||||
|
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
|
||||||
|
|
||||||
|
if (fecInicioVenda != null) {
|
||||||
|
stmt.setTimestamp("fecInicioVenda", new java.sql.Timestamp(sdf.parse(fecInicioVenda).getTime()));
|
||||||
|
}
|
||||||
|
if (fecFinalVenda != null) {
|
||||||
|
stmt.setTimestamp("fecFinalVenda", new java.sql.Timestamp(sdf.parse(fecFinalVenda).getTime()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(orgaoConcedenteId != null){
|
||||||
|
stmt.setInt("orgao_concedente_id", orgaoConcedenteId);
|
||||||
|
}
|
||||||
|
|
||||||
|
ResultSet rset = null;
|
||||||
|
|
||||||
|
rset = stmt.executeQuery();
|
||||||
|
|
||||||
|
lsDadosRelatorio = new ArrayList<RelatorioGratuidadeANTTBean>();
|
||||||
|
|
||||||
|
while (rset.next()) {
|
||||||
|
RelatorioGratuidadeANTTBean gratuidadeBean = new RelatorioGratuidadeANTTBean();
|
||||||
|
|
||||||
|
gratuidadeBean.setCategoria(rset.getString("categoria"));
|
||||||
|
|
||||||
|
gratuidadeBean.setDescOrigem(rset.getString("descOrigem"));
|
||||||
|
gratuidadeBean.setDescDestino(rset.getString("descDestino"));
|
||||||
|
gratuidadeBean.setCodOrigem(rset.getString("codOrigem"));
|
||||||
|
gratuidadeBean.setCodDestino(rset.getString("codDestino"));
|
||||||
|
gratuidadeBean.setTotIda(rset.getInt("totalIda"));
|
||||||
|
gratuidadeBean.setTotVolta(rset.getInt("totalVolta"));
|
||||||
|
|
||||||
|
|
||||||
|
lsDadosRelatorio.add(gratuidadeBean);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lsDadosRelatorio.size() > 0) {
|
||||||
|
setLsDadosRelatorio(lsDadosRelatorio);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsDadosRelatorio(List<RelatorioGratuidadeANTTBean> lsDadosRelatorio) {
|
||||||
|
this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio));
|
||||||
|
this.lsDadosRelatorio = lsDadosRelatorio;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void processaParametros() throws Exception {
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getSql(String fecInicioVenda, String fecFinalVenda, String linha, String tipoGratu ) {
|
||||||
|
|
||||||
|
StringBuilder sql = new StringBuilder();
|
||||||
|
|
||||||
|
sql.append(" select ");
|
||||||
|
sql.append(" ca.DESCCATEGORIA AS categoria, ");
|
||||||
|
sql.append(" ori.CVEPARADA AS codOrigem, ");
|
||||||
|
sql.append(" ori.DESCPARADA AS descOrigem, ");
|
||||||
|
sql.append(" des.CVEPARADA AS codDestino, ");
|
||||||
|
sql.append(" des.DESCPARADA AS descDestino, ");
|
||||||
|
sql.append(" sum(case when (R.INDSENTIDOIDA = 1 ) then 1 else 0 end) as totalIda, ");
|
||||||
|
sql.append(" sum(case when (R.INDSENTIDOIDA = 0 ) then 1 else 0 end) as totalVolta ");
|
||||||
|
sql.append(" from BOLETO b ");
|
||||||
|
sql.append(" JOIN categoria ca ON b.categoria_id = ca.categoria_id ");
|
||||||
|
sql.append(" JOIN parada ori ON ori.parada_id = b.origen_id ");
|
||||||
|
sql.append(" JOIN parada des ON des.parada_id = b.destino_id ");
|
||||||
|
sql.append(" JOIN ruta r ON r.ruta_id = b.ruta_id ");
|
||||||
|
sql.append(" WHERE b.fechorventa BETWEEN :fecInicioVenda AND :fecFinalVenda ");
|
||||||
|
|
||||||
|
if( tipoGratu != null ) {
|
||||||
|
sql.append(" AND b.CATEGORIA_ID in (").append(tipoGratu).append(") ");
|
||||||
|
}
|
||||||
|
|
||||||
|
if( linha != null && !linha.equals("Todas")) {
|
||||||
|
sql.append(" AND r.ruta_id in (").append(linha).append(") ");
|
||||||
|
}
|
||||||
|
|
||||||
|
sql.append(" group by ca.DESCCATEGORIA, ori.CVEPARADA, ori.DESCPARADA, des.CVEPARADA, des.DESCPARADA ");
|
||||||
|
sql.append(" ORDER BY descOrigem, descDestino, categoria ");
|
||||||
|
|
||||||
|
return sql.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
#geral
|
||||||
|
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||||
|
msg.a=à
|
||||||
|
|
||||||
|
#Labels header
|
||||||
|
header.periodo=Período:
|
||||||
|
header.data.hora=Data/Hora\:
|
||||||
|
header.pagina=Página\:
|
||||||
|
header.filtro=Filtro\:
|
||||||
|
header.filtro.servico=Serviço\:
|
||||||
|
header.filtro.linha=Linha\:
|
||||||
|
header.filtro.grupo=Grupo de Linhas\:
|
||||||
|
header.empresa=Empresa\:
|
||||||
|
header.periodo.viagem=Período Viagem
|
||||||
|
header.periodo.venda=Período Venda
|
||||||
|
|
||||||
|
#Labels detail
|
||||||
|
|
||||||
|
detail.data=Data
|
||||||
|
detail.dataServico=Data Servi.
|
||||||
|
detail.origen=Origem
|
||||||
|
detail.destino=Destino
|
||||||
|
detail.km=Km
|
||||||
|
detail.linha=Linha
|
||||||
|
detail.servicio=Serviço
|
||||||
|
detail.hora=Hora
|
||||||
|
detail.tipobilhete=Tipo Venda
|
||||||
|
detail.tipopassagem=Tipo Passagem
|
||||||
|
detail.pasajero=Passageiro
|
||||||
|
detail.documento=Doc
|
||||||
|
detail.precio=Preço
|
||||||
|
detail.desconto=Desc.(%)
|
||||||
|
detail.valorCobrado=Vlr.Cobrado
|
||||||
|
detail.tarifa=Tarifa
|
||||||
|
detail.bilheteiro=Bilheteiro
|
||||||
|
detail.agencia=Agência
|
||||||
|
detail.dataMD=Data MD
|
||||||
|
detail.empresa=Empresa
|
||||||
|
detail.tipo=Tipo
|
||||||
|
detail.tipoDoc=Tipo Doc.
|
||||||
|
detail.tarifa=Tarifa
|
||||||
|
detail.seguro=Seguro
|
||||||
|
detail.utr=UTR
|
||||||
|
detail.tpp=TPP
|
||||||
|
detail.pedagio=Pedágio
|
||||||
|
detail.rg=RG
|
||||||
|
detail.status=Status
|
||||||
|
detail.codOrigem=Cod. Origem
|
||||||
|
detail.codDestino=Cod. Destino
|
||||||
|
detail.total=Total
|
||||||
|
detail.ccf=CCf
|
||||||
|
|
||||||
|
linhas=Linhas
|
||||||
|
|
||||||
|
detail.numfoliosistema=Bilhete
|
||||||
|
detail.numasiento=Poltrona
|
|
@ -0,0 +1,56 @@
|
||||||
|
#geral
|
||||||
|
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||||
|
msg.a=à
|
||||||
|
|
||||||
|
#Labels header
|
||||||
|
header.periodo=Período:
|
||||||
|
header.data.hora=Data/Hora\:
|
||||||
|
header.pagina=Página\:
|
||||||
|
header.filtro=Filtro\:
|
||||||
|
header.filtro.servico=Serviço\:
|
||||||
|
header.filtro.linha=Linha\:
|
||||||
|
header.filtro.grupo=Grupo de Linhas\:
|
||||||
|
header.empresa=Empresa\:
|
||||||
|
header.periodo.viagem=Período Viagem
|
||||||
|
header.periodo.venda=Período Venda
|
||||||
|
|
||||||
|
#Labels detail
|
||||||
|
|
||||||
|
detail.data=Data
|
||||||
|
detail.dataServico=Data Servi.
|
||||||
|
detail.origen=Origem
|
||||||
|
detail.destino=Destino
|
||||||
|
detail.km=Km
|
||||||
|
detail.linha=Linha
|
||||||
|
detail.servicio=Serviço
|
||||||
|
detail.hora=Hora
|
||||||
|
detail.tipobilhete=Tipo Venda
|
||||||
|
detail.tipopassagem=Tipo Passagem
|
||||||
|
detail.pasajero=Passageiro
|
||||||
|
detail.documento=Doc
|
||||||
|
detail.precio=Preço
|
||||||
|
detail.desconto=Desc.(%)
|
||||||
|
detail.valorCobrado=Vlr.Cobrado
|
||||||
|
detail.tarifa=Tarifa
|
||||||
|
detail.bilheteiro=Bilheteiro
|
||||||
|
detail.agencia=Agência
|
||||||
|
detail.dataMD=Data MD
|
||||||
|
detail.empresa=Empresa
|
||||||
|
detail.tipo=Tipo
|
||||||
|
detail.tipoDoc=Tipo Doc.
|
||||||
|
detail.tarifa=Tarifa
|
||||||
|
detail.seguro=Seguro
|
||||||
|
detail.utr=UTR
|
||||||
|
detail.tpp=TPP
|
||||||
|
detail.pedagio=Pedágio
|
||||||
|
detail.rg=RG
|
||||||
|
detail.status=Status
|
||||||
|
detail.codOrigem=Cod. Origem
|
||||||
|
detail.codDestino=Cod. Destino
|
||||||
|
detail.total=Total
|
||||||
|
detail.ccf=CCf
|
||||||
|
|
||||||
|
linhas=Linhas
|
||||||
|
|
||||||
|
detail.numfoliosistema=Bilhete
|
||||||
|
detail.numasiento=Poltrona
|
Binary file not shown.
|
@ -0,0 +1,251 @@
|
||||||
|
<?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="RelatorioGratuidadeANTT" pageWidth="900" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="880" leftMargin="10" rightMargin="10" topMargin="20" bottomMargin="20" resourceBundle="RelatorioEmpresaCorrida" whenResourceMissingType="Empty" uuid="94834362-0ecc-46da-b0a2-5cdee355da3e">
|
||||||
|
<property name="ireport.zoom" value="1.36602691073015"/>
|
||||||
|
<property name="ireport.x" value="0"/>
|
||||||
|
<property name="ireport.y" value="0"/>
|
||||||
|
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.2" value="pageHeader"/>
|
||||||
|
<property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2" value="columnHeader"/>
|
||||||
|
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
|
||||||
|
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>
|
||||||
|
<style name="Crosstab Data Text" hAlign="Center"/>
|
||||||
|
<parameter name="NOMBEMPRESA" class="java.lang.String"/>
|
||||||
|
<parameter name="USUARIO_ID" class="java.lang.String"/>
|
||||||
|
<parameter name="LINHA_FILTRO" class="java.lang.String"/>
|
||||||
|
<parameter name="SERVICO_FILTRO" class="java.lang.String"/>
|
||||||
|
<parameter name="TITULO" class="java.lang.String"/>
|
||||||
|
<parameter name="fecInicioVenda" class="java.lang.String"/>
|
||||||
|
<parameter name="fecFinalVenda" class="java.lang.String"/>
|
||||||
|
<parameter name="nomb_empresa" class="java.lang.String"/>
|
||||||
|
<queryString>
|
||||||
|
<![CDATA[]]>
|
||||||
|
</queryString>
|
||||||
|
<field name="categoria" class="java.lang.String"/>
|
||||||
|
<field name="codOrigem" class="java.lang.String"/>
|
||||||
|
<field name="descOrigem" class="java.lang.String"/>
|
||||||
|
<field name="codDestino" class="java.lang.String"/>
|
||||||
|
<field name="descDestino" class="java.lang.String"/>
|
||||||
|
<field name="totIda" class="java.lang.Integer"/>
|
||||||
|
<field name="totVolta" class="java.lang.Integer"/>
|
||||||
|
<background>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</background>
|
||||||
|
<pageHeader>
|
||||||
|
<band height="63">
|
||||||
|
<textField>
|
||||||
|
<reportElement x="0" y="0" width="633" height="37" uuid="652312bd-292a-424d-a234-5f157e3699c6"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="22" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{TITULO}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="633" y="0" width="106" height="37" uuid="66b2d0f6-2bf1-4bc7-9ec0-a34444e04d60"/>
|
||||||
|
<textFieldExpression><![CDATA[$R{header.data.hora}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField evaluationTime="Report">
|
||||||
|
<reportElement x="811" y="37" width="30" height="23" uuid="8ca68351-fc00-4f19-b94f-f2fd1f41964f"/>
|
||||||
|
<textElement textAlignment="Right"/>
|
||||||
|
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="739" y="37" width="39" height="23" uuid="be1692e9-f130-4d08-9173-6ca3e4699030"/>
|
||||||
|
<textFieldExpression><![CDATA[$R{header.pagina}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy HH:mm">
|
||||||
|
<reportElement x="739" y="0" width="102" height="37" uuid="6f671365-868e-41a6-81ee-a308d1d91e1d"/>
|
||||||
|
<textElement textAlignment="Left"/>
|
||||||
|
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="778" y="37" width="33" height="23" uuid="7548d623-fb6c-48d4-b8b7-504f5437a79a"/>
|
||||||
|
<textElement textAlignment="Right"/>
|
||||||
|
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}+" de"]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="0" y="37" width="82" height="21" uuid="a79c03e0-bbe4-4b1c-8297-533a0d137b27"/>
|
||||||
|
<textFieldExpression><![CDATA[$R{header.periodo.venda}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="82" y="37" width="232" height="21" uuid="b31b00a3-1ced-4f9c-acb7-470646f7b335"/>
|
||||||
|
<textFieldExpression><![CDATA[( $P{fecInicioVenda} != null ? ($P{fecInicioVenda} + " à " + $P{fecFinalVenda}) : "" )]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</pageHeader>
|
||||||
|
<columnHeader>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</columnHeader>
|
||||||
|
<detail>
|
||||||
|
<band splitType="Prevent"/>
|
||||||
|
</detail>
|
||||||
|
<summary>
|
||||||
|
<band height="49">
|
||||||
|
<crosstab>
|
||||||
|
<reportElement x="0" y="0" width="880" height="49" uuid="d4c2fabd-259b-4497-bbef-366ac4b9b6b9"/>
|
||||||
|
<rowGroup name="codOrigem" width="0">
|
||||||
|
<bucket class="java.lang.String">
|
||||||
|
<bucketExpression><![CDATA[$F{codOrigem}]]></bucketExpression>
|
||||||
|
</bucket>
|
||||||
|
<crosstabRowHeader>
|
||||||
|
<cellContents/>
|
||||||
|
</crosstabRowHeader>
|
||||||
|
<crosstabTotalRowHeader>
|
||||||
|
<cellContents/>
|
||||||
|
</crosstabTotalRowHeader>
|
||||||
|
</rowGroup>
|
||||||
|
<rowGroup name="descOrigem" width="0">
|
||||||
|
<bucket class="java.lang.String">
|
||||||
|
<bucketExpression><![CDATA[$F{descOrigem}]]></bucketExpression>
|
||||||
|
</bucket>
|
||||||
|
<crosstabRowHeader>
|
||||||
|
<cellContents/>
|
||||||
|
</crosstabRowHeader>
|
||||||
|
<crosstabTotalRowHeader>
|
||||||
|
<cellContents/>
|
||||||
|
</crosstabTotalRowHeader>
|
||||||
|
</rowGroup>
|
||||||
|
<rowGroup name="codDestino" width="220">
|
||||||
|
<bucket class="java.lang.String">
|
||||||
|
<bucketExpression><![CDATA[$F{codDestino}]]></bucketExpression>
|
||||||
|
</bucket>
|
||||||
|
<crosstabRowHeader>
|
||||||
|
<cellContents>
|
||||||
|
<textField>
|
||||||
|
<reportElement style="Crosstab Data Text" x="50" y="0" width="170" height="25" uuid="361ea0ad-4b5d-4883-a2a4-5e03edfa2396"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{descOrigem}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25" uuid="fd4c8d1c-5dc4-475f-acf5-57d2b9c1b1b8"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{codOrigem}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</cellContents>
|
||||||
|
</crosstabRowHeader>
|
||||||
|
<crosstabTotalRowHeader>
|
||||||
|
<cellContents/>
|
||||||
|
</crosstabTotalRowHeader>
|
||||||
|
</rowGroup>
|
||||||
|
<rowGroup name="descDestino" width="220">
|
||||||
|
<bucket class="java.lang.String">
|
||||||
|
<bucketExpression><![CDATA[$F{descDestino}]]></bucketExpression>
|
||||||
|
</bucket>
|
||||||
|
<crosstabRowHeader>
|
||||||
|
<cellContents>
|
||||||
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||||
|
<reportElement style="Crosstab Data Text" stretchType="RelativeToTallestObject" x="0" y="0" width="50" height="25" uuid="9cf8fdc4-6639-4f9c-ab26-4156d61a8fcb"/>
|
||||||
|
<textElement textAlignment="Left">
|
||||||
|
<font size="9"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{codDestino}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||||
|
<reportElement style="Crosstab Data Text" stretchType="RelativeToTallestObject" x="50" y="0" width="170" height="25" uuid="24946641-641d-466a-8db6-c94e646705e2"/>
|
||||||
|
<textElement textAlignment="Left">
|
||||||
|
<font size="9"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{descDestino}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</cellContents>
|
||||||
|
</crosstabRowHeader>
|
||||||
|
<crosstabTotalRowHeader>
|
||||||
|
<cellContents/>
|
||||||
|
</crosstabTotalRowHeader>
|
||||||
|
</rowGroup>
|
||||||
|
<columnGroup name="categoria" height="48">
|
||||||
|
<bucket class="java.lang.String">
|
||||||
|
<bucketExpression><![CDATA[$F{categoria}]]></bucketExpression>
|
||||||
|
</bucket>
|
||||||
|
<crosstabColumnHeader>
|
||||||
|
<cellContents backcolor="#FFFFFF" mode="Opaque">
|
||||||
|
<textField>
|
||||||
|
<reportElement style="Crosstab Data Text" x="0" y="0" width="100" height="24" uuid="21c18899-1787-41ed-a78a-e178d25303cf"/>
|
||||||
|
<textFieldExpression><![CDATA[$V{categoria}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<staticText>
|
||||||
|
<reportElement style="Crosstab Data Text" x="50" y="24" width="50" height="24" uuid="dceb20dc-eda5-4e94-a559-78a33e978d4a"/>
|
||||||
|
<textElement markup="none"/>
|
||||||
|
<text><![CDATA[VOLTA]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement style="Crosstab Data Text" x="0" y="24" width="50" height="24" uuid="a9785a52-35bf-4e13-b5de-ed09b069a166"/>
|
||||||
|
<textElement markup="none"/>
|
||||||
|
<text><![CDATA[IDA]]></text>
|
||||||
|
</staticText>
|
||||||
|
</cellContents>
|
||||||
|
</crosstabColumnHeader>
|
||||||
|
<crosstabTotalColumnHeader>
|
||||||
|
<cellContents/>
|
||||||
|
</crosstabTotalColumnHeader>
|
||||||
|
</columnGroup>
|
||||||
|
<measure name="totIdaMeasure" class="java.lang.Integer" calculation="Sum">
|
||||||
|
<measureExpression><![CDATA[$F{totIda}]]></measureExpression>
|
||||||
|
</measure>
|
||||||
|
<measure name="totVoltaMeasure" class="java.lang.Integer" calculation="Sum">
|
||||||
|
<measureExpression><![CDATA[$F{totVolta}]]></measureExpression>
|
||||||
|
</measure>
|
||||||
|
<crosstabCell width="100" height="25">
|
||||||
|
<cellContents>
|
||||||
|
<textField>
|
||||||
|
<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25" uuid="325e3d4b-4240-47f1-a580-74636f74fbd7"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{totIdaMeasure}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement style="Crosstab Data Text" x="50" y="0" width="50" height="25" uuid="eb02f35f-8683-4e61-a98b-29182014490e"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{totVoltaMeasure}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</cellContents>
|
||||||
|
</crosstabCell>
|
||||||
|
<crosstabCell width="50" columnTotalGroup="categoria">
|
||||||
|
<cellContents backcolor="#FFBFBF" mode="Opaque">
|
||||||
|
<textField>
|
||||||
|
<reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="25" uuid="d6c297f1-c0ee-4375-b522-0ad65b95d1f1"/>
|
||||||
|
<textFieldExpression><![CDATA[$V{totIdaMeasure}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</cellContents>
|
||||||
|
</crosstabCell>
|
||||||
|
<crosstabCell rowTotalGroup="codDestino">
|
||||||
|
<cellContents/>
|
||||||
|
</crosstabCell>
|
||||||
|
<crosstabCell rowTotalGroup="codDestino" columnTotalGroup="categoria">
|
||||||
|
<cellContents/>
|
||||||
|
</crosstabCell>
|
||||||
|
<crosstabCell rowTotalGroup="descDestino">
|
||||||
|
<cellContents/>
|
||||||
|
</crosstabCell>
|
||||||
|
<crosstabCell rowTotalGroup="descDestino" columnTotalGroup="categoria">
|
||||||
|
<cellContents/>
|
||||||
|
</crosstabCell>
|
||||||
|
<crosstabCell rowTotalGroup="codOrigem">
|
||||||
|
<cellContents/>
|
||||||
|
</crosstabCell>
|
||||||
|
<crosstabCell rowTotalGroup="codOrigem" columnTotalGroup="categoria">
|
||||||
|
<cellContents/>
|
||||||
|
</crosstabCell>
|
||||||
|
<crosstabCell rowTotalGroup="descOrigem">
|
||||||
|
<cellContents/>
|
||||||
|
</crosstabCell>
|
||||||
|
<crosstabCell rowTotalGroup="descOrigem" columnTotalGroup="categoria">
|
||||||
|
<cellContents/>
|
||||||
|
</crosstabCell>
|
||||||
|
</crosstab>
|
||||||
|
</band>
|
||||||
|
</summary>
|
||||||
|
<noData>
|
||||||
|
<band height="25">
|
||||||
|
<textField>
|
||||||
|
<reportElement x="0" y="0" width="1132" height="20" uuid="5a6c1b7b-2242-4cf1-b957-723b906ee620"/>
|
||||||
|
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</noData>
|
||||||
|
</jasperReport>
|
|
@ -0,0 +1,56 @@
|
||||||
|
package com.rjconsultores.ventaboletos.relatorios.utilitarios;
|
||||||
|
|
||||||
|
public class RelatorioGratuidadeANTTBean {
|
||||||
|
|
||||||
|
private String descOrigem;
|
||||||
|
private String descDestino;
|
||||||
|
private String codOrigem;
|
||||||
|
private String codDestino;
|
||||||
|
private String categoria;
|
||||||
|
private Integer totIda;
|
||||||
|
private Integer totVolta;
|
||||||
|
|
||||||
|
public String getDescOrigem() {
|
||||||
|
return descOrigem;
|
||||||
|
}
|
||||||
|
public void setDescOrigem(String descOrigen) {
|
||||||
|
this.descOrigem = descOrigen;
|
||||||
|
}
|
||||||
|
public String getDescDestino() {
|
||||||
|
return descDestino;
|
||||||
|
}
|
||||||
|
public void setDescDestino(String descDestino) {
|
||||||
|
this.descDestino = descDestino;
|
||||||
|
}
|
||||||
|
public String getCodOrigem() {
|
||||||
|
return codOrigem;
|
||||||
|
}
|
||||||
|
public void setCodOrigem(String codOrigem) {
|
||||||
|
this.codOrigem = codOrigem;
|
||||||
|
}
|
||||||
|
public String getCodDestino() {
|
||||||
|
return codDestino;
|
||||||
|
}
|
||||||
|
public void setCodDestino(String codDestino) {
|
||||||
|
this.codDestino = codDestino;
|
||||||
|
}
|
||||||
|
public String getCategoria() {
|
||||||
|
return categoria;
|
||||||
|
}
|
||||||
|
public void setCategoria(String categoria) {
|
||||||
|
this.categoria = categoria;
|
||||||
|
}
|
||||||
|
public Integer getTotIda() {
|
||||||
|
return totIda;
|
||||||
|
}
|
||||||
|
public void setTotIda(Integer totIda) {
|
||||||
|
this.totIda = totIda;
|
||||||
|
}
|
||||||
|
public Integer getTotVolta() {
|
||||||
|
return totVolta;
|
||||||
|
}
|
||||||
|
public void setTotVolta(Integer totVolta) {
|
||||||
|
this.totVolta = totVolta;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,254 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.zkoss.util.resource.Labels;
|
||||||
|
import org.zkoss.zhtml.Messagebox;
|
||||||
|
import org.zkoss.zk.ui.Component;
|
||||||
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
import org.zkoss.zul.Datebox;
|
||||||
|
import org.zkoss.zul.Textbox;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioGratuidadeANTT;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
|
import com.rjconsultores.ventaboletos.service.CategoriaService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRelatorioLinhaHorario;
|
||||||
|
|
||||||
|
@Controller("relatorioGratuidadeANTTController")
|
||||||
|
@Scope("prototype")
|
||||||
|
public class RelatorioGratuidadeANTTController extends MyGenericForwardComposer {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataSource dataSourceRead;
|
||||||
|
@Autowired
|
||||||
|
private CategoriaService categoriaService;
|
||||||
|
@Autowired
|
||||||
|
private RutaService rutaService;
|
||||||
|
|
||||||
|
private Datebox datInicialVenda;
|
||||||
|
private Datebox datFinalVenda;
|
||||||
|
private MyComboboxEstandar cmbTipoGratuidade;
|
||||||
|
|
||||||
|
private List<Categoria> lsCategorias;
|
||||||
|
|
||||||
|
private Textbox txtPalavraPesquisaLinha;
|
||||||
|
private MyListbox linhaList;
|
||||||
|
private MyListbox linhaListSelList;
|
||||||
|
private MyListbox selectedTipoGratuidadeList;
|
||||||
|
|
||||||
|
private List<Categoria> listSelectedTipoGratuidade;
|
||||||
|
|
||||||
|
public void onClick$btnRemoveTipoGratuidade(Event ev) throws InterruptedException {
|
||||||
|
Categoria categoria = (Categoria) selectedTipoGratuidadeList.getSelectedItem().getValue();
|
||||||
|
listSelectedTipoGratuidade.remove(categoria);
|
||||||
|
selectedTipoGratuidadeList.setData(listSelectedTipoGratuidade);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnAddTipoTipoGratuidade(Event ev) throws InterruptedException {
|
||||||
|
if (cmbTipoGratuidade.getSelectedItem() != null) {
|
||||||
|
listSelectedTipoGratuidade.add((Categoria) cmbTipoGratuidade.getSelectedItem().getValue());
|
||||||
|
selectedTipoGratuidadeList.setData(listSelectedTipoGratuidade);
|
||||||
|
selectedTipoGratuidadeList.setSelectedItem(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnPesquisaLinha(Event ev) {
|
||||||
|
executarPesquisaLinha();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnLimparLinha(Event ev) {
|
||||||
|
linhaList.clearSelection();
|
||||||
|
linhaListSelList.setData(new ArrayList<Ruta>());
|
||||||
|
|
||||||
|
linhaList.setItemRenderer(new RenderRelatorioLinhaHorario());
|
||||||
|
linhaListSelList.setItemRenderer(new RenderRelatorioLinhaHorario());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onDoubleClick$linhaList(Event ev) {
|
||||||
|
linhaListSelList.addItemNovo(linhaList.getSelected());
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyListbox getSelectedTipoGratuidadeList() {
|
||||||
|
return selectedTipoGratuidadeList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSelectedTipoGratuidadeList(MyListbox selectedTipoGratuidadeList) {
|
||||||
|
this.selectedTipoGratuidadeList = selectedTipoGratuidadeList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Categoria> getListSelectedTipoGratuidade() {
|
||||||
|
return listSelectedTipoGratuidade;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setListSelectedTipoGratuidade(List<Categoria> listSelectedTipoGratuidade) {
|
||||||
|
this.listSelectedTipoGratuidade = listSelectedTipoGratuidade;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void executarPesquisaLinha() {
|
||||||
|
|
||||||
|
String palavraPesquisaRuta = txtPalavraPesquisaLinha.getText();
|
||||||
|
linhaList.setData(rutaService.buscaRuta(palavraPesquisaRuta));
|
||||||
|
|
||||||
|
if (linhaList.getData().length == 0) {
|
||||||
|
try {
|
||||||
|
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
||||||
|
Labels.getLabel("relatorioLinhasHorarioController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
} catch (InterruptedException ex) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void executarRelatorio() throws Exception {
|
||||||
|
|
||||||
|
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
|
||||||
|
if (this.datInicialVenda.getValue() != null) {
|
||||||
|
parametros.put("fecInicioVenda", sdf.format(this.datInicialVenda.getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.datFinalVenda.getValue() != null) {
|
||||||
|
parametros.put("fecFinalVenda", sdf.format(this.datFinalVenda.getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parametros.get("fecInicioVenda") == null && parametros.get("datFinalVenda") == null) {
|
||||||
|
Messagebox.show(Labels.getLabel("relatorioGratuidadeANTTController.data.obrigatoria"),
|
||||||
|
Labels.getLabel("relatorioGratuidadeController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (listSelectedTipoGratuidade.isEmpty()) {
|
||||||
|
Messagebox.show(Labels.getLabel("relatorioGratuidadeANTTController.tipo.obrigatoria"),
|
||||||
|
Labels.getLabel("relatorioGratuidadeController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder tipGratu = new StringBuilder();
|
||||||
|
StringBuilder tipGratuIds = new StringBuilder();
|
||||||
|
for (Categoria categoria : listSelectedTipoGratuidade) {
|
||||||
|
tipGratu.append(categoria.getDesccategoria()).append(",");
|
||||||
|
tipGratuIds.append(categoria.getCategoriaId()).append(",");
|
||||||
|
}
|
||||||
|
|
||||||
|
// removendo ultima virgula
|
||||||
|
tipGratuIds = tipGratuIds.delete(tipGratuIds.length() -1, tipGratuIds.length());
|
||||||
|
tipGratu = tipGratu.delete(tipGratu.length() -1, tipGratu.length());
|
||||||
|
|
||||||
|
parametros.put("tipGratu", tipGratu.append(";").toString());
|
||||||
|
parametros.put("tipGratuIds", tipGratuIds.toString());
|
||||||
|
|
||||||
|
StringBuilder linhas = new StringBuilder();
|
||||||
|
StringBuilder linhaIds = new StringBuilder();
|
||||||
|
|
||||||
|
if (linhaListSelList.getListData().isEmpty()) {
|
||||||
|
linhas.append("Todas");
|
||||||
|
linhaIds.append("Todas");
|
||||||
|
} else {
|
||||||
|
for (Object obj : linhaListSelList.getListData()) {
|
||||||
|
Ruta ruta = (Ruta)obj;
|
||||||
|
linhas.append(ruta.getDescruta()).append(",");
|
||||||
|
linhaIds.append(ruta.getRutaId()).append(",");
|
||||||
|
}
|
||||||
|
|
||||||
|
// removendo ultima virgula
|
||||||
|
linhaIds = linhaIds.delete(linhaIds.length() -1, linhaIds.length());
|
||||||
|
linhas = linhas.delete(linhas.length() -1, linhas.length());
|
||||||
|
}
|
||||||
|
|
||||||
|
parametros.put("linhas", linhas.append(";").toString());
|
||||||
|
parametros.put("linhaIds", linhaIds.toString());
|
||||||
|
|
||||||
|
parametros.put("TITULO", Labels.getLabel("relatorioGratuidadeANTTController.window.title"));
|
||||||
|
|
||||||
|
Relatorio relatorio = new RelatorioGratuidadeANTT(parametros, dataSourceRead.getConnection());
|
||||||
|
|
||||||
|
Map<String, Object> args = new HashMap<String, Object>();
|
||||||
|
args.put("relatorio", relatorio);
|
||||||
|
|
||||||
|
openWindow("/component/reportView.zul",
|
||||||
|
Labels.getLabel("relatorioGratuidadeANTTController.window.title"), args, MODAL);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
|
||||||
|
executarRelatorio();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
|
super.doAfterCompose(comp);
|
||||||
|
lsCategorias = categoriaService.obtenerTodos();
|
||||||
|
listSelectedTipoGratuidade = new ArrayList<Categoria>();
|
||||||
|
|
||||||
|
linhaList.setItemRenderer(new RenderRelatorioLinhaHorario());
|
||||||
|
linhaListSelList.setItemRenderer(new RenderRelatorioLinhaHorario());
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Categoria> getLsCategorias() {
|
||||||
|
return lsCategorias;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsCategorias(List<Categoria> lsCategorias) {
|
||||||
|
this.lsCategorias = lsCategorias;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Datebox getDatInicialVenda() {
|
||||||
|
return datInicialVenda;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDatInicialVenda(Datebox datInicialVenda) {
|
||||||
|
this.datInicialVenda = datInicialVenda;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Datebox getDatFinalVenda() {
|
||||||
|
return datFinalVenda;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDatFinalVenda(Datebox datFinalVenda) {
|
||||||
|
this.datFinalVenda = datFinalVenda;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyComboboxEstandar getCmbTipoGratuidade() {
|
||||||
|
return cmbTipoGratuidade;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmbTipoGratuidade(MyComboboxEstandar cmbTipoGratuidade) {
|
||||||
|
this.cmbTipoGratuidade = cmbTipoGratuidade;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyListbox getLinhaListSelList() {
|
||||||
|
return linhaListSelList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLinhaListSelList(MyListbox linhaListSelList) {
|
||||||
|
this.linhaListSelList = linhaListSelList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Textbox getTxtPalavraPesquisaLinha() {
|
||||||
|
return txtPalavraPesquisaLinha;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTxtPalavraPesquisaLinha(Textbox txtPalavraPesquisaLinha) {
|
||||||
|
this.txtPalavraPesquisaLinha = txtPalavraPesquisaLinha;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -19,18 +19,12 @@ import org.zkoss.zul.Datebox;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
|
||||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioGratuidade;
|
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioGratuidade;
|
||||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
import com.rjconsultores.ventaboletos.service.CategoriaService;
|
import com.rjconsultores.ventaboletos.service.CategoriaService;
|
||||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
|
||||||
import com.rjconsultores.ventaboletos.service.RutaService;
|
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada;
|
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
|
|
|
@ -85,6 +85,7 @@ public class RelatorioLinhasHorarioController extends MyGenericForwardComposer {
|
||||||
private Radio rdExtraOrdinario;
|
private Radio rdExtraOrdinario;
|
||||||
private Radio rdTodos;
|
private Radio rdTodos;
|
||||||
|
|
||||||
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
private void executarRelatorio() throws Exception {
|
private void executarRelatorio() throws Exception {
|
||||||
|
|
||||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios;
|
||||||
|
|
||||||
|
import org.zkoss.util.resource.Labels;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||||
|
|
||||||
|
public class ItemMenuRelatorioGratuidadeANTT extends DefaultItemMenuSistema {
|
||||||
|
|
||||||
|
public ItemMenuRelatorioGratuidadeANTT() {
|
||||||
|
super("indexController.mniRelatorioGratuidadeANTT.label");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getClaveMenu() {
|
||||||
|
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOGRATUIDADEANTT";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ejecutar() {
|
||||||
|
PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioGratuidadeANTT.zul",
|
||||||
|
Labels.getLabel("relatorioGratuidadeANTTController.window.title"), getArgs() ,desktop);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -154,7 +154,8 @@ analitico.gerenciais.estatisticos.trechoAgencia=com.rjconsultores.ventaboletos.w
|
||||||
analitico.gerenciais.estatisticos.passageirosViajar=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioPassageirosViajar
|
analitico.gerenciais.estatisticos.passageirosViajar=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioPassageirosViajar
|
||||||
analitico.gerenciais.estatisticos.origemDestino=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioOrigemDestino
|
analitico.gerenciais.estatisticos.origemDestino=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioOrigemDestino
|
||||||
analitico.gerenciais.estatisticos.relatorioCorridas=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioCorridas
|
analitico.gerenciais.estatisticos.relatorioCorridas=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioCorridas
|
||||||
analitico.gerenciais.estatisticos.gratuidades=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioGratuidade
|
analitico.gerenciais.estatisticos.gratuidades=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioGratuidadeANTT
|
||||||
|
analitico.gerenciais.estatisticos.gratuidadesANTT=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioGratuidade
|
||||||
analitico.gerenciais.estatisticos.gratuidadesIdosoDeficiente=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioGratuidadeIdosoDeficiente
|
analitico.gerenciais.estatisticos.gratuidadesIdosoDeficiente=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioGratuidadeIdosoDeficiente
|
||||||
analitico.gerenciais.estatisticos.checkin=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioCheckin
|
analitico.gerenciais.estatisticos.checkin=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioCheckin
|
||||||
analitico.gerenciais.estatisticos.relatorioBaixasVendasInternet=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioBaixasVendasInternet
|
analitico.gerenciais.estatisticos.relatorioBaixasVendasInternet=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioBaixasVendasInternet
|
||||||
|
|
|
@ -258,6 +258,7 @@ indexController.mniRelatorioEmpresaCorrida.label = Reporte de la empresa corrida
|
||||||
indexController.mniRelatorioEmpresaOnibus.label = Reporte de la empresa autobús
|
indexController.mniRelatorioEmpresaOnibus.label = Reporte de la empresa autobús
|
||||||
indexController.mniRelatorioOCD.label = Reporte de OCD
|
indexController.mniRelatorioOCD.label = Reporte de OCD
|
||||||
indexController.mniRelatorioGratuidade.label = Gratuidades
|
indexController.mniRelatorioGratuidade.label = Gratuidades
|
||||||
|
indexController.mniRelatorioGratuidadeANTT.label = Gratuidades ANTT
|
||||||
indexController.mniRelatorioGratuidadeIdosoDeficiente.label = Gratuidades Idoso/Deficiente
|
indexController.mniRelatorioGratuidadeIdosoDeficiente.label = Gratuidades Idoso/Deficiente
|
||||||
indexController.mniRelatorioVendasBilheteiro.label = Ventas por agente de pasajes
|
indexController.mniRelatorioVendasBilheteiro.label = Ventas por agente de pasajes
|
||||||
indexController.mniRelatorioVendasBilheteiroSintetico.label = Ventas por agentes sintético
|
indexController.mniRelatorioVendasBilheteiroSintetico.label = Ventas por agentes sintético
|
||||||
|
@ -6427,6 +6428,24 @@ relatorioGratuidadeController.lbDataIni.value = Fecha Inicio
|
||||||
relatorioGratuidadeController.lbDataFin.value = Fecha Final
|
relatorioGratuidadeController.lbDataFin.value = Fecha Final
|
||||||
relatorioGratuidadeController.orgao = Orgão
|
relatorioGratuidadeController.orgao = Orgão
|
||||||
|
|
||||||
|
# Reporte Gratuidade ANTT
|
||||||
|
relatorioGratuidadeANTTController.window.title = Reporte Gratuidade ANTT
|
||||||
|
relatorioGratuidadeANTTController.data.viagem.obrigatoria = É necessário preencher a data inicial e final da viagem
|
||||||
|
relatorioGratuidadeANTTController.data.venda.obrigatoria = É necessário preencher a data inicial e final da venda
|
||||||
|
relatorioGratuidadeANTTController.lbEmpresa.value = Empresa
|
||||||
|
relatorioGratuidadeANTTController.lbAgencia.value = Punto Venta
|
||||||
|
relatorioGratuidadeANTTController.lbLinhas.value = Ruta
|
||||||
|
relatorioGratuidadeANTTController.lbOrigem.value = Origen
|
||||||
|
relatorioGratuidadeANTTController.lbDestino.value = Destino
|
||||||
|
relatorioGratuidadeANTTController.btnPesquisa.value = Buscar
|
||||||
|
relatorioGratuidadeANTTController.btnLimpar.value = Limpiar
|
||||||
|
relatorioGratuidadeANTTController.lbNumRuta.value = Num. linea
|
||||||
|
relatorioGratuidadeANTTController.lbPrefixo.value = Prefijo
|
||||||
|
relatorioGratuidadeANTTController.lbTipoGratuidade.value = Tipo de Gratuidade
|
||||||
|
relatorioGratuidadeANTTController.lbDataIni.value = Fecha Inicio
|
||||||
|
relatorioGratuidadeANTTController.lbDataFin.value = Fecha Final
|
||||||
|
relatorioGratuidadeANTTController.lbOrgao.value = Instituición concedente
|
||||||
|
|
||||||
# Reporte de Descontos
|
# Reporte de Descontos
|
||||||
relatorioDescontosController.window.title = Reporte de Descuentos
|
relatorioDescontosController.window.title = Reporte de Descuentos
|
||||||
relatorioDescontosController.lbAgencia.value = Agencia
|
relatorioDescontosController.lbAgencia.value = Agencia
|
||||||
|
|
|
@ -271,6 +271,7 @@ indexController.mniRelatorioEmpresaCorrida.label = Empresa Corrida
|
||||||
indexController.mniRelatorioEmpresaOnibus.label = Empresa Ônibus
|
indexController.mniRelatorioEmpresaOnibus.label = Empresa Ônibus
|
||||||
indexController.mniRelatorioOCD.label = Relatório de OCD
|
indexController.mniRelatorioOCD.label = Relatório de OCD
|
||||||
indexController.mniRelatorioGratuidade.label = Relatório Tipo Passagem
|
indexController.mniRelatorioGratuidade.label = Relatório Tipo Passagem
|
||||||
|
indexController.mniRelatorioGratuidadeANTT.label = Relatório Gratuidades ANTT
|
||||||
indexController.mniRelatorioBilhetesVendidos.label = Bilhetes Vendidos
|
indexController.mniRelatorioBilhetesVendidos.label = Bilhetes Vendidos
|
||||||
indexController.mniRelatorioGratuidadeIdosoDeficiente.label = Gratuidades Idoso/Deficiente
|
indexController.mniRelatorioGratuidadeIdosoDeficiente.label = Gratuidades Idoso/Deficiente
|
||||||
indexController.mniRelatorioVendasBilheteiro.label = Vendas por Bilheteiro
|
indexController.mniRelatorioVendasBilheteiro.label = Vendas por Bilheteiro
|
||||||
|
@ -6757,6 +6758,24 @@ relatorioGratuidadeController.lbDataFinVenda.value = Data Final
|
||||||
relatorioGratuidadeController.lvVenda = Venda
|
relatorioGratuidadeController.lvVenda = Venda
|
||||||
relatorioGratuidadeController.orgao = Orgão
|
relatorioGratuidadeController.orgao = Orgão
|
||||||
|
|
||||||
|
# Relatório Gratuidade ANTT
|
||||||
|
relatorioGratuidadeANTTController.window.title = Relatório Gratuidades ANTT
|
||||||
|
relatorioGratuidadeANTTController.data.obrigatoria = Data inicial e Final são obrigatórias
|
||||||
|
relatorioGratuidadeANTTController.lbEmpresa.value = Empresa
|
||||||
|
relatorioGratuidadeANTTController.lbAgencia.value = Agência
|
||||||
|
relatorioGratuidadeANTTController.lbLinha.value = Linha
|
||||||
|
relatorioGratuidadeANTTController.lbOrigem.value = Origem
|
||||||
|
relatorioGratuidadeANTTController.lbDestino.value = Destino
|
||||||
|
relatorioGratuidadeANTTController.lbTipoGratuidade.value = Tipos de Passagens
|
||||||
|
relatorioGratuidadeANTTController.lbDataIniVenda.value = Data Inicio
|
||||||
|
relatorioGratuidadeANTTController.lbDataFinVenda.value = Data Final
|
||||||
|
relatorioGratuidadeANTTController.btnPesquisa.value = Pesquisar
|
||||||
|
relatorioGratuidadeANTTController.btnLimpar.value = Limpar
|
||||||
|
relatorioGratuidadeANTTController.lbNumRuta.value = Num. Linha
|
||||||
|
relatorioGratuidadeANTTController.lbPrefixo.value = Prefixo
|
||||||
|
relatorioGratuidadeANTTController.lvVenda = Venda
|
||||||
|
relatorioGratuidadeANTTController.lbOrgao.value = Orgão Concedente
|
||||||
|
|
||||||
# Relatório Bilhetes Vendidos
|
# Relatório Bilhetes Vendidos
|
||||||
relatorioBilhetesVendidosController.window.title = Bilhetes Vendidos
|
relatorioBilhetesVendidosController.window.title = Bilhetes Vendidos
|
||||||
relatorioBilhetesVendidosController.lbDatInicial.value = Data Inicial
|
relatorioBilhetesVendidosController.lbDatInicial.value = Data Inicial
|
||||||
|
|
|
@ -0,0 +1,148 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<?page contentType="text/html;charset=UTF-8"?>
|
||||||
|
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||||
|
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winFiltroRelatorioGratuidadeANTT"?>
|
||||||
|
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||||
|
|
||||||
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
|
<window id="winFiltroRelatorioGratuidadeANTT"
|
||||||
|
apply="${relatorioGratuidadeANTTController}"
|
||||||
|
contentStyle="overflow:auto" height="435px" width="550px"
|
||||||
|
border="normal">
|
||||||
|
|
||||||
|
<grid fixedLayout="true">
|
||||||
|
<columns>
|
||||||
|
<column width="25%" />
|
||||||
|
<column width="75%" />
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioGratuidadeANTTController.lbDataIniVenda.value')}" />
|
||||||
|
<datebox id="datInicialVenda" width="30%" mold="rounded"
|
||||||
|
format="dd/MM/yyyy"
|
||||||
|
maxlength="10" />
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioGratuidadeANTTController.lbDataFinVenda.value')}" />
|
||||||
|
<datebox id="datFinalVenda" width="30%" mold="rounded"
|
||||||
|
format="dd/MM/yyyy"
|
||||||
|
maxlength="10" />
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioGratuidadeANTTController.lbLinha.value')}" />
|
||||||
|
|
||||||
|
<bandbox id="bbPesquisaLinha" width="100%"
|
||||||
|
mold="rounded" readonly="true">
|
||||||
|
<bandpopup>
|
||||||
|
<vbox>
|
||||||
|
<hbox>
|
||||||
|
<textbox
|
||||||
|
id="txtPalavraPesquisaLinha" />
|
||||||
|
<button id="btnPesquisaLinha"
|
||||||
|
image="/gui/img/find.png"
|
||||||
|
label="${c:l('relatorioGratuidadeANTTController.btnPesquisa.value')}" />
|
||||||
|
<button id="btnLimparLinha"
|
||||||
|
image="/gui/img/eraser.png"
|
||||||
|
label="${c:l('relatorioGratuidadeANTTController.btnLimpar.value')}" />
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
<listbox id="linhaList" mold="paging"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
|
vflex="true" multiple="false" height="60%" width="410px">
|
||||||
|
<listhead>
|
||||||
|
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioGratuidadeANTTController.lbNumRuta.value')}"
|
||||||
|
width="18%" />
|
||||||
|
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioGratuidadeANTTController.lbPrefixo.value')}"
|
||||||
|
width="20%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('lb.dec')}" width="35%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioGratuidadeANTTController.lbOrgao.value')}"
|
||||||
|
width="27%" />
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
<paging id="pagingLinha" pageSize="10" />
|
||||||
|
</vbox>
|
||||||
|
</bandpopup>
|
||||||
|
</bandbox>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<cell colspan="2">
|
||||||
|
<borderlayout height="100px">
|
||||||
|
<center border="0">
|
||||||
|
<listbox id="linhaListSelList"
|
||||||
|
mold="paging"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
|
vflex="true" multiple="true" height="60%" width="100%">
|
||||||
|
<listhead>
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioGratuidadeANTTController.lbNumRuta.value')}"
|
||||||
|
width="18%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioGratuidadeANTTController.lbPrefixo.value')}"
|
||||||
|
width="20%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('lb.dec')}" width="35%" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('relatorioGratuidadeANTTController.lbOrgao.value')}"
|
||||||
|
width="20%" />
|
||||||
|
<listheader width="7%" />
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
</center>
|
||||||
|
</borderlayout>
|
||||||
|
</cell>
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<label value="${c:l('relatorioGratuidadeANTTController.lbTipoGratuidade.value')}" />
|
||||||
|
<combobox id="cmbTipoGratuidade" width="100%"
|
||||||
|
maxlength="60" mold="rounded" buttonVisible="true"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
|
model="@{winFiltroRelatorioGratuidadeANTT$composer.lsCategorias}"/>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
<grid fixedLayout="true">
|
||||||
|
<columns>
|
||||||
|
<column width="100%" />
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<toolbar>
|
||||||
|
<button id="btnRemoveTipoGratuidade" height="20"
|
||||||
|
image="/gui/img/remove.png" width="35px"
|
||||||
|
tooltiptext="${c:l('generarTarifaOrgaoController.labelRemoveRuta.value')}" />
|
||||||
|
<button id="btnAddTipoTipoGratuidade" height="20"
|
||||||
|
image="/gui/img/add.png" width="35px"
|
||||||
|
tooltiptext="${c:l('generarTarifaOrgaoController.labelAddRuta.value')}" />
|
||||||
|
</toolbar>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<listbox id="selectedTipoGratuidadeList" mold="paging"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
|
vflex="true" multiple="false" height="60%" >
|
||||||
|
<listhead sizable="true">
|
||||||
|
<listheader image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('generarTarifaOrgaoController.labelEmpresa.value')}" width="100%"/>
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
<toolbar>
|
||||||
|
<button id="btnExecutarRelatorio" image="/gui/img/find.png"
|
||||||
|
label="${c:l('relatorio.lb.btnExecutarRelatorio')}" />
|
||||||
|
</toolbar>
|
||||||
|
</window>
|
||||||
|
</zk>
|
Loading…
Reference in New Issue