Fixes Bug #0009777
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@73766 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
c9069fa338
commit
be25a43cb4
|
@ -69,8 +69,12 @@ public class EmpleadoServiceImpl implements EmpleadoService {
|
|||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
if (entidad.getTipoEmpleado().getTipoEmpleadoId() == CONDUCTOR){
|
||||
if (entidad.getTipoEmpleado() != null && entidad.getTipoEmpleado().getTipoEmpleadoId() == CONDUCTOR){
|
||||
Conductor cond = conductorDAO.buscarPorEmpleado(entidad.getEmpleadoId());
|
||||
|
||||
if (cond == null) {
|
||||
cond = new Conductor();
|
||||
}
|
||||
cond.setActivo(Boolean.TRUE);
|
||||
cond.setEmpleado(entidad);
|
||||
cond.setFecmodif(Calendar.getInstance().getTime());
|
||||
|
@ -79,7 +83,11 @@ public class EmpleadoServiceImpl implements EmpleadoService {
|
|||
cond.setNomMaterno(entidad.getNombMaterno());
|
||||
cond.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
|
||||
if (cond.getConductorId() != null) {
|
||||
conductorDAO.actualizacion(cond);
|
||||
} else {
|
||||
conductorDAO.suscribir(cond);
|
||||
}
|
||||
}
|
||||
|
||||
return empleadoDAO.actualizacion(entidad);
|
||||
|
|
Loading…
Reference in New Issue