Merge pull request 'fixes bug#AL-4327' (!791) from AL-4327 into master
Reviewed-on: adm/VentaBoletosAdm#791 Reviewed-by: Lucas Taiã <lucas@rjconsultores.com.br>master 1.159.0
commit
c168e7530a
4
pom.xml
4
pom.xml
|
@ -4,12 +4,12 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>ventaboletosadm</artifactId>
|
<artifactId>ventaboletosadm</artifactId>
|
||||||
<version>1.158.1</version>
|
<version>1.159.0</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<modelWeb.version>1.119.0</modelWeb.version>
|
<modelWeb.version>1.119.0</modelWeb.version>
|
||||||
<flyway.version>1.100.1</flyway.version>
|
<flyway.version>1.101.0</flyway.version>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,234 @@
|
||||||
|
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayDataSource;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.MoneyHelper;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||||
|
|
||||||
|
public class RelatorioMovimentoMensalPassageiroCeturb extends Relatorio {
|
||||||
|
|
||||||
|
public RelatorioMovimentoMensalPassageiroCeturb(Map<String, Object> parametros, Connection conexao) throws Exception {
|
||||||
|
super(parametros, conexao);
|
||||||
|
|
||||||
|
this.setCustomDataSource(new ArrayDataSource(this) {
|
||||||
|
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
|
public void initDados() throws Exception {
|
||||||
|
Connection conexao = this.relatorio.getConexao();
|
||||||
|
Map<String, Object> parametros = this.relatorio.getParametros();
|
||||||
|
String dataDe = (String) parametros.get("DATA_DE"), dataAte = (String) parametros.get("DATA_ATE"), linhasIds = null;
|
||||||
|
Boolean isLinhas = false;
|
||||||
|
Integer empresaId = null;
|
||||||
|
List<Map<String,Object>> dadosOrdenados = new ArrayList<Map<String,Object>>();
|
||||||
|
|
||||||
|
if (parametros.get("LINHAS") != null) {
|
||||||
|
linhasIds = (String) parametros.get("LINHAS");
|
||||||
|
isLinhas = true;
|
||||||
|
}
|
||||||
|
if (parametros.get("EMPRESA_IDS") != null) {
|
||||||
|
empresaId = Integer.parseInt((String) parametros.get("EMPRESA_IDS"));
|
||||||
|
}
|
||||||
|
String sql = getSql(isLinhas);
|
||||||
|
|
||||||
|
NamedParameterStatement ps = new NamedParameterStatement(conexao, sql.toString());
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
|
||||||
|
|
||||||
|
ps.setInt("empresa_id", empresaId);
|
||||||
|
if (isLinhas) {
|
||||||
|
ps.setString("linhas_id", linhasIds);
|
||||||
|
}
|
||||||
|
ps.setTimestamp("dataIni", new java.sql.Timestamp(sdf.parse(dataDe).getTime()));
|
||||||
|
ps.setTimestamp("dataFim", new java.sql.Timestamp(sdf.parse(dataAte).getTime()));
|
||||||
|
ResultSet rset = ps.executeQuery();
|
||||||
|
BigDecimal valorTotalKMLinha = BigDecimal.ZERO;
|
||||||
|
long qtdViagens = 0;
|
||||||
|
|
||||||
|
|
||||||
|
while (rset.next()) {
|
||||||
|
boolean agrupar = false;
|
||||||
|
Map<String, Object> dataResult = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
dataResult.put("tarifa", rset.getBigDecimal("tarifa"));
|
||||||
|
dataResult.put("origem", rset.getString("origem"));
|
||||||
|
dataResult.put("destino", rset.getString("destino"));
|
||||||
|
dataResult.put("km", rset.getFloat("km"));
|
||||||
|
dataResult.put("totalida", rset.getLong("totalida"));
|
||||||
|
dataResult.put("totalvolta", rset.getLong("totalvolta"));
|
||||||
|
dataResult.put("totalReceita", rset.getBigDecimal("totalReceita"));
|
||||||
|
dataResult.put("numRuta", rset.getString("numRuta"));
|
||||||
|
qtdViagens = qtdViagens + (Long)dataResult.get("totalida") + (Long)dataResult.get("totalvolta");
|
||||||
|
|
||||||
|
for (Iterator iterator = dadosOrdenados.iterator(); iterator.hasNext();) {
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
Map<String, Object> map = (Map<String, Object>) iterator.next();
|
||||||
|
String origem = map.get("origem").toString();
|
||||||
|
String destino = map.get("destino").toString();
|
||||||
|
String numRuta = map.get("numRuta").toString();
|
||||||
|
BigDecimal tarifa = (BigDecimal) map.get("tarifa");
|
||||||
|
|
||||||
|
Long ida = (Long) map.get("totalida");
|
||||||
|
Long volta = (Long) map.get("totalvolta");
|
||||||
|
BigDecimal total = (BigDecimal) map.get("totalReceita");
|
||||||
|
|
||||||
|
if (origem.equals(rset.getString("destino"))
|
||||||
|
&& destino.equals(rset.getString("origem"))
|
||||||
|
&& numRuta.equals(rset.getString("numRuta")) && (tarifa != null && MoneyHelper.isIgual(tarifa, rset.getBigDecimal("tarifa")))) {
|
||||||
|
agrupar = true;
|
||||||
|
if (ida == 0) {
|
||||||
|
map.put("totalida", rset.getLong("totalida"));
|
||||||
|
total = total.add(limpaNulo(rset.getBigDecimal("totalReceita")));
|
||||||
|
map.put("totalReceita", total);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
map.put("totalvolta", rset.getLong("totalvolta") + volta);
|
||||||
|
total = total.add(limpaNulo(rset.getBigDecimal("totalReceita")));
|
||||||
|
map.put("totalReceita", total);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!agrupar) {
|
||||||
|
dadosOrdenados.add(dataResult);
|
||||||
|
}
|
||||||
|
valorTotalKMLinha = valorTotalKMLinha.add(limpaNulo(rset.getBigDecimal("km")));
|
||||||
|
}
|
||||||
|
parametros.put("KM_TOTAL", valorTotalKMLinha);
|
||||||
|
parametros.put("QTD_VIAGENS", qtdViagens);
|
||||||
|
this.dados.addAll(ordenaListMap(dadosOrdenados));
|
||||||
|
this.resultSet = rset;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void processaParametros() throws Exception {
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getSql(Boolean linhasIds) {
|
||||||
|
StringBuilder sql = new StringBuilder();
|
||||||
|
|
||||||
|
sql.append(" SELECT DISTINCT ");
|
||||||
|
sql.append(" sum(b.preciopagado + b.importepedagio) AS totalReceita, ");
|
||||||
|
sql.append(" tar.precio AS tarifa, ");
|
||||||
|
sql.append(" e.nombempresa AS empresa, ");
|
||||||
|
sql.append(" r.descruta AS linha, ");
|
||||||
|
sql.append(" r.NUMRUTA, ");
|
||||||
|
sql.append(" ori.descparada AS origem, ");
|
||||||
|
sql.append(" des.descparada AS destino, ");
|
||||||
|
sql.append(" MAX(tr.CANTKMREAL) AS km, ");
|
||||||
|
sql.append(" COUNT( DISTINCT ");
|
||||||
|
sql.append(" CASE ");
|
||||||
|
sql.append(" WHEN(r.indsentidoida = 1) THEN b.boleto_id ");
|
||||||
|
sql.append(" ELSE NULL ");
|
||||||
|
sql.append(" END ");
|
||||||
|
sql.append(" ) AS totalida, ");
|
||||||
|
sql.append(" COUNT( DISTINCT ");
|
||||||
|
sql.append(" CASE ");
|
||||||
|
sql.append(" WHEN(r.indsentidoida = 0) THEN b.boleto_id ");
|
||||||
|
sql.append(" ELSE NULL ");
|
||||||
|
sql.append(" END ");
|
||||||
|
sql.append(" ) AS totalvolta, ");
|
||||||
|
sql.append(" rc.rutacombinacion_id AS rutaCombinacionId, ");
|
||||||
|
sql.append(" tri.numsecuencia, ");
|
||||||
|
sql.append(" r.indsentidoida ");
|
||||||
|
|
||||||
|
sql.append(" FROM ");
|
||||||
|
sql.append(" boleto b ");
|
||||||
|
sql.append(" JOIN empresa e ON ( e.empresa_id = b.empresacorrida_id ) ");
|
||||||
|
sql.append(" JOIN marca m ON ( m.empresa_id = b.empresacorrida_id ) ");
|
||||||
|
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(" JOIN RUTA_COMBINACION rc ON ( rc.ruta_id = r.ruta_id and rc.activo = 1 ) ");
|
||||||
|
sql.append(" INNER JOIN tramo tr ON ( tr.TRAMO_ID = rc.TRAMO_ID ");
|
||||||
|
sql.append(" AND tr.ORIGEN_ID = ori.PARADA_ID ");
|
||||||
|
sql.append(" AND tr.DESTINO_ID = des.PARADA_ID ");
|
||||||
|
sql.append(" AND tr.ACTIVO = 1 ) ");
|
||||||
|
sql.append(" JOIN clase_servicio cs ON ( b.claseservicio_id = cs.claseservicio_id ) ");
|
||||||
|
sql.append(" INNER JOIN vigencia_tarifa vt ON ( b.fechorventa BETWEEN vt.feciniciovigencia ");
|
||||||
|
sql.append(" AND vt.fecfinvigencia ");
|
||||||
|
sql.append(" AND vt.activo = 1 ) ");
|
||||||
|
sql.append(" INNER JOIN tarifa tar ON ( tar.ruta_id = b.ruta_id ");
|
||||||
|
sql.append(" AND tar.marca_id = m.marca_id ");
|
||||||
|
sql.append(" AND tar.claseservicio_id = b.claseservicio_id ");
|
||||||
|
sql.append(" AND tar.vigenciatarifa_id = vt.vigenciatarifa_id ");
|
||||||
|
sql.append(" AND tar.origen_id = b.origen_id ");
|
||||||
|
sql.append(" AND tar.destino_id = b.destino_id ");
|
||||||
|
sql.append(" AND tar.TRAMO_ID = tr.TRAMO_ID ");
|
||||||
|
sql.append(" AND tar.activo = 1 ) ");
|
||||||
|
sql.append(" LEFT JOIN corrida_tramo tri ON ( b.corrida_id = tri.corrida_id ");
|
||||||
|
sql.append(" AND tri.origen_id = b.origen_id ");
|
||||||
|
sql.append(" AND b.feccorrida = tri.feccorrida ");
|
||||||
|
sql.append(" AND tri.activo = 1 ) ");
|
||||||
|
|
||||||
|
sql.append(" WHERE b.empresacorrida_id IN :empresa_id ");
|
||||||
|
|
||||||
|
sql.append(" AND b.motivocancelacion_id is null ");
|
||||||
|
|
||||||
|
if (linhasIds) {
|
||||||
|
sql.append(" AND r.NUMRUTA = :linhas_id ");
|
||||||
|
}
|
||||||
|
|
||||||
|
sql.append(" AND b.feccorrida BETWEEN :dataIni AND :dataFim ");
|
||||||
|
|
||||||
|
sql.append(" GROUP BY ");
|
||||||
|
sql.append(" tar.precio, ");
|
||||||
|
sql.append(" e.nombempresa, ");
|
||||||
|
sql.append(" r.descruta, ");
|
||||||
|
sql.append(" r.numruta, ");
|
||||||
|
sql.append(" ori.descparada, ");
|
||||||
|
sql.append(" des.descparada, ");
|
||||||
|
sql.append(" rc.rutacombinacion_id, ");
|
||||||
|
sql.append(" tri.numsecuencia,");
|
||||||
|
sql.append(" r.indsentidoida ");
|
||||||
|
sql.append(" ORDER BY ");
|
||||||
|
sql.append(" r.indsentidoida DESC, ");
|
||||||
|
sql.append(" tri.numsecuencia, ");
|
||||||
|
sql.append(" r.descruta, ");
|
||||||
|
sql.append(" rc.rutacombinacion_id ");
|
||||||
|
|
||||||
|
return sql.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Map<String, Object>> ordenaListMap(List<Map<String, Object>> dadosOrdenados) {
|
||||||
|
|
||||||
|
List<Map<String, Object>> semelhancas = new ArrayList<Map<String,Object>>();
|
||||||
|
for ( Map<String, Object> p : dadosOrdenados ) {
|
||||||
|
String origem = p.get("origem").toString();
|
||||||
|
|
||||||
|
for (Map<String, Object> dado : dadosOrdenados) {
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
Map<String, Object> map = (Map<String, Object>) dado;
|
||||||
|
|
||||||
|
if (origem.equals(map.get("origem").toString()) && !semelhancas.contains(map) ) {
|
||||||
|
semelhancas.add(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return semelhancas;
|
||||||
|
}
|
||||||
|
|
||||||
|
private BigDecimal limpaNulo( BigDecimal val ) {
|
||||||
|
if( val == null ) {
|
||||||
|
return BigDecimal.ZERO;
|
||||||
|
}else {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
#geral
|
||||||
|
msg.noData=No se pudo obtener datos con los parámetros reportados.
|
||||||
|
msg.a=a
|
||||||
|
linhas=Linhas
|
|
@ -0,0 +1,4 @@
|
||||||
|
#geral
|
||||||
|
msg.noData=No se pudo obtener datos con los parametros reportados.
|
||||||
|
msg.a=a
|
||||||
|
linhas=Linhas
|
Binary file not shown.
|
@ -0,0 +1,360 @@
|
||||||
|
<?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="RelatorioBPe" pageWidth="800" pageHeight="842" whenNoDataType="NoDataSection" columnWidth="760" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="c49b5893-2989-4f8d-8645-45d4553bcf9d">
|
||||||
|
<property name="ireport.zoom" value="2.1961500000000025"/>
|
||||||
|
<property name="ireport.x" value="0"/>
|
||||||
|
<property name="ireport.y" value="0"/>
|
||||||
|
<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="USUARIO" class="java.lang.String"/>
|
||||||
|
<parameter name="NOME_RELATORIO" class="java.lang.String"/>
|
||||||
|
<parameter name="FILTROS" class="java.lang.String"/>
|
||||||
|
<parameter name="STR_ESPECIE" class="java.lang.String"/>
|
||||||
|
<parameter name="DESC_LINHAS_SELECIONADAS" class="java.lang.String"/>
|
||||||
|
<parameter name="EMPRESA" class="java.lang.String"/>
|
||||||
|
<parameter name="CANTASIENTOS" class="java.lang.String"/>
|
||||||
|
<parameter name="DATA_DE" class="java.lang.String"/>
|
||||||
|
<parameter name="DATA_ATE" class="java.lang.String"/>
|
||||||
|
<parameter name="LINHAS" class="java.lang.String"/>
|
||||||
|
<parameter name="CLASE_SERVICIO" class="java.lang.String"/>
|
||||||
|
<parameter name="KM_TOTAL" class="java.math.BigDecimal"/>
|
||||||
|
<parameter name="QTD_VIAGENS" class="java.lang.Long"/>
|
||||||
|
<field name="cantasientos" class="java.lang.String"/>
|
||||||
|
<field name="empresa" class="java.lang.String"/>
|
||||||
|
<field name="linha" class="java.lang.String"/>
|
||||||
|
<field name="origem" class="java.lang.String"/>
|
||||||
|
<field name="destino" class="java.lang.String"/>
|
||||||
|
<field name="km" class="java.lang.Float"/>
|
||||||
|
<field name="totalida" class="java.lang.Long"/>
|
||||||
|
<field name="totalvolta" class="java.lang.Long"/>
|
||||||
|
<field name="tarifa" class="java.math.BigDecimal"/>
|
||||||
|
<field name="totalReceita" class="java.math.BigDecimal"/>
|
||||||
|
<variable name="SOMA_KM" class="java.lang.Float" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{km}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="SOMA_IDA" class="java.lang.Long" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{totalida}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="SOMA_VOLTA" class="java.lang.Long" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{totalvolta}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="SOMA_TOTAL_RECEITA" class="java.math.BigDecimal" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{totalReceita}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<title>
|
||||||
|
<band height="176" splitType="Stretch">
|
||||||
|
<staticText>
|
||||||
|
<reportElement mode="Transparent" x="0" y="0" width="555" height="41" forecolor="#000000" backcolor="#FFFFFF" uuid="48387206-d35a-46c3-92bc-7337730b5b29"/>
|
||||||
|
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
||||||
|
<font fontName="SansSerif" size="16" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[MOVIMENTO MENSAL DE PASSAGEIROS]]></text>
|
||||||
|
</staticText>
|
||||||
|
<textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="false">
|
||||||
|
<reportElement mode="Transparent" x="654" y="0" width="95" height="25" forecolor="#000000" backcolor="#FFFFFF" uuid="08f1d92b-4dee-433a-b066-f1b568988bce"/>
|
||||||
|
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
||||||
|
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="" isBlankWhenNull="false">
|
||||||
|
<reportElement mode="Transparent" x="555" y="25" width="99" height="16" forecolor="#000000" backcolor="#FFFFFF" uuid="98b19fb9-fbbf-4a0d-972d-4984bfba62b0"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
|
||||||
|
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA["Página " + $V{PAGE_NUMBER}+ " de " + $V{PAGE_NUMBER}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<line>
|
||||||
|
<reportElement x="-1" y="48" width="750" height="1" uuid="0ef26664-c3c7-4239-b964-4dd4c07dc70e"/>
|
||||||
|
</line>
|
||||||
|
<line>
|
||||||
|
<reportElement positionType="Float" x="-1" y="160" width="750" height="1" uuid="75af562f-9dac-46dc-8b06-1e50896893d0"/>
|
||||||
|
</line>
|
||||||
|
<staticText>
|
||||||
|
<reportElement x="-1" y="49" width="78" height="22" uuid="8816e3ed-08fc-44c4-9b5c-90065a97ea1f"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Empresa:]]></text>
|
||||||
|
</staticText>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="77" y="49" width="229" height="22" uuid="e4dcbf34-9a95-47d4-9d85-ef9c75ed8270"/>
|
||||||
|
<textElement>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{EMPRESA}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="0" y="71" width="306" height="20" uuid="bbfa56eb-b0e4-4ce8-95ec-03fa5fecdaa5"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA["Período: " + $P{DATA_DE} + " a " + $P{DATA_ATE}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<staticText>
|
||||||
|
<reportElement x="0" y="133" width="50" height="20" uuid="09cdf961-cdc2-4062-94e2-241e21a728b5"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Linha:]]></text>
|
||||||
|
</staticText>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="150" y="133" width="405" height="20" uuid="70f366bb-2104-429a-8899-66f853c0f260"/>
|
||||||
|
<textElement>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{DESC_LINHAS_SELECIONADAS}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<staticText>
|
||||||
|
<reportElement x="0" y="91" width="77" height="20" uuid="2284285a-4769-4bc9-b48d-ea18d3a2b726"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Tipo de Classe:]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement x="0" y="111" width="77" height="20" uuid="251da91e-5f8e-452d-9ed9-4414e4d88cc5"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Lugar Ofer:]]></text>
|
||||||
|
</staticText>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement x="77" y="113" width="478" height="20" uuid="c023bf07-8aa7-4848-a922-a556dd64c576"/>
|
||||||
|
<textElement>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{CANTASIENTOS}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement x="50" y="133" width="100" height="20" uuid="379fb4cf-7160-4ed9-b230-c5613786e420"/>
|
||||||
|
<textElement>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{LINHAS}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement x="77" y="91" width="478" height="20" uuid="e73e6e9d-1589-46b9-bb5f-29ed3a57755e"/>
|
||||||
|
<textElement>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{CLASE_SERVICIO}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<staticText>
|
||||||
|
<reportElement x="306" y="49" width="108" height="22" uuid="dd6b3fe7-8afe-42ed-b0b0-f6e9a8e7ad2d"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[KM TOTAL:]]></text>
|
||||||
|
</staticText>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="414" y="49" width="141" height="22" uuid="70bea6a5-b7ee-4b75-abec-6ba940a8ae1c"/>
|
||||||
|
<textElement>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{KM_TOTAL}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<staticText>
|
||||||
|
<reportElement x="306" y="69" width="108" height="22" uuid="34731b1b-fd03-450e-9bd1-17d328d65b2b"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Quantidade Viagens: TOTAL:]]></text>
|
||||||
|
</staticText>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="414" y="69" width="141" height="22" uuid="d4d454d7-d5b7-4471-9ec7-7e2e0c3078e4"/>
|
||||||
|
<textElement>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{QTD_VIAGENS}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</title>
|
||||||
|
<columnHeader>
|
||||||
|
<band height="17">
|
||||||
|
<staticText>
|
||||||
|
<reportElement x="0" y="0" width="150" height="15" uuid="f0c47ec0-d41c-4608-9e01-ee5052ebd24c"/>
|
||||||
|
<textElement textAlignment="Left" markup="none">
|
||||||
|
<font size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Origem]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement x="150" y="0" width="156" height="15" uuid="d526bb87-3f60-4c72-bbc0-cb9f11bee23d"/>
|
||||||
|
<textElement textAlignment="Left" markup="none">
|
||||||
|
<font size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Destino]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement x="378" y="0" width="90" height="15" uuid="da145fa4-768a-4cbc-9704-605b36cfc3bc"/>
|
||||||
|
<textElement textAlignment="Left" markup="none">
|
||||||
|
<font size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Extensão KM]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement x="468" y="0" width="87" height="15" uuid="cb75f5bc-97d3-4041-b4cb-07ef31a0b238"/>
|
||||||
|
<textElement textAlignment="Left" markup="none">
|
||||||
|
<font size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Pagantes Ida]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement x="555" y="0" width="99" height="15" uuid="cef96a7c-142c-400a-b65b-82c101fbd21e"/>
|
||||||
|
<textElement textAlignment="Left" markup="none">
|
||||||
|
<font size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Pagantes Volta]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement x="306" y="0" width="72" height="15" uuid="1554b801-f6ed-48dc-a16e-2f5ca8a8b71a"/>
|
||||||
|
<textElement textAlignment="Left" markup="none">
|
||||||
|
<font size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Tarifa]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement x="654" y="0" width="95" height="15" uuid="e5150478-8a28-4de5-87e6-40281b3a55b6"/>
|
||||||
|
<textElement textAlignment="Center" markup="none">
|
||||||
|
<font size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Total Receita]]></text>
|
||||||
|
</staticText>
|
||||||
|
</band>
|
||||||
|
</columnHeader>
|
||||||
|
<detail>
|
||||||
|
<band height="25" splitType="Stretch">
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement x="0" y="0" width="150" height="15" uuid="c2f2ed2f-8c42-402e-b606-ca76e7bd67e3"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="10"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{origem}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement x="555" y="0" width="99" height="15" uuid="1195949f-2f19-4935-844c-0c69123efe40"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="10"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{totalvolta}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement x="150" y="0" width="156" height="15" uuid="41bad51e-a613-4ae6-9937-714a05155251"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="10"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{destino}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement x="378" y="0" width="90" height="15" uuid="049bb44c-49f3-4d89-a213-1d16e30d94b4"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="10"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{km}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement x="468" y="0" width="87" height="15" uuid="5ad76aa0-b16a-41ac-87ca-86bdea7bc612"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="10"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{totalida}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern=" #,##0.00" isBlankWhenNull="true">
|
||||||
|
<reportElement x="306" y="0" width="72" height="15" uuid="e203673e-3d97-4bed-9c04-e1e9e1bec06d"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="10"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{tarifa}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern=" #,##0.00" isBlankWhenNull="true">
|
||||||
|
<reportElement x="654" y="0" width="95" height="15" uuid="183eaf3a-6104-46d3-8c8a-1de4c6f761bf"/>
|
||||||
|
<textElement textAlignment="Center">
|
||||||
|
<font size="10"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{totalReceita}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</detail>
|
||||||
|
<columnFooter>
|
||||||
|
<band height="27">
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement x="378" y="0" width="90" height="15" uuid="1eea79f0-7c7e-43ea-8a3c-a54ec8f9a086"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="10"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{SOMA_KM}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement x="468" y="0" width="87" height="15" uuid="3a7823db-bc09-4097-8cbd-bb44c55eab67"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="10"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{SOMA_IDA}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement x="555" y="0" width="99" height="15" uuid="329785a2-cb47-4db5-ba70-06cb06509019"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="10"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{SOMA_VOLTA}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<staticText>
|
||||||
|
<reportElement x="0" y="0" width="378" height="15" uuid="4ddd9911-6763-4724-a5e3-c86a696a8abf"/>
|
||||||
|
<textElement textAlignment="Center">
|
||||||
|
<font isBold="true"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[TOTAL]]></text>
|
||||||
|
</staticText>
|
||||||
|
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
|
<reportElement x="654" y="0" width="95" height="15" uuid="53fc346a-9a55-4bf3-8f5c-a9f5a01aa2a4"/>
|
||||||
|
<textElement textAlignment="Center">
|
||||||
|
<font size="10"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$V{SOMA_TOTAL_RECEITA}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</columnFooter>
|
||||||
|
<noData>
|
||||||
|
<band height="50">
|
||||||
|
<staticText>
|
||||||
|
<reportElement x="0" y="24" width="654" height="26" uuid="302dc2fd-ac13-424a-9b38-abcc21436bdd"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="11" isBold="true"/>
|
||||||
|
<paragraph lineSpacing="Single"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Não foi possivel obter dados com os parâmetros informados.]]></text>
|
||||||
|
</staticText>
|
||||||
|
</band>
|
||||||
|
</noData>
|
||||||
|
</jasperReport>
|
|
@ -0,0 +1,188 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
|
||||||
|
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.zkoss.util.resource.Labels;
|
||||||
|
import org.zkoss.zk.ui.Component;
|
||||||
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
import org.zkoss.zul.Combobox;
|
||||||
|
import org.zkoss.zul.Comboitem;
|
||||||
|
import org.zkoss.zul.Datebox;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioMovimentoMensalPassageiroCeturb;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioQuadroDemonstrativoMovimentoPassageiros;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioQuadroDemonstrativoMovimentoPassageirosNovoLayout;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
|
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.MyGenericForwardComposer;
|
||||||
|
|
||||||
|
@Controller("relatorioMovimentoMensalPassageiroCeturbController")
|
||||||
|
@Scope("prototype")
|
||||||
|
public class RelatorioMovimentoMensalPassageiroCeturbController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
@Autowired
|
||||||
|
private DataSource dataSourceRead;
|
||||||
|
@Autowired
|
||||||
|
private EmpresaService empresaService;
|
||||||
|
@Autowired
|
||||||
|
private RutaService rutaService;
|
||||||
|
@Autowired
|
||||||
|
private OrgaoConcedenteService orgaoConcedenteService;
|
||||||
|
private List<Empresa> lsEmpresa;
|
||||||
|
private List<Ruta> lsLinhas;
|
||||||
|
private Datebox datInicial;
|
||||||
|
private Datebox datFinal;
|
||||||
|
|
||||||
|
private MyComboboxEstandar cmbLinha;
|
||||||
|
private Combobox cmbEmpresa;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
|
lsEmpresa = empresaService.obtenerTodos();
|
||||||
|
lsLinhas = rutaService.buscarRutasPorEmpresaOrgaoConcedente(null, orgaoConcedenteService.obtenerID(10));
|
||||||
|
super.doAfterCompose(comp);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnExecutarRelatorio(Event ev) throws InterruptedException, Exception {
|
||||||
|
executarRelatorio(1);
|
||||||
|
}
|
||||||
|
public void onClick$btnExecutarRelatorioNovoLayout(Event ev) throws InterruptedException, Exception {
|
||||||
|
executarRelatorio(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void executarRelatorio(int tipo) throws SQLException, Exception {
|
||||||
|
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
|
||||||
|
Date dataDe = datInicial.getValue();
|
||||||
|
Date dataAte = datFinal.getValue();
|
||||||
|
|
||||||
|
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||||
|
parametros.put("DATA_DE", sdf.format(dataDe));
|
||||||
|
parametros.put("DATA_ATE", sdf.format(dataAte));
|
||||||
|
|
||||||
|
if (cmbLinha.getSelectedItem() != null) {
|
||||||
|
Ruta ruta = (Ruta) cmbLinha.getSelectedItem().getValue();
|
||||||
|
if (!ruta.getRutaId().equals(-1)) {
|
||||||
|
ruta = ((Ruta) cmbLinha.getSelectedItem().getValue());
|
||||||
|
parametros.put("LINHAS", (ruta.getNumRuta()));
|
||||||
|
parametros.put("DESC_LINHAS_SELECIONADAS", (ruta.getDescruta()));
|
||||||
|
parametros.put("CANTASIENTOS", (ruta.getCantAsientos() != null ? ruta.getCantAsientos().toString() : ""));
|
||||||
|
parametros.put("CLASE_SERVICIO", (ruta.getClaseServicio().getDescclase()));
|
||||||
|
}else {
|
||||||
|
parametros.put("DESC_LINHAS_SELECIONADAS", "Todas");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Comboitem cbiEmpresa = cmbEmpresa.getSelectedItem();
|
||||||
|
String empresaId;
|
||||||
|
String empresaDesc = "";
|
||||||
|
if (cbiEmpresa != null) {
|
||||||
|
Empresa empresa = (Empresa) cbiEmpresa.getValue();
|
||||||
|
empresaId = empresa.getEmpresaId().toString();
|
||||||
|
empresaDesc = empresa.getNombempresa();
|
||||||
|
} else {
|
||||||
|
empresaId = "0";
|
||||||
|
for (int i = 0; i < lsEmpresa.size(); i++) {
|
||||||
|
Empresa empresa = lsEmpresa.get(i);
|
||||||
|
empresaId = empresaId + "," + empresa.getEmpresaId();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
parametros.put("EMPRESA", empresaDesc);
|
||||||
|
parametros.put("EMPRESA_IDS", empresaId);
|
||||||
|
Relatorio relatorio = null;
|
||||||
|
Map<String, Object> args = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
relatorio = new RelatorioMovimentoMensalPassageiroCeturb(parametros, dataSourceRead.getConnection());
|
||||||
|
args.put("relatorio", relatorio);
|
||||||
|
openWindow("/component/reportView.zul", Labels.getLabel("indexController.mniRelatorioQuadroDemonstrativoMovimentoPassageiros.label"), args, MODAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataSource getDataSourceRead() {
|
||||||
|
return dataSourceRead;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataSourceRead(DataSource dataSourceRead) {
|
||||||
|
this.dataSourceRead = dataSourceRead;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EmpresaService getEmpresaService() {
|
||||||
|
return empresaService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmpresaService(EmpresaService empresaService) {
|
||||||
|
this.empresaService = empresaService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RutaService getRutaService() {
|
||||||
|
return rutaService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRutaService(RutaService rutaService) {
|
||||||
|
this.rutaService = rutaService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Empresa> getLsEmpresa() {
|
||||||
|
return lsEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsEmpresa(List<Empresa> lsEmpresa) {
|
||||||
|
this.lsEmpresa = lsEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Ruta> getLsLinhas() {
|
||||||
|
return lsLinhas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsLinhas(List<Ruta> lsLinhas) {
|
||||||
|
this.lsLinhas = lsLinhas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Datebox getDatInicial() {
|
||||||
|
return datInicial;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDatInicial(Datebox datInicial) {
|
||||||
|
this.datInicial = datInicial;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Datebox getDatFinal() {
|
||||||
|
return datFinal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDatFinal(Datebox datFinal) {
|
||||||
|
this.datFinal = datFinal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyComboboxEstandar getCmbLinha() {
|
||||||
|
return cmbLinha;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmbLinha(MyComboboxEstandar cmbLinha) {
|
||||||
|
this.cmbLinha = cmbLinha;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Combobox getCmbEmpresa() {
|
||||||
|
return cmbEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmbEmpresa(Combobox cmbEmpresa) {
|
||||||
|
this.cmbEmpresa = cmbEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
|
||||||
|
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.analitico.gerenciais.ceturb;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||||
|
|
||||||
|
public class SubMenuRelatorioCeturb extends DefaultItemMenuSistema {
|
||||||
|
|
||||||
|
public SubMenuRelatorioCeturb() {
|
||||||
|
super("indexController.mniRelatorioCeturb.label");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getClaveMenu() {
|
||||||
|
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
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 ItemMenuRelatorioMovimentoMensalPassageiros extends DefaultItemMenuSistema {
|
||||||
|
|
||||||
|
public ItemMenuRelatorioMovimentoMensalPassageiros() {
|
||||||
|
super("indexController.mniRelatorioMovimentoMensalPassageirosCeturb.label");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getClaveMenu() {
|
||||||
|
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.MOVIMENTOMENSALPASSAGEIROCETURB";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ejecutar() {
|
||||||
|
PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioMovimentoMensalPassageiroCeturb.zul",
|
||||||
|
Labels.getLabel("indexController.mniRelatorioMovimentoMensalPassageirosCeturb.label"), getArgs() ,desktop);
|
||||||
|
}
|
||||||
|
}
|
|
@ -282,6 +282,8 @@ analitico.gerenciais.pacote.boletos=com.rjconsultores.ventaboletos.web.utilerias
|
||||||
analitico.gerenciais.pacote.detalhado=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendasPacotesDetalhado
|
analitico.gerenciais.pacote.detalhado=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendasPacotesDetalhado
|
||||||
analitico.gerenciais.pacote.resumido=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendasPacotesResumido
|
analitico.gerenciais.pacote.resumido=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendasPacotesResumido
|
||||||
analitico.gerenciais.relatorioRemessaCNAB=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioRemessaCNAB
|
analitico.gerenciais.relatorioRemessaCNAB=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioRemessaCNAB
|
||||||
|
analitico.gerenciais.ceturb=com.rjconsultores.ventaboletos.web.utilerias.menu.item.analitico.gerenciais.ceturb.SubMenuRelatorioCeturb
|
||||||
|
analitico.gerenciais.ceturb.RelatorioMovimentoMensalPassageiros=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioMovimentoMensalPassageiros
|
||||||
analitico.integracion=com.rjconsultores.ventaboletos.web.utilerias.menu.item.analitico.integracion.SubMenuIntegracion
|
analitico.integracion=com.rjconsultores.ventaboletos.web.utilerias.menu.item.analitico.integracion.SubMenuIntegracion
|
||||||
analitico.integracion.sisdap=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioSisdap
|
analitico.integracion.sisdap=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioSisdap
|
||||||
analitico.integracion.sie=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioSie
|
analitico.integracion.sie=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioSie
|
||||||
|
|
|
@ -8053,6 +8053,7 @@ indexController.mniRelatorioPosicaoVendaBilheteIdoso.label = Senior Ticket Sales
|
||||||
indexController.mniRelatorioPrecosPraticados.label = Price Report
|
indexController.mniRelatorioPrecosPraticados.label = Price Report
|
||||||
indexController.mniRelatorioPricingEspecifico.label = Specific Pricing Report
|
indexController.mniRelatorioPricingEspecifico.label = Specific Pricing Report
|
||||||
indexController.mniRelatorioQuadroDemonstrativoMovimentoPassageiros.label = Passenger Movement Demonstration Table
|
indexController.mniRelatorioQuadroDemonstrativoMovimentoPassageiros.label = Passenger Movement Demonstration Table
|
||||||
|
indexController.mniRelatorioMovimentoMensalPassageirosCeturb.label = Monthly Passenger Movement
|
||||||
# Relatório Recarga Rvhub
|
# Relatório Recarga Rvhub
|
||||||
indexController.mniRelatorioRecargaRvhub.label = Rvhub Recharge
|
indexController.mniRelatorioRecargaRvhub.label = Rvhub Recharge
|
||||||
indexController.mniRelatorioReceitaDiariaAgencia.label = Daily Revenue per Agency
|
indexController.mniRelatorioReceitaDiariaAgencia.label = Daily Revenue per Agency
|
||||||
|
@ -8127,6 +8128,7 @@ indexController.mniTarifasMinimas.label = Minimum Rates
|
||||||
indexController.mniTarifasOficial.label = Official Price / Rate Change
|
indexController.mniTarifasOficial.label = Official Price / Rate Change
|
||||||
indexController.mniTarifasOficialExcel.label = Official Excel Rate
|
indexController.mniTarifasOficialExcel.label = Official Excel Rate
|
||||||
indexController.mniTarjetaCredito.label = Credit Card
|
indexController.mniTarjetaCredito.label = Credit Card
|
||||||
|
indexController.mniRelatorioCeturb.label = Report Ceturb
|
||||||
#Tela de contigencia
|
#Tela de contigencia
|
||||||
indexController.mniTelaContingencia.label = Contingency
|
indexController.mniTelaContingencia.label = Contingency
|
||||||
indexController.mniTipoCambioCiudad.label = Parity Type
|
indexController.mniTipoCambioCiudad.label = Parity Type
|
||||||
|
|
|
@ -8060,6 +8060,8 @@ indexController.mniRelatorioPosicaoVendaBilheteIdoso.label = Reporte Posición d
|
||||||
indexController.mniRelatorioPrecosPraticados.label = Relatório de Preços Praticados
|
indexController.mniRelatorioPrecosPraticados.label = Relatório de Preços Praticados
|
||||||
indexController.mniRelatorioPricingEspecifico.label = Relatório Pricing Específico
|
indexController.mniRelatorioPricingEspecifico.label = Relatório Pricing Específico
|
||||||
indexController.mniRelatorioQuadroDemonstrativoMovimentoPassageiros.label = Quadro Demonstrativo Movimento Passageiros
|
indexController.mniRelatorioQuadroDemonstrativoMovimentoPassageiros.label = Quadro Demonstrativo Movimento Passageiros
|
||||||
|
indexController.mniRelatorioMovimentoMensalPassageirosCeturb.label = Movimiento mensual de pasajeros
|
||||||
|
|
||||||
# Relatório Recarga Rvhub
|
# Relatório Recarga Rvhub
|
||||||
indexController.mniRelatorioRecargaRvhub.label = Recarga Rvhub
|
indexController.mniRelatorioRecargaRvhub.label = Recarga Rvhub
|
||||||
indexController.mniRelatorioReceitaDiariaAgencia.label = Ingreso diário por punto de venta
|
indexController.mniRelatorioReceitaDiariaAgencia.label = Ingreso diário por punto de venta
|
||||||
|
@ -8135,6 +8137,7 @@ indexController.mniTarifasMinimas.label = Tarifas mínimas
|
||||||
indexController.mniTarifasOficial.label = Cambio de precio / Tarifa oficial
|
indexController.mniTarifasOficial.label = Cambio de precio / Tarifa oficial
|
||||||
indexController.mniTarifasOficialExcel.label = Tarifa oficial excel
|
indexController.mniTarifasOficialExcel.label = Tarifa oficial excel
|
||||||
indexController.mniTarjetaCredito.label = Tarjeta de crédito
|
indexController.mniTarjetaCredito.label = Tarjeta de crédito
|
||||||
|
indexController.mniRelatorioCeturb.label = Report Ceturb
|
||||||
#Tela de contigencia
|
#Tela de contigencia
|
||||||
indexController.mniTelaContingencia.label = Contigência
|
indexController.mniTelaContingencia.label = Contigência
|
||||||
indexController.mniTipoCambioCiudad.label = Tipo paridad
|
indexController.mniTipoCambioCiudad.label = Tipo paridad
|
||||||
|
|
|
@ -8052,6 +8052,7 @@ indexController.mniRelatorioPosicaoVendaBilheteIdoso.label = Rapport sur la posi
|
||||||
indexController.mniRelatorioPrecosPraticados.label = Rapport de prix
|
indexController.mniRelatorioPrecosPraticados.label = Rapport de prix
|
||||||
indexController.mniRelatorioPricingEspecifico.label = Rapport de tarification spécifique
|
indexController.mniRelatorioPricingEspecifico.label = Rapport de tarification spécifique
|
||||||
indexController.mniRelatorioQuadroDemonstrativoMovimentoPassageiros.label = Tableau de démonstration des mouvements des passagers
|
indexController.mniRelatorioQuadroDemonstrativoMovimentoPassageiros.label = Tableau de démonstration des mouvements des passagers
|
||||||
|
indexController.mniRelatorioMovimentoMensalPassageirosCeturb.label = Mouvement mensuel des passagers
|
||||||
# Relatório Recarga Rvhub
|
# Relatório Recarga Rvhub
|
||||||
indexController.mniRelatorioRecargaRvhub.label = Recharge Rvhub
|
indexController.mniRelatorioRecargaRvhub.label = Recharge Rvhub
|
||||||
indexController.mniRelatorioReceitaDiariaAgencia.label = Revenu quotidien par agence
|
indexController.mniRelatorioReceitaDiariaAgencia.label = Revenu quotidien par agence
|
||||||
|
@ -8126,6 +8127,7 @@ indexController.mniTarifasMinimas.label = Tarifs minimaux
|
||||||
indexController.mniTarifasOficial.label = Changement de Prix / Tarif Officiel
|
indexController.mniTarifasOficial.label = Changement de Prix / Tarif Officiel
|
||||||
indexController.mniTarifasOficialExcel.label = Taux Excel officiel
|
indexController.mniTarifasOficialExcel.label = Taux Excel officiel
|
||||||
indexController.mniTarjetaCredito.label = Carte de crédit
|
indexController.mniTarjetaCredito.label = Carte de crédit
|
||||||
|
indexController.mniRelatorioCeturb.label = Rapport Ceturb
|
||||||
#Tela de contigencia
|
#Tela de contigencia
|
||||||
indexController.mniTelaContingencia.label = Contingence
|
indexController.mniTelaContingencia.label = Contingence
|
||||||
indexController.mniTipoCambioCiudad.label = Type de parité
|
indexController.mniTipoCambioCiudad.label = Type de parité
|
||||||
|
|
|
@ -8038,6 +8038,7 @@ indexController.mniRelatorioPosicaoVendaBilheteIdoso.label = Relatório Posiçã
|
||||||
indexController.mniRelatorioPrecosPraticados.label = Relatório de Preços Praticados
|
indexController.mniRelatorioPrecosPraticados.label = Relatório de Preços Praticados
|
||||||
indexController.mniRelatorioPricingEspecifico.label = Relatório Pricing Específico
|
indexController.mniRelatorioPricingEspecifico.label = Relatório Pricing Específico
|
||||||
indexController.mniRelatorioQuadroDemonstrativoMovimentoPassageiros.label = Quadro Demonstrativo Movimento Passageiros
|
indexController.mniRelatorioQuadroDemonstrativoMovimentoPassageiros.label = Quadro Demonstrativo Movimento Passageiros
|
||||||
|
indexController.mniRelatorioMovimentoMensalPassageirosCeturb.label = Movimento Mensal de Passageiros
|
||||||
# Relatório Recarga Rvhub
|
# Relatório Recarga Rvhub
|
||||||
indexController.mniRelatorioRecargaRvhub.label = Recarga Rvhub
|
indexController.mniRelatorioRecargaRvhub.label = Recarga Rvhub
|
||||||
indexController.mniRelatorioReceitaDiariaAgencia.label = Receita Diária por Agência
|
indexController.mniRelatorioReceitaDiariaAgencia.label = Receita Diária por Agência
|
||||||
|
@ -8112,6 +8113,7 @@ indexController.mniTarifasMinimas.label = Tarifas Mínimas
|
||||||
indexController.mniTarifasOficial.label = Alteração de Preço / Tarifa Oficial
|
indexController.mniTarifasOficial.label = Alteração de Preço / Tarifa Oficial
|
||||||
indexController.mniTarifasOficialExcel.label = Tarifa Oficial Excel
|
indexController.mniTarifasOficialExcel.label = Tarifa Oficial Excel
|
||||||
indexController.mniTarjetaCredito.label = Cartão de Crédito
|
indexController.mniTarjetaCredito.label = Cartão de Crédito
|
||||||
|
indexController.mniRelatorioCeturb.label = Relatório Ceturb
|
||||||
#Tela de contigencia
|
#Tela de contigencia
|
||||||
indexController.mniTelaContingencia.label = Contigência
|
indexController.mniTelaContingencia.label = Contigência
|
||||||
indexController.mniTipoCambioCiudad.label = Tipo Paridade
|
indexController.mniTipoCambioCiudad.label = Tipo Paridade
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
<?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="winFiltroQuadroDemonstrativoMovimentoPassageiros"?>
|
||||||
|
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||||
|
|
||||||
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
|
<window id="winFiltroQuadroDemonstrativoMovimentoPassageiros"
|
||||||
|
apply="${relatorioMovimentoMensalPassageiroCeturbController}"
|
||||||
|
contentStyle="overflow:auto" width="700px" border="normal">
|
||||||
|
<grid fixedLayout="true">
|
||||||
|
<columns>
|
||||||
|
<column width="20%" />
|
||||||
|
<column width="30%" />
|
||||||
|
<column width="20%" />
|
||||||
|
<column width="30%" />
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioReceitaDiariaAgenciaController.lbDataIni.value')}" />
|
||||||
|
<datebox id="datInicial" width="100%" mold="rounded"
|
||||||
|
format="dd/MM/yyyy" constraint="no empty"
|
||||||
|
maxlength="10" />
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioReceitaDiariaAgenciaController.lbDataFin.value')}" />
|
||||||
|
<datebox id="datFinal" width="100%" mold="rounded"
|
||||||
|
format="dd/MM/yyyy" constraint="no empty"
|
||||||
|
maxlength="10" />
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row spans="1,3">
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioLinhaOperacionalController.lblEmpresa.value')}" />
|
||||||
|
<combobox id="cmbEmpresa"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
|
mold="rounded" buttonVisible="true" width="50%"
|
||||||
|
model="@{winFiltroQuadroDemonstrativoMovimentoPassageiros$composer.lsEmpresa}" />
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioGratuidadeController.lbLinhas.value')}" />
|
||||||
|
<combobox id="cmbLinha" width="70%" mold="rounded"
|
||||||
|
buttonVisible="true"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
|
model="@{winFiltroQuadroDemonstrativoMovimentoPassageiros$composer.lsLinhas}" constraint="no empty" />
|
||||||
|
</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