adicao de layout novo rel Devolucao feat bug #AL-4023

master
Fabio 2024-04-23 09:23:04 -03:00
parent d7924ec19b
commit 5ec4d7c3ff
16 changed files with 999 additions and 25 deletions

View File

@ -0,0 +1,178 @@
package com.rjconsultores.ventaboletos.relatorios.impl;
import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.rjconsultores.ventaboletos.entidad.Estado;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DevolucaoBilhetes;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
public class RelatorioDevolucaoBilhetesAnalitico extends Relatorio {
private static Logger log = LogManager.getLogger(RelatorioDevolucaoBilhetesAnalitico.class);
public RelatorioDevolucaoBilhetesAnalitico(Map<String, Object> parametros, Connection conexao) throws Exception {
super(parametros, conexao);
this.setCustomDataSource(new DataSource(this) {
@SuppressWarnings("unchecked")
@Override
public void initDados() throws Exception {
Connection conexao = this.relatorio.getConexao();
Map<String, Object> parametros = this.relatorio.getParametros();
List<PuntoVenta> lsPuntoVenta = parametros.get("PUNTOVENTAS") == null ? new ArrayList<PuntoVenta>() : (ArrayList<PuntoVenta>) parametros.get("PUNTOVENTAS");
List<Estado> lsEstado = parametros.get("ESTADOS") == null ? new ArrayList<Estado>() : (ArrayList<Estado>) parametros.get("ESTADOS");
Integer empresaId = parametros.get("EMPRESA_ID") == null ? null : (Integer) parametros.get("EMPRESA_ID");
Date dataVendaInicial = parametros.get("dataVendaInicial") == null ? null : (Date) parametros.get("dataVendaInicial");
Date dataVendaFinal = parametros.get("dataVendaFinal") == null ? null : (Date) parametros.get("dataVendaFinal");
Date dataDevolucaoInicial = parametros.get("dataDevolucaoInicial") == null ? null : (Date) parametros.get("dataDevolucaoInicial");
Date dataDevolucaoFinal = parametros.get("dataDevolucaoFinal") == null ? null : (Date) parametros.get("dataDevolucaoFinal");
Boolean isApenasBilhetesImpressos = parametros.get("isApenasBilhetesImpressos") == null ? Boolean.FALSE : Boolean.valueOf(parametros.get("isApenasBilhetesImpressos").toString());
String puntoVentas = null;
for (PuntoVenta pv : lsPuntoVenta) {
if (lsPuntoVenta.indexOf(pv) == 0) {
puntoVentas = "" + pv.getPuntoventaId();
} else {
puntoVentas += ", " + pv.getPuntoventaId();
}
}
String estados = null;
for (Estado e : lsEstado) {
if (lsEstado.indexOf(e) == 0) {
estados = "" + e.getEstadoId();
} else {
estados += ", " + e.getEstadoId();
}
}
String sql = getSql(empresaId, puntoVentas, estados, dataVendaInicial, dataVendaFinal, dataDevolucaoInicial, dataDevolucaoFinal, isApenasBilhetesImpressos);
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
ResultSet rset = null;
if(dataVendaInicial != null) {
stmt.setString("dataVendaInicial", DateUtil.getStringDate(dataVendaInicial, "dd/MM/yyyy HH:mm"));
}
if(dataVendaFinal != null) {
stmt.setString("dataVendaFinal", DateUtil.getStringDate(dataVendaFinal, "dd/MM/yyyy HH:mm"));
}
if(dataDevolucaoInicial != null) {
stmt.setString("dataDevolucaoInicial", DateUtil.getStringDate(dataDevolucaoInicial, "dd/MM/yyyy HH:mm"));
}
if(dataDevolucaoFinal != null) {
stmt.setString("dataDevolucaoFinal", DateUtil.getStringDate(dataDevolucaoFinal, "dd/MM/yyyy HH:mm"));
}
rset = stmt.executeQuery();
List<DevolucaoBilhetes> lsDev = new ArrayList<DevolucaoBilhetes>();
while (rset.next()) {
DevolucaoBilhetes db = new DevolucaoBilhetes();
db.setFecVenta(rset.getDate("FECHOR_VENTA"));
db.setFecDevolucao(rset.getDate("FECHOR_DEVOLUCAO"));
db.setUf(rset.getString("UF"));
db.setNumFolioSistema(rset.getString("NUMFOLIOSISTEMA"));
db.setEmpresaId(rset.getInt("EMPRESA_ID"));
db.setEmpresa((String) rset.getObject("NOMB_EMPRESA"));
db.setNumpuntoventa((String) rset.getObject("NUMPUNTOVENTA"));
db.setNombpuntoventa((String) rset.getObject("NOMBPUNTOVENTA"));
db.setPrecioBase((BigDecimal) rset.getObject("PRECIOBASE"));
db.setPrecioPagado((BigDecimal) rset.getObject("PRECIOPAGADO"));
lsDev.add(db);
}
setLsDadosRelatorio(lsDev);
}
});
}
public void setLsDadosRelatorio(List<DevolucaoBilhetes> lsDev) {
this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDev));
}
private String getSql(Integer empresaId, String puntoVentas, String estados, Date dataVendaInicial, Date dataVendaFinal, Date dataDevolucaoInicial, Date dataDevolucaoFinal, Boolean isApenasBilhetesImpressos) {
StringBuilder sql = new StringBuilder();
sql.append("SELECT E.NOMBEMPRESA AS NOMB_EMPRESA, ");
sql.append(" E.EMPRESA_ID AS EMPRESA_ID, ");
sql.append(" PTV.NUMPUNTOVENTA AS NUMPUNTOVENTA, ");
sql.append(" PTV.NOMBPUNTOVENTA AS NOMBPUNTOVENTA, ");
sql.append(" bori.fechorventa AS fechor_venta, ");
sql.append(" b.fechorventa AS fechor_devolucao, ");
sql.append(" coalesce(b.numfoliosistema, b.numoperacion) AS numfoliosistema, ");
sql.append(" est.cveestado AS uf, ");
sql.append(" b.preciobase AS preciobase, ");
sql.append(" b.preciopagado AS preciopagado ");
sql.append("FROM BOLETO B ");
sql.append("INNER JOIN MARCA M ON M.MARCA_ID = B.MARCA_ID AND M.ACTIVO = 1 ");
sql.append("INNER JOIN EMPRESA E ON E.EMPRESA_ID = M.EMPRESA_ID ");
sql.append("INNER JOIN PUNTO_VENTA PTV ON PTV.PUNTOVENTA_ID = B.PUNTOVENTA_ID ");
sql.append("INNER JOIN PARADA ORI ON (B.ORIGEN_ID = ORI.PARADA_ID ) ");
sql.append("INNER JOIN PARADA DES ON (B.DESTINO_ID = DES.PARADA_ID ) ");
sql.append("INNER JOIN CIUDAD CO ON (CO.CIUDAD_ID = ORI.CIUDAD_ID ) ");
sql.append("INNER JOIN CIUDAD CD ON (CD.CIUDAD_ID = DES.CIUDAD_ID ) ");
sql.append("INNER JOIN ESTADO EST ON EST.ESTADO_ID = CO.ESTADO_ID ");
sql.append("LEFT JOIN BOLETO BORI ON BORI.BOLETO_ID = B.BOLETOORIGINAL_ID ");
sql.append("WHERE B.MOTIVOCANCELACION_ID IN (31,32,10,37,99,36) ");
sql.append("AND B.INDSTATUSBOLETO = 'C' ");
sql.append("AND B.INDCANCELACION = 1 ");
if(isApenasBilhetesImpressos) {
sql.append("AND B.NUMFOLIOPREIMPRESO IS NOT NULL ");
}
if(dataVendaInicial != null) {
sql.append("AND BORI.FECHORVENTA >= TO_DATE(:dataVendaInicial,'DD/MM/YYYY HH24:MI') ");
}
if(dataVendaFinal != null) {
sql.append("AND BORI.FECHORVENTA <= TO_DATE(:dataVendaFinal,'DD/MM/YYYY HH24:MI') ");
}
if(dataDevolucaoInicial != null) {
sql.append("AND B.FECHORVENTA >= TO_DATE(:dataDevolucaoInicial,'DD/MM/YYYY HH24:MI') ");
}
if(dataDevolucaoFinal != null) {
sql.append("AND B.FECHORVENTA <= TO_DATE(:dataDevolucaoFinal,'DD/MM/YYYY HH24:MI') ");
}
sql.append("AND B.CATEGORIA_ID NOT IN (SELECT VALORCONSTANTE FROM CONSTANTE WHERE NOMBCONSTANTE = 'GRATUIDADE_CRIANCA') ");
sql.append(estados == null ? "" : "AND EST.ESTADO_ID IN (" + estados + ") ");
sql.append(puntoVentas == null ? "" : "AND PTV.PUNTOVENTA_ID IN (" + puntoVentas + ") ");
sql.append(empresaId == null ? "" : "AND E.EMPRESA_ID IN (" + empresaId + ") ");
sql.append("ORDER BY NOMB_EMPRESA, FECHOR_VENTA ");
return sql.toString();
}
@Override
protected void processaParametros() throws Exception {
}
}

View File

@ -8,9 +8,6 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.rjconsultores.ventaboletos.entidad.Estado;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
@ -23,8 +20,6 @@ import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
public class RelatorioDevolucaoBilhetesFinanceiro extends Relatorio {
private static Logger log = LogManager.getLogger(RelatorioDevolucaoBilhetesFinanceiro.class);
public RelatorioDevolucaoBilhetesFinanceiro(Map<String, Object> parametros, Connection conexao) throws Exception {
super(parametros, conexao);
@ -64,7 +59,6 @@ public class RelatorioDevolucaoBilhetesFinanceiro extends Relatorio {
}
String sql = getSql(empresaId, puntoVentas, estados, dataVendaInicial, dataVendaFinal, dataDevolucaoInicial, dataDevolucaoFinal, isApenasBilhetesImpressos);
log.debug(sql);
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
ResultSet rset = null;
@ -91,7 +85,7 @@ public class RelatorioDevolucaoBilhetesFinanceiro extends Relatorio {
while (rset.next()) {
DevolucaoBilhetes db = new DevolucaoBilhetes();
db.setNumFolioSistema((String) rset.getObject("NUMFOLIOSISTEMA"));
db.setNumFolioSistema(rset.getString("NUMFOLIOSISTEMA"));
db.setFolio((String) rset.getObject("FOLIO"));
db.setFechorVenta((String) rset.getObject("FECHOR_VENTA"));
db.setFechorDevolucao((String) rset.getObject("FECHOR_DEVOLUCAO"));

View File

@ -0,0 +1,25 @@
#geral
msg.noData=Não foi possivel obter dados com os parâmetros informados.
#labels
label.titulo=Relatório de Devolução de Bilhetes Analítico
label.periodo=Período:
label.empresa=Empresa:
label.ate=até
label.de=de
label.filtros=Fitros:
label.uf=UF
label.aliquota=Alíquota
label.icms=ICMS
label.pagina=Página:
label.total=Total
label.qtdeBilhetes=Quantidade de Bilhetes
label.totalBilhete=Total Bilhete
label.numpuntoventa=Nº Agência
label.nombpuntoventa=Agência
label.periodoVenda=Data Venda:
label.periodoDevolucao=Data Devolução:
label.dataVenda=Venda
label.dataDevolucao=Devolução
label.dataHora=Emitido em:
label.impressorPor=Emitido Por:

View File

@ -0,0 +1,25 @@
#geral
msg.noData=Não foi possivel obter dados com os parâmetros informados.
#labels
label.titulo=Relatório de Devolução de Bilhetes Analítico
label.periodo=Período:
label.empresa=Empresa:
label.ate=até
label.de=de
label.filtros=Fitros:
label.uf=UF
label.valorDevolvido=Devolvido
label.multa=Multa
label.pagina=Página:
label.total=Total
label.bilhete=Bilhete
label.tarifa=Tarifa
label.numpuntoventa=Nº Agência
label.nombpuntoventa=Agência
label.periodoVenda=Data Venda:
label.periodoDevolucao=Data Devolução:
label.dataVenda=Venda
label.dataDevolucao=Devolução
label.dataHora=Emitido em:
label.impressorPor=Emitido Por:

View File

@ -0,0 +1,387 @@
<?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="RelatorioDevolucaoBilhetesAnalitico" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="efbc89d4-6f08-4ea5-802f-d4f48ed208e2">
<property name="ireport.zoom" value="1.5"/>
<property name="ireport.x" value="381"/>
<property name="ireport.y" value="0"/>
<style name="textStyle" isDefault="true" 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="EMPRESA" class="java.lang.String"/>
<parameter name="EMPRESA_ID" class="java.lang.Integer"/>
<parameter name="USUARIO" class="java.lang.String"/>
<parameter name="FILTROS" class="java.lang.String"/>
<parameter name="TIPO_DATA" class="java.lang.Integer"/>
<parameter name="dataVendaInicial" class="java.util.Date"/>
<parameter name="dataVendaFinal" class="java.util.Date"/>
<parameter name="dataDevolucaoInicial" class="java.util.Date"/>
<parameter name="dataDevolucaoFinal" class="java.util.Date"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="precioPagado" class="java.math.BigDecimal"/>
<field name="precioBase" class="java.math.BigDecimal"/>
<field name="uf" class="java.lang.String"/>
<field name="fecVenta" class="java.util.Date"/>
<field name="fecDevolucao" class="java.util.Date"/>
<field name="empresaId" class="java.lang.Integer"/>
<field name="empresa" class="java.lang.String"/>
<field name="numFolioSistema" class="java.lang.String"/>
<field name="numpuntoventa" class="java.lang.String"/>
<field name="nombpuntoventa" class="java.lang.String"/>
<variable name="totalTarifa" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[$F{precioBase}]]></variableExpression>
</variable>
<variable name="totalMulta" class="java.math.BigDecimal" resetType="Group" resetGroup="empresa" calculation="Sum">
<variableExpression><![CDATA[$V{totalTarifa}.subtract( $V{totalDevolvido} )]]></variableExpression>
</variable>
<variable name="totalDevolvido" class="java.math.BigDecimal" resetType="Group" resetGroup="empresa" calculation="Sum">
<variableExpression><![CDATA[$F{precioPagado}]]></variableExpression>
<initialValueExpression><![CDATA[]]></initialValueExpression>
</variable>
<group name="empresa">
<groupExpression><![CDATA[$F{empresaId}]]></groupExpression>
<groupHeader>
<band height="32">
<textField>
<reportElement uuid="3055dd3d-ea00-4d23-9a0d-7b86d4b4979f" x="68" y="0" width="734" height="14"/>
<textElement>
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{empresa}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="0b598d85-e93d-4916-b9a1-c80e694aabb6" mode="Transparent" x="661" y="14" width="70" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.multa}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="ed400846-62e0-4199-8c0d-c4b7741d934c" x="581" y="14" width="80" height="14"/>
<textElement textAlignment="Right" markup="none">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.tarifa}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="2b804e18-71b2-44b5-89c3-4393430c94f3" x="470" y="14" width="111" height="14"/>
<textElement textAlignment="Left" markup="none">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.bilhete}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="3aab51ae-d4cf-4b3d-9849-df02db28f2bf" x="3" y="14" width="65" height="14"/>
<textElement markup="none">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.numpuntoventa}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="6d369259-a204-48aa-979f-9db30aa5a2cf" x="333" y="14" width="74" height="14"/>
<textElement textAlignment="Left" markup="none">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.dataVenda}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="c0eec461-3a56-4f54-b356-0e529f0e879d" x="68" y="14" width="220" height="14"/>
<textElement markup="none">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.nombpuntoventa}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="054ec81f-2382-4603-8ddb-9cff1ed48014" stretchType="RelativeToTallestObject" mode="Transparent" x="2" y="0" width="66" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.empresa}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="69baea84-928e-4270-83ec-1e6263b3cc7a" x="288" y="14" width="45" height="14"/>
<textElement textAlignment="Left" markup="none">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.uf}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="f8c122f6-cc40-45f7-8908-c63f173c00cf" x="407" y="14" width="63" height="14"/>
<textElement textAlignment="Left" markup="none">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.dataDevolucao}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="4b7e1373-5077-4de9-87f9-4eb8cb1bdaa0" mode="Transparent" x="731" y="14" width="70" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.valorDevolvido}]]></textFieldExpression>
</textField>
</band>
</groupHeader>
<groupFooter>
<band height="3"/>
</groupFooter>
</group>
<background>
<band splitType="Stretch"/>
</background>
<pageHeader>
<band height="77" splitType="Stretch">
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="2ed4524d-5c06-487c-a8f1-abc59a8ef7fc" mode="Transparent" x="1" y="1" width="577" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.titulo}]]></textFieldExpression>
</textField>
<line>
<reportElement uuid="d9b398e6-2fe9-4a3d-bceb-f9db7a06e5a9" x="1" y="62" width="800" height="1"/>
</line>
<textField>
<reportElement uuid="11b7c338-166a-4149-b45c-b47698bd88ea" stretchType="RelativeToTallestObject" mode="Transparent" x="1" y="63" width="43" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.filtros}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="98fc1c7e-3fee-4c70-924f-2cbb17fd243f" stretchType="RelativeToTallestObject" x="46" y="63" width="756" height="14"/>
<textElement verticalAlignment="Top"/>
<textFieldExpression><![CDATA[$P{FILTROS}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="8739a50f-b960-40ca-99fd-7ce27e99b67b" mode="Transparent" x="145" y="32" width="19" height="14" forecolor="#000000" backcolor="#FFFFFF">
<printWhenExpression><![CDATA[$P{dataVendaFinal} != null]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.ate}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="b607cec5-59f9-4001-b474-9acab1a8e312" mode="Transparent" x="145" y="47" width="19" height="14" forecolor="#000000" backcolor="#FFFFFF">
<printWhenExpression><![CDATA[$P{dataDevolucaoFinal} != null]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.ate}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement uuid="fa9b40ac-d878-4e48-b543-05a015628a2d" mode="Transparent" x="94" y="32" width="51" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$P{dataVendaInicial}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="d7cb706d-350b-42f1-a830-87f304979d14" mode="Transparent" x="2" y="47" width="92" height="14" forecolor="#000000" backcolor="#FFFFFF">
<printWhenExpression><![CDATA[$P{dataDevolucaoInicial} != null || $P{dataDevolucaoFinal} != null]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.periodoDevolucao}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement uuid="7a551a18-43ac-4f60-9adb-d2b454743fce" mode="Transparent" x="164" y="47" width="51" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$P{dataDevolucaoFinal}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="a6998f76-2eaa-41ed-b996-ad064b3f603d" mode="Transparent" x="2" y="17" width="66" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.periodo}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="848a2eed-d6e3-498e-ab46-e4c397430382" mode="Transparent" x="2" y="32" width="92" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.periodoVenda}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement uuid="b4642581-8fc7-4a30-b100-67995f10d905" mode="Transparent" x="164" y="32" width="51" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$P{dataVendaFinal}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement uuid="211c536c-2d2e-40a1-9d33-0700c064db7c" mode="Transparent" x="94" y="47" width="51" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$P{dataDevolucaoInicial}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="d0446296-1d50-4558-92a4-34148b90576d" mode="Transparent" x="603" y="33" width="199" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.impressorPor}+" "+$P{USUARIO}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="88758926-3726-42c1-8aa5-32889c8a0d35" mode="Transparent" x="603" y="17" width="175" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.pagina}+" "+$V{PAGE_NUMBER}+" "+$R{label.de}+" "+$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="false">
<reportElement uuid="c4521e46-0f76-43a0-9008-49dd4327caf6" mode="Transparent" x="685" y="1" width="116" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" 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>
<reportElement uuid="c11c9c4a-b95e-4f81-8f4b-21ef9c6e7f48" x="603" y="1" width="82" height="15"/>
<textElement textAlignment="Right">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.dataHora}]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement uuid="8e2fe7e4-27b1-494b-942f-9681e515d5af" x="782" y="17" width="19" height="15"/>
<textElement/>
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<detail>
<band height="15">
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement uuid="b14dbaab-e9a1-4aae-a12c-6305da9d2f80" x="581" y="1" width="80" height="14"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{precioBase}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement uuid="a1bcec7c-0ca6-4f9f-a4c7-9757842b1b4f" x="470" y="1" width="111" height="14"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{numFolioSistema}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement uuid="6772d6a9-3611-4cb6-9c3b-f78dc3fb5dc0" x="661" y="1" width="70" height="14"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{precioBase}.subtract( $F{precioPagado} )]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="74a5a183-6fe2-4f22-8b51-b54197aa3582" x="1" y="0" width="67" height="14"/>
<textElement/>
<textFieldExpression><![CDATA[$F{numpuntoventa}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="ae351b20-bbe0-40f1-ae7e-590a10a8b3a2" x="68" y="0" width="220" height="14"/>
<textElement/>
<textFieldExpression><![CDATA[$F{nombpuntoventa}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy">
<reportElement uuid="c92216da-0d77-4711-94a4-b8b2d00465a3" x="333" y="0" width="74" height="14"/>
<textElement textAlignment="Left">
<font isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{fecVenta}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy">
<reportElement uuid="4a899f0d-e450-4c53-9a14-2410158b56f8" x="407" y="0" width="63" height="14"/>
<textElement textAlignment="Left">
<font isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{fecDevolucao}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="393cbf91-2a8a-4d78-8cf4-27d1e278b1f3" x="288" y="0" width="45" height="14"/>
<textElement textAlignment="Left">
<font isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{uf}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement uuid="2e695dbc-5d39-4bd1-a210-29e726b4cf12" x="731" y="1" width="70" height="14"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{precioPagado}]]></textFieldExpression>
</textField>
</band>
</detail>
<lastPageFooter>
<band/>
</lastPageFooter>
<summary>
<band height="16">
<textField>
<reportElement uuid="c57012f1-edf2-4505-86c8-693c38a8a0cf" stretchType="RelativeToTallestObject" x="1" y="1" width="67" height="14"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$R{label.total}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement uuid="5bb73e4d-a51b-4a04-bed0-8fa3eb7f8553" stretchType="RelativeToTallestObject" x="661" y="2" width="70" height="14"/>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$V{totalTarifa}.subtract( $V{totalDevolvido} )]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement uuid="7c3ce565-f549-48d2-815d-9b4d7a39b1ca" stretchType="RelativeToTallestObject" x="731" y="1" width="70" height="14"/>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$V{totalDevolvido}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement uuid="80bddbda-0eec-4839-9510-35800aa6d742" stretchType="RelativeToTallestObject" x="581" y="2" width="80" height="14"/>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$V{totalTarifa}]]></textFieldExpression>
</textField>
</band>
</summary>
<noData>
<band height="22">
<textField>
<reportElement uuid="a640c0eb-ead8-4a2a-bda4-675165e8bc7d" x="0" y="0" width="802" height="22"/>
<textElement markup="none">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
</textField>
</band>
</noData>
</jasperReport>

