generated from dxfeng/secondev-chapanda-feishu
ADD-OCR,千里聆简历数据,创建人设置
This commit is contained in:
parent
298d22847b
commit
c331853c7c
|
|
@ -95,8 +95,8 @@ public class CheckRepeatResume {
|
|||
* @param param 数据集合
|
||||
* @return 新插入简历的ID
|
||||
*/
|
||||
public int insertResumeMainTable(Map<String, Object> param) {
|
||||
Map<String, Object> map = insertResumeAndReturn(param);
|
||||
public int insertResumeMainTable(int creator, Map<String, Object> param) {
|
||||
Map<String, Object> map = insertResumeAndReturn(creator, param);
|
||||
return Util.getIntValue(Util.null2String(map.get("mainId")));
|
||||
}
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ public class CheckRepeatResume {
|
|||
* @param param 数据集合
|
||||
* @return 简历插入信息
|
||||
*/
|
||||
public synchronized Map<String, Object> insertResumeAndReturn(Map<String, Object> param) {
|
||||
public synchronized Map<String, Object> insertResumeAndReturn(int creator, Map<String, Object> param) {
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
int mainId = -1;
|
||||
String sourceId;
|
||||
|
|
@ -163,7 +163,7 @@ public class CheckRepeatResume {
|
|||
List<Map<String, Object>> repeatResumeList = getRepeatResumeList(name, mobile);
|
||||
if (CollectionUtils.isEmpty(repeatResumeList)) {
|
||||
// 不存在重复数据,直接插入数据库
|
||||
mainId = insertData(param);
|
||||
mainId = insertData(creator, param);
|
||||
returnMap.put("mainId", mainId);
|
||||
return returnMap;
|
||||
}
|
||||
|
|
@ -175,14 +175,14 @@ public class CheckRepeatResume {
|
|||
// 当前存在待分配的简历
|
||||
sourceId = Util.null2String(sourceResume.get("id"));
|
||||
//取新简历有值的字段,更新已入库简历没有值的字段,已入库简历有值的字段不做更新,新简历入库并隐藏
|
||||
mainId = updateSourceResume(param, sourceResume);
|
||||
mainId = updateSourceResume(creator, param, sourceResume);
|
||||
returnMap.put("mainId", mainId);
|
||||
returnMap.put("sourceId", sourceId);
|
||||
returnMap.put("isUpdate", true);
|
||||
return returnMap;
|
||||
} else {
|
||||
// 直接入库,不做任何处理
|
||||
mainId = insertData(param);
|
||||
mainId = insertData(creator, param);
|
||||
returnMap.put("mainId", mainId);
|
||||
return returnMap;
|
||||
}
|
||||
|
|
@ -196,12 +196,12 @@ public class CheckRepeatResume {
|
|||
}
|
||||
if (hasSamePosition) {
|
||||
// 若有相同职位的数据,新简历直接入库并隐藏
|
||||
mainId = insertHideData(param);
|
||||
mainId = insertHideData(creator, param);
|
||||
returnMap.put("mainId", mainId);
|
||||
return returnMap;
|
||||
} else {
|
||||
// 没有相同职位的数据,新简历直接入库,不做任何处理
|
||||
mainId = insertData(param);
|
||||
mainId = insertData(creator, param);
|
||||
returnMap.put("mainId", mainId);
|
||||
return returnMap;
|
||||
}
|
||||
|
|
@ -216,14 +216,14 @@ public class CheckRepeatResume {
|
|||
* @param dataMap 数据集合
|
||||
* @return
|
||||
*/
|
||||
private int insertData(Map<String, Object> dataMap) {
|
||||
private int insertData(int creator, Map<String, Object> dataMap) {
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
dataMap.put("modeuuid", uuid);
|
||||
int formModeId = ApplicantCommonInfo.getModeIdByTableName("uf_jcl_yppc");
|
||||
dataMap.put("formmodeid", formModeId);
|
||||
RecruitRecordSet.buildModeInsertFields(dataMap, 1);
|
||||
RecruitRecordSet.buildModeInsertFields(dataMap, creator);
|
||||
RecruitRecordSet.insertData(dataMap, "uf_jcl_yppc");
|
||||
return RecruitRecordSet.refreshRight(uuid, "uf_jcl_yppc", formModeId, 1);
|
||||
return RecruitRecordSet.refreshRight(uuid, "uf_jcl_yppc", formModeId, creator);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -232,11 +232,11 @@ public class CheckRepeatResume {
|
|||
* @param dataMap 数据集合
|
||||
* @return
|
||||
*/
|
||||
private int insertHideData(Map<String, Object> dataMap) {
|
||||
private int insertHideData(int creator, Map<String, Object> dataMap) {
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
dataMap.put("modeuuid", uuid);
|
||||
RecordSet rs = new RecordSet();
|
||||
RecruitRecordSet.buildModeInsertFields(dataMap, 1);
|
||||
RecruitRecordSet.buildModeInsertFields(dataMap, creator);
|
||||
RecruitRecordSet.insertData(dataMap, "uf_jcl_yppc");
|
||||
rs.executeQuery("select id from uf_jcl_yppc where modeuuid='" + uuid + "'");
|
||||
if (rs.next()) {
|
||||
|
|
@ -252,16 +252,16 @@ public class CheckRepeatResume {
|
|||
* @param sourceResume 源简历数据集合
|
||||
* @return
|
||||
*/
|
||||
private int updateSourceResume(Map<String, Object> param, Map<String, Object> sourceResume) {
|
||||
private int updateSourceResume(int creator, Map<String, Object> param, Map<String, Object> sourceResume) {
|
||||
replaceNullValues(param, sourceResume);
|
||||
// 更新投递时间为最新的 by zsy 20240704 待分配的投递时间要根据最新的去更新
|
||||
sourceResume.put("tdsj", DateUtil.getDateTime());
|
||||
// 处理操作人员、操作时间
|
||||
RecruitRecordSet.buildModeUpdateFields(sourceResume, 1);
|
||||
RecruitRecordSet.buildModeUpdateFields(sourceResume, creator);
|
||||
RecruitRecordSet.updateDataById(sourceResume, "uf_jcl_yppc");
|
||||
// 更新数据
|
||||
RecruitRecordSet.buildModeInsertFields(param, 1);
|
||||
return insertHideData(param);
|
||||
RecruitRecordSet.buildModeInsertFields(param, creator);
|
||||
return insertHideData(creator, param);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ public class ResumeRecognitionServiceImpl extends Service implements ResumeRecog
|
|||
|
||||
// 判断简历信息
|
||||
CheckRepeatResume instance = CheckRepeatResume.getInstance();
|
||||
Map<String, Object> map = instance.insertResumeAndReturn(resumeData);
|
||||
Map<String, Object> map = instance.insertResumeAndReturn(user.getUID(), resumeData);
|
||||
String mainId = Util.null2String(map.get("mainId"));
|
||||
String sourceId = Util.null2String(map.get("sourceId"));
|
||||
returnMap.put("mainId", mainId);
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ public class SdkResumeSavedThread extends LocalRunnable {
|
|||
|
||||
// 判断简历是否重复,插入主表
|
||||
CheckRepeatResume instance = CheckRepeatResume.getInstance();
|
||||
Map<String, Object> checkMap = instance.insertResumeAndReturn(params);
|
||||
Map<String, Object> checkMap = instance.insertResumeAndReturn(1, params);
|
||||
String mainId = Util.null2String(checkMap.get("mainId"));
|
||||
String sourceId = Util.null2String(checkMap.get("sourceId"));
|
||||
|
||||
|
|
|
|||
|
|
@ -35,12 +35,19 @@ public class ExtractQllResumeThread extends Thread {
|
|||
for (Map<String, Object> map : mapList) {
|
||||
QllResumePo qllResumePo = RecruitUtil.parseMap2Object(map, QllResumePo.class);
|
||||
try {
|
||||
String email = "";
|
||||
rs.executeQuery("select lyyx from uf_jcl_jlzjb where id = ? ", qllResumePo.getId());
|
||||
if (rs.next()) {
|
||||
email = rs.getString("lyyx");
|
||||
}
|
||||
int creator = getCreator(rs, qllResumePo.getGjrsjh(), email);
|
||||
qllResumePo.setUserId(creator);
|
||||
baseBean.writeLog("千里聆简历解析开始,中间表ID=【" + qllResumePo.getId() + "】");
|
||||
RecruitDataMap<Object> dataMap = buildApplicantMap(qllResumePo);
|
||||
baseBean.writeLog("千里聆简历主表数据解析完成==" + JSON.toJSONString(dataMap));
|
||||
// 校验简历信息、并插入
|
||||
CheckRepeatResume instance = CheckRepeatResume.getInstance();
|
||||
Map<String, Object> checkMap = instance.insertResumeAndReturn(dataMap);
|
||||
Map<String, Object> checkMap = instance.insertResumeAndReturn(creator, dataMap);
|
||||
String mainId = Util.null2String(checkMap.get("mainId"));
|
||||
String sourceId = Util.null2String(checkMap.get("sourceId"));
|
||||
baseBean.writeLog("千里聆简历主表数据插入完成,mainId==【" + mainId + "】,sourceId==【" + sourceId + "】");
|
||||
|
|
@ -120,4 +127,23 @@ public class ExtractQllResumeThread extends Thread {
|
|||
}
|
||||
|
||||
|
||||
private int getCreator(RecordSet rs, String phone, String email) {
|
||||
int uid = 1;
|
||||
if (StringUtils.isNotBlank(phone)) {
|
||||
rs.executeQuery("select id from hrmresource where mobile = ?", phone);
|
||||
if (rs.next()) {
|
||||
uid = Math.max(uid, rs.getInt("id"));
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(email)) {
|
||||
rs.executeQuery("select id from hrmresource where email = ?", email);
|
||||
if (rs.next()) {
|
||||
uid = Math.max(uid, rs.getInt("id"));
|
||||
}
|
||||
}
|
||||
|
||||
return uid;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue