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
f5616336
Commit
f5616336
authored
3 years ago
by
willgonzz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Filtro de busqueda para convocatorias
parent
fd8a70fe
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
5 deletions
+29
-5
curriculumsearch/src/main/java/com/roshka/DTO/PostulanteListaDTO.java
+14
-1
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
+4
-2
curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java
+4
-2
curriculumsearch/src/main/webapp/jsp/postulantes.jsp
+7
-0
No files found.
curriculumsearch/src/main/java/com/roshka/DTO/PostulanteListaDTO.java
View file @
f5616336
...
...
@@ -2,6 +2,7 @@ package com.roshka.DTO;
import
java.util.List
;
import
com.roshka.modelo.ConvocatoriaCargo
;
import
com.roshka.modelo.Disponibilidad
;
import
com.roshka.modelo.EstadoPostulante
;
import
com.roshka.modelo.PostulanteTecnologia
;
...
...
@@ -15,8 +16,10 @@ public class PostulanteListaDTO {
private
Long
experienciaMeses
;
private
List
<
PostulanteTecnologia
>
tecnologias
;
private
EstadoPostulante
estado
;
private
List
<
ConvocatoriaCargo
>
convocatoria
;
public
PostulanteListaDTO
(
Long
id
,
String
nombre
,
String
apellido
,
Disponibilidad
disponibilidad
,
Long
nivelIngles
,
Long
experienciaMeses
,
List
<
PostulanteTecnologia
>
tecnologias
,
EstadoPostulante
estado
)
{
Long
nivelIngles
,
Long
experienciaMeses
,
List
<
PostulanteTecnologia
>
tecnologias
,
EstadoPostulante
estado
,
List
<
ConvocatoriaCargo
>
convocatoria
)
{
this
.
id
=
id
;
this
.
nombre
=
nombre
;
this
.
apellido
=
apellido
;
...
...
@@ -25,6 +28,7 @@ public class PostulanteListaDTO {
this
.
experienciaMeses
=
experienciaMeses
;
this
.
tecnologias
=
tecnologias
;
this
.
estado
=
estado
;
this
.
convocatoria
=
convocatoria
;
}
public
Long
getId
()
{
return
id
;
...
...
@@ -74,6 +78,15 @@ public class PostulanteListaDTO {
public
void
setEstado
(
EstadoPostulante
estado
){
this
.
estado
=
estado
;
}
public
List
<
ConvocatoriaCargo
>
getConvocatoria
()
{
return
this
.
convocatoria
;
}
public
void
setConvocatoria
(
List
<
ConvocatoriaCargo
>
convocatoria
)
{
this
.
convocatoria
=
convocatoria
;
}
}
This diff is collapsed.
Click to expand it.
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
View file @
f5616336
...
...
@@ -99,6 +99,7 @@ public class PostulanteController {
@RequestParam
(
required
=
false
)
Long
instId
,
@RequestParam
(
required
=
false
)
Long
expInMonths
,
@RequestParam
(
required
=
false
)
Long
cargoId
,
@RequestParam
(
required
=
false
)
Long
convId
,
@RequestParam
(
defaultValue
=
"0"
)
Integer
nroPagina
)
{
final
Integer
CANTIDAD_POR_PAGINA
=
5
;
...
...
@@ -107,7 +108,8 @@ public class PostulanteController {
model
.
addAttribute
(
"disponibilidades"
,
Disponibilidad
.
values
());
model
.
addAttribute
(
"institucionesEducativas"
,
institucionRepository
.
findAll
());
model
.
addAttribute
(
"estadoP"
,
EstadoPostulante
.
values
());
Page
<
Postulante
>
postulantesPag
=
post
.
postulantesMultiFiltro
(
nombre
==
null
||
nombre
.
trim
().
isEmpty
()
?
new
TypedParameterValue
(
StringType
.
INSTANCE
,
null
)
:
new
TypedParameterValue
(
StringType
.
INSTANCE
,
"%"
+
nombre
+
"%"
),
dispo
,
lvlEng
,
lvlTec
,
tecId
,
instId
,
cargoId
,
page
,
estado
);
model
.
addAttribute
(
"convocatoriaC"
,
cargoRepo
.
findAll
());
Page
<
Postulante
>
postulantesPag
=
post
.
postulantesMultiFiltro
(
nombre
==
null
||
nombre
.
trim
().
isEmpty
()
?
new
TypedParameterValue
(
StringType
.
INSTANCE
,
null
)
:
new
TypedParameterValue
(
StringType
.
INSTANCE
,
"%"
+
nombre
+
"%"
),
dispo
,
lvlEng
,
lvlTec
,
tecId
,
instId
,
cargoId
,
page
,
estado
,
convId
);
List
<
Postulante
>
postulantes
=
postulantesPag
.
getContent
();
List
<
PostulanteListaDTO
>
postulantesDTO
=
new
ArrayList
<>();
...
...
@@ -119,7 +121,7 @@ public class PostulanteController {
expTotal
+=
Helper
.
getMonthsDifference
(
experiencia
.
getFechaDesde
(),
experiencia
.
getFechaHasta
());
}
if
(
expInMonths
!=
null
&&
expInMonths
>
expTotal
)
continue
;
postulantesDTO
.
add
(
new
PostulanteListaDTO
(
postulante
.
getId
(),
postulante
.
getNombre
(),
postulante
.
getApellido
(),
postulante
.
getDisponibilidad
(),
postulante
.
getNivelIngles
(),
expTotal
,
postulante
.
getTecnologias
(),
postulante
.
getEstadoPostulante
()));
postulantesDTO
.
add
(
new
PostulanteListaDTO
(
postulante
.
getId
(),
postulante
.
getNombre
(),
postulante
.
getApellido
(),
postulante
.
getDisponibilidad
(),
postulante
.
getNivelIngles
(),
expTotal
,
postulante
.
getTecnologias
(),
postulante
.
getEstadoPostulante
()
,
postulante
.
getPostulaciones
()
));
}
model
.
addAttribute
(
"pages"
,
postulantesPag
.
getTotalPages
());
...
...
This diff is collapsed.
Click to expand it.
curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java
View file @
f5616336
...
...
@@ -11,6 +11,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
import
org.springframework.data.jpa.repository.Modifying
;
import
org.springframework.data.jpa.repository.Query
;
import
com.roshka.modelo.ConvocatoriaCargo
;
import
com.roshka.modelo.Disponibilidad
;
import
com.roshka.modelo.EstadoPostulante
;
import
com.roshka.modelo.Postulante
;
...
...
@@ -60,8 +61,9 @@ public interface PostulanteRepository extends JpaRepository<Postulante,Long> {
"and (pt.tecnologia.id = ?5 or ?5 is null) "
+
" and (e.institucion.id = ?6 or ?6 is null ) "
+
" and (conv.cargoId = ?7 or ?7 is null ) "
+
"and (p.estadoPostulante = ?8 or ?8 is null) "
)
public
Page
<
Postulante
>
postulantesMultiFiltro
(
TypedParameterValue
nombre
,
Disponibilidad
disponibilidad
,
Long
nivelInges
,
Long
nivel
,
Long
tecnoId
,
Long
instId
,
Long
cargoId
,
Pageable
pageable
,
EstadoPostulante
estado
);
"and (p.estadoPostulante = ?8 or ?8 is null) "
+
" and (conv.id=?9 or ?9 is null ) "
)
public
Page
<
Postulante
>
postulantesMultiFiltro
(
TypedParameterValue
nombre
,
Disponibilidad
disponibilidad
,
Long
nivelInges
,
Long
nivel
,
Long
tecnoId
,
Long
instId
,
Long
cargoId
,
Pageable
pageable
,
EstadoPostulante
estado
,
Long
convo
);
@Transactional
@Modifying
...
...
This diff is collapsed.
Click to expand it.
curriculumsearch/src/main/webapp/jsp/postulantes.jsp
View file @
f5616336
...
...
@@ -73,6 +73,13 @@
<option
value=
"36"
>
Mayor a 3 años
</option>
<option
value=
"60"
>
Mayor a 5 años
</option>
</select>
<label
for=
"convId"
>
convocatoria
</label>
<select
name=
"convId"
id=
"convId"
>
<option
value=
""
>
Seleccione una opcion
</option>
<c:forEach
items=
"${convocatoriaC}"
var=
"convo"
>
<option
value=
"${convo.id}"
${
param
.
convId =
=
convo
.
id
?
"
selected
"
:
""}
>
${convo.getCargo().getNombre()}
</option>
</c:forEach>
</select>
</form>
</div>
...
...
This diff is collapsed.
Click to expand it.
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