diff --git a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java index 37e3da7..9a09b88 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java @@ -5,6 +5,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; + import javax.validation.ConstraintViolationException; import com.roshka.DTO.PostulanteListaDTO; @@ -164,5 +165,11 @@ public class PostulanteController { - -} + @GetMapping({"/postulante/{postulanteId}"}) + public String getPostulanteDetalle(Model model, @PathVariable("postulanteId") Long postulanteId) { + Postulante p = post.findById(postulanteId).orElse(null); + model.addAttribute("postulante",p); + return "detallepostulante"; + + } + } diff --git a/curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java b/curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java index b73ee33..e7a5333 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java @@ -50,7 +50,7 @@ public String addtecnologiaView(Model model,@PathVariable(required = false) Long if(id != null ) tecnologia.setId(id); tecRepo.save(tecnologia); System.out.println(tecnologia.getNombre()); - return "redirect:/"; + return "redirect:/tecnologias"; } diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/Departamento.java b/curriculumsearch/src/main/java/com/roshka/modelo/Departamento.java index 6297df1..b0b1ffb 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/Departamento.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/Departamento.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonManagedReference; public class Departamento { @Id private Long id; + @Column(name="nombre") private String nombre; diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java index 9ca70db..cb9ef21 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java @@ -12,7 +12,7 @@ import com.roshka.modelo.Postulante; public interface PostulanteRepository extends JpaRepository { - @Query("select p from Postulante p join p.estudios e on e.institucion LIKE %?1%") + @Query("select p from Postulante p join p.estudios e on e.institucion.nombre LIKE %?1%") public List findByInstitucionEstudio(String institucion); @Query("select p from Postulante p " + @@ -33,11 +33,13 @@ public interface PostulanteRepository extends JpaRepository { "having sum(fecha_hasta-fecha_desde)>?1 * INTERVAL '1' month", nativeQuery = true ) public List personasConExperienciaMayor(long meses); + @Query("select pos from Postulante pos join PostulanteTecnologia pt on pt.postulante.id=pos.id "+ "join Tecnologia tec on pt.tecnologia.id=tec.id "+ "where tec.nombre=?1 and pt.nivel=?2") public List findByPostulanteTecnologiaM(String tecno,long idt); + @Query(value = "select DISTINCT p " + "from Postulante p join p.experiencias x " + "join p.estudios e " + @@ -49,4 +51,5 @@ public interface PostulanteRepository extends JpaRepository { "and (pt.tecnologia.id = ?5 or ?5 is null) "+ " and (e.institucion.id = ?6 or ?6 is null ) ") public List postulantesMultiFiltro(TypedParameterValue nombre, Disponibilidad disponibilidad, Long nivelInges, Long nivel, Long tecnoId, Long instId); + } diff --git a/curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp b/curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp new file mode 100644 index 0000000..1ebe5d2 --- /dev/null +++ b/curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp @@ -0,0 +1,75 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> + + + + + + + +

DETALLE POSTULANTE

+
+ +

+
+
+
+
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/curriculumsearch/src/main/webapp/jsp/index.jsp b/curriculumsearch/src/main/webapp/jsp/index.jsp index 2ee7cdc..49f9816 100644 --- a/curriculumsearch/src/main/webapp/jsp/index.jsp +++ b/curriculumsearch/src/main/webapp/jsp/index.jsp @@ -18,7 +18,7 @@ Form postulante Lista de postulantes - Tecnologias + Tecnologias Lista de convocatorias Lista de cargos diff --git a/curriculumsearch/src/main/webapp/jsp/listapostulantes.jsp b/curriculumsearch/src/main/webapp/jsp/listapostulantes.jsp new file mode 100644 index 0000000..22fe8ab --- /dev/null +++ b/curriculumsearch/src/main/webapp/jsp/listapostulantes.jsp @@ -0,0 +1,44 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> + + + + + + + +
+ ${postulante.id}
+ ${postulante.nombre}
+ ${postulante.apellido}
+ ${postulante.ci}
+ ${postulante.correo}
+ ${postulante.ciudadId}
+ ${postulante.telefono}
+ ${postulante.fechaNacimiento}
+ ${postulante.resumen}
+ ${postulante.nivelIngles}
+ ${postulante.curriculum}
+ ${postulante.estadoCivil}
+ ${postulante.nacionalidad}
+ ${postulante.tipoDocumento}
+ ${postulante.disponibilidad}


+ + ${postulante.getCiudad().getNombre()}
+ + + + + + + ${detalle_tecnologia.getTecnologia().getNombre()} + + +
+ + + + + + \ No newline at end of file diff --git a/curriculumsearch/src/main/webapp/jsp/postulantes.jsp b/curriculumsearch/src/main/webapp/jsp/postulantes.jsp index 55e2adc..c2c85e2 100644 --- a/curriculumsearch/src/main/webapp/jsp/postulantes.jsp +++ b/curriculumsearch/src/main/webapp/jsp/postulantes.jsp @@ -88,6 +88,7 @@ ${detalle_tecnologia.getTecnologia().getNombre()}${not staTec.last ? "," : ""} + Ver