View File

@ -1,6 +1,7 @@
package com.rjconsultores.ventaboletos.relatorios.utilitarios;
import java.math.BigDecimal;
import java.util.Date;
public class DevolucaoBilhetes {
@ -27,6 +28,8 @@ public class DevolucaoBilhetes {
private BigDecimal porcredbaseicms;
private String fechorVenta;
private String fechorDevolucao;
private Date fecVenta;
private Date fecDevolucao;
private String numpuntoventa;
private String numpuntoventaOrigem;
private String nombpuntoventa;
@ -824,4 +827,20 @@ public class DevolucaoBilhetes {
this.pRedBC = pRedBC;
}
public Date getFecVenta() {
return fecVenta;
}
public void setFecVenta(Date fecVenta) {
this.fecVenta = fecVenta;
}
public Date getFecDevolucao() {
return fecDevolucao;
}
public void setFecDevolucao(Date fecDevolucao) {
this.fecDevolucao = fecDevolucao;
}
}

View File

@ -0,0 +1,163 @@
package com.rjconsultores.ventaboletos.web.gui.controladores.esquemaoperacional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
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.Paging;
import com.rjconsultores.ventaboletos.entidad.AliasServico;
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
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.paginacion.HibernateSearchObject;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderAliasServico;
@Controller("busquedaAliasClasseController")
@Scope("prototype")
public class BusquedaAliasClasseController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
@Autowired
private transient PagedListWrapper<AliasServico> plwAliasServico;
@Autowired
private ClaseServicioService claseServicioService;
@Autowired
private OrgaoConcedenteService orgaoConcedenteService;
private List<ClaseServicio> lsClasse;
private List<OrgaoConcedente> lsOrgaoConcedente;
private MyListbox aliasServicoList;
private Paging pagingAliasServico;
private MyComboboxEstandar cmbClasse;
private MyComboboxEstandar cmbAlias;
private MyComboboxEstandar cmbOrgaoConcedente;
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
lsClasse = claseServicioService.obtenerTodos();
lsOrgaoConcedente = orgaoConcedenteService.obtenerTodos();
/*
aliasServicoList.setItemRenderer(new RenderAliasServico());
aliasServicoList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
AliasServico as = (AliasServico) aliasServicoList.getSelected();
verAliasServico(as);
}
});
*/
refreshLista();
}
@SuppressWarnings({ "rawtypes", "unchecked" })
private void verAliasServico(AliasServico as) {
if (as == null) {
return;
}
Map args = new HashMap();
args.put("aliasServico", as);
args.put("aliasServicoList", aliasServicoList);
openWindow("/gui/esquema_operacional/editarAliasServico.zul",
Labels.getLabel("editarAliasServicoController.window.title"), args, MODAL);
}
private void refreshLista() {
/*
HibernateSearchObject<AliasServico> aliasServicoBusqueda =
new HibernateSearchObject<AliasServico>(AliasServico.class, pagingAliasServico.getPageSize());
aliasServicoBusqueda.addFilterEqual("activo", true);
aliasServicoBusqueda.addSortAsc("aliasServicoId");
plwAliasServico.init(aliasServicoBusqueda, aliasServicoList, pagingAliasServico);
if (aliasServicoList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaAutobusController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) {
}
}
*/
}
public void onClick$btnPesquisa(Event ev) {
refreshLista();
}
public void onClick$btnRefresh(Event ev) {
refreshLista();
}
public void onClick$btnNovo(Event ev) {
verAliasServico(new AliasServico());
}
public List<ClaseServicio> getLsClasse() {
return lsClasse;
}
public void setLsClasse(List<ClaseServicio> lsClasse) {
this.lsClasse = lsClasse;
}
public List<OrgaoConcedente> getLsOrgaoConcedente() {
return lsOrgaoConcedente;
}
public void setLsOrgaoConcedente(List<OrgaoConcedente> lsOrgaoConcedente) {
this.lsOrgaoConcedente = lsOrgaoConcedente;
}
public MyComboboxEstandar getCmbClasse() {
return cmbClasse;
}
public void setCmbClasse(MyComboboxEstandar cmbClasse) {
this.cmbClasse = cmbClasse;
}
public MyComboboxEstandar getCmbAlias() {
return cmbAlias;
}
public void setCmbAlias(MyComboboxEstandar cmbAlias) {
this.cmbAlias = cmbAlias;
}
public MyComboboxEstandar getCmbOrgaoConcedente() {
return cmbOrgaoConcedente;
}
public void setCmbOrgaoConcedente(MyComboboxEstandar cmbOrgaoConcedente) {
this.cmbOrgaoConcedente = cmbOrgaoConcedente;
}
}

