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
1
Merge Requests
1
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
Oscar Enrique Gonzalez Escurra
th-app-java
Commits
2e26d315
Commit
2e26d315
authored
Nov 24, 2021
by
Joel Florentin
Browse files
Options
Browse Files
Download
Plain Diff
merge con giuli. filtro de experiencia con rangos
parents
39b53be9
c1424969
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
16 deletions
+26
-16
curriculumsearch/src/main/java/com/roshka/controller/PostulanteRRHHController.java
+19
-10
curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java
+2
-2
curriculumsearch/src/main/webapp/jsp/postulantes.jsp
+5
-4
No files found.
curriculumsearch/src/main/java/com/roshka/controller/PostulanteRRHHController.java
View file @
2e26d315
...
@@ -4,12 +4,7 @@ package com.roshka.controller;
...
@@ -4,12 +4,7 @@ package com.roshka.controller;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.text.DateFormat
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
...
@@ -93,7 +88,7 @@ public class PostulanteRRHHController {
...
@@ -93,7 +88,7 @@ public class PostulanteRRHHController {
@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
)
Long
instId
,
@RequestParam
(
required
=
false
)
Lo
ng
expInMonths
,
@RequestParam
(
required
=
false
)
Stri
ng
expInMonths
,
@RequestParam
(
required
=
false
)
Long
cargoId
,
@RequestParam
(
required
=
false
)
Long
cargoId
,
@RequestParam
(
required
=
false
)
Long
convId
,
@RequestParam
(
required
=
false
)
Long
convId
,
@RequestParam
(
defaultValue
=
"0"
)
Integer
nroPagina
@RequestParam
(
defaultValue
=
"0"
)
Integer
nroPagina
...
@@ -114,11 +109,18 @@ public class PostulanteRRHHController {
...
@@ -114,11 +109,18 @@ public class PostulanteRRHHController {
// TODO Auto-generated catch block
// TODO Auto-generated catch block
er
.
printStackTrace
();
er
.
printStackTrace
();
}
}
long
infRange
=
0L
;
long
supRange
=
1200L
;
if
(
expInMonths
!=
null
&&
!
expInMonths
.
trim
().
isEmpty
()){
String
[]
rango
=
expInMonths
.
split
(
"-"
);
infRange
=
Long
.
parseLong
(
rango
[
0
]);
supRange
=
Long
.
parseLong
(
rango
[
1
]);
}
Page
<
Postulante
>
postulantesPag
=
post
.
postulantesMultiFiltro
(
Page
<
Postulante
>
postulantesPag
=
post
.
postulantesMultiFiltro
(
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
,
expInMonths
);
lvlEng
,
lvlTec
,
tecId
,
instId
,
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
<>();
...
@@ -148,17 +150,24 @@ public class PostulanteRRHHController {
...
@@ -148,17 +150,24 @@ public class PostulanteRRHHController {
@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
)
Long
instId
,
@RequestParam
(
required
=
false
)
Lo
ng
expInMonths
,
@RequestParam
(
required
=
false
)
Stri
ng
expInMonths
,
@RequestParam
(
required
=
false
)
Long
cargoId
,
@RequestParam
(
required
=
false
)
Long
cargoId
,
@RequestParam
(
required
=
false
)
Long
convId
,
@RequestParam
(
required
=
false
)
Long
convId
,
@RequestParam
(
defaultValue
=
"0"
)
Integer
nroPagina
@RequestParam
(
defaultValue
=
"0"
)
Integer
nroPagina
)
throws
IOException
{
)
throws
IOException
{
Pageable
page
=
PageRequest
.
of
(
0
,
Integer
.
MAX_VALUE
,
Sort
.
by
(
"id"
));
Pageable
page
=
PageRequest
.
of
(
0
,
Integer
.
MAX_VALUE
,
Sort
.
by
(
"id"
));
long
infRange
=
0L
;
long
supRange
=
1200L
;
if
(
expInMonths
!=
null
&&
!
expInMonths
.
trim
().
isEmpty
()){
String
[]
rango
=
expInMonths
.
split
(
"-"
);
infRange
=
Long
.
parseLong
(
rango
[
0
]);
supRange
=
Long
.
parseLong
(
rango
[
1
]);
}
Page
<
Postulante
>
postulantesPag
=
post
.
postulantesMultiFiltro
(
Page
<
Postulante
>
postulantesPag
=
post
.
postulantesMultiFiltro
(
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
,
expInMonths
);
lvlEng
,
lvlTec
,
tecId
,
instId
,
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
<>();
...
...
curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java
View file @
2e26d315
...
@@ -61,10 +61,10 @@ public interface PostulanteRepository extends JpaRepository<Postulante,Long> {
...
@@ -61,10 +61,10 @@ public interface PostulanteRepository extends JpaRepository<Postulante,Long> {
" 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
or ?9 is null
) "
)
"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
,
Long
instId
,
Long
cargoId
,
Pageable
pageable
,
EstadoPostulante
estado
,
Long
convo
,
Long
expInMonths
);
Long
convo
,
Long
infRangeExp
,
Long
supRangeExp
);
@Transactional
@Transactional
@Modifying
@Modifying
...
...
curriculumsearch/src/main/webapp/jsp/postulantes.jsp
View file @
2e26d315
...
@@ -59,10 +59,11 @@
...
@@ -59,10 +59,11 @@
<div class="col-auto col-md-8">
<div class="col-auto col-md-8">
<select class="form-select form-select-sm " name="expInMonths" id="expInMonths">
<select class="form-select form-select-sm " name="expInMonths" id="expInMonths">
<option value="">Todas</option>
<option value="">Todas</option>
<option value="6">Mayor a 6 meses</option>
<option value="0-6">Menor a 6 meses</option>
<option value="12">Mayor a 1 año</option>
<option value="0-12">Menor a 1 año</option>
<option value="36">Mayor a 3 años</option>
<option value="0-36">Menor a 3 años</option>
<option value="60">Mayor a 5 años</option>
<option value="0-60">Menor a 5 años</option>
<option value="60-1200">Mayor a 5 años</option>
</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