Compare commits

...

4 Commits

13 changed files with 416 additions and 79 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,7 +1,9 @@
package com.engine.recruit.conn;
import com.engine.recruit.util.WeaBrowserUtil;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.hrm.User;
/**
* @author:dxfeng
@ -44,6 +46,36 @@ public class ModeBrowserCommonInfo {
return id;
}
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);
rs.writeLog("areaName===" + areaName);
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;
}else if(split.length == 3){
areaName = split[0] + "-" + split[1] + "-" + split[2];
placeName = areaName + "-" + xxdz;
}
} else {
rs.writeLog("id=" + id + ",ssq=" + ssq + ",xxdz=" + xxdz);
}
}
return placeName;
}
private static String getBrowserId(String zdlxmc, String xxnr) {
if (StringUtils.isBlank(xxnr)) {

View File

@ -9,6 +9,7 @@ import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
@ -34,4 +35,13 @@ public class RecruitPositionController {
Map<String, Object> param = ParamUtil.request2Map(request);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getRecruitPositionWrapper(user)::updatePostInfo, param);
}
@GET
@Path("/createPositionType")
@Produces(MediaType.APPLICATION_JSON)
public String createPositionType(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> param = ParamUtil.request2Map(request);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getRecruitPositionWrapper(user)::createPositionType, param);
}
}

View File

@ -17,4 +17,12 @@ public interface RecruitPositionService {
*/
Map<String, Object> updatePostInfo(Map<String, Object> param);
/**
* 生成职位类型
*
* @param param
* @return
*/
Map<String, Object> createPositionType(Map<String, Object> param);
}

View File

