Compare commits

...

No commits in common. "secondary/nbjh" and "main" have entirely different histories.

346 changed files with 464 additions and 13971 deletions

13
.gitignore vendored
View File

@ -1,4 +1,4 @@
/weaver-hrm-recruit.iml
.iml
/out/
/.idea/
@ -8,19 +8,12 @@ target/
### IntelliJ IDEA ###
.idea
HELP.md
target/
/src/test
/src/rebel.xml
/src/META-INF
### IntelliJ IDEA ###
.idea
/log
/src/test
/src/rebel.xml
/src/META-INF
/log
/build/

View File

@ -1,2 +0,0 @@
# weaver-jcl-recruit

View File

@ -1,24 +0,0 @@
#\u805A\u624D\u6797\u62DB\u8058\u6D88\u606F\u63D0\u9192\uFF0C\u6D88\u606F\u6765\u6E90
RECRUIT_MESSAGE_TYPE=2022061063
#\u9762\u8BD5\u76F8\u5173\u6D88\u606F\u63D0\u9192\uFF0C\u6D88\u606F\u6765\u6E90
INTERVIEW_MESSAGE_TYPE=2022061063
#\u6DFB\u52A0\u9762\u8BD5\u6D88\u606F\u63D0\u9192\u6807\u9898
INTERVIEW_ADD_MESSAGE_TITLE=\u9762\u8BD5\u5B89\u6392\u63D0\u9192
#\u53D6\u6D88\u9762\u8BD5\u6D88\u606F\u63D0\u9192\u6807\u9898
INTERVIEW_CANCEL_MESSAGE_TITLE=\u53D6\u6D88\u9762\u8BD5\u63D0\u9192
#\u9762\u8BD5\u8BC4\u4EF7\u6D88\u606F\u63D0\u9192\u6807\u9898
INTERVIEW_EVALUATE_MESSAGE_TITLE=\u9762\u8BD5\u8BC4\u4EF7\u63D0\u9192
#\u4EBA\u624D\u9ED1\u540D\u5355\u901A\u77E5
JOIN_BLACKLIST_MESSAGE_TITLE=\u4EBA\u624D\u9ED1\u540D\u5355\u901A\u77E5
#\u7B5B\u9009\u53CD\u9988
SCREENING_MESSAGE_TYPE=2022061063
SCREENING_MESSAGE_TITLE=\u7B80\u5386\u7B5B\u9009
SCREENING_MESSAGE_URL=/wui/index.html#/main/cube/search?customid=65
#\u5E94\u8058\u8005\u7B80\u5386\u5B58\u653E\u76EE\u5F55ID
APPLICANTS_RESUMES_CATEGORY=110

View File

@ -0,0 +1,6 @@
description = "子模块demo项目"
dependencies {
//
implementation project(':secondev-chapanda-portal')
}

View File

@ -1,12 +0,0 @@
package com.api.recruit.controller;
import javax.ws.rs.Path;
/**
* @author:dxfeng
* @createTime: 2023/09/20
* @version: 1.0
*/
@Path("/jcl/recruit/applicant")
public class ApplicantResumeController extends com.engine.recruit.controller.ApplicantResumeController{
}

View File

@ -1,12 +0,0 @@
package com.api.recruit.controller;
import javax.ws.rs.Path;
/**
* @author:dxfeng
* @createTime: 2023/10/23
* @version: 1.0
*/
@Path("/jcl/recruit/induction")
public class InductionManageController extends com.engine.recruit.controller.InductionManageController{
}

View File

@ -1,12 +0,0 @@
package com.api.recruit.controller;
import javax.ws.rs.Path;
/**
* @author:dxfeng
* @createTime: 2023/11/23
* @version: 1.0
*/
@Path("/jcl/recruit/init")
public class InitRecruitDataController extends com.engine.recruit.controller.InitRecruitDataController {
}

View File

@ -1,12 +0,0 @@
package com.api.recruit.controller;
import javax.ws.rs.Path;
/**
* @author:dxfeng
* @createTime: 2023/09/26
* @version: 1.0
*/
@Path("/jcl/recruit/message")
public class MessageTemplateController extends com.engine.recruit.controller.MessageTemplateController {
}

View File

@ -1,12 +0,0 @@
package com.api.recruit.controller;
import javax.ws.rs.Path;
/**
* @author:dxfeng
* @createTime: 2023/09/18
* @version: 1.0
*/
@Path("/jcl/recruit/button")
public class RecruitButtonController extends com.engine.recruit.controller.RecruitButtonController{
}

View File

@ -1,12 +0,0 @@
package com.api.recruit.controller;
import javax.ws.rs.Path;
/**
* @author:dxfeng
* @createTime: 2023/09/20
* @version: 1.0
*/
@Path("/jcl/recruit/recruitflow")
public class RecruitFlowController extends com.engine.recruit.controller.RecruitFlowController{
}

View File

@ -1,12 +0,0 @@
package com.api.recruit.controller;
import javax.ws.rs.Path;
/**
* @author:dxfeng
* @createTime: 2023/11/15
* @version: 1.0
*/
@Path("/jcl/recruit/mobile")
public class RecruitMobileModeController extends com.engine.recruit.controller.RecruitMobileModeController{
}

View File

@ -1,12 +0,0 @@
package com.api.recruit.controller;
import javax.ws.rs.Path;
/**
* @author:dxfeng
* @createTime: 2023/10/09
* @version: 1.0
*/
@Path("/jcl/recruit/position")
public class RecruitPositionController extends com.engine.recruit.controller.RecruitPositionController{
}

View File

@ -1,12 +0,0 @@
package com.api.recruit.controller;
import javax.ws.rs.Path;
/**
* @author:dxfeng
* @createTime: 2024/03/27
* @version: 1.0
*/
@Path("/jcl/recruit/schedule")
public class RecruitScheduleController extends com.engine.recruit.controller.RecruitScheduleController{
}

View File

@ -1,12 +0,0 @@
package com.api.recruit.controller;
import javax.ws.rs.Path;
/**
* @author:dxfeng
* @createTime: 2023/10/27
* @version: 1.0
*/
@Path("/jcl/recruit/rpa")
public class RpaJclController extends com.engine.recruit.controller.RpaJclController {
}

View File

@ -1,12 +0,0 @@
package com.api.recruit.controller;
import javax.ws.rs.Path;
/**
* @author:dxfeng
* @createTime: 2023/10/20
* @version: 1.0
*/
@Path("/jcl/recruit/talentpool")
public class TalentPoolController extends com.engine.recruit.controller.TalentPoolController{
}

View File

@ -1,13 +0,0 @@
package com.api.recruit.controller;
import javax.ws.rs.Path;
/**
* @Author liang.cheng
* @Date 2023/10/18 4:31 PM
* @Description: 招聘工作台
* @Version 1.0
*/
@Path("/jcl/recruit/workbench")
public class WorkBenchPortalController extends com.engine.recruit.controller.WorkBenchPortalController {
}

View File

@ -1,14 +0,0 @@
package com.api.recruit.controller;
import javax.ws.rs.Path;
/**
* @Author liang.cheng
* @Date 2023/10/17 10:49 AM
* @Description: TODO
* @Version 1.0
*/
@Path("/jcl/recruit/workplan")
public class WorkPlanController extends com.engine.recruit.controller.WorkPlanController {
}

View File

@ -1,54 +0,0 @@
package com.api.recruit.listener;
import com.sun.jersey.api.model.AbstractResourceModelContext;
import com.sun.jersey.api.model.AbstractResourceModelListener;
import com.weaver.upgrade.FunctionUpgradeUtil;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.general.BaseBean;
import weaver.system.License;
import javax.ws.rs.ext.Provider;
@Provider
public class InitListener implements AbstractResourceModelListener {
@Override
public void onLoaded(AbstractResourceModelContext abstractResourceModelContext) {
int menuid = 100188;
BaseBean bb = new BaseBean();
String cId = new License().getCId();
if(cId.length() > 7) {
cId = cId.substring(cId.length() - 7);
}
String defaultCloseNonStandard151 = bb.getPropValue("jclRecruit", "defaultCloseNonStandard163");
if(StringUtils.isNotBlank(cId) && "true".equals(defaultCloseNonStandard151)) {
int cid = Integer.parseInt(cId);
if(!hasMenuInfo(cid, "left", menuid)) {
bb.writeLog("163招聘管理 添加默认菜单控制");
insertMenuInfo(cid, "left", menuid);
}
}
}
private void insertMenuInfo(int cid,String type,int id){
RecordSet rs = new RecordSet();
BaseBean bb = new BaseBean();
bb.writeLog("FunctionUpgradeUtil.getMenuId(cid,id):" + FunctionUpgradeUtil.getMenuId(cid,id));
String sql ="INSERT INTO menucontrollist (type,menuid,isopen) VALUES('"+type+"','"+FunctionUpgradeUtil.getMenuId(cid,id)+"','"+FunctionUpgradeUtil.getMenuStatus(id,-1,cid)+"')";
rs.execute(sql);
}
private boolean hasMenuInfo(int cid, String type, int id) {
RecordSet rs = new RecordSet();
String sql = "select count(1) as count from menucontrollist where type = ? and menuid = ?";
rs.executeQuery(sql,type, FunctionUpgradeUtil.getMenuId(cid,id));
if(rs.next()) {
int count = rs.getInt("count");
if(count > 0) {
return true;
}
}
return false;
}
}

View File

@ -1,10 +0,0 @@
package com.api.resumestorage.web;
import com.engine.resumestorage.web.ResumeIdentifyQliAction;
import javax.ws.rs.Path;
@Path("/resume/identifyQli")
public class ResumeIdentifyQliApi extends ResumeIdentifyQliAction {
public ResumeIdentifyQliApi() {
}
}

View File

@ -1,10 +0,0 @@
package com.api.resumestorage.web;
import com.engine.resumestorage.web.ResumeStorageAction;
import javax.ws.rs.Path;
@Path("/demo/resume")
public class ResumeStorageApi extends ResumeStorageAction {
public ResumeStorageApi() {
}
}

View File

@ -1,241 +0,0 @@
package com.engine.recruit.conn;
import com.engine.recruit.entity.record.ApplicantRecordPo;
import com.engine.recruit.entity.recruitflow.po.RecruitStepPo;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.general.BaseBean;
import java.util.*;
/**
* @author:dxfeng
* @createTime: 2023/09/27
* @version: 1.0
*/
public class ApplicantCommonInfo {
/**
* 获取应聘者姓名
*
* @param applicantId 应聘者ID
* @return 应聘者姓名
*/
public static String getApplicantName(String applicantId) {
RecordSet rs = new RecordSet();
rs.executeQuery("select xm from uf_jcl_yppc where id = ?", applicantId);
if (rs.next()) {
return rs.getString("xm");
}
return "";
}
/**
* 获取应聘职位名称
*
* @param positionId 职位ID
* @return 职位名称
*/
public static String getApplicantPosition(String positionId) {
RecordSet rs = new RecordSet();
rs.executeQuery("select zpzwmc from uf_jcl_zp_zpzw where id = ?", positionId);
if (rs.next()) {
return rs.getString("zpzwmc");
}
return "";
}
/**
* 获取表单下拉框展示文本
*
* @param formId 表单ID
* @param fieldName 字段明湖曾
* @param value 下拉框值
* @return
*/
public static String getSelectName(String formId, String fieldName, String value) {
String cancelReason = "";
RecordSet rs = new RecordSet();
rs.executeQuery("select selectname from workflow_selectitem where fieldid =( select id from workflow_billfield where billid = ? and fieldname = ? ) and selectvalue = ?", formId, fieldName, value);
if (rs.next()) {
cancelReason = rs.getString("selectname");
}
return cancelReason;
}
/**
* 获取招聘通用浏览按钮展示内容
*
* @param id 浏览按钮ID
* @return 浏览按钮展示文本
*/
public static String getRecruitCommonBrowserValue(String id) {
if (StringUtils.isBlank(id)) {
return "";
}
List<String> value = new ArrayList<>();
RecordSet rs = new RecordSet();
String[] split = id.split(",");
for (String s : split) {
rs.executeQuery("select xxnr from uf_sjzd where id = ?", id);
if (rs.next()) {
value.add(rs.getString("xxnr"));
}
}
return StringUtils.join(value, ",");
}
/**
* 根据建模表名,获取建模ID
*
* @param modeTable
* @return
*/
public static int getModeIdByTableName(String modeTable) {
int formModeId = -1;
RecordSet rs = new RecordSet();
rs.executeQuery("select id from modeinfo where formid =( select id from workflow_bill where tablename = ? ) order by id", modeTable);
if (rs.next()) {
formModeId = rs.getInt("id");
}
return formModeId;
}
/**
* 获取指定模块下的布局ID
*
* @param modeId
* @param layoutName
* @return
*/
public static int getLayoutId(int modeId, String layoutName) {
int layoutId = -1;
RecordSet rs = new RecordSet();
rs.executeQuery("select id from modehtmllayout where modeid = ? and layoutname =?", modeId, layoutName);
if (rs.next()) {
layoutId = rs.getInt("id");
}
return layoutId;
}
/**
* 获取字段ID
*
* @param billId
* @param fieldName
* @return
*/
public static int getFieldId(int billId, String fieldName) {
int fieldId = -1;
RecordSet rs = new RecordSet();
rs.executeQuery("select id from workflow_billfield where billid =? and fieldname = ?", billId, fieldName);
if (rs.next()) {
fieldId = rs.getInt("id");
}
return fieldId;
}
/**
* 获取查询ID
*
* @param modeId
* @param customName
* @return
*/
public static int getCustomId(int modeId, String customName) {
int customId = -1;
RecordSet rs = new RecordSet();
rs.executeQuery("select id from mode_customsearch where modeid = ? and customname = ? ", modeId, customName);
if (rs.next()) {
customId = rs.getInt("id");
}
return customId;
}
/**
* 根据表名获取表单ID
*
* @param modeTable
* @return
*/
public static int getFormIdByTableName(String modeTable) {
int formId = -1;
RecordSet rs = new RecordSet();
rs.executeQuery("select id from workflow_bill where tablename = ? ", modeTable);
if (rs.next()) {
formId = rs.getInt("id");
}
return formId;
}
public static int createOperateRecord(ApplicantRecordPo recordPo) {
try {
int operateId = recordPo.getUser().getUID();
String operateTableName = "uf_jcl_ypgc";
RecruitDataMap<Object> dataMap = new RecruitDataMap<>();
String uuid = UUID.randomUUID().toString();
dataMap.put("modeuuid", uuid);
int formModeId = getModeIdByTableName(operateTableName);
dataMap.put("formmodeid", formModeId);
RecruitRecordSet.buildModeInsertFields(dataMap, operateId);
dataMap.put("czyw", recordPo.getRecordOperateType().getShowName());
dataMap.put("czsj", recordPo.getOperateTime());
dataMap.put("jlnr", recordPo.getContent());
dataMap.put("xqnr", recordPo.getLinkUrl());
dataMap.put("ypz", recordPo.getPcId());
RecruitRecordSet.insertData(dataMap, operateTableName);
return RecruitRecordSet.refreshRight(uuid, operateTableName, formModeId, operateId);
} catch (Exception e) {
new BaseBean().writeLog("应聘过程记录数据插入失败", e);
}
return -1;
}
public static RecruitStepPo getCurrentStep(String billId) {
RecruitStepPo stepPo = new RecruitStepPo();
RecordSet rs = new RecordSet();
// 招聘阶段ID
String stageId = null;
// 招聘流程ID
int recruitFlowId = -1;
rs.executeQuery("select zplc,zpjd from uf_jcl_yppc where id = ?", billId);
if (rs.next()) {
recruitFlowId = rs.getInt("zplc");
stageId = rs.getString("zpjd");
}
if (-1 == recruitFlowId) {
return stepPo;
}
if (StringUtils.isNotBlank(stageId)) {
rs.executeQuery("select id,jdmc,hj from uf_jcl_zpjdsz where sfqy = 0 and id = ? ", stageId);
} else {
rs.executeQuery("select id,jdmc,hj from uf_jcl_zpjdsz where sfqy = 0 and zplc = ? and hj = 0", recruitFlowId);
}
if (rs.next()) {
stepPo = RecruitStepPo.builder().key(rs.getInt("id")).description(rs.getString("jdmc")).type(rs.getString("hj")).build();
}
return stepPo;
}
/**
* 获取流程开始阶段阶段类型
*
* @param flowId 流程ID
* @return
*/
public static Map<String, String> getInitialStage(String flowId) {
RecordSet rs = new RecordSet();
rs.executeQuery("select id,jdlx from uf_jcl_zpjdsz where sfqy = 0 and zplc = ? and hj = 0", flowId);
if (rs.next()) {
Map<String, String> map = new HashMap<>();
map.put("zpjd", rs.getString("id"));
map.put("jdlx", rs.getString("jdlx"));
return map;
}
return null;
}
}

View File

@ -1,341 +0,0 @@
package com.engine.recruit.conn;
import com.engine.recruit.enums.ApplicationStatusEnum;
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 java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
/**
* @author:dxfeng
* @createTime: 2023/10/26
* @version: 1.0
*/
public class CheckRepeatResume {
private static CheckRepeatResume instance = new CheckRepeatResume();
private CheckRepeatResume() {
// 私有化构造方法
}
public static CheckRepeatResume getInstance() {
return instance;
}
/**
* 校验简历是否加入黑名单
*
* @param name 姓名
* @param mobile 手机号
* @return
*/
public static boolean joinBlackList(String name, String mobile) {
// 在这里编写你的方法逻辑
RecordSet rs = new RecordSet();
rs.executeQuery("select id from uf_jcl_rck where sfjrhmd =0 and xm = ? and sjhm = ?", name, mobile);
return rs.next();
}
/**
* @param name
* @param mobile
* @param positionId
* @return
*/
public static List<Map<String, Object>> getRepeatPositionResumeList(String name, String mobile, String positionId) {
return getRepeatPositionResumeList(name, mobile, positionId, "");
}
/**
* @param name
* @param mobile
* @param positionId
* @param billId
* @return
*/
public static List<Map<String, Object>> getRepeatPositionResumeList(String name, String mobile, String positionId, String billId) {
RecordSet rs = new RecordSet();
// 查询状态为待分配候选中的且未隐藏的数据
String whereSql = "";
if (StringUtils.isBlank(positionId)) {
whereSql = " and (ypzw = ? or ypzw is null) ";
} else {
whereSql = " and ypzw = ? ";
}
rs.executeQuery("select * from uf_jcl_yppc where formmodeid is not null and zt != 2 and zt != 3 and xm = ? and sjhm = ? " + whereSql + " and id != ? order by zt", name, mobile, positionId, billId);
return RecruitRecordSet.getRecordMapList(rs);
}
/**
* 根据姓名手机号查询重复的简历数据
*
* @param name 姓名
* @param mobile 手机号
* @return
*/
private List<Map<String, Object>> getRepeatResumeList(String name, String mobile) {
RecordSet rs = new RecordSet();
// 查询状态为待分配候选中的且未隐藏的数据
rs.executeQuery("select * from uf_jcl_yppc where formmodeid is not null and zt != 2 and zt != 3 and xm = ? and sjhm =? order by zt", name, mobile);
return RecruitRecordSet.getRecordMapList(rs);
}
/**
* 插入简历数据
*
* @param param 数据集合
* @return 新插入简历的ID
*/
public int insertResumeMainTable(Map<String, Object> param) {
Map<String, Object> map = insertResumeAndReturn(param);
return Util.getIntValue(Util.null2String(map.get("mainId")));
}
/**
* 插入更新明细表数据
*
* @param detailDataList
* @param tableName
* @param mainId
* @param sourceId
*/
public void insertResumeDetailTable(List<RecruitDataMap<Object>> detailDataList, String tableName, String mainId, String sourceId) {
if (CollectionUtils.isEmpty(detailDataList)) {
return;
}
boolean isUpdate = false;
if (StringUtils.isNotBlank(sourceId)) {
RecordSet rs = new RecordSet();
rs.executeQuery("select * from " + tableName + " where mainid = ? ", sourceId);
isUpdate = rs.getCounts() == 0;
}
try {
for (RecruitDataMap<Object> dataMap : detailDataList) {
// 明细表关联新数据
dataMap.put("mainid", mainId);
RecruitRecordSet.insertData(dataMap, tableName);
// 明细表关联已有数据
if (isUpdate) {
dataMap.put("mainid", sourceId);
RecruitRecordSet.insertData(dataMap, tableName);
}
}
} catch (Exception e) {
new BaseBean().writeLog(tableName + "明细表数据插入失败", e);
}
}
/**
* 插入简历数据
*
* @param param 数据集合
* @return 简历插入信息
*/
public Map<String, Object> insertResumeAndReturn(Map<String, Object> param) {
Map<String, Object> returnMap = new HashMap<>();
int mainId = -1;
String sourceId;
String name = Util.null2String(param.get("xm"));
String mobile = Util.null2String(param.get("sjhm"));
String status = Util.null2String(param.get("zt"));
String positionId = Util.null2String(param.get("ypzw"));
// 黑名单校验黑名单人员不入库
boolean joinBlackList = joinBlackList(name, mobile);
returnMap.put("joinBlackList", joinBlackList);
returnMap.put("isUpdate", false);
returnMap.put("mainId", mainId);
if (joinBlackList) {
return returnMap;
}
// 按照姓名+手机号查询正常展示的简历数据
List<Map<String, Object>> repeatResumeList = getRepeatResumeList(name, mobile);
if (CollectionUtils.isEmpty(repeatResumeList)) {
// 不存在重复数据直接插入数据库
mainId = insertData(param);
returnMap.put("mainId", mainId);
return returnMap;
}
// 新接收的简历为待分配
if (ApplicationStatusEnum.DISTRIBUTION.getValue().equals(status)) {
Map<String, Object> sourceResume = repeatResumeList.get(0);
if (ApplicationStatusEnum.DISTRIBUTION.getValue().equals(Util.null2String(sourceResume.get("zt")))) {
// 当前存在待分配的简历
sourceId = Util.null2String(sourceResume.get("id"));
//取新简历有值的字段更新已入库简历没有值的字段已入库简历有值的字段不做更新新简历入库并隐藏
mainId = updateSourceResume(param, sourceResume);
returnMap.put("mainId", mainId);
returnMap.put("sourceId", sourceId);
returnMap.put("isUpdate", true);
return returnMap;
} else {
// 直接入库不做任何处理
mainId = insertData(param);
returnMap.put("mainId", mainId);
return returnMap;
}
} else if (ApplicationStatusEnum.CANDIDATE.getValue().equals(status)) {
// 新简历为候选中
boolean hasSamePosition = false;
for (Map<String, Object> sourceResume : repeatResumeList) {
if (positionId.equals(Util.null2String(sourceResume.get("ypzw")))) {
hasSamePosition = true;
}
}
if (hasSamePosition) {
// 若有相同职位的数据新简历直接入库并隐藏
mainId = insertHideData(param);
returnMap.put("mainId", mainId);
return returnMap;
} else {
// 没有相同职位的数据新简历直接入库不做任何处理
mainId = insertData(param);
returnMap.put("mainId", mainId);
return returnMap;
}
}
return returnMap;
}
/**
* 直接插入简历信息
*
* @param dataMap 数据集合
* @return
*/
private int insertData(Map<String, Object> dataMap) {
String uuid = UUID.randomUUID().toString();
dataMap.put("modeuuid", uuid);
int formModeId = ApplicantCommonInfo.getModeIdByTableName("uf_jcl_yppc");
dataMap.put("formmodeid", formModeId);
RecruitRecordSet.buildModeInsertFields(dataMap, 1);
RecruitRecordSet.insertData(dataMap, "uf_jcl_yppc");
return RecruitRecordSet.refreshRight(uuid, "uf_jcl_yppc", formModeId, 1);
}
/**
* 插入数据库并隐藏
*
* @param dataMap 数据集合
* @return
*/
private int insertHideData(Map<String, Object> dataMap) {
String uuid = UUID.randomUUID().toString();
dataMap.put("modeuuid", uuid);
RecordSet rs = new RecordSet();
RecruitRecordSet.buildModeInsertFields(dataMap, 1);
RecruitRecordSet.insertData(dataMap, "uf_jcl_yppc");
rs.executeQuery("select id from uf_jcl_yppc where modeuuid='" + uuid + "'");
if (rs.next()) {
return Util.getIntValue(rs.getString("id"));
}
return -1;
}
/**
* 更新简历信息
*
* @param param 新简历数据集合
* @param sourceResume 源简历数据集合
* @return
*/
private int updateSourceResume(Map<String, Object> param, Map<String, Object> sourceResume) {
replaceNullValues(param, sourceResume);
// 处理操作人员操作时间
RecruitRecordSet.buildModeUpdateFields(sourceResume, 1);
RecruitRecordSet.updateDataById(sourceResume, "uf_jcl_yppc");
// 更新数据
RecruitRecordSet.buildModeInsertFields(param, 1);
return insertHideData(param);
}
/**
* 替换sourceResume中为null或者为空的值
*
* @param param 新简历数据集合
* @param sourceResume 源简历数据集合
*/
private void replaceNullValues(Map<String, Object> param, Map<String, Object> sourceResume) {
for (Map.Entry<String, Object> entry : sourceResume.entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();
if (value == null || "".equals(value)) {
if (param.containsKey(key)) {
sourceResume.put(key, param.get(key));
}
}
}
}
/**
* 获取开始时间和结束时间
*
* @param date
* @return
*/
public static RecruitDataMap<Object> getDateRange(String date, boolean isStudy) {
RecruitDataMap<Object> dataRangeMap = new RecruitDataMap<>();
if (StringUtils.isBlank(date)) {
return dataRangeMap;
}
String[] split = date.split("-");
if (split.length == 2) {
String start = getFormatDate(split[0]);
String end = getFormatDate(split[1]);
if (start.length() == 4) {
if (isStudy) {
start += "-09-01";
} else {
start = "";
}
}
if (end.length() == 4) {
if (isStudy) {
end += "-07-01";
} else {
end = "";
}
}
dataRangeMap.put("kssj", start);
dataRangeMap.put("jssj", end);
}
return dataRangeMap;
}
/**
* 获取yyyy-MM-dd时间格式日期
*
* @param dateStr
* @return
*/
private static String getFormatDate(String dateStr) {
//
dateStr = dateStr.replace(".", "-").replace("\\/", "-");
if (dateStr.length() == 7) {
return dateStr + "-01";
} else if (dateStr.length() == 10) {
return dateStr;
} else if (dateStr.length() == 4) {
return dateStr;
}
return "";
}
}

View File

@ -1,60 +0,0 @@
package com.engine.recruit.conn;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
/**
* @author:dxfeng
* @createTime: 2023/11/10
* @version: 1.0
*/
public class ModeBrowserCommonInfo {
/**
* 根据名称获取简历来源ID
*
* @param name
* @return
*/
public static String getResumeSource(String name) {
return getBrowserId("2", name);
}
/**
* 根据名称获取简历来源ID
*
* @param name
* @return
*/
public static String getWorkExperience(String name) {
return getBrowserId("10", name);
}
public static String getEducationLevelId(String name) {
if (StringUtils.isBlank(name)) {
return null;
}
String id = null;
RecordSet rs = new RecordSet();
rs.executeQuery("select id from hrmeducationlevel where name like '%" + name + "%'");
if (rs.next()) {
id = rs.getString("id");
}
return id;
}
private static String getBrowserId(String zdlxmc, String xxnr) {
if (StringUtils.isBlank(xxnr)) {
return null;
}
String sourceId = null;
RecordSet rs = new RecordSet();
rs.executeQuery("select id from uf_sjzd where zdlxmc = ? and xxnr = ? ", zdlxmc, xxnr);
if (rs.next()) {
sourceId = rs.getString("id");
}
return sourceId;
}
}

View File

@ -1,109 +0,0 @@
package com.engine.recruit.conn;
import com.engine.recruit.entity.position.PositionPo;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import java.util.*;
import java.util.stream.Collectors;
/**
* 招聘职位信息
*
* @author:dxfeng
* @createTime: 2023/10/26
* @version: 1.0
*/
public class PositionCommonInfo {
/**
* 根据千里聆岗位ID获取招聘职位ID
*
* @param qllGwId
* @return
*/
public static String getPositionIdByQll(Long qllGwId) {
String positionId = "";
RecordSet rs = new RecordSet();
rs.executeQuery("select id from uf_jcl_zp_zpzw where qllgwid = ?", qllGwId);
if (rs.next()) {
positionId = rs.getString("id");
}
return positionId;
}
/**
* 获取招聘职位关联的招聘流程
*
* @param positionId
* @return
*/
public static String getRecruitFlowId(String positionId) {
String recruitFlowId = "";
if (StringUtils.isBlank(positionId)) {
return recruitFlowId;
}
RecordSet rs = new RecordSet();
rs.executeQuery("select zplc from uf_jcl_zp_zpzw where id = ?", positionId);
if (rs.next()) {
recruitFlowId = rs.getString("zplc");
}
return recruitFlowId;
}
/**
* 根据职位名称获取职位ID
*
* @param positionName 职位名称
* @param mobile 职位跟进人手机号
* @return
*/
public static String getPositionIdByName(String positionName, String mobile) {
RecordSet rs = new RecordSet();
// 根据职位名称查询招聘中的数据
rs.executeQuery("select id ,zpzwmc ,zpzt ,modedatacreater ,modedatacreatedate ,modedatacreatetime from uf_jcl_zp_zpzw where zpzt = 0 and zpzwmc = ? ", positionName);
List<PositionPo> positionPoList = new ArrayList<>();
while (rs.next()) {
PositionPo positionPo = PositionPo.builder()
.id(rs.getString("id"))
.name(rs.getString("zpzwmc"))
.status(rs.getString("zpzt"))
.creator(rs.getString("modedatacreater"))
.createDate(rs.getString("modedatacreatedate"))
.createTime(rs.getString("modedatacreatetime"))
.build();
positionPoList.add(positionPo);
}
// 未查询到数据返回空
if (CollectionUtils.isEmpty(positionPoList)) {
return "";
}
// 只有一条数据直接返回当前数据,如果有多个再添加其他条件过滤
if (positionPoList.size() == 1) {
return positionPoList.get(0).getId();
}
// 根据手机号查询人员ID
Set<String> userIds = new HashSet<>();
rs.executeQuery("select id from hrmresource where mobile = ? ", mobile);
while (rs.next()) {
userIds.add(rs.getString("id"));
}
// 筛选跟进人手机号匹配的职位数据并按创建时间倒序排序
List<PositionPo> filterList = positionPoList.stream().filter(item -> userIds.contains(item.getCreator())).sorted(Comparator.comparing(PositionPo::getCreationTime).reversed()).collect(Collectors.toList());
if (CollectionUtils.isEmpty(filterList)) {
// 跟进人手机号未获取到选择最新的一条数据
return positionPoList.stream().sorted(Comparator.comparing(PositionPo::getCreationTime).reversed()).collect(Collectors.toList()).get(0).getId();
} else {
// 再一样就默认匹配到创建时间最新的职位
return filterList.get(0).getId();
}
}
}

View File

@ -1,29 +0,0 @@
package com.engine.recruit.conn;
import java.util.HashMap;
/**
* 聚才林数据集合
* </p>
* key忽略大小写
*
* @author:dxfeng
* @createTime: 2023/10/19
* @version: 1.0
*/
public class RecruitDataMap<V> extends HashMap<String, V> {
@Override
public V get(Object key) {
if (key instanceof String) {
// 将键转为小写形式再进行查找
return super.get(((String) key).toLowerCase());
}
return null;
}
@Override
public V put(String key, V value) {
// 将键转为小写形式后作为真正的键
return super.put(key.toLowerCase(), value);
}
}

View File

@ -1,152 +0,0 @@
package com.engine.recruit.conn;
import com.engine.recruit.exception.CustomizeRunTimeException;
import org.apache.commons.lang3.StringUtils;
import weaver.common.DateUtil;
import weaver.conn.RecordSet;
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
import weaver.formmode.setup.ModeRightInfo;
import weaver.general.Util;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/10/19
* @version: 1.0
*/
public class RecruitRecordSet {
/**
* 获取单个记录映射
*
* @param rs RecordSet
* @return
*/
public static Map<String, Object> getSingleRecordMap(RecordSet rs) {
Map<String, Object> dataMap = new RecruitDataMap<>();
if (rs.next()) {
String[] columnNames = rs.getColumnName();
for (String columnName : columnNames) {
dataMap.put(columnName.toLowerCase(), RecruitModeUtil.parseBlankToNull(rs.getString(columnName)));
}
}
return dataMap;
}
public static List<Map<String, Object>> getRecordMapList(RecordSet rs) {
List<Map<String, Object>> list = new ArrayList<>();
while (rs.next()) {
String[] columnNames = rs.getColumnName();
Map<String, Object> dataMap = new RecruitDataMap<>();
for (String columnName : columnNames) {
dataMap.put(columnName.toLowerCase(), RecruitModeUtil.parseBlankToNull(rs.getString(columnName)));
}
list.add(dataMap);
}
return list;
}
/**
* 插入数据
*
* @param dataMap 数据集合
* @param tableName 表名
*/
public static void insertData(Map<String, Object> dataMap, String tableName) {
List<String> fieldList = new ArrayList<>();
List<Object> dataList = new ArrayList<>();
List<String> paramList = new ArrayList<>();
dataMap.forEach((key, value) -> {
if (null != value) {
fieldList.add(key);
dataList.add(value);
paramList.add("?");
}
});
String insertSql = " insert into " + tableName + "(" + StringUtils.join(fieldList, ",") + ") values (" + StringUtils.join(paramList, ",") + ")";
RecordSet rs = new RecordSet();
rs.executeUpdate(insertSql, dataList);
if (StringUtils.isNotBlank(rs.getExceptionMsg())) {
throw new CustomizeRunTimeException(rs.getExceptionMsg());
}
}
/**
* 根据ID更新数据
*
* @param dataMap
* @param tableName
*/
public static void updateDataById(Map<String, Object> dataMap, String tableName) {
List<String> fieldList = new ArrayList<>();
List<Object> dataList = new ArrayList<>();
List<String> paramList = new ArrayList<>();
String id = Util.null2String(dataMap.get("id"));
dataMap.remove("id");
dataMap.forEach((key, value) -> {
fieldList.add(key + " = ? ");
dataList.add(value);
paramList.add("?");
});
dataList.add(id);
String updateSql = "update " + tableName + " set " + StringUtils.join(fieldList, ",") + " where id = ? ";
RecordSet rs = new RecordSet();
rs.executeUpdate(updateSql, dataList);
if (StringUtils.isNotBlank(rs.getExceptionMsg())) {
throw new CustomizeRunTimeException(rs.getExceptionMsg());
}
}
/**
* 构建建模表基本数据
*
* @param mainDataMap 参数集合
*/
public static void buildModeInsertFields(Map<String, Object> mainDataMap, int userId) {
String dateTime = DateUtil.getFullDate();
String[] dateSplit = dateTime.split(" ");
mainDataMap.put("modedatacreater", userId);
mainDataMap.put("modedatacreatedate", dateSplit[0]);
mainDataMap.put("modedatacreatetime", dateSplit[1]);
mainDataMap.put("modedatacreatertype", "0");
}
/**
* 构建建模表基本数据
*
* @param mainDataMap 参数集合
*/
public static void buildModeUpdateFields(Map<String, Object> mainDataMap, int userId) {
String dateTime = DateUtil.getFullDate();
mainDataMap.put("modedatamodifier", userId);
mainDataMap.put("modedatamodifydatetime", dateTime);
}
/**
* 建模表数据权限重构
*
* @param uuid
* @param modeTable
* @param formModeId
*/
public static int refreshRight(String uuid, String modeTable, int formModeId, int creator) {
RecordSet rs = new RecordSet();
rs.executeQuery("select id from " + modeTable + " where modeuuid='" + uuid + "'");
if (rs.next()) {
//建模数据的id
int bid = Util.getIntValue(rs.getString("id"));
ModeRightInfo modeRightInfo = new ModeRightInfo();
modeRightInfo.setNewRight(true);
//新建的时候添加共享
modeRightInfo.editModeDataShare(creator, formModeId, bid);
return bid;
}
return -1;
}
}

View File

@ -1,94 +0,0 @@
package com.engine.recruit.controller;
import com.engine.common.util.ParamUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.recruit.util.ResponseResult;
import com.engine.recruit.wrapper.ApplicantResumeWrapper;
import weaver.general.Util;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/09/20
* @version: 1.0
*/
public class ApplicantResumeController {
public ApplicantResumeWrapper getApplicantResumeWrapper(User user) {
return ServiceUtil.getService(ApplicantResumeWrapper.class, user);
}
@POST
@Path("/getApplicantsName")
@Produces(MediaType.APPLICATION_JSON)
public String getApplicantsName(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> params = ParamUtil.request2Map(request);
String ids = Util.null2String(params.get("ids"));
return new ResponseResult<String, Map<String, Object>>(user).run(getApplicantResumeWrapper(user)::getApplicantsName, ids);
}
@POST
@Path("/getInterviewInfoById")
@Produces(MediaType.APPLICATION_JSON)
public String getInterviewInfoById(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> params = ParamUtil.request2Map(request);
String id = Util.null2String(params.get("id"));
return new ResponseResult<String, Map<String, Object>>(user).run(getApplicantResumeWrapper(user)::getInterviewInfoById, id);
}
@POST
@Path("/getDisplayLayoutId")
@Produces(MediaType.APPLICATION_JSON)
public String getDisplayLayoutId(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> params = ParamUtil.request2Map(request);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getApplicantResumeWrapper(user)::getDisplayLayoutId, params);
}
@POST
@Path("/getTabCount")
@Produces(MediaType.APPLICATION_JSON)
public String getTabCount(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> params = ParamUtil.request2Map(request);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getApplicantResumeWrapper(user)::getTabCount, params);
}
@POST
@Path("/updateApplicantsInfo")
@Produces(MediaType.APPLICATION_JSON)
public String updateApplicantsInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> params = ParamUtil.request2Map(request);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getApplicantResumeWrapper(user)::updateApplicantsInfo, params);
}
@POST
@Path("/fullOriginalResumeId")
@Produces(MediaType.APPLICATION_JSON)
public String fullOriginalResumeId(@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(getApplicantResumeWrapper(user)::fullOriginalResumeId, param);
}
@POST
@Path("/checkRepeatResume")
@Produces(MediaType.APPLICATION_JSON)
public String checkRepeatResume(@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(getApplicantResumeWrapper(user)::checkRepeatResume, param);
}
}

View File

@ -1,55 +0,0 @@
package com.engine.recruit.controller;
import com.engine.common.util.ParamUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.recruit.util.ResponseResult;
import com.engine.recruit.wrapper.InductionManageWrapper;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/10/23
* @version: 1.0
*/
public class InductionManageController {
public InductionManageWrapper getInductionManageWrapper(User user) {
return ServiceUtil.getService(InductionManageWrapper.class, user);
}
@POST
@Path("/updateInductionManageInfo")
@Produces(MediaType.APPLICATION_JSON)
public String updateInductionManageInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> params = ParamUtil.request2Map(request);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getInductionManageWrapper(user)::updateInductionManageInfo, params);
}
@POST
@Path("/sendCollectInfo")
@Produces(MediaType.APPLICATION_JSON)
public String sendCollectInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> params = ParamUtil.request2Map(request);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getInductionManageWrapper(user)::sendCollectInfo, params);
}
@POST
@Path("/verifyIDCard")
@Produces(MediaType.APPLICATION_JSON)
public String verifyIDCard(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> params = ParamUtil.request2Map(request);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getInductionManageWrapper(user)::verifyIDCard, params);
}
}

View File

@ -1,43 +0,0 @@
package com.engine.recruit.controller;
import com.engine.common.util.ServiceUtil;
import com.engine.recruit.util.ResponseResult;
import com.engine.recruit.wrapper.InitRecruitDataWrapper;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/11/23
* @version: 1.0
*/
public class InitRecruitDataController {
public InitRecruitDataWrapper getInitRecruitDataWrapper(User user) {
return ServiceUtil.getService(InitRecruitDataWrapper.class, user);
}
@POST
@Path("/checkInitStatus")
@Produces(MediaType.APPLICATION_JSON)
public String checkInitStatus(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getInitRecruitDataWrapper(user)::checkInitStatus);
}
@POST
@Path("/initRecruitData")
@Produces(MediaType.APPLICATION_JSON)
public String initRecruitData(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getInitRecruitDataWrapper(user)::initRecruitData);
}
}

View File

@ -1,37 +0,0 @@
package com.engine.recruit.controller;
import com.engine.common.util.ParamUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.recruit.util.ResponseResult;
import com.engine.recruit.wrapper.MessageTemplateWrapper;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/09/26
* @version: 1.0
*/
public class MessageTemplateController {
public MessageTemplateWrapper getMessageTemplateWrapper(User user) {
return ServiceUtil.getService(MessageTemplateWrapper.class, user);
}
@POST
@Path("/getMessageContent")
@Produces(MediaType.APPLICATION_JSON)
public String getMessageContent(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> params = ParamUtil.request2Map(request);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getMessageTemplateWrapper(user)::getMessageContent, params);
}
}

View File

@ -1,38 +0,0 @@
package com.engine.recruit.controller;
import com.engine.common.util.ParamUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.recruit.util.ResponseResult;
import com.engine.recruit.wrapper.RecruitButtonWrapper;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/09/18
* @version: 1.0
*/
public class RecruitButtonController {
public RecruitButtonWrapper getRecruitButtonWrapper(User user) {
return ServiceUtil.getService(RecruitButtonWrapper.class, user);
}
@POST
@Path("/executeButtonAction")
@Produces(MediaType.APPLICATION_JSON)
public String executeButtonAction(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> params = ParamUtil.request2Map(request);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getRecruitButtonWrapper(user)::execute, params);
}
}

View File

@ -1,46 +0,0 @@
package com.engine.recruit.controller;
import com.engine.common.util.ParamUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.recruit.util.ResponseResult;
import com.engine.recruit.wrapper.RecruitFlowWrapper;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/09/20
* @version: 1.0
*/
public class RecruitFlowController {
public RecruitFlowWrapper getRecruitFlowWrapper(User user) {
return ServiceUtil.getService(RecruitFlowWrapper.class, user);
}
@GET
@Path("/getButtonList")
@Produces(MediaType.APPLICATION_JSON)
public String getButtonList(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> params = ParamUtil.request2Map(request);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getRecruitFlowWrapper(user)::getButtonList, params);
}
@GET
@Path("/getRecruitStepList")
@Produces(MediaType.APPLICATION_JSON)
public String getRecruitStepList(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> params = ParamUtil.request2Map(request);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getRecruitFlowWrapper(user)::getRecruitStepList, params);
}
}

View File

@ -1,66 +0,0 @@
package com.engine.recruit.controller;
import com.engine.common.util.ParamUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.recruit.util.ResponseResult;
import com.engine.recruit.wrapper.InductionManageWrapper;
import com.engine.recruit.wrapper.OfferWrapper;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.*;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/11/15
* @version: 1.0
*/
public class RecruitMobileModeController {
public OfferWrapper getOfferWrapper(User user) {
return ServiceUtil.getService(OfferWrapper.class, user);
}
public InductionManageWrapper getInductionManageWrapper(User user) {
return ServiceUtil.getService(InductionManageWrapper.class, user);
}
@POST
@Path("/getOfferContent")
@Produces(MediaType.APPLICATION_JSON)
public String getOfferContent(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> params = ParamUtil.request2Map(request);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getOfferWrapper(user)::getOfferContent, params);
}
@POST
@Path("/updateOfferStatus")
@Produces(MediaType.APPLICATION_JSON)
public String updateOfferStatus(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> params = ParamUtil.request2Map(request);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getOfferWrapper(user)::updateOfferStatus, params);
}
@POST
@Path("/checkLoginInfo")
@Produces(MediaType.APPLICATION_JSON)
public String checkLoginInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> params = ParamUtil.request2Map(request);
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getInductionManageWrapper(user)::checkLoginInfo, params);
}
@GET
@Path("/infoSubmit")
@Produces(MediaType.APPLICATION_JSON)
public String infoSubmit(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam("id") String id) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<String, Map<String, Object>>(user).run(getInductionManageWrapper(user)::infoSubmit, id);
}
}

View File

@ -1,37 +0,0 @@
package com.engine.recruit.controller;
import com.engine.common.util.ParamUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.recruit.util.ResponseResult;
import com.engine.recruit.wrapper.RecruitPositionWrapper;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/10/09
* @version: 1.0
*/
public class RecruitPositionController {
public RecruitPositionWrapper getRecruitPositionWrapper(User user) {
return ServiceUtil.getService(RecruitPositionWrapper.class, user);
}
@POST
@Path("/updatePostInfo")
@Produces(MediaType.APPLICATION_JSON)
public String updatePostInfo(@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)::updatePostInfo, param);
}
}

View File

@ -1,38 +0,0 @@
package com.engine.recruit.controller;
import com.engine.common.util.ParamUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.recruit.util.ResponseResult;
import com.engine.recruit.wrapper.RecruitScheduleWrapper;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2024/03/27
* @version: 1.0
*/
public class RecruitScheduleController {
public RecruitScheduleWrapper getRecruitScheduleWrapper(User user) {
return ServiceUtil.getService(RecruitScheduleWrapper.class, user);
}
@POST
@Path("/immediatelyRun")
@Produces(MediaType.APPLICATION_JSON)
public String immediatelyRun(@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(getRecruitScheduleWrapper(user)::immediatelyRun, param);
}
}

View File

@ -1,37 +0,0 @@
package com.engine.recruit.controller;
import com.engine.common.util.ParamUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.recruit.util.ResponseResult;
import com.engine.recruit.wrapper.RpaJclWrapper;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/10/27
* @version: 1.0
*/
public class RpaJclController {
public RpaJclWrapper getRpaJclWrapper(User user) {
return ServiceUtil.getService(RpaJclWrapper.class, user);
}
@POST
@Path("/setEmailSetting")
@Produces(MediaType.APPLICATION_JSON)
public String setEmailSetting(@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(getRpaJclWrapper(user)::setEmailSetting, param);
}
}

View File

@ -1,46 +0,0 @@
package com.engine.recruit.controller;
import com.engine.common.util.ParamUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.recruit.util.ResponseResult;
import com.engine.recruit.wrapper.TalentPoolWrapper;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/10/20
* @version: 1.0
*/
public class TalentPoolController {
public TalentPoolWrapper getTalentPoolWrapper(User user) {
return ServiceUtil.getService(TalentPoolWrapper.class, user);
}
@POST
@Path("/removeBlacklist")
@Produces(MediaType.APPLICATION_JSON)
public String removeBlacklist(@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(getTalentPoolWrapper(user)::removeBlacklist, param);
}
@POST
@Path("/createNewApplicant")
@Produces(MediaType.APPLICATION_JSON)
public String createNewApplicant(@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(getTalentPoolWrapper(user)::createNewApplicant, param);
}
}

View File

@ -1,84 +0,0 @@
package com.engine.recruit.controller;
import com.engine.common.util.ServiceUtil;
import com.engine.recruit.entity.workbench.OptionVO;
import com.engine.recruit.entity.workbench.RecruitPortalCommonVO;
import com.engine.recruit.service.WorkBenchPortalService;
import com.engine.recruit.service.impl.WorkBenchPortalServiceImpl;
import com.engine.recruit.util.ResponseResult;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.List;
/**
* @Author liang.cheng
* @Date 2023/10/18 4:34 PM
* @Version 1.0
*/
public class WorkBenchPortalController {
public WorkBenchPortalService getWorkBenchPortal(User user) {
return ServiceUtil.getService(WorkBenchPortalServiceImpl.class, user);
}
@GET
@Path("/top")
@Produces(MediaType.APPLICATION_JSON)
public String getRecruitPortalTop(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<String, List<RecruitPortalCommonVO>>(user).run(getWorkBenchPortal(user) :: getRecruitPortalTop);
}
@GET
@Path("/jobTenure")
@Produces(MediaType.APPLICATION_JSON)
public String getJobTenure(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<String, OptionVO>(user).run(getWorkBenchPortal(user) :: getJobTenure);
}
@GET
@Path("/waitStepPerson")
@Produces(MediaType.APPLICATION_JSON)
public String getWaitStepPerson(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<String, OptionVO>(user).run(getWorkBenchPortal(user) :: getWaitStepPerson);
}
@GET
@Path("/recruitTransform")
@Produces(MediaType.APPLICATION_JSON)
public String getRecruitTransform(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<String, OptionVO>(user).run(getWorkBenchPortal(user) :: getRecruitTransform);
}
@GET
@Path("/peopleFrom")
@Produces(MediaType.APPLICATION_JSON)
public String getPeopleFrom(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<String, OptionVO>(user).run(getWorkBenchPortal(user) :: getPeopleFrom);
}
@GET
@Path("/recruitProgress")
@Produces(MediaType.APPLICATION_JSON)
public String getRecruitProgress(@Context HttpServletRequest request, @Context HttpServletResponse response) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<String, List<RecruitPortalCommonVO>>(user).run(getWorkBenchPortal(user) :: getRecruitProgress);
}
}

View File

@ -1,41 +0,0 @@
package com.engine.recruit.controller;
import com.engine.common.util.ServiceUtil;
import com.engine.recruit.entity.workplan.WorkPlanCreateParams;
import com.engine.recruit.service.WorkPlanSerivice;
import com.engine.recruit.service.impl.WorkPlanServiceImpl;
import com.engine.recruit.util.ResponseResult;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
/**
* @Author liang.cheng
* @Date 2023/10/17 10:48 AM
* @Description: 面试生成日程
* @Version 1.0
*/
public class WorkPlanController {
public WorkPlanSerivice getWorkPlan(User user) {
return ServiceUtil.getService(WorkPlanServiceImpl.class, user);
}
@POST
@Path("/operate")
@Produces(MediaType.APPLICATION_JSON)
public String operateWorkPlan(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody WorkPlanCreateParams workPlanCreateParams) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<WorkPlanCreateParams, String>(user).run(getWorkPlan(user)::operate, workPlanCreateParams);
}
}

View File

@ -1,25 +0,0 @@
package com.engine.recruit.entity.init.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author:dxfeng
* @createTime: 2023/11/22
* @version: 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class OperateButtonPo {
private Integer id;
private String buttonName;
private String buttonKey;
private String buttonAction;
private String buttonOrder;
private String linkUrl;
}

View File

@ -1,23 +0,0 @@
package com.engine.recruit.entity.init.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author:dxfeng
* @createTime: 2023/11/23
* @version: 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class OperateFlowPo {
private String lcmc;
private Integer lczt;
private String ksjd;
private String gcjd;
private String jsjd;
}

View File

@ -1,22 +0,0 @@
package com.engine.recruit.entity.init.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author:dxfeng
* @createTime: 2023/11/22
* @version: 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class OperateStageDt1 {
private Integer czan;
private String zdyxsmc;
private String tzymdz;
private Integer zssx;
}

View File

@ -1,21 +0,0 @@
package com.engine.recruit.entity.init.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author:dxfeng
* @createTime: 2023/11/22
* @version: 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class OperateStageDt2 {
private String ymbt;
private String ymdz;
private Integer zssx;
}

View File

@ -1,29 +0,0 @@
package com.engine.recruit.entity.init.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @author:dxfeng
* @createTime: 2023/11/22
* @version: 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class OperateStagePo {
private Integer id;
private String jdmc;
private String jdms;
private Integer jdlx;
private Integer hj;
private List<OperateStageDt1> dt1;
private List<OperateStageDt2> dt2;
}

View File

@ -1,29 +0,0 @@
package com.engine.recruit.entity.position;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author:dxfeng
* @createTime: 2024/02/05
* @version: 1.0
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class PositionPo {
private String id;
private String name;
private String status;
private String creator;
private String createDate;
private String createTime;
private String creationTime;
public String getCreationTime() {
return createDate + " " + createTime;
}
}

View File

@ -1,58 +0,0 @@
package com.engine.recruit.entity.record;
import com.engine.recruit.conn.ApplicantCommonInfo;
import com.engine.recruit.enums.RecordOperateEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import weaver.general.BaseBean;
import weaver.hrm.User;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/11/02
* @version: 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ApplicantRecordPo {
private String billId;
private String modeId;
private String formId;
private String layoutId;
private String operateTime;
private User user;
private String content;
private String linkUrl;
private Map<String, Object> otherParam;
private String pcId;
private RecordOperateEnum recordOperateType;
public void autoCreateLink() {
String url = "/spa/cube/index.html#/main/cube/card?billid={billId}&type=0&modeId={modeId}&formId={formId}&layoutid={layoutId}&guid=card";
if (StringUtils.isBlank(layoutId)) {
linkUrl = url.replace("{billId}", billId).replace("{modeId}", modeId).replace("{formId}", formId).replace("&layoutid={layoutId}", "");
} else {
linkUrl = url.replace("{billId}", billId).replace("{modeId}", modeId).replace("{formId}", formId).replace("{layoutId}", layoutId);
}
}
public void execute() {
if (null == recordOperateType) {
return;
}
try {
recordOperateType.createOperateRecord(this);
ApplicantCommonInfo.createOperateRecord(this);
} catch (Exception e) {
new BaseBean().writeLog("应聘过程记录数据插入失败", e);
}
}
}

View File

@ -1,27 +0,0 @@
package com.engine.recruit.entity.recruitflow.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 招聘流程按钮实体类
*
* @author:dxfeng
* @createTime: 2023/09/25
* @version: 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class RecruitButton {
private String key;
private String buttonName;
private String tabName;
private String tabLink;
private String buttonKey;
private String buttonType;
private Integer orderNum;
}

View File

@ -1,21 +0,0 @@
package com.engine.recruit.entity.recruitflow.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author:dxfeng
* @createTime: 2023/10/12
* @version: 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class RecruitStepPo {
private int key;
private String description;
private String type;
}

View File

@ -1,64 +0,0 @@
package com.engine.recruit.entity.recruitflow.po;
import com.engine.recruit.util.RecruitFlowUtil;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/10/11
* @version: 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class RecruitTabPo {
private static final String SEARCH_URL = "/main/cube/search";
private String key;
private String title;
private String url;
private String viewcondition;
private String billId;
public String getUrl() {
return url;
}
public String getTitle() {
if (StringUtils.isNotBlank(url) && url.contains(SEARCH_URL)) {
Map<String, String> paramMap = RecruitFlowUtil.parseURL(getUrl());
String customId = paramMap.get("customid");
if (StringUtils.isBlank(customId)) {
return title;
}
// 查询对应查询列表的表名
RecordSet rs = new RecordSet();
rs.executeQuery("select tablename from workflow_bill where id = (select formid from mode_customsearch where id = ?)", customId);
if (rs.next()) {
String tableName = rs.getString("tablename");
String tabCount = "0";
if ("uf_jcl_yppc".equalsIgnoreCase(tableName)) {
rs.executeQuery("select xm,sjhm from uf_jcl_yppc where id = ?", billId);
if (rs.next()) {
rs.executeQuery("select count(id) as num from uf_jcl_yppc where xm=? and sjhm =?", rs.getString("xm"), rs.getString("sjhm"));
}
} else {
rs.executeQuery("select count(1) as num from " + tableName + " where ypz = ? ", billId);
}
if (rs.next()) {
tabCount = rs.getString("num");
}
title += "(" + tabCount + ")";
}
}
return title;
}
}

View File

@ -1,80 +0,0 @@
package com.engine.recruit.entity.resume;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.general.BaseBean;
/**
* @author:dxfeng
* @createTime: 2023/11/10
* @version: 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class OcrResumePo {
private String id;
private String xm;
private String xb;
private String csrq;
private String jg;
private String yx;
private String wx;
private String qq;
private String xjzd;
private String ah;
private String grys;
private String jyjl;
private String bysj;
private String zgxl;
private String zyjn;
private String sxjl;
private String yysp;
private String zs;
private String gzjl;
private String ypzw;
private String gzjy;
private String xmjl;
private String sjhm;
private String nl;
private String sfz;
private String jlfj;
public String getXb() {
if ("".equals(xb)) {
return "0";
} else if ("".equals(xb)) {
return "1";
}
return null;
}
public Integer getNl() {
if (StringUtils.isNotBlank(nl)) {
try {
return Integer.parseInt(nl);
} catch (Exception e) {
new BaseBean().writeLog(e);
}
}
return null;
}
public String getYpzw() {
String id = null;
if (StringUtils.isNotBlank(ypzw)) {
RecordSet rs = new RecordSet();
rs.executeQuery("select id from uf_jcl_zp_zpzw where zpzwmc = ? ", ypzw);
if (rs.next()) {
id = rs.getString("id");
}
}
return id;
}
}

View File

@ -1,209 +0,0 @@
package com.engine.recruit.entity.resume;
import cn.hutool.core.convert.Convert;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.engine.recruit.conn.CheckRepeatResume;
import com.engine.recruit.conn.ModeBrowserCommonInfo;
import com.engine.recruit.conn.RecruitDataMap;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
import weaver.general.BaseBean;
import weaver.hrm.User;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
/**
* @author:dxfeng
* @createTime: 2023/11/10
* @version: 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class QllResumePo {
private static final int SEC_CATEGORY = Convert.toInt(RecruitModeUtil.getRecruitPropValue("APPLICANTS_RESUMES_CATEGORY"));
private String id;
private String xm;
private String xb;
private String nl;
private String gzjy;
private String xjzd;
private String sjhm;
private String yx;
private String ypzw;
private String grys;
private String qzyx;
private String gzjl;
private String xmjl;
private String jyjl;
private String zgxl;
private String zyjn;
private String yynl;
private String zs;
private String jlfj;
private String rksj;
private String tdsj;
private String lyqd;
private String gjrsjh;
/**
* 解析JSON数组下载文件并入库
*
* @return
*/
public String getJlfj() {
if (StringUtils.isBlank(jlfj)) {
return null;
}
String resumeId = null;
try {
JSONArray jsonArray = JSON.parseArray(jlfj);
JSONObject jsonObject = (JSONObject) jsonArray.get(0);
String name = jsonObject.getString("name");
String content = jsonObject.getString("content");
new BaseBean().writeLog("千里聆简历附件解析id=" + id + ",jslf=" + jlfj);
HttpResponse response = HttpRequest.get(content).execute();
if (response.isOk()) {
String disposition = response.header("Content-Disposition");
if (StringUtils.isNotBlank(disposition)) {
InputStream inputStream = response.bodyStream();
int imageFileId = RecruitModeUtil.generateImageFileId(inputStream, name);
int docId = RecruitModeUtil.createDocId(SEC_CATEGORY, imageFileId, new User(1));
resumeId = String.valueOf(docId);
} else {
new BaseBean().writeLog("千里聆附件下载失败,Content-Disposition为空===" + response.body());
}
} else {
new BaseBean().writeLog("千里聆附件下载失败,URL响应失败");
}
} catch (Exception e) {
new BaseBean().writeLog("千里聆附件下载失败", e);
}
return resumeId;
}
public String getLyqd() {
return ModeBrowserCommonInfo.getResumeSource(lyqd);
}
public String getXb() {
if ("".equals(xb)) {
return "0";
} else if ("".equals(xb)) {
return "1";
}
return null;
}
public String getGzjy() {
if (StringUtils.isBlank(gzjy)) {
return null;
}
int parseInt = Integer.parseInt(gzjy);
String year = parseInt + "";
if (0 == parseInt) {
year = "1年以内";
}
if (parseInt > 20) {
year = "20年以上";
}
return ModeBrowserCommonInfo.getResumeSource(year);
}
public String getZgxl() {
return ModeBrowserCommonInfo.getEducationLevelId(zgxl);
}
public List<RecruitDataMap<Object>> getGzjl() {
List<RecruitDataMap<Object>> list = new ArrayList<>();
if (StringUtils.isNotBlank(gzjl)) {
try {
JSONArray jsonArray = JSONArray.parseArray(gzjl);
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject jsonObject = jsonArray.getJSONObject(i);
String gsmc = jsonObject.getString("公司名称:");
String zwmc = jsonObject.getString("职位名称:");
String sj = jsonObject.getString("时间:");
String gznr = jsonObject.getString("工作内容:");
RecruitDataMap<Object> map = CheckRepeatResume.getDateRange(sj, false);
map.put("gsmc", gsmc);
map.put("gw", zwmc);
map.put("gzzz", formatStr(gznr));
list.add(map);
}
} catch (Exception e) {
new BaseBean().writeLog("工作经历解析失败", e);
}
}
return list;
}
public List<RecruitDataMap<Object>> getXmjl() {
List<RecruitDataMap<Object>> list = new ArrayList<>();
if (StringUtils.isNotBlank(xmjl)) {
try {
JSONArray jsonArray = JSONArray.parseArray(xmjl);
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject jsonObject = jsonArray.getJSONObject(i);
String xmmc = jsonObject.getString("项目名称:");
//String rzgs = jsonObject.getString("任职公司:");
String sj = jsonObject.getString("时间:");
String xmnr = jsonObject.getString("项目内容:");
RecruitDataMap<Object> map = CheckRepeatResume.getDateRange(sj, false);
map.put("xmmc", xmmc);
map.put("xmms", formatStr(xmnr));
list.add(map);
}
} catch (Exception e) {
new BaseBean().writeLog("项目经历解析失败", e);
}
}
return list;
}
public List<RecruitDataMap<Object>> getJyjl() {
List<RecruitDataMap<Object>> list = new ArrayList<>();
if (StringUtils.isNotBlank(jyjl)) {
try {
JSONArray jsonArray = JSONArray.parseArray(jyjl);
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject jsonObject = jsonArray.getJSONObject(i);
String byyx = jsonObject.getString("毕业院校:");
String xl = jsonObject.getString("学历:");
String sj = jsonObject.getString("时间:");
String zy = jsonObject.getString("专业:");
RecruitDataMap<Object> map = CheckRepeatResume.getDateRange(sj, true);
map.put("xxmc", byyx);
map.put("xl", ModeBrowserCommonInfo.getEducationLevelId(xl));
map.put("zy", zy);
list.add(map);
}
} catch (Exception e) {
new BaseBean().writeLog("教育经历解析失败", e);
}
}
return list;
}
private String formatStr(String str) {
if (StringUtils.isBlank(str)) {
return "";
}
return str.replace("\\n", "\n");
}
}

View File

@ -1,31 +0,0 @@
package com.engine.recruit.entity.workbench;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.LinkedList;
import java.util.List;
/**
* @Author liang.cheng
* @Date 2023/10/19 3:03 PM
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class OptionVO {
private String text;
private List<String> xData;
private List<Integer> barSeriesData;
private LinkedList<SeriesParam> seriesData;
}

View File

@ -1,23 +0,0 @@
package com.engine.recruit.entity.workbench;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author liang.cheng
* @Date 2023/10/19 11:39 AM
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class RecruitInterviewPO {
private String ids;
private String interviewDate;
}

View File

@ -1,33 +0,0 @@
package com.engine.recruit.entity.workbench;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author liang.cheng
* @Date 2023/10/19 10:31 AM
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class RecruitPortalCommonVO {
private Integer id;
private String title;
private Integer count;
private String icon;
private String color;
private Double scale;
}

View File

@ -1,27 +0,0 @@
package com.engine.recruit.entity.workbench;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author liang.cheng
* @Date 2023/9/28 2:02 PM
* @Version 1.0
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SeriesParam {
private Double value;
private String name;
private String color;
}

View File

@ -1,39 +0,0 @@
package com.engine.recruit.entity.workplan;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author liang.cheng
* @Date 2023/10/17 3:01 PM
* @Description:
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class WorkPlanCreateParams {
private String operateType;
private String billId;
private String workPlanType;
private String planName;
private String memberIds;
private String urgentLevel;
private String beginDateTime;
private String endDateTime;
private String workId;
}

View File

@ -1,52 +0,0 @@
package com.engine.recruit.enums;
/**
* @author:dxfeng
* @createTime: 2023/09/27
* @version: 1.0
*/
public enum ApplicantOperateEnum {
/**
* 应聘者相关操作类型
*/
ELIMINATE("eliminate", "淘汰"),
REFERRAL("referral", "转推其他职位"),
TRANSFER("transfer", "转移阶段"),
ASSIGN("assign", "分配职位"),
ARCHIVE("archive", "归档人才库"),
;
ApplicantOperateEnum(String operateType, String operateDesc) {
this.operateType = operateType;
this.operateDesc = operateDesc;
}
private String operateType;
private String operateDesc;
public String getOperateType() {
return operateType;
}
public void setOperateType(String operateType) {
this.operateType = operateType;
}
public String getOperateDesc() {
return operateDesc;
}
public void setOperateDesc(String operateDesc) {
this.operateDesc = operateDesc;
}
public static ApplicantOperateEnum getOperateType(String operateType) {
for (ApplicantOperateEnum item : ApplicantOperateEnum.values()) {
if (item.operateType.equalsIgnoreCase(operateType)) {
return item;
}
}
throw new RuntimeException("不支持的操作类型");
}
}

View File

@ -1,49 +0,0 @@
package com.engine.recruit.enums;
/**
* @author:dxfeng
* @createTime: 2023/09/27
* @version: 1.0
*/
public enum ApplicationStatusEnum {
/**
* 应聘状态
*/
DISTRIBUTION("待分配", "0"),
CANDIDATE("候选中", "1"),
ARCHIVED("已归档", "2"),
OBSOLETE("已淘汰", "3");
ApplicationStatusEnum(String name, String value) {
this.name = name;
this.value = value;
}
public static ApplicationStatusEnum getStatus(String value) {
for (ApplicationStatusEnum item : ApplicationStatusEnum.values()) {
if (item.value.equalsIgnoreCase(value)) {
return item;
}
}
throw new RuntimeException("不支持的应聘状态");
}
private String name;
private String value;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}

View File

@ -1,38 +0,0 @@
package com.engine.recruit.enums;
/**
* @author:dxfeng
* @createTime: 2023/10/16
* @version: 1.0
*/
public enum CommonBrowserTypeEnum {
/**
* 聚才林招聘常用浏览按钮类型
*/
GENDER("性别"),
RESUME_SOURCE("简历来源"),
RECRUITMENT_CHANNELS("招聘渠道"),
JOB_NATURE("职位性质"),
JOB_EDUCATION_REQUIREMENTS("职位学历要求"),
MARITAL_STATUS("婚姻状况"),
ON_JOB_STATUS("在职状态"),
RECRUITMENT_REASONS("招聘原因"),
YEARS_OF_WORK("工作年限"),
WORK_EXPERIENCE("工作经验"),
POLITICAL_LANDSCAPE("政治面貌"),
DEGREE("学位");
CommonBrowserTypeEnum(String desc) {
this.desc = desc;
}
private String desc;
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}

View File

@ -1,55 +0,0 @@
package com.engine.recruit.enums;
/**
* @author:dxfeng
* @createTime: 2023/09/28
* @version: 1.0
*/
public enum CurrentApplicationStageEnum {
/**
* 当前操作阶段
*/
SCREENING("初筛", "0"),
WRITTEN("笔试", "1"),
INTERVIEW("面试", "2"),
EVALUATION("测评", "3"),
SALARY("薪酬谈判", "4"),
BACK("背调", "5"),
offer("offer", "6"),
EMPLOYMENT("待入职", "8"),
ENTRY("入职", "9 ");
CurrentApplicationStageEnum(String stageName, String stageValue) {
this.stageName = stageName;
this.stageValue = stageValue;
}
private String stageName;
private String stageValue;
public String getStageName() {
return stageName;
}
public void setStageName(String stageName) {
this.stageName = stageName;
}
public String getStageValue() {
return stageValue;
}
public void setStageValue(String stageValue) {
this.stageValue = stageValue;
}
public static CurrentApplicationStageEnum getOperateType(String operateType) {
for (CurrentApplicationStageEnum item : CurrentApplicationStageEnum.values()) {
if (item.stageValue.equalsIgnoreCase(operateType)) {
return item;
}
}
throw new RuntimeException("不支持的操作类型");
}
}

View File

@ -1,41 +0,0 @@
package com.engine.recruit.enums;
/**
* 入职状态枚举类
*
* @author:dxfeng
* @createTime: 2023/10/10
* @version: 1.0
*/
public enum EntryStatusEnum {
/**
* 入职状态
*/
PENDING("0", "待入职"),
EMPLOYED("0", "已入职"),
CANCEL("0", "取消入职");
EntryStatusEnum(String value, String desc) {
this.value = value;
this.desc = desc;
}
private String value;
private String desc;
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}

View File

