2023-11-13 09:42:14 +08:00
|
|
|
|
package com.engine.recruit.conn;
|
|
|
|
|
|
|
2024-04-07 11:24:52 +08:00
|
|
|
|
import com.engine.recruit.util.WeaBrowserUtil;
|
2023-11-13 09:42:14 +08:00
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import weaver.conn.RecordSet;
|
2024-04-07 11:24:52 +08:00
|
|
|
|
import weaver.hrm.User;
|
2023-11-13 09:42:14 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @author:dxfeng
|
|
|
|
|
|
* @createTime: 2023/11/10
|
|
|
|
|
|
* @version: 1.0
|
|
|
|
|
|
*/
|
|
|
|
|
|
public class ModeBrowserCommonInfo {
|
2024-05-28 17:39:13 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 性别
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String TYPE_GENDER = "1";
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 简历来源
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String TYPE_RESUME_SOURCE = "2";
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 招聘渠道
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String TYPE_RECRUITMENT_CHANNELS = "3";
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 职位性质
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String TYPE_JOB_NATURE = "4";
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 职位学历要求
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String TYPE_JOB_EDUCATION_REQUIREMENTS = "5";
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 婚姻状况
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String TYPE_MARITAL_STATUS = "6";
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 在职状态
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String TYPE_ON_THE_JOB_STATUS = "7";
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 招聘原因
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String TYPE_RECRUITMENT_REASON = "8";
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 工作年限
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String TYPE_YEARS_OF_WORK = "9";
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 工作经验
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String TYPE_WORK_EXPERIENCE = "10";
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 政治面貌
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String TYPE_POLITICAL_LANDSCAPE = "11";
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 学位
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String TYPE_DEGREE = "12";
|
2023-11-13 09:42:14 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 根据名称,获取简历来源ID
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param name
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static String getResumeSource(String name) {
|
2024-05-28 17:39:13 +08:00
|
|
|
|
return getBrowserId(TYPE_RESUME_SOURCE, name);
|
2023-11-13 09:42:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-12-15 17:03:43 +08:00
|
|
|
|
* 根据名称,获取工作经验ID
|
2023-11-13 09:42:14 +08:00
|
|
|
|
*
|
|
|
|
|
|
* @param name
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static String getWorkExperience(String name) {
|
2024-05-28 17:39:13 +08:00
|
|
|
|
return getBrowserId(TYPE_WORK_EXPERIENCE, name);
|
2023-11-13 09:42:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-12-15 17:03:43 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取学位ID
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param name
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static String getDegreeId(String name) {
|
2024-05-28 17:39:13 +08:00
|
|
|
|
return getBrowserId(TYPE_DEGREE, name);
|
2023-12-15 17:03:43 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取学历ID
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param name
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-11-13 09:42:14 +08:00
|
|
|
|
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;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-04-07 11:24:52 +08:00
|
|
|
|
public static String getWorkPlaceShowName(User user, String id) {
|
|
|
|
|
|
String placeName = "";
|
|
|
|
|
|
if (StringUtils.isBlank(id)) {
|
|
|
|
|
|
return placeName;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
|
|
rs.executeQuery("select ssq,xxdz from uf_zpgzdd where id = ?", id);
|
|
|
|
|
|
if (rs.next()) {
|
|
|
|
|
|
String ssq = rs.getString("ssq");
|
|
|
|
|
|
String xxdz = rs.getString("xxdz");
|
|
|
|
|
|
// 区县浏览按钮类型:263
|
|
|
|
|
|
String areaName = WeaBrowserUtil.getBrowserShowNames(user, 263, ssq);
|
2024-04-08 18:21:02 +08:00
|
|
|
|
rs.writeLog("areaName===" + areaName);
|
2024-04-07 11:24:52 +08:00
|
|
|
|
if (StringUtils.isNotBlank(areaName) && StringUtils.isNotBlank(xxdz)) {
|
|
|
|
|
|
String[] split = areaName.split("/");
|
|
|
|
|
|
if (split.length == 4) {
|
|
|
|
|
|
areaName = split[1] + "-" + split[2] + "-" + split[3];
|
|
|
|
|
|
placeName = areaName + "-" + xxdz;
|
2024-05-28 17:39:13 +08:00
|
|
|
|
} else if (split.length == 3) {
|
2024-04-08 18:21:02 +08:00
|
|
|
|
areaName = split[0] + "-" + split[1] + "-" + split[2];
|
|
|
|
|
|
placeName = areaName + "-" + xxdz;
|
2024-04-07 11:24:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
|
|
|
rs.writeLog("id=" + id + ",ssq=" + ssq + ",xxdz=" + xxdz);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return placeName;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-11-13 09:42:14 +08:00
|
|
|
|
|
2024-05-28 17:39:13 +08:00
|
|
|
|
public static String getBrowserId(String zdlxmc, String xxnr) {
|
2023-11-13 09:42:14 +08:00
|
|
|
|
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;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|