generated from dxfeng/secondev-chapanda-feishu
江苏新视云 职位工作地址
This commit is contained in:
parent
c5ed862994
commit
130ef4b117
|
|
@ -1,7 +1,9 @@
|
||||||
package com.engine.recruit.conn;
|
package com.engine.recruit.conn;
|
||||||
|
|
||||||
|
import com.engine.recruit.util.WeaBrowserUtil;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import weaver.conn.RecordSet;
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author:dxfeng
|
* @author:dxfeng
|
||||||
|
|
@ -44,6 +46,36 @@ public class ModeBrowserCommonInfo {
|
||||||
return id;
|
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) {
|
private static String getBrowserId(String zdlxmc, String xxnr) {
|
||||||
if (StringUtils.isBlank(xxnr)) {
|
if (StringUtils.isBlank(xxnr)) {
|
||||||
|
|
|
||||||
|
|
@ -212,13 +212,17 @@ public class SdkResumeSavedThread extends LocalRunnable {
|
||||||
baseBean.writeLog("解析千里聆SDK原始简历,resumeFileId===" + resumeFileId);
|
baseBean.writeLog("解析千里聆SDK原始简历,resumeFileId===" + resumeFileId);
|
||||||
List<Integer> docIdList = new ArrayList<>();
|
List<Integer> docIdList = new ArrayList<>();
|
||||||
ERPAResumeSDKClient client = ERPASDKClients.getResumeSDKClient();
|
ERPAResumeSDKClient client = ERPASDKClients.getResumeSDKClient();
|
||||||
client.start();
|
|
||||||
client.downloadResumeFile(resumeFileId, (fileName, stream) -> {
|
client.downloadResumeFile(resumeFileId, (fileName, stream) -> {
|
||||||
try {
|
try {
|
||||||
baseBean.writeLog("解析千里聆SDK原始简历,fileName===" + fileName);
|
baseBean.writeLog("解析千里聆SDK原始简历,fileName===" + fileName);
|
||||||
int imageFileId = RecruitModeUtil.generateImageFileId(stream, fileName);
|
int imageFileId = RecruitModeUtil.generateImageFileId(stream, fileName);
|
||||||
baseBean.writeLog("解析千里聆SDK原始简历,imageFileId===" + imageFileId);
|
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) {
|
} catch (Exception e) {
|
||||||
baseBean.writeLog("解析千里聆SDK原始简历失败", e);
|
baseBean.writeLog("解析千里聆SDK原始简历失败", e);
|
||||||
throw new RuntimeException(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) {
|
for (Property property : properties) {
|
||||||
map.put(property.getName(), property.getValue());
|
map.put(property.getName(), property.getValue());
|
||||||
}
|
}
|
||||||
ResumeJobV2Dto resumeJobDto = RecruitPositionUtil.convertMap2ResumeJobV2Dto(map);
|
ResumeJobV2Dto resumeJobDto = RecruitPositionUtil.convertMap2ResumeJobV2Dto(user,map);
|
||||||
// 发布千里聆职位
|
// 发布千里聆职位
|
||||||
if (!RecruitPositionUtil.checkAvailable(client)) {
|
if (!RecruitPositionUtil.checkAvailable(client)) {
|
||||||
baseBean.writeLog("千里聆未开通简历应用。");
|
baseBean.writeLog("千里聆未开通简历应用。");
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package weaver.formmode.recruit.modeexpand.util;
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.engine.recruit.conn.ApplicantCommonInfo;
|
import com.engine.recruit.conn.ApplicantCommonInfo;
|
||||||
|
import com.engine.recruit.conn.ModeBrowserCommonInfo;
|
||||||
import com.engine.recruit.enums.PositionThirdChannelEnum;
|
import com.engine.recruit.enums.PositionThirdChannelEnum;
|
||||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||||
import com.weaver.rpa.sdk.clients.application.resume.ERPAResumeSDKClient;
|
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.conn.RecordSet;
|
||||||
import weaver.general.BaseBean;
|
import weaver.general.BaseBean;
|
||||||
import weaver.general.Util;
|
import weaver.general.Util;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
|
@ -34,7 +36,7 @@ public class RecruitPositionUtil {
|
||||||
* @param map 数据集合
|
* @param map 数据集合
|
||||||
* @return ResumeJobV2Dto
|
* @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"));
|
String positionName = Convert.toStr(map.get("zpzwmc"));
|
||||||
// 职位职责
|
// 职位职责
|
||||||
|
|
@ -64,6 +66,10 @@ public class RecruitPositionUtil {
|
||||||
// 职位类别
|
// 职位类别
|
||||||
String jobCategory = "不限";
|
String jobCategory = "不限";
|
||||||
|
|
||||||
|
// 工作地点
|
||||||
|
String gzdd = Convert.toStr(map.get("gzdd"));
|
||||||
|
String workPlaceShowName = ModeBrowserCommonInfo.getWorkPlaceShowName(user, gzdd);
|
||||||
|
|
||||||
//不限
|
//不限
|
||||||
int experienceValue = -1;
|
int experienceValue = -1;
|
||||||
if ("应届毕业生".equals(workYears)) {
|
if ("应届毕业生".equals(workYears)) {
|
||||||
|
|
@ -112,6 +118,10 @@ public class RecruitPositionUtil {
|
||||||
|
|
||||||
// 招聘职位类型与特殊设置字段
|
// 招聘职位类型与特殊设置字段
|
||||||
ResumeJobV2Dto resumeJobV2Dto = new ResumeJobV2Dto();
|
ResumeJobV2Dto resumeJobV2Dto = new ResumeJobV2Dto();
|
||||||
|
if(StringUtils.isNotBlank(workPlaceShowName)){
|
||||||
|
resumeJobV2Dto.setJobArea(workPlaceShowName);
|
||||||
|
}
|
||||||
|
|
||||||
// (必填,默认社招)招聘类型 1:社招 2:校招 3:实习
|
// (必填,默认社招)招聘类型 1:社招 2:校招 3:实习
|
||||||
resumeJobV2Dto.setResumeType(resumeType);
|
resumeJobV2Dto.setResumeType(resumeType);
|
||||||
if (2 == resumeType && StringUtils.isBlank(finishTime)) {
|
if (2 == resumeType && StringUtils.isBlank(finishTime)) {
|
||||||
|
|
@ -224,9 +234,10 @@ public class RecruitPositionUtil {
|
||||||
rs.executeQuery("select cityname from hrmcity where id = ?", fbcs);
|
rs.executeQuery("select cityname from hrmcity where id = ?", fbcs);
|
||||||
if (rs.next()) {
|
if (rs.next()) {
|
||||||
String cityName = rs.getString("cityname");
|
String cityName = rs.getString("cityname");
|
||||||
|
cityName = Util.formatMultiLang(cityName, Util.null2String(user.getLanguage()));
|
||||||
cityList.add(cityName);
|
cityList.add(cityName);
|
||||||
}
|
}
|
||||||
resumeJobV2Dto.setFbcs(cityList);
|
// TODO resumeJobV2Dto.setFbcs(cityList);
|
||||||
// 所属行业
|
// 所属行业
|
||||||
String sshy = Util.null2String(map.get("szhy"));
|
String sshy = Util.null2String(map.get("szhy"));
|
||||||
List<String> sshyList = new ArrayList<>();
|
List<String> sshyList = new ArrayList<>();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue