fixes bug#AL-3451
parent
9651e01e9b
commit
75724db699
4
pom.xml
4
pom.xml
|
@ -4,12 +4,12 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>br.com.rjconsultores</groupId>
|
||||
<artifactId>ventaboletosadm</artifactId>
|
||||
<version>1.39.3</version>
|
||||
<version>1.40.0</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<properties>
|
||||
<modelWeb.version>1.29.0</modelWeb.version>
|
||||
<flyway.version>1.23.3</flyway.version>
|
||||
<flyway.version>1.24.0</flyway.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
|
|
|
@ -0,0 +1,242 @@
|
|||
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayDataSource;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
import com.rjconsultores.ventaboletos.utilerias.MoneyHelper;
|
||||
import com.rjconsultores.ventaboletos.vo.parada.ParadaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.ruta.RutaVO;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||
|
||||
public class RelatorioDesempenhoPorLinha extends Relatorio {
|
||||
|
||||
private static Logger log = Logger.getLogger(RelatorioDesempenhoPorLinha.class);
|
||||
|
||||
public RelatorioDesempenhoPorLinha(Map<String, Object> parametros, Connection conexao) throws Exception {
|
||||
super(parametros, conexao);
|
||||
|
||||
this.setCustomDataSource(new ArrayDataSource(this) {
|
||||
@Override
|
||||
public void initDados() throws Exception {
|
||||
|
||||
Connection conexao = this.relatorio.getConexao();
|
||||
Map<String, Object> parametros = this.relatorio.getParametros();
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<Integer, List<RutaVO>> mapRutaTrecho = (Map<Integer, List<RutaVO>>) parametros.get("MAPRUTATRECHO");
|
||||
|
||||
if (parametros.get("TRECHOS") != null) {
|
||||
for (Entry<Integer, List<RutaVO>> entry : mapRutaTrecho.entrySet()) {
|
||||
String sqlCombinacoes = gerarCombinacaoTrechos(parametros);
|
||||
StringBuilder sql = getSQL(parametros, sqlCombinacoes, entry.getKey());
|
||||
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql.toString());
|
||||
setarParametrosDaConsulta(parametros, stmt);
|
||||
ResultSet rset2 = stmt.executeQuery();
|
||||
setarResult(rset2);
|
||||
}
|
||||
} else {
|
||||
StringBuilder sql = getSQL(parametros, null, null);
|
||||
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql.toString());
|
||||
setarParametrosDaConsulta(parametros, stmt);
|
||||
ResultSet rset2 = stmt.executeQuery();
|
||||
setarResult(rset2);
|
||||
}
|
||||
}
|
||||
|
||||
private void setarParametrosDaConsulta(Map<String, Object> parametros, NamedParameterStatement stmt)
|
||||
throws SQLException {
|
||||
stmt.setInt("EMPRESA_ID", Integer.valueOf(parametros.get("EMPRESA_ID").toString()));
|
||||
|
||||
stmt.setTimestamp("DATA_INICIAL",
|
||||
new Timestamp(DateUtil.inicioFecha((Date) parametros.get("DATA_INICIAL")).getTime()));
|
||||
stmt.setTimestamp("DATA_FINAL",
|
||||
new Timestamp(DateUtil.fimFecha((Date) parametros.get("DATA_FINAL")).getTime()));
|
||||
}
|
||||
|
||||
private void setarResult(ResultSet rset2) throws SQLException {
|
||||
while (rset2.next()) {
|
||||
Map<String, Object> dataResult = new HashMap<String, Object>();
|
||||
|
||||
dataResult.put("DATA", rset2.getString("data"));
|
||||
dataResult.put("PREFIXO", rset2.getString("prefixo"));
|
||||
dataResult.put("ITINERARIO", rset2.getString("itinerario"));
|
||||
dataResult.put("HORA", rset2.getString("hora"));
|
||||
dataResult.put("TARIFASARRECADA", rset2.getBigDecimal("tarifasArrecada"));
|
||||
dataResult.put("QTDPASSAGENS", rset2.getInt("qtdPassagens"));
|
||||
dataResult.put("QTDVIAGENS", 1);
|
||||
dataResult.put("EXTENSAO", rset2.getInt("extensao"));
|
||||
dataResult.put("TOTALKM", rset2.getInt("extensao"));
|
||||
dataResult.put("MEDIAKM", MoneyHelper.arredondar(rset2.getBigDecimal("mediaKm")));
|
||||
|
||||
this.dados.add(dataResult);
|
||||
}
|
||||
}
|
||||
|
||||
private StringBuilder getSQL(Map<String, Object> parametros, String sqlCombinacoes, Integer rutaId) {
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
|
||||
sql.append(" SELECT ");
|
||||
sql.append(" c.corrida_id, ");
|
||||
sql.append(" to_char(c.fechorsalida,'DD/MM/YYYY') as data, ");
|
||||
sql.append(" to_char(c.fechorsalida, 'HH24:MI') AS hora, ");
|
||||
sql.append(" r.prefixo prefixo, ");
|
||||
sql.append(" r.descruta itinerario, ");
|
||||
sql.append(" coalesce(SUM(cj.preciopagado),0) tarifasArrecada, ");
|
||||
sql.append(" COUNT(cj.boleto_id) qtdPassagens, ");
|
||||
sql.append(" tr.cantkmreal extensao, ");
|
||||
sql.append(" coalesce(SUM(cj.preciopagado),0) / coalesce(tr.cantkmreal,0) as mediaKm ");
|
||||
sql.append(" FROM ");
|
||||
sql.append(" corrida c ");
|
||||
sql.append(" INNER JOIN ruta r ON r.ruta_id = c.ruta_id ");
|
||||
sql.append(" INNER JOIN parada origem ON ( c.origen_id = origem.parada_id ) ");
|
||||
sql.append(" INNER JOIN parada destino ON ( c.destino_id = destino.parada_id ) ");
|
||||
sql.append(" INNER JOIN ruta_combinacion rc ON ( rc.ruta_id = c.ruta_id ");
|
||||
sql.append(" AND rc.activo = 1 ) ");
|
||||
sql.append(" INNER JOIN tramo tr ON ( tr.tramo_id = rc.tramo_id ");
|
||||
sql.append(" AND tr.origen_id = c.origen_id ");
|
||||
sql.append(" AND tr.destino_id = c.destino_id ) ");
|
||||
sql.append(" inner join MARCA m ");
|
||||
sql.append(" on m.marca_id = c.marca_id ");
|
||||
sql.append(" and m.activo = 1 ");
|
||||
sql.append(" LEFT JOIN ( ");
|
||||
sql.append(" SELECT ");
|
||||
sql.append(" co.corrida_id corrida_id, ");
|
||||
sql.append(" co.feccorrida feccorrida, ");
|
||||
sql.append(" bo.boleto_id, ");
|
||||
sql.append(" bo.preciopagado ");
|
||||
sql.append(" FROM ");
|
||||
sql.append(" corrida co ");
|
||||
sql.append(" INNER JOIN boleto bo ON co.corrida_id = bo.corrida_id ");
|
||||
sql.append(" AND co.feccorrida = bo.feccorrida ");
|
||||
sql.append(" AND bo.activo = 1 ");
|
||||
sql.append(" INNER JOIN ruta_combinacion rc ON rc.ruta_id = co.ruta_id ");
|
||||
sql.append(" INNER JOIN tramo t ON rc.tramo_id = t.tramo_id ");
|
||||
sql.append(" AND t.origen_id = bo.origen_id ");
|
||||
sql.append(" AND t.destino_id = bo.destino_id ");
|
||||
sql.append(" INNER JOIN ruta r ON r.ruta_id = co.ruta_id ");
|
||||
sql.append(" INNER JOIN ruta_combinacion rc2 ON ( rc2.ruta_id = r.ruta_id ");
|
||||
sql.append(" AND rc2.activo = 1 ) ");
|
||||
sql.append(" INNER JOIN tramo tr ON ( tr.tramo_id = rc2.tramo_id ");
|
||||
sql.append(" AND tr.origen_id = co.origen_id ");
|
||||
sql.append(" AND tr.destino_id = co.destino_id ) ");
|
||||
sql.append(" WHERE ");
|
||||
sql.append(" co.activo NOT IN ( 0, 2 ) ");
|
||||
sql.append(" AND rc.activo = 1 ");
|
||||
sql.append(" AND t.activo = 1 ");
|
||||
sql.append(" AND bo.indstatusboleto != 'S' ");
|
||||
sql.append(" AND bo.motivocancelacion_id IS NULL ");
|
||||
// sql.append(" AND bo.categoria_id <> :crianca_id ");
|
||||
sql.append(" and co.FECCORRIDA >= :DATA_INICIAL ");
|
||||
sql.append(" and co.FECCORRIDA <= :DATA_FINAL ");
|
||||
sql.append(" GROUP BY ");
|
||||
sql.append(" co.corrida_id, ");
|
||||
sql.append(" co.feccorrida, ");
|
||||
sql.append(" bo.boleto_id, ");
|
||||
sql.append(" bo.preciopagado ");
|
||||
sql.append(" ) cj ON ( cj.corrida_id = c.corrida_id ");
|
||||
sql.append(" AND cj.feccorrida = c.feccorrida ) ");
|
||||
sql.append(" WHERE ");
|
||||
sql.append(" m.EMPRESA_ID = :EMPRESA_ID ");
|
||||
sql.append(" and c.FECCORRIDA >= :DATA_INICIAL ");
|
||||
sql.append(" and c.FECCORRIDA <= :DATA_FINAL ");
|
||||
|
||||
if (parametros.get("LINHAS") != null && !possuiFiltroTodos("LINHAS")
|
||||
&& parametros.get("TRECHOS") != null) {
|
||||
sql.append(" and c.ruta_id IN (" + rutaId + ")");
|
||||
} else if (parametros.get("LINHAS") != null && !possuiFiltroTodos("LINHAS")) {
|
||||
sql.append(" and c.ruta_id IN (" + parametros.get("LINHAS").toString() + ")");
|
||||
}
|
||||
if (sqlCombinacoes != null && !sqlCombinacoes.isEmpty()) {
|
||||
sql.append(" " + sqlCombinacoes + " ");
|
||||
}
|
||||
|
||||
sql.append(" GROUP BY ");
|
||||
sql.append(" c.corrida_id, ");
|
||||
sql.append(" c.fechorsalida, ");
|
||||
sql.append(" to_char(c.fechorsalida, 'HH24:MI'), ");
|
||||
sql.append(" r.descruta, ");
|
||||
sql.append(" r.prefixo, ");
|
||||
sql.append(" tr.cantkmreal ");
|
||||
sql.append(" order by c.fechorsalida asc ");
|
||||
|
||||
return sql;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void processaParametros() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
private String gerarCombinacaoTrechos(Map<String, Object> parametros) {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<RutaVO> trechos = (List<RutaVO>) parametros.get("TRECHOS");
|
||||
|
||||
List<ParadaVO> listParada1 = new ArrayList<>();
|
||||
List<ParadaVO> listParada2 = new ArrayList<>();
|
||||
StringBuilder sql = new StringBuilder();
|
||||
|
||||
for (RutaVO tramoVO : trechos) {
|
||||
listParada1.add(new ParadaVO(tramoVO.getOrigenId(), tramoVO.getRutaId().intValue()));
|
||||
}
|
||||
|
||||
listParada2.addAll(listParada1);
|
||||
|
||||
if (trechos != null) {
|
||||
|
||||
LinkedList<List<ParadaVO>> lists = new LinkedList<List<ParadaVO>>();
|
||||
|
||||
lists.add(listParada1);
|
||||
lists.add(listParada2);
|
||||
|
||||
Set<String> combinacoes = new TreeSet<String>();
|
||||
|
||||
sql.append("AND (");
|
||||
for (ParadaVO s : lists.removeFirst())
|
||||
combinacoes.add(s.getParadaId().toString());
|
||||
|
||||
while (!lists.isEmpty()) {
|
||||
List<ParadaVO> next = lists.removeFirst();
|
||||
Set<String> novasCombinacoes = new TreeSet<String>();
|
||||
for (String s1 : combinacoes) {
|
||||
for (ParadaVO s2 : next) {
|
||||
novasCombinacoes.add(s1 + ";" + s2.getParadaId());
|
||||
sql.append("(c.origen_id = ").append(s1).append(" AND c.destino_id = ").append(s2.getParadaId())
|
||||
.append(" and c.ruta_id = " + s2.getRutaId() + " ) OR ");
|
||||
}
|
||||
}
|
||||
combinacoes = novasCombinacoes;
|
||||
}
|
||||
|
||||
// Remover o último " OR " da string
|
||||
if (combinacoes.size() > 0) {
|
||||
sql.delete(sql.length() - 4, sql.length());
|
||||
}
|
||||
sql.append(")");
|
||||
|
||||
}
|
||||
|
||||
return sql.toString();
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
#geral
|
||||
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||
|
||||
|
||||
#Labels cabeçalho
|
||||
cabecalho.relatorio=Relatório:
|
||||
cabecalho.periodo=Período:
|
||||
cabecalho.periodoA=à
|
||||
cabecalho.dataHora=Data/Hora:
|
||||
cabecalho.impressorPor=Impressor por:
|
||||
cabecalho.pagina=Página
|
||||
cabecalho.de=de
|
||||
cabecalho.filtros=Filtros:
|
Binary file not shown.
|
@ -0,0 +1,343 @@
|
|||
<?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="RelatorioDesempenhoPorLinha" pageWidth="1266" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="1226" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="b92fb063-a827-4619-8a69-5c78e3afbb8c">
|
||||
<property name="ireport.zoom" value="1.6500000000000203"/>
|
||||
<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="textStyle" isDefault="true" fontSize="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
|
||||
<style name="table">
|
||||
<box>
|
||||
<pen lineWidth="1.0" lineColor="#000000"/>
|
||||
</box>
|
||||
</style>
|
||||
<style name="table_TH" mode="Opaque" backcolor="#F0F8FF">
|
||||
<box>
|
||||
<pen lineWidth="0.5" lineColor="#000000"/>
|
||||
</box>
|
||||
</style>
|
||||
<style name="table_CH" mode="Opaque" backcolor="#BFE1FF">
|
||||
<box>
|
||||
<pen lineWidth="0.5" lineColor="#000000"/>
|
||||
</box>
|
||||
</style>
|
||||
<style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
|
||||
<box>
|
||||
<pen lineWidth="0.5" lineColor="#000000"/>
|
||||
</box>
|
||||
</style>
|
||||
<parameter name="DATA_INICIAL" class="java.util.Date"/>
|
||||
<parameter name="DATA_FINAL" class="java.util.Date"/>
|
||||
<parameter name="NOME_RELATORIO" class="java.lang.String"/>
|
||||
<parameter name="FILTROS" class="java.lang.String"/>
|
||||
<parameter name="USUARIO" class="java.lang.String"/>
|
||||
<parameter name="NUMPUNTOVENTA" class="java.lang.String"/>
|
||||
<parameter name="EMPRESA_ID" class="java.lang.Integer"/>
|
||||
<parameter name="EMPRESA" class="java.lang.String"/>
|
||||
<field name="DATA" class="java.lang.String"/>
|
||||
<field name="HORA" class="java.lang.String"/>
|
||||
<field name="TARIFASARRECADA" class="java.math.BigDecimal"/>
|
||||
<field name="QTDPASSAGENS" class="java.lang.Integer"/>
|
||||
<field name="QTDVIAGENS" class="java.lang.Integer"/>
|
||||
<field name="SEGURO" class="java.lang.String"/>
|
||||
<field name="ITINERARIO" class="java.lang.String"/>
|
||||
<field name="EXTENSAO" class="java.lang.Integer"/>
|
||||
<field name="TOTALKM" class="java.lang.Integer"/>
|
||||
<field name="PREFIXO" class="java.lang.String"/>
|
||||
<field name="MEDIAKM" class="java.math.BigDecimal"/>
|
||||
<background>
|
||||
<band splitType="Stretch"/>
|
||||
</background>
|
||||
<pageHeader>
|
||||
<band height="57" splitType="Stretch">
|
||||
<textField pattern="dd/MM/yyyy" isBlankWhenNull="false">
|
||||
<reportElement uuid="42796e20-405c-441f-9fd9-b26238bc7cdb" mode="Transparent" x="52" y="15" width="56" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<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[$P{DATA_INICIAL}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="false">
|
||||
<reportElement uuid="d2973779-79dc-4cc8-937a-e9167c42bab0" mode="Transparent" x="0" y="0" width="1043" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<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[$P{NOME_RELATORIO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="dd/MM/yyyy" isBlankWhenNull="false">
|
||||
<reportElement uuid="8730e85b-d436-42cd-beb6-1a881bad2478" mode="Transparent" x="121" y="15" width="80" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<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[$P{DATA_FINAL}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="false">
|
||||
<reportElement uuid="26bbd310-5e59-4975-a47f-b0048e80b1b6" mode="Transparent" x="0" y="15" width="52" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<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[$R{cabecalho.periodo}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="false">
|
||||
<reportElement uuid="9630a784-5f92-4abe-805c-fd175e4f8241" mode="Transparent" x="0" y="43" width="28" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<textElement textAlignment="Left" verticalAlignment="Middle" 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[$R{cabecalho.filtros}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="false">
|
||||
<reportElement uuid="91cded42-c53d-469a-abc7-6eb0d59f69af" mode="Transparent" x="1145" y="0" width="81" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<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[new java.util.Date()]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="false">
|
||||
<reportElement uuid="62f6ba6e-1aaf-4449-aef6-2e9d6e541856" mode="Transparent" x="1043" y="31" width="183" height="12" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{cabecalho.impressorPor}+" "+$P{USUARIO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField evaluationTime="Report" pattern="" isBlankWhenNull="false">
|
||||
<reportElement uuid="985f839c-258a-47eb-b72b-bec819b7bdbb" mode="Transparent" x="1198" y="15" width="28" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<textElement textAlignment="Center" 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[$V{PAGE_NUMBER}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="false">
|
||||
<reportElement uuid="ba831a24-59f4-4f8f-888f-fd69711018e9" mode="Transparent" x="1043" y="15" width="155" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<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[$R{cabecalho.pagina}+" "+$V{PAGE_NUMBER}+" "+$R{cabecalho.de}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="5cbb57ef-bd5e-4d1b-a077-d0ff398df801" x="1043" y="0" width="102" height="15"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="9" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{cabecalho.dataHora}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="false">
|
||||
<reportElement uuid="6d6ab075-006c-4796-98d5-f047ae963876" mode="Transparent" x="108" y="15" width="13" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<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[$R{cabecalho.periodoA}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="c486add3-94d7-419f-9f37-04f6a6da879e" x="28" y="43" width="1198" height="14"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$P{FILTROS}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</pageHeader>
|
||||
<columnHeader>
|
||||
<band height="15" splitType="Stretch">
|
||||
<staticText>
|
||||
<reportElement uuid="9fc7e58e-8625-41c4-a8ee-6454f6382d46" stretchType="RelativeToTallestObject" x="170" y="0" width="100" height="15" isPrintWhenDetailOverflows="true"/>
|
||||
<box>
|
||||
<bottomPen lineWidth="0.25"/>
|
||||
</box>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6" isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Itinérario ]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="3766fa33-6281-4576-a9d1-3b984e1976d3" stretchType="RelativeToTallestObject" x="0" y="0" width="90" height="15" isPrintWhenDetailOverflows="true"/>
|
||||
<box>
|
||||
<bottomPen lineWidth="0.25"/>
|
||||
</box>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6" isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Data]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="7e1f6b82-8a1f-4719-b942-41f0d7027aa8" stretchType="RelativeToTallestObject" x="270" y="0" width="50" height="15" isPrintWhenDetailOverflows="true"/>
|
||||
<box>
|
||||
<bottomPen lineWidth="0.25"/>
|
||||
</box>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6" isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Horário ]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="6adaca80-9b5a-4a03-a80b-5eeed4894d7f" stretchType="RelativeToTallestObject" mode="Transparent" x="590" y="0" width="70" height="15" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<box>
|
||||
<bottomPen lineWidth="0.25"/>
|
||||
</box>
|
||||
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Extensão]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="a39ab8f3-becb-44e3-b4f5-b7c43889508c" stretchType="RelativeToTallestObject" mode="Transparent" x="730" y="0" width="100" height="15" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<box>
|
||||
<bottomPen lineWidth="0.25"/>
|
||||
</box>
|
||||
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Média Por KM ]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="8a5e97db-9b05-4fa5-9663-7795869b6b90" stretchType="RelativeToTallestObject" x="90" y="0" width="80" height="15" isPrintWhenDetailOverflows="true"/>
|
||||
<box>
|
||||
<bottomPen lineWidth="0.25"/>
|
||||
</box>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6" isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Prefixo]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="c0542d93-dde4-448d-932c-453d6a4a6882" stretchType="RelativeToTallestObject" mode="Transparent" x="660" y="0" width="70" height="15" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<box>
|
||||
<bottomPen lineWidth="0.25"/>
|
||||
</box>
|
||||
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="6" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Total de KM]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="7d77d66e-6033-4ea3-9066-a42b92e4982e" stretchType="RelativeToTallestObject" x="320" y="0" width="90" height="15" isPrintWhenDetailOverflows="true"/>
|
||||
<box>
|
||||
<bottomPen lineWidth="0.25"/>
|
||||
</box>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6" isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Tarifas Arrecadadas]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="672ee466-505c-4913-a6c7-0a18ca4c7bfb" stretchType="RelativeToTallestObject" x="500" y="0" width="90" height="15" isPrintWhenDetailOverflows="true"/>
|
||||
<box>
|
||||
<bottomPen lineWidth="0.25"/>
|
||||
</box>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6" isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Quantidade de Viagens]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="77757ee7-73f9-415c-be39-634c74e26e9a" stretchType="RelativeToTallestObject" x="410" y="0" width="90" height="15" isPrintWhenDetailOverflows="true"/>
|
||||
<box>
|
||||
<bottomPen lineWidth="0.25"/>
|
||||
</box>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6" isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Quantidade de Passagens]]></text>
|
||||
</staticText>
|
||||
</band>
|
||||
</columnHeader>
|
||||
<detail>
|
||||
<band height="12" splitType="Stretch">
|
||||
<textField pattern="" isBlankWhenNull="true">
|
||||
<reportElement uuid="bc091860-adab-47d8-8352-982bc8e484a3" stretchType="RelativeToTallestObject" x="0" y="0" width="90" height="12" isPrintWhenDetailOverflows="true"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{DATA}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="true">
|
||||
<reportElement uuid="e3a43e5d-2326-47c4-9d47-8c4d69d18d99" stretchType="RelativeToTallestObject" x="90" y="0" width="80" height="12" isPrintWhenDetailOverflows="true"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{PREFIXO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="true">
|
||||
<reportElement uuid="82c36c16-1662-4af9-a285-c935ab350e79" stretchType="RelativeToTallestObject" x="170" y="0" width="100" height="12" isPrintWhenDetailOverflows="true"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{ITINERARIO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="true">
|
||||
<reportElement uuid="4cd8a33f-6aaa-47cb-949e-38c6b74d3d39" stretchType="RelativeToTallestObject" x="590" y="0" width="70" height="12" isPrintWhenDetailOverflows="true"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{EXTENSAO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="true">
|
||||
<reportElement uuid="17011486-0d4c-4e22-b534-48e0bb025673" stretchType="RelativeToTallestObject" x="660" y="0" width="70" height="12" isPrintWhenDetailOverflows="true"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{TOTALKM}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="true">
|
||||
<reportElement uuid="a89c84e4-0e13-4e85-a565-9eb0bc6e5423" stretchType="RelativeToTallestObject" x="730" y="0" width="100" height="12" isPrintWhenDetailOverflows="true"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{MEDIAKM}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="true">
|
||||
<reportElement uuid="dd401917-6047-4e1b-9722-31fe8d096594" stretchType="RelativeToTallestObject" x="270" y="0" width="50" height="12" isPrintWhenDetailOverflows="true"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{HORA}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="#,##0.00" isBlankWhenNull="true">
|
||||
<reportElement uuid="119f5dce-b02a-4d33-b74a-03eda5cef5a9" stretchType="RelativeToTallestObject" x="320" y="0" width="90" height="12" isPrintWhenDetailOverflows="true"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{TARIFASARRECADA}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="true">
|
||||
<reportElement uuid="a5b1e7fa-5c06-4a24-b7de-fca396b264e1" stretchType="RelativeToTallestObject" x="410" y="0" width="90" height="12" isPrintWhenDetailOverflows="true"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{QTDVIAGENS}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="true">
|
||||
<reportElement uuid="0f5856f2-2cdf-4178-9beb-33742b4fb83a" stretchType="RelativeToTallestObject" x="500" y="0" width="90" height="12" isPrintWhenDetailOverflows="true"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{QTDPASSAGENS}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</detail>
|
||||
<noData>
|
||||
<band height="50">
|
||||
<textField>
|
||||
<reportElement uuid="995c4c61-6291-4e5f-8d92-b75502a10466" x="0" y="-1" width="1226" height="50"/>
|
||||
<textElement textAlignment="Center" markup="none">
|
||||
<font size="11" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</noData>
|
||||
</jasperReport>
|
|
@ -0,0 +1,348 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
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.zk.ui.event.EventListener;
|
||||
import org.zkoss.zul.Button;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Datebox;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
import org.zkoss.zul.Radiogroup;
|
||||
import org.zkoss.zul.Textbox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioDesempenhoPorLinha;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.vo.ruta.RutaVO;
|
||||
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.RenderDesempenhoPorLinha;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderDesempenhoPorLinhaTrecho;
|
||||
|
||||
@Controller("relatorioDesempenhoPorLinhaController")
|
||||
@Scope("prototype")
|
||||
public class RelatorioDesempenhoPorLinhaController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static Logger log = Logger.getLogger(RelatorioDesempenhoPorLinhaController.class);
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
private Datebox datInicial;
|
||||
private Datebox datFinal;
|
||||
private MyComboboxEstandar cmbEmpresa;
|
||||
private List<Empresa> lsEmpresa;
|
||||
@Autowired
|
||||
private RutaService rutaService;
|
||||
|
||||
private MyListbox linhaList;
|
||||
private MyListbox trechoList;
|
||||
private MyListbox linhaListSelList;
|
||||
private Textbox txtPalavraPesquisaLinha;
|
||||
private ArrayList<Ruta> lsNumLinha = new ArrayList<Ruta>();
|
||||
private Radiogroup rgLayout;
|
||||
private Map<Integer, List<RutaVO>> mapRutaTrecho = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
lsEmpresa = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
||||
linhaList.setItemRenderer(new RenderDesempenhoPorLinha());
|
||||
renderizarListRuta();
|
||||
trechoList.setItemRenderer(new RenderDesempenhoPorLinhaTrecho());
|
||||
|
||||
}
|
||||
|
||||
private void renderizarListRuta() {
|
||||
linhaListSelList.setItemRenderer(new ListitemRenderer() {
|
||||
@Override
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
|
||||
Ruta ruta = (Ruta) o;
|
||||
if (ruta == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Listcell lc = new Listcell(ruta.getNumRuta() != null ? ruta.getNumRuta().toString() : "");
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(ruta.getPrefixo());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(ruta.getDescruta());
|
||||
lc.setParent(lstm);
|
||||
|
||||
OrgaoConcedente orgaoConcedente = ruta.getOrgaoConcedente();
|
||||
if (orgaoConcedente != null) {
|
||||
lc = new Listcell(orgaoConcedente.getDescOrgao());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
Button btn = new Button();
|
||||
lc = new Listcell();
|
||||
lc.setParent(lstm);
|
||||
|
||||
btn.setWidth("16");
|
||||
btn.setHeight("16");
|
||||
btn.setImage("/gui/img/remove.png");
|
||||
|
||||
btn.addEventListener("onClick", new EventListener() {
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
MyListbox listBox = (MyListbox) event.getTarget().getParent().getParent().getParent();
|
||||
Listitem listItem = (Listitem) event.getTarget().getParent().getParent();
|
||||
listBox.removeItem((Ruta) listItem.getAttribute("data"));
|
||||
List<RutaVO> lsRutaVOAux = new ArrayList<>(trechoList.getListData());
|
||||
Ruta ruta = (Ruta) listItem.getAttribute("data");
|
||||
for (RutaVO rutaVO : (List<RutaVO>) trechoList.getListData()) {
|
||||
if (StringUtils.isNotBlank(ruta.getNumRuta()) && StringUtils.isNotBlank(rutaVO.getNumRuta())
|
||||
&& ruta.getNumRuta().equals(rutaVO.getNumRuta())) {
|
||||
lsRutaVOAux.remove(rutaVO);
|
||||
mapRutaTrecho.remove(rutaVO.getRutaId().intValue());
|
||||
}
|
||||
}
|
||||
trechoList.setData(lsRutaVOAux);
|
||||
}
|
||||
});
|
||||
lc.appendChild(btn);
|
||||
lstm.setAttribute("data", ruta);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void carregarTramos(Ruta rutaSelecionada) {
|
||||
|
||||
List<RutaVO> lsRutaVO = rutaService.buscaRutaParadas(rutaSelecionada.getRutaId());
|
||||
RutaVO ultimaRuta = lsRutaVO.get(lsRutaVO.size() - 1);
|
||||
RutaVO novaRuta = new RutaVO(ultimaRuta.getRutaId(), ultimaRuta.getNumRuta(), ultimaRuta.getPrefixo(),
|
||||
ultimaRuta.getDescruta(), ultimaRuta.getDescDestino(), ultimaRuta.getNumSecuencia(),
|
||||
ultimaRuta.getDestinoId(), ultimaRuta.getDestinoId());
|
||||
novaRuta.setDescOrigem(novaRuta.getDescParada());
|
||||
lsRutaVO.add(novaRuta);
|
||||
|
||||
mapRutaTrecho.put(rutaSelecionada.getRutaId(), lsRutaVO);
|
||||
List<RutaVO> lsRutaVOAux = new ArrayList();
|
||||
lsRutaVOAux.addAll(trechoList.getListData());
|
||||
lsRutaVOAux.addAll(lsRutaVO);
|
||||
trechoList.setData(lsRutaVOAux);
|
||||
|
||||
}
|
||||
|
||||
public void actualizarDados(List<RutaVO> listaRutaVO) {
|
||||
|
||||
}
|
||||
|
||||
public List<Empresa> getLsEmpresa() {
|
||||
return lsEmpresa;
|
||||
}
|
||||
|
||||
public void setLsEmpresa(List<Empresa> lsEmpresa) {
|
||||
this.lsEmpresa = lsEmpresa;
|
||||
}
|
||||
|
||||
public void onDoubleClick$linhaList(Event ev) {
|
||||
Ruta rutaAux = (Ruta) linhaList.getSelected();
|
||||
if (rutaAux == null) {
|
||||
return;
|
||||
}
|
||||
linhaListSelList.addItemNovo(rutaAux);
|
||||
|
||||
carregarTramos(rutaAux);
|
||||
}
|
||||
|
||||
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) {
|
||||
log.error(ex);
|
||||
}
|
||||
} else {
|
||||
Collections.sort(linhaList.getListData(), new Comparator<Ruta>() {
|
||||
@Override
|
||||
public int compare(Ruta m1, Ruta m2) {
|
||||
return m1.getDescruta().compareTo(m2.getDescruta());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnPesquisaLinha(Event ev) {
|
||||
executarPesquisaLinha();
|
||||
}
|
||||
|
||||
public void onClick$btnLimparLinha(Event ev) {
|
||||
linhaList.clearSelection();
|
||||
lsNumLinha.clear();
|
||||
}
|
||||
|
||||
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
|
||||
executarRelatorio();
|
||||
}
|
||||
|
||||
private void executarRelatorio() throws Exception {
|
||||
|
||||
if (rgLayout.getSelectedItem().getValue().equals("EMISSAO_LINHA")) {
|
||||
executarRelatorioLinha();
|
||||
} else {
|
||||
executarRelatorioTrecho();
|
||||
}
|
||||
}
|
||||
|
||||
private void executarRelatorioLinha() throws Exception {
|
||||
|
||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||
StringBuilder filtro = new StringBuilder();
|
||||
|
||||
filtro.append("Linha: ");
|
||||
String linhaIds = "";
|
||||
String linhas = "";
|
||||
List<Ruta> lslinhaSelecionados = new ArrayList(Arrays.asList(linhaListSelList.getData()));
|
||||
if (lslinhaSelecionados.isEmpty()) {
|
||||
linhas = "Todas";
|
||||
} else {
|
||||
for (int i = 0; i < lslinhaSelecionados.size(); i++) {
|
||||
Ruta linha = lslinhaSelecionados.get(i);
|
||||
linhas = linhas + linha.getDescruta() + ", ";
|
||||
|
||||
linhaIds = linhaIds + linha.getRutaId() + ", ";
|
||||
}
|
||||
|
||||
// removendo ultima virgula
|
||||
linhaIds = linhaIds.substring(0, linhaIds.length() - 2);
|
||||
linhas = linhas.substring(0, linhas.length() - 2);
|
||||
parametros.put("LINHAS", linhaIds);
|
||||
}
|
||||
filtro.append(linhas).append(";");
|
||||
|
||||
parametros.put("DATA_INICIAL", (java.util.Date) this.datInicial.getValue());
|
||||
parametros.put("DATA_FINAL", (java.util.Date) this.datFinal.getValue());
|
||||
parametros.put("NOME_RELATORIO", Labels.getLabel("relatorioDesempenhoPorLinhaController.window.title"));
|
||||
parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getNombusuario());
|
||||
|
||||
filtro.append(" Empresa: ");
|
||||
|
||||
Comboitem itemEmpresa = cmbEmpresa.getSelectedItem();
|
||||
if (itemEmpresa != null) {
|
||||
Empresa empresa = (Empresa) itemEmpresa.getValue();
|
||||
parametros.put("EMPRESA_ID", empresa.getEmpresaId());
|
||||
parametros.put("EMPRESA", empresa.getNombempresa());
|
||||
filtro.append(empresa.getNombempresa() + ";");
|
||||
} else {
|
||||
filtro.append(" Todas;");
|
||||
}
|
||||
|
||||
parametros.put("FILTROS", filtro.toString());
|
||||
Relatorio relatorio = new RelatorioDesempenhoPorLinha(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("relatorio", relatorio);
|
||||
|
||||
openWindow("/component/reportView.zul", Labels.getLabel("relatorioDesempenhoPorLinhaController.window.title"),
|
||||
args, MODAL);
|
||||
}
|
||||
|
||||
private void executarRelatorioTrecho() throws Exception {
|
||||
|
||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||
StringBuilder filtro = new StringBuilder();
|
||||
List<RutaVO> lista = new ArrayList<>();
|
||||
Map<Integer, List<RutaVO>> mapRutaTrechoAux = new HashMap<>();
|
||||
|
||||
for (Entry<Integer, List<RutaVO>> entry : mapRutaTrecho.entrySet()) {
|
||||
List<RutaVO> listaAux = entry.getValue();
|
||||
for (RutaVO rutaVO2 : (List<RutaVO>) trechoList.getListData()) {
|
||||
for (RutaVO rutaVO : listaAux) {
|
||||
if (rutaVO.getRutaId().equals(rutaVO2.getRutaId())) {
|
||||
lista.add(rutaVO2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
mapRutaTrechoAux.put(entry.getKey(), lista);
|
||||
lista = new ArrayList<>();
|
||||
}
|
||||
|
||||
filtro.append("Linha: ");
|
||||
String linhaIds = "";
|
||||
String linhas = "";
|
||||
List<Ruta> lslinhaSelecionados = new ArrayList(Arrays.asList(linhaListSelList.getData()));
|
||||
if (lslinhaSelecionados.isEmpty()) {
|
||||
linhas = "Todas";
|
||||
} else {
|
||||
for (int i = 0; i < lslinhaSelecionados.size(); i++) {
|
||||
Ruta linha = lslinhaSelecionados.get(i);
|
||||
linhas = linhas + linha.getDescruta() + ", ";
|
||||
|
||||
linhaIds = linhaIds + linha.getRutaId() + ", ";
|
||||
}
|
||||
|
||||
// removendo ultima virgula
|
||||
linhaIds = linhaIds.substring(0, linhaIds.length() - 2);
|
||||
linhas = linhas.substring(0, linhas.length() - 2);
|
||||
parametros.put("LINHAS", linhaIds);
|
||||
}
|
||||
filtro.append(linhas).append(";");
|
||||
|
||||
parametros.put("DATA_INICIAL", (java.util.Date) this.datInicial.getValue());
|
||||
parametros.put("DATA_FINAL", (java.util.Date) this.datFinal.getValue());
|
||||
parametros.put("NOME_RELATORIO", Labels.getLabel("relatorioDesempenhoPorLinhaController.window.title"));
|
||||
parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getNombusuario());
|
||||
parametros.put("TRECHOS", trechoList.getListData());
|
||||
parametros.put("MAPRUTATRECHO", mapRutaTrechoAux);
|
||||
|
||||
filtro.append(" Empresa: ");
|
||||
|
||||
Comboitem itemEmpresa = cmbEmpresa.getSelectedItem();
|
||||
if (itemEmpresa != null) {
|
||||
Empresa empresa = (Empresa) itemEmpresa.getValue();
|
||||
parametros.put("EMPRESA_ID", empresa.getEmpresaId());
|
||||
parametros.put("EMPRESA", empresa.getNombempresa());
|
||||
filtro.append(empresa.getNombempresa() + ";");
|
||||
} else {
|
||||
filtro.append(" Todas;");
|
||||
}
|
||||
|
||||
parametros.put("FILTROS", filtro.toString());
|
||||
Relatorio relatorio = new RelatorioDesempenhoPorLinha(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("relatorio", relatorio);
|
||||
|
||||
openWindow("/component/reportView.zul", Labels.getLabel("relatorioDesempenhoPorLinhaController.window.title"),
|
||||
args, MODAL);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
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 ItemMenuRelatorioDesempenhoPorLinha extends DefaultItemMenuSistema {
|
||||
|
||||
public ItemMenuRelatorioDesempenhoPorLinha() {
|
||||
super("indexController.mniRelatorioDesempenhoPorLinha.label");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClaveMenu() {
|
||||
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIODESEMPENHOPORLINHA";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ejecutar() {
|
||||
PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioDesempenhoPorLinha.zul",
|
||||
Labels.getLabel("relatorioDesempenhoPorLinhaController.window.title"), getArgs(), desktop);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -251,6 +251,7 @@ analitico.gerenciais.financeiro.relatorioOperacionalFinanceiro=com.rjconsultores
|
|||
analitico.gerenciais.financeiro.relatorioResumoVendaOrgaoConcedente=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioResumoVendaOrgaoConcedente
|
||||
analitico.gerenciais.financeiro.relatorioVendasConexaoRuta=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendasConexaoRuta
|
||||
analitico.gerenciais.financeiro.relatorioVendaBilhetePorEmpresaAutorizadora=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuVendaBilhetePorEmpresaAutorizadora
|
||||
analitico.gerenciais.financeiro.relatorioDesempenhoPorLinha=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioDesempenhoPorLinha
|
||||
analitico.gerenciais.pacote=com.rjconsultores.ventaboletos.web.utilerias.menu.item.analitico.gerenciais.pacote.SubMenuRelatorioPacote
|
||||
analitico.gerenciais.pacote.boletos=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendasPacotesBoletos
|
||||
analitico.gerenciais.pacote.detalhado=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendasPacotesDetalhado
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zul.Button;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
/**
|
||||
* @author Thiago
|
||||
*
|
||||
*/
|
||||
public class RenderDesempenhoPorLinha implements ListitemRenderer {
|
||||
|
||||
@Override
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
Ruta ruta = (Ruta) o;
|
||||
|
||||
Listcell lc = new Listcell(ruta.getNumRuta() != null ? ruta.getNumRuta().toString() : "");
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(ruta.getPrefixo());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(ruta.getDescruta());
|
||||
lc.setParent(lstm);
|
||||
|
||||
OrgaoConcedente orgaoConcedente = ruta.getOrgaoConcedente();
|
||||
if (orgaoConcedente != null) {
|
||||
lc = new Listcell(orgaoConcedente.getDescOrgao());
|
||||
} else {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
lc.setParent(lstm);
|
||||
|
||||
Button btn = new Button();
|
||||
|
||||
lc = new Listcell();
|
||||
lc.setParent(lstm);
|
||||
|
||||
btn.setWidth("16");
|
||||
btn.setHeight("16");
|
||||
btn.setImage("/gui/img/remove.png");
|
||||
|
||||
btn.addEventListener("onClick", new EventListener() {
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
MyListbox listBox = (MyListbox) event.getTarget().getParent().getParent().getParent();
|
||||
Listitem listItem = (Listitem) event.getTarget().getParent().getParent();
|
||||
listBox.removeItem((Ruta) listItem.getAttribute("data"));
|
||||
}
|
||||
});
|
||||
|
||||
lc.appendChild(btn);
|
||||
|
||||
lstm.setAttribute("data", ruta);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zul.Button;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
import com.rjconsultores.ventaboletos.vo.ruta.RutaVO;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
/**
|
||||
* @author Wallace
|
||||
*
|
||||
*/
|
||||
public class RenderDesempenhoPorLinhaTrecho implements ListitemRenderer {
|
||||
|
||||
@Override
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
RutaVO ruta = (RutaVO) o;
|
||||
|
||||
Listcell lc = new Listcell(ruta.getNumRuta().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(ruta.getPrefixo());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(ruta.getDescruta());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(ruta.getDescOrigem());
|
||||
lc.setParent(lstm);
|
||||
|
||||
Button btn = new Button();
|
||||
|
||||
lc = new Listcell();
|
||||
lc.setParent(lstm);
|
||||
|
||||
btn.setWidth("16");
|
||||
btn.setHeight("16");
|
||||
btn.setImage("/gui/img/remove.png");
|
||||
|
||||
btn.addEventListener("onClick", new EventListener() {
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
MyListbox listBox = (MyListbox) event.getTarget().getParent().getParent().getParent();
|
||||
Listitem listItem = (Listitem) event.getTarget().getParent().getParent();
|
||||
listBox.removeItem((RutaVO) listItem.getAttribute("data"));
|
||||
}
|
||||
});
|
||||
|
||||
lc.appendChild(btn);
|
||||
|
||||
lstm.setAttribute("data", ruta);
|
||||
}
|
||||
|
||||
}
|
|
@ -319,6 +319,7 @@ indexController.mniRelatoriosOperacionais.mniRelatorioMudancas.Pricing.label = R
|
|||
|
||||
indexController.mniRelatorios.label = Relatórios
|
||||
indexController.mniRelatorioAproveitamento.label = Aproveitamento
|
||||
indexController.mniRelatorioDesempenhoPorLinha.label = Desempenho por Linha
|
||||
indexController.mniRelatorioArquivoBGM.label = Arquivo BGM
|
||||
indexController.mniRelatorioReceitasDespesasDiversas.label=Receitas/Despesas Diversas e Depósitos Bancários
|
||||
indexController.mniLogReceitasDespesasDiversas.label=Log Receitas/Despesas Diversas e Depósitos Bancários
|
||||
|
@ -599,6 +600,25 @@ relatorioKmProgramadaController.lbLote.value = Lote
|
|||
relatorioKmProgramadaController.lbAte.value = até
|
||||
relatorioKmProgramadaController.lbGrupoRuta.label = Grupo de Linhas
|
||||
|
||||
#DesempenhoPorLinha
|
||||
relatorioDesempenhoPorLinhaController.window.title = Relatório de Desempenho por linha
|
||||
relatorioDesempenhoPorLinhaController.window.title = Relatório de Aproveitamento Financeiro
|
||||
relatorioDesempenhoPorLinhaController.lbDatInicial.value = Data inicial
|
||||
relatorioDesempenhoPorLinhaController.lbDatFinal.value = Data final
|
||||
relatorioDesempenhoPorLinhaController.lbPuntoVenta.value = Agência
|
||||
relatorioDesempenhoPorLinhaController.lbEmpresa.value = Empresa
|
||||
relatorioDesempenhoPorLinhaController.btnPesquisa.label = Buscar
|
||||
relatorioDesempenhoPorLinhaController.btnLimpar.label = Limpar
|
||||
relatorioDesempenhoPorLinhaController.lbNumero.value = Número Agência
|
||||
relatorioDesempenhoPorLinhaController.window.title = Relatório de Aproveitamento Financeiro
|
||||
relatorioDesempenhoPorLinhaController.linha = Relatório por Linha
|
||||
relatorioDesempenhoPorLinhaController.trecho = Relatório por Trecho
|
||||
relatorioDesempenhoPorLinhaController.lbOrigem.value = Origem
|
||||
relatorioDesempenhoPorLinhaController.lbDestino.value = Destino
|
||||
relatorioDesempenhoPorLinhaController.lbNumRuta.label = Num. Linha
|
||||
relatorioDesempenhoPorLinhaController.lbPrefixo.label = Prefixo
|
||||
relatorioDesempenhoPorLinhaController.lbOrgao.label = Orgão Concedente
|
||||
|
||||
#Aproveitamento
|
||||
relatorioAproveitamentoController.window.title = Relatório de Aproveitamento
|
||||
relatorioAproveitamentoController.lbFecCorrida.value = Data Serviço
|
||||
|
|
|
@ -306,6 +306,7 @@ indexController.mniRelatoriosOperacionais.mniRelatorioMudancas.Pricing.label = R
|
|||
|
||||
indexController.mniRelatorios.label = Reportes
|
||||
indexController.mniRelatorioAproveitamento.label = Aprovechamiento
|
||||
indexController.mniRelatorioDesempenhoPorLinha.label = Desempenho por Linha
|
||||
indexController.mniRelatorioArquivoBGM.label = Arquivo BGM
|
||||
indexController.mniRelatorioReceitasDespesasDiversas.label=Receitas/Despesas Diversas e Depósitos Bancários
|
||||
indexController.mniLogReceitasDespesasDiversas.label=Log Receitas/Despesas Diversas e Depósitos Bancários
|
||||
|
@ -532,6 +533,26 @@ relatorioResumoLinhasController.lbAte.value = Hasta
|
|||
relatorioResumoLinhasController.lblSumarizar.value = Sumarizar por linhas (Completo)
|
||||
relatorioResumoLinhasController.lblSimplificadoSumarizado.value = Sumarizar por linhas (Simplificado)
|
||||
|
||||
|
||||
#DesempenhoPorLinha
|
||||
relatorioDesempenhoPorLinhaController.window.title = Relatório de Desempenho por linha
|
||||
relatorioDesempenhoPorLinhaController.window.title = Relatório de Aproveitamento Financeiro
|
||||
relatorioDesempenhoPorLinhaController.lbDatInicial.value = Data inicial
|
||||
relatorioDesempenhoPorLinhaController.lbDatFinal.value = Data final
|
||||
relatorioDesempenhoPorLinhaController.lbPuntoVenta.value = Agência
|
||||
relatorioDesempenhoPorLinhaController.lbEmpresa.value = Empresa
|
||||
relatorioDesempenhoPorLinhaController.btnPesquisa.label = Buscar
|
||||
relatorioDesempenhoPorLinhaController.btnLimpar.label = Limpar
|
||||
relatorioDesempenhoPorLinhaController.lbNumero.value = Número Agência
|
||||
relatorioDesempenhoPorLinhaController.window.title = Relatório de Aproveitamento Financeiro
|
||||
relatorioDesempenhoPorLinhaController.linha = Relatório por Linha
|
||||
relatorioDesempenhoPorLinhaController.trecho = Relatório por Trecho
|
||||
relatorioDesempenhoPorLinhaController.lbOrigem.value = Origem
|
||||
relatorioDesempenhoPorLinhaController.lbDestino.value = Destino
|
||||
relatorioDesempenhoPorLinhaController.lbNumRuta.label = Num. Linha
|
||||
relatorioDesempenhoPorLinhaController.lbPrefixo.label = Prefixo
|
||||
relatorioDesempenhoPorLinhaController.lbOrgao.label = Orgão Concedente
|
||||
|
||||
#Aproveitamento
|
||||
relatorioAproveitamentoController.window.title = Reporte de ocupación
|
||||
relatorioAproveitamentoController.lbFecCorrida.value = Fecha servicio
|
||||
|
|
|
@ -319,6 +319,7 @@ indexController.mniRelatoriosOperacionais.mniRelatorioMudancas.Pricing.label = R
|
|||
|
||||
indexController.mniRelatorios.label = Relatórios
|
||||
indexController.mniRelatorioAproveitamento.label = Aproveitamento
|
||||
indexController.mniRelatorioDesempenhoPorLinha.label = Desempenho por Linha
|
||||
indexController.mniRelatorioArquivoBGM.label = Arquivo BGM
|
||||
indexController.mniRelatorioReceitasDespesasDiversas.label=Receitas/Despesas Diversas e Depósitos Bancários
|
||||
indexController.mniLogReceitasDespesasDiversas.label=Log Receitas/Despesas Diversas e Depósitos Bancários
|
||||
|
@ -599,6 +600,25 @@ relatorioKmProgramadaController.lbLote.value = Lote
|
|||
relatorioKmProgramadaController.lbAte.value = até
|
||||
relatorioKmProgramadaController.lbGrupoRuta.label = Grupo de Linhas
|
||||
|
||||
#DesempenhoPorLinha
|
||||
relatorioDesempenhoPorLinhaController.window.title = Relatório de Desempenho por linha
|
||||
relatorioDesempenhoPorLinhaController.window.title = Relatório de Aproveitamento Financeiro
|
||||
relatorioDesempenhoPorLinhaController.lbDatInicial.value = Data inicial
|
||||
relatorioDesempenhoPorLinhaController.lbDatFinal.value = Data final
|
||||
relatorioDesempenhoPorLinhaController.lbPuntoVenta.value = Agência
|
||||
relatorioDesempenhoPorLinhaController.lbEmpresa.value = Empresa
|
||||
relatorioDesempenhoPorLinhaController.btnPesquisa.label = Buscar
|
||||
relatorioDesempenhoPorLinhaController.btnLimpar.label = Limpar
|
||||
relatorioDesempenhoPorLinhaController.lbNumero.value = Número Agência
|
||||
relatorioDesempenhoPorLinhaController.window.title = Relatório de Aproveitamento Financeiro
|
||||
relatorioDesempenhoPorLinhaController.linha = Relatório por Linha
|
||||
relatorioDesempenhoPorLinhaController.trecho = Relatório por Trecho
|
||||
relatorioDesempenhoPorLinhaController.lbOrigem.value = Origem
|
||||
relatorioDesempenhoPorLinhaController.lbDestino.value = Destino
|
||||
relatorioDesempenhoPorLinhaController.lbNumRuta.label = Num. Linha
|
||||
relatorioDesempenhoPorLinhaController.lbPrefixo.label = Prefixo
|
||||
relatorioDesempenhoPorLinhaController.lbOrgao.label = Orgão Concedente
|
||||
|
||||
#Aproveitamento
|
||||
relatorioAproveitamentoController.window.title = Relatório de Aproveitamento
|
||||
relatorioAproveitamentoController.lbFecCorrida.value = Data Serviço
|
||||
|
|
|
@ -0,0 +1,170 @@
|
|||
<?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="winFiltroRelatorioDesempenhoPorLinha"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winFiltroRelatorioDesempenhoPorLinha"
|
||||
apply="${relatorioDesempenhoPorLinhaController}"
|
||||
contentStyle="overflow:auto" height="400px" 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('relatorioDesempenhoPorLinhaController.lbDatInicial.value')}" />
|
||||
<datebox id="datInicial" width="90%"
|
||||
format="dd/MM/yyyy" constraint="no empty" maxlength="10" />
|
||||
<label
|
||||
value="${c:l('relatorioDesempenhoPorLinhaController.lbDatFinal.value')}" />
|
||||
<datebox id="datFinal" width="90%"
|
||||
format="dd/MM/yyyy" constraint="no empty" maxlength="10" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="20%" />
|
||||
<column width="80%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row spans="1,1,2">
|
||||
<label
|
||||
value="${c:l('relatorioDesempenhoPorLinhaController.lbEmpresa.value')}" />
|
||||
<combobox id="cmbEmpresa" buttonVisible="true"
|
||||
constraint="no empty"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
model="@{winFiltroRelatorioDesempenhoPorLinha$composer.lsEmpresa}"
|
||||
width="95%" />
|
||||
</row>
|
||||
<row spans="3">
|
||||
<radiogroup Id="rgLayout">
|
||||
<label
|
||||
value="${c:l('relatorioDesempenhoPorLinhaController.linha')}" />
|
||||
<radio value="EMISSAO_LINHA" checked="true">
|
||||
<attribute name="onCheck">
|
||||
rowTrecho.setVisible(false);
|
||||
</attribute>
|
||||
</radio>
|
||||
<label
|
||||
value="${c:l('relatorioDesempenhoPorLinhaController.trecho')}" />
|
||||
<radio value="EMISSAO_TRECHO">
|
||||
<attribute name="onCheck">
|
||||
rowTrecho.setVisible(true);
|
||||
</attribute>
|
||||
</radio>
|
||||
</radiogroup>
|
||||
</row>
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('relatorioLinhasHorarioController.lbLinha.label')}" />
|
||||
<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('relatorioLinhasHorarioController.btnPesquisa.label')}" />
|
||||
<button id="btnLimparLinha"
|
||||
image="/gui/img/eraser.png"
|
||||
label="${c:l('relatorioLinhasHorarioController.btnLimpar.label')}" />
|
||||
</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('relatorioDesempenhoPorLinhaController.lbNumRuta.label')}"
|
||||
width="18%" sort="auto(numRuta)" />
|
||||
<listheader
|
||||
label="${c:l('relatorioLinhasHorarioController.lbPrefixo.label')}"
|
||||
width="20%" sort="auto(prefixo)" />
|
||||
<listheader
|
||||
label="${c:l('lb.dec')}" width="35%" sort="auto(descruta)" />
|
||||
<listheader
|
||||
label="${c:l('relatorioLinhasHorarioController.lbOrgao.label')}"
|
||||
width="27%" sort="auto(orgaoConcedente.descOrgao)" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
<paging id="pagingLinha" pageSize="10" />
|
||||
</vbox>
|
||||
</bandpopup>
|
||||
</bandbox>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell colspan="4">
|
||||
<borderlayout height="80px">
|
||||
|
||||
<center border="0">
|
||||
<listbox id="linhaListSelList"
|
||||
mold="paging"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
vflex="true" multiple="true" height="60%" width="97%">
|
||||
<listhead>
|
||||
<listheader
|
||||
label="${c:l('relatorioLinhasHorarioController.lbNumRuta.label')}"
|
||||
width="18%" />
|
||||
<listheader
|
||||
label="${c:l('relatorioLinhasHorarioController.lbPrefixo.label')}"
|
||||
width="20%" />
|
||||
<listheader
|
||||
label="${c:l('lb.dec')}" width="30%" />
|
||||
<listheader
|
||||
label="${c:l('relatorioLinhasHorarioController.lbOrgao.label')}"
|
||||
width="22%" />
|
||||
<listheader width="10%" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</center>
|
||||
</borderlayout>
|
||||
</cell>
|
||||
</row>
|
||||
|
||||
<row id="rowTrecho" visible="false">
|
||||
<cell colspan="4">
|
||||
<borderlayout height="120px">
|
||||
<center border="0">
|
||||
<listbox id="trechoList" height="400px"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false" width="97%">
|
||||
<listhead>
|
||||
<listheader
|
||||
label="${c:l('relatorioAproveitamentoFinanceiroController.lbNumRuta.label')}"
|
||||
width="18%" />
|
||||
<listheader
|
||||
label="${c:l('relatorioAproveitamentoFinanceiroController.lbPrefixo.label')}"
|
||||
width="20%" />
|
||||
<listheader
|
||||
label="${c:l('lb.dec')}" width="30%" />
|
||||
<listheader
|
||||
label="${c:l('relatorioAproveitamentoFinanceiroController.lbOrigem.value')}"
|
||||
width="35%" />
|
||||
<listheader width="20%" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</center>
|
||||
</borderlayout>
|
||||
</cell>
|
||||
</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