generated from dxfeng/secondev-chapanda-feishu
横琴 - 猎聘行业要求
This commit is contained in:
parent
3ff9fed98a
commit
06fdf5e544
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
package weaver.formmode.recruit.modeexpand.util;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
|
|
@ -15,6 +16,7 @@ import com.weaver.rpa.sdk.clients.application.resume.entity.ResumeJobV2Dto;
|
|||
import com.weaver.rpa.sdk.utils.HttpClientUtils;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
|
@ -24,56 +26,27 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 招聘职位工具类
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/08
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitPositionUtil {
|
||||
public RecruitPositionUtil() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 将Map转换成ResumeJobV2Dto对象
|
||||
*
|
||||
* @param map 数据集合
|
||||
* @return ResumeJobV2Dto
|
||||
*/
|
||||
public static ResumeJobV2Dto convertMap2ResumeJobV2Dto(User user, Map<String, Object> map) {
|
||||
// 职位名称
|
||||
String positionName = Convert.toStr(map.get("zpzwmc"));
|
||||
// 职位职责
|
||||
String positionDuty = Convert.toStr(map.get("gwzz"));
|
||||
// 任职要求
|
||||
String jobRequirements = Convert.toStr(map.get("rzyq"));
|
||||
// 完成时间
|
||||
String finishTime = Convert.toStr(map.get("zpjzrq"));
|
||||
// 学历要求
|
||||
String education = ApplicantCommonInfo.getRecruitCommonBrowserValue(Convert.toStr(map.get("zdxlyq")));
|
||||
// 工作年限
|
||||
String workYears = ApplicantCommonInfo.getRecruitCommonBrowserValue(Convert.toStr(map.get("gznx")));
|
||||
// 职位性质
|
||||
String positionNature = ApplicantCommonInfo.getRecruitCommonBrowserValue(Convert.toStr(map.get("zwxz")));
|
||||
// 最低薪酬
|
||||
Integer salaryMin = Convert.toInt(map.get("zdxzk"), 0);
|
||||
// 最高薪酬
|
||||
Integer salaryMax = Convert.toInt(map.get("zgxzk"), 0);
|
||||
// 薪酬月份数
|
||||
Integer xcyfs = Convert.toInt(map.get("xzyfs"), 12);
|
||||
// 实习每周到岗天数
|
||||
Integer workingDays = Convert.toInt(map.get("sxmzdgts"), 1);
|
||||
// 实习时长(月)
|
||||
Integer internshipDuration = Convert.toInt(map.get("sxscy"), 1);
|
||||
// 招聘人数
|
||||
Integer zprs = Convert.toInt(map.get("zprs"), 1);
|
||||
// 职位类别
|
||||
String jobCategory = Convert.toStr(map.get("zwlb"));
|
||||
|
||||
// 工作地点
|
||||
String gzdd = Convert.toStr(map.get("gzdd"));
|
||||
String workPlaceShowName = ModeBrowserCommonInfo.getWorkPlaceShowName(user, gzdd);
|
||||
|
||||
//不限
|
||||
int experienceValue = -1;
|
||||
if ("应届毕业生".equals(workYears)) {
|
||||
experienceValue = 1;
|
||||
|
|
@ -89,8 +62,6 @@ public class RecruitPositionUtil {
|
|||
experienceValue = 6;
|
||||
}
|
||||
|
||||
|
||||
//不限
|
||||
int educationValue = -1;
|
||||
if ("博士".equals(education)) {
|
||||
educationValue = 8;
|
||||
|
|
@ -110,7 +81,6 @@ public class RecruitPositionUtil {
|
|||
educationValue = 1;
|
||||
}
|
||||
|
||||
// 社招(全职、兼职、其他)
|
||||
int resumeType = 1;
|
||||
if ("实习".equals(positionNature)) {
|
||||
resumeType = 3;
|
||||
|
|
@ -118,301 +88,303 @@ public class RecruitPositionUtil {
|
|||
resumeType = 2;
|
||||
}
|
||||
|
||||
|
||||
// 招聘职位类型与特殊设置字段
|
||||
ResumeJobV2Dto resumeJobV2Dto = new ResumeJobV2Dto();
|
||||
if (StringUtils.isNotBlank(workPlaceShowName)) {
|
||||
resumeJobV2Dto.setJobArea(workPlaceShowName);
|
||||
}
|
||||
// (必填,默认社招)招聘类型 1:社招 2:校招 3:实习
|
||||
resumeJobV2Dto.setResumeType(resumeType);
|
||||
|
||||
resumeJobV2Dto.setResumeType(Integer.valueOf(resumeType));
|
||||
if (2 == resumeType && StringUtils.isBlank(finishTime)) {
|
||||
throw new CustomizeRunTimeException("校招招聘截止时间必填");
|
||||
}
|
||||
|
||||
// (校招必填)仅校招: 招聘截止时间(时间戳)
|
||||
resumeJobV2Dto.setStopReumeTimeLong(stringTurnLong(finishTime));
|
||||
// (实习必填,默认1个月)仅实习: 实习时长 1~12 单位:(月)
|
||||
resumeJobV2Dto.setRequirementsTime(internshipDuration);
|
||||
// (实习必填,默认1天)仅实习: 每周到岗天数 1~7 单位:(天)
|
||||
resumeJobV2Dto.setWorkDate(workingDays);
|
||||
|
||||
// 招聘职位基本描述
|
||||
// 配置职位名称
|
||||
resumeJobV2Dto.setJobname(positionName);
|
||||
String jobDescription = "";
|
||||
if (StringUtils.isNotBlank(positionDuty)) {
|
||||
jobDescription += "职位职责:\n" + positionDuty + "\n\n";
|
||||
}
|
||||
if (StringUtils.isNotBlank(jobRequirements)) {
|
||||
jobDescription += "任职要求:\n" + jobRequirements;
|
||||
}
|
||||
// 配置职位描述
|
||||
resumeJobV2Dto.setJobdesc(jobDescription);
|
||||
// 配置职位类别
|
||||
List<ResumeJobDynamicField.Item> items = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(jobCategory)) {
|
||||
String[] typeSplit = jobCategory.split("\n");
|
||||
for (String s : typeSplit) {
|
||||
String[] split1 = s.split(":");
|
||||
if (split1.length != 2) {
|
||||
continue;
|
||||
}
|
||||
String platName = split1[0];
|
||||
String typeStr = split1[1];
|
||||
int platId = getPlatIdByName(platName);
|
||||
if (0 != platId) {
|
||||
ResumeJobDynamicField.Item item = new ResumeJobDynamicField.Item();
|
||||
item.setLabel(String.valueOf(platId));
|
||||
item.setValue(typeStr);
|
||||
items.add(item);
|
||||
}
|
||||
}
|
||||
resumeJobV2Dto.setJobType(items);
|
||||
} else {
|
||||
resumeJobV2Dto.setJobType(items);
|
||||
}
|
||||
|
||||
// 招聘职位条件
|
||||
//resumeJobDto.setKeywordStr(Lists.newArrayList("java")); // 职位关键词
|
||||
// (必填,默认不限)经验要求(实习无此字段) -1:不限 1:一年以下 2:1~3年 3:3~5年 5:5~10年 6:10年以上
|
||||
resumeJobV2Dto.setExperience(experienceValue);
|
||||
// (必填,默认不限)学历要求 -1:不限 1:初中及以下 2:高中 3:中专/中技 4:大专 5:本科 6:硕士 7:MBA/EMBA 8:博士
|
||||
resumeJobV2Dto.setEducation(educationValue);
|
||||
|
||||
//薪资福利
|
||||
// (必填)薪资范围开始 单位:(社招/校招: 千元/月 实习:元/日)
|
||||
resumeJobV2Dto.setExpectSalaryStart(salaryMin);
|
||||
// (必填)薪资范围截止 单位:(社招/校招: 千元/月 实习:元/日)
|
||||
resumeJobV2Dto.setExpectSalaryStop(salaryMax);
|
||||
// (必填,默认12个月)薪资月份数(实习无此字段) 12~24
|
||||
resumeJobV2Dto.setExpectSalaryMonth(xcyfs);
|
||||
|
||||
// (必填)要发布的渠道(平台)Id
|
||||
List<Integer> platformIds = matchPlatform(Convert.toStr(map.get("dsfqd")));
|
||||
resumeJobV2Dto.setPlatformList(platformIds);
|
||||
|
||||
// 简历匹配度设置
|
||||
// (必填,默认不限)匹配年龄age开始 -1:不限
|
||||
resumeJobV2Dto.setMappingageStart(-1);
|
||||
// (必填,默认不限)匹配年龄age开始 -1:不限
|
||||
resumeJobV2Dto.setMappingageStop(-1);
|
||||
// (必填,默认不限)匹配性别 -1:不限 0:女 1:男
|
||||
resumeJobV2Dto.setMappingSex(-1);
|
||||
// (必填,默认不限)匹配学历 -1:不限 1:初中及以下 2:高中 3:中专/中技 4:大专 5:本科 6:硕士 7:MBA/EMBA 8:博士
|
||||
resumeJobV2Dto.setMappingeducationStr(Collections.singletonList(-1));
|
||||
// (必填,默认不限)匹配经验 -1:不限 1:1年内 2:1~3年 3:3~5年 4:5~10年 5:10年以上
|
||||
resumeJobV2Dto.setMappingexperienceStr(Collections.singletonList(-1));
|
||||
|
||||
String zwgjc = Util.null2String(map.get("zwgjc"));
|
||||
List<String> zwgjcList = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(zwgjc)) {
|
||||
zwgjcList.addAll(Arrays.asList(zwgjc.split("、")));
|
||||
}
|
||||
// 匹配关键词内容
|
||||
resumeJobV2Dto.setMappingKeywordStr(zwgjcList);
|
||||
// 职位关键词
|
||||
resumeJobV2Dto.setKeywordStr(zwgjcList);
|
||||
// (必填,默认任一命中)匹配模式 1:任一命中 2:全部命中
|
||||
resumeJobV2Dto.setMappingStatus(1);
|
||||
resumeJobV2Dto.setBizVersion(1);
|
||||
|
||||
// 海外经历 ["海外工作经历", "海外教育背景"]
|
||||
List<String> hwjlList = new ArrayList<>();
|
||||
String hwjl = Util.null2String(map.get("hwjl"));
|
||||
if (StringUtils.isNotBlank(hwjl)) {
|
||||
String[] split = hwjl.split(",");
|
||||
List<String> strings = Arrays.asList(split);
|
||||
if (strings.contains("0")) {
|
||||
hwjlList.add("海外工作经历");
|
||||
resumeJobV2Dto.setStopReumeTimeLong(stringTurnLong(finishTime));
|
||||
resumeJobV2Dto.setRequirementsTime(internshipDuration);
|
||||
resumeJobV2Dto.setWorkDate(workingDays);
|
||||
resumeJobV2Dto.setJobname(positionName);
|
||||
String jobDescription = "";
|
||||
if (StringUtils.isNotBlank(positionDuty)) {
|
||||
jobDescription = jobDescription + "职位职责:\n" + positionDuty + "\n\n";
|
||||
}
|
||||
if (strings.contains("1")) {
|
||||
hwjlList.add("海外教育背景");
|
||||
|
||||
if (StringUtils.isNotBlank(jobRequirements)) {
|
||||
jobDescription = jobDescription + "任职要求:\n" + jobRequirements;
|
||||
}
|
||||
}
|
||||
|
||||
resumeJobV2Dto.setHwjl(hwjlList);
|
||||
resumeJobV2Dto.setJobdesc(jobDescription);
|
||||
List<ResumeJobDynamicField.Item> items = new ArrayList();
|
||||
String hwjl;
|
||||
String[] split1;
|
||||
String platName;
|
||||
String typeStr;
|
||||
if (StringUtils.isNotBlank(jobCategory)) {
|
||||
String[] typeSplit = jobCategory.split("\n");
|
||||
String[] var25 = typeSplit;
|
||||
int var26 = typeSplit.length;
|
||||
|
||||
/*
|
||||
*BOSS直聘必填字段
|
||||
*/
|
||||
// 毕业时间-开始 boss校招必填
|
||||
String bysjks = Util.null2String(map.get("bysjks"));
|
||||
resumeJobV2Dto.setBysjStart(bysjks);
|
||||
// 毕业时间-结束 boss校招必填
|
||||
String bysjjs = Util.null2String(map.get("bysjjs"));
|
||||
resumeJobV2Dto.setBysjEnd(bysjjs);
|
||||
for(int var27 = 0; var27 < var26; ++var27) {
|
||||
hwjl = var25[var27];
|
||||
split1 = hwjl.split(":");
|
||||
if (split1.length == 2) {
|
||||
platName = split1[0];
|
||||
typeStr = split1[1];
|
||||
int platId = getPlatIdByName(platName);
|
||||
if (0 != platId) {
|
||||
ResumeJobDynamicField.Item item = new ResumeJobDynamicField.Item();
|
||||
item.setLabel(String.valueOf(platId));
|
||||
item.setValue(typeStr);
|
||||
items.add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 前程无忧必填
|
||||
*/
|
||||
// 发布城市
|
||||
String fbcs = Util.null2String(map.get("fbcs"));
|
||||
if (StringUtils.isNotBlank(fbcs)) {
|
||||
String[] split = fbcs.split(",");
|
||||
resumeJobV2Dto.setFbcs(Arrays.asList(split));
|
||||
}
|
||||
// 所属行业
|
||||
String sshy = Util.null2String(map.get("szhy"));
|
||||
List<List<String>> sshyList = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(sshy)) {
|
||||
String[] split = sshy.split("\n");
|
||||
for (String s : split) {
|
||||
if (StringUtils.isNotBlank(s)) {
|
||||
String[] strings = s.split("-");
|
||||
if (strings.length == 2) {
|
||||
List<String> strings1 = new ArrayList<>();
|
||||
strings1.add(strings[0]);
|
||||
strings1.add(strings[1]);
|
||||
sshyList.add(strings1);
|
||||
resumeJobV2Dto.setJobType(items);
|
||||
} else {
|
||||
resumeJobV2Dto.setJobType(items);
|
||||
}
|
||||
|
||||
resumeJobV2Dto.setExperience(Integer.valueOf(experienceValue));
|
||||
resumeJobV2Dto.setEducation(Integer.valueOf(educationValue));
|
||||
resumeJobV2Dto.setExpectSalaryStart(salaryMin);
|
||||
resumeJobV2Dto.setExpectSalaryStop(salaryMax);
|
||||
resumeJobV2Dto.setExpectSalaryMonth(xcyfs);
|
||||
List<Integer> platformIds = matchPlatform(Convert.toStr(map.get("dsfqd")));
|
||||
resumeJobV2Dto.setPlatformList(platformIds);
|
||||
resumeJobV2Dto.setMappingageStart(-1);
|
||||
resumeJobV2Dto.setMappingageStop(-1);
|
||||
resumeJobV2Dto.setMappingSex(-1);
|
||||
resumeJobV2Dto.setMappingeducationStr(Collections.singletonList(-1));
|
||||
resumeJobV2Dto.setMappingexperienceStr(Collections.singletonList(-1));
|
||||
String zwgjc = Util.null2String(map.get("zwgjc"));
|
||||
List<String> zwgjcList = new ArrayList();
|
||||
if (StringUtils.isNotBlank(zwgjc)) {
|
||||
zwgjcList.addAll(Arrays.asList(zwgjc.split("、")));
|
||||
}
|
||||
|
||||
resumeJobV2Dto.setMappingKeywordStr(zwgjcList);
|
||||
resumeJobV2Dto.setKeywordStr(zwgjcList);
|
||||
resumeJobV2Dto.setMappingStatus(1);
|
||||
resumeJobV2Dto.setBizVersion(1);
|
||||
List<String> hwjlList = new ArrayList();
|
||||
hwjl = Util.null2String(map.get("hwjl"));
|
||||
if (StringUtils.isNotBlank(hwjl)) {
|
||||
split1 = hwjl.split(",");
|
||||
List<String> strings = Arrays.asList(split1);
|
||||
if (strings.contains("0")) {
|
||||
hwjlList.add("海外工作经历");
|
||||
}
|
||||
|
||||
if (strings.contains("1")) {
|
||||
hwjlList.add("海外教育背景");
|
||||
}
|
||||
}
|
||||
|
||||
resumeJobV2Dto.setHwjl(hwjlList);
|
||||
String bysjks = Util.null2String(map.get("bysjks"));
|
||||
resumeJobV2Dto.setBysjStart(bysjks);
|
||||
platName = Util.null2String(map.get("bysjjs"));
|
||||
resumeJobV2Dto.setBysjEnd(platName);
|
||||
typeStr = Util.null2String(map.get("fbcs"));
|
||||
if (StringUtils.isNotBlank(typeStr)) {
|
||||
String[] split = typeStr.split(",");
|
||||
resumeJobV2Dto.setFbcs(Arrays.asList(split));
|
||||
}
|
||||
|
||||
String sshy = Util.null2String(map.get("szhy"));
|
||||
List<List<String>> sshyList = new ArrayList();
|
||||
if (StringUtils.isNotBlank(sshy)) {
|
||||
String[] split = sshy.split("\n");
|
||||
String[] var35 = split;
|
||||
int var36 = split.length;
|
||||
|
||||
for(int var37 = 0; var37 < var36; ++var37) {
|
||||
String s = var35[var37];
|
||||
if (StringUtils.isNotBlank(s)) {
|
||||
String[] strings = s.split("-");
|
||||
if (strings.length == 2) {
|
||||
List<String> strings1 = new ArrayList();
|
||||
strings1.add(strings[0]);
|
||||
strings1.add(strings[1]);
|
||||
sshyList.add(strings1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
resumeJobV2Dto.setSshy(sshyList);
|
||||
|
||||
/*
|
||||
* 猎聘必填 智联必填
|
||||
*/
|
||||
// 招聘人数
|
||||
resumeJobV2Dto.setZprs(zprs);
|
||||
resumeJobV2Dto.setSshy(sshyList);
|
||||
String hyyq = Util.null2String(map.get("lphy"));
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.writeLog("hyyq" + hyyq);
|
||||
List<List<String>> hyyqList = new ArrayList();
|
||||
String s;
|
||||
String string1;
|
||||
String sfzw;
|
||||
String zpzwfzr;
|
||||
String hymc1;
|
||||
if (StringUtils.isNotBlank(hyyq)) {
|
||||
String[] split = hyyq.split(",");
|
||||
String[] var65 = split;
|
||||
int var67 = split.length;
|
||||
|
||||
/*
|
||||
* 拉勾必填
|
||||
*/
|
||||
// 职位亮点
|
||||
resumeJobV2Dto.setZwld(Util.null2String(map.get("zwld")));
|
||||
// 行业领域
|
||||
String hyly = Util.null2String(map.get("hyly"));
|
||||
List<String> hylyList = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(hyly)) {
|
||||
hylyList.addAll(Arrays.asList(hyly.split("、")));
|
||||
}
|
||||
resumeJobV2Dto.setHyly(hylyList);
|
||||
for(int var69 = 0; var69 < var67; ++var69) {
|
||||
s = var65[var69];
|
||||
if (StringUtils.isNotBlank(s)) {
|
||||
String[] strings = s.split("_");
|
||||
rs.writeLog("strings" + s);
|
||||
if (strings.length == 2) {
|
||||
string1 = strings[1];
|
||||
String sql = "select hymc,hyflsj from uf_lphyk where (id = '" + string1 + "' or hymc = '" + string1 + "') and zt = 0";
|
||||
rs.writeLog("sql" + sql);
|
||||
rs.execute(sql);
|
||||
if (rs.next()) {
|
||||
String hymc = Util.null2String(rs.getString("hymc"));
|
||||
sfzw = Util.null2String(rs.getString("hyflsj"));
|
||||
if (!sfzw.isEmpty()) {
|
||||
List<String> strings1 = new ArrayList();
|
||||
strings1.add(sfzw);
|
||||
strings1.add(hymc);
|
||||
hyyqList.add(strings1);
|
||||
} else {
|
||||
zpzwfzr = "select hymc from uf_lphyk where hyflsj = '" + hymc + "' and zt = 0";
|
||||
rs.writeLog("sql1" + zpzwfzr);
|
||||
RecordSet rs1 = new RecordSet();
|
||||
rs1.execute(zpzwfzr);
|
||||
|
||||
// 人才加分项
|
||||
String rcjfx = Util.null2String(map.get("rxjfx"));
|
||||
resumeJobV2Dto.setRcjfx(rcjfx);
|
||||
|
||||
// 简历接收邮箱
|
||||
String jljsyx = Util.null2String(map.get("jljsyx"));
|
||||
resumeJobV2Dto.setJsyx(jljsyx);
|
||||
|
||||
// 语言要求
|
||||
String yyyq = Util.null2String(map.get("yyyq"));
|
||||
resumeJobV2Dto.setYyyq(yyyq);
|
||||
|
||||
// 语言要求程度
|
||||
String yyyqcd = Util.null2String(map.get("yyyqcd"));
|
||||
if (StringUtils.isNotBlank(yyyqcd)) {
|
||||
switch (yyyqcd) {
|
||||
case "0":
|
||||
yyyqcd = "一般";
|
||||
break;
|
||||
case "1":
|
||||
yyyqcd = "良好";
|
||||
break;
|
||||
case "2":
|
||||
yyyqcd = "熟练";
|
||||
break;
|
||||
case "3":
|
||||
yyyqcd = "精通";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
resumeJobV2Dto.setYyyq_level(yyyqcd);
|
||||
|
||||
|
||||
// 职位福利
|
||||
String zwfl = Util.null2String(map.get("zwfl"));
|
||||
List<String> zwflList = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(zwfl)) {
|
||||
zwflList.addAll(Arrays.asList(zwfl.split(",")));
|
||||
}
|
||||
resumeJobV2Dto.setZwfl(zwflList);
|
||||
|
||||
PositionSdkInstance positionSdkInstance = PositionSdkInstance.getPositionSdkInstance();
|
||||
// 是否驻外
|
||||
String sfzw = Util.null2String(map.get("sfzw"));
|
||||
if (StringUtils.isBlank(sfzw)) {
|
||||
sfzw = "3";
|
||||
}
|
||||
resumeJobV2Dto.setBossResident(PositionSelectItem.getItemByValue(positionSdkInstance.getBoss_resident(), sfzw));
|
||||
if (!"3".equals(sfzw)) {
|
||||
// 驻外国家或地区
|
||||
String zwgjhdq = Util.null2String(map.get("zwgjhdq"));
|
||||
resumeJobV2Dto.setBossResidentCountry(PositionSelectItem.getItemsByValues(positionSdkInstance.getBoss_resident_country(), zwgjhdq));
|
||||
// 驻外语言要求
|
||||
String zwyyyq = Util.null2String(map.get("zwyyyq"));
|
||||
resumeJobV2Dto.setBossResidentLanguage(PositionSelectItem.getItemsByValues(positionSdkInstance.getBoss_resident_language(), zwyyyq));
|
||||
// 驻外时长
|
||||
String zwsc = Util.null2String(map.get("zwsc"));
|
||||
if ("1".equals(sfzw)) {
|
||||
resumeJobV2Dto.setBossResidentTime(PositionSelectItem.getItemByValue(positionSdkInstance.getBoss_resident_time(), zwsc));
|
||||
} else {
|
||||
resumeJobV2Dto.setBossResidentTime(PositionSelectItem.getItemByValue(positionSdkInstance.getBoss_resident_time_2(), zwsc));
|
||||
}
|
||||
}
|
||||
String zpzwfzr = Util.null2String(map.get("zpzwfzr"));
|
||||
String zpxzr = Util.null2String(map.get("zpxzr"));
|
||||
List<String> userList = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(zpzwfzr)) {
|
||||
userList.addAll(Arrays.asList(zpzwfzr.split(",")));
|
||||
}
|
||||
if (StringUtils.isNotBlank(zpxzr)) {
|
||||
userList.addAll(Arrays.asList(zpxzr.split(",")));
|
||||
}
|
||||
|
||||
resumeJobV2Dto.setShareThirdUserList(userList);
|
||||
|
||||
// 丁香园字段
|
||||
resumeJobV2Dto.setDxy_jzsj(stringTurnLong(finishTime));
|
||||
// 英语等级
|
||||
String yydj = Util.null2String(map.get("yydj"));
|
||||
if(StringUtils.isNotBlank(yydj)) {
|
||||
ResumeJobDynamicField.Item itemByValue = PositionSelectItem.getItemByValue(positionSdkInstance.getDxrcw_yydj(), yydj);
|
||||
if (null != itemByValue) {
|
||||
resumeJobV2Dto.setDxy_yydj(Convert.toInt(itemByValue.getValue(), -1));
|
||||
}
|
||||
}
|
||||
|
||||
// 最低职称
|
||||
String zdzc = Util.null2String(map.get("zdzc"));
|
||||
if(StringUtils.isNotBlank(zdzc)) {
|
||||
ResumeJobDynamicField.Item itemByValue = PositionSelectItem.getItemByValue(positionSdkInstance.getDxrcw_zdzc(), zdzc);
|
||||
if (null != itemByValue) {
|
||||
resumeJobV2Dto.setDxy_zdzc(Convert.toInt(itemByValue.getValue(), -1));
|
||||
}
|
||||
}
|
||||
// 职位福利
|
||||
String dxyzwfl = Util.null2String(map.get("dxyzwfl"));
|
||||
if(StringUtils.isNotBlank(dxyzwfl)) {
|
||||
List<ResumeJobDynamicField.Item> itemsByValues = PositionSelectItem.getItemsByValues(positionSdkInstance.getDxrcw_zwfl(), dxyzwfl);
|
||||
if (CollectionUtils.isNotEmpty(itemsByValues)) {
|
||||
List<Integer> collect = itemsByValues.stream().map(ResumeJobDynamicField.Item::getValue).map(Integer::parseInt).collect(Collectors.toList());
|
||||
resumeJobV2Dto.setDxy_zwfl(collect);
|
||||
}
|
||||
}
|
||||
// 专业要求
|
||||
String zyyq = Util.null2String(map.get("zyyq"));
|
||||
if(StringUtils.isNotBlank(zyyq)) {
|
||||
List<List<String>> zyyqList = new ArrayList<>();
|
||||
String[] split = zyyq.split("\n");
|
||||
for (String s : split) {
|
||||
if (StringUtils.isNotBlank(s)) {
|
||||
String[] strings = s.split("-");
|
||||
List<String> strings1 = Arrays.asList(strings);
|
||||
zyyqList.add(strings1);
|
||||
while(rs1.next()) {
|
||||
hymc1 = rs1.getString("hymc");
|
||||
List<String> strings1 = new ArrayList();
|
||||
strings1.add(hymc);
|
||||
strings1.add(hymc1);
|
||||
hyyqList.add(strings1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
resumeJobV2Dto.setDxy_zyyq(zyyqList);
|
||||
|
||||
resumeJobV2Dto.setHyyq(hyyqList);
|
||||
resumeJobV2Dto.setZprs(zprs);
|
||||
resumeJobV2Dto.setZwld(Util.null2String(map.get("zwld")));
|
||||
String hyly = Util.null2String(map.get("hyly"));
|
||||
List<String> hylyList = new ArrayList();
|
||||
if (StringUtils.isNotBlank(hyly)) {
|
||||
hylyList.addAll(Arrays.asList(hyly.split("、")));
|
||||
}
|
||||
|
||||
resumeJobV2Dto.setHyly(hylyList);
|
||||
String rcjfx = Util.null2String(map.get("rxjfx"));
|
||||
resumeJobV2Dto.setRcjfx(rcjfx);
|
||||
String jljsyx = Util.null2String(map.get("jljsyx"));
|
||||
resumeJobV2Dto.setJsyx(jljsyx);
|
||||
s = Util.null2String(map.get("yyyq"));
|
||||
resumeJobV2Dto.setYyyq(s);
|
||||
String yyyqcd = Util.null2String(map.get("yyyqcd"));
|
||||
if (StringUtils.isNotBlank(yyyqcd)) {
|
||||
switch (yyyqcd) {
|
||||
case "0":
|
||||
yyyqcd = "一般";
|
||||
break;
|
||||
case "1":
|
||||
yyyqcd = "良好";
|
||||
break;
|
||||
case "2":
|
||||
yyyqcd = "熟练";
|
||||
break;
|
||||
case "3":
|
||||
yyyqcd = "精通";
|
||||
}
|
||||
}
|
||||
|
||||
resumeJobV2Dto.setYyyq_level(yyyqcd);
|
||||
string1 = Util.null2String(map.get("zwfl"));
|
||||
List<String> zwflList = new ArrayList();
|
||||
if (StringUtils.isNotBlank(string1)) {
|
||||
zwflList.addAll(Arrays.asList(string1.split("、")));
|
||||
}
|
||||
|
||||
resumeJobV2Dto.setZwfl(zwflList);
|
||||
PositionSdkInstance positionSdkInstance = PositionSdkInstance.getPositionSdkInstance();
|
||||
sfzw = Util.null2String(map.get("sfzw"));
|
||||
if (StringUtils.isBlank(sfzw)) {
|
||||
sfzw = "3";
|
||||
}
|
||||
|
||||
resumeJobV2Dto.setBossResident(PositionSelectItem.getItemByValue(positionSdkInstance.getBoss_resident(), sfzw));
|
||||
String zpxzr;
|
||||
if (!"3".equals(sfzw)) {
|
||||
zpzwfzr = Util.null2String(map.get("zwgjhdq"));
|
||||
resumeJobV2Dto.setBossResidentCountry(PositionSelectItem.getItemsByValues(positionSdkInstance.getBoss_resident_country(), zpzwfzr));
|
||||
zpxzr = Util.null2String(map.get("zwyyyq"));
|
||||
resumeJobV2Dto.setBossResidentLanguage(PositionSelectItem.getItemsByValues(positionSdkInstance.getBoss_resident_language(), zpxzr));
|
||||
hymc1 = Util.null2String(map.get("zwsc"));
|
||||
if ("1".equals(sfzw)) {
|
||||
resumeJobV2Dto.setBossResidentTime(PositionSelectItem.getItemByValue(positionSdkInstance.getBoss_resident_time(), hymc1));
|
||||
} else {
|
||||
resumeJobV2Dto.setBossResidentTime(PositionSelectItem.getItemByValue(positionSdkInstance.getBoss_resident_time_2(), hymc1));
|
||||
}
|
||||
}
|
||||
|
||||
zpzwfzr = Util.null2String(map.get("zpzwfzr"));
|
||||
zpxzr = Util.null2String(map.get("zpxzr"));
|
||||
List<String> userList = new ArrayList();
|
||||
if (StringUtils.isNotBlank(zpzwfzr)) {
|
||||
userList.addAll(Arrays.asList(zpzwfzr.split(",")));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(zpxzr)) {
|
||||
userList.addAll(Arrays.asList(zpxzr.split(",")));
|
||||
}
|
||||
|
||||
resumeJobV2Dto.setShareThirdUserList(userList);
|
||||
|
||||
// 丁香园字段
|
||||
resumeJobV2Dto.setDxy_jzsj(stringTurnLong(finishTime));
|
||||
// 英语等级
|
||||
String yydj = Util.null2String(map.get("yydj"));
|
||||
if(StringUtils.isNotBlank(yydj)) {
|
||||
ResumeJobDynamicField.Item itemByValue = PositionSelectItem.getItemByValue(positionSdkInstance.getDxrcw_yydj(), yydj);
|
||||
if (null != itemByValue) {
|
||||
resumeJobV2Dto.setDxy_yydj(Convert.toInt(itemByValue.getValue(), -1));
|
||||
}
|
||||
}
|
||||
|
||||
// 最低职称
|
||||
String zdzc = Util.null2String(map.get("zdzc"));
|
||||
if(StringUtils.isNotBlank(zdzc)) {
|
||||
ResumeJobDynamicField.Item itemByValue = PositionSelectItem.getItemByValue(positionSdkInstance.getDxrcw_zdzc(), zdzc);
|
||||
if (null != itemByValue) {
|
||||
resumeJobV2Dto.setDxy_zdzc(Convert.toInt(itemByValue.getValue(), -1));
|
||||
}
|
||||
}
|
||||
// 职位福利
|
||||
String dxyzwfl = Util.null2String(map.get("dxyzwfl"));
|
||||
if(StringUtils.isNotBlank(dxyzwfl)) {
|
||||
List<ResumeJobDynamicField.Item> itemsByValues = PositionSelectItem.getItemsByValues(positionSdkInstance.getDxrcw_zwfl(), dxyzwfl);
|
||||
if (CollectionUtils.isNotEmpty(itemsByValues)) {
|
||||
List<Integer> collect = itemsByValues.stream().map(ResumeJobDynamicField.Item::getValue).map(Integer::parseInt).collect(Collectors.toList());
|
||||
resumeJobV2Dto.setDxy_zwfl(collect);
|
||||
}
|
||||
}
|
||||
// 专业要求
|
||||
String zyyq = Util.null2String(map.get("zyyq"));
|
||||
if(StringUtils.isNotBlank(zyyq)) {
|
||||
List<List<String>> zyyqList = new ArrayList<>();
|
||||
String[] split = zyyq.split("\n");
|
||||
for (String s1 : split) {
|
||||
if (StringUtils.isNotBlank(s1)) {
|
||||
String[] strings = s1.split("-");
|
||||
List<String> strings1 = Arrays.asList(strings);
|
||||
zyyqList.add(strings1);
|
||||
}
|
||||
}
|
||||
resumeJobV2Dto.setDxy_zyyq(zyyqList);
|
||||
|
||||
}
|
||||
|
||||
|
||||
return resumeJobV2Dto;
|
||||
}
|
||||
|
||||
|
||||
return resumeJobV2Dto;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -446,42 +418,35 @@ public class RecruitPositionUtil {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* 将字符串形式的时间转换为长整型时间戳
|
||||
*
|
||||
* @param timeString 字符串形式的时间
|
||||
* @return 长整型时间戳
|
||||
*/
|
||||
private static Long stringTurnLong(String timeString) {
|
||||
if (StringUtils.isBlank(timeString)) {
|
||||
return null;
|
||||
} else {
|
||||
try {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date date = dateFormat.parse(timeString);
|
||||
return date.getTime();
|
||||
} catch (ParseException var3) {
|
||||
(new BaseBean()).writeLog(var3);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
try {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date date = dateFormat.parse(timeString);
|
||||
return date.getTime();
|
||||
} catch (ParseException e) {
|
||||
new BaseBean().writeLog(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 匹配三方发布平台
|
||||
*
|
||||
* @param platformIds 发布平台ids
|
||||
* @return 发布平台
|
||||
*/
|
||||
private static List<Integer> matchPlatform(String platformIds) {
|
||||
String[] split = platformIds.split(",");
|
||||
List<Integer> platformIdList = new ArrayList<>();
|
||||
for (String platformId : split) {
|
||||
if (platformId == null) {
|
||||
continue;
|
||||
List<Integer> platformIdList = new ArrayList();
|
||||
String[] var3 = split;
|
||||
int var4 = split.length;
|
||||
|
||||
for(int var5 = 0; var5 < var4; ++var5) {
|
||||
String platformId = var3[var5];
|
||||
if (platformId != null) {
|
||||
PositionThirdChannelEnum channelEnum = PositionThirdChannelEnum.getEnumByValue(platformId);
|
||||
platformIdList.add(channelEnum.getResumePlatformId());
|
||||
}
|
||||
PositionThirdChannelEnum channelEnum = PositionThirdChannelEnum.getEnumByValue(platformId);
|
||||
platformIdList.add(channelEnum.getResumePlatformId());
|
||||
}
|
||||
|
||||
return platformIdList;
|
||||
}
|
||||
|
||||
|
|
@ -514,14 +479,12 @@ public class RecruitPositionUtil {
|
|||
}
|
||||
|
||||
public static boolean checkAvailable(ERPAResumeSDKClient client) {
|
||||
//默认10秒
|
||||
HttpClientUtils.setTimeout(10000);
|
||||
if (client == null || !client.available()) {
|
||||
new BaseBean().writeLog("checkAvailable!client=" + JSON.toJSONString(client));
|
||||
return false;
|
||||
} else {
|
||||
if (client != null && client.available()) {
|
||||
return true;
|
||||
} else {
|
||||
(new BaseBean()).writeLog("checkAvailable!client=" + JSON.toJSONString(client));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue