weaver-hrm-recruit/src/com/engine/recruit/conn/ModeBrowserCommonInfo.java

61 lines
1.4 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;
}
}