@ -1,59 +0,0 @@
package com.engine.recruit.enums;
/**
* 学历浏览按钮枚举类
*
* @author:dxfeng
* @createTime: 2023/10/17
* @version: 1.0
*/
public enum HighestDegreeEnum {
/**
* 学历浏览按钮枚举类
*/
OTHER(1, "其他"),
JUNIOR_MIDDLE_SCHOOL(2, "初中"),
HIGH_SCHOOL(3, "高中"),
SECONDARY_TECHNOLOGY(4, "中技"),
SECONDARY_SPECIALIZED_SCHOOL(5, "中专"),
JUNIOR_COLLEGE(6, "大专"),
UNDERGRADUATE(7, "本科"),
MASTER_DEGREE(8, "硕士研究生"),
DOCTORAL_STUDENTS(9, "博士研究生"),
MBA(10, "MBA"),
EMBA(11, "EMBA"),
POST_DOCTORAL(12, "博士后");
HighestDegreeEnum(Integer id, String name) {
this.id = id;
this.name = name;
}
public static HighestDegreeEnum getDegreeId(String name) {
for (HighestDegreeEnum item : HighestDegreeEnum.values()) {
if (item.name.equalsIgnoreCase(name)) {
return item;
}
}
return HighestDegreeEnum.OTHER;
}
private Integer id;
private String name;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

View File

@ -1,40 +0,0 @@
package com.engine.recruit.enums;
/**
* @author:dxfeng
* @createTime: 2023/10/24
* @version: 1.0
*/
public enum InfoCollectEnum {
/**
* 信息采集状态
*/
NOT_SENT(0, "未发送"),
HAS_SENT(1, "已发送"),
NOT_SUBMITTED(2, "未提交"),
SUBMITTED(3, "已提交");
InfoCollectEnum(Integer id, String name) {
this.id = id;
this.name = name;
}
private Integer id;
private String name;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

View File

@ -1,49 +0,0 @@
package com.engine.recruit.enums;
/**
* @author:dxfeng
* @createTime: 2023/09/27
* @version: 1.0
*/
public enum InterviewOperateTypeEnum {
/**
* 面试操作类型
*/
EVALUATE("evaluate", "面试评价"),
CANCEL("cancel", "取消面试"),
ARRANGE("arrange", "安排面试"),
ADJUSTMENT("adjustment", "调整面试");
InterviewOperateTypeEnum(String operateType, String operateDesc) {
this.operateType = operateType;
this.operateDesc = operateDesc;
}
private String operateType;
private String operateDesc;
public String getOperateType() {
return operateType;
}
public void setOperateType(String operateType) {
this.operateType = operateType;
}
public String getOperateDesc() {
return operateDesc;
}
public void setOperateDesc(String operateDesc) {
this.operateDesc = operateDesc;
}
public static InterviewOperateTypeEnum getOperateType(String operateType) {
for (InterviewOperateTypeEnum item : InterviewOperateTypeEnum.values()) {
if (item.operateType.equalsIgnoreCase(operateType)) {
return item;
}
}
throw new RuntimeException("不支持的操作类型");
}
}

View File

@ -1,48 +0,0 @@
package com.engine.recruit.enums;
/**
* @author:dxfeng
* @createTime: 2023/10/23
* @version: 1.0
*/
public enum PositionOperateEnum {
/**
* 入职管理相关操作
*/
PREPARE("prepare", "入职准备"),
HANDLE("prepare", "办理入职"),
;
PositionOperateEnum(String operateType, String operateDesc) {
this.operateType = operateType;
this.operateDesc = operateDesc;
}
private String operateType;
private String operateDesc;
public String getOperateType() {
return operateType;
}
public void setOperateType(String operateType) {
this.operateType = operateType;
}
public String getOperateDesc() {
return operateDesc;
}
public void setOperateDesc(String operateDesc) {
this.operateDesc = operateDesc;
}
public static PositionOperateEnum getOperateType(String operateType) {
for (PositionOperateEnum item : PositionOperateEnum.values()) {
if (item.operateType.equalsIgnoreCase(operateType)) {
return item;
}
}
throw new RuntimeException("不支持的操作类型");
}
}

View File

@ -1,54 +0,0 @@
package com.engine.recruit.enums;
import com.engine.recruit.exception.CustomizeRunTimeException;
/**
* 发布渠道枚举类
*
* @author:dxfeng
* @createTime: 2023/10/08
* @version: 1.0
*/
public enum PositionThirdChannelEnum {
/**
* 发布渠道
*/
BOSSZHIPIN("0", "BOSS直聘"),
ZHILIANZHAOPIN("1", "智联"),
QIANCHENGWUYOU("2", "前程无忧"),
LAGO("3", "拉勾"),
LIEPIN("4", "猎聘");
PositionThirdChannelEnum(String value, String desc) {
this.value = value;
this.desc = desc;
}
private String value;
private String desc;
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public static PositionThirdChannelEnum getEnum(String value) {
for (PositionThirdChannelEnum item : PositionThirdChannelEnum.values()) {
if (item.value.equalsIgnoreCase(value)) {
return item;
}
}
throw new CustomizeRunTimeException("不支持的发布渠道");
}
}

View File

@ -1,18 +0,0 @@
package com.engine.recruit.enums;
import com.engine.recruit.entity.record.ApplicantRecordPo;
/**
* @author:dxfeng
* @createTime: 2023/11/02
* @version: 1.0
*/
public interface RecordOperateAdapter {
/**
* 创建操作记录
*
* @param recordPo
*/
void createOperateRecord(ApplicantRecordPo recordPo);
}

View File

@ -1,489 +0,0 @@
package com.engine.recruit.enums;
import com.engine.recruit.conn.ApplicantCommonInfo;
import com.engine.recruit.entity.record.ApplicantRecordPo;
import com.engine.recruit.entity.recruitflow.po.RecruitStepPo;
import weaver.conn.RecordSet;
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
import weaver.general.Util;
import weaver.hrm.User;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/11/02
* @version: 1.0
*/
public enum RecordOperateEnum implements RecordOperateAdapter {
/**
* 应聘过程操作类型
*/
RESUME_SUBMISSION("resumeSubmission", "简历投递", "简历投递", recordPo -> {
recordPo.setPcId(recordPo.getBillId());
recordPo.setContent("");
}),
ELIMINATE("eliminate", "淘汰", "淘汰", recordPo -> {
User user = recordPo.getUser();
RecruitStepPo currentStep = ApplicantCommonInfo.getCurrentStep(recordPo.getBillId());
String content = user.getLastname() + "淘汰,操作阶段:" + currentStep.getDescription();
recordPo.setPcId(recordPo.getBillId());
recordPo.setContent(content);
}),
TRANSFER_STAGE("transferStage", "转移阶段", "转移阶段", recordPo -> {
Map<String, Object> otherParam = recordPo.getOtherParam();
String sourceStep = Util.null2String(otherParam.get("sourceStep"));
String targetStep = Util.null2String(otherParam.get("targetStep"));
User user = recordPo.getUser();
String content = user.getLastname() + "转移阶段,应聘阶段:“" + sourceStep + "”变更为“" + targetStep + "";
recordPo.setPcId(recordPo.getBillId());
recordPo.setContent(content);
}),
ARCHIVE_TALENT_POOL("archiveTalentPool", "归档人才库", "归档人才库", recordPo -> {
Map<String, Object> otherParam = recordPo.getOtherParam();
String gdyy = Util.null2String(otherParam.get("gdyy"));
String gdxxyy = Util.null2String(otherParam.get("gdxxyy"));
int formId = ApplicantCommonInfo.getFormIdByTableName("uf_jcl_yppc");
String selectName = ApplicantCommonInfo.getSelectName(String.valueOf(formId), "gdyy", gdyy);
User user = recordPo.getUser();
RecruitStepPo currentStep = ApplicantCommonInfo.getCurrentStep(recordPo.getBillId());
String content = user.getLastname() + "归档人才库,操作阶段:" + currentStep.getDescription() + ",归档原因:" + selectName + ",归档详细原因:" + gdxxyy;
recordPo.setPcId(recordPo.getBillId());
recordPo.setContent(content);
}),
JOIN_BLACKLIST("joinBlacklist", "加入黑名单", "加入黑名单", recordPo -> {
User user = recordPo.getUser();
RecruitStepPo currentStep = ApplicantCommonInfo.getCurrentStep(recordPo.getBillId());
String content = user.getLastname() + "加入黑名单,操作阶段:" + currentStep.getDescription();
recordPo.setPcId(recordPo.getBillId());
recordPo.setContent(content);
}),
ADD_SCREEN("addScreen", "部门筛选反馈", "部门筛选反馈", recordPo -> {
Map<String, Object> otherParam = recordPo.getOtherParam();
String jg = Util.null2String(otherParam.get("jg"));
String pj = Util.null2String(otherParam.get("pj"));
String ypz = Util.null2String(otherParam.get("ypz"));
String fkr = Util.null2String(otherParam.get("fkr"));
String createName = Util.null2String(otherParam.get("createName"));
String resourceNames = RecruitModeUtil.getResourceNames(fkr);
String selectName = ApplicantCommonInfo.getSelectName(recordPo.getFormId(), "jg", jg);
String content = "创建人:" + createName + ",反馈人:" + resourceNames + ",结果:" + selectName + ",评价:" + pj;
recordPo.setContent(content);
recordPo.setPcId(ypz);
recordPo.autoCreateLink();
}),
UPDATE_SCREEN("updateScreen", "修改筛选反馈", "部门筛选反馈", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String jg = Util.null2String(otherParam.get("jg"));
String pj = Util.null2String(otherParam.get("pj"));
String ypz = Util.null2String(otherParam.get("ypz"));
String fkr = Util.null2String(otherParam.get("fkr"));
String resourceNames = RecruitModeUtil.getResourceNames(fkr);
String selectName = ApplicantCommonInfo.getSelectName(recordPo.getFormId(), "jg", jg);
String content = "更新关联数据,最近修改人:" + user.getLastname() + ",反馈人:" + resourceNames + ",结果:" + selectName + ",评价:" + pj;
recordPo.setContent(content);
recordPo.autoCreateLink();
recordPo.setPcId(ypz);
}),
DELETE_SCREEN("deleteScreen", "删除筛选反馈", "部门筛选反馈", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String ypz = Util.null2String(otherParam.get("ypz"));
String content = user.getLastname() + "删除/隐藏关联记录数据";
recordPo.setContent(content);
recordPo.setPcId(ypz);
}),
ADD_INTERVIEW_RESULT("addInterviewResult", "面试评价反馈", "面试评价反馈", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String msrq = Util.null2String(otherParam.get("msrq"));
String jg = Util.null2String(otherParam.get("jg"));
String pj = Util.null2String(otherParam.get("pj"));
String ypz = Util.null2String(otherParam.get("ypz"));
String msg = Util.null2String(otherParam.get("msg"));
String createName = Util.null2String(otherParam.get("createName"));
String msgNames = RecruitModeUtil.getResourceNames(msg);
String selectName = ApplicantCommonInfo.getSelectName(recordPo.getFormId(), "jg", jg);
String content = "创建人:" + createName + ",面试官:" + msgNames + " ,面试时间:" + msrq + ",反馈人:" + user.getLastname() + " 结果:" + selectName + " ,评价:" + pj;
recordPo.setContent(content);
recordPo.setPcId(ypz);
recordPo.autoCreateLink();
}),
UPDATE_INTERVIEW_RESULT("updateInterviewResult", "修改面试评价反馈", "面试评价反馈", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String msrq = Util.null2String(otherParam.get("msrq"));
String jg = Util.null2String(otherParam.get("jg"));
String pj = Util.null2String(otherParam.get("pj"));
String ypz = Util.null2String(otherParam.get("ypz"));
String msg = Util.null2String(otherParam.get("msg"));
String fkr = Util.null2String(otherParam.get("fkr"));
String fkrNames = RecruitModeUtil.getResourceNames(fkr);
String msgNames = RecruitModeUtil.getResourceNames(msg);
String selectName = ApplicantCommonInfo.getSelectName(recordPo.getFormId(), "jg", jg);
String content = "更新关联数据,最近修改人:" + user.getLastname() + "面试官:" + msgNames + ",面试时间:" + msrq + ",反馈人:" + fkrNames + " 结果:" + selectName + ",评价:" + pj;
recordPo.setContent(content);
recordPo.autoCreateLink();
recordPo.setPcId(ypz);
}),
DELETE_INTERVIEW("deleteInterview", "删除面试", "面试评价反馈", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String ypz = Util.null2String(otherParam.get("ypz"));
String content = user.getLastname() + "删除/隐藏关联记录数据";
recordPo.setContent(content);
recordPo.setPcId(ypz);
}),
ADD_WRITTEN_RESULT("addWrittenResult", "笔试结果录入", "笔试", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String bsmc = Util.null2String(otherParam.get("bsmc"));
String bsjg = Util.null2String(otherParam.get("bsjg"));
String bscj = Util.null2String(otherParam.get("bscj"));
String ypz = Util.null2String(otherParam.get("ypz"));
String createName = Util.null2String(otherParam.get("createName"));
String selectName = ApplicantCommonInfo.getSelectName(recordPo.getFormId(), "bsjg", bsjg);
String content = "创建人:" + createName + ",笔试名称:" + bsmc + " ,笔试结果:" + selectName + " ,笔试成绩:" + bscj;
recordPo.setContent(content);
recordPo.setPcId(ypz);
recordPo.autoCreateLink();
}),
UPDATE_WRITTEN_RESULT("updateWrittenResult", "编辑笔试结果", "笔试", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String bsmc = Util.null2String(otherParam.get("bsmc"));
String bsjg = Util.null2String(otherParam.get("bsjg"));
String bscj = Util.null2String(otherParam.get("bscj"));
String ypz = Util.null2String(otherParam.get("ypz"));
String selectName = ApplicantCommonInfo.getSelectName(recordPo.getFormId(), "bsjg", bsjg);
String content = "更新关联数据:最近修改人:" + user.getLastname() + ",笔试名称:" + bsmc + ",笔试结果:" + selectName + " ,笔试成绩" + bscj;
recordPo.setContent(content);
recordPo.autoCreateLink();
recordPo.setPcId(ypz);
}),
DELETE_WRITTEN_RESULT("deleteWrittenResult", "删除笔试结果", "笔试", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String ypz = Util.null2String(otherParam.get("ypz"));
String content = user.getLastname() + "删除/隐藏关联记录数据";
recordPo.setContent(content);
recordPo.setPcId(ypz);
}),
ADD_SALARY_NEGOTIATION("addSalaryNegotiation", "薪酬谈判录入", "薪酬谈判", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String tpjg = Util.null2String(otherParam.get("tpjg"));
String ypz = Util.null2String(otherParam.get("ypz"));
String createName = Util.null2String(otherParam.get("createName"));
String selectName = ApplicantCommonInfo.getSelectName(recordPo.getFormId(), "tpjg", tpjg);
String content = "创建人:" + createName + ",谈判结果:" + selectName;
recordPo.setContent(content);
recordPo.setPcId(ypz);
recordPo.autoCreateLink();
}),
UPDATE_SALARY_NEGOTIATION("updateSalaryNegotiation", "修改薪酬谈判记录", "薪酬谈判", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String tpjg = Util.null2String(otherParam.get("tpjg"));
String ypz = Util.null2String(otherParam.get("ypz"));
String selectName = ApplicantCommonInfo.getSelectName(recordPo.getFormId(), "tpjg", tpjg);
String content = "更新关联数据:最近修改人:" + user.getLastname() + ",谈判结果:" + selectName;
recordPo.setContent(content);
recordPo.autoCreateLink();
recordPo.setPcId(ypz);
}),
DELETE_SALARY_NEGOTIATION("deleteSalaryNegotiation", "删除薪酬谈判记录", "薪酬谈判", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String ypz = Util.null2String(otherParam.get("ypz"));
String content = user.getLastname() + "删除/隐藏关联记录数据";
recordPo.setContent(content);
recordPo.setPcId(ypz);
}),
ADD_BACK_TONE("addBackTone", "背调录入", "背调", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String dcjg = Util.null2String(otherParam.get("dcjg"));
String ypz = Util.null2String(otherParam.get("ypz"));
String dcdw = Util.null2String(otherParam.get("dcdw"));
String createName = Util.null2String(otherParam.get("createName"));
String selectName = ApplicantCommonInfo.getSelectName(recordPo.getFormId(), "dcjg", dcjg);
String content = "创建人:" + createName + ",调查结果:" + selectName + " ,调查单位:" + dcdw;
recordPo.setContent(content);
recordPo.setPcId(ypz);
recordPo.autoCreateLink();
}),
UPDATE_BACK_TONE("updateBackTone", "修改背调记录", "背调", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String dcjg = Util.null2String(otherParam.get("dcjg"));
String ypz = Util.null2String(otherParam.get("ypz"));
String dcdw = Util.null2String(otherParam.get("dcdw"));
String selectName = ApplicantCommonInfo.getSelectName(recordPo.getFormId(), "dcjg", dcjg);
String content = "更新关联数据:最近修改人:" + user.getLastname() + ",调查结果:" + selectName + " ,调查单位" + dcdw;
recordPo.setContent(content);
recordPo.autoCreateLink();
recordPo.setPcId(ypz);
}),
DELETE_BACK_TONE("deleteBackTone", "删除背调记录", "背调", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String ypz = Util.null2String(otherParam.get("ypz"));
String content = user.getLastname() + "删除/隐藏关联记录数据";
recordPo.setContent(content);
recordPo.setPcId(ypz);
}),
CREATE_OFFER("createOffer", "创建offer", "创建offer", recordPo -> {
Map<String, Object> otherParam = recordPo.getOtherParam();
String createName = Util.null2String(otherParam.get("createName"));
String requestName = Util.null2String(otherParam.get("requestName"));
String xm = Util.null2String(otherParam.get("xm"));
String content = "创建人:" + createName + "offer流程" + requestName;
recordPo.setContent(content);
recordPo.setPcId(xm);
}),
SEND_OFFER("sendOffer", "发送offer", "发送offer", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String xm = Util.null2String(otherParam.get("xm"));
String content = user.getLastname() + "发送offer";
recordPo.setContent(content);
recordPo.setPcId(xm);
}),
OFFER_FEEDBACK("offerFeedback", "offer反馈", "offer反馈", recordPo -> {
RecordSet rs = new RecordSet();
rs.executeQuery("select xm,zt from uf_jcl_offer where id = ?", recordPo.getBillId());
String xm = "";
String zt = "";
if (rs.next()) {
xm = rs.getString("xm");
zt = rs.getString("zt");
}
int modeId = ApplicantCommonInfo.getModeIdByTableName("uf_jcl_offer");
String selectName = ApplicantCommonInfo.getSelectName(String.valueOf(modeId), "zt", zt);
String content = "offer反馈" + selectName;
recordPo.setContent(content);
recordPo.setPcId(xm);
}),
PENDING_EMPLOYMENT("pendingEmployment", "进入待入职", "进入待入职", recordPo -> {
Map<String, Object> otherParam = recordPo.getOtherParam();
String createName = Util.null2String(otherParam.get("createName"));
String pcid = Util.null2String(otherParam.get("pcid"));
String content = createName + "操作进入待入职";
recordPo.setContent(content);
recordPo.setPcId(pcid);
}),
ENTRY_PROCESS("entryProcess", "入职流程", "入职流程", recordPo -> {
Map<String, Object> otherParam = recordPo.getOtherParam();
String createName = Util.null2String(otherParam.get("createName"));
String requestName = Util.null2String(otherParam.get("requestName"));
String content = "创建人:" + createName + "offer流程" + requestName;
recordPo.setContent(content);
RecordSet rs = new RecordSet();
rs.executeQuery("select pcid from uf_jcl_rzgl where rzlc = ?", recordPo.getBillId());
if (rs.next()) {
String pcid = rs.getString("pcid");
recordPo.setPcId(pcid);
}
}),
INFO_COLLECT("infoCollect", "信息采集", "信息采集", recordPo -> {
Map<String, Object> otherParam = recordPo.getOtherParam();
String createName = Util.null2String(otherParam.get("createName"));
String pcid = Util.null2String(otherParam.get("pcid"));
String content = createName + "发送信息采集";
recordPo.setContent(content);
recordPo.setPcId(pcid);
recordPo.autoCreateLink();
}),
CANCEL_ENTRY("cancelEntry", "取消入职", "取消入职", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String qxyy = Util.null2String(otherParam.get("qxyy"));
String pcid = Util.null2String(otherParam.get("pcid"));
String content = user.getLastname() + "操作取消入职,取消原因:" + qxyy;
recordPo.setContent(content);
recordPo.setPcId(pcid);
}),
HANDLE_ENTRY("handleEntry", "办理入职", "办理入职", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String rzrq = Util.null2String(otherParam.get("rzrq"));
String pcid = Util.null2String(otherParam.get("pcid"));
String content = user.getLastname() + "操作办理入职,入职日期:" + rzrq;
recordPo.setContent(content);
recordPo.setPcId(pcid);
}),
ADD_REMARK("addRemark", "新建备注", "备注", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String bznr = Util.null2String(otherParam.get("bznr"));
String pcid = Util.null2String(otherParam.get("pcid"));
String createName = Util.null2String(otherParam.get("createName"));
String content = createName + "添加备注,备注内容:" + bznr;
recordPo.setContent(content);
recordPo.setPcId(pcid);
}),
UPDATE_REMARK("updateRemark", "编辑备注", "备注", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String bznr = Util.null2String(otherParam.get("bznr"));
String pcid = Util.null2String(otherParam.get("pcid"));
String content = "更新关联数据:最近修改人:" + user.getLastname() + ",备注内容:" + bznr;
recordPo.setContent(content);
recordPo.setPcId(pcid);
}),
DELETE_REMARK("deleteRemark", "删除备注", "备注", recordPo -> {
User user = recordPo.getUser();
Map<String, Object> otherParam = recordPo.getOtherParam();
String pcid = Util.null2String(otherParam.get("pcid"));
String content = user.getLastname() + "删除/隐藏关联记录数据";
recordPo.setContent(content);
recordPo.setPcId(pcid);
});
RecordOperateEnum(String operateType, String operateName, String showName, RecordOperateAdapter adapter) {
this.operateName = operateName;
this.operateType = operateType;
this.showName = showName;
this.adapter = adapter;
}
public static RecordOperateEnum getOperateEnum(String operateType) {
for (RecordOperateEnum item : RecordOperateEnum.values()) {
if (item.operateType.equalsIgnoreCase(operateType)) {
return item;
}
}
return null;
}
private String operateName;
private String operateType;
private String showName;
private RecordOperateAdapter adapter;
public String getOperateName() {
return operateName;
}
public String getOperateType() {
return operateType;
}
public String getShowName() {
return showName;
}
public void setOperateName(String operateName) {
this.operateName = operateName;
}
public void setOperateType(String operateType) {
this.operateType = operateType;
}
public void setShowName(String showName) {
this.showName = showName;
}
@Override
public void createOperateRecord(ApplicantRecordPo recordPo) {
adapter.createOperateRecord(recordPo);
}
}

View File

@ -1,55 +0,0 @@
package com.engine.recruit.enums;
/**
* <p>聚才林招聘</p>
* 需求状态枚举类
*
* @author:dxfeng
* @createTime: 2023/09/13
* @version: 1.0
*/
public enum RecruitStatusEnum {
/**
* 进行中(0)
*/
RECRUITMENT_PROGRESS(0, "进行中"),
/**
* 招聘完成(1)
*/
RECRUITMENT_COMPLETED(1, "招聘完成"),
/**
* 招聘停止(2)
*/
RECRUITMENT_STOPS(2, "招聘停止");
RecruitStatusEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
/**
* 选择框对应ID
*/
private Integer value;
/**
* 选择框对应描述
*/
private String desc;
public Integer getValue() {
return value;
}
public void setValue(Integer value) {
this.value = value;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}

View File

@ -1,21 +0,0 @@
package com.engine.recruit.exception;
/**
* @author:dxfeng
* @createTime: 2023/09/18
* @version: 1.0
*/
public class CustomizeRunTimeException extends RuntimeException{
public CustomizeRunTimeException(String message) {
super(message);
}
public CustomizeRunTimeException(Throwable cause) {
super(cause);
}
public CustomizeRunTimeException(String message, Throwable cause) {
super(message, cause);
}
}

View File

@ -1,37 +0,0 @@
package com.engine.recruit.factory;
import com.engine.core.impl.Service;
import com.engine.recruit.service.RecruitButtonService;
/**
* <p>聚才林招聘</p>
* 招聘按钮工厂类
*
* @author:dxfeng
* @createTime: 2023/09/18
* @version: 1.0
*/
public class RecruitButtonFactory {
/**
* 根据类的全路径获取类对象
*
* @param className 类全路径
* @param <T>
* @return
*/
public static <T extends Service> Class<T> getClass(String className) {
Class<?> clazz;
try {
clazz = Class.forName(className);
if (!RecruitButtonService.class.isAssignableFrom(clazz)) {
throw new IllegalArgumentException("该类未实现RecruitButtonService");
}
return (Class<T>) clazz;
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
}

View File

@ -1,73 +0,0 @@
package com.engine.recruit.service;
import java.util.Map;
/**
* <p>聚才林招聘</p>
* <p>
* 应聘者简历服务类
*
* @author:dxfeng
* @createTime: 2023/09/20
* @version: 1.0
*/
public interface ApplicantResumeService {
/**
* 获取应聘者姓名
*
* @param ids 应聘者ID
* @return 应聘者姓名
*/
Map<String, Object> getApplicantsName(String ids);
/**
* 根据ID获取面试信息
*
* @param id
* @return 面试信息
*/
Map<String, Object> getInterviewInfoById(String id);
/**
* 获取编辑布局对应的显示布局ID
*
* @param params 入参
* @return 显示布局ID
*/
Map<String, Object> getDisplayLayoutId(Map<String, Object> params);
/**
* 获取关联Tab页数据统计条数
*
* @param params 入参
* @return 据统计条数
*/
Map<String, Object> getTabCount(Map<String, Object> params);
/**
* 更新应聘者信息
*
* @param params 入参
* @return
*/
Map<String, Object> updateApplicantsInfo(Map<String, Object> params);
/**
* 完善OCR导入的简历原始简历字段
*
* @param params
* @return
*/
Map<String, Object> fullOriginalResumeId(Map<String, Object> params);
/**
* 判断是否重复简历是否可以新增
*
* @param param
* @return
*/
Map<String, Object> checkRepeatResume(Map<String, Object> param);
}

View File

@ -1,52 +0,0 @@
package com.engine.recruit.service;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/10/23
* @version: 1.0
*/
public interface InductionManageService {
/**
* 更新入职管理信息
*
* @param param 参数
* @return
*/
Map<String, Object> updateInductionManageInfo(Map<String, Object> param);
/**
* 发送信息采集
*
* @param param
* @return
*/
Map<String, Object> sendCollectInfo(Map<String, Object> param);
/**
* 提交前校验身份证号
*
* @param params
* @return
*/
Map<String, Object> verifyIDCard(Map<String, Object> params);
/**
* 校验登录信息
*
* @param param
* @return
*/
Map<String, Object> checkLoginInfo(Map<String, Object> param);
/**
* @Description:
* @Author: liang.cheng
* @Date: 2023/10/25 10:30 AM
* @param: [id]
* @return: java.util.Map<java.lang.String, java.lang.Object>
*/
Map<String, Object> infoSubmit(String id);
}

View File

@ -1,25 +0,0 @@
package com.engine.recruit.service;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/11/22
* @version: 1.0
*/
public interface InitRecruitDataService {
/**
* 校验初始化状态
*
* @return
*/
Map<String, Object> checkInitStatus();
/**
* 初始化招聘数据
*
* @return
*/
Map<String, Object> initRecruitData();
}

View File

@ -1,22 +0,0 @@
package com.engine.recruit.service;
import java.util.Map;
/**
* <p>聚才林招聘</p>
* 消息模板接口
*
* @author:dxfeng
* @createTime: 2023/09/26
* @version: 1.0
*/
public interface MessageTemplateService {
/**
* 获取邮件模板内容
*
* @param params 入参
* @return 模板内容
*/
Map<String, Object> getMessageContent(Map<String, Object> params);
}

View File

@ -1,35 +0,0 @@
package com.engine.recruit.service;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/10/30
* @version: 1.0
*/
public interface OfferService {
/**
* 获取offer移动端地址
*
* @param param
* @return
*/
Map<String, Object> getOfferMobileLink(Map<String, Object> param);
/**
* 获取邮件内容
*
* @param param
* @return
*/
Map<String, Object> getOfferContent(Map<String, Object> param);
/**
* 更新offer状态
*
* @param param
* @return
*/
Map<String, Object> updateOfferStatus(Map<String, Object> param);
}

View File

@ -1,22 +0,0 @@
package com.engine.recruit.service;
import java.util.Map;
/**
* <p>聚才林招聘</p>
* 招聘流程按钮功能实现接口
*
* @author:dxfeng
* @createTime: 2023/09/18
* @version: 1.0
*/
public interface RecruitButtonService {
/**
* 按钮执行的业务逻辑
*
* @param params 参数集合
* @return 响应结果
*/
Map<String, Object> execute(Map<String, Object> params);
}

View File

@ -1,29 +0,0 @@
package com.engine.recruit.service;
import java.util.Map;
/**
* <p>聚才林招聘</p>
* 招聘流程接口
*
* @author:dxfeng
* @createTime: 2023/09/22
* @version: 1.0
*/
public interface RecruitFlowService {
/**
* 获取当前阶段操作按钮
*
* @param param 参数
* @return 操作按钮
*/
Map<String, Object> getButtonList(Map<String, Object> param);
/**
* 获取招聘阶段信息
*
* @param param 参数
* @return 招聘阶段
*/
Map<String, Object> getRecruitStepList(Map<String, Object> param);
}

View File

@ -1,20 +0,0 @@
package com.engine.recruit.service;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/10/09
* @version: 1.0
*/
public interface RecruitPositionService {
/**
* 更新职位信息
*
* @param param
* @return
*/
Map<String, Object> updatePostInfo(Map<String, Object> param);
}

View File

@ -1,19 +0,0 @@
package com.engine.recruit.service;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2024/03/27
* @version: 1.0
*/
public interface RecruitScheduleService {
/**
* 立即运行计划任务(跳过分权判断)
*
* @param param
* @return
*/
Map<String, Object> immediatelyRun(Map<String, Object> param);
}

View File

@ -1,19 +0,0 @@
package com.engine.recruit.service;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/10/27
* @version: 1.0
*/
public interface RpaJclService {
/**
* 配置简历采集邮箱设置
*
* @param param 前段传参
* @return
*/
Map<String, Object> setEmailSetting(Map<String, Object> param);
}

View File

@ -1,27 +0,0 @@
package com.engine.recruit.service;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/10/20
* @version: 1.0
*/
public interface TalentPoolService {
/**
* 移出黑名单
*
* @param param
* @return
*/
Map<String, Object> removeBlacklist(Map<String, Object> param);
/**
* 创建新应聘者
*
* @param param
* @return
*/
Map<String, Object> createNewApplicant(Map<String, Object> param);
}

View File

@ -1,72 +0,0 @@
package com.engine.recruit.service;
import com.engine.recruit.entity.workbench.OptionVO;
import com.engine.recruit.entity.workbench.RecruitPortalCommonVO;
import java.util.List;
/**
* @Author liang.cheng
* @Date 2023/10/18 4:43 PM
* @Description:
* @Version 1.0
*/
public interface WorkBenchPortalService {
/**
* @Description: 顶部元素
* @Author: liang.cheng
* @Date: 2023/10/19 10:47 AM
* @param: []
* @return: com.engine.recruit.entity.workbench.RecruitPortalCommonVO
*/
List<RecruitPortalCommonVO> getRecruitPortalTop();
/**
* @Description: 职位年限要求分布
* @Author: liang.cheng
* @Date: 2023/10/19 3:15 PM
* @param: []
* @return: com.engine.recruit.entity.workbench.OptionVO
*/
OptionVO getJobTenure();
/**
* @Description: 候选中应聘者各阶段数
* @Author: liang.cheng
* @Date: 2023/10/20 9:35 AM
* @param: []
* @return: com.engine.recruit.entity.workbench.OptionVO
*/
OptionVO getWaitStepPerson();
/**
* @Description: 招聘转化
* @Author: liang.cheng
* @Date: 2023/10/20 10:04 AM
* @param: []
* @return: com.engine.recruit.entity.workbench.OptionVO
*/
OptionVO getRecruitTransform();
/**
* @Description: 人才来源
* @Author: liang.cheng
* @Date: 2023/10/20 11:07 AM
* @param: []
* @return: com.engine.recruit.entity.workbench.OptionVO
*/
OptionVO getPeopleFrom();
/**
* @Description: 招聘进度
* @Author: liang.cheng
* @Date: 2023/10/23 11:07 AM
* @param: []
* @return:
*/
List<RecruitPortalCommonVO> getRecruitProgress();
}

View File

@ -1,20 +0,0 @@
package com.engine.recruit.service;
import com.engine.recruit.entity.workplan.WorkPlanCreateParams;
/**
* @Author liang.cheng
* @Date 2023/10/17 10:50 AM
* @Description: TODO
* @Version 1.0
*/
public interface WorkPlanSerivice {
/**
* @Description: 面试操作日程
* @Author: liang.cheng
* @Date: 2023/10/17 11:03 AM
*/
void operate(WorkPlanCreateParams workPlanCreateParams);
}

View File

@ -1,688 +0,0 @@
package com.engine.recruit.service.impl;
import cn.hutool.core.convert.Convert;
import com.engine.core.impl.Service;
import com.engine.recruit.conn.*;
import com.engine.recruit.entity.record.ApplicantRecordPo;
import com.engine.recruit.entity.resume.OcrResumePo;
import com.engine.recruit.enums.ApplicantOperateEnum;
import com.engine.recruit.enums.ApplicationStatusEnum;
import com.engine.recruit.enums.RecordOperateEnum;
import com.engine.recruit.exception.CustomizeRunTimeException;
import com.engine.recruit.service.ApplicantResumeService;
import com.engine.recruit.util.RecruitUtil;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.common.DateUtil;
import weaver.conn.RecordSet;
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
import weaver.formmode.setup.ModeRightInfo;
import weaver.general.Util;
import weaver.hrm.resource.ResourceComInfo;
import java.util.*;
/**
* @author:dxfeng
* @createTime: 2023/09/20
* @version: 1.0
*/
public class ApplicantResumeServiceImpl extends Service implements ApplicantResumeService {
@Override
public Map<String, Object> getApplicantsName(String ids) {
Map<String, Object> returnMap = new HashMap<>(1);
RecordSet rs = new RecordSet();
String[] split = ids.split(",");
List<Map<String, Object>> list = new ArrayList<>();
for (String id : split) {
rs.executeQuery("select xm from uf_jcl_yppc where id = ?", id);
if (rs.next()) {
Map<String, Object> rowMap = new HashMap<>();
rowMap.put("id", id);
rowMap.put("name", rs.getString("xm"));
list.add(rowMap);
}
}
returnMap.put("rows", list);
return returnMap;
}
@Override
public Map<String, Object> getInterviewInfoById(String id) {
Map<String, Object> returnMap = new HashMap<>(16);
String sql = "select a.ypz,b.xm,a.ypzw,b.tdsj,b.sjhm,b.dzyx,a.msfs,a.mshj ,a.msc,a.msg ,a.ptmsg,a.msrq,a.msdd ,a.msfkr from uf_jcl_ms a inner join uf_jcl_yppc b on a.ypz = b.id where a.id = ?";
RecordSet rs = new RecordSet();
rs.executeQuery(sql, id);
if (rs.next()) {
// 应聘者
returnMap.put("ypz", createApplicantBrowserMap(rs.getString("ypz"), rs.getString("xm")));
// 应聘职位
returnMap.put("ypzw", createAppliedPositionBrowserMap(rs.getString("ypzw")));
// 投递时间
returnMap.put("tdsj", createApplicantBrowserMap(rs.getString("tdsj")));
// 手机号码
returnMap.put("sjhm", createApplicantBrowserMap(rs.getString("sjhm")));
// 电子邮箱
returnMap.put("dzyx", createApplicantBrowserMap(rs.getString("dzyx")));
// 面试方式
returnMap.put("msfs", createApplicantBrowserMap(rs.getString("msfs")));
// 面试环节
returnMap.put("mshj", createApplicantBrowserMap(rs.getString("mshj")));
// 面试轮次
returnMap.put("msc", createApplicantBrowserMap(rs.getString("msc")));
// 面试官
returnMap.put("msg", createResourceBrowserMap(rs.getString("msg")));
// 陪同面试官
returnMap.put("ptmsg", createResourceBrowserMap(rs.getString("ptmsg")));
// 面试日期
returnMap.put("msrq", createApplicantBrowserMap(rs.getString("msrq")));
// 面试地址
returnMap.put("msdd", createApplicantBrowserMap(rs.getString("msdd")));
}
return returnMap;
}
@Override
public Map<String, Object> getDisplayLayoutId(Map<String, Object> params) {
Map<String, Object> returnMap = new HashMap<>();
String layoutId = Util.null2String(params.get("layoutid"));
String modeId = Util.null2String(params.get("modeId"));
returnMap.put("layoutId", layoutId);
RecordSet rs = new RecordSet();
rs.executeQuery("select layoutname from modehtmllayout where modeid = ? and id = ?", modeId, layoutId);
if (rs.next()) {
String layoutName = rs.getString("layoutname");
// 获取相同名称的显示布局ID
rs.executeQuery("select id from modehtmllayout where type = 0 and modeid = ? and layoutname =?", modeId, layoutName);
if (rs.next()) {
returnMap.put("layoutId", rs.getString("id"));
}
}
return returnMap;
}
@Override
public Map<String, Object> getTabCount(Map<String, Object> params) {
Map<String, Object> returnMap = new HashMap<>();
String billId = Util.null2String(params.get("billid"));
List<Integer> countList = new ArrayList<>();
RecordSet rs = new RecordSet();
// 部门筛选反馈
rs.executeQuery("select count(id) as num from uf_jcl_bmsxfk where ypz = ?", billId);
if (rs.next()) {
countList.add(rs.getInt("num"));
}
// 笔试
rs.executeQuery("select count(id) as num from uf_jcl_bs where ypz = ?", billId);
if (rs.next()) {
countList.add(rs.getInt("num"));
}
// 面试
rs.executeQuery("select count(id) as num from uf_jcl_ms where ypz = ?", billId);
if (rs.next()) {
countList.add(rs.getInt("num"));
}
// 背调
rs.executeQuery("select count(id) as num from uf_jcl_bd where ypz = ?", billId);
if (rs.next()) {
countList.add(rs.getInt("num"));
}
// 薪酬谈判
rs.executeQuery("select count(id) as num from uf_jcl_xctp where ypz = ?", billId);
if (rs.next()) {
countList.add(rs.getInt("num"));
}
// 历史投递记录
rs.executeQuery("select xm,sjhm from uf_jcl_yppc where id = ?", billId);
if (rs.next()) {
rs.executeQuery("select count(id) as num from uf_jcl_yppc where xm=? and sjhm =?", rs.getString("xm"), rs.getString("sjhm"));
if (rs.next()) {
countList.add(rs.getInt("num"));
}
} else {
countList.add(0);
}
returnMap.put("countList", countList);
return returnMap;
}
@Override
public Map<String, Object> updateApplicantsInfo(Map<String, Object> params) {
Map<String, Object> returnMap = new HashMap<>();
String operateType = Util.null2String(params.get("operateType"));
RecordSet rs = new RecordSet();
if (ApplicantOperateEnum.ELIMINATE.getOperateType().equals(operateType)) {
// 淘汰
String ids = Util.null2String(params.get("ids"));
rs.executeUpdate("update uf_jcl_yppc set zt = ? where id in (" + ids + ")", ApplicationStatusEnum.OBSOLETE.getValue());
// 插入应聘过程
String dateTime = DateUtil.getDateTime();
for (String s : ids.split(",")) {
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
.billId(s)
.operateTime(dateTime)
.user(user)
.recordOperateType(RecordOperateEnum.ELIMINATE)
.build();
recordPo.execute();
}
returnMap.put("msg", "操作成功");
} else if (ApplicantOperateEnum.TRANSFER.getOperateType().equals(operateType)) {
// 转移阶段
String dqypjd = Util.null2String(params.get("dqypjd"));
String billid = Util.null2String(params.get("billid"));
Map<String, Object> otherParam = new HashMap<>();
otherParam.put("sourceStep", ApplicantCommonInfo.getCurrentStep(billid).getDescription());
// 查询当前阶段的阶段类型
rs.executeQuery("select jdlx from uf_jcl_zpjdsz where id = ?", dqypjd);
if (rs.next()) {
String jdlx = rs.getString("jdlx");
rs.executeUpdate("update uf_jcl_yppc set zpjd = ?,dqypjd = ? where id = ?", dqypjd, jdlx, billid);
returnMap.put("msg", "操作成功");
} else {
throw new CustomizeRunTimeException("转移阶段失败");
}
otherParam.put("targetStep", ApplicantCommonInfo.getCurrentStep(billid).getDescription());
// 插入应聘过程
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
.billId(billid)
.operateTime(DateUtil.getDateTime())
.user(user)
.recordOperateType(RecordOperateEnum.TRANSFER_STAGE)
.otherParam(otherParam)
.build();
recordPo.execute();
} else if (ApplicantOperateEnum.ASSIGN.getOperateType().equals(operateType)) {
// 分配职位
String billid = Util.null2String(params.get("billid"));
String ypzw = Util.null2String(params.get("ypzw"));
if (StringUtils.isBlank(ypzw)) {
throw new CustomizeRunTimeException("应聘职位不可为空");
}
String flowId = PositionCommonInfo.getRecruitFlowId(ypzw);
Map<String, String> initialStage = ApplicantCommonInfo.getInitialStage(flowId);
String zpjd = "";
String dqypjd = "";
if (null != initialStage) {
zpjd = initialStage.get("zpjd");
dqypjd = initialStage.get("jdlx");
}
rs.executeUpdate("update uf_jcl_yppc set ypzw = ? , zplc = ? , zpjd = ? , dqypjd = ?, zt = 1 where id = ?", ypzw, flowId, zpjd, dqypjd, billid);
returnMap.put("msg", "操作成功");
} else if (ApplicantOperateEnum.ARCHIVE.getOperateType().equals(operateType)) {
// 归档人才库
String gdyy = Util.null2String(params.get("gdyy"));
String gdxxyy = Util.null2String(params.get("gdxxyy"));
String ids = Util.null2String(params.get("ids"));
if (StringUtils.isNotBlank(ids)) {
String[] split = ids.split(",");
String dateTime = DateUtil.getDateTime();
for (String id : split) {
rs.executeUpdate("update uf_jcl_yppc set gdyy = ?,gdxxyy = ? where id = ? ", gdyy, gdxxyy, id);
// 建模推送建模
archiveTalentPool(id, false, "");
// 更新应聘状态为已归档
rs.executeUpdate("update uf_jcl_yppc set zt = ? where id = ? ", ApplicationStatusEnum.ARCHIVED.getValue(), id);
// 插入应聘过程
Map<String, Object> otherParam = new HashMap<>();
otherParam.put("gdyy", gdyy);
otherParam.put("gdxxyy", gdxxyy);
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
.billId(id)
.operateTime(dateTime)
.user(user)
.recordOperateType(RecordOperateEnum.ARCHIVE_TALENT_POOL)
.otherParam(otherParam)
.build();
recordPo.execute();
}
} else {
throw new CustomizeRunTimeException("请至少选择一条数据");
}
} else if (ApplicantOperateEnum.REFERRAL.getOperateType().equals(operateType)) {
// 转推其他职位
String sourceId = Util.null2String(params.get("sourceId"));
String ypzw = Util.null2String(params.get("ypzw"));
rs.executeQuery("select * from uf_jcl_yppc where id = ?", sourceId);
Map<String, Object> mainDataMap = RecruitRecordSet.getSingleRecordMap(rs);
// 构建新数据
mainDataMap.put("ypzw", ypzw);
String flowId = PositionCommonInfo.getRecruitFlowId(ypzw);
Map<String, String> initialStage = ApplicantCommonInfo.getInitialStage(flowId);
if (null != initialStage) {
String zpjd = initialStage.get("zpjd");
String dqypjd = initialStage.get("jdlx");
if (StringUtils.isNotBlank(zpjd) && StringUtils.isNotBlank(dqypjd)) {
mainDataMap.put("zplc", flowId);
mainDataMap.put("zpjd", zpjd);
mainDataMap.put("dqypjd", dqypjd);
}
}
mainDataMap.put("zt", ApplicationStatusEnum.CANDIDATE.getValue());
RecruitRecordSet.buildModeInsertFields(mainDataMap, user.getUID());
String uuid = UUID.randomUUID().toString();
mainDataMap.put("modeuuid", uuid);
// 移除不需要插入的字段
mainDataMap.remove("id");
mainDataMap.remove("requestId");
mainDataMap.remove("form_biz_id");
// 插入数据
RecruitRecordSet.insertData(mainDataMap, "uf_jcl_yppc");
// 权限重构
rs.executeQuery("select id,formmodeid from uf_jcl_yppc where modeuuid='" + uuid + "'");
if (rs.next()) {
//建模数据的id
int targetId = Util.getIntValue(rs.getString("id"));
int formModeId = Util.getIntValue(rs.getString("formmodeid"));
ModeRightInfo modeRightInfo = new ModeRightInfo();
modeRightInfo.setNewRight(true);
//新建的时候添加共享
modeRightInfo.editModeDataShare(user.getUID(), formModeId, targetId);
// 复制明细表数据
rs.executeUpdate("insert into uf_jcl_yppc_dt1 (mainid,xxmc,xl,zy,kssj,jssj) select ?,xxmc,xl,zy,kssj,jssj from uf_jcl_yppc_dt1 where mainid = ?", targetId, sourceId);
rs.executeUpdate("insert into uf_jcl_yppc_dt2 (mainid,gsmc,kssj,jssj,gw,sqyxk,lzyy,gzzz) select ?,gsmc,kssj,jssj,gw,sqyxk,lzyy,gzzz from uf_jcl_yppc_dt2 where mainid = ?", targetId, sourceId);
rs.executeUpdate("insert into uf_jcl_yppc_dt3 (mainid,xmmc,kssj,jssj,drjs,xmms) select ?,xmmc,kssj,jssj,drjs,xmms from uf_jcl_yppc_dt3 where mainid = ?", targetId, sourceId);
rs.executeUpdate("insert into uf_jcl_yppc_dt4 (mainid,yylx,zwcd) select ?,yylx,zwcd from uf_jcl_yppc_dt4 where mainid = ?", targetId, sourceId);
}
}
return returnMap;
}
@Override
public Map<String, Object> fullOriginalResumeId(Map<String, Object> params) {
Map<String, Object> returnMap = new HashMap<>();
int imageFileId = Convert.toInt(params.get("imageFileId"));
int resumeId = Convert.toInt(params.get("resumeId"));
int secCategory = Convert.toInt(RecruitModeUtil.getRecruitPropValue("APPLICANTS_RESUMES_CATEGORY"));
RecordSet rs = new RecordSet();
try {
int docId = RecruitModeUtil.createDocId(secCategory, imageFileId, user);
// 更新原始简历信息
rs.executeUpdate("update uf_jcl_jlzjb set jlfj=?,ocr=1 where id = ?", docId, resumeId);
// 简历入库并返回展示的应聘者简历ID
rs.executeQuery("select id,xm, xb, csrq, jg, yx, wx, qq, xjzd, ah, grys , jyjl , bysj , zgxl , zyjn , sxjl , yysp , zs, gzjl, ypzw, gzjy, xmjl, sjhm, nl, sfz, jlfj from uf_jcl_jlzjb where ocr = 1 and cqzt is null and id = ?", resumeId);
Map<String, Object> recordMap = RecruitRecordSet.getSingleRecordMap(rs);
OcrResumePo ocrResumePo = RecruitUtil.parseMap2Object(recordMap, OcrResumePo.class);
RecruitDataMap<Object> dataMap = buildApplicantMap(ocrResumePo);
// 校验简历信息并插入
Map<String, Object> map = CheckRepeatResume.getInstance().insertResumeAndReturn(dataMap);
rs.executeUpdate("update uf_jcl_jlzjb set cqzt = 1 where id = ? ", ocrResumePo.getId());
String mainId = Util.null2String(map.get("mainId"));
String sourceId = Util.null2String(map.get("sourceId"));
returnMap.put("mainId", StringUtils.isNotBlank(sourceId) ? sourceId : mainId);
returnMap.put("sourceId", sourceId);
} catch (Exception e) {
throw new RuntimeException(e);
}
return returnMap;
}
@Override
public Map<String, Object> checkRepeatResume(Map<String, Object> param) {
String name = Util.null2String(param.get("xm"));
String mobile = Util.null2String(param.get("sjhm"));
String positionId = Util.null2String(param.get("ypzw"));
String billId = Util.null2String(param.get("billid"));
Map<String, Object> returnMap = new HashMap<>();
// 判断是否黑名单
boolean joinBlackList = CheckRepeatResume.joinBlackList(name, mobile);
if (joinBlackList) {
throw new CustomizeRunTimeException("保存失败,当前录入应聘者为黑名单人员");
}
List<Map<String, Object>> repeatPositionResumeList = CheckRepeatResume.getRepeatPositionResumeList(name, mobile, positionId, billId);
if (CollectionUtils.isNotEmpty(repeatPositionResumeList)) {
if (StringUtils.isBlank(positionId)) {
throw new CustomizeRunTimeException("保存失败,该人员已有待分配状态数据");
}
throw new CustomizeRunTimeException("保存失败,该人员已有相同的应聘中的职位");
}
return returnMap;
}
/**
* 构建普通数据格式
*
* @param value
* @return
*/
private Map<String, Object> createApplicantBrowserMap(String value) {
if (StringUtils.isBlank(value)) {
return null;
}
Map<String, Object> browserMap = new HashMap<>(1);
browserMap.put("value", value);
return browserMap;
}
/**
* 构建应聘者浏览按钮值
*
* @param id
* @param name
* @return
*/
private Map<String, Object> createApplicantBrowserMap(String id, String name) {
Map<String, Object> browserMap = new HashMap<>(2);
if (StringUtils.isBlank(id)) {
return browserMap;
}
browserMap.put("value", id);
List<Map<String, Object>> objList = new ArrayList<>();
Map<String, Object> obj = new HashMap<>(2);
obj.put("id", id);
obj.put("name", name);
objList.add(obj);
browserMap.put("specialobj", objList);
return browserMap;
}
/**
* 构建应聘职位浏览按钮
*
* @param id
* @return
*/
private Map<String, Object> createAppliedPositionBrowserMap(String id) {
Map<String, Object> browserMap = new HashMap<>(2);
if (StringUtils.isBlank(id)) {
return browserMap;
}
browserMap.put("value", id);
RecordSet rs = new RecordSet();
rs.executeQuery("select zpzwmc from uf_jcl_zp_zpzw where id = ?", id);
if (rs.next()) {
List<Map<String, Object>> objList = new ArrayList<>();
Map<String, Object> obj = new HashMap<>(2);
obj.put("id", id);
obj.put("name", rs.getString("zpzwmc"));
objList.add(obj);
browserMap.put("specialobj", objList);
}
return browserMap;
}
/**
* 构建人员浏览按钮值
*
* @param ids
* @return
*/
private Map<String, Object> createResourceBrowserMap(String ids) {
Map<String, Object> browserMap = new HashMap<>(2);
if (StringUtils.isBlank(ids)) {
return browserMap;
}
browserMap.put("value", ids);
List<Map<String, Object>> objList = new ArrayList<>();
String[] split = ids.split(",");
try {
ResourceComInfo resourceComInfo = new ResourceComInfo();
for (String s : split) {
Map<String, Object> obj = new HashMap<>(2);
obj.put("id", s);
obj.put("name", resourceComInfo.getLastname(s));
objList.add(obj);
}
} catch (Exception e) {
throw new RuntimeException(e);
}
browserMap.put("specialobj", objList);
return browserMap;
}
/**
* 归档人才库
*
* @param applicantId 应聘者ID
* @param joinBlacklist 是否加入黑名单
* @param gdyy 归档原因
*/
public void archiveTalentPool(String applicantId, boolean joinBlacklist, String gdyy) {
RecordSet rs = new RecordSet();
String name = "";
String mobile = "";
String talentPoolId = "";
rs.executeQuery("select xm,sjhm from uf_jcl_yppc where id = ?", applicantId);
if (rs.next()) {
name = rs.getString("xm");
mobile = rs.getString("sjhm");
}
rs.executeQuery("select id from uf_jcl_rck where xm = ? and sjhm = ?", name, mobile);
if (rs.next()) {
talentPoolId = rs.getString("id");
}
// 推送建模主表数据
Map<String, Object> dataMap = new RecruitDataMap<>();
String uuid = UUID.randomUUID().toString();
dataMap.put("modeuuid", uuid);
int formModeId = ApplicantCommonInfo.getModeIdByTableName("uf_jcl_rck");
dataMap.put("formmodeid", formModeId);
// 构建建模表基本数据
RecruitRecordSet.buildModeInsertFields(dataMap, user.getUID());
rs.executeQuery("select * from uf_jcl_yppc where id = ?", applicantId);
if (rs.next()) {
dataMap.put("sfz", RecruitModeUtil.parseBlankToNull(rs.getString("sfz")));
dataMap.put("jlzp", RecruitModeUtil.parseBlankToNull(rs.getString("jlzp")));
dataMap.put("zhypzw", RecruitModeUtil.parseBlankToNull(rs.getString("ypzw")));
dataMap.put("ysjl", RecruitModeUtil.parseBlankToNull(rs.getString("ysjl")));
dataMap.put("jlly", RecruitModeUtil.parseBlankToNull(rs.getString("jlly")));
dataMap.put("xm", RecruitModeUtil.parseBlankToNull(rs.getString("xm")));
dataMap.put("xb", RecruitModeUtil.parseBlankToNull(rs.getString("xb")));
dataMap.put("sjhm", RecruitModeUtil.parseBlankToNull(rs.getString("sjhm")));
dataMap.put("dzyx", RecruitModeUtil.parseBlankToNull(rs.getString("dzyx")));
dataMap.put("csrq", RecruitModeUtil.parseBlankToNull(rs.getString("csrq")));
dataMap.put("nl", RecruitModeUtil.parseBlankToNull(rs.getString("nl")));
dataMap.put("zgxl", RecruitModeUtil.parseBlankToNull(rs.getString("zgxl")));
dataMap.put("zgxw", RecruitModeUtil.parseBlankToNull(rs.getString("zgxw")));
dataMap.put("byyx", RecruitModeUtil.parseBlankToNull(rs.getString("byyx")));
dataMap.put("zy", RecruitModeUtil.parseBlankToNull(rs.getString("zy")));
dataMap.put("hyzk", RecruitModeUtil.parseBlankToNull(rs.getString("hyzk")));
dataMap.put("gzjy", RecruitModeUtil.parseBlankToNull(rs.getString("gzjy")));
dataMap.put("zzzt", RecruitModeUtil.parseBlankToNull(rs.getString("zzzt")));
dataMap.put("dqszd", RecruitModeUtil.parseBlankToNull(rs.getString("dqszd")));
dataMap.put("zhtdsj", RecruitModeUtil.parseBlankToNull(rs.getString("tdsj")));
dataMap.put("cjr", RecruitModeUtil.parseBlankToNull(rs.getString("cjr")));
dataMap.put("zwpj", RecruitModeUtil.parseBlankToNull(rs.getString("zwpj")));
dataMap.put("mz", RecruitModeUtil.parseBlankToNull(rs.getString("mz")));
dataMap.put("jg", RecruitModeUtil.parseBlankToNull(rs.getString("jg")));
dataMap.put("zzmm", RecruitModeUtil.parseBlankToNull(rs.getString("zzmm")));
dataMap.put("sgcm", RecruitModeUtil.parseBlankToNull(rs.getString("sgcm")));
dataMap.put("tzkg", RecruitModeUtil.parseBlankToNull(rs.getString("tzkg")));
// 归档阶段
dataMap.put("gdjd", RecruitModeUtil.parseBlankToNull(rs.getString("dqypjd")));
dataMap.put("gdyy", RecruitModeUtil.parseBlankToNull(rs.getString("gdyy")));
dataMap.put("gdxxyy", RecruitModeUtil.parseBlankToNull(rs.getString("gdxxyy")));
}
// 历史投递次数
rs.executeQuery("select count(id) as num from uf_jcl_yppc where xm=? and sjhm =?", rs.getString("xm"), rs.getString("sjhm"));
if (rs.next()) {
dataMap.put("lstdcs", rs.getInt("num"));
}
// 是否加入黑名单
if (joinBlacklist) {
dataMap.put("sfjrhmd", 0);
// 归档原因黑名单
dataMap.put("gdyy", 16);
} else {
dataMap.put("sfjrhmd", 1);
}
if (StringUtils.isNotBlank(gdyy)) {
dataMap.put("gdyy", gdyy);
dataMap.put("gdxxyy", "");
}
RecruitRecordSet.insertData(dataMap, "uf_jcl_rck");
refreshRight(uuid, formModeId, applicantId);
// 删除人才库原来的数据
rs.executeUpdate("delete from uf_jcl_rck where id = ? ", talentPoolId);
rs.executeUpdate("delete from uf_jcl_rck_dt1 where mainid = ? ", talentPoolId);
rs.executeUpdate("delete from uf_jcl_rck_dt2 where mainid = ? ", talentPoolId);
rs.executeUpdate("delete from uf_jcl_rck_dt3 where mainid = ? ", talentPoolId);
rs.executeUpdate("delete from uf_jcl_rck_dt4 where mainid = ? ", talentPoolId);
}
/**
* 权限重构
*
* @param uuid UUID
* @param formModeId 建模ID
* @param applicantId 应聘者ID
*/
private void refreshRight(String uuid, int formModeId, String applicantId) {
RecordSet rs = new RecordSet();
rs.executeQuery("select id from uf_jcl_rck where modeuuid='" + uuid + "'");
if (rs.next()) {
//建模数据的id
int bid = Util.getIntValue(rs.getString("id"));
ModeRightInfo modeRightInfo = new ModeRightInfo();
modeRightInfo.setNewRight(true);
//新建的时候添加共享
modeRightInfo.editModeDataShare(user.getUID(), formModeId, bid);
// 插入明细表数据
rs.executeQuery("select * from uf_jcl_yppc_dt1 where mainid = ? ", applicantId);
List<List<Object>> insertList = new ArrayList<>();
while (rs.next()) {
List<Object> paramList = new ArrayList<>();
// mainid
paramList.add(bid);
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("xxmc")));
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("xl")));
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("zy")));
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("kssj")));
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("jssj")));
insertList.add(paramList);
}
for (List<Object> list : insertList) {
rs.executeUpdate("insert into uf_jcl_rck_dt1 (mainid, xxmc, xl, zy, kssj, jssj) values (?, ?, ?, ?, ?, ?)", list);
}
rs.executeQuery("select * from uf_jcl_yppc_dt2 where mainid = ? ", applicantId);
insertList = new ArrayList<>();
while (rs.next()) {
List<Object> paramList = new ArrayList<>();
// mainid
paramList.add(bid);
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("gsmc")));
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("kssj")));
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("jssj")));
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("gw")));
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("gzzz")));
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("sqyxk")));
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("lzyy")));
insertList.add(paramList);
}
for (List<Object> list : insertList) {
rs.executeUpdate("insert into uf_jcl_rck_dt2 (mainid, gsmc, kssj, jssj, gw, gzzz, sqyxk, lzyy) values (?, ?, ?, ?, ?, ?, ?, ?)", list);
}
rs.executeQuery("select * from uf_jcl_yppc_dt3 where mainid = ? ", applicantId);
insertList = new ArrayList<>();
while (rs.next()) {
List<Object> paramList = new ArrayList<>();
// mainid
paramList.add(bid);
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("xmmc")));
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("kssj")));
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("jssj")));
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("drjs")));
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("xmms")));
insertList.add(paramList);
}
for (List<Object> list : insertList) {
rs.executeUpdate("insert into uf_jcl_rck_dt3 (mainid, xmmc, kssj, jssj, drjs, xmms) values (?, ?, ?, ?, ?, ?)", list);
}
rs.executeQuery("select * from uf_jcl_yppc_dt4 where mainid = ? ", applicantId);
insertList = new ArrayList<>();
while (rs.next()) {
List<Object> paramList = new ArrayList<>();
// mainid
paramList.add(bid);
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("yylx")));
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("zwcd")));
insertList.add(paramList);
}
for (List<Object> list : insertList) {
rs.executeUpdate("insert into uf_jcl_rck_dt4 (mainid, yylx, zwcd) values (?, ?, ?)", list);
}
}
}
/**
* 构建应聘者数据集合
*
* @param ocrResumePo
* @return
*/
private RecruitDataMap<Object> buildApplicantMap(OcrResumePo ocrResumePo) {
RecruitDataMap<Object> insertMap = new RecruitDataMap<>();
// 姓名
insertMap.put("xm", ocrResumePo.getXm());
// 电子邮箱
insertMap.put("dzyx", ocrResumePo.getYx());
// 年龄
insertMap.put("nl", ocrResumePo.getNl());
// 手机号码
insertMap.put("sjhm", ocrResumePo.getSjhm());
// 自我评价
insertMap.put("zwpj", ocrResumePo.getGrys());
// 身份证号
insertMap.put("sfz", ocrResumePo.getSfz());
// 原始简历
insertMap.put("ysjl", ocrResumePo.getJlfj());
// 性别
insertMap.put("xb", ocrResumePo.getXb());
// 投递时间
insertMap.put("tdsj", DateUtil.getDateTime());
String zt = ApplicationStatusEnum.DISTRIBUTION.getValue();
// 应聘职位
//String ypzw = ocrResumePo.getYpzw();
//if (StringUtils.isNotBlank(ypzw)) {
// String flowId = PositionCommonInfo.getRecruitFlowId(ypzw);
// Map<String, String> initialStage = ApplicantCommonInfo.getInitialStage(flowId);
// if (null != initialStage) {
// String zpjd = initialStage.get("zpjd");
// String dqypjd = initialStage.get("jdlx");
// if (StringUtils.isNotBlank(zpjd) && StringUtils.isNotBlank(dqypjd)) {
// insertMap.put("ypzw", ypzw);
// insertMap.put("zplc", flowId);
// insertMap.put("zpjd", zpjd);
// insertMap.put("dqypjd", dqypjd);
// zt = ApplicationStatusEnum.CANDIDATE.getValue();
// }
// }
//}
// 应聘状态
insertMap.put("zt", zt);
return insertMap;
}
}

