Movimentação de estoque centralizado - Busca de Bilhetes:
- filtro de pesquisa por Agência git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@32552 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
5db6f5a9c3
commit
5d3be0e7e6
|
@ -1,5 +1,6 @@
|
||||||
package com.rjconsultores.ventaboletos.web.gui.controladores.gr;
|
package com.rjconsultores.ventaboletos.web.gui.controladores.gr;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
@ -18,8 +19,10 @@ import org.zkoss.zul.Textbox;
|
||||||
import com.rjconsultores.ventaboletos.entidad.AbastoCentral;
|
import com.rjconsultores.ventaboletos.entidad.AbastoCentral;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Aidf;
|
import com.rjconsultores.ventaboletos.entidad.Aidf;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||||
import com.rjconsultores.ventaboletos.service.AidfService;
|
import com.rjconsultores.ventaboletos.service.AidfService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
||||||
|
@ -45,6 +48,9 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
||||||
private Textbox txtForminicial;
|
private Textbox txtForminicial;
|
||||||
private Textbox txtFormfinal;
|
private Textbox txtFormfinal;
|
||||||
|
|
||||||
|
private List<PuntoVenta> lsPuntoVenta;
|
||||||
|
private MyComboboxPuntoVenta cmbPuntoVenta;
|
||||||
|
|
||||||
public BusquedaBilhetesController() {
|
public BusquedaBilhetesController() {
|
||||||
// TODO Auto-generated constructor stub
|
// TODO Auto-generated constructor stub
|
||||||
}
|
}
|
||||||
|
@ -78,6 +84,7 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
List<Empresa> lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
List<Empresa> lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
||||||
lsAidf = aidfService.buscaAidfsPorEmpresas(lsEmpresas);
|
lsAidf = aidfService.buscaAidfsPorEmpresas(lsEmpresas);
|
||||||
|
setLsPuntoVenta(new ArrayList<PuntoVenta>());
|
||||||
|
|
||||||
super.doAfterCompose(comp);
|
super.doAfterCompose(comp);
|
||||||
|
|
||||||
|
@ -108,6 +115,13 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
||||||
bilheteBusqueda.addFilterEqual("aidf", aidf);
|
bilheteBusqueda.addFilterEqual("aidf", aidf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Comboitem puntoVentaSeleccionada = cmbPuntoVenta.getSelectedItem();
|
||||||
|
|
||||||
|
if(puntoVentaSeleccionada != null){
|
||||||
|
PuntoVenta puntoVenta = (PuntoVenta) puntoVentaSeleccionada.getValue();
|
||||||
|
bilheteBusqueda.addFilterEqual("puntoventa", puntoVenta);
|
||||||
|
}
|
||||||
|
|
||||||
String formInicial = txtForminicial.getValue();
|
String formInicial = txtForminicial.getValue();
|
||||||
if(StringUtils.isNotBlank(formInicial))
|
if(StringUtils.isNotBlank(formInicial))
|
||||||
bilheteBusqueda.addFilterGreaterOrEqual("numfoliopreimpreso", formInicial);
|
bilheteBusqueda.addFilterGreaterOrEqual("numfoliopreimpreso", formInicial);
|
||||||
|
@ -116,7 +130,7 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
||||||
if(StringUtils.isNotBlank(formFinal))
|
if(StringUtils.isNotBlank(formFinal))
|
||||||
bilheteBusqueda.addFilterLessOrEqual("numfoliopreimpreso", formFinal);
|
bilheteBusqueda.addFilterLessOrEqual("numfoliopreimpreso", formFinal);
|
||||||
|
|
||||||
if(aidfSeleccionada != null || StringUtils.isNotBlank(formInicial) || StringUtils.isNotBlank(formFinal)){
|
if(aidfSeleccionada != null || puntoVentaSeleccionada != null || StringUtils.isNotBlank(formInicial) || StringUtils.isNotBlank(formFinal)){
|
||||||
plwBilhetes.init(bilheteBusqueda, bilheteList, pagingBilhetes);
|
plwBilhetes.init(bilheteBusqueda, bilheteList, pagingBilhetes);
|
||||||
|
|
||||||
if (bilheteList.getData().length == 0) {
|
if (bilheteList.getData().length == 0) {
|
||||||
|
@ -147,4 +161,21 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
||||||
this.txtFormfinal = txtFormfinal;
|
this.txtFormfinal = txtFormfinal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<PuntoVenta> getLsPuntoVenta() {
|
||||||
|
return lsPuntoVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setLsPuntoVenta(List<PuntoVenta> lsPuntoVenta) {
|
||||||
|
this.lsPuntoVenta = lsPuntoVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyComboboxPuntoVenta getCmbPuntoVenta() {
|
||||||
|
return cmbPuntoVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmbPuntoVenta(MyComboboxPuntoVenta cmbPuntoVenta) {
|
||||||
|
this.cmbPuntoVenta = cmbPuntoVenta;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,15 @@
|
||||||
maxlength="20"
|
maxlength="20"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||||
</row>
|
</row>
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('winMovimentacionBilhetesPuntoVenta.puntoventa.label')}" />
|
||||||
|
<combobox id="cmbPuntoVenta"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
||||||
|
width="70%" mold="rounded" buttonVisible="true"
|
||||||
|
|
||||||
|
model="@{winMovimentacionBilhetesPuntoVenta$composer.lsPuntoVenta}"/>
|
||||||
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue