generated from dxfeng/secondev-chapanda-feishu
职位发布-添加工作地点字段
This commit is contained in:
parent
2c0d1833d3
commit
165797cafa
|
|
@ -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
|
||||
|
|
@ -61,6 +63,32 @@ 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);
|
||||
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 {
|
||||
rs.writeLog("id=" + id + ",ssq=" + ssq + ",xxdz=" + xxdz);
|
||||
}
|
||||
}
|
||||
return placeName;
|
||||
}
|
||||
|
||||
|
||||
private static String getBrowserId(String zdlxmc, String xxnr) {
|
||||
if (StringUtils.isBlank(xxnr)) {
|
||||
|
|
|
|||
|
|
@ -219,7 +219,12 @@ public class SdkResumeSavedThread extends LocalRunnable {
|
|||
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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ public class ReleasePositionModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
for (Property property : properties) {
|
||||
map.put(property.getName(), property.getValue());
|
||||
}
|
||||
ResumeJobV2Dto resumeJobDto = RecruitPositionUtil.convertMap2ResumeJobV2Dto(map);
|
||||
ResumeJobV2Dto resumeJobDto = RecruitPositionUtil.convertMap2ResumeJobV2Dto(user,map);
|
||||
// 发布千里聆职位
|
||||
if (!RecruitPositionUtil.checkAvailable(client)) {
|
||||
baseBean.writeLog("千里聆未开通简历应用。");
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ 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;
|
||||
|
|
@ -14,6 +15,7 @@ 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;
|
||||
|
|
@ -34,7 +36,7 @@ public class RecruitPositionUtil {
|
|||
* @param map 数据集合
|
||||
* @return ResumeJobV2Dto
|
||||
*/
|
||||
public static ResumeJobV2Dto convertMap2ResumeJobV2Dto(Map<String, Object> map) {
|
||||
public static ResumeJobV2Dto convertMap2ResumeJobV2Dto(User user, Map<String, Object> map) {
|
||||
// 职位名称
|
||||
String positionName = Convert.toStr(map.get("zpzwmc"));
|
||||
// 职位职责
|
||||
|
|
@ -64,6 +66,10 @@ public class RecruitPositionUtil {
|
|||
// 职位类别
|
||||
String jobCategory = "不限";
|
||||
|
||||
// 工作地点
|
||||
String gzdd = Convert.toStr(map.get("gzdd"));
|
||||
String workPlaceShowName = ModeBrowserCommonInfo.getWorkPlaceShowName(user, gzdd);
|
||||
|
||||
//不限
|
||||
int experienceValue = -1;
|
||||
if ("应届毕业生".equals(workYears)) {
|
||||
|
|
@ -112,6 +118,9 @@ public class RecruitPositionUtil {
|
|||
|
||||
// 招聘职位类型与特殊设置字段
|
||||
ResumeJobV2Dto resumeJobV2Dto = new ResumeJobV2Dto();
|
||||
if(StringUtils.isNotBlank(workPlaceShowName)){
|
||||
// TODO 设置工作地点
|
||||
}
|
||||
// (必填,默认社招)招聘类型 1:社招 2:校招 3:实习
|
||||
resumeJobV2Dto.setResumeType(resumeType);
|
||||
if (2 == resumeType && StringUtils.isBlank(finishTime)) {
|
||||
|
|
@ -142,6 +151,7 @@ public class RecruitPositionUtil {
|
|||
ResumeJobDynamicField.Item item = new ResumeJobDynamicField.Item();
|
||||
item.setLabel("0");
|
||||
item.setValue(jobCategory);
|
||||
// TODO items.add(item);
|
||||
resumeJobV2Dto.setJobType(items);
|
||||
|
||||
// 招聘职位条件
|
||||
|
|
|
|||
Loading…
Reference in New Issue