git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@29147 d1611594-4594-4d17-8e1d-87c2c4800839
parent
5df73afd67
commit
99540bbf59
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.util.Map;
|
||||
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
|
||||
/**
|
||||
* @author Padovani
|
||||
*
|
||||
*/
|
||||
public class RelatorioPassageirosViajar extends Relatorio {
|
||||
|
||||
public RelatorioPassageirosViajar(Map<String, Object> parametros, Connection conexao) throws Exception {
|
||||
super(parametros, conexao);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void processaParametros() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,240 @@
|
|||
<?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="report1" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="953cc4ce-9ab8-45a3-b9b1-2c8621b7ac5f">
|
||||
<property name="ireport.zoom" value="1.0"/>
|
||||
<property name="ireport.x" value="0"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<parameter name="DATA_INICIO" class="java.lang.String">
|
||||
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
|
||||
</parameter>
|
||||
<parameter name="DATA_FINAL" class="java.lang.String">
|
||||
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
|
||||
</parameter>
|
||||
<parameter name="EMPRESA_ID" class="java.lang.String">
|
||||
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
|
||||
</parameter>
|
||||
<parameter name="LS_CATEGORIA" class="java.lang.String"/>
|
||||
<parameter name="USUARIO" class="java.lang.Integer"/>
|
||||
<parameter name="PASSAGEM_ABERTA" class="java.lang.String"/>
|
||||
<queryString>
|
||||
<![CDATA[select cj.numseriepreimpresa, cj.empresacorrida_id, em.nombempresa, es.cveestado,
|
||||
cj.numfoliosistema,
|
||||
cj.fechorventa, cj.feccorrida, cj.preciopagado
|
||||
from vtabol_sco.caja cj,
|
||||
vtabol_sco.empresa em,
|
||||
vtabol_sco.punto_venta pv,
|
||||
vtabol_sco.parada pa,
|
||||
vtabol_sco.ciudad ci,
|
||||
vtabol_sco.estado es
|
||||
where cj.activo = 1
|
||||
and INSTR($P{LS_CATEGORIA}, cj.categoria_id || ',') > 0
|
||||
and cj.empresacorrida_id = $P{EMPRESA_ID}
|
||||
and cj.empresacorrida_id = em.empresa_id
|
||||
and cj.puntoventa_id = pv.puntoventa_id
|
||||
and pv.parada_id = pa.parada_id
|
||||
and pa.ciudad_id = ci.ciudad_id
|
||||
and ci.estado_id = es.estado_id
|
||||
and cj.feccorrida between $P{DATA_INICIO} and $P{DATA_FINAL}
|
||||
and ((to_char(cj.tipoventa_id) = $P{EMPRESA_ID}) or ($P{PASSAGEM_ABERTA} = 'T'))
|
||||
order by em.nombempresa, es.cveestado, cj.fechorventa]]>
|
||||
</queryString>
|
||||
<field name="NUMSERIEPREIMPRESA" class="java.lang.String"/>
|
||||
<field name="EMPRESACORRIDA_ID" class="java.math.BigDecimal"/>
|
||||
<field name="NOMBEMPRESA" class="java.lang.String"/>
|
||||
<field name="CVEESTADO" class="java.lang.String"/>
|
||||
<field name="NUMFOLIOSISTEMA" class="java.lang.String"/>
|
||||
<field name="FECHORVENTA" class="java.sql.Timestamp"/>
|
||||
<field name="FECCORRIDA" class="java.sql.Timestamp"/>
|
||||
<field name="PRECIOPAGADO" class="java.math.BigDecimal"/>
|
||||
<variable name="NOMBEMPRESA_1" class="java.lang.Integer" resetType="Page" calculation="Count">
|
||||
<variableExpression><![CDATA[$F{NOMBEMPRESA}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="NUMFOLIOSISTEMA_1" class="java.lang.Integer" calculation="Count">
|
||||
<variableExpression><![CDATA[$F{NUMFOLIOSISTEMA}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="PRECIOPAGADO_1" class="java.math.BigDecimal" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{PRECIOPAGADO}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="PRECIOPAGADO_2" class="java.math.BigDecimal" resetType="Group" resetGroup="CVEESTADO" calculation="Sum">
|
||||
<variableExpression><![CDATA[$F{PRECIOPAGADO}]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="NUMFOLIOSISTEMA_2" class="java.lang.Integer" resetType="Group" resetGroup="CVEESTADO" calculation="Count">
|
||||
<variableExpression><![CDATA[$F{NUMFOLIOSISTEMA}]]></variableExpression>
|
||||
</variable>
|
||||
<group name="EMPRESACORRIDA_ID">
|
||||
<groupExpression><![CDATA[$F{EMPRESACORRIDA_ID}]]></groupExpression>
|
||||
</group>
|
||||
<group name="CVEESTADO">
|
||||
<groupExpression><![CDATA[$F{CVEESTADO}]]></groupExpression>
|
||||
<groupFooter>
|
||||
<band height="21">
|
||||
<line>
|
||||
<reportElement uuid="ff2d789e-d1a7-4a14-b562-9a16c3151581" x="3" y="2" width="550" height="1"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement uuid="7f823bdb-3f3e-4ef8-a8f5-cff9b209950f" x="3" y="19" width="550" height="1"/>
|
||||
</line>
|
||||
<textField pattern="¤ #,##0.00">
|
||||
<reportElement uuid="29243b22-1d58-42a5-9b9b-fdcf6d5f0af8" x="282" y="5" width="112" height="13"/>
|
||||
<textElement textAlignment="Right"/>
|
||||
<textFieldExpression><![CDATA[$V{PRECIOPAGADO_2}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="04b267c9-2329-47c7-9b3f-752180765e40" x="124" y="5" width="100" height="13"/>
|
||||
<textElement textAlignment="Right"/>
|
||||
<textFieldExpression><![CDATA[$V{NUMFOLIOSISTEMA_2}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="cbc58601-2b80-474c-9772-123e4753148f" x="3" y="3" width="111" height="13"/>
|
||||
<textElement markup="none"/>
|
||||
<textFieldExpression><![CDATA["Total da UF: " + $F{CVEESTADO}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</groupFooter>
|
||||
</group>
|
||||
<background>
|
||||
<band splitType="Stretch"/>
|
||||
</background>
|
||||
<pageHeader>
|
||||
<band height="74" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement uuid="8493f349-6c6a-4344-8cf2-0ea9c9b74864" x="0" y="0" width="186" height="27"/>
|
||||
<textElement>
|
||||
<font size="18" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{NOMBEMPRESA}]]></textFieldExpression>
|
||||
</textField>
|
||||
<staticText>
|
||||
<reportElement uuid="423ba892-08af-4e8f-9377-a116e34bbc0c" x="0" y="27" width="186" height="18"/>
|
||||
<textElement>
|
||||
<font size="12"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Pasajeiros a Viajar]]></text>
|
||||
</staticText>
|
||||
<textField>
|
||||
<reportElement uuid="16e1afb9-2daf-47fd-bd15-f22e00d67c79" x="0" y="45" width="392" height="13"/>
|
||||
<textElement markup="none"/>
|
||||
<textFieldExpression><![CDATA["Período: De " + $P{DATA_INICIO} + " a " + $P{DATA_FINAL}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="f892d882-409f-4f4f-b0d2-1628abb65e6f" x="402" y="9" width="151" height="13"/>
|
||||
<textElement textAlignment="Right" markup="none"/>
|
||||
<textFieldExpression><![CDATA["Data/Hora: " +
|
||||
new SimpleDateFormat("dd/MM/yyyy hh:mm:ss").format(new Date())]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="1a4a2cbf-c63b-4e5b-b4f0-fcdc9ac79c0e" x="402" y="44" width="151" height="13"/>
|
||||
<textElement textAlignment="Right" markup="none"/>
|
||||
<textFieldExpression><![CDATA["Impresso por " + $P{USUARIO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<line>
|
||||
<reportElement uuid="d3ec23ad-49db-4b62-b775-031b1f69faf0" x="1" y="59" width="555" height="1"/>
|
||||
</line>
|
||||
<staticText>
|
||||
<reportElement uuid="76bbc785-56d6-40c1-88bc-a220572a1d4c" x="1" y="59" width="185" height="13"/>
|
||||
<textElement/>
|
||||
<text><![CDATA[Filtros: Período, Empresa, Categoria]]></text>
|
||||
</staticText>
|
||||
<textField>
|
||||
<reportElement uuid="b05e4015-9772-46c4-b7cf-1b49f76fd034" x="402" y="30" width="151" height="13"/>
|
||||
<textElement textAlignment="Right" markup="none"/>
|
||||
<textFieldExpression><![CDATA["Página: " + $V{PAGE_NUMBER}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</pageHeader>
|
||||
<columnHeader>
|
||||
<band height="16" splitType="Stretch">
|
||||
<staticText>
|
||||
<reportElement uuid="06a33996-ace7-4c67-95c6-75e6b077632d" x="63" y="2" width="46" height="13"/>
|
||||
<textElement/>
|
||||
<text><![CDATA[UF]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="2315737d-4988-46fa-a22e-4fcfa7aef43b" x="114" y="2" width="72" height="13"/>
|
||||
<textElement/>
|
||||
<text><![CDATA[Número]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="0045ae3e-0498-445b-8fc7-e92e8a431c31" x="190" y="2" width="59" height="13"/>
|
||||
<textElement/>
|
||||
<text><![CDATA[Emissão]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="c517a149-9726-4621-8efb-4f662a422bd4" x="254" y="2" width="65" height="13"/>
|
||||
<textElement/>
|
||||
<text><![CDATA[Viagem]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="9791a1f9-caa7-476f-8331-fabc1ee09e7d" x="330" y="2" width="64" height="13"/>
|
||||
<textElement textAlignment="Right"/>
|
||||
<text><![CDATA[Valor]]></text>
|
||||
</staticText>
|
||||
<line>
|
||||
<reportElement uuid="39b86da4-7678-4dc0-af7f-4d84dcb53ac6" x="0" y="15" width="555" height="1"/>
|
||||
</line>
|
||||
<line>
|
||||
<reportElement uuid="ac5ee316-a5a2-4bd9-8384-db2dbf7c9447" x="1" y="2" width="555" height="1"/>
|
||||
</line>
|
||||
<staticText>
|
||||
<reportElement uuid="2cc1f42a-e822-4317-ae00-808bf0da2133" x="3" y="3" width="55" height="13"/>
|
||||
<textElement/>
|
||||
<text><![CDATA[Série/Subs]]></text>
|
||||
</staticText>
|
||||
</band>
|
||||
</columnHeader>
|
||||
<detail>
|
||||
<band height="16" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement uuid="2a9e93e0-2af2-4a11-a6b7-928b09da8f95" x="63" y="1" width="46" height="13"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$F{CVEESTADO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="c6ccd2c0-3ce3-442f-b3a3-4c2ce1cb4e61" x="115" y="1" width="71" height="13"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$F{NUMFOLIOSISTEMA}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="93c9e2f4-2143-48f3-972b-1a50eb28530d" x="191" y="1" width="58" height="13"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy ").format($F{FECHORVENTA})]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="58b201d8-a164-47c5-94a2-96f27e779aac" x="254" y="1" width="65" height="13"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy ").format($F{FECCORRIDA})]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="¤ #,##0.00">
|
||||
<reportElement uuid="6b607479-5d7e-4234-a798-4ed9f4bfc81a" x="330" y="1" width="64" height="13"/>
|
||||
<textElement textAlignment="Right"/>
|
||||
<textFieldExpression><![CDATA[$F{PRECIOPAGADO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="ff556fd3-09fe-46f0-aaaf-7a9d26c272a9" x="3" y="1" width="55" height="13"/>
|
||||
<textElement/>
|
||||
<textFieldExpression><![CDATA[$F{NUMSERIEPREIMPRESA}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</detail>
|
||||
<summary>
|
||||
<band height="17" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement uuid="e1b9dc69-f615-4cbb-97d6-e449329e2397" x="124" y="1" width="100" height="13"/>
|
||||
<textElement textAlignment="Right"/>
|
||||
<textFieldExpression><![CDATA[$V{NUMFOLIOSISTEMA_1}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="¤ #,##0.00">
|
||||
<reportElement uuid="2b8ecb41-97ef-40eb-8db6-491211a24529" x="282" y="1" width="112" height="13"/>
|
||||
<textElement textAlignment="Right"/>
|
||||
<textFieldExpression><![CDATA[$V{PRECIOPAGADO_1}]]></textFieldExpression>
|
||||
</textField>
|
||||
<staticText>
|
||||
<reportElement uuid="e1c7c7fa-8e35-4b80-8e33-0b55046a581b" x="1" y="1" width="100" height="13"/>
|
||||
<textElement/>
|
||||
<text><![CDATA[Total]]></text>
|
||||
</staticText>
|
||||
<line>
|
||||
<reportElement uuid="f5fc9ff7-cb67-4c5b-a68b-21608306f806" x="1" y="14" width="552" height="1"/>
|
||||
</line>
|
||||
</band>
|
||||
</summary>
|
||||
</jasperReport>
|
|
@ -0,0 +1,275 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.zkoss.util.resource.Labels;
|
||||
import org.zkoss.zhtml.Messagebox;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Checkbox;
|
||||
import org.zkoss.zul.Combobox;
|
||||
import org.zkoss.zul.Datebox;
|
||||
import org.zkoss.zul.Paging;
|
||||
import org.zkoss.zul.Textbox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioPassageirosViajar;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.service.CategoriaService;
|
||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
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.RenderCategoriaSimple;
|
||||
import com.trg.search.Filter;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrador
|
||||
*/
|
||||
@Controller("relatorioPassageirosViajarController")
|
||||
@Scope("prototype")
|
||||
public class RelatorioPassageirosViajarController extends MyGenericForwardComposer {
|
||||
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
@Autowired
|
||||
private CategoriaService categoriaService;
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private List<Empresa> lsEmpresa;
|
||||
private ArrayList<Categoria> lsNumCategoria = new ArrayList<Categoria>();
|
||||
@Autowired
|
||||
private transient PagedListWrapper<Categoria> plwCategoria;
|
||||
private MyListbox categoriaList;
|
||||
private MyListbox categoriaSelList;
|
||||
private Paging pagingCategoria;
|
||||
private Textbox txtPalavraPesquisa;
|
||||
private Combobox cmbEmpresa;
|
||||
private Combobox cmbCategoria;
|
||||
private Datebox datInicial;
|
||||
private Datebox datFinal;
|
||||
private Checkbox chkPassageiroAberto;
|
||||
|
||||
public Datebox getDatInicial() {
|
||||
return datInicial;
|
||||
}
|
||||
|
||||
public void setDatInicial(Datebox datInicial) {
|
||||
this.datInicial = datInicial;
|
||||
}
|
||||
|
||||
public Datebox getDatFinal() {
|
||||
return datFinal;
|
||||
}
|
||||
|
||||
public void setDatFinal(Datebox datFinal) {
|
||||
this.datFinal = datFinal;
|
||||
}
|
||||
|
||||
public Paging getPagingCategoria() {
|
||||
return pagingCategoria;
|
||||
}
|
||||
|
||||
public void setPagingCategoria(Paging pagingCategoria) {
|
||||
this.pagingCategoria = pagingCategoria;
|
||||
}
|
||||
|
||||
public List<Empresa> getLsEmpresa() {
|
||||
return lsEmpresa;
|
||||
}
|
||||
|
||||
public void setLsEmpresa(List<Empresa> lsEmpresa) {
|
||||
this.lsEmpresa = lsEmpresa;
|
||||
}
|
||||
|
||||
public ArrayList<Categoria> getLsNumCategoria() {
|
||||
return lsNumCategoria;
|
||||
}
|
||||
|
||||
public void setLsNumCategoria(ArrayList<Categoria> lsNumCategoria) {
|
||||
this.lsNumCategoria = lsNumCategoria;
|
||||
}
|
||||
|
||||
public MyListbox getCategoriaList() {
|
||||
return categoriaList;
|
||||
}
|
||||
|
||||
public void setCategoriaList(MyListbox categoriaList) {
|
||||
this.categoriaList = categoriaList;
|
||||
}
|
||||
|
||||
public MyListbox getCategoriaSelList() {
|
||||
return categoriaSelList;
|
||||
}
|
||||
|
||||
public void setCategoriaSelList(MyListbox categoriaSelList) {
|
||||
this.categoriaSelList = categoriaSelList;
|
||||
}
|
||||
|
||||
public Combobox getCmbEmpresa() {
|
||||
return cmbEmpresa;
|
||||
}
|
||||
|
||||
public void setCmbEmpresa(Combobox cmbEmpresa) {
|
||||
this.cmbEmpresa = cmbEmpresa;
|
||||
}
|
||||
|
||||
public Combobox getCmbCategoria() {
|
||||
return cmbCategoria;
|
||||
}
|
||||
|
||||
public void setCmbCategoria(Combobox cmbCategoria) {
|
||||
this.cmbCategoria = cmbCategoria;
|
||||
}
|
||||
|
||||
public Checkbox getChkPassageiroAberto() {
|
||||
return chkPassageiroAberto;
|
||||
}
|
||||
|
||||
public void setChkPassageiroAberto(Checkbox chkPassageiroAberto) {
|
||||
this.chkPassageiroAberto = chkPassageiroAberto;
|
||||
}
|
||||
|
||||
public Textbox getTxtPalavraPesquisa() {
|
||||
return txtPalavraPesquisa;
|
||||
}
|
||||
|
||||
public void setTxtPalavraPesquisa(Textbox txtPalavraPesquisa) {
|
||||
this.txtPalavraPesquisa = txtPalavraPesquisa;
|
||||
}
|
||||
|
||||
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
|
||||
executarRelatorio();
|
||||
}
|
||||
|
||||
public void onDoubleClick$categoriaList(Event ev) {
|
||||
|
||||
Categoria categoriaSel = (Categoria) categoriaList.getSelected();
|
||||
Boolean bExiste = false;
|
||||
|
||||
for (Categoria objCategoria : lsNumCategoria) {
|
||||
if (objCategoria.equals(categoriaSel))
|
||||
bExiste = true;
|
||||
}
|
||||
|
||||
if (!bExiste) {
|
||||
lsNumCategoria.add(categoriaSel);
|
||||
categoriaSelList.setData(lsNumCategoria);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onSelect$categoriaList(Event ev) {
|
||||
|
||||
}
|
||||
|
||||
public void onClick$btnLimpar(Event ev) {
|
||||
limparPesquisa();
|
||||
}
|
||||
|
||||
public void onClick$btnPesquisa(Event ev) {
|
||||
executarPesquisa();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private void limparPesquisa() {
|
||||
lsNumCategoria.clear();
|
||||
categoriaSelList.setData(lsNumCategoria);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private void executarPesquisa() {
|
||||
HibernateSearchObject<Categoria> categoriaBusqueda =
|
||||
new HibernateSearchObject<Categoria>(Categoria.class,
|
||||
pagingCategoria.getPageSize());
|
||||
|
||||
categoriaBusqueda.addFilterOr(Filter.like("desccategoria", "%" + txtPalavraPesquisa.getText().trim().toUpperCase().concat("%")),
|
||||
Filter.like("desccategoria", "%" + txtPalavraPesquisa.getText().trim().toUpperCase().concat("%")));
|
||||
|
||||
categoriaBusqueda.addSortAsc("desccategoria");
|
||||
|
||||
categoriaBusqueda.addFilterEqual("activo", Boolean.TRUE);
|
||||
|
||||
plwCategoria.init(categoriaBusqueda, categoriaList, pagingCategoria);
|
||||
|
||||
if (categoriaList.getData().length == 0) {
|
||||
try {
|
||||
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
||||
Labels.getLabel("relatorioPassageirosViajarController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
} catch (InterruptedException ex) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*
|
||||
*/
|
||||
private void executarRelatorio() throws Exception {
|
||||
|
||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||
SimpleDateFormat fd = new SimpleDateFormat("dd/MM/yyyy");
|
||||
|
||||
parametros.put("DATA_INICIO", fd.format(datInicial.getValue()));
|
||||
parametros.put("DATA_FINAL", fd.format(datFinal.getValue()));
|
||||
String passagemAberta = "";
|
||||
if (chkPassageiroAberto.isChecked()) {
|
||||
passagemAberta = "9";
|
||||
} else {
|
||||
passagemAberta = "T";
|
||||
}
|
||||
parametros.put("PASSAGEM_ABERTA", passagemAberta);
|
||||
Empresa e = (Empresa) cmbEmpresa.getSelectedItem().getValue();
|
||||
parametros.put("EMPRESA_ID", e.getEmpresaId().toString());
|
||||
|
||||
StringBuilder strNumCategoria = new StringBuilder();
|
||||
for (Categoria c : lsNumCategoria){
|
||||
strNumCategoria.append(' ' + c.getCategoriaId().toString() + ',');
|
||||
}
|
||||
parametros.put("LS_CATEGORIA", strNumCategoria.toString());
|
||||
parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
|
||||
Relatorio relatorio = new RelatorioPassageirosViajar(parametros, dataSource.getConnection());
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("relatorio", relatorio);
|
||||
|
||||
openWindow("/component/reportView.zul",
|
||||
Labels.getLabel("relatorioPassageirosViajarController.window.title"), args, MODAL);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
lsEmpresa = empresaService.obtenerTodos();
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
categoriaList.setItemRenderer(new RenderCategoriaSimple());
|
||||
categoriaSelList.setItemRenderer(new RenderCategoriaSimple());
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios;
|
||||
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||
|
||||
public class ItemMenuRelatorioPassageirosViajar extends DefaultItemMenuSistema {
|
||||
|
||||
public ItemMenuRelatorioPassageirosViajar() {
|
||||
super("indexController.mniRelatorioPassageirosViajar.label");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClaveMenu() {
|
||||
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOPASSAGEIROSVIAJAR";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ejecutar() {
|
||||
PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioPassageirosViajar.zul",
|
||||
Labels.getLabel("relatorioPassageirosViajarController.window.title"), null,desktop);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrador
|
||||
*/
|
||||
public class RenderCategoriaSimple implements ListitemRenderer {
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
Categoria categoria = (Categoria) o;
|
||||
|
||||
Listcell lc = new Listcell();
|
||||
|
||||
lc = new Listcell(categoria.getCategoriaId().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(categoria.getDesccategoria());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", categoria);
|
||||
}
|
||||
}
|
|
@ -329,13 +329,13 @@
|
|||
<property name="jndiName" value="${database.jndi.name}" />
|
||||
</bean>
|
||||
|
||||
<!-- <bean id="dataSource" -->
|
||||
<!-- class="org.springframework.jdbc.datasource.DriverManagerDataSource"> -->
|
||||
<!-- <property name="driverClassName" value="${database.driver}" /> -->
|
||||
<!-- <property name="url" value="${database.url}" /> -->
|
||||
<!-- <property name="username" value="${database.username}" /> -->
|
||||
<!-- <property name="password" value="${database.password}" /> -->
|
||||
<!-- </bean> -->
|
||||
<!-- <bean id="dataSource" -->
|
||||
<!-- class="org.springframework.jdbc.datasource.DriverManagerDataSource"> -->
|
||||
<!-- <property name="driverClassName" value="${database.driver}" /> -->
|
||||
<!-- <property name="url" value="${database.url}" /> -->
|
||||
<!-- <property name="username" value="${database.username}" /> -->
|
||||
<!-- <property name="password" value="${database.password}" /> -->
|
||||
<!-- </bean> -->
|
||||
|
||||
<!-- ====================================================== -->
|
||||
<!-- Search class from Hibernate-Generic-DAO framework -->
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# <controler>. <id>. <propiedade> = XXX
|
||||
|
||||
#Versao do VentaBoleto:
|
||||
versao = ADM_20130715_1RC175
|
||||
versao = ADM_20130716_1RC176
|
||||
|
||||
# MSG Defaut:
|
||||
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
|
||||
|
@ -215,6 +215,7 @@ indexController.mniRelatorioAproveitamento.label = Relatório de Aproveitamento
|
|||
indexController.mniRelatorioReceitaDiariaAgencia.label = Relatório de Receita Diária por Agência
|
||||
indexController.mniRelatorioLinhaOperacional.label = Relatório de Linha Operacional
|
||||
indexController.mniRelatorioTrechoVendido.label = Relatório de Trecho Vendido Por Agência
|
||||
indexController.mniRelatorioPassageirosViajar.label = Passageiros a Viajar
|
||||
|
||||
#PARTE REALIZADA POR MANUEL
|
||||
indexController.mnCortesias.label = Cortesias Para Funcionários
|
||||
|
@ -4301,4 +4302,16 @@ relatorioLinhaOperacionalController.chkAgruparAno.value = Ano
|
|||
relatorioLinhaOperacionalController.MSG.selecionarlinha = Selecione alguma linha para gerar o relatório.
|
||||
relatorioLinhaOperacionalController.MSG.datainvalida = Data de inicio não pode ser maior que final.
|
||||
relatorioLinhaOperacionalController.lblEmpresa.value = Empresa
|
||||
relatorioLinhaOperacionalController.lblEspecie.value = Espécie
|
||||
relatorioLinhaOperacionalController.lblEspecie.value = Espécie
|
||||
|
||||
#Relatorio Pasajeiros Viajar
|
||||
relatorioPassageirosViajarController.window.title = Pasajeiros a viajar
|
||||
relatorioPassageirosViajarController.lbDataIni.value = Data Inicial
|
||||
relatorioPassageirosViajarController.lbDataFin.value = Data Final
|
||||
relatorioPassageirosViajarController.lbEmpresa.value = Empresa
|
||||
relatorioPassageirosViajarController.lbCategoria.value = Categoria
|
||||
relatorioPassageirosViajarController.btnPesquisa.label = Pesquisa
|
||||
relatorioPassageirosViajarController.btnLimpar.label = Limpar
|
||||
relatorioPassageirosViajarController.lbPassagemAberto.label = Somente passagens em aberto
|
||||
relatorioPassageirosViajarController.lhCodigo.label = Código
|
||||
relatorioPassageirosViajarController.lhDescricao.label = Descrição
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
<?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="winFiltroRelatorioPassageirosViajar"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winFiltroRelatorioPassageirosViajar"
|
||||
apply="${relatorioPassageirosViajarController}"
|
||||
contentStyle="overflow:auto" height="238px" width="550px"
|
||||
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('relatorioPassageirosViajarController.lbDataIni.value')}" />
|
||||
<datebox id="datInicial" width="90%"
|
||||
format="dd/MM/yyyy" lenient="false" constraint="no empty"
|
||||
maxlength="10" />
|
||||
<label
|
||||
value="${c:l('relatorioPassageirosViajarController.lbDataFin.value')}" />
|
||||
<datebox id="datFinal" width="90%"
|
||||
format="dd/MM/yyyy" lenient="false" constraint="no empty"
|
||||
maxlength="10" />
|
||||
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('relatorioPassageirosViajarController.lbEmpresa.value')}" />
|
||||
<combobox id="cmbEmpresa" width="90%" mold="rounded"
|
||||
buttonVisible="true"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
model="@{winFiltroRelatorioPassageirosViajar$composer.lsEmpresa}" />
|
||||
<label
|
||||
value="${c:l('relatorioPassageirosViajarController.lbCategoria.value')}" />
|
||||
<bandbox id="bbPesquisaCategoria" width="90%"
|
||||
mold="rounded" readonly="true">
|
||||
<bandpopup>
|
||||
<vbox>
|
||||
<hbox>
|
||||
<textbox id="txtPalavraPesquisa" />
|
||||
<button id="btnPesquisa"
|
||||
image="/gui/img/find.png"
|
||||
label="${c:l('relatorioPassageirosViajarController.btnPesquisa.label')}" />
|
||||
<button id="btnLimpar"
|
||||
image="/gui/img/eraser.png"
|
||||
label="${c:l('relatorioPassageirosViajarController.btnLimpar.label')}" />
|
||||
</hbox>
|
||||
|
||||
<listbox id="categoriaList"
|
||||
mold="paging"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
vflex="true" multiple="false" height="60%" width="360px">
|
||||
<listhead>
|
||||
<listheader label="${c:l('relatorioPassageirosViajarController.lhCodigo.label')}" width="30%"/>
|
||||
<listheader label="${c:l('relatorioPassageirosViajarController.lhDescricao.label')}" width="70%"/>
|
||||
</listhead>
|
||||
</listbox>
|
||||
<paging id="pagingCategoria"
|
||||
pageSize="10" />
|
||||
</vbox>
|
||||
</bandpopup>
|
||||
</bandbox>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<cell colspan="2">
|
||||
<checkbox id="chkPassageiroAberto"
|
||||
label="${c:l('relatorioPassageirosViajarController.lbPassagemAberto.label')}" />
|
||||
</cell>
|
||||
|
||||
<cell colspan="2">
|
||||
<borderlayout height="100px">
|
||||
|
||||
<center border="0">
|
||||
<listbox id="categoriaSelList"
|
||||
mold="paging"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
vflex="true" multiple="true" height="60%" width="98%">
|
||||
<listhead>
|
||||
<listheader label="${c:l('relatorioPassageirosViajarController.lhCodigo.label')}" width="30%"/>
|
||||
<listheader label="${c:l('relatorioPassageirosViajarController.lhDescricao.label')}" width="70%"/>
|
||||
</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