generated from dxfeng/secondev-chapanda-feishu
Merge branch '20231124' of http://221.226.25.34:3000/dxfeng/weaver-hrm-recruit into feature/dxf
This commit is contained in:
commit
194c515455
|
|
@ -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<RecruitDataMap<Object>> 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<Object> 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<Object> getDateRange(String date, boolean isStudy) {
|
||||
RecruitDataMap<Object> 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 "";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()) {
|
||||
|
|
|
|||
|
|
@ -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<RecruitDataMap<Object>> getGzjl() {
|
||||
List<RecruitDataMap<Object>> 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<Object> 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<RecruitDataMap<Object>> getXmjl() {
|
||||
List<RecruitDataMap<Object>> 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<Object> 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<RecruitDataMap<Object>> getJyjl() {
|
||||
List<RecruitDataMap<Object>> 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<Object> 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");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
@ -88,7 +91,7 @@ public class InitRecruitDataServiceImpl extends Service implements InitRecruitDa
|
|||
searchCodeMap.put("操作按钮列表", "e14a2ce232d844239c00a0b3ead1af04");
|
||||
|
||||
Map<String, String> customPageMap = new HashMap<>();
|
||||
customPageMap.put("入职管理", "126b5994-68d0-11ee-b71a-000c2989f365");
|
||||
customPageMap.put("入职管理", "073e0628016a46b588d76fdd872a7369");
|
||||
|
||||
Map<String, String> customTreeMap = new HashMap<>();
|
||||
customTreeMap.put("数据字典树", "31717568fca8435f9e55eb08c1fbed4b");
|
||||
|
|
@ -137,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);
|
||||
|
||||
|
|
@ -166,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 + "]");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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<String, String> 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<String, Object> 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<RecruitDataMap<Object>> jyjl = new ArrayList<>();
|
||||
List<ResumeInfoEducationExperienceDto> educationExperience = resumeInfoDto.getEducationExperience();
|
||||
String sql = "insert into uf_jcl_yppc_dt1 (mainId,xxmc,xl,zy,kssj,jssj) values (?,?,?,?,?,?) ";
|
||||
for (ResumeInfoEducationExperienceDto educationExperienceDto : educationExperience) {
|
||||
List<Object> 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<Object> 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<RecruitDataMap<Object>> gzjl = new ArrayList<>();
|
||||
List<ResumeInfoWorkExperienceDto> workExperience = resumeInfoDto.getWorkExperience();
|
||||
for (ResumeInfoWorkExperienceDto workExperienceDto : workExperience) {
|
||||
List<Object> 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<Object> 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<RecruitDataMap<Object>> xmjl = new ArrayList<>();
|
||||
List<ResumeInfoProjectExperienceDto> projectExperience = resumeInfoDto.getProjectExperience();
|
||||
for (ResumeInfoProjectExperienceDto projectExperienceDto : projectExperience) {
|
||||
List<Object> 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<Object> 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<Integer> 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);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ public class RecruitPositionUtil {
|
|||
public static ResumeJobDto convertMap2ResumeJobDto(Map<String, Object> 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); // 配置职位类别
|
||||
|
||||
// 招聘职位条件
|
||||
|
|
|
|||
|
|
@ -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<String, Object> map : mapList) {
|
||||
QllResumePo qllResumePo = RecruitUtil.parseMap2Object(map, QllResumePo.class);
|
||||
RecruitDataMap<Object> dataMap = buildApplicantMap(qllResumePo);
|
||||
// 校验简历信息、并插入
|
||||
CheckRepeatResume.getInstance().insertResumeMainTable(dataMap);
|
||||
rs.executeUpdate("update uf_jcl_jlzjb set cqzt = 1 where id = ? ", qllResumePo.getId());
|
||||
try {
|
||||
RecruitDataMap<Object> dataMap = buildApplicantMap(qllResumePo);
|
||||
// 校验简历信息、并插入
|
||||
CheckRepeatResume instance = CheckRepeatResume.getInstance();
|
||||
Map<String, Object> 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<Object> 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());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue