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
f5cb64e9
Commit
f5cb64e9
authored
Nov 22, 2021
by
Joel Florentin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
se agrego unidad de tiempo(mes y year) de experiencia en listado postulante
parent
19ea8a2d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
4 deletions
+25
-4
curriculumsearch/src/main/java/com/roshka/utils/Helper.java
+10
-3
curriculumsearch/src/main/webapp/jsp/postulantes.jsp
+15
-1
No files found.
curriculumsearch/src/main/java/com/roshka/utils/Helper.java
View file @
f5cb64e9
...
@@ -7,6 +7,7 @@ import java.time.YearMonth;
...
@@ -7,6 +7,7 @@ import java.time.YearMonth;
import
java.time.ZoneOffset
;
import
java.time.ZoneOffset
;
import
java.time.temporal.ChronoUnit
;
import
java.time.temporal.ChronoUnit
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.concurrent.TimeUnit
;
import
com.roshka.modelo.DBFile
;
import
com.roshka.modelo.DBFile
;
...
@@ -31,12 +32,18 @@ public class Helper {
...
@@ -31,12 +32,18 @@ public class Helper {
}
}
}
}
/**
* Diferencia en meses entre 2 fechas.
* @param date1 La fecha inicial. No puede ser nulo
* @param date2 La fecha final. Si es nulo, se asume a la fecha de hoy
* @return
*/
public
static
final
long
getMonthsDifference
(
Date
date1
,
Date
date2
)
{
public
static
final
long
getMonthsDifference
(
Date
date1
,
Date
date2
)
{
if
(
date2
==
null
)
date2
=
new
Date
();
if
(
date2
==
null
)
date2
=
new
Date
();
YearMonth
m1
=
YearMonth
.
from
(
date1
.
toInstant
().
atZone
(
ZoneOffset
.
UTC
));
long
diffInMillies
=
Math
.
abs
(
date2
.
getTime
()
-
date1
.
getTime
(
));
YearMonth
m2
=
YearMonth
.
from
(
date2
.
toInstant
().
atZone
(
ZoneOffset
.
UTC
)
);
long
diff
=
TimeUnit
.
DAYS
.
convert
(
diffInMillies
,
TimeUnit
.
MILLISECONDS
);
return
m1
.
until
(
m2
,
ChronoUnit
.
MONTHS
)
+
1
;
return
Math
.
round
(
diff
/
30
.
d
)
;
}
}
public
static
DBFile
createFile
(
MultipartFile
file
)
{
public
static
DBFile
createFile
(
MultipartFile
file
)
{
...
...
curriculumsearch/src/main/webapp/jsp/postulantes.jsp
View file @
f5cb64e9
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://kwonnam.pe.kr/jsp/template-inheritance" prefix="layout"%>
<%@ taglib uri="http://kwonnam.pe.kr/jsp/template-inheritance" prefix="layout"%>
...
@@ -190,7 +191,20 @@
...
@@ -190,7 +191,20 @@
<td>${postulante.nombre} ${postulante.apellido}</td>
<td>${postulante.nombre} ${postulante.apellido}</td>
<td>${postulante.disponibilidad.getDescripcion()}</td>
<td>${postulante.disponibilidad.getDescripcion()}</td>
<td>${postulante.nivelIngles}</td>
<td>${postulante.nivelIngles}</td>
<td>${postulante.experienciaMeses}<op></td>
<td><c:choose>
<c:when test = "${postulante.experienciaMeses < 12}">
${postulante.experienciaMeses} mes<c:if test="${postulante.experienciaMeses > 1}">es</c:if>
</c:when>
<c:when test = "${postulante.experienciaMeses > 12}">
<fmt:parseNumber var="j" integerOnly="true" type="number" value="${postulante.experienciaMeses / 12}" />
<fmt:parseNumber var="k" integerOnly="true" type="number" value="${postulante.experienciaMeses % 12}" />
${j} año<c:if test="${postulante.experienciaMeses >= 24}">s</c:if> <c:if test="${k > 0}"> y ${k} mes<c:if test="${k > 1}">es</c:if></c:if>
</c:when>
</c:choose>
</td>
<td>
<td>
<c:forEach items="${postulante.tecnologias}" var="detalle_tecnologia" varStatus="staTec">
<c:forEach items="${postulante.tecnologias}" var="detalle_tecnologia" varStatus="staTec">
${detalle_tecnologia.getTecnologia().getNombre()}${not staTec.last ? "," : ""}
${detalle_tecnologia.getTecnologia().getNombre()}${not staTec.last ? "," : ""}
...
...
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