From 30632bec0e81411fab4433bf93008fa1319aacf9 Mon Sep 17 00:00:00 2001 From: Javier Ferreira Date: Mon, 15 Nov 2021 08:37:16 -0300 Subject: [PATCH] Restringir en el post --- curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java index 283ab2a..10e4833 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java @@ -155,10 +155,16 @@ public class PostulanteController { //Codigo encargado de modificar postulacion si se envia mismo CI Postulante postulantex = post.findByNroDocument(postulante.getnroDocument()); if(postulantex != null){ + postulante.setEstadoPostulante(postulantex.getEstadoPostulante()); + postulante.setComentarioRRHH(postulantex.getComentarioRRHH()); estudioRepository.findByPostulante(postulantex).forEach(x -> estudioRepository.delete(x)); expRepo.findByPostulante(postulantex).forEach(x -> expRepo.delete(x)); postulanteTecnologiaRepository.findByPostulante(postulantex).forEach(x -> postulanteTecnologiaRepository.delete(x)); postulante.setId(postulantex.getId()); + } else{ + postulante.setEstadoPostulante(EstadoPostulante.NUEVO); + postulante.setComentarioRRHH(null); + } postulante.getTecnologias().stream().filter( tec -> tec.getTecnologia().getId() != 0 -- libgit2 0.26.0