diff --git a/src/com/engine/resumestorage/service/impl/ResumeIdentifyServiceImpl.java b/src/com/engine/resumestorage/service/impl/ResumeIdentifyServiceImpl.java index 71d32ad..1a7d971 100644 --- a/src/com/engine/resumestorage/service/impl/ResumeIdentifyServiceImpl.java +++ b/src/com/engine/resumestorage/service/impl/ResumeIdentifyServiceImpl.java @@ -432,6 +432,8 @@ public class ResumeIdentifyServiceImpl extends Service implements ResumeIdentify } if (obj.containsKey("学业信息")) { + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd"); + JSONArray jyjl = obj.getJSONArray("学业信息"); List> studyList = new ArrayList<>(); if (null != jyjl && jyjl.size() > 0) { @@ -452,14 +454,19 @@ public class ResumeIdentifyServiceImpl extends Service implements ResumeIdentify // 毕业时间 String[] split = jdsq.split("-"); if (split.length == 2) { - studyMap.put("bysj", split[1]); + String bysj = split[1]; + try { + dateFormat.parse(bysj); + } catch (ParseException e) { + bysj = ""; + } + studyMap.put("bysj", bysj); } studyList.add(studyMap); } } detailMap.put("jyjl", studyList); if (CollectionUtils.isNotEmpty(studyList)) { - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd"); List> sortedList = studyList.stream() .sorted((map1, map2) -> { String dateStr1 = map1.get("bysj");