2023-10-10 09:28:06 +08:00
|
|
|
|
package com.engine.recruit.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
import com.engine.core.impl.Service;
|
2024-05-27 17:37:52 +08:00
|
|
|
|
import com.engine.recruit.entity.position.PositionSdkInstance;
|
|
|
|
|
|
import com.engine.recruit.entity.position.PositionSelectItem;
|
2023-10-10 09:28:06 +08:00
|
|
|
|
import com.engine.recruit.exception.CustomizeRunTimeException;
|
|
|
|
|
|
import com.engine.recruit.service.RecruitPositionService;
|
2024-04-07 11:25:16 +08:00
|
|
|
|
import com.weaver.rpa.sdk.clients.application.resume.entity.ResumeJobDynamicField;
|
2023-10-10 09:28:06 +08:00
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import weaver.conn.RecordSet;
|
|
|
|
|
|
import weaver.general.Util;
|
|
|
|
|
|
|
2024-04-19 14:48:31 +08:00
|
|
|
|
import java.util.*;
|
2023-10-10 09:28:06 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @author:dxfeng
|
|
|
|
|
|
* @createTime: 2023/10/09
|
|
|
|
|
|
* @version: 1.0
|
|
|
|
|
|
*/
|
|
|
|
|
|
public class RecruitPositionServiceImpl extends Service implements RecruitPositionService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public Map<String, Object> updatePostInfo(Map<String, Object> param) {
|
|
|
|
|
|
Map<String, Object> returnMap = new HashMap<>();
|
|
|
|
|
|
String zpzwfzr = Util.null2String(param.get("zpzwfzr"));
|
|
|
|
|
|
String zpxzr = Util.null2String(param.get("zpxzr"));
|
|
|
|
|
|
String ids = Util.null2String(param.get("ids"));
|
|
|
|
|
|
if (StringUtils.isBlank(ids)) {
|
|
|
|
|
|
throw new CustomizeRunTimeException("数据有误,请重试");
|
|
|
|
|
|
}
|
|
|
|
|
|
RecordSet rs = new RecordSet();
|
2023-11-16 10:01:27 +08:00
|
|
|
|
if (StringUtils.isNotBlank(zpzwfzr)) {
|
|
|
|
|
|
rs.executeUpdate(" update uf_jcl_zp_zpzw set zpzwfzr = ? where id in (" + ids + ")", zpzwfzr);
|
|
|
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(zpxzr)) {
|
|
|
|
|
|
rs.executeUpdate(" update uf_jcl_zp_zpzw set zpxzr = ? where id in (" + ids + ")", zpxzr);
|
|
|
|
|
|
}
|
2023-10-10 09:28:06 +08:00
|
|
|
|
return returnMap;
|
|
|
|
|
|
}
|
2024-04-07 11:25:16 +08:00
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public Map<String, Object> getFormCondition(Map<String, Object> param) {
|
|
|
|
|
|
Map<String, Object> apidatas = new HashMap<>();
|
|
|
|
|
|
apidatas.put("hasRight", true);
|
2024-04-16 17:13:16 +08:00
|
|
|
|
String conditionType = Util.null2String(param.get("conditionType"));
|
|
|
|
|
|
String selectValue = Util.null2String(param.get("selectValue"));
|
|
|
|
|
|
|
2024-04-07 11:25:16 +08:00
|
|
|
|
|
2024-05-27 17:37:52 +08:00
|
|
|
|
PositionSdkInstance positionSdkInstance = PositionSdkInstance.getPositionSdkInstance();
|
2024-04-07 11:25:16 +08:00
|
|
|
|
|
2024-04-16 17:13:16 +08:00
|
|
|
|
// 获取职位类别表单
|
|
|
|
|
|
if ("positionType".equals(conditionType)) {
|
|
|
|
|
|
String dsfqd = Util.null2String(param.get("dsfqd"));
|
2024-05-27 17:37:52 +08:00
|
|
|
|
getPositionType(dsfqd, selectValue, apidatas, positionSdkInstance);
|
2024-04-16 17:13:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 前程无忧-发布城市
|
|
|
|
|
|
if ("job51City".equals(conditionType)) {
|
2024-05-27 17:37:52 +08:00
|
|
|
|
getCityType(selectValue, apidatas, positionSdkInstance);
|
2024-04-19 14:48:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-05-27 17:37:52 +08:00
|
|
|
|
// 前程无忧-所属行业
|
2024-04-19 15:55:36 +08:00
|
|
|
|
if ("industryType".equals(conditionType)) {
|
2024-05-27 17:37:52 +08:00
|
|
|
|
getIndustryType(selectValue, apidatas, positionSdkInstance);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// BOSS直聘-是否驻外
|
|
|
|
|
|
if ("multiSelect".equals(conditionType)) {
|
|
|
|
|
|
getMultiSelect(apidatas, positionSdkInstance);
|
2024-04-16 17:13:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
return apidatas;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2024-04-19 14:48:31 +08:00
|
|
|
|
* 获取职位类别
|
2024-04-16 17:13:16 +08:00
|
|
|
|
*
|
2024-04-19 14:48:31 +08:00
|
|
|
|
* @param dsfqd
|
2024-04-16 17:13:16 +08:00
|
|
|
|
* @param selectValue
|
|
|
|
|
|
* @param apidatas
|
2024-05-27 17:37:52 +08:00
|
|
|
|
* @param positionSdkInstance
|
2024-04-16 17:13:16 +08:00
|
|
|
|
*/
|
2024-05-27 17:37:52 +08:00
|
|
|
|
private void getPositionType(String dsfqd, String selectValue, Map<String, Object> apidatas, PositionSdkInstance positionSdkInstance) {
|
2024-04-16 17:13:16 +08:00
|
|
|
|
String[] split = selectValue.split("#");
|
|
|
|
|
|
Map<String, String> selectValueMap = new HashMap<>();
|
|
|
|
|
|
for (String s : split) {
|
|
|
|
|
|
String[] split1 = s.split(":");
|
|
|
|
|
|
if (split1.length == 2) {
|
|
|
|
|
|
selectValueMap.put(split1[0], split1[1]);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-04-19 14:48:31 +08:00
|
|
|
|
String boss_value = selectValueMap.get("BOSS直聘");
|
|
|
|
|
|
apidatas.put("boss_value", StringUtils.isBlank(boss_value) ? null : Arrays.asList(boss_value.split("-")));
|
|
|
|
|
|
String liepin_value = selectValueMap.get("猎聘");
|
|
|
|
|
|
apidatas.put("liepin_value", StringUtils.isBlank(liepin_value) ? null : Arrays.asList(liepin_value.split("-")));
|
|
|
|
|
|
String lagou_value = selectValueMap.get("拉勾");
|
|
|
|
|
|
apidatas.put("lagou_value", StringUtils.isBlank(lagou_value) ? null : Arrays.asList(lagou_value.split("-")));
|
|
|
|
|
|
String job51_value = selectValueMap.get("前程无忧");
|
|
|
|
|
|
apidatas.put("job51_value", StringUtils.isBlank(job51_value) ? null : Arrays.asList(job51_value.split("-")));
|
|
|
|
|
|
String zhilian_value = selectValueMap.get("智联");
|
|
|
|
|
|
apidatas.put("zhilian_value", StringUtils.isBlank(zhilian_value) ? null : Arrays.asList(zhilian_value.split("-")));
|
|
|
|
|
|
|
|
|
|
|
|
boolean bossShow = false;
|
|
|
|
|
|
boolean liepinShow = false;
|
|
|
|
|
|
boolean lagouShow = false;
|
|
|
|
|
|
boolean job51Show = false;
|
|
|
|
|
|
boolean zhilianShow = false;
|
2024-04-16 17:13:16 +08:00
|
|
|
|
if (dsfqd.contains("0")) {
|
2024-05-27 17:37:52 +08:00
|
|
|
|
List<ResumeJobDynamicField.Item> boss_type = positionSdkInstance.getBoss_type();
|
2024-04-19 14:48:31 +08:00
|
|
|
|
apidatas.put("boss", boss_type);
|
|
|
|
|
|
bossShow = true;
|
2024-04-16 17:13:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (dsfqd.contains("4")) {
|
2024-05-27 17:37:52 +08:00
|
|
|
|
List<ResumeJobDynamicField.Item> liepin_type = positionSdkInstance.getLiepin_type();
|
2024-04-19 14:48:31 +08:00
|
|
|
|
apidatas.put("liepin", liepin_type);
|
|
|
|
|
|
liepinShow = true;
|
2024-04-16 17:13:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
if (dsfqd.contains("3")) {
|
2024-05-27 17:37:52 +08:00
|
|
|
|
List<ResumeJobDynamicField.Item> lagou_type = positionSdkInstance.getLagou_type();
|
2024-04-19 14:48:31 +08:00
|
|
|
|
apidatas.put("lagou", lagou_type);
|
|
|
|
|
|
lagouShow = true;
|
2024-04-16 17:13:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (dsfqd.contains("2")) {
|
2024-05-27 17:37:52 +08:00
|
|
|
|
List<ResumeJobDynamicField.Item> job51_type = positionSdkInstance.getJob51_type();
|
2024-04-19 14:48:31 +08:00
|
|
|
|
apidatas.put("job51", job51_type);
|
|
|
|
|
|
job51Show = true;
|
2024-04-16 17:13:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (dsfqd.contains("1")) {
|
2024-05-27 17:37:52 +08:00
|
|
|
|
List<ResumeJobDynamicField.Item> zhilian_type = positionSdkInstance.getZhilian_type();
|
2024-04-19 14:48:31 +08:00
|
|
|
|
apidatas.put("zhilian", zhilian_type);
|
|
|
|
|
|
zhilianShow = true;
|
2024-04-16 17:13:16 +08:00
|
|
|
|
}
|
2024-04-19 14:48:31 +08:00
|
|
|
|
apidatas.put("bossShow", bossShow);
|
|
|
|
|
|
apidatas.put("liepinShow", liepinShow);
|
|
|
|
|
|
apidatas.put("lagouShow", lagouShow);
|
|
|
|
|
|
apidatas.put("job51Show", job51Show);
|
|
|
|
|
|
apidatas.put("zhilianShow", zhilianShow);
|
2024-04-16 17:13:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-04-19 14:48:31 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 获取发布城市
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param selectValue
|
|
|
|
|
|
* @param apidatas
|
2024-05-27 17:37:52 +08:00
|
|
|
|
* @param positionSdkInstance
|
2024-04-19 14:48:31 +08:00
|
|
|
|
*/
|
2024-05-27 17:37:52 +08:00
|
|
|
|
private void getCityType(String selectValue, Map<String, Object> apidatas, PositionSdkInstance positionSdkInstance) {
|
2024-04-19 14:48:31 +08:00
|
|
|
|
List<String> valueList = new ArrayList<>();
|
|
|
|
|
|
if (StringUtils.isNotBlank(selectValue)) {
|
2024-05-11 14:07:21 +08:00
|
|
|
|
String[] split = selectValue.split(",");
|
2024-04-19 14:48:31 +08:00
|
|
|
|
valueList = Arrays.asList(split);
|
2024-04-16 17:13:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-05-27 17:37:52 +08:00
|
|
|
|
List<ResumeJobDynamicField.Item> job51_city = positionSdkInstance.getJob51_city();
|
2024-04-19 14:48:31 +08:00
|
|
|
|
apidatas.put("job51_city", job51_city);
|
|
|
|
|
|
apidatas.put("job51CityValue", valueList);
|
2024-04-08 09:08:37 +08:00
|
|
|
|
}
|
2024-04-07 11:25:16 +08:00
|
|
|
|
|
2024-04-08 09:08:37 +08:00
|
|
|
|
/**
|
2024-04-19 14:48:31 +08:00
|
|
|
|
* 获取所属行业
|
2024-04-08 09:08:37 +08:00
|
|
|
|
*
|
2024-04-19 14:48:31 +08:00
|
|
|
|
* @param selectValue
|
|
|
|
|
|
* @param apidatas
|
2024-05-27 17:37:52 +08:00
|
|
|
|
* @param positionSdkInstance
|
2024-04-08 09:08:37 +08:00
|
|
|
|
*/
|
2024-05-27 17:37:52 +08:00
|
|
|
|
private void getIndustryType(String selectValue, Map<String, Object> apidatas, PositionSdkInstance positionSdkInstance) {
|
2024-04-19 14:48:31 +08:00
|
|
|
|
List<List<String>> valueList = new ArrayList<>();
|
|
|
|
|
|
if (StringUtils.isNotBlank(selectValue)) {
|
|
|
|
|
|
String[] split = selectValue.split("#");
|
|
|
|
|
|
for (String s : split) {
|
|
|
|
|
|
String[] split1 = s.split("-");
|
|
|
|
|
|
valueList.add(Arrays.asList(split1));
|
2024-04-08 09:08:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-04-19 14:48:31 +08:00
|
|
|
|
|
2024-05-27 17:37:52 +08:00
|
|
|
|
List<ResumeJobDynamicField.Item> job51_industry = positionSdkInstance.getJob51_industry();
|
2024-04-19 15:55:36 +08:00
|
|
|
|
apidatas.put("job51_industry", job51_industry);
|
|
|
|
|
|
apidatas.put("job51IndustryValue", valueList);
|
2024-04-07 11:25:16 +08:00
|
|
|
|
}
|
2024-05-27 17:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取招聘职位,多线下拉框字段信息
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param apidatas
|
|
|
|
|
|
* @param positionSdkInstance
|
|
|
|
|
|
*/
|
|
|
|
|
|
private void getMultiSelect(Map<String, Object> apidatas, PositionSdkInstance positionSdkInstance) {
|
|
|
|
|
|
apidatas.put("boss_resident", PositionSelectItem.convertDynamicFieldItem(positionSdkInstance.getBoss_resident()));
|
|
|
|
|
|
apidatas.put("boss_resident_country", PositionSelectItem.convertDynamicFieldItem(positionSdkInstance.getBoss_resident_country()));
|
|
|
|
|
|
apidatas.put("boss_resident_language", PositionSelectItem.convertDynamicFieldItem(positionSdkInstance.getBoss_resident_language()));
|
|
|
|
|
|
apidatas.put("boss_resident_time", PositionSelectItem.convertDynamicFieldItem(positionSdkInstance.getBoss_resident_time()));
|
|
|
|
|
|
apidatas.put("boss_resident_time_2", PositionSelectItem.convertDynamicFieldItem(positionSdkInstance.getBoss_resident_time_2()));
|
|
|
|
|
|
apidatas.put("job51_city", PositionSelectItem.convertDynamicFieldItem(positionSdkInstance.getJob51_city()));
|
|
|
|
|
|
}
|
2023-10-10 09:28:06 +08:00
|
|
|
|
}
|