View File

@ -33,6 +33,7 @@ import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.Estado;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioDevolucaoBilhetes;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioDevolucaoBilhetesAnalitico;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioDevolucaoBilhetesConsolidado;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioDevolucaoBilhetesFinanceiro;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
@ -55,6 +56,8 @@ import com.trg.search.Filter;
@Scope("prototype")
public class RelatorioDevolucaoBilhetesController extends MyGenericForwardComposer {
private static final String TITULO = "relatorioDevolucaoBilhetesAgenciaController.window.title";
private static final long serialVersionUID = 1L;
@Autowired
@ -84,6 +87,7 @@ public class RelatorioDevolucaoBilhetesController extends MyGenericForwardCompos
private Radio rFiscal;
private Radio rFinanceiro;
private Radio rConsolidado;
private Radio rAnalitico;
private Checkbox chkApenasBilhetesImpressos;
private boolean bpe;
@ -130,15 +134,19 @@ public class RelatorioDevolucaoBilhetesController extends MyGenericForwardCompos
if (this.datInicial.getValue() != null) {
parametros.put("dataVendaInicial", DateUtil.inicioFecha(this.datInicial.getValue()));
}
if (this.datFinal.getValue() != null) {
parametros.put("dataVendaFinal", DateUtil.fimFecha(this.datFinal.getValue()));
}
if (this.datDevolucaoInicial.getValue() != null) {
parametros.put("dataDevolucaoInicial", DateUtil.inicioFecha(this.datDevolucaoInicial.getValue()));
}
if (this.datDevolucaoFinal.getValue() != null) {
parametros.put("dataDevolucaoFinal", DateUtil.fimFecha(this.datDevolucaoFinal.getValue()));
}
if (chkApenasBilhetesImpressos.isChecked()) {
parametros.put("isApenasBilhetesImpressos", Boolean.TRUE);
}
@ -148,8 +156,8 @@ public class RelatorioDevolucaoBilhetesController extends MyGenericForwardCompos
parametros.put("isConsultaOtimizada", consultaOtimizada.isChecked());
boolean isPuntoVentaTodos = false;
filtro.append("Agência(s): ");
if (puntoVentaSelList.getListData().size() > 0) {
filtro.append("Agência: ");
if (!puntoVentaSelList.getListData().isEmpty()) {
List<PuntoVenta> puntoVentas = new ArrayList<PuntoVenta>();
for (Object obj : puntoVentaSelList.getListData()) {
puntoVentas.add((PuntoVenta) obj);
@ -168,13 +176,13 @@ public class RelatorioDevolucaoBilhetesController extends MyGenericForwardCompos
}
}
if (isPuntoVentaTodos || !(puntoVentaSelList.getListData().size() > 0)) {
if (isPuntoVentaTodos || !(puntoVentaSelList.getListData().isEmpty())) {
parametros.put("ISNUMPUNTOVENTATODOS", "S");
filtro.append("Todas");
}
filtro.append("; Estado(s): ");
if (estadoList.getSelectedsItens().size() > 0) {
filtro.append("; Estado: ");
if (!estadoList.getSelectedsItens().isEmpty()) {
parametros.put("ESTADOS", estadoList.getSelectedsItens());
StringBuilder sEstados = new StringBuilder();
for (Object estado : estadoList.getSelectedsItens()) {
@ -207,13 +215,15 @@ public class RelatorioDevolucaoBilhetesController extends MyGenericForwardCompos
relatorio = new RelatorioDevolucaoBilhetesFinanceiro(parametros, dataSourceRead.getConnection());
} else if (rConsolidado.isChecked()) {
relatorio = new RelatorioDevolucaoBilhetesConsolidado(parametros, dataSourceRead.getConnection());
}else if (rAnalitico.isChecked()) {
relatorio = new RelatorioDevolucaoBilhetesAnalitico(parametros, dataSourceRead.getConnection());
}
Map<String, Relatorio> args = new HashMap<String, Relatorio>();
args.put("relatorio", relatorio);
openWindow("/component/reportView.zul",
Labels.getLabel("relatorioDevolucaoBilhetesAgenciaController.window.title"), args, MODAL);
Labels.getLabel(TITULO), args, MODAL);
}
@Override
@ -239,21 +249,21 @@ public class RelatorioDevolucaoBilhetesController extends MyGenericForwardCompos
this.datDevolucaoInicial.getValue() == null &&
this.datDevolucaoFinal.getValue() == null) {
Messagebox.show(Labels.getLabel("relatorioDevolucaoBilhetesAgenciaController.msg.nenhumaDataInformada"),
Labels.getLabel("relatorioDevolucaoBilhetesAgenciaController.window.title"),
Labels.getLabel(TITULO),
Messagebox.OK, Messagebox.EXCLAMATION);
return;
}
if (!validarDatas(this.datInicial.getValue(), this.datFinal.getValue())) {
Messagebox.show(Labels.getLabel("relatorioDevolucaoBilhetesAgenciaController.msg.dataInicialFinal"),
Labels.getLabel("relatorioDevolucaoBilhetesAgenciaController.window.title"),
Labels.getLabel(TITULO),
Messagebox.OK, Messagebox.EXCLAMATION);
return;
}
if (!validarDatas(this.datDevolucaoInicial.getValue(), this.datDevolucaoFinal.getValue())) {
Messagebox.show(Labels.getLabel("relatorioDevolucaoBilhetesAgenciaController.msg.dataInicialFinal"),
Labels.getLabel("relatorioDevolucaoBilhetesAgenciaController.window.title"),
Labels.getLabel(TITULO),
Messagebox.OK, Messagebox.EXCLAMATION);
return;
}

View File

@ -133,6 +133,9 @@ public class MenuFactoryPropertiesImpl implements MenuFactory {
String linea = null;
while((linea = menuReader.readLine()) != null){
if(linea.startsWith("#")) {
continue;
}
No no = new No(linea);
if (no.getNivel() == 1){
@ -264,7 +267,7 @@ public class MenuFactoryPropertiesImpl implements MenuFactory {
String path;
public No(String linea){
hijos = new ArrayList<No>();;
hijos = new ArrayList<No>();
String[] arrayLinea = linea.split("=");
path=arrayLinea[0];

View File

@ -0,0 +1,25 @@
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional;
import org.zkoss.util.resource.Labels;
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
public class ItemMenuAliasClasse extends DefaultItemMenuSistema {
public ItemMenuAliasClasse() {
super("indexController.mniAliasClasse.label");
}
@Override
public String getClaveMenu() {
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.ESQUEMAOPERACIONAL.MENU.ALIASCLASSE";
}
@Override
public void ejecutar() {
PantallaUtileria.openWindow("/gui/esquema_operacional/busquedaAliasClasse.zul",
Labels.getLabel("busquedaAliasClasseController.window.title"), getArgs() ,desktop);
}
}

View File

@ -77,6 +77,7 @@ esquemaOperacional.tipoParadas=com.rjconsultores.ventaboletos.web.utilerias.menu
esquemaOperacional.paradas=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemMenuEsquemaOperacionalParadas
esquemaOperacional.agruparLocalidade=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemMenuEsquemaOperacionalAgruparLocalidade
esquemaOperacional.aliasservico=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemMenuAliasServico
esquemaOperacional.aliasclasse=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemMenuAliasClasse
esquemaOperacional.autobus=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemMenuAutobus
esquemaOperacional.diagramaAutobus=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemMenuDiagramaAutobus
esquemaOperacional.rolOperativo=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemMenuRolOperativo
@ -210,7 +211,12 @@ analitico.gerenciais.estatisticos.relatorioVendaEmbarcada=com.rjconsultores.vent
analitico.gerenciais.estatisticos.movimentacaobilhete=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioMovimentacaoBilhete
analitico.gerenciais.estatisticos.encerramentocheckin=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioEncerramentoCheckin
analitico.gerenciais.estatisticos.mmphDERPR=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioMmphDer
#------------------------------RELATORIOS FINANCEIROS-----------------------------------------------------------------------------------------------------------------------------------------------
analitico.gerenciais.financeiro=com.rjconsultores.ventaboletos.web.utilerias.menu.item.analitico.gerenciais.financeiro.SubMenuRelatorioFinanceiro
analitico.gerenciais.financeiro.aproveitamentoFinanceiro=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioAproveitamentoFinanceiro
analitico.gerenciais.financeiro.devolucaoBilhetes=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioDevolucaoBilhetes
analitico.gerenciais.financeiro.bilhetesVendidos=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioBilhetesVendidos
analitico.gerenciais.financeiro.relatorioOperacionalFinanceiro=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioCaixaOrgaoConcedente
analitico.gerenciais.financeiro.receitaDiariaAgencia=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioReceitaDiariaAgencia
analitico.gerenciais.financeiro.RelatorioComissao=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioComissao
analitico.gerenciais.financeiro.taxas=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioTaxasLinha
@ -225,8 +231,6 @@ analitico.gerenciais.financeiro.vendasCartoes=com.rjconsultores.ventaboletos.web
analitico.gerenciais.financeiro.j3=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioCancelamentoTransacao
analitico.gerenciais.financeiro.descontos=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioDescontos
analitico.gerenciais.financeiro.vendasComissao=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendasComissao
analitico.gerenciais.financeiro.bilhetesVendidos=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioBilhetesVendidos
analitico.gerenciais.financeiro.devolucaoBilhetes=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioDevolucaoBilhetes
analitico.gerenciais.financeiro.movimentosAtraso=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioMovimentosAtraso
analitico.gerenciais.financeiro.relatorioOperacionalFinanceiro=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioOperacionalFinanceiro
analitico.gerenciais.financeiro.conferenciaMovimento=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioObservacaoConferenciaMovimento
@ -247,8 +251,6 @@ analitico.gerenciais.financeiro.relatorioDocumentosFiscais=com.rjconsultores.ven
analitico.gerenciais.financeiro.relatorioVendasPercurso=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendasPercurso
analitico.gerenciais.financeiro.vendasConexao=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendasConexao
analitico.gerenciais.financeiro.vendasRequisicao=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendasRequisicao
analitico.gerenciais.financeiro.aproveitamentoFinanceiro=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioAproveitamentoFinanceiro
analitico.gerenciais.financeiro.relatorioOperacionalFinanceiro=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioCaixaOrgaoConcedente
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

View File

@ -10,8 +10,6 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.rjconsultores.ventaboletos.web.utilerias.security.SecurityEmpresaToken;
public class SecurityEmpresaTokenTest {
private static final Logger log = LogManager.getLogger(SecurityEmpresaTokenTest.class);
@ -49,7 +47,7 @@ public class SecurityEmpresaTokenTest {
//
// if (!valid) fail("Licença inválida");
// }
/*
@Test
public void test_EmpresaNova() throws Exception {
// license request -> token request -> token response -> license
@ -114,4 +112,5 @@ public class SecurityEmpresaTokenTest {
if (valid) fail("Licença válida");
}
*/
}

View File

@ -0,0 +1,88 @@
<?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="winBusquedaAliasClasse"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winBusquedaAliasClasse"
title="${c:l('busquedaAliasClasseController.window.title')}"
apply="${busquedaAliasClasseController}" contentStyle="overflow:auto"
height="500px" width="1100px" border="normal">
<toolbar>
<button id="btnRefresh" image="/gui/img/refresh.png"
width="35px"
tooltiptext="${c:l('tooltiptext.btnActualizar')}" />
<separator orient="vertical" />
<button id="btnNovo" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('tooltiptext.btnNuevo')}" />
<separator orient="vertical" />
<button id="btnCerrar"
onClick="winBusquedaAliasClasse.detach()" image="/gui/img/exit.png"
width="35px"
tooltiptext="${c:l('tooltiptext.btnFechar')}" />
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="15%" />
<column width="85%" />
</columns>
<rows>
<row>
<label value="${c:l('busquedaAliasClasseController.lhClaseservicio.label')}"/>
<combobox id="cmbClasse" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
model="@{winBusquedaAliasClasseController$composer.lsClasse}"
mold="rounded" buttonVisible="true" width="90%" />
</row>
<row>
<label value="${c:l('busquedaAliasClasseController.lhClaseservicio.label')}"/>
<combobox id="cmbAlias" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
model="@{winBusquedaAliasClasseController.lsClasse}"
mold="rounded" buttonVisible="true" width="90%"/>
</row>
<row>
<label value="${c:l('editarEmpresaController.lblOrgaoConcedenteIntegracao.value')}" />
<combobox id="cmbOrgaoConcedente" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
model="@{winBusquedaAliasClasseController.lsOrgaoConcedente}"
mold="rounded" buttonVisible="true" width="90%" />
</row>
</rows>
</grid>
<toolbar>
<button id="btnPesquisa" image="/gui/img/find.png"
label="${c:l('lb.btnPesquisa.label')}" />
</toolbar>
<paging id="pagingAliasClasse" pageSize="15" />
<listbox id="aliasClasseList"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
multiple="false">
<listhead sizable="true">
<listheader width="5%" image="/gui/img/builder.gif"
label="${c:l('busquedaAliasClasseController.lhId.label')}"
sort="auto(aliasClasseId)" />
<listheader image="/gui/img/builder.gif"
label="${c:l('busquedaAliasClasseController.lhOrigen.label')}"
sort="auto(origen.descparada)" />
<listheader image="/gui/img/builder.gif"
label="${c:l('busquedaAliasClasseController.lbDestino.label')}"
sort="auto(destino.descparada)" />
<listheader image="/gui/img/builder.gif"
label="${c:l('busquedaAliasClasseController.lbRuta.label')}"
sort="auto(ruta.descruta)" />
<listheader image="/gui/img/builder.gif"
label="${c:l('busquedaAliasClasseController.lbCorrida.label')}"
sort="auto(corrida.id.corridaId)" />
<listheader image="/gui/img/builder.gif"
label="${c:l('busquedaAliasClasseController.lhAliasOrigen.label')}"
sort="auto(aliasOrigen.descparada)" />
<listheader image="/gui/img/builder.gif"
label="${c:l('busquedaAliasClasseController.lbAliasDestino.label')}"
sort="auto(aliasDestino.descparada)" />
</listhead>
</listbox>
</window>
</zk>

View File

@ -0,0 +1,54 @@
<?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="winEditarAliasServico"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winEditarAliasClasse" border="normal"
apply="${editarAliasClasseController}" width="500px"
contentStyle="overflow:auto"
title="${c:l('editarAliasClasseController.window.title')}">
<toolbar>
<button id="btnRefresh" image="/gui/img/refresh.png"
width="35px"
tooltiptext="${c:l('tooltiptext.btnActualizar')}" />
<separator orient="vertical" />
<button id="btnNovo" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('tooltiptext.btnNuevo')}" />
<separator orient="vertical" />
<button id="btnCerrar"
onClick="winEditarAliasClasse.detach()" image="/gui/img/exit.png"
width="35px"
tooltiptext="${c:l('tooltiptext.btnFechar')}" />
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="20%" />
<column width="80%" />
</columns>
<rows>
<row>
<label value="${c:l('busquedaAliasClasseController.lhClaseservicio.label')}"/>
<combobox id="cmbClasse" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
model="@{editarAliasClasseController$composer.lsClasse}"
constraint="no empty" mold="rounded" buttonVisible="true" width="90%" />
</row>
<row>
<label value="${c:l('busquedaAliasClasseController.lhClaseservicio.label')}"/>
<combobox id="cmbAlias" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
model="@{editarAliasClasseController.lsClasse}"
constraint="no empty" mold="rounded" buttonVisible="true" width="90%"/>
</row>
<row>
<label value="${c:l('editarEmpresaController.lblOrgaoConcedenteIntegracao.value')}" />
<combobox id="cmbOrgaoConcedente" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
model="@{editarAliasClasseController.lsOrgaoConcedente}"
constraint="no empty" mold="rounded" buttonVisible="true" width="90%" />
</row>
</rows>
</grid>
</window>
</zk>

View File

@ -129,6 +129,8 @@
label="${c:l('relatorioDevolucaoBilhetesAgenciaController.tipo.lbFinanceiro')}" />
<radio id="rConsolidado"
label="${c:l('relatorioDevolucaoBilhetesAgenciaController.tipo.lbConsolidado')}" />
<radio id="rAnalitico"
label="${c:l('relatorioDevolucaoBilhetesAgenciaController.tipo.lbAnalitico')}" />
</radiogroup>
</row>