fix bug #0009384 - adicionado filtro de agencia
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@72372 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
59806cf074
commit
4de9fb680b
|
@ -79,6 +79,9 @@ public class RelatorioAidfDetalhado extends Relatorio {
|
|||
if(parametros.get("FIMFORM") != null){
|
||||
sql.append(" and a.formfinal <= ").append(parametros.get("FIMFORM"));
|
||||
}
|
||||
if(parametros.get("NUMPUNTOVENTA") != null){
|
||||
sql.append(" and ab.puntoventa_id in(").append(parametros.get("NUMPUNTOVENTA")).append(") ");
|
||||
}
|
||||
sql.append(" group by a.aidf_id, e.nombempresa, p.nombpuntoventa, a.serie, ab.estacion_id , a.subserie,concat(a.forminicial, concat('-',a.formfinal)), a.forminicial, a.formfinal, ");
|
||||
sql.append(" concat(fp.foliopreimpreso,concat('-',dab.numfoliofinal)) ");
|
||||
sql.append(" order by a.aidf_id");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -10,19 +12,29 @@ 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.Bandbox;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Datebox;
|
||||
import org.zkoss.zul.Paging;
|
||||
import org.zkoss.zul.Textbox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioAidfDetalhado;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
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.MyTextbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRelatorioVendasBilheteiro;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRelatorioVendasBilheteiroSelecionados;
|
||||
|
||||
@Controller("relatorioAidfDetalhadoController")
|
||||
@Scope("prototype")
|
||||
|
@ -38,6 +50,15 @@ public class RelatorioAidfDetalhadoController extends MyGenericForwardComposer {
|
|||
private Textbox txtAIDF;
|
||||
private Textbox txtInicioForm;
|
||||
private Textbox txtFimForm;
|
||||
|
||||
@Autowired
|
||||
private transient PagedListWrapper<PuntoVenta> plwPuntoVenta;
|
||||
|
||||
private MyTextbox txtNombrePuntoVenta;
|
||||
private Bandbox bbPesquisaPuntoVenta;
|
||||
private Paging pagingPuntoVenta;
|
||||
private MyListbox puntoVentaList;
|
||||
private MyListbox puntoVentaSelList;
|
||||
|
||||
|
||||
@Autowired
|
||||
|
@ -48,7 +69,10 @@ public class RelatorioAidfDetalhadoController extends MyGenericForwardComposer {
|
|||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
lsEmpresa = empresaService.obtenerTodos();
|
||||
super.doAfterCompose(comp);
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
puntoVentaList.setItemRenderer(new RenderRelatorioVendasBilheteiro());
|
||||
puntoVentaSelList.setItemRenderer(new RenderRelatorioVendasBilheteiroSelecionados());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -62,6 +86,36 @@ public class RelatorioAidfDetalhadoController extends MyGenericForwardComposer {
|
|||
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||
|
||||
StringBuilder filtro = new StringBuilder();
|
||||
|
||||
filtro.append("Agência: ");
|
||||
String puntoVentaIds = "";
|
||||
String puntoVentas = "";
|
||||
List<PuntoVenta> lsPuntoVentaSelecionados = new ArrayList(Arrays.asList(puntoVentaSelList.getData()));
|
||||
if (lsPuntoVentaSelecionados.isEmpty()) {
|
||||
if (puntoVentaList.getData().length == 0) {
|
||||
try {
|
||||
Messagebox.show(Labels.getLabel("relatorioAidfDetalhadoController.msg.agencia.obrigatorio"),
|
||||
Labels.getLabel("relatorioVendasBilheteiroController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
return;
|
||||
} catch (InterruptedException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < lsPuntoVentaSelecionados.size(); i++) {
|
||||
PuntoVenta puntoVenta = lsPuntoVentaSelecionados.get(i);
|
||||
puntoVentas = puntoVentas + puntoVenta.getNombpuntoventa() + ",";
|
||||
|
||||
puntoVentaIds = puntoVentaIds + puntoVenta.getPuntoventaId() + ",";
|
||||
}
|
||||
|
||||
// removendo ultima virgula
|
||||
puntoVentaIds = puntoVentaIds.substring(0, puntoVentaIds.length() - 1);
|
||||
puntoVentas = puntoVentas.substring(0, puntoVentas.length() - 1);
|
||||
parametros.put("NUMPUNTOVENTA", puntoVentaIds);
|
||||
}
|
||||
filtro.append(puntoVentas).append(";");
|
||||
|
||||
parametros.put("NOME_RELATORIO", Labels.getLabel("relatorioAidfDetalhadoController.window.title"));
|
||||
parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString());
|
||||
|
@ -119,25 +173,51 @@ public class RelatorioAidfDetalhadoController extends MyGenericForwardComposer {
|
|||
executarRelatorio();
|
||||
}
|
||||
|
||||
private void executarPesquisa() {
|
||||
|
||||
private void executarPesquisa() {
|
||||
HibernateSearchObject<PuntoVenta> puntoVentaBusqueda =
|
||||
new HibernateSearchObject<PuntoVenta>(PuntoVenta.class, pagingPuntoVenta.getPageSize());
|
||||
|
||||
puntoVentaBusqueda.addFilterILike("nombpuntoventa", "%" + txtNombrePuntoVenta.getValue() + "%");
|
||||
puntoVentaBusqueda.addFilterEqual("activo", Boolean.TRUE);
|
||||
|
||||
puntoVentaBusqueda.addSortAsc("nombpuntoventa");
|
||||
|
||||
puntoVentaBusqueda.addFilterEqual("activo", Boolean.TRUE);
|
||||
|
||||
plwPuntoVenta.init(puntoVentaBusqueda, puntoVentaList, pagingPuntoVenta);
|
||||
|
||||
if (puntoVentaList.getData().length == 0) {
|
||||
try {
|
||||
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
||||
Labels.getLabel("relatorioVendasBilheteiroController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
} catch (InterruptedException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnPesquisa(Event ev) {
|
||||
executarPesquisa();
|
||||
}
|
||||
|
||||
public void onClick$btnLimpar(Event ev) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void onDoubleClick$puntoVentaSelList(Event ev) {
|
||||
|
||||
PuntoVenta puntoVenta = (PuntoVenta) puntoVentaSelList.getSelected();
|
||||
puntoVentaSelList.removeItem(puntoVenta);
|
||||
}
|
||||
|
||||
public void onDoubleClick$puntoVentaList(Event ev) {
|
||||
|
||||
PuntoVenta puntoVenta = (PuntoVenta) puntoVentaList.getSelected();
|
||||
puntoVentaSelList.addItemNovo(puntoVenta);
|
||||
}
|
||||
|
||||
public void onClick$btnLimpar(Event ev) {
|
||||
puntoVentaList.setData(new ArrayList<PuntoVenta>());
|
||||
|
||||
bbPesquisaPuntoVenta.setText("");
|
||||
}
|
||||
|
||||
|
||||
public Datebox getDatInicial() {
|
||||
return datInicial;
|
||||
|
@ -201,7 +281,37 @@ public class RelatorioAidfDetalhadoController extends MyGenericForwardComposer {
|
|||
|
||||
public void setTxtFimForm(Textbox txtFimForm) {
|
||||
this.txtFimForm = txtFimForm;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public PagedListWrapper<PuntoVenta> getPlwPuntoVenta() {
|
||||
return plwPuntoVenta;
|
||||
}
|
||||
|
||||
public void setPlwPuntoVenta(PagedListWrapper<PuntoVenta> plwPuntoVenta) {
|
||||
this.plwPuntoVenta = plwPuntoVenta;
|
||||
}
|
||||
|
||||
public MyTextbox getTxtNombrePuntoVenta() {
|
||||
return txtNombrePuntoVenta;
|
||||
}
|
||||
|
||||
public void setTxtNombrePuntoVenta(MyTextbox txtNombrePuntoVenta) {
|
||||
this.txtNombrePuntoVenta = txtNombrePuntoVenta;
|
||||
}
|
||||
|
||||
public MyListbox getPuntoVentaList() {
|
||||
return puntoVentaList;
|
||||
}
|
||||
|
||||
public void setPuntoVentaList(MyListbox puntoVentaList) {
|
||||
this.puntoVentaList = puntoVentaList;
|
||||
}
|
||||
|
||||
public MyListbox getPuntoVentaSelList() {
|
||||
return puntoVentaSelList;
|
||||
}
|
||||
|
||||
public void setPuntoVentaSelList(MyListbox puntoVentaSelList) {
|
||||
this.puntoVentaSelList = puntoVentaSelList;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -271,6 +271,7 @@ indexController.mniRelatorioOCD.label = Status de OCD
|
|||
indexController.mniRelatorioGratuidade.label = Gratuidades
|
||||
indexController.mniRelatorioGratuidadeIdosoDeficiente.label = Gratuidades Idoso/Deficiente
|
||||
indexController.mniRelatorioVendasBilheteiro.label = Vendas por Bilheteiro
|
||||
indexController.mniRelatorioVendasBilheteiroSintetico.label = Vendas por Bilheteiro Sintético
|
||||
indexController.mniRelatorioAgenciasNaoImportadas.label = Relatório de Agências não Importadas
|
||||
indexController.mniRelatorioCheckin.label = Checkin's
|
||||
indexController.mniFechamentoParamgeral.label = Configuração de Boleto
|
||||
|
@ -678,6 +679,18 @@ relatorioVendasBilheteiroController.btnLimpar.label = Limpar
|
|||
relatorioVendasBilheteiroController.lbNumero.value = Número Agência
|
||||
relatorioVendasBilheteiroController.lbBilheteiro.value = Bilheteiro
|
||||
|
||||
#Relatório de Vendas por bilheteiro Sintético
|
||||
relatorioVendasBilheteiroSinteticoController.window.title = Relatório de Vendas por Bilheteiro Sintético
|
||||
relatorioVendasBilheteiroSinteticoController.lbDatInicial.value = Data inicial
|
||||
relatorioVendasBilheteiroSinteticoController.lbDatFinal.value = Data final
|
||||
relatorioVendasBilheteiroSinteticoController.lbPuntoVenta.value = Agência
|
||||
relatorioVendasBilheteiroSinteticoController.lbEmpresa.value = Empresa
|
||||
relatorioVendasBilheteiroSinteticoController.btnPesquisa.label = Buscar
|
||||
relatorioVendasBilheteiroSinteticoController.btnLimpar.label = Limpar
|
||||
relatorioVendasBilheteiroSinteticoController.lbNumero.value = Número Agência
|
||||
relatorioVendasBilheteiroSinteticoController.lbBilheteiro.value = Bilheteiro
|
||||
relatorioVendasBilheteiroSinteticoController.lbCanalVendas.value = Canal Vendas
|
||||
|
||||
#Relatório de Demandas
|
||||
relatorioDemandasController.window.title = Relatório de Demandas
|
||||
relatorioDemandasController.lbDatInicial.value = Data Inicial
|
||||
|
@ -736,6 +749,7 @@ relatorioAidfDetalhadoController.lbSerie.value = Série
|
|||
relatorioAidfDetalhadoController.lbAidf.value = AIDF
|
||||
relatorioAidfDetalhadoController.lbFormInicial.value = Form. Inicial
|
||||
relatorioAidfDetalhadoController.lbFormFinal.value = Form. Final
|
||||
relatorioAidfDetalhadoController.msg.agencia.obrigatorio = Uma Agência deve ser selecionada
|
||||
|
||||
# Pantalla Editar Classe
|
||||
editarClaseServicioController.window.title = Tipo de Classe
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winFiltroRelatorioAidfDetalhado" apply="${relatorioAidfDetalhadoController}"
|
||||
contentStyle="overflow:auto"
|
||||
height="178px" width="478px" border="normal">
|
||||
height="340px" width="538px" border="normal">
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="25%" />
|
||||
|
@ -38,7 +38,62 @@
|
|||
<textbox id="txtInicioForm" maxlength="10" width="100px" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
|
||||
<label value="${c:l('relatorioAidfDetalhadoController.lbFormFinal.value')}"/>
|
||||
<textbox id="txtFimForm" maxlength="10" width="100px" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
|
||||
</row>
|
||||
</row>
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="Agencia" />
|
||||
<bandbox id="bbPesquisaPuntoVenta" width="100%"
|
||||
mold="rounded" readonly="true">
|
||||
<bandpopup>
|
||||
<vbox>
|
||||
<hbox>
|
||||
<label
|
||||
value="${c:l('relatorioVendasBilheteiroController.lbPuntoVenta.value')}" />
|
||||
<textbox id="txtNombrePuntoVenta"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"
|
||||
width="300px" mold="rounded" />
|
||||
<button id="btnPesquisa"
|
||||
image="/gui/img/find.png"
|
||||
label="${c:l('relatorioLinhaOperacionalController.btnPesquisa.label')}" />
|
||||
<button id="btnLimpar"
|
||||
image="/gui/img/eraser.png"
|
||||
label="${c:l('relatorioLinhaOperacionalController.btnLimpar.label')}" />
|
||||
</hbox>
|
||||
<paging id="pagingPuntoVenta"
|
||||
pageSize="10" />
|
||||
<listbox id="puntoVentaList"
|
||||
mold="paging"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
vflex="true" height="100%" width="700px">
|
||||
<listhead>
|
||||
<listheader
|
||||
label="${c:l('relatorioVendasBilheteiroController.lbPuntoVenta.value')}" />
|
||||
<listheader width="35%"
|
||||
label="${c:l('relatorioVendasBilheteiroController.lbEmpresa.value')}" />
|
||||
<listheader width="20%"
|
||||
label="${c:l('relatorioVendasBilheteiroController.lbNumero.value')}" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
</bandpopup>
|
||||
</bandbox>
|
||||
</row>
|
||||
<row spans="4">
|
||||
<listbox id="puntoVentaSelList" mold="paging"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
vflex="true" height="100px" width="100%">
|
||||
<listhead>
|
||||
<listheader
|
||||
label="${c:l('relatorioVendasBilheteiroController.lbPuntoVenta.value')}" />
|
||||
<listheader width="35%"
|
||||
label="${c:l('relatorioVendasBilheteiroController.lbEmpresa.value')}" />
|
||||
<listheader width="20%"
|
||||
label="${c:l('relatorioVendasBilheteiroController.lbNumero.value')}" />
|
||||
<listheader width="5%" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
<paging id="pagingSelPuntoVenta" pageSize="10" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<toolbar>
|
||||
|
|
Loading…
Reference in New Issue