fixes bug #6005
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@40986 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
375232b6ab
commit
756636a080
|
@ -3,6 +3,7 @@ package com.rjconsultores.ventaboletos.web.gui.controladores.catalogos;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
@ -75,23 +76,23 @@ public class BusquedaEmpleadoController extends MyGenericForwardComposer {
|
|||
new HibernateSearchObject<Empleado>(Empleado.class, pagingEmpleado.getPageSize());
|
||||
|
||||
String cveEmpleado = txtCveEmpleado.getValue();
|
||||
if (cveEmpleado != null) {
|
||||
if (cveEmpleado != null && StringUtils.isNotBlank(cveEmpleado)) {
|
||||
sistemaBusqueda.addFilterLike("cveEmpleado", "%".concat(cveEmpleado.trim().concat("%")));
|
||||
} else {
|
||||
String nombempleado = txtNombEmpleado.getText();
|
||||
if (nombempleado != null) {
|
||||
sistemaBusqueda.addFilterOr(Filter.ilike("nombEmpleado", "%" + nombempleado.trim().concat("%")), Filter.isNull("nombEmpleado"));
|
||||
}
|
||||
}
|
||||
|
||||
String nombempleado = txtNombEmpleado.getText();
|
||||
if (nombempleado != null && StringUtils.isNotBlank(nombempleado)) {
|
||||
sistemaBusqueda.addFilterOr(Filter.ilike("nombEmpleado", "%" + nombempleado.trim().concat("%")), Filter.isNull("nombEmpleado"));
|
||||
}
|
||||
|
||||
String apellidopaterno = txtApelidoPaterno.getText();
|
||||
if (apellidopaterno != null) {
|
||||
sistemaBusqueda.addFilterOr(Filter.ilike("nombPaterno", "%" + apellidopaterno.trim().concat("%")), Filter.isNull("nombPaterno"));
|
||||
}
|
||||
String apellidopaterno = txtApelidoPaterno.getText();
|
||||
if (apellidopaterno != null && StringUtils.isNotBlank(apellidopaterno)) {
|
||||
sistemaBusqueda.addFilterOr(Filter.ilike("nombPaterno", "%" + apellidopaterno.trim().concat("%")), Filter.isNull("nombPaterno"));
|
||||
}
|
||||
|
||||
String apellidomaterno = txtApelidoMaterno.getText();
|
||||
if (apellidomaterno != null) {
|
||||
sistemaBusqueda.addFilterOr(Filter.ilike("nombMaterno", "%" + apellidomaterno.trim().concat("%")), Filter.isNull("nombMaterno"));
|
||||
}
|
||||
String apellidomaterno = txtApelidoMaterno.getText();
|
||||
if (apellidomaterno != null && StringUtils.isNotBlank(apellidomaterno)) {
|
||||
sistemaBusqueda.addFilterOr(Filter.ilike("nombMaterno", "%" + apellidomaterno.trim().concat("%")), Filter.isNull("nombMaterno"));
|
||||
}
|
||||
|
||||
sistemaBusqueda.addFilterEqual("activo", Boolean.TRUE);
|
||||
|
|
|
@ -18,7 +18,10 @@ public class RenderEmpleado implements ListitemRenderer {
|
|||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
Empleado empleado = (Empleado) o;
|
||||
|
||||
Listcell lc = new Listcell(empleado.getNombEmpleado());
|
||||
Listcell lc = new Listcell(empleado.getCveEmpleado());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(empleado.getNombEmpleado());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(empleado.getNombPaterno());
|
||||
|
|
|
@ -66,18 +66,21 @@
|
|||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false">
|
||||
<listhead sizable="true">
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
label="${c:l('busquedaEmpleadoController.cveEmpleado.label')}"
|
||||
sort="auto(cveEmpleado)" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
label="${c:l('busquedaEmpleadoController.nombEmpleado.label')}"
|
||||
sort="auto(nombEmpleado)" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
label="${c:l('busquedaEmpleadoController.nombpaterno.label')}"
|
||||
sort="auto(apellidopaterno)" />
|
||||
sort="auto(nombPaterno)" />
|
||||
<listheader image="/gui/img/create_doc.gif"
|
||||
label="${c:l('busquedaEmpleadoController.nombmaterno.label')}"
|
||||
sort="auto(apellidomaterno)" />
|
||||
sort="auto(nombMaterno)" />
|
||||
<listheader image="/gui/img/create_doc.gif" width="10%"
|
||||
label="${c:l('busquedaEmpleadoController.nombempresa.label')}"
|
||||
sort="auto(nombempresa)" />
|
||||
sort="auto(empresa.nombempresa)" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</window>
|
||||
|
|
Loading…
Reference in New Issue