fixes bug 6968
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@51949 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
083f290d07
commit
46fafd120c
|
@ -4,6 +4,7 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.web.gui.controladores.esquemaoperacional;
|
package com.rjconsultores.ventaboletos.web.gui.controladores.esquemaoperacional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -151,6 +152,8 @@ public class BusquedaCatalogoDeRutaController extends MyGenericForwardComposer {
|
||||||
if (cmbEmpresa.getSelectedIndex() >= 0){
|
if (cmbEmpresa.getSelectedIndex() >= 0){
|
||||||
Empresa e = (Empresa)cmbEmpresa.getSelectedItem().getValue();
|
Empresa e = (Empresa)cmbEmpresa.getSelectedItem().getValue();
|
||||||
rutaBusqueda.addFilterAll("lsRutaEmpresa", Filter.equal("empresa.empresaId", e.getEmpresaId()));
|
rutaBusqueda.addFilterAll("lsRutaEmpresa", Filter.equal("empresa.empresaId", e.getEmpresaId()));
|
||||||
|
} else {
|
||||||
|
rutaBusqueda.addFilterAll("lsRutaEmpresa", Filter.in("empresa.empresaId", getIdEmpresas(lsEmpresa)));
|
||||||
}
|
}
|
||||||
|
|
||||||
rutaBusqueda.addFilterNotEqual("rutaId", -1);
|
rutaBusqueda.addFilterNotEqual("rutaId", -1);
|
||||||
|
@ -195,6 +198,20 @@ public class BusquedaCatalogoDeRutaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<Integer> getIdEmpresas(List<Empresa> lsEmpresa2) {
|
||||||
|
|
||||||
|
if(lsEmpresa2 == null || lsEmpresa2.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Integer> ids = new ArrayList<Integer>();
|
||||||
|
for (Empresa empresa : lsEmpresa2) {
|
||||||
|
ids.add(empresa.getEmpresaId());
|
||||||
|
}
|
||||||
|
|
||||||
|
return ids;
|
||||||
|
}
|
||||||
|
|
||||||
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
|
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
|
||||||
refreshLista();
|
refreshLista();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue