添加日志

This commit is contained in:
dxfeng 2024-05-09 11:27:57 +08:00
parent 7cd1d34ebf
commit 6892c697bf
2 changed files with 13 additions and 4 deletions

View File

@ -63,6 +63,7 @@ public class PositionCommonInfo {
*/
public static String getPositionIdByName(String positionName, String mobile) {
RecordSet rs = new RecordSet();
rs.writeLog("匹配职位开始:positionName=" + positionName + ",mobile=" + mobile);
// 根据职位名称查询招聘中的数据
rs.executeQuery("select id ,zpzwmc ,zpzt ,modedatacreater ,modedatacreatedate ,modedatacreatetime from uf_jcl_zp_zpzw where zpzt = 0 and zpzwmc = ? ", positionName);
List<PositionPo> positionPoList = new ArrayList<>();
@ -80,12 +81,15 @@ public class PositionCommonInfo {
// 未查询到数据返回空
if (CollectionUtils.isEmpty(positionPoList)) {
rs.writeLog("positionName=" + positionName + ",未查询到该名称职位");
return "";
}
// 只有一条数据直接返回当前数据,如果有多个再添加其他条件过滤
if (positionPoList.size() == 1) {
return positionPoList.get(0).getId();
PositionPo positionPo = positionPoList.get(0);
rs.writeLog("positionName=" + positionName + ",返回职位id=" + positionPo.getId() + ",name=" + positionPo.getName());
return positionPo.getId();
}
// 根据手机号查询人员ID
@ -99,11 +103,16 @@ public class PositionCommonInfo {
List<PositionPo> filterList = positionPoList.stream().filter(item -> userIds.contains(item.getCreator())).sorted(Comparator.comparing(PositionPo::getCreationTime).reversed()).collect(Collectors.toList());
if (CollectionUtils.isEmpty(filterList)) {
PositionPo positionPo = positionPoList.stream().sorted(Comparator.comparing(PositionPo::getCreationTime).reversed()).collect(Collectors.toList()).get(0);
rs.writeLog("positionName=" + positionName + ",mobile=" + mobile + ",跟进人手机号未获取到,选择最新的一条数据");
rs.writeLog("positionName=" + positionName + ",返回职位id=" + positionPo.getId() + ",name=" + positionPo.getName());
// 跟进人手机号未获取到选择最新的一条数据
return positionPoList.stream().sorted(Comparator.comparing(PositionPo::getCreationTime).reversed()).collect(Collectors.toList()).get(0).getId();
return positionPo.getId();
} else {
// 再一样就默认匹配到创建时间最新的职位
return filterList.get(0).getId();
PositionPo positionPo = filterList.get(0);
rs.writeLog("positionName=" + positionName + ",返回职位id=" + positionPo.getId() + ",name=" + positionPo.getName());
return positionPo.getId();
}
}
}

View File

@ -15,7 +15,7 @@ public class ResumeExtractionJob extends BaseCronJob {
public void execute() {
// 抽取千里聆同步简历
ExtractQllResumeThread qllResumeThread = new ExtractQllResumeThread();
qllResumeThread.start();
qllResumeThread.run();
//// 抽取OCR解析简历
//ExtractOcrResumeThread ocrResumeThread = new ExtractOcrResumeThread();