@ -1,14 +1,22 @@
package com.engine.recruit.service.impl;
import com.engine.core.impl.Service;
import com.engine.recruit.conn.RecruitDataMap;
import com.engine.recruit.conn.RecruitRecordSet;
import com.engine.recruit.exception.CustomizeRunTimeException;
import com.engine.recruit.service.RecruitPositionService;
import com.weaver.formmodel.util.DateHelper;
import com.weaver.rpa.sdk.clients.application.resume.ERPAResumeSDKClient;
import com.weaver.rpa.sdk.clients.application.resume.entity.ResumeJobDynamicField;
import com.weaver.rpa.sdk.clients.core.ERPASDKClients;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.general.Util;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
/**
* @author:dxfeng
@ -35,4 +43,87 @@ public class RecruitPositionServiceImpl extends Service implements RecruitPositi
}
return returnMap;
}
@Override
public Map<String, Object> createPositionType(Map<String, Object> param) {
RecordSet rs = new RecordSet();
ERPAResumeSDKClient client = ERPASDKClients.getResumeSDKClient();
ResumeJobDynamicField resumeJobDynamicField = client.getResumeJobDynamicField();
List<ResumeJobDynamicField.Item> boss_type = (List<ResumeJobDynamicField.Item>) resumeJobDynamicField.getBoss_type();
String currentDate = DateHelper.getCurrentDate();
String currentTime = DateHelper.getCurrentTime();
String currentDateTime = DateHelper.getCurDateTime();
// 插入主表数据
Map<String, Object> mainDataMap = new RecruitDataMap<>();
mainDataMap.put("SELECTITEMNAME", "BOSS直聘职位类别");
mainDataMap.put("CREATER", "1");
mainDataMap.put("CREATEDATE", currentDate);
mainDataMap.put("CREATETIME", currentTime);
mainDataMap.put("APPID", 0);
mainDataMap.put("UUID", UUID.randomUUID().toString());
mainDataMap.put("OPERATETIME", currentDateTime);
RecruitRecordSet.insertData(mainDataMap, "mode_selectitempage");
rs.executeQuery("select max(id) as id from mode_selectitempage ");
String mainId = "";
if (rs.next()) {
mainId = rs.getString("id");
}
if (StringUtils.isBlank(mainId)) {
throw new CustomizeRunTimeException("BOSS直聘职位类别,数据插入异常");
}
for (ResumeJobDynamicField.Item topItem : boss_type) {
// 插入第一层数据
RecruitDataMap<Object> topMap = buildPageDetailMap(mainId, "0", topItem.getLabel(), 1);
RecruitRecordSet.insertData(topMap, "mode_selectitempagedetail");
rs.executeQuery("select max(id) as id from mode_selectitempagedetail ");
String topId = "";
if (rs.next()) {
topId = rs.getString("id");
}
if (StringUtils.isBlank(topId)) {
throw new CustomizeRunTimeException("BOSS直聘职位类别,一级数据插入异常");
}
List<ResumeJobDynamicField.Item> secondItemList = (List<ResumeJobDynamicField.Item>) topItem.getChildren();
for (ResumeJobDynamicField.Item secondItem : secondItemList) {
// 插入第二层数据
RecruitDataMap<Object> secondMap = buildPageDetailMap(mainId, topId, secondItem.getLabel(), 2);
RecruitRecordSet.insertData(secondMap, "mode_selectitempagedetail");
rs.executeQuery("select max(id) as id from mode_selectitempagedetail ");
String secondId = "";
if (rs.next()) {
secondId = rs.getString("id");
}
if (StringUtils.isBlank(secondId)) {
throw new CustomizeRunTimeException("BOSS直聘职位类别,二级数据插入异常");
}
List<ResumeJobDynamicField.Item> thirdItemList = (List<ResumeJobDynamicField.Item>) secondItem.getChildren();
for (ResumeJobDynamicField.Item thirdItem : thirdItemList) {
// 插入第三层数据
RecruitDataMap<Object> thirdMap = buildPageDetailMap(mainId, secondId, thirdItem.getLabel(), 3);
RecruitRecordSet.insertData(thirdMap, "mode_selectitempagedetail");
}
}
}
return null;
}
private RecruitDataMap<Object> buildPageDetailMap(String mainId, String pId, String name, int stateLev) {
RecruitDataMap<Object> map = new RecruitDataMap<>();
map.put("MAINID", mainId);
map.put("NAME", name);
map.put("DISORDER", 0);
map.put("MAINCATEGORY", "-1,-1,-1");
map.put("ISACCORDTOSUBCOM", 0);
map.put("PID", pId);
map.put("STATELEV", stateLev);
map.put("CANCEL", 0);
map.put("UUID", UUID.randomUUID().toString());
return map;
}
}

View File

@ -2,6 +2,7 @@ package com.engine.recruit.service.impl;
import com.engine.core.impl.Service;
import com.engine.recruit.conn.RecruitRecordSet;
import com.engine.recruit.exception.CustomizeRunTimeException;
import com.engine.recruit.service.RpaJclService;
import com.weaver.rpa.sdk.clients.application.resume.ERPAResumeSDKClient;
import com.weaver.rpa.sdk.clients.application.resume.entity.ResumeEmailSetting;
@ -19,38 +20,42 @@ import java.util.Map;
public class RpaJclServiceImpl extends Service implements RpaJclService {
@Override
public Map<String, Object> setEmailSetting(Map<String, Object> param) {
String billId = Util.null2String(param.get("billId"));
RecordSet rs = new RecordSet();
rs.executeQuery("select * from uf_jcl_qllyxpz where id = ? ", billId);
Map<String, Object> dataMap = RecruitRecordSet.getSingleRecordMap(rs);
try {
String billId = Util.null2String(param.get("billId"));
RecordSet rs = new RecordSet();
rs.executeQuery("select * from uf_jcl_qllyxpz where id = ? ", billId);
Map<String, Object> dataMap = RecruitRecordSet.getSingleRecordMap(rs);
ERPAResumeSDKClient resumeSDKClient = ERPASDKClients.getResumeSDKClient();
String userId = Util.null2String(dataMap.get("szr"));
String status = Util.null2String(dataMap.get("zt"));
String server = Util.null2String(dataMap.get("yjjsfwq"));
String port = Util.null2String(dataMap.get("jsdk"));
String protocol = Util.null2String(dataMap.get("csxy"));
String site = Util.null2String(dataMap.get("yxdz"));
String login = Util.null2String(dataMap.get("yxzh"));
String password = Util.null2String(dataMap.get("yxsqmmm"));
ERPAResumeSDKClient resumeSDKClient = ERPASDKClients.getResumeSDKClient();
String userId = Util.null2String(dataMap.get("szr"));
String status = Util.null2String(dataMap.get("zt"));
String server = Util.null2String(dataMap.get("yjjsfwq"));
String port = Util.null2String(dataMap.get("jsdk"));
String protocol = Util.null2String(dataMap.get("csxy"));
String site = Util.null2String(dataMap.get("yxdz"));
String login = Util.null2String(dataMap.get("yxzh"));
String password = Util.null2String(dataMap.get("yxsqmmm"));
ResumeEmailSetting emailSetting = new ResumeEmailSetting();
ResumeEmailSetting emailSetting = new ResumeEmailSetting();
// 配置启用邮箱功能
emailSetting.setSEMAILSTATUS(status);
emailSetting.setSEMAILSERVER(server);
emailSetting.setSEMAILPORT(port);
emailSetting.setSEMAILPROTOCOL(protocol);
//emailSetting.setSISSEND(isSend);
emailSetting.setSEMAILSITE(site);
emailSetting.setSEMAILLOGIN(login);
emailSetting.setSEMAILPASSWORD(password);
// 配置启用邮箱功能
emailSetting.setSEMAILSTATUS(status);
emailSetting.setSEMAILSERVER(server);
emailSetting.setSEMAILPORT(port);
emailSetting.setSEMAILPROTOCOL(protocol);
//emailSetting.setSISSEND(isSend);
emailSetting.setSEMAILSITE(site);
emailSetting.setSEMAILLOGIN(login);
emailSetting.setSEMAILPASSWORD(password);
// 禁用邮箱功能(只需要传递Status为0)
// emailSetting.setSEMAILSTATUS("0");
// 禁用邮箱功能(只需要传递Status为0)
// emailSetting.setSEMAILSTATUS("0");
// 调用方法更新简历机器人采集设置在千里聆中会更新目标用户机器人配置
resumeSDKClient.setEmailSetting(userId, emailSetting);
// 调用方法更新简历机器人采集设置在千里聆中会更新目标用户机器人配置
resumeSDKClient.setEmailSetting(userId, emailSetting);
} catch (Exception e) {
throw new CustomizeRunTimeException(e);
}
return null;
}
}

View File

@ -212,13 +212,17 @@ public class SdkResumeSavedThread extends LocalRunnable {
baseBean.writeLog("解析千里聆SDK原始简历resumeFileId===" + resumeFileId);
List<Integer> docIdList = new ArrayList<>();
ERPAResumeSDKClient client = ERPASDKClients.getResumeSDKClient();
client.start();
client.downloadResumeFile(resumeFileId, (fileName, stream) -> {
try {
baseBean.writeLog("解析千里聆SDK原始简历fileName===" + fileName);
int imageFileId = RecruitModeUtil.generateImageFileId(stream, fileName);
baseBean.writeLog("解析千里聆SDK原始简历imageFileId===" + imageFileId);
docIdList.add(RecruitModeUtil.createDocId(SEC_CATEGORY, imageFileId, user));
if (imageFileId > 0) {
int docId = RecruitModeUtil.createDocId(SEC_CATEGORY, imageFileId, user);
if (docId > 0) {
docIdList.add(docId);
}
}
} catch (Exception e) {
baseBean.writeLog("解析千里聆SDK原始简历失败", e);
throw new RuntimeException(e);

View File

@ -0,0 +1,34 @@
package com.engine.recruit.util;
import weaver.general.Util;
import weaver.hrm.User;
import weaver.hrm.definedfield.HrmFieldManager;
/**
* @author:dxfeng
* @createTime: 2024/04/07
* @version: 1.0
*/
public class WeaBrowserUtil {
/**
* 获取浏览按钮的展示内容
*
* @param user
* @param browserType
* @param value
* @return
*/
public static String getBrowserShowNames(User user, int browserType, String value) {
HrmFieldManager hrmFieldManager = new HrmFieldManager();
String fieldShowName;
try {
fieldShowName = hrmFieldManager.getFieldvalue(user, null, 0, 3, browserType, value, 0);
fieldShowName = Util.formatMultiLang(fieldShowName, Util.null2String(user.getLanguage()));
} catch (Exception e) {
throw new RuntimeException(e);
}
return fieldShowName;
}
}

