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;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
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.Aidf;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.service.AidfService;
|
||||
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.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
||||
|
@ -43,7 +46,10 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
|||
private List<Aidf> lsAidf;
|
||||
|
||||
private Textbox txtForminicial;
|
||||
private Textbox txtFormfinal;
|
||||
private Textbox txtFormfinal;
|
||||
|
||||
private List<PuntoVenta> lsPuntoVenta;
|
||||
private MyComboboxPuntoVenta cmbPuntoVenta;
|
||||
|
||||
public BusquedaBilhetesController() {
|
||||
// TODO Auto-generated constructor stub
|
||||
|
@ -78,6 +84,7 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
|||
|
||||
List<Empresa> lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
||||
lsAidf = aidfService.buscaAidfsPorEmpresas(lsEmpresas);
|
||||
setLsPuntoVenta(new ArrayList<PuntoVenta>());
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
|
@ -108,6 +115,13 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
|||
bilheteBusqueda.addFilterEqual("aidf", aidf);
|
||||
}
|
||||
|
||||
Comboitem puntoVentaSeleccionada = cmbPuntoVenta.getSelectedItem();
|
||||
|
||||
if(puntoVentaSeleccionada != null){
|
||||
PuntoVenta puntoVenta = (PuntoVenta) puntoVentaSeleccionada.getValue();
|
||||
bilheteBusqueda.addFilterEqual("puntoventa", puntoVenta);
|
||||
}
|
||||
|
||||
String formInicial = txtForminicial.getValue();
|
||||
if(StringUtils.isNotBlank(formInicial))
|
||||
bilheteBusqueda.addFilterGreaterOrEqual("numfoliopreimpreso", formInicial);
|
||||
|
@ -116,7 +130,7 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
|||
if(StringUtils.isNotBlank(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);
|
||||
|
||||
if (bilheteList.getData().length == 0) {
|
||||
|
@ -146,5 +160,22 @@ public class BusquedaBilhetesController extends MyGenericForwardComposer {
|
|||
public void setTxtFormfinal(Textbox 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -42,7 +42,16 @@
|
|||
<textbox id="txtFormfinal" width="100px"
|
||||
maxlength="20"
|
||||
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>
|
||||
</grid>
|
||||
|
||||
|
|
Loading…
Reference in New Issue