generated from dxfeng/secondev-chapanda-feishu
95 lines
3.5 KiB
Java
95 lines
3.5 KiB
Java
|
|
package weaver.interfaces.recruit.thread;
|
||
|
|
|
||
|
|
import com.engine.recruit.conn.*;
|
||
|
|
import com.engine.recruit.entity.resume.QllResumePo;
|
||
|
|
import com.engine.recruit.enums.ApplicationStatusEnum;
|
||
|
|
import com.engine.recruit.util.RecruitUtil;
|
||
|
|
import org.apache.commons.collections.CollectionUtils;
|
||
|
|
import org.apache.commons.lang3.StringUtils;
|
||
|
|
import weaver.common.DateUtil;
|
||
|
|
import weaver.conn.RecordSet;
|
||
|
|
|
||
|
|
import java.util.List;
|
||
|
|
import java.util.Map;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @author:dxfeng
|
||
|
|
* @createTime: 2023/11/10
|
||
|
|
* @version: 1.0
|
||
|
|
*/
|
||
|
|
public class ExtractQllResumeThread extends Thread {
|
||
|
|
@Override
|
||
|
|
public void run() {
|
||
|
|
RecordSet rs = new RecordSet();
|
||
|
|
rs.executeQuery("select id,xm,xb,nl,gzjy,xjzd,sjhm,yx,ypzw,grys,qzyx,gzjl,xmjl,jyjl,zgxl,zyjn,yynl,zs,jlfj,rksj,tdsj,lyqd,gjrsjh from uf_jcl_jlzjb where ocr is null and cqzt is null order by modedatacreatedate, modedatacreatetime");
|
||
|
|
List<Map<String, Object>> mapList = RecruitRecordSet.getRecordMapList(rs);
|
||
|
|
if (CollectionUtils.isEmpty(mapList)) {
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
for (Map<String, Object> map : mapList) {
|
||
|
|
QllResumePo qllResumePo = RecruitUtil.parseMap2Object(map, QllResumePo.class);
|
||
|
|
RecruitDataMap<Object> dataMap = buildApplicantMap(qllResumePo);
|
||
|
|
// 校验简历信息、并插入
|
||
|
|
int mainId = new CheckRepeatResume().insertResumeMainTable(dataMap);
|
||
|
|
rs.executeUpdate("update uf_jcl_jlzjb set cqzt = 1 where id = ? ", qllResumePo.getId());
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 构建应聘者数据集合
|
||
|
|
*
|
||
|
|
* @param qllResumePo
|
||
|
|
* @return
|
||
|
|
*/
|
||
|
|
private RecruitDataMap<Object> buildApplicantMap(QllResumePo qllResumePo) {
|
||
|
|
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("gzjy", qllResumePo.getGzjy());
|
||
|
|
// 最高学历
|
||
|
|
insertMap.put("zgxl", qllResumePo.getZgxl());
|
||
|
|
// 投递时间
|
||
|
|
insertMap.put("tdsj", DateUtil.getDateTime());
|
||
|
|
// 自我评价
|
||
|
|
insertMap.put("zwpj", qllResumePo.getGrys());
|
||
|
|
// 原始简历
|
||
|
|
insertMap.put("ysjl", qllResumePo.getJlfj());
|
||
|
|
|
||
|
|
|
||
|
|
String zt = ApplicationStatusEnum.DISTRIBUTION.getValue();
|
||
|
|
// 应聘职位
|
||
|
|
String ypzw = qllResumePo.getYpzw();
|
||
|
|
if (StringUtils.isNotBlank(ypzw)) {
|
||
|
|
String flowId = PositionCommonInfo.getRecruitFlowId(ypzw);
|
||
|
|
Map<String, String> initialStage = ApplicantCommonInfo.getInitialStage(flowId);
|
||
|
|
if (null != initialStage) {
|
||
|
|
String zpjd = initialStage.get("id");
|
||
|
|
String dqypjd = initialStage.get("jdlx");
|
||
|
|
if (StringUtils.isNotBlank(zpjd) && StringUtils.isNotBlank(dqypjd)) {
|
||
|
|
insertMap.put("ypzw", ypzw);
|
||
|
|
insertMap.put("zplc", flowId);
|
||
|
|
insertMap.put("zpjd", zpjd);
|
||
|
|
insertMap.put("dqypjd", dqypjd);
|
||
|
|
zt = ApplicationStatusEnum.CANDIDATE.getValue();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
// 应聘状态
|
||
|
|
insertMap.put("zt", zt);
|
||
|
|
return insertMap;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
}
|