View File

@ -21,4 +21,8 @@ public class RecruitPositionWrapper extends Service {
public Map<String, Object> updatePostInfo(Map<String, Object> param) {
return getRecruitPositionService(user).updatePostInfo(param);
}
public Map<String, Object> createPositionType(Map<String, Object> param) {
return getRecruitPositionService(user).createPositionType(param);
}
}

View File

@ -3,9 +3,10 @@ package weaver.formmode.recruit.modeexpand.position;
import com.alibaba.fastjson.JSON;
import com.engine.recruit.thread.SdkResumeSavedThread;
import com.weaver.rpa.sdk.clients.application.resume.ERPAResumeSDKClient;
import com.weaver.rpa.sdk.clients.application.resume.entity.ResumeJobDto;
import com.weaver.rpa.sdk.clients.application.resume.entity.ResumeJobV2Dto;
import com.weaver.rpa.sdk.clients.core.ERPASDKClients;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import weaver.conn.RecordSet;
import weaver.erpa.apps.entity.application.resume.dto.ResumeTaskResult;
import weaver.erpa.apps.entity.application.resume.enums.TaskResult;
@ -60,7 +61,7 @@ public class ReleasePositionModeExpand extends AbstractModeExpandJavaCodeNew {
for (Property property : properties) {
map.put(property.getName(), property.getValue());
}
ResumeJobDto resumeJobDto = RecruitPositionUtil.convertMap2ResumeJobDto(map);
ResumeJobV2Dto resumeJobDto = RecruitPositionUtil.convertMap2ResumeJobV2Dto(user,map);
// 发布千里聆职位
if (!RecruitPositionUtil.checkAvailable(client)) {
baseBean.writeLog("千里聆未开通简历应用。");
@ -73,13 +74,17 @@ public class ReleasePositionModeExpand extends AbstractModeExpandJavaCodeNew {
if (jobId == -1) {
baseBean.writeLog("【创建职位】,[id=" + billId + "],resumeJobDto=" + JSON.toJSONString(resumeJobDto));
// 创建千里聆职位
jobId = client.addResumeJob(userId, resumeJobDto);
jobId = client.addResumeJobV2(userId, resumeJobDto);
// 更新千里聆ID到建模表单
rs.executeUpdate("update " + tableName + " set qllgwid = ? where id = ?", jobId, billId);
} else {
//baseBean.writeLog("【更新职位】,[id=" + billId + "],[qllgwid=" + jobId + "],resumeJobDto=" + JSON.toJSONString(resumeJobDto));
//// 已发布的职位更新职位信息
//client.editResumeJob(userId, jobId, (jobDto) -> resumeJobDto);
baseBean.writeLog("【更新职位】,[id=" + billId + "],[qllgwid=" + jobId + "],resumeJobDto=" + JSON.toJSONString(resumeJobDto));
// 已发布的职位更新职位信息
client.editResumeJobV2(userId, jobId, jobDto -> {
new BaseBean().writeLog("职位更新前:" + JSON.toJSONString(jobDto));
BeanUtils.copyProperties(resumeJobDto,jobDto);
new BaseBean().writeLog("职位更新后:" + JSON.toJSONString(jobDto));
});
}
// 在启动监听前需要配置好简历接收回调
@ -93,7 +98,7 @@ public class ReleasePositionModeExpand extends AbstractModeExpandJavaCodeNew {
client.start();
List<Integer> platformIds;
platformIds = resumeJobDto.getPlatformIds();
platformIds = resumeJobDto.getPlatformList();
String errorMsg = "";
for (Integer platformId : platformIds) {
ResumeTaskResult result = client.releaseResumeJob(userId, jobId, platformId);

View File

@ -3,14 +3,19 @@ package weaver.formmode.recruit.modeexpand.util;
import cn.hutool.core.convert.Convert;
import com.alibaba.fastjson.JSON;
import com.engine.recruit.conn.ApplicantCommonInfo;
import com.engine.recruit.conn.ModeBrowserCommonInfo;
import com.engine.recruit.enums.PositionThirdChannelEnum;
import com.engine.recruit.exception.CustomizeRunTimeException;
import com.weaver.rpa.sdk.clients.application.resume.ERPAResumeSDKClient;
import com.weaver.rpa.sdk.clients.application.resume.common.ResumePlatform;
import com.weaver.rpa.sdk.clients.application.resume.entity.ResumeJobDto;
import com.weaver.rpa.sdk.clients.application.resume.entity.ResumeJobDynamicField;
import com.weaver.rpa.sdk.clients.application.resume.entity.ResumeJobV2Dto;
import com.weaver.rpa.sdk.utils.HttpClientUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.hrm.User;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@ -26,27 +31,50 @@ import java.util.*;
public class RecruitPositionUtil {
/**
* 将Map转换成ResumeJobDto对象
* 将Map转换成ResumeJobV2Dto对象
*
* @param map 数据集合
* @return ResumeJobDto对象
* @return ResumeJobV2Dto
*/
public static ResumeJobDto convertMap2ResumeJobDto(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);// 实习时长
String jobCategory = "不限";//职位类别
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 zwlx = Util.null2String(map.get("zwlx"));
String zwlx2 = Util.null2String(map.get("zwlx2"));
String zwlx3 = Util.null2String(map.get("zwlx3"));
int experienceValue = -1;//不限
// 工作地点
String gzdd = Convert.toStr(map.get("gzdd"));
String workPlaceShowName = ModeBrowserCommonInfo.getWorkPlaceShowName(user, gzdd);
//不限
int experienceValue = -1;
if ("应届毕业生".equals(workYears)) {
experienceValue = 1;
} else if ("一年以内".equals(workYears)) {
@ -62,7 +90,8 @@ public class RecruitPositionUtil {
}
int educationValue = -1; //不限
//不限
int educationValue = -1;
if ("博士".equals(education)) {
educationValue = 8;
} else if ("MBA/EMBA".equals(education)) {
@ -81,7 +110,8 @@ public class RecruitPositionUtil {
educationValue = 1;
}
int resumeType = 1;// 兼职全职
// 社招全职兼职其他
int resumeType = 1;
if ("实习".equals(positionNature)) {
resumeType = 3;
} else if ("校招".equals(positionNature)) {
@ -90,52 +120,166 @@ public class RecruitPositionUtil {
// 招聘职位类型与特殊设置字段
ResumeJobDto resumeJobDto = new ResumeJobDto();
resumeJobDto.setResumeType(resumeType); // (必填,默认社招)招聘类型 1:社招 2:校招 3:实习
ResumeJobV2Dto resumeJobV2Dto = new ResumeJobV2Dto();
if (StringUtils.isNotBlank(workPlaceShowName)) {
resumeJobV2Dto.setJobArea(workPlaceShowName);
}
// (必填,默认社招)招聘类型 1:社招 2:校招 3:实习
resumeJobV2Dto.setResumeType(resumeType);
if (2 == resumeType && StringUtils.isBlank(finishTime)) {
throw new CustomizeRunTimeException("校招招聘截止时间必填");
}
resumeJobDto.setStopReumeTimeLong(stringTurnLong(finishTime));// (校招必填)仅校招: 招聘截止时间(时间戳)
resumeJobDto.setRequirementsTime(internshipDuration); // (实习必填,默认1个月)仅实习: 实习时长 1~12 单位:()
resumeJobDto.setWorkDate(workingDays); // (实习必填,默认1天)仅实习: 每周到岗天数 1~7 单位:()
// (校招必填)仅校招: 招聘截止时间(时间戳)
resumeJobV2Dto.setStopReumeTimeLong(stringTurnLong(finishTime));
// (实习必填,默认1个月)仅实习: 实习时长 1~12 单位:()
resumeJobV2Dto.setRequirementsTime(internshipDuration);
// (实习必填,默认1天)仅实习: 每周到岗天数 1~7 单位:()
resumeJobV2Dto.setWorkDate(workingDays);
// 招聘职位基本描述
resumeJobDto.setJobname(positionName); // 配置职位名称
// 配置职位名称
resumeJobV2Dto.setJobname(positionName);
String jobDescription = "";
if (StringUtils.isNotBlank(positionDuty)) {
jobDescription += "职位职责:\n" + positionDuty +"\n\n";
jobDescription += "职位职责:\n" + positionDuty + "\n\n";
}
if (StringUtils.isNotBlank(jobRequirements)) {
jobDescription += "任职要求:\n" + jobRequirements;
}
// 配置职位描述
resumeJobV2Dto.setJobdesc(jobDescription);
new BaseBean().writeLog("zwlx=" + zwlx + ",zwlx2=" + zwlx2 + ",zwlx3=" + zwlx3);
// 配置职位类别
int formId = ApplicantCommonInfo.getFormIdByTableName("uf_jcl_zp_zpzw");
String zwlxStr = ApplicantCommonInfo.getSelectName(String.valueOf(formId), "zwlx", zwlx);
String zwlx2Str = ApplicantCommonInfo.getSelectName(String.valueOf(formId), "zwlx2", zwlx2);
String zwlx3Str = ApplicantCommonInfo.getSelectName(String.valueOf(formId), "zwlx3", zwlx3);
String jobCategory = zwlxStr + "-" + zwlx2Str + "-" + zwlx3Str;
new BaseBean().writeLog("zwlxStr=" + zwlxStr + ",zwlx2Str=" + zwlx2Str + ",zwlx3Str=" + zwlx3Str);
new BaseBean().writeLog("jobCategory=" + jobCategory);
resumeJobDto.setJobdesc(jobDescription); // 配置职位描述
resumeJobDto.setJobType(jobCategory); // 配置职位类别
List<ResumeJobDynamicField.Item> items = new ArrayList<>();
ResumeJobDynamicField.Item item = new ResumeJobDynamicField.Item();
item.setLabel(String.valueOf(ResumePlatform.BOSSZHIPIN));
item.setValue(jobCategory);
items.add(item);
resumeJobV2Dto.setJobType(items);
// 招聘职位条件
//resumeJobDto.setKeywordStr(Lists.newArrayList("java")); // 职位关键词
resumeJobDto.setExperience(experienceValue); // (必填,默认不限)经验要求(实习无此字段) -1:不限 1:一年以下 2:1~3年 3:3~5年 5:5~10年 6:10年以上
resumeJobDto.setEducation(educationValue); // (必填,默认不限)学历要求 -1:不限 1:初中及以下 2:高中 3:中专/中技 4:大专 5:本科 6:硕士 7:MBA/EMBA 8:博士
// (必填,默认不限)经验要求(实习无此字段) -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);
//薪资福利
resumeJobDto.setExpectSalaryStart(salaryMin); // (必填)薪资范围开始 单位:(社招/校招: 千元/ 实习:/)
resumeJobDto.setExpectSalaryStop(salaryMax); // (必填)薪资范围截止 单位:(社招/校招: 千元/ 实习:/)
resumeJobDto.setExpectSalaryMonth(xcyfs); // (必填,默认12个月)薪资月份数(实习无此字段) 1224
// (必填)薪资范围开始 单位:(社招/校招: 千元/ 实习:/)
resumeJobV2Dto.setExpectSalaryStart(salaryMin);
// (必填)薪资范围截止 单位:(社招/校招: 千元/ 实习:/)
resumeJobV2Dto.setExpectSalaryStop(salaryMax);
// (必填,默认12个月)薪资月份数(实习无此字段) 1224
resumeJobV2Dto.setExpectSalaryMonth(xcyfs);
// (必填)要发布的渠道平台Id
List<Integer> platformIds = matchPlatform(Convert.toStr(map.get("dsfqd")));
resumeJobDto.setPlatformIds(platformIds);
resumeJobV2Dto.setPlatformList(platformIds);
// 简历匹配度设置
resumeJobDto.setMappingageStart(-1); // (必填,默认不限)匹配年龄age开始 -1:不限
resumeJobDto.setMappingageStop(-1);// (必填,默认不限)匹配年龄age开始 -1:不限
resumeJobDto.setMappingSex(-1);// (必填,默认不限)匹配性别 -1:不限 0: 1:
resumeJobDto.setMappingeducationStr(Collections.singletonList(-1));// (必填,默认不限)匹配学历 -1:不限 1:初中及以下 2:高中 3:中专/中技 4:大专 5:本科 6:硕士 7:MBA/EMBA 8:博士
resumeJobDto.setMappingexperienceStr(Collections.singletonList(-1));// (必填,默认不限)匹配经验 -1:不限 1:1年内 2:1~3年 3:3~5年 4:5~10年 5:10年以上
// resumeJobDto.setMappingKeywordStr(Lists.newArrayList()); // 匹配关键词内容
resumeJobDto.setMappingStatus(1); // (必填,默认任一命中)匹配模式 1:任一命中 2:全部命中
// (必填,默认不限)匹配年龄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));
return resumeJobDto;
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("海外工作经历");
}
if (strings.contains("1")) {
hwjlList.add("海外教育背景");
}
}
resumeJobV2Dto.setHwjl(hwjlList);
/*
*BOSS直聘必填字段
*/
// 毕业时间-开始 boss校招必填
String bysjks = Util.null2String(map.get("bysjks"));
resumeJobV2Dto.setBysjStart(bysjks);
// 毕业时间-结束 boss校招必填
String bysjjs = Util.null2String(map.get("bysjjs"));
resumeJobV2Dto.setBysjEnd(bysjjs);
/*
* 前程无忧必填
*/
// 发布城市
List<String> cityList = new ArrayList<>();
String fbcs = Util.null2String(map.get("fbcs"));
RecordSet rs = new RecordSet();
rs.executeQuery("select cityname from hrmcity where id = ?", fbcs);
if (rs.next()) {
String cityName = rs.getString("cityname");
cityName = Util.formatMultiLang(cityName, Util.null2String(user.getLanguage()));
cityList.add(cityName);
}
// TODO resumeJobV2Dto.setFbcs(cityList);
// 所属行业
String sshy = Util.null2String(map.get("szhy"));
List<String> sshyList = new ArrayList<>();
if (StringUtils.isNotBlank(sshy)) {
sshyList.addAll(Arrays.asList(sshy.split("")));
}
resumeJobV2Dto.setSshy(Collections.singletonList(sshyList));
/*
* 猎聘必填 智联必填
*/
// 招聘人数
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);
return resumeJobV2Dto;
}
/**