From 61b42912e4e0b4961a114964f91cfd0be5497660 Mon Sep 17 00:00:00 2001 From: dxfeng Date: Wed, 10 Jan 2024 15:09:28 +0800 Subject: [PATCH 1/3] =?UTF-8?q?BUG=E4=BF=AE=E5=A4=8D--=E8=81=8C=E4=BD=8D?= =?UTF-8?q?=E5=8F=91=E5=B8=83=EF=BC=8C=E8=81=8C=E4=BD=8D=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modeexpand/util/RecruitPositionUtil.java | 11 ++++++++++- .../weaver/formmode/recruit/modeexpand/util/RecruitPositionUtil.class | Bin 6956 -> 7223 bytes 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/weaver/formmode/recruit/modeexpand/util/RecruitPositionUtil.java b/src/weaver/formmode/recruit/modeexpand/util/RecruitPositionUtil.java index 6f530dc..2f93d8e 100644 --- a/src/weaver/formmode/recruit/modeexpand/util/RecruitPositionUtil.java +++ b/src/weaver/formmode/recruit/modeexpand/util/RecruitPositionUtil.java @@ -34,6 +34,7 @@ public class RecruitPositionUtil { public static ResumeJobDto convertMap2ResumeJobDto(Map map) { String positionName = Convert.toStr(map.get("zpzwmc"));//职位名称 String positionDuty = Convert.toStr(map.get("gwzz"));//职位职责 + String jobRequirements = Convert.toStr(map.get("rzyq"));//任职要求 String finishTime = Convert.toStr(map.get("zpjzrq"));//完成时间 String education = ApplicantCommonInfo.getRecruitCommonBrowserValue(Convert.toStr(map.get("zdxlyq")));//学历要求 String workYears = ApplicantCommonInfo.getRecruitCommonBrowserValue(Convert.toStr(map.get("gznx")));//工作年限 @@ -100,7 +101,15 @@ public class RecruitPositionUtil { // 招聘职位基本描述 resumeJobDto.setJobname(positionName); // 配置职位名称 - resumeJobDto.setJobdesc(positionDuty); // 配置职位描述 + String jobDescription = ""; + if (StringUtils.isNotBlank(positionDuty)) { + jobDescription += "职位职责:\n" + positionDuty +"\n\n"; + } + if (StringUtils.isNotBlank(jobRequirements)) { + jobDescription += "任职要求:\n" + jobRequirements; + } + + resumeJobDto.setJobdesc(jobDescription); // 配置职位描述 resumeJobDto.setJobType(jobCategory); // 配置职位类别 // 招聘职位条件 diff --git a/产品预制包/聚才林招聘管理系统预制包20231124/招聘预制包后端代码/ecology/classbean/weaver/formmode/recruit/modeexpand/util/RecruitPositionUtil.class b/产品预制包/聚才林招聘管理系统预制包20231124/招聘预制包后端代码/ecology/classbean/weaver/formmode/recruit/modeexpand/util/RecruitPositionUtil.class index 219201c7fcf977dd2d68f504bc0dc7afaafcf7c8..387b482fc8d3f807f29f338757c72909e93411dc 100644 GIT binary patch delta 3150 zcmY*b30PFu75>jReNn2~1bV*`co7&i;En-XtH{9NJ}62FwVB=IYW%M!nqLHtJI zZ4K|}NX9Wmeyihm_`QZdNW7~f1@GxtjrY~g6-EB2$e$GXv&2=U`xgx#=oq7{$KbCL z*ChU?;D-{|mEPYK`ACtE75RrE|5W5(OoI5g#3$+#pDNLR6#1_r|5N0Kj?eIag+5p0 zrXpWxxFvC0N4|0`pP&0z_vY9Oz!BaO{+`R)NQV;U$b#dO=Cmb+hQa| zN3nF;nuhZF%G$=tO*Nq}B3ku98V%Oy9u8<*o6S#x?4j%S)A|vO5;RIAj1Sei6GCq~ zK3caH>j;kK+UBhr%QYHg&=4A`(J+IOD4Aeex3#&Mm-^-)Za>p&r;Y@4 zg3xt?CekF{y4u;Pb97rYbT`k?EAl9#=H1t*bEbT|8~j z44P@sEVVaVkvYoMe1i(8(4fd7wK-Rjd6XGS(bHmzsYIjs1}&h48ZA;+E)A{Mb8;5b z5(1?eI7~|kF;!(-$}%=LR#s=^)z_Cb6;w7faw-hEkCqvhKjUNA)9MJ z{{(}|Xp}~)4JxM!jn){nmez&xT?1Vjtv9GrB`7!aKIOKBU6Uj9%7&s%jZ>=2YBq$b z&D_u>GqLTHsO=G<7BgifhHz<@bAtnR5IE^f*E5&FE5{dhUpwdo1A$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`kK>`@Oy7`l zf7B_?2?p!R^^=&cCU%BXmD4X_ox)5Fb6YU7$l#czxZ)x;bSbV^k$xSQUgW=y^W5W; zmd>B2nxQMQrh zwvqa3bxH1~L^V$_0-by{{A` Date: Fri, 12 Jan 2024 09:43:11 +0800 Subject: [PATCH 2/3] =?UTF-8?q?BUG=E4=BF=AE=E5=A4=8D--=E5=8D=83=E9=87=8C?= =?UTF-8?q?=E8=81=86=E6=8E=A8=E5=BB=BA=E6=A8=A1=E3=80=81SDK=E7=AE=80?= =?UTF-8?q?=E5=8E=86=E6=95=B0=E6=8D=AE=E8=A7=A3=E6=9E=90=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../recruit/conn/CheckRepeatResume.java | 93 +++++++++++++++++ .../recruit/conn/PositionCommonInfo.java | 4 + .../engine/recruit/conn/RecruitRecordSet.java | 8 +- .../recruit/entity/resume/QllResumePo.java | 95 +++++++++++++++++- .../impl/InitRecruitDataServiceImpl.java | 5 +- .../recruit/thread/SdkResumeSavedThread.java | 99 ++++++++++++------- .../thread/ExtractQllResumeThread.java | 48 ++++++--- 7 files changed, 296 insertions(+), 56 deletions(-) diff --git a/src/com/engine/recruit/conn/CheckRepeatResume.java b/src/com/engine/recruit/conn/CheckRepeatResume.java index 2d5d8ad..fac6174 100644 --- a/src/com/engine/recruit/conn/CheckRepeatResume.java +++ b/src/com/engine/recruit/conn/CheckRepeatResume.java @@ -4,6 +4,7 @@ import com.engine.recruit.enums.ApplicationStatusEnum; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import weaver.conn.RecordSet; +import weaver.general.BaseBean; import weaver.general.Util; import java.util.HashMap; @@ -98,6 +99,42 @@ public class CheckRepeatResume { return Util.getIntValue(Util.null2String(map.get("mainId"))); } + + /** + * 插入、更新明细表数据 + * + * @param detailDataList + * @param tableName + * @param mainId + * @param sourceId + */ + public void insertResumeDetailTable(List> detailDataList, String tableName, String mainId, String sourceId) { + if (CollectionUtils.isEmpty(detailDataList)) { + return; + } + boolean isUpdate = false; + if (StringUtils.isNotBlank(sourceId)) { + RecordSet rs = new RecordSet(); + rs.executeQuery("select * from " + tableName + " where mainid = ? ", sourceId); + isUpdate = rs.getCounts() == 0; + } + try { + for (RecruitDataMap dataMap : detailDataList) { + // 明细表关联新数据 + dataMap.put("mainid", mainId); + RecruitRecordSet.insertData(dataMap, tableName); + // 明细表关联已有数据 + if (isUpdate) { + dataMap.put("mainid", sourceId); + RecruitRecordSet.insertData(dataMap, tableName); + } + + } + } catch (Exception e) { + new BaseBean().writeLog(tableName + "明细表数据插入失败", e); + } + } + /** * 插入简历数据 * @@ -250,4 +287,60 @@ public class CheckRepeatResume { } + /** + * 获取开始时间和结束时间 + * + * @param date + * @return + */ + public static RecruitDataMap getDateRange(String date, boolean isStudy) { + 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 = ""; + } + } + + dataRangeMap.put("kssj", start); + dataRangeMap.put("jssj", end); + } + return dataRangeMap; + } + + /** + * 获取yyyy-MM-dd时间格式日期 + * + * @param dateStr + * @return + */ + private static String getFormatDate(String dateStr) { + // + dateStr = dateStr.replace(".", "-").replace("\\/", "-"); + if (dateStr.length() == 7) { + return dateStr + "-01"; + } else if (dateStr.length() == 10) { + return dateStr; + } else if (dateStr.length() == 4) { + return dateStr; + } + return ""; + } + + } diff --git a/src/com/engine/recruit/conn/PositionCommonInfo.java b/src/com/engine/recruit/conn/PositionCommonInfo.java index 19e4241..0a3694e 100644 --- a/src/com/engine/recruit/conn/PositionCommonInfo.java +++ b/src/com/engine/recruit/conn/PositionCommonInfo.java @@ -1,5 +1,6 @@ package com.engine.recruit.conn; +import org.apache.commons.lang3.StringUtils; import weaver.conn.RecordSet; /** @@ -36,6 +37,9 @@ public class PositionCommonInfo { */ public static String getRecruitFlowId(String positionId) { String recruitFlowId = ""; + if (StringUtils.isBlank(positionId)) { + return recruitFlowId; + } RecordSet rs = new RecordSet(); rs.executeQuery("select zplc from uf_jcl_zp_zpzw where id = ?", positionId); if (rs.next()) { diff --git a/src/com/engine/recruit/conn/RecruitRecordSet.java b/src/com/engine/recruit/conn/RecruitRecordSet.java index e4a6e1d..9adc278 100644 --- a/src/com/engine/recruit/conn/RecruitRecordSet.java +++ b/src/com/engine/recruit/conn/RecruitRecordSet.java @@ -61,9 +61,11 @@ public class RecruitRecordSet { List paramList = new ArrayList<>(); dataMap.forEach((key, value) -> { - fieldList.add(key); - dataList.add(value); - paramList.add("?"); + if (null != value) { + fieldList.add(key); + dataList.add(value); + paramList.add("?"); + } }); String insertSql = " insert into " + tableName + "(" + StringUtils.join(fieldList, ",") + ") values (" + StringUtils.join(paramList, ",") + ")"; RecordSet rs = new RecordSet(); diff --git a/src/com/engine/recruit/entity/resume/QllResumePo.java b/src/com/engine/recruit/entity/resume/QllResumePo.java index 4bb1755..a925cbf 100644 --- a/src/com/engine/recruit/entity/resume/QllResumePo.java +++ b/src/com/engine/recruit/entity/resume/QllResumePo.java @@ -6,7 +6,9 @@ import cn.hutool.http.HttpResponse; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.engine.recruit.conn.CheckRepeatResume; import com.engine.recruit.conn.ModeBrowserCommonInfo; +import com.engine.recruit.conn.RecruitDataMap; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -17,6 +19,8 @@ import weaver.general.BaseBean; import weaver.hrm.User; import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; /** * @author:dxfeng @@ -70,6 +74,7 @@ public class QllResumePo { JSONObject jsonObject = (JSONObject) jsonArray.get(0); String name = jsonObject.getString("name"); String content = jsonObject.getString("content"); + new BaseBean().writeLog("千里聆简历附件解析,id=" + id + ",jslf=" + jlfj); HttpResponse response = HttpRequest.get(content).execute(); if (response.isOk()) { String disposition = response.header("Content-Disposition"); @@ -78,7 +83,11 @@ public class QllResumePo { int imageFileId = RecruitModeUtil.generateImageFileId(inputStream, name); int docId = RecruitModeUtil.createDocId(SEC_CATEGORY, imageFileId, new User(1)); resumeId = String.valueOf(docId); + } else { + new BaseBean().writeLog("千里聆附件下载失败,Content-Disposition为空===" + response.body()); } + } else { + new BaseBean().writeLog("千里聆附件下载失败,URL响应失败"); } } catch (Exception e) { new BaseBean().writeLog("千里聆附件下载失败", e); @@ -103,7 +112,6 @@ public class QllResumePo { if (StringUtils.isBlank(gzjy)) { return null; } - ; int parseInt = Integer.parseInt(gzjy); String year = parseInt + "年"; if (0 == parseInt) { @@ -118,4 +126,89 @@ public class QllResumePo { public String getZgxl() { return ModeBrowserCommonInfo.getEducationLevelId(zgxl); } + + + public List> getGzjl() { + List> list = new ArrayList<>(); + if (StringUtils.isNotBlank(gzjl)) { + try { + JSONArray jsonArray = JSONArray.parseArray(gzjl); + for (int i = 0; i < jsonArray.size(); i++) { + JSONObject jsonObject = jsonArray.getJSONObject(i); + String gsmc = jsonObject.getString("公司名称:"); + String zwmc = jsonObject.getString("职位名称:"); + String sj = jsonObject.getString("时间:"); + String gznr = jsonObject.getString("工作内容:"); + RecruitDataMap map = CheckRepeatResume.getDateRange(sj, false); + map.put("gsmc", gsmc); + map.put("gw", zwmc); + map.put("gzzz", formatStr(gznr)); + list.add(map); + } + } catch (Exception e) { + new BaseBean().writeLog("工作经历解析失败", e); + } + } + return list; + } + + public List> getXmjl() { + List> list = new ArrayList<>(); + if (StringUtils.isNotBlank(xmjl)) { + try { + JSONArray jsonArray = JSONArray.parseArray(xmjl); + for (int i = 0; i < jsonArray.size(); i++) { + JSONObject jsonObject = jsonArray.getJSONObject(i); + String xmmc = jsonObject.getString("项目名称:"); + //String rzgs = jsonObject.getString("任职公司:"); + String sj = jsonObject.getString("时间:"); + String xmnr = jsonObject.getString("项目内容:"); + RecruitDataMap map = CheckRepeatResume.getDateRange(sj, false); + map.put("xmmc", xmmc); + map.put("xmms", formatStr(xmnr)); + list.add(map); + } + } catch (Exception e) { + new BaseBean().writeLog("项目经历解析失败", e); + } + } + return list; + } + + public List> getJyjl() { + List> list = new ArrayList<>(); + if (StringUtils.isNotBlank(jyjl)) { + try { + JSONArray jsonArray = JSONArray.parseArray(jyjl); + for (int i = 0; i < jsonArray.size(); i++) { + JSONObject jsonObject = jsonArray.getJSONObject(i); + String byyx = jsonObject.getString("毕业院校:"); + String xl = jsonObject.getString("学历:"); + String sj = jsonObject.getString("时间:"); + String zy = jsonObject.getString("专业:"); + RecruitDataMap map = CheckRepeatResume.getDateRange(sj, true); + map.put("xxmc", byyx); + map.put("xl", ModeBrowserCommonInfo.getEducationLevelId(xl)); + map.put("zy", zy); + list.add(map); + } + } catch (Exception e) { + new BaseBean().writeLog("教育经历解析失败", e); + } + } + return list; + } + + public String getYpzw() { + // TODO 如果关联招聘职位 + //return ypzw; + return null; + } + + private String formatStr(String str) { + if (StringUtils.isBlank(str)) { + return ""; + } + return str.replace("\\n", "\n"); + } } diff --git a/src/com/engine/recruit/service/impl/InitRecruitDataServiceImpl.java b/src/com/engine/recruit/service/impl/InitRecruitDataServiceImpl.java index 7be7eda..4b6911a 100644 --- a/src/com/engine/recruit/service/impl/InitRecruitDataServiceImpl.java +++ b/src/com/engine/recruit/service/impl/InitRecruitDataServiceImpl.java @@ -41,7 +41,10 @@ public class InitRecruitDataServiceImpl extends Service implements InitRecruitDa rs.executeUpdate("delete from uf_jcl_zpjdsz_dt2;"); rs.executeUpdate("delete from uf_jcl_lcczan;"); // 刷新页面菜单 - refreshMenuUrl(); + rs.executeQuery("select * from hp_nonstandard_function_info where num='163' and name ='招聘管理'"); + if (rs.next()) { + refreshMenuUrl(); + } // 插入操作按钮数据, int buttonModeId = ApplicantCommonInfo.getModeIdByTableName("uf_jcl_lcczan"); diff --git a/src/com/engine/recruit/thread/SdkResumeSavedThread.java b/src/com/engine/recruit/thread/SdkResumeSavedThread.java index cc15666..1742f0a 100644 --- a/src/com/engine/recruit/thread/SdkResumeSavedThread.java +++ b/src/com/engine/recruit/thread/SdkResumeSavedThread.java @@ -1,6 +1,8 @@ package com.engine.recruit.thread; import cn.hutool.core.convert.Convert; +import com.alibaba.fastjson.JSON; +import com.engine.recruit.conn.ApplicantCommonInfo; import com.engine.recruit.conn.CheckRepeatResume; import com.engine.recruit.conn.PositionCommonInfo; import com.engine.recruit.conn.RecruitDataMap; @@ -16,6 +18,8 @@ import weaver.common.DateUtil; import weaver.conn.RecordSet; import weaver.erpa.apps.entity.application.resume.dto.*; import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil; +import weaver.general.BaseBean; +import weaver.general.Util; import weaver.hrm.User; import java.util.ArrayList; @@ -49,6 +53,9 @@ public class SdkResumeSavedThread extends LocalRunnable { * @throws Exception */ private void parseResume(ResumeMqMessage resumeMqMessage) throws Exception { + BaseBean baseBean = new BaseBean(); + baseBean.writeLog("千里聆SDK简历开始解析------"); + baseBean.writeLog("resumeMqMessage===" + JSON.toJSONString(resumeMqMessage)); String userId = resumeMqMessage.getUserId(); User user = new User(); if (StringUtils.isNotBlank(userId)) { @@ -83,60 +90,77 @@ public class SdkResumeSavedThread extends LocalRunnable { params.put("qlljl", resumeId); // 判断是否有发布职位信息,如有发布职位信息,完善招聘流程信息,并指定为待分配状态 String positionId = PositionCommonInfo.getPositionIdByQll(resumeInfoDto.getJobId()); + String zt = ApplicationStatusEnum.DISTRIBUTION.getValue(); + // 应聘职位 if (StringUtils.isNotBlank(positionId)) { - params.put("ypzw", positionId); - params.put("zplc", PositionCommonInfo.getRecruitFlowId(positionId)); - params.put("zt", ApplicationStatusEnum.CANDIDATE.getValue()); - } else { - // 状态,指定待分配 - params.put("zt", ApplicationStatusEnum.DISTRIBUTION.getValue()); + String flowId = PositionCommonInfo.getRecruitFlowId(positionId); + Map initialStage = ApplicantCommonInfo.getInitialStage(flowId); + if (null != initialStage) { + String zpjd = initialStage.get("zpjd"); + String dqypjd = initialStage.get("jdlx"); + if (StringUtils.isNotBlank(zpjd) && StringUtils.isNotBlank(dqypjd)) { + params.put("ypzw", positionId); + params.put("zplc", flowId); + params.put("zpjd", zpjd); + params.put("dqypjd", dqypjd); + zt = ApplicationStatusEnum.CANDIDATE.getValue(); + } + } } + // 应聘状态 + params.put("zt", zt); // 判断简历是否重复,插入主表 - int mainId = CheckRepeatResume.getInstance().insertResumeMainTable(params); + CheckRepeatResume instance = CheckRepeatResume.getInstance(); + Map checkMap = instance.insertResumeAndReturn(params); + String mainId = Util.null2String(checkMap.get("mainId")); + String sourceId = Util.null2String(checkMap.get("sourceId")); Thread.sleep(1000); - if (-1 == mainId) { + if ("-1".equals(mainId)) { return; } - RecordSet rs = new RecordSet(); // 插入明细表数据 + List> jyjl = new ArrayList<>(); List educationExperience = resumeInfoDto.getEducationExperience(); - String sql = "insert into uf_jcl_yppc_dt1 (mainId,xxmc,xl,zy,kssj,jssj) values (?,?,?,?,?,?) "; for (ResumeInfoEducationExperienceDto educationExperienceDto : educationExperience) { - List data = new ArrayList<>(); - data.add(mainId); - data.add(educationExperienceDto.getSchoolName()); - data.add(HighestDegreeEnum.getDegreeId(educationExperienceDto.getDegree()).getId()); - data.add(educationExperienceDto.getMajor()); - data.add(DateUtil.getDate(educationExperienceDto.getBeginTime())); - data.add(DateUtil.getDate(educationExperienceDto.getEndTime())); - rs.executeUpdate(sql, data); + RecruitDataMap map = new RecruitDataMap<>(); + map.put("xxmc", educationExperienceDto.getSchoolName()); + map.put("xl", HighestDegreeEnum.getDegreeId(educationExperienceDto.getDegree()).getId()); + map.put("zy", educationExperienceDto.getMajor()); + map.put("kssj", DateUtil.getDate(educationExperienceDto.getBeginTime())); + map.put("jssj", DateUtil.getDate(educationExperienceDto.getEndTime())); + jyjl.add(map); } - sql = "insert into uf_jcl_yppc_dt2 (mainId,gsmc,gw,gzzz,kssj,jssj) values (?,?,?,?,?,?) "; + instance.insertResumeDetailTable(jyjl, "uf_jcl_yppc_dt1", mainId, sourceId); + + List> gzjl = new ArrayList<>(); List workExperience = resumeInfoDto.getWorkExperience(); for (ResumeInfoWorkExperienceDto workExperienceDto : workExperience) { - List data = new ArrayList<>(); - data.add(mainId); - data.add(workExperienceDto.getCompanyName()); - data.add(workExperienceDto.getJobName()); - data.add(workExperienceDto.getContent()); - data.add(DateUtil.getDate(workExperienceDto.getBeginTime())); - data.add(DateUtil.getDate(workExperienceDto.getEndTime())); - rs.executeUpdate(sql, data); + RecruitDataMap map = new RecruitDataMap<>(); + map.put("gsmc", workExperienceDto.getCompanyName()); + map.put("gw", workExperienceDto.getJobName()); + map.put("gzzz", workExperienceDto.getContent()); + map.put("kssj", DateUtil.getDate(workExperienceDto.getBeginTime())); + map.put("jssj", DateUtil.getDate(workExperienceDto.getEndTime())); + gzjl.add(map); + } - sql = "insert into uf_jcl_yppc_dt3 (mainId,xmmc,xmms,kssj,jssj) values (?,?,?,?,?) "; + instance.insertResumeDetailTable(gzjl, "uf_jcl_yppc_dt2", mainId, sourceId); + + List> xmjl = new ArrayList<>(); List projectExperience = resumeInfoDto.getProjectExperience(); for (ResumeInfoProjectExperienceDto projectExperienceDto : projectExperience) { - List data = new ArrayList<>(); - data.add(mainId); - data.add(projectExperienceDto.getProjectName()); - data.add(projectExperienceDto.getContent()); - data.add(DateUtil.getDate(projectExperienceDto.getBeginTime())); - data.add(DateUtil.getDate(projectExperienceDto.getEndTime())); - rs.executeUpdate(sql, data); + RecruitDataMap map = new RecruitDataMap<>(); + map.put("xmmc", projectExperienceDto.getProjectName()); + map.put("xmms", projectExperienceDto.getContent()); + map.put("kssj", DateUtil.getDate(projectExperienceDto.getBeginTime())); + map.put("jssj", DateUtil.getDate(projectExperienceDto.getEndTime())); + xmjl.add(map); } + instance.insertResumeDetailTable(xmjl, "uf_jcl_yppc_dt3", mainId, sourceId); + } @@ -184,14 +208,19 @@ public class SdkResumeSavedThread extends LocalRunnable { * @return */ private String convertStreamToE9DocId(Long resumeFileId, User user) { + BaseBean baseBean = new BaseBean(); + baseBean.writeLog("解析千里聆SDK原始简历,resumeFileId===" + resumeFileId); List docIdList = new ArrayList<>(); ERPAResumeSDKClient client = ERPASDKClients.getResumeSDKClient(); client.start(); client.downloadResumeFile(resumeFileId, (fileName, stream) -> { try { + baseBean.writeLog("解析千里聆SDK原始简历,fileName===" + fileName); int imageFileId = RecruitModeUtil.generateImageFileId(stream, fileName); + baseBean.writeLog("解析千里聆SDK原始简历,imageFileId===" + imageFileId); docIdList.add(RecruitModeUtil.createDocId(SEC_CATEGORY, imageFileId, user)); } catch (Exception e) { + baseBean.writeLog("解析千里聆SDK原始简历失败", e); throw new RuntimeException(e); } }); diff --git a/src/weaver/interfaces/recruit/thread/ExtractQllResumeThread.java b/src/weaver/interfaces/recruit/thread/ExtractQllResumeThread.java index 3d5c2cc..d1e60bd 100644 --- a/src/weaver/interfaces/recruit/thread/ExtractQllResumeThread.java +++ b/src/weaver/interfaces/recruit/thread/ExtractQllResumeThread.java @@ -1,5 +1,6 @@ package weaver.interfaces.recruit.thread; +import com.alibaba.fastjson.JSON; import com.engine.recruit.conn.*; import com.engine.recruit.entity.resume.QllResumePo; import com.engine.recruit.enums.ApplicationStatusEnum; @@ -8,6 +9,8 @@ import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import weaver.common.DateUtil; import weaver.conn.RecordSet; +import weaver.general.BaseBean; +import weaver.general.Util; import java.util.List; import java.util.Map; @@ -28,10 +31,23 @@ public class ExtractQllResumeThread extends Thread { } for (Map map : mapList) { QllResumePo qllResumePo = RecruitUtil.parseMap2Object(map, QllResumePo.class); - RecruitDataMap dataMap = buildApplicantMap(qllResumePo); - // 校验简历信息、并插入 - CheckRepeatResume.getInstance().insertResumeMainTable(dataMap); - rs.executeUpdate("update uf_jcl_jlzjb set cqzt = 1 where id = ? ", qllResumePo.getId()); + try { + RecruitDataMap dataMap = buildApplicantMap(qllResumePo); + // 校验简历信息、并插入 + CheckRepeatResume instance = CheckRepeatResume.getInstance(); + Map checkMap = instance.insertResumeAndReturn(dataMap); + String mainId = Util.null2String(checkMap.get("mainId")); + String sourceId = Util.null2String(checkMap.get("sourceId")); + rs.executeUpdate("update uf_jcl_jlzjb set cqzt = 1 where id = ? ", qllResumePo.getId()); + + // 插入明细表数据 + instance.insertResumeDetailTable(qllResumePo.getJyjl(), "uf_jcl_yppc_dt1", mainId, sourceId); + instance.insertResumeDetailTable(qllResumePo.getGzjl(), "uf_jcl_yppc_dt2", mainId, sourceId); + instance.insertResumeDetailTable(qllResumePo.getXmjl(), "uf_jcl_yppc_dt3", mainId, sourceId); + } catch (Exception e) { + new BaseBean().writeLog("简历解析失败" + JSON.toJSONString(qllResumePo), e); + } + } } @@ -45,24 +61,24 @@ public class ExtractQllResumeThread extends Thread { RecruitDataMap insertMap = new RecruitDataMap<>(); // 姓名 insertMap.put("xm", qllResumePo.getXm()); - // 简历来源 - insertMap.put("jlly", qllResumePo.getLyqd()); - // 电子邮箱 - insertMap.put("dzyx", qllResumePo.getYx()); - // 手机号码 - insertMap.put("sjhm", qllResumePo.getSjhm()); - // 年龄 - insertMap.put("nl", qllResumePo.getNl()); // 性别 insertMap.put("xb", qllResumePo.getXb()); + // 年龄 + insertMap.put("nl", qllResumePo.getNl()); // 工作经验 insertMap.put("gzjy", qllResumePo.getGzjy()); - // 最高学历 - insertMap.put("zgxl", qllResumePo.getZgxl()); - // 投递时间 - insertMap.put("tdsj", DateUtil.getDateTime()); + // 手机号码 + insertMap.put("sjhm", qllResumePo.getSjhm()); + // 电子邮箱 + insertMap.put("dzyx", qllResumePo.getYx()); // 自我评价 insertMap.put("zwpj", qllResumePo.getGrys()); + // 最高学历 + insertMap.put("zgxl", qllResumePo.getZgxl()); + // 简历来源 + insertMap.put("jlly", qllResumePo.getLyqd()); + // 投递时间 + insertMap.put("tdsj", DateUtil.getDateTime()); // 原始简历 insertMap.put("ysjl", qllResumePo.getJlfj()); From 0d43aaac44c3db59cf11463cd50f3adff97b39d2 Mon Sep 17 00:00:00 2001 From: dxfeng Date: Mon, 15 Jan 2024 17:17:07 +0800 Subject: [PATCH 3/3] =?UTF-8?q?BUG=E4=BF=AE=E5=A4=8D---=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=BB=BA=E6=A8=A1=E8=87=AA=E5=AE=9A=E4=B9=89=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/InitRecruitDataServiceImpl.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/com/engine/recruit/service/impl/InitRecruitDataServiceImpl.java b/src/com/engine/recruit/service/impl/InitRecruitDataServiceImpl.java index 4b6911a..930aaad 100644 --- a/src/com/engine/recruit/service/impl/InitRecruitDataServiceImpl.java +++ b/src/com/engine/recruit/service/impl/InitRecruitDataServiceImpl.java @@ -91,7 +91,7 @@ public class InitRecruitDataServiceImpl extends Service implements InitRecruitDa searchCodeMap.put("操作按钮列表", "e14a2ce232d844239c00a0b3ead1af04"); Map customPageMap = new HashMap<>(); - customPageMap.put("入职管理", "126b5994-68d0-11ee-b71a-000c2989f365"); + customPageMap.put("入职管理", "073e0628016a46b588d76fdd872a7369"); Map customTreeMap = new HashMap<>(); customTreeMap.put("数据字典树", "31717568fca8435f9e55eb08c1fbed4b"); @@ -140,7 +140,7 @@ public class InitRecruitDataServiceImpl extends Service implements InitRecruitDa // 操作按钮 menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("操作按钮列表")) + "' where id = " + 100215); // 入职管理 - menuSqlList.add("update LeftMenuInfo set fullrouteurl= '/spa/cube/index.html#/main/cube/viewCustomPage?id=" + getCustomPageId(customPageMap.get("入职管理")) + "&noTitleShow=1' where id = " + 100199); + menuSqlList.add("update LeftMenuInfo set fullrouteurl= '/spa/cube/index.html#/main/cube/viewCustomPage?id=" + getCustomPageId("入职管理", customPageMap.get("入职管理")) + "&noTitleShow=1' where id = " + 100199); // 数据字典 menuSqlList.add("update LeftMenuInfo set fullrouteurl= '/spa/cube/index.html#/main/cube/tree?id=" + getCustomTreeId(customTreeMap.get("数据字典树")) + "&noTitleShow=1' where id = " + 100204); @@ -169,16 +169,21 @@ public class InitRecruitDataServiceImpl extends Service implements InitRecruitDa /** * 获取建模自定义页面ID * - * @param cubeUuid + * @param customPageName 自定义页面名称 + * @param customSearchCode * @return */ - private String getCustomPageId(String cubeUuid) { + private String getCustomPageId(String customPageName, String customSearchCode) { RecordSet rs = new RecordSet(); - rs.executeQuery("select id from mode_custompage where cubeuuid =? ", cubeUuid); + rs.executeQuery("select appid from mode_customsearch where customsearchcode = ? ", customSearchCode); if (rs.next()) { - return rs.getString("id"); + String appId = rs.getString("appid"); + rs.executeQuery("select id from mode_custompage where appid = ? and customname = ?", appId, customPageName); + if (rs.next()) { + return rs.getString("id"); + } } - throw new CustomizeRunTimeException("招聘管理菜单初始化失败,请检查建模引擎自定义页面配置[" + cubeUuid + "]"); + throw new CustomizeRunTimeException("招聘管理菜单初始化失败,请检查建模引擎自定义页面配置[" + customPageName + "," + customSearchCode + "]"); } /**