View File

@ -1,41 +0,0 @@
package com.engine.recruit.service.impl;
import com.engine.core.impl.Service;
import com.engine.recruit.entity.record.ApplicantRecordPo;
import com.engine.recruit.enums.ApplicationStatusEnum;
import com.engine.recruit.enums.RecordOperateEnum;
import com.engine.recruit.service.RecruitButtonService;
import weaver.common.DateUtil;
import weaver.conn.RecordSet;
import weaver.general.Util;
import java.util.Map;
/**
* <p>聚才林招聘</p>
* "淘汰"按钮实现类
*
* @author:dxfeng
* @createTime: 2023/09/18
* @version: 1.0
*/
public class EliminateServiceImpl extends Service implements RecruitButtonService {
@Override
public Map<String, Object> execute(Map<String, Object> params) {
String billId = Util.null2String(params.get("billId"));
RecordSet rs = new RecordSet();
rs.executeUpdate("update uf_jcl_yppc set zt = ? where id = ? ", ApplicationStatusEnum.OBSOLETE.getValue(), billId);
// 插入应聘过程
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
.billId(billId)
.operateTime(DateUtil.getDateTime())
.user(user)
.recordOperateType(RecordOperateEnum.ELIMINATE)
.build();
recordPo.execute();
return null;
}
}

View File

@ -1,257 +0,0 @@
package com.engine.recruit.service.impl;
import com.engine.core.impl.Service;
import com.engine.recruit.conn.ApplicantCommonInfo;
import com.engine.recruit.conn.RecruitDataMap;
import com.engine.recruit.conn.RecruitRecordSet;
import com.engine.recruit.entity.record.ApplicantRecordPo;
import com.engine.recruit.enums.EntryStatusEnum;
import com.engine.recruit.enums.InfoCollectEnum;
import com.engine.recruit.enums.PositionOperateEnum;
import com.engine.recruit.enums.RecordOperateEnum;
import com.engine.recruit.exception.CustomizeRunTimeException;
import com.engine.recruit.service.InductionManageService;
import com.engine.recruit.util.RecruitMessageUtils;
import com.weaver.formmodel.data.model.Formfield;
import org.apache.commons.lang3.StringUtils;
import weaver.common.DateUtil;
import weaver.conn.RecordSet;
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
import weaver.general.Util;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author:dxfeng
* @createTime: 2023/10/23
* @version: 1.0
*/
public class InductionManageServiceImpl extends Service implements InductionManageService {
private static final String MOBILE_APPID_COLLECT = RecruitModeUtil.getRecruitPropValue("MOBILE_APPID_COLLECT");
@Override
public Map<String, Object> updateInductionManageInfo(Map<String, Object> param) {
String operateType = Util.null2String(param.get("operateType"));
if (PositionOperateEnum.PREPARE.getOperateType().equals(operateType)) {
// 发起入职准备
// 反填流程信息到建模表
}
return null;
}
@Override
public Map<String, Object> sendCollectInfo(Map<String, Object> param) {
String ids = Util.null2String(param.get("ids"));
String[] split = ids.split(",");
if (StringUtils.isBlank(MOBILE_APPID_COLLECT)) {
throw new CustomizeRunTimeException("未获取到对应移动建模ID请检查配置文件");
}
RecordSet rs = new RecordSet();
rs.executeQuery("select noLoginUser from mobileappbaseinfo where id = ?", MOBILE_APPID_COLLECT);
int creator = -1;
if (rs.next()) {
creator = rs.getInt("noLoginUser");
}
if (-1 == creator) {
throw new CustomizeRunTimeException("未配置免登陆访问用户,请检查移动建模应用配置");
}
// 查询信息采集模板内容
rs.executeQuery("select yjnr,mbmc from uf_jcl_yjtzmb where mblx = 3 and zt = 0");
String yjnr = "";
String mbmc = "";
if (rs.next()) {
yjnr = rs.getString("yjnr");
mbmc = rs.getString("mbmc");
}
if (StringUtils.isBlank(yjnr)) {
throw new CustomizeRunTimeException("未获取到信息采集邮件通知模板");
}
// 查询字段信息
List<Formfield> fieldList = RecruitModeUtil.getFieldList("uf_jcl_rzgl");
Map<String, List<Formfield>> fieldMapList = fieldList.stream().collect(Collectors.groupingBy(Formfield::getLabelName));
for (String billId : split) {
// 判断是否已发送信息采集已发送的不重复发送
rs.executeQuery("select xxcjid from uf_jcl_rzgl where id = ? ", billId);
if (rs.next()) {
if (StringUtils.isNotBlank(rs.getString("xxcjid"))) {
continue;
}
}
// 查询当前数据字段值
rs.executeQuery("select * from uf_jcl_rzgl where id = ? ", billId);
Map<String, Object> mainDataMap = RecruitRecordSet.getSingleRecordMap(rs);
// 根据入职管理信息完善信息采集表单
Map<String, Object> dataMap = new RecruitDataMap<>();
String uuid = UUID.randomUUID().toString();
dataMap.put("modeuuid", uuid);
int formModeId = ApplicantCommonInfo.getModeIdByTableName("uf_jcl_xxcj");
dataMap.put("formmodeid", formModeId);
// 构建建模表基本数据
RecruitRecordSet.buildModeInsertFields(dataMap, creator);
dataMap.put("xm", RecruitModeUtil.parseBlankToNull(mainDataMap.get("xm")));
dataMap.put("sfzh", RecruitModeUtil.parseBlankToNull(mainDataMap.get("sfzh")));
dataMap.put("nl", RecruitModeUtil.parseBlankToNull(mainDataMap.get("nl")));
dataMap.put("xb", RecruitModeUtil.parseBlankToNull(mainDataMap.get("xb")));
dataMap.put("sjh", RecruitModeUtil.parseBlankToNull(mainDataMap.get("sjhm")));
dataMap.put("yx", RecruitModeUtil.parseBlankToNull(mainDataMap.get("dzyx")));
// 生成登录密码
String password = generatePassword();
dataMap.put("mm", password);
dataMap.put("modedatastatus", "1");
// 插入数据
RecruitRecordSet.insertData(dataMap, "uf_jcl_xxcj");
int id = RecruitRecordSet.refreshRight(uuid, "uf_jcl_xxcj", formModeId, creator);
// 更新状态为已发送,反填信息采集ID
rs.executeUpdate("update uf_jcl_rzgl set xxcj = ? ,xxcjid = ? where id = ? ", InfoCollectEnum.HAS_SENT.getId(), id, billId);
// 发送短信
String mobile = Util.null2String(dataMap.get("sjh"));
String email = Util.null2String(dataMap.get("yx"));
String messageLink = RecruitModeUtil.getRecruitPropValue("COLLECT_MESSAGE_LINK");
//messageLink += "&billId=" + id;
yjnr = yjnr.replace("{链接地址}", messageLink);
yjnr = yjnr.replace("{初始密码}", password);
String msgContent = RecruitModeUtil.getReplaceContent(yjnr, fieldMapList, mainDataMap);
// 发送邮件
boolean sendEmail = RecruitMessageUtils.sendEmail(email, mbmc, msgContent);
// 发送短信
boolean sendSMS = RecruitMessageUtils.sendSMS(mobile, msgContent);
// 记录应聘过程
rs.executeQuery("select pcid from uf_jcl_rzgl where id = ? ", billId);
String pcid = "";
if (rs.next()) {
pcid = rs.getString("pcid");
}
Map<String, Object> otherParam = new HashMap<>();
otherParam.put("createName", user.getLastname());
otherParam.put("pcid", pcid);
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
.billId(String.valueOf(id))
.operateTime(DateUtil.getDateTime())
.modeId(String.valueOf(formModeId))
.formId(String.valueOf(ApplicantCommonInfo.getFormIdByTableName("uf_jcl_xxcj")))
.user(user)
.recordOperateType(RecordOperateEnum.INFO_COLLECT)
.otherParam(otherParam)
.build();
recordPo.execute();
}
return null;
}
@Override
public Map<String, Object> verifyIDCard(Map<String, Object> params) {
RecordSet rs = new RecordSet();
String sfzh = Util.null2String(params.get("sfzh"));
String rzzt = Util.null2String(params.get("rzzt"));
String billId = Util.null2String(params.get("billId"));
// 根据身份证号判定只能有一个状态为待入职的数据
if (EntryStatusEnum.PENDING.getValue().equals(rzzt)) {
rs.executeQuery("select count(id) as num from uf_jcl_rzgl where sfzh = ? and id != ? and rzzt = ? ", sfzh, billId, rzzt);
int countNum = 0;
if (rs.next()) {
countNum = rs.getInt("num");
}
if (countNum > 0) {
throw new CustomizeRunTimeException("当前身份证号已存在待入职状态数据");
}
}
return new HashMap<>();
}
@Override
public Map<String, Object> checkLoginInfo(Map<String, Object> param) {
RecordSet rs = new RecordSet();
HashMap<String, Object> map = new HashMap<>(2);
String mobile = Util.null2String(param.get("mobile"));
String pwd = Util.null2String(param.get("pwd"));
// 校验当前链接的有效期
rs.executeQuery("select * from uf_jcl_rzgl where sjhm = ? ", mobile);
if (rs.next()) {
// 当前关联入职已取消入职/已入职点击提示当前链接已失效且不可操作
String entryStatus = rs.getString("rzzt");
if ("1".equals(entryStatus) || "2".equals(entryStatus)) {
throw new CustomizeRunTimeException("当前链接已失效");
}
// 当前信息采集链接的地址默认有效期为发出日期预计入职日期
String date = rs.getString("yjrzrq");
int compDate = DateUtil.compDate(DateUtil.getCurrentDate(), date);
if (compDate < 0) {
throw new CustomizeRunTimeException("当前链接已失效");
}
}
rs.executeQuery("select id from uf_jcl_xxcj where sjh = ? and mm = ?", mobile, pwd);
if (rs.next()) {
map.put("id", Util.getIntValue(rs.getString("id")));
} else {
throw new CustomizeRunTimeException("手机号或密码错误");
}
return map;
}
@Override
public Map<String, Object> infoSubmit(String id) {
RecordSet rs = new RecordSet();
rs.executeQuery("update uf_jcl_rzgl set xxcj = 2 where id = ?", id);
return null;
}
/**
* 随机八位不重复登录密码含数字字母
*
* @return 登录密码
*/
private String generatePassword() {
String letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
String numbers = "0123456789";
String characters = letters + numbers;
List<Character> randomChars = new ArrayList<>();
Random random = new Random();
// 随机取得一个字母
randomChars.add(letters.charAt(random.nextInt(letters.length())));
// 随机取得一个数字
randomChars.add(numbers.charAt(random.nextInt(numbers.length())));
// 随机取得六个字符字母或数字
for (int i = 0; i < 6; i++) {
randomChars.add(characters.charAt(random.nextInt(characters.length())));
}
// 打乱字符的顺序
Collections.shuffle(randomChars);
// 将字符列表转为字符串
StringBuilder sb = new StringBuilder();
for (char c : randomChars) {
sb.append(c);
}
return sb.toString();
}
}

View File

@ -1,590 +0,0 @@
package com.engine.recruit.service.impl;
import com.engine.core.impl.Service;
import com.engine.recruit.conn.ApplicantCommonInfo;
import com.engine.recruit.conn.RecruitDataMap;
import com.engine.recruit.conn.RecruitRecordSet;
import com.engine.recruit.entity.init.po.*;
import com.engine.recruit.exception.CustomizeRunTimeException;
import com.engine.recruit.service.InitRecruitDataService;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.formmode.recruit.modeexpand.process.StageDataInsert;
import weaver.general.BaseBean;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author:dxfeng
* @createTime: 2023/11/22
* @version: 1.0
*/
public class InitRecruitDataServiceImpl extends Service implements InitRecruitDataService {
@Override
public Map<String, Object> checkInitStatus() {
RecordSet rs = new RecordSet();
rs.executeQuery("select id from uf_jcl_zplc");
if (rs.next()) {
throw new CustomizeRunTimeException("当前已存在招聘流程数据,无需重复初始化");
}
return null;
}
@Override
public Map<String, Object> initRecruitData() {
RecordSet rs = new RecordSet();
rs.executeUpdate("delete from uf_jcl_zplc;");
rs.executeUpdate("delete from uf_jcl_zpjdsz;");
rs.executeUpdate("delete from uf_jcl_zpjdsz_dt1;");
rs.executeUpdate("delete from uf_jcl_zpjdsz_dt2;");
rs.executeUpdate("delete from uf_jcl_lcczan;");
// 刷新页面菜单
rs.executeQuery("select * from hp_nonstandard_function_info where num='163' and name ='招聘管理'");
if (rs.next()) {
refreshMenuUrl();
}
// 插入操作按钮数据
int buttonModeId = ApplicantCommonInfo.getModeIdByTableName("uf_jcl_lcczan");
Map<String, Object> baseMap = new RecruitDataMap<>();
RecruitRecordSet.buildModeInsertFields(baseMap, 1);
List<OperateButtonPo> operateButtonList = insertButtonData(baseMap, buttonModeId);
Map<String, OperateButtonPo> operateButtonMap = operateButtonList.stream().collect(Collectors.toMap(OperateButtonPo::getButtonName, item -> item, (k1, k2) -> k1));
// 插入招聘阶段数据
int stageModeId = ApplicantCommonInfo.getModeIdByTableName("uf_jcl_zpjdsz");
insertStageData(baseMap, stageModeId, operateButtonMap);
// 创建内置流程
int flowModeId = ApplicantCommonInfo.getModeIdByTableName("uf_jcl_zplc");
insertFlowData(baseMap, flowModeId);
return null;
}
/**
* 更新招聘管理相关菜单地址
*/
private void refreshMenuUrl() {
Map<String, String> searchCodeMap = new HashMap<>();
searchCodeMap.put("招聘需求管理", "b129634bf72d46b8bed0291f84efd2e0");
searchCodeMap.put("招聘职位", "c024e527c964437bb568bebbb48d89a5");
searchCodeMap.put("应聘者", "1d48211cd1634b19bdc6f7df40cd1337");
searchCodeMap.put("筛选反馈", "b746e3cf80454289a3ade2b17147e297");
searchCodeMap.put("笔试结果", "1b56a7492fb84f2b9e5ae022fde333f0");
searchCodeMap.put("面试", "496ecc32a87045888f224ad3151e635b");
searchCodeMap.put("薪酬谈判", "ffe1bafcef5942f5853e68b76e5098d2");
searchCodeMap.put("背调", "33be832e81eb4cf5a5686213918e769b");
searchCodeMap.put("offer", "4d4d8f9761474333907bacb81d98fc3c");
searchCodeMap.put("人才库", "bdeb379900e5475c87306862dfb9d0b9");
searchCodeMap.put("简历库", "9bc41dbc69ee43a1976910008d7fdfe3");
searchCodeMap.put("工作地点", "af9c9eee65a84e82bf3a423506ef1f38");
searchCodeMap.put("数据字典类型名称", "034d7bcea5634e458854a1c70580ca6d");
searchCodeMap.put("邮件通知模板", "ea3b7ae0e3134c65be740eee629070af");
searchCodeMap.put("千里聆邮箱配置", "a97c0154ea5b43c8b17fc7a1dfdb195f");
searchCodeMap.put("我参与的面试", "b8c509d648124c068f11fca338b2eea2");
searchCodeMap.put("招聘流程列表", "32cea1924ceb45d8aa8622dbdf935a58");
searchCodeMap.put("招聘阶段列表", "06443dd4afa84831ae9d9c1b76450313");
searchCodeMap.put("操作按钮列表", "e14a2ce232d844239c00a0b3ead1af04");
Map<String, String> customPageMap = new HashMap<>();
customPageMap.put("入职管理", "073e0628016a46b588d76fdd872a7369");
Map<String, String> customTreeMap = new HashMap<>();
customTreeMap.put("数据字典树", "31717568fca8435f9e55eb08c1fbed4b");
List<String> menuSqlList = new ArrayList<>();
// 招聘需求
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("招聘需求管理")) + "' where id = " + 100189);
// 招聘职位
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("招聘职位")) + "' where id = " + 100190);
// 应聘者
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("应聘者")) + "' where id = " + 100192);
// 部门筛选
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("筛选反馈")) + "' where id = " + 100193);
// 笔试
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("笔试结果")) + "' where id = " + 100194);
// 面试
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("面试")) + "' where id = " + 100195);
// 薪酬谈判
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("薪酬谈判")) + "' where id = " + 100196);
// 背调
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("背调")) + "' where id = " + 100197);
// offer
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("offer")) + "' where id = " + 100198);
// 人才库
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("人才库")) + "' where id = " + 100200);
// 简历库
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("简历库")) + "' where id = " + 100201);
// 工作地点
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("工作地点")) + "' where id = " + 100203);
// 字段类型名称
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("数据字典类型名称")) + "' where id = " + 100205);
// 邮件通知模板
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("邮件通知模板")) + "' where id = " + 100206);
// 千里聆邮箱配置
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("千里聆邮箱配置")) + "' where id = " + 100207);
// 招聘需求
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("招聘需求管理")) + "' where id = " + 100209);
// 我的筛选
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("筛选反馈")) + "' where id = " + 100210);
// 我的面试
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("我参与的面试")) + "' where id = " + 100211);
// 招聘流程
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("招聘流程列表")) + "' where id = " + 100213);
// 招聘阶段
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("招聘阶段列表")) + "' where id = " + 100214);
// 操作按钮
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("操作按钮列表")) + "' where id = " + 100215);
// 入职管理
menuSqlList.add("update LeftMenuInfo set fullrouteurl= '/spa/cube/index.html#/main/cube/viewCustomPage?id=" + getCustomPageId("入职管理", customPageMap.get("入职管理")) + "&noTitleShow=1' where id = " + 100199);
// 数据字典
menuSqlList.add("update LeftMenuInfo set fullrouteurl= '/spa/cube/index.html#/main/cube/tree?id=" + getCustomTreeId(customTreeMap.get("数据字典树")) + "&noTitleShow=1' where id = " + 100204);
RecordSet rs = new RecordSet();
for (String sql : menuSqlList) {
new BaseBean().writeLog("招聘目录初始化SQL==" + sql);
rs.executeUpdate(sql);
}
}
/**
* 获取建模查询列表ID
*
* @param customSearchCode
* @return
*/
private String getCustomSearchId(String customSearchCode) {
RecordSet rs = new RecordSet();
rs.executeQuery("select id from mode_customsearch where customsearchcode = ? ", customSearchCode);
if (rs.next()) {
return rs.getString("id");
}
throw new CustomizeRunTimeException("招聘管理菜单初始化失败,请检查建模引擎查询列表配置[" + customSearchCode + "]");
}
/**
* 获取建模自定义页面ID
*
* @param customPageName 自定义页面名称
* @param customSearchCode
* @return
*/
private String getCustomPageId(String customPageName, String customSearchCode) {
RecordSet rs = new RecordSet();
rs.executeQuery("select appid from mode_customsearch where customsearchcode = ? ", customSearchCode);
if (rs.next()) {
String appId = rs.getString("appid");
rs.executeQuery("select id from mode_custompage where appid = ? and customname = ?", appId, customPageName);
if (rs.next()) {
return rs.getString("id");
}
}
throw new CustomizeRunTimeException("招聘管理菜单初始化失败,请检查建模引擎自定义页面配置[" + customPageName + "," + customSearchCode + "]");
}
/**
* 获取建模树ID
*
* @param treeCode
* @return
*/
private String getCustomTreeId(String treeCode) {
RecordSet rs = new RecordSet();
rs.executeQuery("select id from mode_customtree where treecode =? ", treeCode);
if (rs.next()) {
return rs.getString("id");
}
throw new CustomizeRunTimeException("招聘管理菜单初始化失败,请检查建模引擎树配置[" + treeCode + "]");
}
/**
* 插入初始化流程数据
*
* @param baseMap
* @param modeId
*/
private void insertFlowData(Map<String, Object> baseMap, int modeId) {
OperateFlowPo flowPo = OperateFlowPo.builder()
.lcmc("默认流程")
.lczt(0)
.ksjd(getStageIdByName("筛选"))
.gcjd(getStageIdByName("面试"))
.jsjd(getStageIdByName("offer"))
.build();
RecruitDataMap<Object> flowDataMap = new RecruitDataMap<>();
flowDataMap.putAll(baseMap);
String uuid = UUID.randomUUID().toString();
flowDataMap.put("modeuuid", uuid);
flowDataMap.put("formmodeid", modeId);
flowDataMap.put("lcmc", flowPo.getLcmc());
flowDataMap.put("lczt", flowPo.getLczt());
flowDataMap.put("ksjd", flowPo.getKsjd());
flowDataMap.put("gcjd", flowPo.getGcjd());
flowDataMap.put("jsjd", flowPo.getJsjd());
RecruitRecordSet.insertData(flowDataMap, "uf_jcl_zplc");
int billId = RecruitRecordSet.refreshRight(uuid, "uf_jcl_zplc", modeId, 1);
// 流程关联招聘阶段
StageDataInsert.relatedStageData(1, String.valueOf(billId), "zplc", flowPo.getKsjd(), flowPo.getGcjd(), flowPo.getJsjd());
}
/**
* 插入招聘阶段设置数据
*
* @param baseMap
* @param modeId
* @param operateButtonMap
*/
private void insertStageData(Map<String, Object> baseMap, int modeId, Map<String, OperateButtonPo> operateButtonMap) {
List<OperateStagePo> stageList = buildOperateStageList(operateButtonMap);
List<OperateStageDt2> dt2List = buildStageDt2Data();
for (OperateStagePo stage : stageList) {
RecruitDataMap<Object> stageDataMap = new RecruitDataMap<>();
stageDataMap.putAll(baseMap);
String uuid = UUID.randomUUID().toString();
stageDataMap.put("modeuuid", uuid);
stageDataMap.put("formmodeid", modeId);
stageDataMap.put("jdmc", stage.getJdmc());
stageDataMap.put("jdms", stage.getJdms());
stageDataMap.put("jdlx", stage.getJdlx());
stageDataMap.put("hj", stage.getHj());
stageDataMap.put("sfqy", 0);
stageDataMap.put("zplc", -1);
RecruitRecordSet.insertData(stageDataMap, "uf_jcl_zpjdsz");
int id = RecruitRecordSet.refreshRight(uuid, "uf_jcl_zpjdsz", modeId, 1);
stage.setId(id);
// 插入明细表1
List<OperateStageDt1> dt1 = stage.getDt1();
for (OperateStageDt1 stageDt1 : dt1) {
Map<String, Object> dt1Map = new RecruitDataMap<>();
dt1Map.put("mainid", id);
dt1Map.put("czan", stageDt1.getCzan());
dt1Map.put("zdyxsmc", stageDt1.getZdyxsmc());
dt1Map.put("tzymdz", stageDt1.getTzymdz());
dt1Map.put("sfqy", 0);
dt1Map.put("zssx", stageDt1.getZssx());
RecruitRecordSet.insertData(dt1Map, "uf_jcl_zpjdsz_dt1");
}
// 插入明细表2
for (OperateStageDt2 stageDt2 : dt2List) {
Map<String, Object> dt2Map = new RecruitDataMap<>();
dt2Map.put("mainid", id);
dt2Map.put("ymbt", stageDt2.getYmbt());
dt2Map.put("ymdz", stageDt2.getYmdz());
dt2Map.put("zssx", stageDt2.getZssx());
RecruitRecordSet.insertData(dt2Map, "uf_jcl_zpjdsz_dt2");
}
}
}
/**
* 构建招聘阶段设置明细表2数据集合
*
* @return
*/
private List<OperateStageDt2> buildStageDt2Data() {
List<OperateStageDt2> dt2List = new ArrayList<>();
dt2List.add(OperateStageDt2.builder()
.ymbt("基本信息")
.ymdz(getModeLink("/spa/cube/index.html#/main/cube/card?type=0&modeId={modeId}&formId={formId}&billid=$parentid$&opentype=0&isRecruitCard=true", "uf_jcl_yppc", "", ""))
.zssx(10)
.build());
dt2List.add(OperateStageDt2.builder()
.ymbt("部门筛选反馈")
.ymdz(getModeSearchUrl("/spa/cube/index.html#/main/cube/search?pcid=$parentid$&isRecruitCard=true&customid={customid}", "uf_jcl_bmsxfk", "筛选反馈-简历卡片"))
.zssx(20)
.build());
dt2List.add(OperateStageDt2.builder()
.ymbt("笔试")
.ymdz(getModeSearchUrl("/spa/cube/index.html#/main/cube/search?pcid=$parentid$&isRecruitCard=true&customid={customid}", "uf_jcl_bs", "笔试-简历卡片"))
.zssx(30)
.build());
dt2List.add(OperateStageDt2.builder()
.ymbt("面试")
.ymdz(getModeSearchUrl("/spa/cube/index.html#/main/cube/search?pcid=$parentid$&isRecruitCard=true&customid={customid}", "uf_jcl_ms", "面试-简历卡片"))
.zssx(40)
.build());
dt2List.add(OperateStageDt2.builder()
.ymbt("背调")
.ymdz(getModeSearchUrl("/spa/cube/index.html#/main/cube/search?pcid=$parentid$&isRecruitCard=true&customid={customid}", "uf_jcl_bd", "背调-简历卡片"))
.zssx(50)
.build());
dt2List.add(OperateStageDt2.builder()
.ymbt("薪酬谈判")
.ymdz(getModeSearchUrl("/spa/cube/index.html#/main/cube/search?pcid=$parentid$&isRecruitCard=true&customid={customid}", "uf_jcl_xctp", "薪酬谈判-简历卡片"))
.zssx(60)
.build());
dt2List.add(OperateStageDt2.builder()
.ymbt("历史投递记录")
.ymdz(getModeSearchUrl("/spa/cube/index.html#/main/cube/search?pcid=$parentid$&xm=$xm$&sjhm=$sjhm$&isRecruitCard=true&customid={customid}", "uf_jcl_yppc", "相关历史投递记录"))
.zssx(70)
.build());
dt2List.add(OperateStageDt2.builder()
.ymbt("备注")
.ymdz(getModeSearchUrl("/spa/cube/index.html#/main/cube/search?pcid=$parentid$&isRecruitCard=true&customid={customid}", "uf_jcl_bz", "备注-简历卡片"))
.zssx(80)
.build());
dt2List.add(OperateStageDt2.builder()
.ymbt("应聘过程")
.ymdz(getModeSearchUrl("/spa/cube/index.html#/main/cube/search?pcid=$parentid$&isRecruitCard=true&customid={customid}", "uf_jcl_ypgc", "应聘过程-简历卡片"))
.zssx(90)
.build());
return dt2List;
}
private List<OperateStagePo> buildOperateStageList(Map<String, OperateButtonPo> operateButtonMap) {
List<OperateStagePo> stageList = new ArrayList<>();
stageList.add(buildStagePo(OperateStagePo.builder().jdmc("筛选").jdms("筛选").jdlx(0).hj(0).build(),
operateButtonMap,
"进入下一阶段", "部门筛选", "淘汰", "转移阶段", "转推其他职位", "归档人才库", "添加备注", "加入黑名单"));
stageList.add(buildStagePo(OperateStagePo.builder().jdmc("笔试").jdms("笔试").jdlx(1).hj(1).build(),
operateButtonMap,
"进入下一阶段", "安排笔试", "转移阶段", "淘汰", "转推其他职位", "归档人才库", "添加备注", "加入黑名单"));
stageList.add(buildStagePo(OperateStagePo.builder().jdmc("面试").jdms("面试").jdlx(2).hj(1).build(),
operateButtonMap,
"进入下一阶段", "安排面试", "淘汰", "转移阶段", "转推其他职位", "归档人才库", "添加备注", "加入黑名单"));
stageList.add(buildStagePo(OperateStagePo.builder().jdmc("背调").jdms("背调").jdlx(5).hj(1).build(),
operateButtonMap,
"进入下一阶段", "背调结果登记", "淘汰", "转移阶段", "转推其他职位", "归档人才库", "添加备注", "加入黑名单"));
stageList.add(buildStagePo(OperateStagePo.builder().jdmc("薪酬谈判").jdms("薪酬谈判").jdlx(4).hj(1).build(),
operateButtonMap,
"进入下一阶段", "谈判记录登记", "淘汰", "转移阶段", "转推其他职位", "归档人才库", "添加备注", "加入黑名单"));
stageList.add(buildStagePo(OperateStagePo.builder().jdmc("offer").jdms("offer").jdlx(6).hj(2).build(),
operateButtonMap,
"创建offer", "转为待入职", "转移阶段", "淘汰", "转推其他职位", "归档人才库", "添加备注", "加入黑名单"));
return stageList;
}
private OperateStagePo buildStagePo(OperateStagePo stagePo, Map<String, OperateButtonPo> operateButtonMap, String... buttonNames) {
List<OperateStageDt1> dt1 = new ArrayList<>();
int index = 10;
for (String buttonName : buttonNames) {
OperateButtonPo operateButtonPo = operateButtonMap.get(buttonName);
dt1.add(OperateStageDt1.builder()
.czan(operateButtonPo.getId())
.zdyxsmc(operateButtonPo.getButtonName())
.tzymdz(operateButtonPo.getLinkUrl())
.zssx(index)
.build());
index += 10;
}
stagePo.setDt1(dt1);
return stagePo;
}
/**
* 插入操作按钮数据
*
* @param baseMap
* @param modeId
* @return
*/
private List<OperateButtonPo> insertButtonData(Map<String, Object> baseMap, int modeId) {
List<OperateButtonPo> buttonList = buildButtonList();
for (OperateButtonPo button : buttonList) {
RecruitDataMap<Object> buttonDataMap = new RecruitDataMap<>();
buttonDataMap.putAll(baseMap);
String uuid = UUID.randomUUID().toString();
buttonDataMap.put("modeuuid", uuid);
buttonDataMap.put("formmodeid", modeId);
buttonDataMap.put("anmc", button.getButtonName());
buttonDataMap.put("sfqy", "0");
buttonDataMap.put("anbs", button.getButtonKey());
buttonDataMap.put("andz", button.getButtonAction());
RecruitRecordSet.insertData(buttonDataMap, "uf_jcl_lcczan");
int id = RecruitRecordSet.refreshRight(uuid, "uf_jcl_lcczan", modeId, 1);
button.setId(id);
}
return buttonList;
}
/**
* 构建操作按钮基础信息
*
* @return
*/
private List<OperateButtonPo> buildButtonList() {
List<OperateButtonPo> buttonList = new ArrayList<>();
buttonList.add(OperateButtonPo.builder().buttonName("进入下一阶段").buttonAction("postAndReload")
.buttonKey("com.engine.recruit.service.impl.NextStageServiceImpl")
.build());
buttonList.add(OperateButtonPo.builder().buttonName("部门筛选").buttonAction("openDialog")
.linkUrl(getModeLink("/spa/cube/index.html#/main/cube/card?type=1&modeId={modeId}&formId={formId}&{ypz}=$parentid$", "uf_jcl_bmsx", "", "ypz"))
.build());
buttonList.add(OperateButtonPo.builder().buttonName("淘汰").buttonAction("confirmAndReload")
.buttonKey("com.engine.recruit.service.impl.EliminateServiceImpl")
.build());
buttonList.add(OperateButtonPo.builder().buttonName("转推其他职位").buttonAction("openDialog")
.linkUrl(getModeLink("/spa/cube/index.html#/main/cube/card?type=1&modeId={modeId}&formId={formId}&layoutid={layoutid}&guid=card&sourceId=$parentid$", "uf_jcl_yppc", "转推其他职位-新建一个投递", ""))
.build());
buttonList.add(OperateButtonPo.builder().buttonName("归档人才库").buttonAction("openDialog")
.linkUrl(getModeLink("/spa/cube/index.html#/main/cube/card?type=1&modeId={modeId}&formId={formId}&layoutid={layoutid}&guid=card&ids=$parentid$", "uf_jcl_yppc", "归档人才库-新建模板", ""))
.build());
buttonList.add(OperateButtonPo.builder().buttonName("加入黑名单").buttonAction("confirmAndReload")
.buttonKey("com.engine.recruit.service.impl.JoinBlacklistServiceImpl")
.build());
buttonList.add(OperateButtonPo.builder().buttonName("安排笔试").buttonAction("openDialog")
.linkUrl(getModeLink("/spa/cube/index.html#/main/cube/card?modeId={modeId}&formId={formId}&type=1&layoutid={layoutid}&{ypz}=$parentid$", "uf_jcl_bs", "笔试安排-新建模板", "ypz"))
.build());
//buttonList.add(OperateButtonPo.builder().buttonName("笔试结果登记").buttonAction("openDialog")
// .linkUrl(getModeLink("/spa/cube/index.html#/main/cube/card?modeId={modeId}&formId={formId}&type=1&layoutid={layoutid}&{ypz}=$parentid$", "uf_jcl_bs", "笔试结果-编辑模板", "ypz"))
// .build());
buttonList.add(OperateButtonPo.builder().buttonName("安排面试").buttonAction("openDialog")
.linkUrl(getModeLink("/spa/cube/index.html#/main/cube/card?type=1&modeId={modeId}&formId={formId}&{ypz}=$parentid$", "uf_jcl_ms", "", "ypz"))
.build());
buttonList.add(OperateButtonPo.builder().buttonName("背调结果登记").buttonAction("openDialog")
.linkUrl(getModeLink("/spa/cube/index.html#/main/cube/card?type=1&modeId={modeId}&formId={formId}&{ypz}=$parentid$&recordType=addBackTone", "uf_jcl_bd", "", "ypz"))
.build());
buttonList.add(OperateButtonPo.builder().buttonName("谈判记录登记").buttonAction("openDialog")
.linkUrl(getModeLink("/spa/cube/index.html#/main/cube/card?type=1&modeId={modeId}&formId={formId}&{ypz}=$parentid$&recordType=addSalaryNegotiation", "uf_jcl_xctp", "", "ypz"))
.build());
buttonList.add(OperateButtonPo.builder().buttonName("创建offer").buttonAction("openDialog")
.linkUrl(getWorkFlowLink("/spa/workflow/index_form.jsp#/main/workflow/req?iscreate=1&workflowid={workflowid}&{xm}=$parentid$", "jcl_offer审批", "xm"))
.build());
buttonList.add(OperateButtonPo.builder().buttonName("转为待入职").buttonAction("openDialog")
.linkUrl(getModeLink("/spa/cube/index.html#/main/cube/card?type=1&modeId={modeId}&formId={formId}&pcid=$parentid$&recordType=pendingEmployment", "uf_jcl_rzgl", "", ""))
.build());
buttonList.add(OperateButtonPo.builder().buttonName("转移阶段").buttonAction("openDialog")
.linkUrl(getModeLink("/spa/cube/index.html#/main/cube/card?billid=$parentid$&type=2&modeId={modeId}&formId={formId}&layoutid={layoutid}&guid=card&id=$parentid$", "uf_jcl_yppc", "转移阶段", ""))
.build());
buttonList.add(OperateButtonPo.builder().buttonName("添加备注").buttonAction("openDialog")
.linkUrl(getModeLink("/spa/cube/index.html#/main/cube/card?type=1&modeId={modeId}&formId={formId}&{ypz}=$parentid$", "uf_jcl_bz", "", "ypz"))
.build());
return buttonList;
}
/**
* 获取阶段ID
*
* @param stageName
* @return
*/
private String getStageIdByName(String stageName) {
String stageId = null;
RecordSet rs = new RecordSet();
rs.executeQuery("select id from uf_jcl_zpjdsz where zplc =-1 and jdmc = ? ", stageName);
if (rs.next()) {
stageId = rs.getString("id");
}
return stageId;
}
/**
* 完善查询相关URL
*
* @param url
* @param tableName
* @param customName
* @return
*/
private String getModeSearchUrl(String url, String tableName, String customName) {
String searchUrl = url;
int modeId = ApplicantCommonInfo.getModeIdByTableName(tableName);
int customId = ApplicantCommonInfo.getCustomId(modeId, customName);
searchUrl = searchUrl.replace("{customid}", String.valueOf(customId));
return searchUrl;
}
/**
* 动态完善建模相关URL
*
* @param url
* @param tableName
* @param layoutName
* @param fieldName
* @return
*/
private String getModeLink(String url, String tableName, String layoutName, String fieldName) {
String modeLink = url;
int modeId = ApplicantCommonInfo.getModeIdByTableName(tableName);
int formId = ApplicantCommonInfo.getFormIdByTableName(tableName);
modeLink = modeLink.replace("{modeId}", String.valueOf(modeId));
modeLink = modeLink.replace("{formId}", String.valueOf(formId));
if (StringUtils.isNotBlank(layoutName)) {
int layoutId = ApplicantCommonInfo.getLayoutId(modeId, layoutName);
modeLink = modeLink.replace("{layoutid}", String.valueOf(layoutId));
}
if (StringUtils.isNotBlank(fieldName)) {
int fieldId = ApplicantCommonInfo.getFieldId(formId, fieldName);
modeLink = modeLink.replace("{" + fieldName + "}", "field" + fieldId);
}
return modeLink;
}
/**
* 动态完善流程相关URL
*
* @param url
* @param workflowName
* @param fieldName
* @return
*/
private String getWorkFlowLink(String url, String workflowName, String fieldName) {
String workFlowLink = url;
String workflowId = "";
int formId = -1;
RecordSet rs = new RecordSet();
rs.executeQuery("select id,formid from workflow_base where workflowname like '" + workflowName + "%'");
if (rs.next()) {
workflowId = rs.getString("id");
formId = rs.getInt("formid");
}
workFlowLink = workFlowLink.replace("{workflowid}", workflowId);
if (StringUtils.isNotBlank(fieldName)) {
int fieldId = ApplicantCommonInfo.getFieldId(formId, fieldName);
workFlowLink = workFlowLink.replace("{" + fieldName + "}", "field" + fieldId);
}
return workFlowLink;
}
}

