generated from dxfeng/secondev-chapanda-feishu
功能开发--归档人才库,标签同步
This commit is contained in:
parent
58b1ed9996
commit
b40c1d4cd8
|
|
@ -3,7 +3,6 @@ package com.engine.recruit.service.impl;
|
|||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.conn.*;
|
||||
import com.engine.recruit.entity.record.ApplicantRecordPo;
|
||||
import com.engine.recruit.entity.resume.OcrResumePo;
|
||||
import com.engine.recruit.enums.ApplicantOperateEnum;
|
||||
import com.engine.recruit.enums.ApplicationStatusEnum;
|
||||
import com.engine.recruit.enums.RecordOperateEnum;
|
||||
|
|
@ -611,55 +610,50 @@ public class ApplicantResumeServiceImpl extends Service implements ApplicantResu
|
|||
for (List<Object> list : insertList) {
|
||||
rs.executeUpdate("insert into uf_jcl_rck_dt4 (mainid, yylx, zwcd) values (?, ?, ?)", list);
|
||||
}
|
||||
|
||||
// 同步设置的标签
|
||||
int applicantModeId = ApplicantCommonInfo.getModeIdByTableName("uf_jcl_yppc");
|
||||
rs.executeQuery("select a.tabname , a.color , a.bgcolor , a.bdcolor , a.type , a.creator , a.orderid from modeTabs_" + applicantModeId + " a left join Modetabslog_" + applicantModeId + " b on a.id = b.tabid and b.operate = 0 where b.billid = ? ", applicantId);
|
||||
List<Map<String, Object>> modeTabList = RecruitRecordSet.getRecordMapList(rs);
|
||||
String dateTime = DateUtil.getFullDate();
|
||||
String[] dateSplit = dateTime.split(" ");
|
||||
String createdate = dateSplit[0];
|
||||
String createtime = dateSplit[1];
|
||||
Set<String> tabIdSet = new HashSet<>();
|
||||
for (Map<String, Object> modeTab : modeTabList) {
|
||||
String tabName = Util.null2String(modeTab.get("tabname"));
|
||||
// 查询人才库是否有此标签
|
||||
rs.executeQuery("select id from modeTabs_" + formModeId + " where tabname = ?", tabName);
|
||||
String tabid = null;
|
||||
if (rs.next()) {
|
||||
tabid = rs.getString("id");
|
||||
} else {
|
||||
// 不存在,则插入数据
|
||||
RecruitRecordSet.insertData(modeTab, "modeTabs_" + formModeId);
|
||||
rs.executeQuery("select id from modeTabs_" + formModeId + " where tabname = ?", tabName);
|
||||
if (rs.next()) {
|
||||
tabid = rs.getString("id");
|
||||
}
|
||||
}
|
||||
|
||||
// 插入标签数据
|
||||
if (StringUtils.isNotBlank(tabid)) {
|
||||
Map<String, Object> tabsLogMap = new RecruitDataMap<>();
|
||||
tabsLogMap.put("tabid", tabid);
|
||||
tabsLogMap.put("operate", 0);
|
||||
tabsLogMap.put("modeid", formModeId);
|
||||
tabsLogMap.put("billid", bid);
|
||||
tabsLogMap.put("creator", user.getUID());
|
||||
tabsLogMap.put("createdate", createdate);
|
||||
tabsLogMap.put("createtime", createtime);
|
||||
RecruitRecordSet.insertData(tabsLogMap, "modetabslog_" + formModeId);
|
||||
tabIdSet.add(tabid);
|
||||
}
|
||||
|
||||
}
|
||||
// 更新标签信息
|
||||
rs.executeUpdate("update uf_jcl_rck set modelableid=? where id = ? ", StringUtils.join(tabIdSet, ","), bid);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建应聘者数据集合
|
||||
*
|
||||
* @param ocrResumePo
|
||||
* @return
|
||||
*/
|
||||
private RecruitDataMap<Object> buildApplicantMap(OcrResumePo ocrResumePo) {
|
||||
RecruitDataMap<Object> insertMap = new RecruitDataMap<>();
|
||||
// 姓名
|
||||
insertMap.put("xm", ocrResumePo.getXm());
|
||||
// 电子邮箱
|
||||
insertMap.put("dzyx", ocrResumePo.getYx());
|
||||
// 年龄
|
||||
insertMap.put("nl", ocrResumePo.getNl());
|
||||
// 手机号码
|
||||
insertMap.put("sjhm", ocrResumePo.getSjhm());
|
||||
// 自我评价
|
||||
insertMap.put("zwpj", ocrResumePo.getGrys());
|
||||
// 身份证号
|
||||
insertMap.put("sfz", ocrResumePo.getSfz());
|
||||
// 原始简历
|
||||
insertMap.put("ysjl", ocrResumePo.getJlfj());
|
||||
// 性别
|
||||
insertMap.put("xb", ocrResumePo.getXb());
|
||||
// 投递时间
|
||||
insertMap.put("tdsj", DateUtil.getDateTime());
|
||||
String zt = ApplicationStatusEnum.DISTRIBUTION.getValue();
|
||||
// 应聘职位
|
||||
//String ypzw = ocrResumePo.getYpzw();
|
||||
//if (StringUtils.isNotBlank(ypzw)) {
|
||||
// String flowId = PositionCommonInfo.getRecruitFlowId(ypzw);
|
||||
// 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)) {
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue