From 202af5f69a2bde788649f18ab9c4315db513b3d9 Mon Sep 17 00:00:00 2001 From: Joaquin Elias Baranda Ayala Date: Mon, 8 Nov 2021 13:31:33 -0300 Subject: [PATCH] Creacion de vista Postulante Detalle --- curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java | 10 ++++++++-- curriculumsearch/src/main/java/com/roshka/modelo/Departamento.java | 1 + curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java | 5 +++++ curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ curriculumsearch/src/main/webapp/jsp/listapostulantes.jsp | 44 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 133 insertions(+), 2 deletions(-) create mode 100644 curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp create mode 100644 curriculumsearch/src/main/webapp/jsp/listapostulantes.jsp diff --git a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java index 1d0e158..34d2c4d 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java @@ -1,7 +1,7 @@ package com.roshka.controller; -import java.util.List; + import javax.validation.ConstraintViolationException; @@ -125,5 +125,11 @@ public class PostulanteController { - + @GetMapping({"/postid"}) + public String getPostulanteDetalle(Model model) { + Postulante p = post.findById(1L) .get(); + model.addAttribute("postulante",p); + return "detallepostulante"; + } + } 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 d0e958b..22de503 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java @@ -31,8 +31,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); + + + + } 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/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 -- libgit2 0.26.0