fixes bug #7191
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@53802 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
09183ef1ce
commit
957b0b2f48
|
@ -0,0 +1,117 @@
|
|||
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
|
||||
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioGratuidadeIdosoDeficienteBean;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||
|
||||
public class RelatorioGratuidadeIdosoDeficiente extends Relatorio {
|
||||
|
||||
private List<RelatorioGratuidadeIdosoDeficienteBean> lsDadosRelatorio;
|
||||
|
||||
public RelatorioGratuidadeIdosoDeficiente(Map<String, Object> parametros, Connection conexao) throws Exception {
|
||||
super(parametros, conexao);
|
||||
|
||||
this.setCustomDataSource(new DataSource(this) {
|
||||
@Override
|
||||
public void initDados() throws Exception {
|
||||
|
||||
Connection conexao = this.relatorio.getConexao();
|
||||
|
||||
Map<String, Object> parametros = this.relatorio.getParametros();
|
||||
|
||||
String fecha = parametros.get("fecha").toString();
|
||||
String categoriaId = parametros.get("categoria") != null ? parametros.get("categoria").toString() : "";
|
||||
|
||||
String sql = getSql(categoriaId, fecha);
|
||||
|
||||
System.out.println(sql);
|
||||
|
||||
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
|
||||
stmt.setString("fecha", fecha);
|
||||
if (categoriaId != null && !categoriaId.equals("")){
|
||||
stmt.setInt("categoriaId", Integer.parseInt(categoriaId));
|
||||
}
|
||||
|
||||
ResultSet rset = null;
|
||||
|
||||
rset = stmt.executeQuery();
|
||||
|
||||
lsDadosRelatorio = new ArrayList<RelatorioGratuidadeIdosoDeficienteBean>();
|
||||
|
||||
while (rset.next()) {
|
||||
RelatorioGratuidadeIdosoDeficienteBean gratuidadeBean = new RelatorioGratuidadeIdosoDeficienteBean();
|
||||
gratuidadeBean.setDescnumdoc(rset.getString(4));
|
||||
gratuidadeBean.setDescorgaodoc(rset.getString(2));
|
||||
gratuidadeBean.setDesctipodoc(rset.getString(3));
|
||||
gratuidadeBean.setDestino(rset.getString(8));
|
||||
gratuidadeBean.setFeccorrida(rset.getDate(6));
|
||||
gratuidadeBean.setNombpasajero(rset.getString(1));
|
||||
gratuidadeBean.setNumfoliosistema(rset.getString(5));
|
||||
gratuidadeBean.setOrigen(rset.getString(7));
|
||||
gratuidadeBean.setPrecio(rset.getBigDecimal(9));
|
||||
lsDadosRelatorio.add(gratuidadeBean);
|
||||
}
|
||||
|
||||
if (lsDadosRelatorio.size() > 0) {
|
||||
setLsDadosRelatorio(lsDadosRelatorio);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setLsDadosRelatorio(List<RelatorioGratuidadeIdosoDeficienteBean> lsDadosRelatorio) {
|
||||
this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio));
|
||||
this.lsDadosRelatorio = lsDadosRelatorio;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void processaParametros() throws Exception {
|
||||
}
|
||||
|
||||
private String getSql(String categoriaId, String fecha) {
|
||||
StringBuffer sql = new StringBuffer();
|
||||
sql.append("select distinct ");
|
||||
sql.append(" b.nombpasajero, ");
|
||||
sql.append(" b.descorgaodoc, ");
|
||||
sql.append(" b.desctipodoc, ");
|
||||
sql.append(" b.descnumdoc, ");
|
||||
sql.append(" b.numfoliosistema, ");
|
||||
sql.append(" b.feccorrida, ");
|
||||
sql.append(" o.descparada, ");
|
||||
sql.append(" d.descparada, ");
|
||||
sql.append(" t.precio ");
|
||||
sql.append("from ");
|
||||
sql.append(" boleto b ");
|
||||
sql.append(" join categoria c on c.categoria_id = b.categoria_id ");
|
||||
sql.append(" join parada o on o.parada_id = b.origen_id ");
|
||||
sql.append(" join parada d on d.parada_id = b.destino_id ");
|
||||
sql.append(" join tarifa t on t.origen_id = b.origen_id ");
|
||||
sql.append(" and t.destino_id = b.destino_id ");
|
||||
sql.append(" and t.ruta_id = b.ruta_id ");
|
||||
sql.append(" and t.claseservicio_id = b.claseservicio_id ");
|
||||
sql.append(" and t.marca_id = b.marca_id ");
|
||||
sql.append(" join vigencia_tarifa vt on vt.vigenciatarifa_id = t.vigenciatarifa_id ");
|
||||
sql.append(" and b.fechorviaje between vt.feciniciovigencia and vt.fecfinvigencia ");
|
||||
sql.append("where ");
|
||||
if (!categoriaId.isEmpty()){
|
||||
sql.append(" c.categoria_id = :categoriaId ");
|
||||
}
|
||||
if (!fecha.isEmpty()){
|
||||
sql.append("AND to_char(b.feccorrida, 'MM/YYYY') = :fecha ");
|
||||
}
|
||||
sql.append(" and b.motivocancelacion_id is not null ");
|
||||
sql.append(" and b.activo <> 0 ");
|
||||
sql.append("order by b.feccorrida, b.nombpasajero");
|
||||
|
||||
return sql.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
#geral
|
||||
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||
msg.a=à
|
||||
|
||||
#Labels header
|
||||
header.periodo=Período:
|
||||
header.data.hora=Data/Hora\:
|
||||
header.pagina=P\u00E1gina\:
|
||||
header.filtro=Filtro\:
|
||||
header.filtro.servico=Servi\u00E7o\:
|
||||
header.filtro.linha=Linha\:
|
||||
header.filtro.grupo=Grupo de Linhas\:
|
||||
|
||||
#Labels detail
|
||||
|
||||
detail.nombpasajero=Nome Beneficiário
|
||||
detail.numfoliosistema=Nª Passe
|
||||
detail.descnumdoc=Doc. Ident.
|
||||
detail.descorgaodoc=Orgão Exp.
|
||||
detail.feccorrida=Data Viagem
|
||||
detail.origen=Local Embarque
|
||||
detail.destino=Local Desemb.
|
||||
detail.precio=Valor Passagem
|
||||
detail.numautorizacao=Nº Aut.
|
||||
|
||||
linhas=Linhas
|
||||
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
#geral
|
||||
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||
msg.a=à
|
||||
|
||||
#Labels header
|
||||
header.periodo=Período:
|
||||
header.data.hora=Data/Hora\:
|
||||
header.pagina=P\u00E1gina\:
|
||||
header.filtro=Filtro\:
|
||||
header.filtro.servico=Servi\u00E7o\:
|
||||
header.filtro.linha=Linha\:
|
||||
header.filtro.grupo=Grupo de Linhas\:
|
||||
|
||||
#Labels detail
|
||||
|
||||
detail.nombpasajero=Nome Beneficiário
|
||||
detail.numfoliosistema=Nª Passe
|
||||
detail.descnumdoc=Doc. Ident.
|
||||
detail.descorgaodoc=Orgão Exp.
|
||||
detail.feccorrida=Data Viagem
|
||||
detail.origen=Local Embarque
|
||||
detail.destino=Local Desemb.
|
||||
detail.precio=Valor Passagem
|
||||
detail.numautorizacao=Nº Aut.
|
||||
|
||||
linhas=Linhas
|
||||
|
||||
|
Binary file not shown.
|
@ -0,0 +1,201 @@
|
|||
<?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="RelatorioEmpresaCorrida" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" resourceBundle="RelatorioEmpresaCorrida" whenResourceMissingType="Empty" uuid="94834362-0ecc-46da-b0a2-5cdee355da3e">
|
||||
<property name="ireport.zoom" value="1.5"/>
|
||||
<property name="ireport.x" value="0"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<parameter name="fecha" class="java.lang.String">
|
||||
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
|
||||
</parameter>
|
||||
<parameter name="NOMBEMPRESA" class="java.lang.String"/>
|
||||
<parameter name="USUARIO_ID" class="java.lang.String"/>
|
||||
<parameter name="LINHA_FILTRO" class="java.lang.String"/>
|
||||
<parameter name="SERVICO_FILTRO" class="java.lang.String"/>
|
||||
<parameter name="TITULO" class="java.lang.String"/>
|
||||
<queryString>
|
||||
<![CDATA[]]>
|
||||
</queryString>
|
||||
<field name="nombpasajero" class="java.lang.String"/>
|
||||
<field name="descorgaodoc" class="java.lang.String"/>
|
||||
<field name="desctipodoc" class="java.lang.String"/>
|
||||
<field name="descnumdoc" class="java.lang.String"/>
|
||||
<field name="numfoliosistema" class="java.lang.String"/>
|
||||
<field name="feccorrida" class="java.util.Date"/>
|
||||
<field name="origen" class="java.lang.String"/>
|
||||
<field name="destino" class="java.lang.String"/>
|
||||
<field name="precio" class="java.math.BigDecimal"/>
|
||||
<field name="numautorizacao" class="java.lang.String"/>
|
||||
<background>
|
||||
<band splitType="Stretch"/>
|
||||
</background>
|
||||
<pageHeader>
|
||||
<band height="71" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement uuid="e5d4714c-07cc-42ff-a7a8-76d6f6d3e716" x="0" y="20" width="49" height="20"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$R{header.periodo}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="66b2d0f6-2bf1-4bc7-9ec0-a34444e04d60" x="648" y="0" width="56" height="20"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$R{header.data.hora}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField evaluationTime="Report">
|
||||
<reportElement uuid="8ca68351-fc00-4f19-b94f-f2fd1f41964f" x="780" y="20" width="22" height="20"/>
|
||||
<textElement textAlignment="Right"/>
|
||||
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="be1692e9-f130-4d08-9173-6ca3e4699030" x="714" y="20" width="42" height="20"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$R{header.pagina}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="4914d9e7-6ce8-4512-b1f8-13f3b572ac50" x="49" y="20" width="182" height="20"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$P{fecha}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="652312bd-292a-424d-a234-5f157e3699c6" x="0" y="0" width="231" height="20"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$P{TITULO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="dd/MM/yyyy HH:mm">
|
||||
<reportElement uuid="6f671365-868e-41a6-81ee-a308d1d91e1d" x="704" y="0" width="98" height="20"/>
|
||||
<textElement textAlignment="Left"/>
|
||||
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="7548d623-fb6c-48d4-b8b7-504f5437a79a" x="756" y="20" width="24" height="20"/>
|
||||
<textElement textAlignment="Right"/>
|
||||
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}+" de"]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="d08e6683-5388-4505-9e47-fc3d501c62b9" x="0" y="55" width="133" height="16"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$R{detail.nombpasajero}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="2c09f3ff-c554-4ce2-886e-eaab93fa15eb" x="133" y="55" width="68" height="16"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$R{detail.numfoliosistema}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="e18edb89-17f4-417e-8041-664f11245cbd" x="201" y="55" width="69" height="16"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$R{detail.descnumdoc}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="6124e4be-a471-4867-86f5-bb635ce5db7f" x="270" y="55" width="73" height="16"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$R{detail.descorgaodoc}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="67851ba5-cc9c-4f37-8857-9e3c5be9b362" x="413" y="55" width="73" height="16"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$R{detail.feccorrida}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="93fedb4f-18e2-4d95-82e8-2108d3eb135c" x="486" y="55" width="121" height="16"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$R{detail.origen}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="3de0b54a-0b10-4556-9b0a-ba8f19989716" x="607" y="55" width="118" height="16"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$R{detail.destino}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="cc834009-ae90-46d4-8bbb-37578b69f621" x="725" y="55" width="75" height="16"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$R{detail.precio}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement uuid="e4c97cb7-0fb6-49e9-9ad0-172a0f6a2de3" x="343" y="55" width="70" height="16"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$R{detail.numautorizacao}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</pageHeader>
|
||||
<columnHeader>
|
||||
<band splitType="Stretch"/>
|
||||
</columnHeader>
|
||||
<detail>
|
||||
<band height="17" splitType="Stretch">
|
||||
<line>
|
||||
<reportElement uuid="8e2d6686-e4d7-43d5-b3a9-46adc3e58350" x="1" y="0" width="802" height="1"/>
|
||||
</line>
|
||||
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||
<reportElement uuid="9f731da4-307a-4409-a8d5-28b2c4c40fce" x="0" y="1" width="133" height="16"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{nombpasajero}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||
<reportElement uuid="b36dbddb-2fa9-48a5-809e-0e15ad54c529" x="133" y="0" width="68" height="16"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{numfoliosistema}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement uuid="3343aea7-212b-4bd5-a29c-8dcab3cb7568" x="201" y="0" width="69" height="16"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{descnumdoc}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement uuid="c29b2244-5b3e-48a2-9adf-8e10ee2a3856" x="270" y="0" width="73" height="16"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{descorgaodoc}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||
<reportElement uuid="cee727cd-cbc7-41d0-8020-d70aa33d8c9f" x="413" y="0" width="73" height="16"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{feccorrida}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement uuid="3111776a-f727-4313-841c-55dabd804df4" x="486" y="0" width="121" height="16"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{origen}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="HH:mm:ss" isBlankWhenNull="true">
|
||||
<reportElement uuid="4a68f71a-7be1-467a-b3eb-641a0c1f9a48" x="607" y="0" width="118" height="16"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{destino}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="¤ #,##0.00" isBlankWhenNull="true">
|
||||
<reportElement uuid="6cc780bc-645e-4f03-a7d0-b4ecf7d4eb6c" x="725" y="0" width="75" height="16"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{precio}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||
<reportElement uuid="2006a794-f4c8-42af-94e6-b453f10483d3" x="343" y="0" width="70" height="16"/>
|
||||
<textElement textAlignment="Left">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{numautorizacao}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</detail>
|
||||
<noData>
|
||||
<band height="20">
|
||||
<textField>
|
||||
<reportElement uuid="5a6c1b7b-2242-4cf1-b957-723b906ee620" x="0" y="0" width="803" height="20"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</noData>
|
||||
</jasperReport>
|
|
@ -0,0 +1,78 @@
|
|||
package com.rjconsultores.ventaboletos.relatorios.utilitarios;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class RelatorioGratuidadeIdosoDeficienteBean {
|
||||
private String nombpasajero;
|
||||
private String descorgaodoc;
|
||||
private String desctipodoc;
|
||||
private String descnumdoc;
|
||||
private String numfoliosistema;
|
||||
private String numautorizacao;
|
||||
private Date feccorrida;
|
||||
private String origen;
|
||||
private String destino;
|
||||
private BigDecimal precio;
|
||||
|
||||
public String getNombpasajero() {
|
||||
return nombpasajero;
|
||||
}
|
||||
public void setNombpasajero(String nombpasajero) {
|
||||
this.nombpasajero = nombpasajero;
|
||||
}
|
||||
public String getDescorgaodoc() {
|
||||
return descorgaodoc;
|
||||
}
|
||||
public void setDescorgaodoc(String descorgaodoc) {
|
||||
this.descorgaodoc = descorgaodoc;
|
||||
}
|
||||
public String getDesctipodoc() {
|
||||
return desctipodoc;
|
||||
}
|
||||
public void setDesctipodoc(String desctipodoc) {
|
||||
this.desctipodoc = desctipodoc;
|
||||
}
|
||||
public String getDescnumdoc() {
|
||||
return descnumdoc;
|
||||
}
|
||||
public void setDescnumdoc(String descnumdoc) {
|
||||
this.descnumdoc = descnumdoc;
|
||||
}
|
||||
public String getNumfoliosistema() {
|
||||
return numfoliosistema;
|
||||
}
|
||||
public void setNumfoliosistema(String numfoliosistema) {
|
||||
this.numfoliosistema = numfoliosistema;
|
||||
}
|
||||
public Date getFeccorrida() {
|
||||
return feccorrida;
|
||||
}
|
||||
public void setFeccorrida(Date feccorrida) {
|
||||
this.feccorrida = feccorrida;
|
||||
}
|
||||
public String getOrigen() {
|
||||
return origen;
|
||||
}
|
||||
public void setOrigen(String origen) {
|
||||
this.origen = origen;
|
||||
}
|
||||
public String getDestino() {
|
||||
return destino;
|
||||
}
|
||||
public void setDestino(String destino) {
|
||||
this.destino = destino;
|
||||
}
|
||||
public BigDecimal getPrecio() {
|
||||
return precio;
|
||||
}
|
||||
public void setPrecio(BigDecimal precio) {
|
||||
this.precio = precio;
|
||||
}
|
||||
public String getNumautorizacao() {
|
||||
return numautorizacao;
|
||||
}
|
||||
public void setNumautorizacao(String numautorizacao) {
|
||||
this.numautorizacao = numautorizacao;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
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.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Datebox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioGratuidadeIdosoDeficiente;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.service.CategoriaService;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
|
||||
@Controller("relatorioGratuidadeIdosoDeficienteController")
|
||||
@Scope("prototype")
|
||||
public class RelatorioGratuidadeIdosoDeficienteController extends MyGenericForwardComposer {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static Logger log = Logger.getLogger(RelatorioGratuidadeIdosoDeficienteController.class);
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
@Autowired
|
||||
private CategoriaService categoriaService;
|
||||
|
||||
private Datebox data;
|
||||
private MyComboboxEstandar cmbCategoria;
|
||||
|
||||
private List<Categoria> lsCategorias;
|
||||
|
||||
private void executarRelatorio() throws Exception {
|
||||
|
||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("MM/yyyy");
|
||||
parametros.put("fecha", sdf.format(this.data.getValue()));
|
||||
|
||||
if (cmbCategoria.getSelectedIndex() != -1) {
|
||||
parametros.put("categoria", ((Categoria) cmbCategoria.getSelectedItem().getValue()).getCategoriaId());
|
||||
}
|
||||
|
||||
parametros.put("TITULO", Labels.getLabel("relatorioGratuidadeIdosoDeficienteController.window.title"));
|
||||
|
||||
Relatorio relatorio = new RelatorioGratuidadeIdosoDeficiente(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("relatorio", relatorio);
|
||||
|
||||
openWindow("/component/reportView.zul",
|
||||
Labels.getLabel("relatorioGratuidadeIdosoDeficienteController.window.title"), args, MODAL);
|
||||
|
||||
}
|
||||
|
||||
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
|
||||
executarRelatorio();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
lsCategorias = categoriaService.obtenerTodos();
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
}
|
||||
|
||||
public List<Categoria> getLsCategorias() {
|
||||
return lsCategorias;
|
||||
}
|
||||
|
||||
public void setLsCategorias(List<Categoria> lsCategorias) {
|
||||
this.lsCategorias = lsCategorias;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios;
|
||||
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||
|
||||
public class ItemMenuRelatorioGratuidadeIdosoDeficiente extends DefaultItemMenuSistema {
|
||||
|
||||
public ItemMenuRelatorioGratuidadeIdosoDeficiente() {
|
||||
super("indexController.mniRelatorioGratuidadeIdosoDeficiente.label");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClaveMenu() {
|
||||
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOGRATUIDADEIDOSODEFICIENTE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ejecutar() {
|
||||
PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioGratuidadeIdosoDeficiente.zul",
|
||||
Labels.getLabel("indexController.mniRelatorioGratuidadeIdosoDeficiente.label"), getArgs(), desktop);
|
||||
}
|
||||
}
|
|
@ -240,6 +240,7 @@ indexController.mniRelatorioEmpresaCorrida.label = Reporte de la empresa corrida
|
|||
indexController.mniRelatorioEmpresaOnibus.label = Reporte de la empresa autobús
|
||||
indexController.mniRelatorioOCD.label = Reporte OCD por la empresa
|
||||
indexController.mniRelatorioGratuidade.label = Reporte Gratuidade
|
||||
indexController.mniRelatorioGratuidadeIdosoDeficiente.label = Reporte Gratuidade Idoso/Deficiente
|
||||
indexController.mniRelatorioVendasBilheteiro.label = Reporte de Ventas por Agente de Billetes
|
||||
indexController.mniRelatorioAgenciasNaoImportadas.label = Reporte Puntos Venta no Importados
|
||||
indexController.mniRelatorioCheckin.label = Reporte de Checkin's
|
||||
|
@ -282,6 +283,8 @@ indexController.mniRelatorioDescontos.label = Reporte Descuentos
|
|||
indexController.mniRelatorioDepositos.label=Cierre Cnt Contábil / Depósitos
|
||||
indexController.mniRelatorioDepositosDetalhados.label=Depósitos Detallados
|
||||
|
||||
indexController.mniRelatorioGratuidadeIdosoDeficiente.label = Relatório Gratuidade Idoso/Deficiente
|
||||
|
||||
#PARTE REALIZADA POR MANUEL
|
||||
indexController.mnCortesias.label = Cortesias para empleados
|
||||
indexController.mniTipoCortesiaD.label = Descuento por tipo de cortesia
|
||||
|
@ -6203,4 +6206,9 @@ relatorioObservacaoConferenciaMovimentoController.btnPesquisa.label = Búsqueda
|
|||
relatorioObservacaoConferenciaMovimentoController.lbDataIni.value = Fecha Inicio
|
||||
relatorioObservacaoConferenciaMovimentoController.lbDataFin.value = Fecha Final
|
||||
relatorioObservacaoConferenciaMovimentoController.lbEmpresa.value = Empresa
|
||||
relatorioObservacaoConferenciaMovimentoController.lbPuntoVenta.value = Punto venta
|
||||
relatorioObservacaoConferenciaMovimentoController.lbPuntoVenta.value = Punto venta
|
||||
|
||||
# Relatório Gratuidade Idoso Deficiente
|
||||
relatorioGratuidadeIdosoDeficienteController.window.title = Relatório Gratuidade Idoso/Deficiente
|
||||
relatorioGratuidadeIdosoDeficienteController.lbCategoria.value = Categoria
|
||||
relatorioGratuidadeIdosoDeficienteController.lbData.value = Mês
|
|
@ -244,6 +244,7 @@ indexController.mniRelatorioEmpresaCorrida.label = Relatório por Empresa Corrid
|
|||
indexController.mniRelatorioEmpresaOnibus.label = Relatório por Empresa Ônibus
|
||||
indexController.mniRelatorioOCD.label = Relatório OCD por Empresa
|
||||
indexController.mniRelatorioGratuidade.label = Relatório Gratuidade
|
||||
indexController.mniRelatorioGratuidadeIdosoDeficiente.label = Relatório Gratuidade Idoso/Deficiente
|
||||
indexController.mniRelatorioVendasBilheteiro.label = Relatório de Vendas por Bilheteiro
|
||||
indexController.mniRelatorioAgenciasNaoImportadas.label = Relatório de Agências não Importadas
|
||||
indexController.mniRelatorioCheckin.label = Relatório de Checkin's
|
||||
|
@ -308,6 +309,8 @@ indexController.mniTipoConvenio.label = Tipo Convênio
|
|||
indexController.mniCuponConvenio.label = Cupom Convênio
|
||||
indexController.mniPrecioVentaja.label = Aproveitamento Seletivo
|
||||
|
||||
indexController.mniRelatorioGratuidadeIdosoDeficiente.label = Relatório Gratuidade Idoso/Deficiente
|
||||
|
||||
# Muestra a Pesquisa Tipo Classe
|
||||
busquedaClaseServicioController.window.title = Tipo de Classe
|
||||
busquedaClaseServicioController.btnRefresh.tooltiptext = Atualizar
|
||||
|
@ -6335,4 +6338,9 @@ relatorioObservacaoConferenciaMovimentoController.btnCerrar.tooltiptext = Fechar
|
|||
relatorioObservacaoConferenciaMovimentoController.lbDataIni.value = Data Inicio
|
||||
relatorioObservacaoConferenciaMovimentoController.lbDataFin.value = Data Final
|
||||
relatorioObservacaoConferenciaMovimentoController.lbEmpresa.value = Empresa
|
||||
relatorioObservacaoConferenciaMovimentoController.lbPuntoVenta.value = Punto venta
|
||||
relatorioObservacaoConferenciaMovimentoController.lbPuntoVenta.value = Punto venta
|
||||
|
||||
# Relatório Gratuidade Idoso Deficiente
|
||||
relatorioGratuidadeIdosoDeficienteController.window.title = Relatório Gratuidade Idoso/Deficiente
|
||||
relatorioGratuidadeIdosoDeficienteController.lbCategoria.value = Categoria
|
||||
relatorioGratuidadeIdosoDeficienteController.lbData.value = Mês
|
|
@ -0,0 +1,40 @@
|
|||
<?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="winFiltroRelatorioGratuidadeIdosoDeficiente"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winFiltroRelatorioGratuidadeIdosoDeficiente"
|
||||
apply="${relatorioGratuidadeIdosoDeficienteController}" contentStyle="overflow:auto"
|
||||
height="225px" width="550px" border="normal">
|
||||
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="50%" />
|
||||
<column width="50%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('relatorioGratuidadeIdosoDeficienteController.lbCategoria.value')}" />
|
||||
<combobox id="cmbCategoria" width="70%" maxlength="60"
|
||||
mold="rounded" buttonVisible="true"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
model="@{winFiltroRelatorioGratuidadeIdosoDeficiente$composer.lsCategorias}" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('relatorioGratuidadeIdosoDeficienteController.lbData.value')}" />
|
||||
<datebox id="data" width="100%" mold="rounded"
|
||||
format="MM/yyyy" lenient="false" constraint="no empty"
|
||||
maxlength="10" />
|
||||
</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