From 065f559b4eee4e0d68024415e1e4df637406fd09 Mon Sep 17 00:00:00 2001 From: dxfeng Date: Tue, 4 Jun 2024 17:17:17 +0800 Subject: [PATCH] =?UTF-8?q?BUG-=E7=AE=80=E5=8E=86=E8=AF=86=E5=88=AB?= =?UTF-8?q?=EF=BC=8C=E6=8A=95=E9=80=92=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ResumeRecognitionServiceImpl.java | 53 +++++++++++-------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/src/com/engine/recruit/service/impl/ResumeRecognitionServiceImpl.java b/src/com/engine/recruit/service/impl/ResumeRecognitionServiceImpl.java index 4166086..eb2fd40 100644 --- a/src/com/engine/recruit/service/impl/ResumeRecognitionServiceImpl.java +++ b/src/com/engine/recruit/service/impl/ResumeRecognitionServiceImpl.java @@ -20,6 +20,7 @@ import org.apache.http.entity.mime.MultipartEntityBuilder; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; +import weaver.common.DateUtil; import weaver.conn.RecordSet; import weaver.file.ImageFileManager; import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil; @@ -304,7 +305,8 @@ public class ResumeRecognitionServiceImpl extends Service implements ResumeRecog new BaseBean().writeLog(obj.toJSONString()); Map dataMap = new HashMap<>(16); JSONObject personalInformation = obj.getJSONObject("个人信息"); - + // 投递时间 + dataMap.put("tdsj", DateUtil.getDateTime()); // 姓名 String xm = personalInformation.getString("姓名"); dataMap.put("xm", xm); @@ -598,33 +600,40 @@ public class ResumeRecognitionServiceImpl extends Service implements ResumeRecog * @return */ private RecruitDataMap getDateRange(String date, boolean isStudy) { - RecruitDataMap dataRangeMap = new RecruitDataMap<>(); + RecruitDataMap dataRangeMap = new RecruitDataMap(); if (StringUtils.isBlank(date)) { return dataRangeMap; - } - String[] split = date.split("-"); - if (split.length == 2) { - String start = getFormatDate(split[0]); - String end = getFormatDate(split[1]); - if (start.length() == 4) { - if (isStudy) { - start += "-09-01"; - } else { - start = ""; - } - } - if (end.length() == 4) { - if (isStudy) { - end += "-07-01"; - } else { - end = ""; + } else { + String[] split = date.split("-"); + String end; + if (split.length > 0) { + end = getFormatDate(split[0]); + if (end.length() == 4) { + if (isStudy) { + end = end + "-09-01"; + } else { + end = ""; + } } + + dataRangeMap.put("kssj", end); } - dataRangeMap.put("kssj", start); - dataRangeMap.put("jssj", end); + if (split.length > 1) { + end = getFormatDate(split[1]); + if (end.length() == 4) { + if (isStudy) { + end = end + "-07-01"; + } else { + end = ""; + } + } + + dataRangeMap.put("jssj", end); + } + + return dataRangeMap; } - return dataRangeMap; } /**