Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
th-app-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amparo Oliver
th-app-java
Commits
9a8264d4
Commit
9a8264d4
authored
Nov 25, 2021
by
Joel Florentin
Browse files
Options
Browse Files
Download
Plain Diff
merge joaquin
parents
e87222a2
2b73122c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
14 deletions
+19
-14
curriculumsearch/src/main/java/com/roshka/controller/PostulanteRRHHController.java
+7
-6
curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java
+6
-2
curriculumsearch/src/main/java/com/roshka/utils/PostulantesExcelExporter.java
+2
-2
curriculumsearch/src/main/webapp/jsp/postulantes.jsp
+4
-4
No files found.
curriculumsearch/src/main/java/com/roshka/controller/PostulanteRRHHController.java
View file @
9a8264d4
...
@@ -8,6 +8,7 @@ import com.roshka.DTO.PostulanteListaDTO;
...
@@ -8,6 +8,7 @@ import com.roshka.DTO.PostulanteListaDTO;
import
com.roshka.modelo.DBFile
;
import
com.roshka.modelo.DBFile
;
import
com.roshka.modelo.EstadoPostulante
;
import
com.roshka.modelo.EstadoPostulante
;
import
com.roshka.modelo.Postulante
;
import
com.roshka.modelo.Postulante
;
import
com.roshka.modelo.TipoDeEstudio
;
import
com.roshka.repositorio.*
;
import
com.roshka.repositorio.*
;
import
com.roshka.service.PdfGenerator
;
import
com.roshka.service.PdfGenerator
;
import
com.roshka.utils.PostulantesExcelExporter
;
import
com.roshka.utils.PostulantesExcelExporter
;
...
@@ -82,7 +83,7 @@ public class PostulanteRRHHController {
...
@@ -82,7 +83,7 @@ public class PostulanteRRHHController {
@RequestParam
(
required
=
false
)
EstadoPostulante
estado
,
@RequestParam
(
required
=
false
)
EstadoPostulante
estado
,
@RequestParam
(
required
=
false
)
Long
lvlEng
,
@RequestParam
(
required
=
false
)
Long
lvlEng
,
@RequestParam
(
required
=
false
)
Long
lvlTec
,
@RequestParam
(
required
=
false
)
Long
lvlTec
,
@RequestParam
(
required
=
false
)
Long
instId
,
@RequestParam
(
required
=
false
)
TipoDeEstudio
tipoest
,
@RequestParam
(
required
=
false
)
String
expInMonths
,
@RequestParam
(
required
=
false
)
String
expInMonths
,
@RequestParam
(
required
=
false
)
Long
cargoId
,
@RequestParam
(
required
=
false
)
Long
cargoId
,
@RequestParam
(
required
=
false
)
Long
convId
,
@RequestParam
(
required
=
false
)
Long
convId
,
...
@@ -92,7 +93,7 @@ public class PostulanteRRHHController {
...
@@ -92,7 +93,7 @@ public class PostulanteRRHHController {
final
Integer
CANTIDAD_POR_PAGINA
=
10
;
final
Integer
CANTIDAD_POR_PAGINA
=
10
;
Pageable
page
=
PageRequest
.
of
(
nroPagina
,
CANTIDAD_POR_PAGINA
,
Sort
.
by
(
"id"
));
Pageable
page
=
PageRequest
.
of
(
nroPagina
,
CANTIDAD_POR_PAGINA
,
Sort
.
by
(
"id"
));
model
.
addAttribute
(
"tecnologias"
,
tecRepo
.
findAll
());
model
.
addAttribute
(
"tecnologias"
,
tecRepo
.
findAll
());
model
.
addAttribute
(
"
institucionesEducativas"
,
institucionRepository
.
findAll
());
model
.
addAttribute
(
"
tiposDeEstudios"
,
TipoDeEstudio
.
values
());
model
.
addAttribute
(
"estadoP"
,
EstadoPostulante
.
values
());
model
.
addAttribute
(
"estadoP"
,
EstadoPostulante
.
values
());
model
.
addAttribute
(
"cargos"
,
carRepo
.
findAll
());
model
.
addAttribute
(
"cargos"
,
carRepo
.
findAll
());
...
@@ -118,7 +119,7 @@ public class PostulanteRRHHController {
...
@@ -118,7 +119,7 @@ public class PostulanteRRHHController {
nombre
==
null
||
nombre
.
trim
().
isEmpty
()
?
nombre
==
null
||
nombre
.
trim
().
isEmpty
()
?
new
TypedParameterValue
(
StringType
.
INSTANCE
,
null
)
:
new
TypedParameterValue
(
StringType
.
INSTANCE
,
null
)
:
new
TypedParameterValue
(
StringType
.
INSTANCE
,
"%"
+
nombre
.
trim
()+
"%"
),
new
TypedParameterValue
(
StringType
.
INSTANCE
,
"%"
+
nombre
.
trim
()+
"%"
),
lvlEng
,
lvlTec
,
tecId
,
instId
,
cargoId
,
page
,
estado
,
convId
,
infRange
,
supRange
);
lvlEng
,
lvlTec
,
tecId
,
tipoest
,
cargoId
,
page
,
estado
,
convId
,
infRange
,
supRange
);
model
.
addAttribute
(
"numeroOcurrencias"
,
postulantesPag
.
getTotalElements
());
model
.
addAttribute
(
"numeroOcurrencias"
,
postulantesPag
.
getTotalElements
());
List
<
Postulante
>
postulantes
=
postulantesPag
.
getContent
();
List
<
Postulante
>
postulantes
=
postulantesPag
.
getContent
();
List
<
PostulanteListaDTO
>
postulantesDTO
=
new
ArrayList
<>();
List
<
PostulanteListaDTO
>
postulantesDTO
=
new
ArrayList
<>();
...
@@ -147,7 +148,7 @@ public class PostulanteRRHHController {
...
@@ -147,7 +148,7 @@ public class PostulanteRRHHController {
@RequestParam
(
required
=
false
)
EstadoPostulante
estado
,
@RequestParam
(
required
=
false
)
EstadoPostulante
estado
,
@RequestParam
(
required
=
false
)
Long
lvlEng
,
@RequestParam
(
required
=
false
)
Long
lvlEng
,
@RequestParam
(
required
=
false
)
Long
lvlTec
,
@RequestParam
(
required
=
false
)
Long
lvlTec
,
@RequestParam
(
required
=
false
)
Long
instId
,
@RequestParam
(
required
=
false
)
TipoDeEstudio
tipoest
,
@RequestParam
(
required
=
false
)
String
expInMonths
,
@RequestParam
(
required
=
false
)
String
expInMonths
,
@RequestParam
(
required
=
false
)
Long
cargoId
,
@RequestParam
(
required
=
false
)
Long
cargoId
,
@RequestParam
(
required
=
false
)
Long
convId
,
@RequestParam
(
required
=
false
)
Long
convId
,
...
@@ -165,7 +166,7 @@ public class PostulanteRRHHController {
...
@@ -165,7 +166,7 @@ public class PostulanteRRHHController {
nombre
==
null
||
nombre
.
trim
().
isEmpty
()
?
nombre
==
null
||
nombre
.
trim
().
isEmpty
()
?
new
TypedParameterValue
(
StringType
.
INSTANCE
,
null
)
:
new
TypedParameterValue
(
StringType
.
INSTANCE
,
null
)
:
new
TypedParameterValue
(
StringType
.
INSTANCE
,
"%"
+
nombre
+
"%"
),
new
TypedParameterValue
(
StringType
.
INSTANCE
,
"%"
+
nombre
+
"%"
),
lvlEng
,
lvlTec
,
tecId
,
instId
,
cargoId
,
page
,
estado
,
convId
,
infRange
,
supRange
);
lvlEng
,
lvlTec
,
tecId
,
tipoest
,
cargoId
,
page
,
estado
,
convId
,
infRange
,
supRange
);
List
<
Postulante
>
postulantes
=
postulantesPag
.
getContent
();
List
<
Postulante
>
postulantes
=
postulantesPag
.
getContent
();
List
<
PostulanteListaDTO
>
postulantesDTO
=
new
ArrayList
<>();
List
<
PostulanteListaDTO
>
postulantesDTO
=
new
ArrayList
<>();
...
@@ -189,7 +190,7 @@ public class PostulanteRRHHController {
...
@@ -189,7 +190,7 @@ public class PostulanteRRHHController {
filtros
.
put
(
"nivelIngles"
,
lvlEng
==
null
?
"-"
:
lvlEng
.
toString
());
filtros
.
put
(
"nivelIngles"
,
lvlEng
==
null
?
"-"
:
lvlEng
.
toString
());
filtros
.
put
(
"tecnologia"
,
tecId
==
null
?
"-"
:
tecRepo
.
findById
(
tecId
).
get
().
getNombre
());
filtros
.
put
(
"tecnologia"
,
tecId
==
null
?
"-"
:
tecRepo
.
findById
(
tecId
).
get
().
getNombre
());
filtros
.
put
(
"nivelTecnologia"
,
lvlTec
==
null
?
"-"
:
lvlTec
.
toString
());
filtros
.
put
(
"nivelTecnologia"
,
lvlTec
==
null
?
"-"
:
lvlTec
.
toString
());
filtros
.
put
(
"
institucion"
,
instId
==
null
?
"-"
:
institucionRepository
.
findById
(
instId
).
get
().
getNombr
e
());
filtros
.
put
(
"
tipoDeEstudio"
,
tipoest
==
null
?
"-"
:
tipoest
.
getNam
e
());
filtros
.
put
(
"estado"
,
estado
==
null
?
"-"
:
estado
.
getEstado
());
filtros
.
put
(
"estado"
,
estado
==
null
?
"-"
:
estado
.
getEstado
());
filtros
.
put
(
"experienciaEnMeses"
,
expInMonths
==
null
?
"-"
:
expInMonths
.
toString
());
filtros
.
put
(
"experienciaEnMeses"
,
expInMonths
==
null
?
"-"
:
expInMonths
.
toString
());
filtros
.
put
(
"convocatoria"
,
convId
==
null
?
"-"
:
convRepo
.
findById
(
convId
).
get
().
getCargo
().
getNombre
());
filtros
.
put
(
"convocatoria"
,
convId
==
null
?
"-"
:
convRepo
.
findById
(
convId
).
get
().
getCargo
().
getNombre
());
...
...
curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java
View file @
9a8264d4
...
@@ -2,6 +2,8 @@ package com.roshka.repositorio;
...
@@ -2,6 +2,8 @@ package com.roshka.repositorio;
import
com.roshka.modelo.EstadoPostulante
;
import
com.roshka.modelo.EstadoPostulante
;
import
com.roshka.modelo.Postulante
;
import
com.roshka.modelo.Postulante
;
import
com.roshka.modelo.TipoDeEstudio
;
import
org.hibernate.jpa.TypedParameterValue
;
import
org.hibernate.jpa.TypedParameterValue
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
...
@@ -20,6 +22,7 @@ public interface PostulanteRepository extends JpaRepository<Postulante,Long> {
...
@@ -20,6 +22,7 @@ public interface PostulanteRepository extends JpaRepository<Postulante,Long> {
@Query
(
"select p from Postulante p join p.estudios e on e.institucion.nombre LIKE %?1%"
)
@Query
(
"select p from Postulante p join p.estudios e on e.institucion.nombre LIKE %?1%"
)
public
List
<
Postulante
>
findByInstitucionEstudio
(
String
institucion
);
public
List
<
Postulante
>
findByInstitucionEstudio
(
String
institucion
);
@Query
(
"select p from Postulante p "
+
@Query
(
"select p from Postulante p "
+
"JOIN PostulanteTecnologia pt ON pt.postulante.id = p.id "
+
"JOIN PostulanteTecnologia pt ON pt.postulante.id = p.id "
+
"JOIN Tecnologia t ON t.id = pt.tecnologia.id "
+
"JOIN Tecnologia t ON t.id = pt.tecnologia.id "
+
...
@@ -54,13 +57,14 @@ public interface PostulanteRepository extends JpaRepository<Postulante,Long> {
...
@@ -54,13 +57,14 @@ public interface PostulanteRepository extends JpaRepository<Postulante,Long> {
"and (p.nivelIngles >= ?2 or ?2 is null) "
+
"and (p.nivelIngles >= ?2 or ?2 is null) "
+
"and (pt.nivel >= ?3 or ?3 is null) "
+
"and (pt.nivel >= ?3 or ?3 is null) "
+
"and (pt.tecnologia.id = ?4 or ?4 is null) "
+
"and (pt.tecnologia.id = ?4 or ?4 is null) "
+
" and (e.institucion.id = ?5 or ?5 is null ) "
+
// " and (e.institucion.id = ?5 or ?5 is null ) "+
" and (e.tipoDeEstudio = ?5 or ?5 is null ) "
+
" and (conv.cargoId = ?6 or ?6 is null ) "
+
" and (conv.cargoId = ?6 or ?6 is null ) "
+
"and (p.estadoPostulante = ?7 or ?7 is null) "
+
"and (p.estadoPostulante = ?7 or ?7 is null) "
+
" and (conv.id=?8 or ?8 is null ) "
+
" and (conv.id=?8 or ?8 is null ) "
+
"and (p.mesesDeExperiencia >= ?9 and p.mesesDeExperiencia <= ?10 ) "
)
"and (p.mesesDeExperiencia >= ?9 and p.mesesDeExperiencia <= ?10 ) "
)
public
Page
<
Postulante
>
postulantesMultiFiltro
(
TypedParameterValue
nombre
,
Long
nivelInges
,
Long
nivel
,
Long
tecnoId
,
public
Page
<
Postulante
>
postulantesMultiFiltro
(
TypedParameterValue
nombre
,
Long
nivelInges
,
Long
nivel
,
Long
tecnoId
,
Long
instId
,
Long
cargoId
,
Pageable
pageable
,
EstadoPostulante
estado
,
TipoDeEstudio
tipoDeEstudio
,
Long
cargoId
,
Pageable
pageable
,
EstadoPostulante
estado
,
Long
convo
,
Long
infRangeExp
,
Long
supRangeExp
);
Long
convo
,
Long
infRangeExp
,
Long
supRangeExp
);
@Transactional
@Transactional
...
...
curriculumsearch/src/main/java/com/roshka/utils/PostulantesExcelExporter.java
View file @
9a8264d4
...
@@ -59,7 +59,7 @@ public class PostulantesExcelExporter {
...
@@ -59,7 +59,7 @@ public class PostulantesExcelExporter {
createCell
(
row
,
2
,
"Experiencia (Meses)"
,
style
);
createCell
(
row
,
2
,
"Experiencia (Meses)"
,
style
);
createCell
(
row
,
3
,
"Tecnologias"
,
style
);
createCell
(
row
,
3
,
"Tecnologias"
,
style
);
createCell
(
row
,
4
,
"Nivel Tecnologia"
,
style
);
createCell
(
row
,
4
,
"Nivel Tecnologia"
,
style
);
createCell
(
row
,
5
,
"
Institucion
"
,
style
);
createCell
(
row
,
5
,
"
Tipo de estudio
"
,
style
);
createCell
(
row
,
6
,
"Estado"
,
style
);
createCell
(
row
,
6
,
"Estado"
,
style
);
createCell
(
row
,
7
,
"Convocatoria"
,
style
);
createCell
(
row
,
7
,
"Convocatoria"
,
style
);
createCell
(
row
,
8
,
"Fecha Inicio Convocatoria"
,
style
);
createCell
(
row
,
8
,
"Fecha Inicio Convocatoria"
,
style
);
...
@@ -118,7 +118,7 @@ public class PostulantesExcelExporter {
...
@@ -118,7 +118,7 @@ public class PostulantesExcelExporter {
createCell
(
row
,
2
,
filtros
.
get
(
"experienciaEnMeses"
),
style
);
createCell
(
row
,
2
,
filtros
.
get
(
"experienciaEnMeses"
),
style
);
createCell
(
row
,
3
,
filtros
.
get
(
"tecnologia"
),
style
);
createCell
(
row
,
3
,
filtros
.
get
(
"tecnologia"
),
style
);
createCell
(
row
,
4
,
filtros
.
get
(
"nivelTecnologia"
),
style
);
createCell
(
row
,
4
,
filtros
.
get
(
"nivelTecnologia"
),
style
);
createCell
(
row
,
5
,
filtros
.
get
(
"
institucion
"
),
style
);
createCell
(
row
,
5
,
filtros
.
get
(
"
tipoDeEstudio
"
),
style
);
createCell
(
row
,
6
,
filtros
.
get
(
"estado"
),
style
);
createCell
(
row
,
6
,
filtros
.
get
(
"estado"
),
style
);
createCell
(
row
,
7
,
filtros
.
get
(
"convocatoria"
),
style
);
createCell
(
row
,
7
,
filtros
.
get
(
"convocatoria"
),
style
);
createCell
(
row
,
8
,
filtros
.
get
(
"convocatoriaFecha"
),
style
);
createCell
(
row
,
8
,
filtros
.
get
(
"convocatoriaFecha"
),
style
);
...
...
curriculumsearch/src/main/webapp/jsp/postulantes.jsp
View file @
9a8264d4
...
@@ -100,14 +100,14 @@
...
@@ -100,14 +100,14 @@
<div class="col">
<div class="col">
<div class="row">
<div class="row">
<div class="col-auto col-md-4">
<div class="col-auto col-md-4">
<label class="form-label" for="
instId">Institución Educativa
</label>
<label class="form-label" for="
tipoest">Tipo de estudio
</label>
</div>
</div>
<div class="col-auto col-md-8">
<div class="col-auto col-md-8">
<select class="form-select form-select-sm " name="
instId" id="instId
">
<select class="form-select form-select-sm " name="
tipoest" id="tipoest
">
<option value="">Todas</option>
<option value="">Todas</option>
<c:forEach items="${
institucionesEducativa
s}" var="inst">
<c:forEach items="${
tiposDeEstudio
s}" var="inst">
<option value="${inst
.id}" ${param.instId == inst.id ? "selected" : ""}>${inst.nombre
}</option>
<option value="${inst
}" ${param.tipoest == inst ? "selected" : ""}>${inst.getName()
}</option>
</c:forEach>
</c:forEach>
</select>
</select>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment