edgar 2016-06-16 15:50:20 +00:00
parent fc00d436ca
commit 0032d42531
6 changed files with 144 additions and 112 deletions

View File

@ -16,4 +16,6 @@ public interface EmpleadoDAO extends GenericDAO<Empleado, Integer>{
public List<Empleado> pesquisaClave(String empleadoClave);
public List<Empleado> pesquisaEmpresa(Integer empresaId);
}

View File

@ -43,4 +43,12 @@ public class EmpleadoHibernateDAO extends GenericHibernateDAO<Empleado, Integer>
return c.list();
}
@Override
public List<Empleado> pesquisaEmpresa(Integer empresaId) {
Criteria c = getSession().createCriteria(getPersistentClass());
c.add(Restrictions.eq("empresa.empresaId", empresaId));
c.add(Restrictions.eq("activo", Boolean.TRUE));
return c.list();
}
}

View File

@ -206,5 +206,4 @@ public class RutaHibernateDAO extends GenericHibernateDAO<Ruta, Integer> impleme
return lsRuta;
}
}

View File

@ -74,6 +74,28 @@ public class Empleado implements Serializable {
@ManyToOne
private Empresa empresa;
public Empleado() {
super();
}
public Empleado(Integer empleadoId) {
this();
this.empleadoId = empleadoId;
}
public Empleado(Integer empleadoId, String nombEmpleado) {
this();
this.empleadoId = empleadoId;
this.nombEmpleado = nombEmpleado;
}
public Empleado(Integer empleadoId, Date fecmodif) {
this();
this.empleadoId = empleadoId;
this.fecmodif = fecmodif;
}
public Boolean getActivo() {
return activo;
}
@ -232,7 +254,7 @@ public class Empleado implements Serializable {
@Override
public String toString() {
return this.getCveEmpleado();
return this.getNombEmpleado();
// return this.getNombPaterno() + getNombMaterno() + getNombEmpleado();
}

View File

@ -109,7 +109,6 @@ public class EmpresaServiceImpl implements EmpresaService {
empresaDAO.actualizacion(entidad);
}
public List<Empresa> buscar(String nombempresa, Boolean indExterna, Short indTipo) {
return empresaDAO.buscar(nombempresa, indExterna, indTipo);
}
@ -126,7 +125,9 @@ public class EmpresaServiceImpl implements EmpresaService {
return empresaDAO.obtenerIndTipo2();
}
/* (non-Javadoc)
/*
* (non-Javadoc)
*
* @see com.rjconsultores.ventaboletos.service.EmpresaService#buscarNotInPuntoVtaComissao(com.rjconsultores.ventaboletos.entidad.PuntoVenta)
*/
@Override