View File

@ -1,82 +0,0 @@
package com.engine.recruit.service.impl;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.recruit.entity.record.ApplicantRecordPo;
import com.engine.recruit.enums.ApplicationStatusEnum;
import com.engine.recruit.enums.RecordOperateEnum;
import com.engine.recruit.service.RecruitButtonService;
import weaver.common.DateUtil;
import weaver.conn.RecordSet;
import com.engine.recruit.conn.ApplicantCommonInfo;
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
import weaver.general.Util;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* <p>聚才林招聘</p>
* "加入黑名单"按钮实现类
*
* @author:dxfeng
* @createTime: 2023/09/18
* @version: 1.0
*/
public class JoinBlacklistServiceImpl extends Service implements RecruitButtonService {
@Override
public Map<String, Object> execute(Map<String, Object> params) {
// 当前应聘者ID
String billId = Util.null2String(params.get("billId"));
RecordSet rs = new RecordSet();
// 推人才表建模推建模更新人才表数据是否加入黑名单字段值变更为
ServiceUtil.getService(ApplicantResumeServiceImpl.class, user).archiveTalentPool(billId, true,"16");
// 更新当前应聘者关联的所有简历状态为已淘汰
String name = "";
String mobile = "";
String positionId = "";
rs.executeQuery("select xm, sjhm, ypzw from uf_jcl_yppc where id = ? ", billId);
if (rs.next()) {
name = rs.getString("xm");
mobile = rs.getString("sjhm");
positionId = rs.getString("ypzw");
}
// 更新当前应聘者关联的所有简历状态为已淘汰
rs.executeUpdate("update uf_jcl_yppc set zt = ? where xm = ? and sjhm = ?", ApplicationStatusEnum.OBSOLETE.getValue(), name, mobile);
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
.billId(String.valueOf(billId))
.operateTime(DateUtil.getDateTime())
.user(user)
.recordOperateType(RecordOperateEnum.JOIN_BLACKLIST)
.build();
recordPo.execute();
// 消息提醒当前人员简历的跟进者应聘职位的负责人/协助人
String messageType = RecruitModeUtil.getRecruitPropValue("RECRUIT_MESSAGE_TYPE");
String messageTitle = RecruitModeUtil.getRecruitPropValue("JOIN_BLACKLIST_MESSAGE_TITLE");
String applicantName = ApplicantCommonInfo.getApplicantName(billId);
String operatorName = RecruitModeUtil.getResourceNames(String.valueOf(user.getUID()));
String messageContent = "应聘者:【" + applicantName + "】,已被【" + operatorName + "】加入黑名单,相关投递已自动淘汰,请知悉。";
// 消息提醒当前人员简历的跟进者应聘职位的负责人/协助人
String zpzwfzr = "";
String zpxzr = "";
rs.executeQuery("select zpzwfzr , zpxzr from uf_jcl_zp_zpzw where id = ?", positionId);
if (rs.next()) {
zpzwfzr = rs.getString("zpzwfzr");
zpxzr = rs.getString("zpxzr");
}
Set<String> userIdSet = new HashSet<>();
userIdSet.addAll(Arrays.asList(zpzwfzr.split(",")));
userIdSet.addAll(Arrays.asList(zpxzr.split(",")));
RecruitModeUtil.messagePush(messageType, messageTitle, messageContent, userIdSet, user.getUID());
return null;
}
}

View File

@ -1,32 +0,0 @@
package com.engine.recruit.service.impl;
import com.engine.core.impl.Service;
import com.engine.recruit.service.MessageTemplateService;
import weaver.conn.RecordSet;
import weaver.general.Util;
import java.util.HashMap;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/09/26
* @version: 1.0
*/
public class MessageTemplateServiceImpl extends Service implements MessageTemplateService {
private static final String MESSAGE_TEMPLATE_TABLE = "uf_jcl_yjtzmb";
@Override
public Map<String, Object> getMessageContent(Map<String, Object> params) {
Map<String, Object> resMap = new HashMap<>();
String id = Util.null2String(params.get("id"));
String content = "";
RecordSet rs = new RecordSet();
rs.executeQuery("select yjnr from " + MESSAGE_TEMPLATE_TABLE + " where id = ?", id);
if (rs.next()) {
content = rs.getString("yjnr");
}
resMap.put("content", content);
return resMap;
}
}

View File

@ -1,76 +0,0 @@
package com.engine.recruit.service.impl;
import com.engine.core.impl.Service;
import com.engine.recruit.entity.recruitflow.po.RecruitStepPo;
import com.engine.recruit.exception.CustomizeRunTimeException;
import com.engine.recruit.service.RecruitButtonService;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.general.Util;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>聚才林招聘</p>
* "进入下一阶段"按钮实现类
*
* @author:dxfeng
* @createTime: 2023/09/18
* @version: 1.0
*/
public class NextStageServiceImpl extends Service implements RecruitButtonService {
@Override
public Map<String, Object> execute(Map<String, Object> params) {
Map<String, Object> returnMap = new HashMap<>();
String billId = Util.null2String(params.get("billId"));
// 招聘阶段ID
String stageId = null;
// 招聘流程ID
int recruitFlowId = -1;
RecordSet rs = new RecordSet();
rs.executeQuery("select zplc,zpjd from uf_jcl_yppc where id = ?", billId);
if (rs.next()) {
recruitFlowId = rs.getInt("zplc");
stageId = rs.getString("zpjd");
}
if (-1 == recruitFlowId) {
throw new CustomizeRunTimeException("未设置对应招聘流程");
}
rs.executeQuery("select id,jdmc,hj from uf_jcl_zpjdsz where sfqy = 0 and zplc = ? order by hj,zssx", recruitFlowId);
List<RecruitStepPo> stepList = new ArrayList<>();
while (rs.next()) {
stepList.add(RecruitStepPo.builder().key(rs.getInt("id")).description(rs.getString("jdmc")).type(rs.getString("hj")).build());
}
boolean found = false;
Integer target = null;
if (StringUtils.isBlank(stageId)) {
stageId = String.valueOf(stepList.get(0).getKey());
}
for (RecruitStepPo recruitStepPo : stepList) {
if (found) {
target = recruitStepPo.getKey();
break;
}
if (recruitStepPo.getKey() == Integer.parseInt(stageId)) {
found = true;
// 结束环节
if ("2".equals(recruitStepPo.getType())) {
target = -1;
}
}
}
rs.executeQuery("select jdlx from uf_jcl_zpjdsz where id = ?", target);
if (rs.next()) {
String jdlx = rs.getString("jdlx");
// 更新应聘者简历为下一阶段
rs.executeUpdate("update uf_jcl_yppc set zpjd = ?,dqypjd = ? where id = ?", target, jdlx, billId);
}
return returnMap;
}
}

View File

@ -1,87 +0,0 @@
package com.engine.recruit.service.impl;
import com.engine.core.impl.Service;
import com.engine.recruit.entity.record.ApplicantRecordPo;
import com.engine.recruit.enums.RecordOperateEnum;
import com.engine.recruit.exception.CustomizeRunTimeException;
import com.engine.recruit.service.OfferService;
import org.apache.commons.lang3.StringUtils;
import weaver.common.DateUtil;
import weaver.conn.RecordSet;
import weaver.general.Util;
import java.util.HashMap;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/10/30
* @version: 1.0
*/
public class OfferServiceImpl extends Service implements OfferService {
@Override
public Map<String, Object> getOfferMobileLink(Map<String, Object> param) {
return null;
}
@Override
public Map<String, Object> getOfferContent(Map<String, Object> param) {
Map<String, Object> returnMap = new HashMap<>();
String billId = Util.null2String(param.get("billid"));
String email = Util.null2String(param.get("dzyx"));
RecordSet rs = new RecordSet();
String offerContent = "";
String sxrq = "";
rs.executeQuery("select tznr,sxrq from uf_jcl_offer where id = ? and dzyx = ?", billId, email);
if (rs.next()) {
offerContent = rs.getString("tznr");
sxrq = rs.getString("sxrq");
}
// 判断当前offer是否失效
String currentDate = DateUtil.getCurrentDate();
int compDate = DateUtil.compDate(currentDate, sxrq);
// 当前日期>失效日期更新状态为逾期未回复
if (compDate < 0) {
throw new CustomizeRunTimeException("offer已失效");
}
if (StringUtils.isAnyBlank(billId, email, offerContent)) {
throw new CustomizeRunTimeException("非法访问");
}
returnMap.put("content", offerContent);
return returnMap;
}
@Override
public Map<String, Object> updateOfferStatus(Map<String, Object> param) {
String status = Util.null2String(param.get("status"));
String email = Util.null2String(param.get("dzyx"));
String billId = Util.null2String(param.get("billid"));
if (StringUtils.isAnyBlank(billId, email, status) || !("2".equals(status) || "3".equals(status))) {
throw new CustomizeRunTimeException("非法操作");
}
RecordSet rs = new RecordSet();
// 判断是否已提交
rs.executeQuery("select zt from uf_jcl_offer where id = ? and dzyx = ? ", billId, email);
if (rs.next()) {
String zt = rs.getString("zt");
if ("2".equals(zt) || "3".equals(zt)) {
throw new CustomizeRunTimeException("此反馈已提交,请勿重复提交");
}
}
// 更新反馈状态反馈时间
rs.executeUpdate("update uf_jcl_offer set zt = ?, fksj = ? where id = ? and dzyx = ?", status, DateUtil.getDateTime(), billId, email);
// 记录应聘过程
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
.billId(String.valueOf(billId))
.operateTime(DateUtil.getDateTime())
.user(user)
.recordOperateType(RecordOperateEnum.OFFER_FEEDBACK)
.build();
recordPo.execute();
return null;
}
}

View File

@ -1,130 +0,0 @@
package com.engine.recruit.service.impl;
import com.engine.core.impl.Service;
import com.engine.recruit.entity.recruitflow.po.RecruitButton;
import com.engine.recruit.entity.recruitflow.po.RecruitStepPo;
import com.engine.recruit.entity.recruitflow.po.RecruitTabPo;
import com.engine.recruit.exception.CustomizeRunTimeException;
import com.engine.recruit.service.RecruitFlowService;
import com.engine.recruit.util.RecruitFlowUtil;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.general.Util;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/09/22
* @version: 1.0
*/
public class RecruitFlowServiceImpl extends Service implements RecruitFlowService {
@Override
public Map<String, Object> getButtonList(Map<String, Object> param) {
Map<String, Object> returnMap = new HashMap<>();
String billId = Util.null2String(param.get("billId"));
// 招聘阶段ID
String stageId = "";
// 招聘流程ID
int recruitFlowId = -1;
RecordSet rs = new RecordSet();
rs.executeQuery("select zplc,zpjd from uf_jcl_yppc where id = ?", billId);
if (rs.next()) {
recruitFlowId = rs.getInt("zplc");
stageId = rs.getString("zpjd");
}
if (-1 == recruitFlowId) {
throw new CustomizeRunTimeException("未设置对应招聘流程");
}
if (StringUtils.isBlank(stageId)) {
// 查询开始环节
rs.executeQuery("select id from uf_jcl_zpjdsz where zplc = ? and hj = 0", recruitFlowId);
if (rs.next()) {
stageId = rs.getString("id");
}
if (StringUtils.isBlank(stageId)) {
throw new RuntimeException("未找到对应招聘阶段");
}
}
rs.executeQuery("select a.id,a.zdyxsmc as buttonName, a.tzymbt as tabName, a.tzymdz as tabLink, a.zssx as orderNum, b.anbs as buttonKey, b.andz as buttonType from uf_jcl_zpjdsz_dt1 a inner join uf_jcl_lcczan b on a.czan = b.id where a.sfqy = 0 and mainid = ? order by zssx", stageId);
List<RecruitButton> buttonList = new ArrayList<>();
List<RecruitTabPo> tabList = new ArrayList<>();
while (rs.next()) {
buttonList.add(RecruitButton.builder()
.key(rs.getString("id"))
.buttonName(rs.getString("buttonName"))
.buttonKey(rs.getString("buttonKey"))
.tabName(rs.getString("tabName"))
.tabLink(RecruitFlowUtil.replaceURL(rs.getString("tabLink"), billId))
.buttonType(rs.getString("buttonType"))
.orderNum(rs.getInt("orderNum"))
.build());
}
rs.executeQuery("select ymbt as title,ymdz as url,zssx as orderNum from uf_jcl_zpjdsz_dt2 where mainid = ? order by orderNum", stageId);
int tabIndex = 0;
while (rs.next()) {
tabList.add(RecruitTabPo.builder()
.key(String.valueOf(tabIndex))
.viewcondition(String.valueOf(tabIndex))
.title(rs.getString("title"))
.url(RecruitFlowUtil.replaceURL(rs.getString("url"), billId))
.billId(billId)
.build());
tabIndex++;
}
// 当前阶段所有按钮信息
returnMap.put("buttonList", buttonList);
returnMap.put("tabList", tabList);
return returnMap;
}
@Override
public Map<String, Object> getRecruitStepList(Map<String, Object> param) {
Map<String, Object> returnMap = new HashMap<>();
String billId = Util.null2String(param.get("billId"));
// 招聘阶段ID
String stageId = "";
int currentStageId = 0;
// 招聘流程ID
int recruitFlowId = -1;
RecordSet rs = new RecordSet();
rs.executeQuery("select zplc,zpjd from uf_jcl_yppc where id = ?", billId);
if (rs.next()) {
recruitFlowId = rs.getInt("zplc");
stageId = rs.getString("zpjd");
}
if (-1 == recruitFlowId) {
throw new CustomizeRunTimeException("未设置对应招聘流程");
}
rs.executeQuery("select id,jdmc from uf_jcl_zpjdsz where sfqy = 0 and zplc = ? order by zssx", recruitFlowId);
int stepIndex = 0;
List<RecruitStepPo> stepList = new ArrayList<>();
while (rs.next()) {
String id = rs.getString("id");
if (stageId.equals(id)) {
currentStageId = stepIndex;
}
stepList.add(RecruitStepPo.builder().key(stepIndex).description(rs.getString("jdmc")).build());
stepIndex++;
}
if ("-1".equals(stageId)) {
currentStageId = stepList.size();
}
returnMap.put("stepList", stepList);
returnMap.put("currentStageId", currentStageId);
return returnMap;
}
}

View File

@ -1,38 +0,0 @@
package com.engine.recruit.service.impl;
import com.engine.core.impl.Service;
import com.engine.recruit.exception.CustomizeRunTimeException;
import com.engine.recruit.service.RecruitPositionService;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.general.Util;
import java.util.HashMap;
import java.util.Map;
/**
* @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();
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);
}
return returnMap;
}
}

View File

@ -1,23 +0,0 @@
package com.engine.recruit.service.impl;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.integration.gconst.IntegrationConstant;
import com.engine.integration.service.impl.ScheduleServiceImpl;
import com.engine.recruit.service.RecruitScheduleService;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2024/03/27
* @version: 1.0
*/
public class RecruitScheduleServiceImpl extends Service implements RecruitScheduleService {
@Override
public Map<String, Object> immediatelyRun(Map<String, Object> param) {
Map<String, Object> apiDatas = ServiceUtil.getService(ScheduleServiceImpl.class, user).immediatelyRun(param, user);
apiDatas.put(IntegrationConstant.INTEGRATION_RESULT_STATUS, IntegrationConstant.INTEGRATION_RESULT_STATUS_NORMAL);
return apiDatas;
}
}

View File

@ -1,56 +0,0 @@
package com.engine.recruit.service.impl;
import com.engine.core.impl.Service;
import com.engine.recruit.conn.RecruitRecordSet;
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;
import com.weaver.rpa.sdk.clients.core.ERPASDKClients;
import weaver.conn.RecordSet;
import weaver.general.Util;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2023/10/27
* @version: 1.0
*/
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);
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();
// 配置启用邮箱功能
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");
// 调用方法更新简历机器人采集设置在千里聆中会更新目标用户机器人配置
resumeSDKClient.setEmailSetting(userId, emailSetting);
return null;
}
}

View File

@ -1,122 +0,0 @@
package com.engine.recruit.service.impl;
import com.engine.core.impl.Service;
import com.engine.recruit.conn.*;
import com.engine.recruit.enums.ApplicationStatusEnum;
import com.engine.recruit.exception.CustomizeRunTimeException;
import com.engine.recruit.service.TalentPoolService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.common.DateUtil;
import weaver.conn.RecordSet;
import weaver.general.Util;
import java.util.List;
import java.util.Map;
import java.util.UUID;
/**
* @author:dxfeng
* @createTime: 2023/10/20
* @version: 1.0
*/
public class TalentPoolServiceImpl extends Service implements TalentPoolService {
@Override
public Map<String, Object> removeBlacklist(Map<String, Object> param) {
String ids = Util.null2String(param.get("ids"));
if (StringUtils.isBlank(ids)) {
throw new CustomizeRunTimeException("请至少选择一条数据");
}
RecordSet rs = new RecordSet();
rs.executeUpdate("update uf_jcl_rck set sfjrhmd = 1 where id in (" + ids + ")");
return null;
}
@Override
public Map<String, Object> createNewApplicant(Map<String, Object> param) {
String rcId = Util.null2String(param.get("rcid"));
String ypzw = Util.null2String(param.get("ypzw"));
if (StringUtils.isBlank(ypzw)) {
throw new CustomizeRunTimeException("请选择应聘职位");
}
RecordSet rs = new RecordSet();
rs.executeQuery("select * from uf_jcl_rck where id = ? ", rcId);
Map<String, Object> mainDataMap = RecruitRecordSet.getSingleRecordMap(rs);
String xm = Util.null2String(mainDataMap.get("xm"));
String sjhm = Util.null2String(mainDataMap.get("sjhm"));
// 职位重复校验
List<Map<String, Object>> repeatPositionResumeList = CheckRepeatResume.getRepeatPositionResumeList(xm, sjhm, ypzw);
if (CollectionUtils.isNotEmpty(repeatPositionResumeList)) {
throw new CustomizeRunTimeException("该人员已有相同的应聘中的职位");
}
Map<String, Object> insertDataMap = buildInsertMap(ypzw, mainDataMap);
String uuid = UUID.randomUUID().toString();
insertDataMap.put("modeuuid", uuid);
int formModeId = ApplicantCommonInfo.getModeIdByTableName("uf_jcl_yppc");
insertDataMap.put("formmodeid", formModeId);
RecruitRecordSet.buildModeInsertFields(insertDataMap, user.getUID());
RecruitRecordSet.insertData(insertDataMap, "uf_jcl_yppc");
int pcId = RecruitRecordSet.refreshRight(uuid, "uf_jcl_yppc", formModeId, user.getUID());
// 创建明细表数据
rs.executeUpdate("insert into uf_jcl_yppc_dt1 (mainid,xxmc,xl,zy,kssj,jssj) select ?,xxmc,xl,zy,kssj,jssj from uf_jcl_rck_dt1 where mainid = ?", pcId, rcId);
rs.executeUpdate("insert into uf_jcl_yppc_dt2 (mainid,gsmc,kssj,jssj,gw,sqyxk,lzyy,gzzz) select ?,gsmc,kssj,jssj,gw,sqyxk,lzyy,gzzz from uf_jcl_rck_dt2 where mainid = ?", pcId, rcId);
rs.executeUpdate("insert into uf_jcl_yppc_dt3 (mainid,xmmc,kssj,jssj,drjs,xmms) select ?,xmmc,kssj,jssj,drjs,xmms from uf_jcl_rck_dt3 where mainid = ?", pcId, rcId);
rs.executeUpdate("insert into uf_jcl_yppc_dt4 (mainid,yylx,zwcd) select ?,yylx,zwcd from uf_jcl_rck_dt4 where mainid = ?", pcId, rcId);
return null;
}
private Map<String, Object> buildInsertMap(String ypzw, Map<String, Object> mainDataMap) {
String zt = ApplicationStatusEnum.DISTRIBUTION.getValue();
Map<String, Object> insertDataMap = new RecruitDataMap<>();
insertDataMap.put("sfz", mainDataMap.get("sfz"));
insertDataMap.put("jlzp", mainDataMap.get("jlzp"));
insertDataMap.put("ysjl", mainDataMap.get("ysjl"));
insertDataMap.put("jlly", mainDataMap.get("jlly"));
insertDataMap.put("xm", mainDataMap.get("xm"));
insertDataMap.put("xb", mainDataMap.get("xb"));
insertDataMap.put("sjhm", mainDataMap.get("sjhm"));
insertDataMap.put("dzyx", mainDataMap.get("dzyx"));
insertDataMap.put("csrq", mainDataMap.get("csrq"));
insertDataMap.put("nl", mainDataMap.get("nl"));
insertDataMap.put("zgxl", mainDataMap.get("zgxl"));
insertDataMap.put("zgxw", mainDataMap.get("zgxw"));
insertDataMap.put("byyx", mainDataMap.get("byyx"));
insertDataMap.put("zy", mainDataMap.get("zy"));
insertDataMap.put("hyzk", mainDataMap.get("hyzk"));
insertDataMap.put("gzjy", mainDataMap.get("gzjy"));
insertDataMap.put("zzzt", mainDataMap.get("zzzt"));
insertDataMap.put("dqszd", mainDataMap.get("dqszd"));
insertDataMap.put("tdsj", DateUtil.getDateTime());
insertDataMap.put("cjr", user.getUID());
insertDataMap.put("zwpj", mainDataMap.get("zwpj"));
insertDataMap.put("mz", mainDataMap.get("mz"));
insertDataMap.put("jg", mainDataMap.get("jg"));
insertDataMap.put("zzmm", mainDataMap.get("zzmm"));
insertDataMap.put("sgcm", mainDataMap.get("sgcm"));
insertDataMap.put("tzkg", mainDataMap.get("tzkg"));
insertDataMap.put("ypzw", ypzw);
String flowId = PositionCommonInfo.getRecruitFlowId(ypzw);
Map<String, String> initialStage = ApplicantCommonInfo.getInitialStage(flowId);
if (null != initialStage) {
String zpjd = initialStage.get("zpjd");
String dqypjd = initialStage.get("jdlx");
if (StringUtils.isNotBlank(zpjd) && StringUtils.isNotBlank(dqypjd)) {
insertDataMap.put("zplc", flowId);
insertDataMap.put("zpjd", zpjd);
insertDataMap.put("dqypjd", dqypjd);
zt = ApplicationStatusEnum.CANDIDATE.getValue();
}
}
insertDataMap.put("zt", zt);
return insertDataMap;
}
}

View File

@ -1,342 +0,0 @@
package com.engine.recruit.service.impl;
import com.engine.core.impl.Service;
import com.engine.recruit.entity.workbench.OptionVO;
import com.engine.recruit.entity.workbench.RecruitInterviewPO;
import com.engine.recruit.entity.workbench.RecruitPortalCommonVO;
import com.engine.recruit.entity.workbench.SeriesParam;
import weaver.conn.RecordSet;
import weaver.general.Util;
import java.text.DecimalFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
/**
* @Author liang.cheng
* @Date 2023/10/18 4:44 PM
* @Version 1.0
*/
public class WorkBenchPortalServiceImpl extends Service implements com.engine.recruit.service.WorkBenchPortalService {
private final DecimalFormat df = new DecimalFormat("#.00");
@Override
public List<RecruitPortalCommonVO> getRecruitPortalTop() {
RecordSet rs = new RecordSet();
List<RecruitPortalCommonVO> recruitList = new ArrayList<>();
List<String> list = new ArrayList<>();
rs.executeQuery("select b.zpzwfzr,b.zpxzr from uf_jcl_yppc a left join uf_jcl_zp_zpzw b on a.ypzw = b.id\n" +
"where a.zt = 1");
while (rs.next()) {
String zpzwfzr = Util.null2String(rs.getString("zpzwfzr"));
String zpxzr = Util.null2String(rs.getString("zpxzr"));
list.add(mergeStrings(zpzwfzr, zpxzr));
}
String uId = String.valueOf(user.getUID());
List<String> filteredList = list.stream()
.filter(s -> s.contains(uId))
.collect(Collectors.toList());
recruitList.add(RecruitPortalCommonVO.builder().title("待处理简历").count(filteredList.size()).icon("${appRes}/1.png").build());
recruitList.add(selectRecruitInterview("select msg,ptmsg,msrq from uf_jcl_ms", "今日面试", "${appRes}/2.png", uId));
recruitList.add(selectRecruitInterview("select msg,ptmsg,msrq from uf_jcl_ms where zt = 0", "待评价面试", "${appRes}/3.png", uId));
recruitList.add(selectOffer("select b.zpzwfzr,b.zpxzr from uf_jcl_offer a left join uf_jcl_zp_zpzw b on a.ypzw = b.id where a.zt = 0",
"待发offer", "${appRes}/4.png", uId));
recruitList.add(selectOffer("select b.zpzwfzr,b.zpxzr from uf_jcl_offer a left join uf_jcl_zp_zpzw b on a.ypzw = b.id where a.zt = 1",
"待反馈offer", "${appRes}/5.png", uId));
recruitList.add(RecruitPortalCommonVO.builder().title("待入职").count(waitHired()).icon("${appRes}/6.png").build());
return recruitList;
}
@Override
public OptionVO getJobTenure() {
RecordSet rs = new RecordSet();
List<RecruitPortalCommonVO> list = new ArrayList<>();
rs.executeQuery("select a.xxnr,b.sum from uf_sjzd a \n" +
"left join (select gznx,count(1) as sum from uf_jcl_zp_zpzw group by gznx) b \n" +
"on a.id = b.gznx where a.zdlxmc = 9");
while (rs.next()) {
list.add(RecruitPortalCommonVO.builder().count(Util.getIntValue(rs.getString("sum"),0)).title(Util.null2String(rs.getString("xxnr"))).build());
}
List<String> xData = list.stream()
.map(RecruitPortalCommonVO::getTitle)
.collect(Collectors.toList());
List<Integer> barSeriesData = list.stream()
.map(RecruitPortalCommonVO::getCount)
.collect(Collectors.toList());
return OptionVO.builder()
.text("职位年限要求分布")
.xData(xData)
.barSeriesData(barSeriesData)
.build();
}
@Override
public OptionVO getWaitStepPerson() {
RecordSet rs = new RecordSet();
rs.executeQuery("select dqypjd,count(1) as sum from uf_jcl_yppc where dqypjd is not null group by dqypjd");
List<String> xData = new ArrayList<>();
List<Integer> barSeriesData = new ArrayList<>();
while (rs.next()) {
xData.add(Util.null2String(rs.getString("xxnr")));
barSeriesData.add(Util.getIntValue(rs.getString("sum")),0);
}
return OptionVO.builder()
.text("候选中应聘者各阶段数")
.xData(xData)
.barSeriesData(barSeriesData)
.build();
}
@Override
public OptionVO getRecruitTransform() {
List<String> colorList = Arrays.asList("#6e94f3","#faf0e6","#7cfc00","#ao20f0","#00ced1","#83d8ae","#697695","#8ac9e9","#9933fa","#c0ff3e","#ffe4c4","#cd6090");
RecordSet rs = new RecordSet();
rs.executeQuery("select a.xxnr,b.sum from uf_sjzd a \n" +
"left join (select gznx,count(1) as sum from uf_jcl_zp_zpzw group by gznx) b \n" +
"on a.id = b.gznx where a.zdlxmc = 9");
LinkedList<SeriesParam> seriesData = new LinkedList<>();
while (rs.next()) {
String name = Util.null2String(rs.getString("xxnr"));
double value = Util.getDoubleValue(rs.getString("sum"), 0);
Random r = new Random();
seriesData.add(SeriesParam.builder().value(value).name(name).color(colorList.get(r.nextInt(colorList.size()))).build());
}
return OptionVO.builder()
.text("招聘转化")
.seriesData(seriesData)
.build();
}
@Override
public OptionVO getPeopleFrom() {
List<String> colorList = Arrays.asList("#6e94f3","#faf0e6","#7cfc00","#ao20f0","#00ced1","#83d8ae","#697695","#8ac9e9","#9933fa","#c0ff3e","#ffe4c4","#cd6090");
RecordSet rs = new RecordSet();
rs.executeQuery("select a.xxnr,b.sum from uf_sjzd a \n" +
"left join (select jlly,count(1) as sum from uf_jcl_yppc group by jlly) b \n" +
"on a.id = b.jlly where a.zdlxmc = 2");
LinkedList<SeriesParam> seriesData = new LinkedList<>();
while (rs.next()) {
Random r = new Random();
String name = Util.null2String(rs.getString("xxnr"));
double value = Util.getDoubleValue(rs.getString("sum"), 0);
seriesData.add(SeriesParam.builder().value(value).name(name).color(colorList.get(r.nextInt(colorList.size()))).build());
}
List<Double> values = seriesData.stream().map(SeriesParam:: getValue).collect(Collectors.toList());
double percentage = values.stream().mapToDouble(Double::doubleValue).sum();
seriesData.forEach(item -> item.setValue(Double.valueOf(df.format((item.getValue() * 100) / percentage))));
return OptionVO.builder()
.text("人才来源")
.seriesData(seriesData)
.build();
}
@Override
public List<RecruitPortalCommonVO> getRecruitProgress() {
List<RecruitPortalCommonVO> recruitList = new ArrayList<>();
//招聘需求完成进度
recruitList.add(getProgress());
//面试出席率
recruitList.add(getInterview(1));
//面试通过率
recruitList.add(getInterview(2));
//接受offer
recruitList.add(getOffer());
//取消入职
recruitList.add(getEntry(1));
//按期入职
recruitList.add(getEntry(2));
return recruitList;
}
private RecruitPortalCommonVO getEntry(int type) {
RecordSet rs = new RecordSet();
String uId = String.valueOf(user.getUID());
int complete;
String title;
String color;
rs.executeQuery("select count(1) as sum from uf_jcl_rzgl where modedatacreater = ?",uId);
rs.next();
int all = Util.getIntValue(rs.getString("sum"));
if (type == 1) {
rs.executeQuery("select count(1) as complete from uf_jcl_rzgl where modedatacreater = ? and rzzt = 2",uId);
rs.next();
complete = Util.getIntValue(rs.getString("complete"));
title = "取消入职";
color = "#ff2516";
}else {
rs.executeQuery("select count(1) as complete from uf_jcl_rzgl where modedatacreater = ? and rzzt = 2 and rzrq = yjrzrq",uId);
rs.next();
complete = Util.getIntValue(rs.getString("complete"));
title = "按期入职";
color = "#a1e073";
}
double progress = all == 0 ? 0 :((double) complete / all) * 100;
return RecruitPortalCommonVO.builder().title(title).scale(progress).color(color).build();
}
private RecruitPortalCommonVO getOffer() {
RecordSet rs = new RecordSet();
String uId = String.valueOf(user.getUID());
rs.executeQuery("select count(1) as sum from uf_jcl_offer where sqr = ? and zt != 0",uId);
rs.next();
int all = Util.getIntValue(rs.getString("sum"));
rs.executeQuery("select count(1) as complete from uf_jcl_offer where sqr = ? and zt = 3",uId);
rs.next();
int complete = Util.getIntValue(rs.getString("complete"));
double progress = all == 0 ? 0 :((double) complete / all) * 100;
return RecruitPortalCommonVO.builder().title("接受offer").scale(progress).color("#4cbadd").build();
}
private RecruitPortalCommonVO getProgress() {
RecordSet rs = new RecordSet();
List<String> all = new ArrayList<>();
rs.executeQuery("select sqr,zpxqfzr from uf_jcl_zpxqjh");
while (rs.next()) {
String sqr = Util.null2String(rs.getString("sqr"));
String zpxqfzr = Util.null2String(rs.getString("zpxqfzr"));
all.add(mergeStrings(sqr, zpxqfzr));
}
String uId = String.valueOf(user.getUID());
List<String> filterAll = all.stream()
.filter(s -> s.contains(uId))
.collect(Collectors.toList());
List<String> complete = new ArrayList<>();
rs.executeQuery("select sqr from uf_jcl_zpxqjh where xqzt = 1");
while (rs.next()) {
String sqr = Util.null2String(rs.getString("sqr"));
String zpxqfzr = Util.null2String(rs.getString("zpxqfzr"));
complete.add(mergeStrings(sqr, zpxqfzr));
}
List<String> filterComplete = complete.stream()
.filter(s -> s.contains(uId))
.collect(Collectors.toList());
double progress = filterAll.size() == 0 ? 0 : ((double) filterComplete.size() / filterAll.size()) * 100;
return RecruitPortalCommonVO.builder().title("招聘需求完成进度").scale(progress).color("#fdac3a").build();
}
private RecruitPortalCommonVO getInterview(int type) {
RecordSet rs = new RecordSet();
String uId = String.valueOf(user.getUID());
String title;
String color;
rs.executeQuery("select msg,ptmsg from uf_jcl_ms");
List<String> all = new ArrayList<>();
List<String> complete = new ArrayList<>();
while (rs.next()) {
String msg = Util.null2String(rs.getString("msg"));
String ptmsg = Util.null2String(rs.getString("ptmsg"));
all.add(mergeStrings(msg, ptmsg));
}
List<String> filterAll = all.stream()
.filter(s -> s.contains(uId))
.collect(Collectors.toList());
if (type == 1) {
title = "面试出席率";
color = "#5671fb";
rs.executeQuery("select msg,ptmsg from uf_jcl_ms where zt = 1");
while (rs.next()) {
String msg = Util.null2String(rs.getString("msg"));
String ptmsg = Util.null2String(rs.getString("ptmsg"));
complete.add(mergeStrings(msg, ptmsg));
}
}else {
title = "面试通过率";
color = "#42d39e";
rs.executeQuery("select msg,ptmsg from uf_jcl_ms where zt = 1 and jg = 1");
while (rs.next()) {
String msg = Util.null2String(rs.getString("msg"));
String ptmsg = Util.null2String(rs.getString("ptmsg"));
complete.add(mergeStrings(msg, ptmsg));
}
}
List<String> filterComplete = complete.stream()
.filter(s -> s.contains(uId))
.collect(Collectors.toList());
double progress = filterAll.size() == 0 ? 0 : ((double) filterComplete.size() / filterAll.size()) * 100;
return RecruitPortalCommonVO.builder().title(title).scale(progress).color(color).build();
}
private Integer waitHired() {
RecordSet rs = new RecordSet();
rs.executeQuery("select count(1) as sum from uf_jcl_rzgl where rzzt = 0");
rs.next();
return Util.getIntValue(rs.getString("sum"));
}
private RecruitPortalCommonVO selectOffer(String sql, String title, String icon, String uId) {
RecordSet rs = new RecordSet();
List<String> list = new ArrayList<>();
rs.executeQuery(sql);
while (rs.next()) {
String zpzwfzr = Util.null2String(rs.getString("zpzwfzr"));
String zpxzr = Util.null2String(rs.getString("zpxzr"));
list.add(mergeStrings(zpzwfzr, zpxzr));
}
List<String> filteredList = list.stream()
.filter(s -> s.contains(uId))
.collect(Collectors.toList());
return RecruitPortalCommonVO.builder().title(title).count(filteredList.size()).icon(icon).build();
}
private RecruitPortalCommonVO selectRecruitInterview(String sql, String title, String icon, String uId) {
RecordSet rs = new RecordSet();
List<RecruitInterviewPO> recruitInterview = new ArrayList<>();
rs.executeQuery(sql);
while (rs.next()) {
String msg = Util.null2String(rs.getString("msg"));
String ptmsg = Util.null2String(rs.getString("ptmsg"));
String msrq = Util.null2String(rs.getString("msrq")).substring(0,9);
recruitInterview.add(RecruitInterviewPO.builder().ids(mergeStrings(msg, ptmsg)).interviewDate(msrq).build());
}
LocalDate currentDate = LocalDate.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String dateString = currentDate.format(formatter);
List<RecruitInterviewPO> filterInterview = recruitInterview.stream()
.filter(s -> s.getIds().contains(uId))
.filter(s -> dateString.equals(s.getInterviewDate()))
.collect(Collectors.toList());
return RecruitPortalCommonVO.builder().title(title).count(filterInterview.size()).icon(icon).build();
}
private String mergeStrings(String string1, String string2) {
boolean isString1Empty = string1.isEmpty();
boolean isString2Empty = string2.isEmpty();
if (isString1Empty && isString2Empty) {
return "";
} else if (isString1Empty) {
return string2;
} else if (isString2Empty) {
return string1;
} else {
return string1 + "," + string2;
}
}
}

View File

@ -1,86 +0,0 @@
package com.engine.recruit.service.impl;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.recruit.entity.workplan.WorkPlanCreateParams;
import com.engine.recruit.enums.InterviewOperateTypeEnum;
import com.engine.recruit.service.WorkPlanSerivice;
import com.engine.workplan.service.WorkPlanBaseService;
import com.engine.workplan.service.impl.WorkPlanBaseServiceImpl;
import weaver.conn.RecordSet;
import weaver.hrm.User;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @Author liang.cheng
* @Date 2023/10/17 10:52 AM
* @Description:
* @Version 1.0
*/
public class WorkPlanServiceImpl extends Service implements WorkPlanSerivice {
private WorkPlanBaseService getService(User user) {
return ServiceUtil.getService(WorkPlanBaseServiceImpl.class, user);
}
@Override
public void operate(WorkPlanCreateParams workPlanCreateParams) {
RecordSet rs = new RecordSet();
String operateType = workPlanCreateParams.getOperateType();
String billId = workPlanCreateParams.getBillId();
Map<String, Object> maps = new HashMap<>(16);
if (InterviewOperateTypeEnum.ARRANGE.getOperateType().equals(operateType) || InterviewOperateTypeEnum.ADJUSTMENT.getOperateType().equals(operateType)){
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
LocalDateTime dateTime = LocalDateTime.parse(workPlanCreateParams.getBeginDateTime(), formatter);
LocalDateTime newDateTime = dateTime.plusHours(1);
workPlanCreateParams.setEndDateTime(newDateTime.format(formatter));
maps.put("workPlanType",workPlanCreateParams.getWorkPlanType());
maps.put("planName",workPlanCreateParams.getPlanName());
maps.put("memberIDs",workPlanCreateParams.getMemberIds());
maps.put("urgentLevel",workPlanCreateParams.getUrgentLevel());
maps.put("beginDateTime",workPlanCreateParams.getBeginDateTime());
maps.put("endDateTime",workPlanCreateParams.getEndDateTime());
maps.put("isEnableSecondAuth","0");
//maps.put("from","workplan");
}
List<String> list = Arrays.stream(billId.split(","))
.collect(Collectors.toList());
list.forEach(id -> {
// 取消面试
if (InterviewOperateTypeEnum.CANCEL.getOperateType().equals(operateType)) {
Map<String, Object> map = new HashMap<String, Object>(2){{
put("workid", workPlanCreateParams.getWorkId());
}};
getService(user).deleteWorkPlan(map);
//完成面试
}else if (InterviewOperateTypeEnum.EVALUATE.getOperateType().equals(operateType)) {
Map<String, Object> map = new HashMap<String, Object>(2){{
put("workid", workPlanCreateParams.getWorkId());
}};
getService(user).finishWorkPlan(map);
// 调整面试
}else if (InterviewOperateTypeEnum.ADJUSTMENT.getOperateType().equals(operateType)){
maps.put("workid",workPlanCreateParams.getWorkId());
getService(user).addWorkPlan(maps);
// 安排面试
}else if (InterviewOperateTypeEnum.ARRANGE.getOperateType().equals(operateType)) {
Map<String, Object> result = getService(user).addWorkPlan(maps);
Integer workplanId = (Integer)result.get("workplanid");
rs.executeUpdate("update uf_jcl_ms set glrc = ? where id = ?",workplanId,id);
}
});
}
}

Some files were not shown because too many files have changed in this diff Show More