generated from dxfeng/secondev-chapanda-feishu
千里聆、OCR简历抽取至批次表
This commit is contained in:
parent
9bf9055c57
commit
46e2ee525a
|
|
@ -6,9 +6,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import weaver.conn.RecordSet;
|
||||
import weaver.general.BaseBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
|
|
@ -121,37 +119,6 @@ public class ApplicantCommonInfo {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 创建操作记录数据
|
||||
*
|
||||
* @param operateName 操作业务
|
||||
* @param operateTime 操作时间
|
||||
* @param content 操作内容
|
||||
* @param operateId 操作者ID
|
||||
* @param linkUrl 操作链接地址
|
||||
* @return 操作记录数据ID
|
||||
*/
|
||||
public static int createOperateRecord(String operateName, String operateTime, String content, int operateId, String linkUrl) {
|
||||
try {
|
||||
String operateTableName = "uf_jcl_ypgc";
|
||||
RecruitDataMap<Object> dataMap = new RecruitDataMap<>();
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
dataMap.put("modeuuid", uuid);
|
||||
int formModeId = getModeIdByTableName(operateTableName);
|
||||
dataMap.put("formmodeid", formModeId);
|
||||
RecruitRecordSet.buildModeInsertFields(dataMap, operateId);
|
||||
dataMap.put("czyw", operateName);
|
||||
dataMap.put("czsj", operateTime);
|
||||
dataMap.put("jlnr", content);
|
||||
dataMap.put("xqnr", linkUrl);
|
||||
RecruitRecordSet.insertData(dataMap, operateTableName);
|
||||
return RecruitRecordSet.refreshRight(uuid, operateTableName, formModeId, operateId);
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog("应聘过程记录数据插入失败", e);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static int createOperateRecord(ApplicantRecordPo recordPo) {
|
||||
try {
|
||||
int operateId = recordPo.getUser().getUID();
|
||||
|
|
@ -201,4 +168,23 @@ public class ApplicantCommonInfo {
|
|||
return stepPo;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取流程开始阶段,阶段类型
|
||||
*
|
||||
* @param flowId 流程ID
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, String> getInitialStage(String flowId) {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id,jdlx from uf_jcl_zpjdsz where sfqy = 0 and zplc = ? and hj = 0", flowId);
|
||||
if (rs.next()) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("zpjd", rs.getString("id"));
|
||||
map.put("jdlx", rs.getString("jdlx"));
|
||||
return map;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
package com.engine.recruit.conn;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/10
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ModeBrowserCommonInfo {
|
||||
|
||||
|
||||
/**
|
||||
* 根据名称,获取简历来源ID
|
||||
*
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
public static String getResumeSource(String name) {
|
||||
return getBrowserId("2", name);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据名称,获取简历来源ID
|
||||
*
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
public static String getWorkExperience(String name) {
|
||||
return getBrowserId("10", name);
|
||||
}
|
||||
|
||||
public static String getEducationLevelId(String name) {
|
||||
if (StringUtils.isBlank(name)) {
|
||||
return null;
|
||||
}
|
||||
String id = null;
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id from hrmeducationlevel where name like '%" + name + "%'");
|
||||
if (rs.next()) {
|
||||
id = rs.getString("id");
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
private static String getBrowserId(String zdlxmc, String xxnr) {
|
||||
if (StringUtils.isBlank(xxnr)) {
|
||||
return null;
|
||||
}
|
||||
String sourceId = null;
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id from uf_sjzd where zdlxmc = ? and xxnr = ? ", zdlxmc, xxnr);
|
||||
if (rs.next()) {
|
||||
sourceId = rs.getString("id");
|
||||
}
|
||||
return sourceId;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package com.engine.recruit.entity.resume;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.BaseBean;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/10
|
||||
* @version: 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class OcrResumePo {
|
||||
private String id;
|
||||
private String xm;
|
||||
private String xb;
|
||||
private String csrq;
|
||||
private String jg;
|
||||
private String yx;
|
||||
private String wx;
|
||||
private String qq;
|
||||
private String xjzd;
|
||||
private String ah;
|
||||
private String grys;
|
||||
private String jyjl;
|
||||
private String bysj;
|
||||
private String zgxl;
|
||||
private String zyjn;
|
||||
private String sxjl;
|
||||
private String yysp;
|
||||
private String zs;
|
||||
private String gzjl;
|
||||
private String ypzw;
|
||||
private String gzjy;
|
||||
private String xmjl;
|
||||
private String sjhm;
|
||||
private String nl;
|
||||
private String sfz;
|
||||
private String jlfj;
|
||||
|
||||
public String getXb() {
|
||||
if ("男".equals(xb)) {
|
||||
return "0";
|
||||
} else if ("女".equals(xb)) {
|
||||
return "1";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Integer getNl() {
|
||||
if (StringUtils.isNotBlank(nl)) {
|
||||
try {
|
||||
return Integer.parseInt(nl);
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog(e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getYpzw() {
|
||||
String id = null;
|
||||
if (StringUtils.isNotBlank(ypzw)) {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id from uf_jcl_zp_zpzw where zpzwmc = ? ", ypzw);
|
||||
if (rs.next()) {
|
||||
id = rs.getString("id");
|
||||
}
|
||||
}
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
package com.engine.recruit.entity.resume;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
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.ModeBrowserCommonInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/10
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class QllResumePo {
|
||||
private static final int SEC_CATEGORY = Convert.toInt(RecruitModeUtil.getRecruitPropValue("APPLICANTS_RESUMES_CATEGORY"));
|
||||
|
||||
private String id;
|
||||
private String xm;
|
||||
private String xb;
|
||||
private String nl;
|
||||
private String gzjy;
|
||||
private String xjzd;
|
||||
private String sjhm;
|
||||
private String yx;
|
||||
private String ypzw;
|
||||
private String grys;
|
||||
private String qzyx;
|
||||
private String gzjl;
|
||||
private String xmjl;
|
||||
private String jyjl;
|
||||
private String zgxl;
|
||||
private String zyjn;
|
||||
private String yynl;
|
||||
private String zs;
|
||||
private String jlfj;
|
||||
private String rksj;
|
||||
private String tdsj;
|
||||
private String lyqd;
|
||||
private String gjrsjh;
|
||||
|
||||
|
||||
/**
|
||||
* 解析JSON数组,下载文件并入库
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getJlfj() {
|
||||
if (StringUtils.isBlank(jlfj)) {
|
||||
return null;
|
||||
}
|
||||
String resumeId = null;
|
||||
try {
|
||||
JSONArray jsonArray = JSON.parseArray(jlfj);
|
||||
JSONObject jsonObject = (JSONObject) jsonArray.get(0);
|
||||
String name = jsonObject.getString("name");
|
||||
String content = jsonObject.getString("content");
|
||||
HttpResponse response = HttpRequest.get(content).execute();
|
||||
if (response.isOk()) {
|
||||
String disposition = response.header("Content-Disposition");
|
||||
if (StringUtils.isNotBlank(disposition)) {
|
||||
InputStream inputStream = response.bodyStream();
|
||||
int imageFileId = RecruitModeUtil.generateImageFileId(inputStream, name);
|
||||
int docId = RecruitModeUtil.createDocId(SEC_CATEGORY, imageFileId, new User(1));
|
||||
resumeId = String.valueOf(docId);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog("千里聆附件下载失败", e);
|
||||
}
|
||||
return resumeId;
|
||||
}
|
||||
|
||||
public String getLyqd() {
|
||||
return ModeBrowserCommonInfo.getResumeSource(lyqd);
|
||||
}
|
||||
|
||||
public String getXb() {
|
||||
if ("男".equals(xb)) {
|
||||
return "0";
|
||||
} else if ("女".equals(xb)) {
|
||||
return "1";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getGzjy() {
|
||||
if (StringUtils.isBlank(gzjy)) {
|
||||
return null;
|
||||
}
|
||||
;
|
||||
int parseInt = Integer.parseInt(gzjy);
|
||||
String year = parseInt + "年";
|
||||
if (0 == parseInt) {
|
||||
year = "1年以内";
|
||||
}
|
||||
if (parseInt > 20) {
|
||||
year = "20年以上";
|
||||
}
|
||||
return ModeBrowserCommonInfo.getResumeSource(year);
|
||||
}
|
||||
|
||||
public String getZgxl() {
|
||||
return ModeBrowserCommonInfo.getEducationLevelId(zgxl);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
package com.engine.recruit.service;
|
||||
|
||||
import com.engine.recruit.entity.record.ApplicantRecordPo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/01
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ApplicantRecordService {
|
||||
|
||||
/**
|
||||
* 创建操作历
|
||||
*
|
||||
* @param param
|
||||
*/
|
||||
void createOperateRecord(Map<String, Object> param);
|
||||
|
||||
/**
|
||||
* 创建操作历
|
||||
*
|
||||
* @param recordPo
|
||||
*/
|
||||
void createOperateRecord(ApplicantRecordPo recordPo);
|
||||
}
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.entity.record.ApplicantRecordPo;
|
||||
import com.engine.recruit.service.ApplicantRecordService;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/01
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Deprecated
|
||||
public class ApplicantRecordServiceImpl extends Service implements ApplicantRecordService {
|
||||
|
||||
@Override
|
||||
public void createOperateRecord(Map<String, Object> param) {
|
||||
//try {
|
||||
// ApplicantRecordPo recordPo = RecruitUtil.parseMap2Object(param, ApplicantRecordPo.class);
|
||||
// if (null == recordPo.getRecordOperateType()) {
|
||||
// return;
|
||||
// }
|
||||
//Method method = this.getClass().getMethod(recordPo.getRecordOperateType().getOperateType(), ApplicantRecordPo.class);
|
||||
//method.invoke(this, recordPo);
|
||||
//ApplicantCommonInfo.createOperateRecord(recordPo);
|
||||
//} catch (Exception e) {
|
||||
// new BaseBean().writeLog("应聘过程记录数据插入失败", e);
|
||||
//}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createOperateRecord(ApplicantRecordPo recordPo) {
|
||||
//try {
|
||||
// if (null == recordPo.getRecordOperateType()) {
|
||||
// return;
|
||||
// }
|
||||
// Method method = this.getClass().getMethod(recordPo.getRecordOperateType().getOperateType(), ApplicantRecordPo.class);
|
||||
// method.invoke(this, recordPo);
|
||||
// ApplicantCommonInfo.createOperateRecord(recordPo);
|
||||
//} catch (Exception e) {
|
||||
// new BaseBean().writeLog("应聘过程记录数据插入失败", e);
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
//public void resumeSubmission(ApplicantRecordPo recordPo) {
|
||||
// recordPo.setPcId(recordPo.getBillId());
|
||||
// recordPo.setContent("");
|
||||
//}
|
||||
//
|
||||
//public void eliminate(ApplicantRecordPo recordPo) {
|
||||
// User user = recordPo.getUser();
|
||||
// RecruitStepPo currentStep = ApplicantCommonInfo.getCurrentStep(recordPo.getBillId());
|
||||
// String content = user.getLastname() + "淘汰,操作阶段:" + currentStep.getDescription();
|
||||
// recordPo.setPcId(recordPo.getBillId());
|
||||
// recordPo.setContent(content);
|
||||
//}
|
||||
//
|
||||
//public void transferStage(ApplicantRecordPo recordPo) {
|
||||
// Map<String, Object> otherParam = recordPo.getOtherParam();
|
||||
// String sourceStep = Util.null2String(otherParam.get("sourceStep"));
|
||||
// String targetStep = Util.null2String(otherParam.get("targetStep"));
|
||||
// User user = recordPo.getUser();
|
||||
// String content = user.getLastname() + "转移阶段,应聘阶段:“" + sourceStep + "”变更为“" + targetStep + "”";
|
||||
// recordPo.setPcId(recordPo.getBillId());
|
||||
// recordPo.setContent(content);
|
||||
//}
|
||||
//
|
||||
//public void archiveTalentPool(ApplicantRecordPo recordPo) {
|
||||
// Map<String, Object> otherParam = recordPo.getOtherParam();
|
||||
// String gdyy = Util.null2String(otherParam.get("gdyy"));
|
||||
// String gdxxyy = Util.null2String(otherParam.get("gdxxyy"));
|
||||
// int formId = ApplicantCommonInfo.getFormIdByTableName("uf_jcl_yppc");
|
||||
// String selectName = ApplicantCommonInfo.getSelectName(String.valueOf(formId), "gdyy", gdyy);
|
||||
// User user = recordPo.getUser();
|
||||
// RecruitStepPo currentStep = ApplicantCommonInfo.getCurrentStep(recordPo.getBillId());
|
||||
// String content = user.getLastname() + "归档人才库,操作阶段:" + currentStep.getDescription() + ",归档原因:" + selectName + ",归档详细原因:" + gdxxyy;
|
||||
// recordPo.setPcId(recordPo.getBillId());
|
||||
// recordPo.setContent(content);
|
||||
//}
|
||||
}
|
||||
|
|
@ -297,7 +297,7 @@ public class ApplicantResumeServiceImpl extends Service implements ApplicantResu
|
|||
try {
|
||||
int docId = RecruitModeUtil.createDocId(secCategory, imageFileId, user);
|
||||
// TODO 更新原始简历信息,设置应聘状态未待分配
|
||||
rs.executeUpdate("update uf_jcl_yppc set ysjl=?,zt=? where id = ?", docId, ApplicationStatusEnum.DISTRIBUTION.getValue(), resumeId);
|
||||
rs.executeUpdate("update uf_jcl_jlzjb set jlfj=?,ocr=1 where id = ?", docId, resumeId);
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
package weaver.formmode.recruit.browser;
|
||||
|
||||
import weaver.formmode.customjavacode.AbstractCustomSqlConditionJavaCode;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/18
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Deprecated
|
||||
public class RecruitStageBrowser extends AbstractCustomSqlConditionJavaCode {
|
||||
@Override
|
||||
public String generateSqlCondition(Map<String, Object> param) throws Exception {
|
||||
User user = (User)param.get("user");
|
||||
Object extensionParam = param.get("extensionParam");//其他参数
|
||||
HashMap<String,Object> extensionMap = (HashMap<String,Object>)extensionParam;
|
||||
|
||||
//获取参数示例 "min" 只是示例 需要根据自己传入的参数名获取
|
||||
//String min = (String)extensionMap.get("min");
|
||||
|
||||
String sqlCondition = "";
|
||||
|
||||
return sqlCondition;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
package weaver.formmode.recruit.modeexpand;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.recruit.service.WorkPlanSerivice;
|
||||
import com.engine.recruit.service.impl.WorkPlanServiceImpl;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/18 11:18 AM
|
||||
* @Description: 保存并新建触发日程
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Deprecated
|
||||
public class CreateWorkPlanModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||
|
||||
public WorkPlanSerivice getWorkPlan(User user) {
|
||||
return ServiceUtil.getService(WorkPlanServiceImpl.class, user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> map) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,135 +0,0 @@
|
|||
package weaver.formmode.recruit.modeexpand.applicant;
|
||||
|
||||
import com.engine.recruit.enums.ApplicantOperateEnum;
|
||||
import com.engine.recruit.enums.CurrentApplicationStageEnum;
|
||||
import com.engine.recruit.enums.InterviewOperateTypeEnum;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.soa.workflow.request.MainTableInfo;
|
||||
import weaver.soa.workflow.request.Property;
|
||||
import weaver.soa.workflow.request.RequestInfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/28
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Deprecated
|
||||
public class UpdateApplicantModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
try {
|
||||
//数据id
|
||||
int billId;
|
||||
//模块id
|
||||
int modeId;
|
||||
RequestInfo requestInfo = (RequestInfo) params.get("RequestInfo");
|
||||
User user = (User) params.get("user");
|
||||
if (requestInfo != null) {
|
||||
billId = Util.getIntValue(requestInfo.getRequestid());
|
||||
modeId = Util.getIntValue(requestInfo.getWorkflowid());
|
||||
if (billId > 0 && modeId > 0) {
|
||||
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||
Property[] properties = mainTableInfo.getProperty();
|
||||
Map<String, Object> mainDataMap = new HashMap<>(16);
|
||||
for (Property property : properties) {
|
||||
mainDataMap.put(property.getName(), property.getValue());
|
||||
}
|
||||
|
||||
String operateType = Util.null2String(params.get("operateType"));
|
||||
if (StringUtils.isBlank(operateType)) {
|
||||
operateType = InterviewOperateTypeEnum.ARRANGE.getOperateType();
|
||||
}
|
||||
ApplicantOperateEnum operateTypeEnum = ApplicantOperateEnum.getOperateType(operateType);
|
||||
switch (operateTypeEnum) {
|
||||
// 转移阶段
|
||||
case TRANSFER:
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
result.put("errmsg", "自定义出错信息");
|
||||
result.put("flag", "false");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private void transferApplicant(Map<String, Object> mainDataMap) {
|
||||
// 当前应聘阶段
|
||||
String currentApplicationStage = Util.null2String(mainDataMap.get("dqypjd"));
|
||||
// 待入职、入职状态,数据推入职管理建模
|
||||
if (CurrentApplicationStageEnum.EMPLOYMENT.getStageValue().equals(currentApplicationStage) || CurrentApplicationStageEnum.ENTRY.getStageValue().equals(currentApplicationStage)) {
|
||||
String modeTableName = "uf_jcl_rzgl";
|
||||
String insertSql = "insert into " + modeTableName + " () values ()";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private List<Object> buildParamList(Map<String, Object> map) {
|
||||
List<Object> param = new ArrayList<>();
|
||||
// 填充建模表相关字段
|
||||
param.add(map.get("modedatacreatertype"));
|
||||
param.add(map.get("formmodeid"));
|
||||
param.add(map.get("modedatacreater"));
|
||||
param.add(map.get("modedatacreatedate"));
|
||||
param.add(map.get("modedatacreatetime"));
|
||||
param.add(map.get("modedatamodifier"));
|
||||
param.add(map.get("modedatamodifydatetime"));
|
||||
|
||||
// 表单字段
|
||||
// 信息采集ID
|
||||
// param.add(map.get(""));
|
||||
// 姓名
|
||||
param.add(map.get("xm"));
|
||||
// 身份证号
|
||||
param.add(map.get("sfz"));
|
||||
// 年龄
|
||||
param.add(map.get("nl"));
|
||||
// 性别
|
||||
param.add(map.get("xb"));
|
||||
// 手机号码
|
||||
param.add(map.get("sjhm"));
|
||||
// 电子邮箱
|
||||
param.add(map.get("dzyx"));
|
||||
// 入职公司
|
||||
param.add(map.get("rzgs"));
|
||||
|
||||
//// 入职部门
|
||||
//param.add(map.get("rzbm"));
|
||||
//// 直接上级
|
||||
//param.add(map.get("zjsj"));
|
||||
//// 岗位
|
||||
//param.add(map.get("gw"));
|
||||
// 预计入职日期
|
||||
param.add(map.get("yjrzrq"));
|
||||
// 关联招聘需求
|
||||
param.add(map.get("glzpxq"));
|
||||
// 入职状态
|
||||
param.add(map.get("rzzt"));
|
||||
// 信息采集
|
||||
param.add(map.get("xxcj"));
|
||||
// 入职流程
|
||||
param.add(map.get("rzlc"));
|
||||
// 入职流程状态
|
||||
param.add(map.get("rzlczt"));
|
||||
// 批次ID
|
||||
param.add(map.get("pcid"));
|
||||
// 取消原因
|
||||
param.add(map.get("qxyy"));
|
||||
|
||||
return param;
|
||||
}
|
||||
}
|
||||
|
|
@ -22,8 +22,8 @@ import weaver.general.Util;
|
|||
import weaver.hrm.User;
|
||||
import weaver.hrm.resource.ResourceComInfo;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
|
|
@ -127,7 +127,7 @@ public class RecruitModeUtil {
|
|||
* @param filename
|
||||
* @return
|
||||
*/
|
||||
public static int generateImageFileId(BufferedInputStream inputStream, String filename) {
|
||||
public static int generateImageFileId(InputStream inputStream, String filename) {
|
||||
int imageFileId;
|
||||
try {
|
||||
byte[] bytes = IOUtils.toByteArray(inputStream);
|
||||
|
|
|
|||
|
|
@ -25,16 +25,6 @@ import java.util.*;
|
|||
*/
|
||||
public class RecruitPositionUtil {
|
||||
|
||||
static Map<Integer, PositionThirdChannelEnum> thirdChannelMap = new HashMap<>();
|
||||
|
||||
static {
|
||||
thirdChannelMap.put(ResumePlatform.LAGO, PositionThirdChannelEnum.LAGO);
|
||||
thirdChannelMap.put(ResumePlatform.BOSSZHIPIN, PositionThirdChannelEnum.BOSSZHIPIN);
|
||||
thirdChannelMap.put(ResumePlatform.ZHILIANZHAOPIN, PositionThirdChannelEnum.ZHILIANZHAOPIN);
|
||||
thirdChannelMap.put(ResumePlatform.QIANCHENGWUYOU, PositionThirdChannelEnum.QIANCHENGWUYOU);
|
||||
thirdChannelMap.put(ResumePlatform.LIEPIN, PositionThirdChannelEnum.LIEPIN);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将Map转换成ResumeJobDto对象
|
||||
*
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
package weaver.interfaces.recruit.cronjob;
|
||||
|
||||
import weaver.interfaces.recruit.thread.ExtractOcrResumeThread;
|
||||
import weaver.interfaces.recruit.thread.ExtractQllResumeThread;
|
||||
import weaver.interfaces.schedule.BaseCronJob;
|
||||
|
||||
/**
|
||||
* 抽取中间表简历至应聘者批次表
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/10
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ResumeExtractionJob extends BaseCronJob {
|
||||
@Override
|
||||
public void execute() {
|
||||
// 抽取千里聆同步简历
|
||||
ExtractQllResumeThread qllResumeThread = new ExtractQllResumeThread();
|
||||
qllResumeThread.start();
|
||||
|
||||
// 抽取OCR解析简历
|
||||
ExtractOcrResumeThread ocrResumeThread = new ExtractOcrResumeThread();
|
||||
ocrResumeThread.start();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
package weaver.interfaces.recruit.thread;
|
||||
|
||||
import com.engine.recruit.conn.*;
|
||||
import com.engine.recruit.entity.resume.OcrResumePo;
|
||||
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 ExtractOcrResumeThread extends Thread {
|
||||
@Override
|
||||
public void run() {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id,xm, xb, csrq, jg, yx, wx, qq, xjzd, ah, grys , jyjl , bysj , zgxl , zyjn , sxjl , yysp , zs, gzjl, ypzw, gzjy, xmjl, sjhm, nl, sfz, jlfj from uf_jcl_jlzjb where ocr = 1 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) {
|
||||
OcrResumePo ocrResumePo = RecruitUtil.parseMap2Object(map, OcrResumePo.class);
|
||||
RecruitDataMap<Object> dataMap = buildApplicantMap(ocrResumePo);
|
||||
// 校验简历信息、并插入
|
||||
new CheckRepeatResume().insertResumeMainTable(dataMap);
|
||||
rs.executeUpdate("update uf_jcl_jlzjb set cqzt = 1 where id = ? ", ocrResumePo.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 构建应聘者数据集合
|
||||
*
|
||||
* @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("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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue