generated from dxfeng/secondev-chapanda-feishu
Compare commits
No commits in common. "main" and "secondary/jjwc" have entirely different histories.
main
...
secondary/jjwc
|
|
@ -1,4 +1,4 @@
|
||||||
.iml
|
/weaver-hrm-recruit.iml
|
||||||
/out/
|
/out/
|
||||||
/.idea/
|
/.idea/
|
||||||
|
|
||||||
|
|
@ -8,12 +8,19 @@ target/
|
||||||
|
|
||||||
### IntelliJ IDEA ###
|
### IntelliJ IDEA ###
|
||||||
.idea
|
.idea
|
||||||
|
HELP.md
|
||||||
|
target/
|
||||||
|
|
||||||
/src/test
|
/src/test
|
||||||
/src/rebel.xml
|
/src/rebel.xml
|
||||||
/src/META-INF
|
/src/META-INF
|
||||||
### IntelliJ IDEA ###
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
|
||||||
|
/log
|
||||||
|
|
||||||
|
/src/test
|
||||||
|
/src/rebel.xml
|
||||||
|
/src/META-INF
|
||||||
|
|
||||||
/log
|
/log
|
||||||
/build/
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,24 @@
|
||||||
|
#\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
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
description = "子模块demo项目"
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
// 子项目私有依赖添加
|
|
||||||
implementation project(':secondev-chapanda-portal')
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
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{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
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{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
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 {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
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 {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
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{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
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{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
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{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
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{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
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 {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
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{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
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 {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
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 {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
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() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
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() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,241 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,348 @@
|
||||||
|
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 synchronized 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 synchronized 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;
|
||||||
|
} else {
|
||||||
|
String[] split = date.split("-");
|
||||||
|
String end;
|
||||||
|
if (split.length > 0) {
|
||||||
|
end = getFormatDate(split[0]);
|
||||||
|
if (end.length() == 4) {
|
||||||
|
if (isStudy) {
|
||||||
|
end = end + "-09-01";
|
||||||
|
} else {
|
||||||
|
end = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dataRangeMap.put("kssj", end);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (split.length > 1) {
|
||||||
|
end = getFormatDate(split[1]);
|
||||||
|
if (end.length() == 4) {
|
||||||
|
if (isStudy) {
|
||||||
|
end = end + "-07-01";
|
||||||
|
} else {
|
||||||
|
end = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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 "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,118 @@
|
||||||
|
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.writeLog("匹配职位开始:positionName=" + positionName + ",mobile=" + mobile);
|
||||||
|
// 根据职位名称、查询招聘中的数据
|
||||||
|
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)) {
|
||||||
|
rs.writeLog("positionName=" + positionName + ",未查询到该名称职位");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 只有一条数据,直接返回当前数据,如果有多个,再添加其他条件过滤
|
||||||
|
if (positionPoList.size() == 1) {
|
||||||
|
PositionPo positionPo = positionPoList.get(0);
|
||||||
|
rs.writeLog("positionName=" + positionName + ",返回职位:id=" + positionPo.getId() + ",name=" + positionPo.getName());
|
||||||
|
return positionPo.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)) {
|
||||||
|
PositionPo positionPo = positionPoList.stream().sorted(Comparator.comparing(PositionPo::getCreationTime).reversed()).collect(Collectors.toList()).get(0);
|
||||||
|
rs.writeLog("positionName=" + positionName + ",mobile=" + mobile + ",跟进人手机号未获取到,选择最新的一条数据");
|
||||||
|
rs.writeLog("positionName=" + positionName + ",返回职位:id=" + positionPo.getId() + ",name=" + positionPo.getName());
|
||||||
|
// 跟进人手机号未获取到,选择最新的一条数据
|
||||||
|
return positionPo.getId();
|
||||||
|
} else {
|
||||||
|
// 再一样,就默认匹配到创建时间最新的职位
|
||||||
|
PositionPo positionPo = filterList.get(0);
|
||||||
|
rs.writeLog("positionName=" + positionName + ",返回职位:id=" + positionPo.getId() + ",name=" + positionPo.getName());
|
||||||
|
return positionPo.getId();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,152 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,94 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,80 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,209 @@
|
||||||
|
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.replaceAll("[\\pC]", "").replace("\\n", "\n").replace("\\r", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
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("不支持的操作类型");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
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("不支持的操作类型");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
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("不支持的操作类型");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
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("不支持的操作类型");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
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("不支持的发布渠道");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
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);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,489 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
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);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,697 @@
|
||||||
|
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 ids = Util.null2String(params.get("ids"));
|
||||||
|
// 校验所选
|
||||||
|
rs.executeQuery("select id from uf_jcl_yppc where zt != 0 and id in(" + ids + ")");
|
||||||
|
if (rs.next()) {
|
||||||
|
throw new CustomizeRunTimeException("操作失败,当前存在非待分配简历数据,请刷新后重试");
|
||||||
|
}
|
||||||
|
String ypzw = Util.null2String(params.get("ypzw"));
|
||||||
|
String zplc = Util.null2String(params.get("zplc"));
|
||||||
|
String zpjd = Util.null2String(params.get("zpjd"));
|
||||||
|
String dqypjd = Util.null2String(params.get("dqypjd"));
|
||||||
|
if (StringUtils.isBlank(ypzw)) {
|
||||||
|
throw new CustomizeRunTimeException("应聘职位不可为空");
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(zplc)) {
|
||||||
|
throw new CustomizeRunTimeException("未获取到招聘流程,请检查招聘职位配置");
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(zpjd)) {
|
||||||
|
throw new CustomizeRunTimeException("未获取到招聘阶段,请检查招聘流程配置");
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(dqypjd)) {
|
||||||
|
throw new CustomizeRunTimeException("当前应聘阶段获取失败");
|
||||||
|
}
|
||||||
|
rs.executeUpdate("update uf_jcl_yppc set ypzw = ? , zplc = ? , zpjd = ? , dqypjd = ?, zt = 1 where id in(" + ids + ")", ypzw, zplc, zpjd, dqypjd);
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,257 @@
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,590 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,130 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,342 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,695 @@
|
||||||
|
package com.engine.recruit.system;
|
||||||
|
|
||||||
|
import com.api.doc.detail.util.DocDownloadCheckUtil;
|
||||||
|
import com.api.hrm.service.HrmResourceBaseService;
|
||||||
|
import com.api.hrm.util.ServiceUtil;
|
||||||
|
import com.engine.common.biz.SimpleBizLogger;
|
||||||
|
import com.engine.common.constant.BizLogOperateAuditType;
|
||||||
|
import com.engine.common.constant.BizLogOperateType;
|
||||||
|
import com.engine.common.constant.BizLogSmallType4Hrm;
|
||||||
|
import com.engine.common.constant.BizLogType;
|
||||||
|
import com.engine.common.entity.BizLogContext;
|
||||||
|
import com.engine.common.service.impl.HrmCommonServiceImpl;
|
||||||
|
import com.engine.common.util.LogUtil;
|
||||||
|
import com.engine.hrm.entity.RuleCodeType;
|
||||||
|
import com.engine.hrm.util.CodeRuleManager;
|
||||||
|
import com.engine.hrm.util.HrmWeakPasswordUtil;
|
||||||
|
import com.engine.hrm.util.face.HrmFaceCheckManager;
|
||||||
|
import com.engine.hrm.util.face.ValidateFieldManager;
|
||||||
|
import com.engine.hrm.util.face.bean.CheckItemBean;
|
||||||
|
import com.weaver.general.BaseBean;
|
||||||
|
import ln.LN;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import weaver.common.DateUtil;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.conn.RecordSetTrans;
|
||||||
|
import weaver.file.Prop;
|
||||||
|
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||||
|
import weaver.general.GCONST;
|
||||||
|
import weaver.general.PasswordUtil;
|
||||||
|
import weaver.general.Util;
|
||||||
|
import weaver.hrm.HrmUserVarify;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
import weaver.hrm.common.DbFunctionUtil;
|
||||||
|
import weaver.hrm.company.DepartmentComInfo;
|
||||||
|
import weaver.hrm.companyvirtual.DepartmentVirtualComInfo;
|
||||||
|
import weaver.hrm.finance.SalaryManager;
|
||||||
|
import weaver.hrm.passwordprotection.manager.HrmResourceManager;
|
||||||
|
import weaver.hrm.privacy.PrivacyComInfo;
|
||||||
|
import weaver.hrm.privacy.UserPrivacyComInfo;
|
||||||
|
import weaver.hrm.resource.ResourceComInfo;
|
||||||
|
import weaver.hrm.settings.ChgPasswdReminder;
|
||||||
|
import weaver.hrm.settings.RemindSettings;
|
||||||
|
import weaver.hrm.tools.HrmDateCheck;
|
||||||
|
import weaver.interfaces.hrm.HrmServiceManager;
|
||||||
|
import weaver.license.PluginUserCheck;
|
||||||
|
import weaver.rsa.security.RSA;
|
||||||
|
import weaver.rtx.OrganisationCom;
|
||||||
|
import weaver.rtx.OrganisationComRunnable;
|
||||||
|
import weaver.system.SysRemindWorkflow;
|
||||||
|
import weaver.systeminfo.SystemEnv;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/10/11
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class ResourceSyncUtil {
|
||||||
|
private static final char SEPARATOR = Util.getSeparator();
|
||||||
|
private static final String TODAY = DateUtil.getCurrentDate();
|
||||||
|
|
||||||
|
public static Map<String, Object> addResource(User user, Map<String, Object> params) {
|
||||||
|
|
||||||
|
Map<String, Object> returnMap = new HashMap<>();
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
String sql;
|
||||||
|
try {
|
||||||
|
DepartmentComInfo departmentComInfo = new DepartmentComInfo();
|
||||||
|
boolean canEdit = HrmUserVarify.checkUserRight("HrmResourceEdit:Edit", user);
|
||||||
|
if (!canEdit) {
|
||||||
|
returnMap.put("status", "-1");
|
||||||
|
returnMap.put("message", SystemEnv.getHtmlLabelName(22620, user.getLanguage()));
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
String loginId = Util.null2String(params.get("loginid"));
|
||||||
|
String accountType = Util.null2s(Util.fromScreen3(Util.null2String(params.get(("accounttype"))), user.getLanguage()), "0");
|
||||||
|
if ("1".equals(accountType)) {
|
||||||
|
//次账号没有loginId
|
||||||
|
loginId = "";
|
||||||
|
}
|
||||||
|
boolean canSave = false;
|
||||||
|
LN LN = new LN();
|
||||||
|
int ckHrmnum = LN.CkHrmnum();
|
||||||
|
if (loginId.length() > 0) {
|
||||||
|
if (ckHrmnum < 0) {
|
||||||
|
//只有License检查人数小于规定人数,才能修改。防止客户直接修改数据库数据
|
||||||
|
canSave = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
canSave = true;
|
||||||
|
}
|
||||||
|
if (!canSave) {
|
||||||
|
returnMap.put("status", "-1");
|
||||||
|
returnMap.put("message", SystemEnv.getHtmlLabelName(84760, user.getLanguage()));
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!"".equals(loginId) && "0".equals(accountType)) {
|
||||||
|
sql = "select count(1) from hrmresourceallview where loginid='" + loginId + "' ";
|
||||||
|
rs.execute(sql);
|
||||||
|
if (rs.next()) {
|
||||||
|
if (rs.getInt(1) > 0) {
|
||||||
|
returnMap.put("status", "-1");
|
||||||
|
returnMap.put("message", SystemEnv.getHtmlLabelName(15094, user.getLanguage()));
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String departmentid = Util.null2String(params.get("departmentid"));
|
||||||
|
String subcompanyid = departmentComInfo.getSubcompanyid1(departmentid);
|
||||||
|
if (!"".equals(loginId) && !"0".equals(subcompanyid) && new HrmResourceManager().noMore(subcompanyid)) {
|
||||||
|
returnMap.put("status", "-1");
|
||||||
|
returnMap.put("message", SystemEnv.getHtmlLabelName(81926, user.getLanguage()));
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ResourceComInfo ResourceComInfo = new ResourceComInfo();
|
||||||
|
Map<String, String> result = addResourceBase(user, params);
|
||||||
|
|
||||||
|
String addResourceBaseCode = result.get("status");
|
||||||
|
if ("-1".equals(addResourceBaseCode)) {
|
||||||
|
returnMap.put("status", "-1");
|
||||||
|
returnMap.put("message", result.get("message"));
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int id = Util.getIntValue(result.get("id"));
|
||||||
|
String password = Util.null2String(params.get("password"));
|
||||||
|
//是否开启了RSA加密
|
||||||
|
String openRSA = Util.null2String(Prop.getPropValue("openRSA", "isrsaopen"));
|
||||||
|
if ("1".equals(openRSA)) {
|
||||||
|
password = new RSA().decrypt(password);
|
||||||
|
}
|
||||||
|
ChgPasswdReminder reminder = new ChgPasswdReminder();
|
||||||
|
RemindSettings settings = reminder.getRemindSettings();
|
||||||
|
|
||||||
|
//判断是否开启了【启用初始密码】
|
||||||
|
String defaultPasswordEnable = Util.null2String(settings.getDefaultPasswordEnable());
|
||||||
|
//【初始密码】
|
||||||
|
String defaultPassword = Util.null2String(settings.getDefaultPassword());
|
||||||
|
//如果管理员设置的密码为空。并且开启了【启用初始密码】,且初始密码不为空,则默认取初始密码作为密码
|
||||||
|
if ("".equals(password) && "1".equals(defaultPasswordEnable) && !"".equals(defaultPassword)) {
|
||||||
|
password = defaultPassword;
|
||||||
|
}
|
||||||
|
|
||||||
|
//判断是否开启了【禁止弱密码保存】
|
||||||
|
String weakPasswordDisable = Util.null2s(settings.getWeakPasswordDisable(), "0");
|
||||||
|
if ("1".equals(weakPasswordDisable)) {
|
||||||
|
if (!"".equals(password)) {//密码为空的情况
|
||||||
|
//判断是否为弱密码
|
||||||
|
HrmWeakPasswordUtil hrmWeakPasswordUtil = new HrmWeakPasswordUtil();
|
||||||
|
if (hrmWeakPasswordUtil.isWeakPsd(password)) {
|
||||||
|
returnMap.put("status", "-1");
|
||||||
|
returnMap.put("message", SystemEnv.getHtmlLabelName(515420, user.getLanguage()));
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int secLevel = Util.getIntValue(Util.null2String(params.get("seclevel")), 0);
|
||||||
|
if (id > 0) {
|
||||||
|
//保存系统信息
|
||||||
|
SimpleBizLogger logger = new SimpleBizLogger();
|
||||||
|
BizLogContext bizLogContext = new BizLogContext();
|
||||||
|
bizLogContext.setLogType(BizLogType.HRM);//模块类型
|
||||||
|
bizLogContext.setBelongType(BizLogSmallType4Hrm.HRM_RSOURCE_CARD);//所属大类型
|
||||||
|
bizLogContext.setLogSmallType(BizLogSmallType4Hrm.HRM_RSOURCE_CARD_SYSTEM);//当前小类型
|
||||||
|
bizLogContext.setOperateType(BizLogOperateType.ADD);
|
||||||
|
bizLogContext.setOperateAuditType(BizLogOperateAuditType.WARNING);
|
||||||
|
bizLogContext.setParams(params);//当前request请求参数
|
||||||
|
logger.setUser(user);//当前操作人
|
||||||
|
String mainSql = "select * from hrmresource where id=" + id;
|
||||||
|
logger.setMainSql(mainSql, "id");//主表sql
|
||||||
|
logger.setMainPrimarykey("id");//主日志表唯一key
|
||||||
|
logger.setMainTargetNameColumn("lastname");//当前targetName对应的列(对应日志中的对象名)
|
||||||
|
logger.before(bizLogContext);//写入操作前日志
|
||||||
|
|
||||||
|
String workStartDate = Util.null2String(params.get("workstartdate"));//参加工作日期
|
||||||
|
String companyStartDate = Util.null2String(params.get("companystartdate"));//入职日期
|
||||||
|
String certificateNum = Util.null2String(params.get("certificatenum"));//身份证号
|
||||||
|
String probationEndDate = Util.null2String(params.get("probationenddate"));//试用期结束日期
|
||||||
|
|
||||||
|
String dspOrder = Util.fromScreen3(Util.null2String(params.get("dsporder")), user.getLanguage());
|
||||||
|
if (dspOrder.length() == 0) {
|
||||||
|
dspOrder = "" + id;
|
||||||
|
}
|
||||||
|
if ("0".equals(accountType)) {
|
||||||
|
|
||||||
|
String encrptPassword = "";
|
||||||
|
String salt = "";
|
||||||
|
if (StringUtils.isNotBlank(password)) {
|
||||||
|
String[] encrypts = PasswordUtil.encrypt(password);
|
||||||
|
encrptPassword = encrypts[0];
|
||||||
|
salt = encrypts[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
sql = " update hrmresource set loginid='" + loginId + "', password='" + encrptPassword + "'," +
|
||||||
|
"seclevel=" + secLevel + ",dsporder=" + dspOrder +
|
||||||
|
",salt='" + salt + "',workstartdate='" + workStartDate + "',companystartdate='" + companyStartDate + "' where id = " + id;
|
||||||
|
} else {
|
||||||
|
sql = " update hrmresource set seclevel=" + secLevel + ",dsporder=" + dspOrder +
|
||||||
|
" ,workstartdate='" + workStartDate + "',companystartdate='" + companyStartDate + "' where id = " + id;
|
||||||
|
}
|
||||||
|
// 计算工龄、司龄
|
||||||
|
updateWorkInfo(String.valueOf(id), user, params);
|
||||||
|
|
||||||
|
rs.execute(sql);
|
||||||
|
|
||||||
|
// 更新身份证、试用期结束日期
|
||||||
|
sql = " update hrmresource set certificatenum='" + certificateNum + "',probationenddate ='" + probationEndDate + "' where id = " + id;
|
||||||
|
rs.executeUpdate(sql);
|
||||||
|
|
||||||
|
HrmFaceCheckManager.setUserPassowrd(id + "", password);
|
||||||
|
HrmFaceCheckManager.sync(id + "", HrmFaceCheckManager.getOptUpdate(), "HrmResourceAddService_saveSimple_update", HrmFaceCheckManager.getOaResource());
|
||||||
|
|
||||||
|
LogUtil.writeBizLog(logger.getBizLogContexts());
|
||||||
|
}
|
||||||
|
|
||||||
|
//同步RTX端的用户信息.
|
||||||
|
new OrganisationCom().checkUser(id);
|
||||||
|
new Thread(new OrganisationComRunnable("user", "add", "" + id)).start();
|
||||||
|
ResourceComInfo.updateResourceInfoCache("" + id);
|
||||||
|
new PluginUserCheck().clearPluginUserCache("messager");
|
||||||
|
//OA与第三方接口单条数据同步方法开始
|
||||||
|
new HrmServiceManager().SynInstantHrmResource("" + id, "1");
|
||||||
|
//OA与第三方接口单条数据同步方法结束
|
||||||
|
//BBS集成相关
|
||||||
|
String bbsLingUrl = new weaver.general.BaseBean().getPropValue(GCONST.getConfigFile(), "ecologybbs.linkUrl");
|
||||||
|
if (!"0".equals(password)) {
|
||||||
|
if (!"".equals(bbsLingUrl)) {
|
||||||
|
new Thread(new weaver.bbs.BBSRunnable(loginId, password)).start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
returnMap.put("id", id);
|
||||||
|
returnMap.put("status", "1");
|
||||||
|
} catch (Exception e) {
|
||||||
|
new BaseBean().writeLog("保存新建人员simple错误:" + e);
|
||||||
|
returnMap.put("status", "-1");
|
||||||
|
returnMap.put("message", "" + weaver.systeminfo.SystemEnv.getHtmlLabelName(22620, weaver.general.ThreadVarLanguage.getLang()) + "");
|
||||||
|
}
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Map<String, String> addResourceBase(User user, Map<String, Object> params) {
|
||||||
|
Map<String, String> retmap = new HashMap<>();
|
||||||
|
try {
|
||||||
|
retmap.put("id", "0");
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
DepartmentComInfo DepartmentComInfo = new DepartmentComInfo();
|
||||||
|
ResourceComInfo ResourceComInfo = new ResourceComInfo();
|
||||||
|
SalaryManager SalaryManager = new SalaryManager();
|
||||||
|
ChgPasswdReminder reminder = new ChgPasswdReminder();
|
||||||
|
RemindSettings settings = reminder.getRemindSettings();
|
||||||
|
SysRemindWorkflow SysRemindWorkflow = new SysRemindWorkflow();
|
||||||
|
DepartmentVirtualComInfo DepartmentVirtualComInfo = new DepartmentVirtualComInfo();
|
||||||
|
|
||||||
|
StringBuilder para;
|
||||||
|
String cmd = Util.null2String(params.get("cmd"));
|
||||||
|
String id = Util.null2String(params.get("id"));
|
||||||
|
String workcode = Util.fromScreen3(Util.null2String(params.get("workcode")), user.getLanguage());
|
||||||
|
String lastname = Util.fromScreen3(Util.null2String(params.get("lastname")), user.getLanguage()).trim();
|
||||||
|
String sex = Util.fromScreen3(Util.null2String(params.get("sex")), user.getLanguage());
|
||||||
|
String resourceimageid = Util.null2String(params.get("resourceimageid"));
|
||||||
|
if (resourceimageid.length() > 0) {
|
||||||
|
resourceimageid = "" + DocDownloadCheckUtil.getDownloadfileidstr(resourceimageid);
|
||||||
|
}
|
||||||
|
String departmentid = Util.fromScreen3(Util.null2String(params.get("departmentid")), user.getLanguage());
|
||||||
|
String costcenterid = Util.fromScreen3(Util.null2String(params.get("costcenterid")), user.getLanguage());
|
||||||
|
String jobtitle = Util.fromScreen3(Util.null2String(params.get("jobtitle")), user.getLanguage());
|
||||||
|
String joblevel = Util.fromScreen3(Util.null2String(params.get("joblevel")), user.getLanguage());
|
||||||
|
String jobactivitydesc = Util.fromScreen3(Util.null2String(params.get("jobactivitydesc")), user.getLanguage());
|
||||||
|
String managerid = Util.fromScreen3(Util.null2String(params.get("managerid")), user.getLanguage());
|
||||||
|
String assistantid = Util.fromScreen3(Util.null2String(params.get("assistantid")), user.getLanguage());
|
||||||
|
String status = Util.fromScreen3(Util.null2String(params.get("status")), user.getLanguage());
|
||||||
|
if (StringUtils.isBlank(status)) {
|
||||||
|
status = "0";
|
||||||
|
}
|
||||||
|
String locationid = Util.fromScreen3(Util.null2String(params.get("locationid")), user.getLanguage());
|
||||||
|
String workroom = Util.fromScreen3(Util.null2String(params.get("workroom")), user.getLanguage());
|
||||||
|
String telephone = Util.fromScreen3(Util.null2String(params.get("telephone")), user.getLanguage());
|
||||||
|
String mobile = Util.fromScreen3(Util.null2String(params.get("mobile")), user.getLanguage());
|
||||||
|
String mobileshowtype = Util.fromScreen3(Util.null2String(params.get("mobileshowtype")), user.getLanguage());
|
||||||
|
String mobilecall = Util.fromScreen3(Util.null2String(params.get("mobilecall")), user.getLanguage());
|
||||||
|
String fax = Util.fromScreen3(Util.null2String(params.get("fax")), user.getLanguage());
|
||||||
|
String jobcall = Util.fromScreen3(Util.null2String(params.get("jobcall")), user.getLanguage());
|
||||||
|
String email = Util.fromScreen3(Util.null2String(params.get("email")), user.getLanguage());
|
||||||
|
String dsporder = Util.fromScreen3(Util.null2String(params.get("dsporder")), user.getLanguage());
|
||||||
|
String accounttype = Util.fromScreen3(Util.null2String(params.get("accounttype")), user.getLanguage());
|
||||||
|
String systemlanguage = Util.null2String(params.get("systemlanguage"));
|
||||||
|
if ("".equals(systemlanguage) || "0".equals(systemlanguage)) {
|
||||||
|
systemlanguage = "7";
|
||||||
|
}
|
||||||
|
String belongto = Util.fromScreen3(Util.null2String(params.get("belongto")), user.getLanguage());
|
||||||
|
//应聘人员id
|
||||||
|
String rcid = Util.null2String(params.get("rcId"));
|
||||||
|
|
||||||
|
CheckItemBean mobileBean = new CheckItemBean("mobile", mobile, id);
|
||||||
|
ValidateFieldManager.validate(mobileBean);
|
||||||
|
if (!mobileBean.isPass()) {
|
||||||
|
retmap.put("status", "-1");
|
||||||
|
retmap.put("message", mobileBean.getCheckMsg());
|
||||||
|
return retmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckItemBean telephoneBean = new CheckItemBean("telephone", telephone, id);
|
||||||
|
ValidateFieldManager.validate(telephoneBean);
|
||||||
|
if (!telephoneBean.isPass()) {
|
||||||
|
retmap.put("status", "-1");
|
||||||
|
retmap.put("message", telephoneBean.getCheckMsg());
|
||||||
|
return retmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (dsporder.length() == 0) {
|
||||||
|
dsporder = id;
|
||||||
|
}
|
||||||
|
if ("0".equals(accounttype)) {
|
||||||
|
belongto = "-1";
|
||||||
|
}
|
||||||
|
String departmentvirtualids = Util.null2String(params.get("departmentvirtualids"));//虚拟部门id;
|
||||||
|
|
||||||
|
//Td9325,解决多账号次账号没有登陆Id在浏览框组织结构中无法显示的问题。
|
||||||
|
boolean falg = false;
|
||||||
|
String loginid = "";
|
||||||
|
if ("1".equals(accounttype)) {
|
||||||
|
rs.execute("select loginid from HrmResource where id =" + belongto);
|
||||||
|
if (rs.next()) {
|
||||||
|
loginid = rs.getString("loginid");
|
||||||
|
}
|
||||||
|
if (!"".equals(loginid)) {
|
||||||
|
String maxidsql = "select max(id) as id from HrmResource where loginid like '" + loginid + "%'";
|
||||||
|
rs.execute(maxidsql);
|
||||||
|
if (rs.next()) {
|
||||||
|
loginid = loginid + (rs.getInt("id") + 1);
|
||||||
|
falg = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rs.executeProc("HrmResourceMaxId_Get", "");
|
||||||
|
rs.next();
|
||||||
|
id = "" + rs.getInt(1);
|
||||||
|
if (!"".equals(rcid)) {
|
||||||
|
id = rcid;
|
||||||
|
}
|
||||||
|
SimpleBizLogger logger = new SimpleBizLogger();
|
||||||
|
BizLogContext bizLogContext = new BizLogContext();
|
||||||
|
bizLogContext.setLogType(BizLogType.HRM);//模块类型
|
||||||
|
bizLogContext.setBelongType(BizLogSmallType4Hrm.HRM_RSOURCE_CARD);//所属大类型
|
||||||
|
bizLogContext.setBelongTypeTargetName(SystemEnv.getHtmlLabelName(1361, user.getLanguage()));
|
||||||
|
bizLogContext.setLogSmallType(BizLogSmallType4Hrm.HRM_RSOURCE_CARD_BASE);//当前小类型
|
||||||
|
bizLogContext.setOperateType(BizLogOperateType.ADD);
|
||||||
|
bizLogContext.setParams(params);//当前request请求参数
|
||||||
|
logger.setUser(user);//当前操作人
|
||||||
|
String cusFieldNames = ServiceUtil.getCusFieldNames("HrmCustomFieldByInfoType", -1, "b");
|
||||||
|
String mainSql = "select a.*" + (cusFieldNames.length() > 0 ? "," + cusFieldNames : "") + " from hrmresource a left join cus_fielddata b on a.id=b.id and b.scope='HrmCustomFieldByInfoType' and b.scopeid=-1 where a.id=" + id;
|
||||||
|
logger.setMainSql(mainSql, "id");//主表sql
|
||||||
|
logger.setMainPrimarykey("id");//主日志表唯一key
|
||||||
|
logger.setMainTargetNameColumn("lastname");//当前targetName对应的列(对应日志中的对象名)
|
||||||
|
logger.before(bizLogContext);//写入操作前日志
|
||||||
|
|
||||||
|
String sql = "select managerstr, seclevel from HrmResource where id = " + Util.getIntValue(managerid);
|
||||||
|
rs.execute(sql);
|
||||||
|
String managerstr = "";
|
||||||
|
while (rs.next()) {
|
||||||
|
String tmp_managerstr = rs.getString("managerstr");
|
||||||
|
//处理managerstr 不以逗号开始或者结束的情况 形如 managerstr:8 begin
|
||||||
|
if (!tmp_managerstr.startsWith(",")) {
|
||||||
|
tmp_managerstr = "," + tmp_managerstr;
|
||||||
|
}
|
||||||
|
if (!tmp_managerstr.endsWith(",")) {
|
||||||
|
tmp_managerstr = tmp_managerstr + ",";
|
||||||
|
}
|
||||||
|
//处理managerstr 不以逗号开始或者结束的情况 形如 managerstr:8 end
|
||||||
|
managerstr += tmp_managerstr;
|
||||||
|
managerstr = "," + managerid + managerstr;
|
||||||
|
managerstr = managerstr.endsWith(",") ? managerstr : (managerstr + ",");
|
||||||
|
}
|
||||||
|
|
||||||
|
String subcmpanyid1 = DepartmentComInfo.getSubcompanyid1(departmentid);
|
||||||
|
RecordSetTrans rst = new RecordSetTrans();
|
||||||
|
rst.setAutoCommit(false);
|
||||||
|
try {
|
||||||
|
if (resourceimageid.length() == 0) {
|
||||||
|
resourceimageid = "null";
|
||||||
|
}
|
||||||
|
if (costcenterid.length() == 0) {
|
||||||
|
costcenterid = "null";
|
||||||
|
}
|
||||||
|
if (managerid.length() == 0) {
|
||||||
|
managerid = "null";
|
||||||
|
}
|
||||||
|
if (assistantid.length() == 0) {
|
||||||
|
assistantid = "null";
|
||||||
|
}
|
||||||
|
if (accounttype.length() == 0) {
|
||||||
|
accounttype = "null";
|
||||||
|
}
|
||||||
|
if (belongto.length() == 0) {
|
||||||
|
belongto = "null";
|
||||||
|
}
|
||||||
|
if (jobcall.length() == 0) {
|
||||||
|
jobcall = "null";
|
||||||
|
}
|
||||||
|
if (mobileshowtype.length() == 0) {
|
||||||
|
mobileshowtype = "null";
|
||||||
|
}
|
||||||
|
if ("postgresql".equalsIgnoreCase(rst.getDBType())) {
|
||||||
|
if (joblevel.length() == 0) {
|
||||||
|
joblevel = null;
|
||||||
|
}
|
||||||
|
if (dsporder.length() == 0) {
|
||||||
|
dsporder = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
workcode = CodeRuleManager.getCodeRuleManager().generateRuleCode(RuleCodeType.USER, subcmpanyid1, departmentid, jobtitle, workcode);
|
||||||
|
para = new StringBuilder("" + id + SEPARATOR + workcode + SEPARATOR + lastname + SEPARATOR + sex + SEPARATOR + resourceimageid + SEPARATOR +
|
||||||
|
departmentid + SEPARATOR + costcenterid + SEPARATOR + jobtitle + SEPARATOR + joblevel + SEPARATOR + jobactivitydesc + SEPARATOR +
|
||||||
|
managerid + SEPARATOR + assistantid + SEPARATOR + status + SEPARATOR + locationid + SEPARATOR + workroom + SEPARATOR + telephone +
|
||||||
|
SEPARATOR + mobile + SEPARATOR + mobilecall + SEPARATOR + fax + SEPARATOR + jobcall + SEPARATOR + subcmpanyid1 + SEPARATOR + managerstr +
|
||||||
|
SEPARATOR + accounttype + SEPARATOR + belongto + SEPARATOR + systemlanguage + SEPARATOR + email + SEPARATOR + dsporder + SEPARATOR + mobileshowtype);
|
||||||
|
|
||||||
|
rst.executeProc("HrmResourceBasicInfo_Insert", para.toString());
|
||||||
|
if (Util.null2String(locationid).length() > 0) {
|
||||||
|
rst.executeSql("update hrmresource set countryid=(select countryid from HrmLocations where id=" + locationid + "),"
|
||||||
|
+ DbFunctionUtil.getInsertUpdateSetSql(rst.getDBType(), user.getUID()) + " where id=" + id);
|
||||||
|
}
|
||||||
|
String logidsql, quickSearchStr = new HrmCommonServiceImpl().generateQuickSearchStr(lastname);
|
||||||
|
if (falg) {
|
||||||
|
logidsql = "update HrmResource set loginid = ?, pinyinlastname = ?, ecology_pinyin_search = ? where id = ?";
|
||||||
|
rst.executeUpdate(logidsql, loginid, quickSearchStr, quickSearchStr, id);
|
||||||
|
} else {
|
||||||
|
logidsql = "update HrmResource set pinyinlastname = ?, ecology_pinyin_search = ? where id = ?";
|
||||||
|
rst.executeUpdate(logidsql, quickSearchStr, quickSearchStr, id);
|
||||||
|
}
|
||||||
|
rst.commit();
|
||||||
|
} catch (Exception e) {
|
||||||
|
rst.rollback();
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean formdefined = false;
|
||||||
|
weaver.system.CusFormSettingComInfo CusFormSettingComInfo = new weaver.system.CusFormSettingComInfo();
|
||||||
|
weaver.system.CusFormSetting CusFormSetting = CusFormSettingComInfo.getCusFormSetting("hrm", "HrmResourceBase");
|
||||||
|
if (CusFormSetting != null) {
|
||||||
|
if (CusFormSetting.getStatus() == 2) {
|
||||||
|
//自定义布局页面
|
||||||
|
formdefined = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int userid = user.getUID();
|
||||||
|
String userpara = "" + userid + SEPARATOR + TODAY;
|
||||||
|
para = new StringBuilder("" + id);
|
||||||
|
for (int i = 0; i < 5; i++) {
|
||||||
|
int idx = i;
|
||||||
|
if (formdefined) {
|
||||||
|
idx++;
|
||||||
|
}
|
||||||
|
String datefield = Util.null2String(params.get("datefield" + idx));
|
||||||
|
String numberfield = "" + Util.getDoubleValue(Util.null2String(params.get("numberfield" + idx)), 0);
|
||||||
|
String textfield = Util.null2String(params.get("textfield" + idx));
|
||||||
|
String tinyintfield = "" + Util.getIntValue(Util.null2String(params.get("tinyintfield" + idx)), 0);
|
||||||
|
para.append(SEPARATOR).append(datefield).append(SEPARATOR).append(numberfield).append(SEPARATOR).append(textfield).append(SEPARATOR).append(tinyintfield);
|
||||||
|
}
|
||||||
|
rs.executeProc("HrmResourceDefine_Update", para.toString());
|
||||||
|
rs.executeProc("HrmResource_CreateInfo", "" + id + SEPARATOR + userpara + SEPARATOR + userpara);
|
||||||
|
|
||||||
|
//421944 用户自定义隐私设置
|
||||||
|
|
||||||
|
UserPrivacyComInfo upc = new UserPrivacyComInfo();
|
||||||
|
PrivacyComInfo pc = new PrivacyComInfo();
|
||||||
|
Map<String, String> mapShowSets = pc.getMapShowSets();
|
||||||
|
String insertSql;
|
||||||
|
rs = new RecordSet();
|
||||||
|
try {
|
||||||
|
String deletePriSql = " delete from userprivacysetting where userid= '" + id + "'";
|
||||||
|
rs.execute(deletePriSql);
|
||||||
|
for (Map.Entry<String, String> me : mapShowSets.entrySet()) {
|
||||||
|
String fieldName = me.getKey();
|
||||||
|
String fieldVal = Util.null2String(mapShowSets.get(fieldName));
|
||||||
|
if ("1".equals(fieldVal)) {
|
||||||
|
String tmpPK = id + "__" + fieldName;
|
||||||
|
String tmpPvalue = Util.null2String(params.get(fieldName + "showtype"));
|
||||||
|
insertSql = "insert into userprivacysetting (combinedid,userid,ptype,pvalue) values('" + tmpPK + "','" + id + "','" + fieldName + "','" + tmpPvalue + "')";
|
||||||
|
rs.execute(insertSql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
upc.removeUserPrivacyCache();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 改为只进行该人缓存信息的添加
|
||||||
|
ResourceComInfo.addResourceInfoCache(id);
|
||||||
|
SalaryManager.initResourceSalary(id);
|
||||||
|
|
||||||
|
para = new StringBuilder("" + id + SEPARATOR + managerid + SEPARATOR + departmentid + SEPARATOR + subcmpanyid1 + SEPARATOR + "0" + SEPARATOR + managerstr);
|
||||||
|
rs.executeProc("HrmResource_Trigger_Insert", para.toString());
|
||||||
|
|
||||||
|
String sql_1 = ("insert into HrmInfoStatus (itemid,hrmid) values(1," + id + ")");
|
||||||
|
rs.execute(sql_1);
|
||||||
|
String sql_2 = ("insert into HrmInfoStatus (itemid,hrmid) values(2," + id + ")");
|
||||||
|
rs.execute(sql_2);
|
||||||
|
String sql_3 = ("insert into HrmInfoStatus (itemid,hrmid) values(3," + id + ")");
|
||||||
|
rs.execute(sql_3);
|
||||||
|
String sql_10 = ("insert into HrmInfoStatus (itemid,hrmid) values(10," + id + ")");
|
||||||
|
rs.execute(sql_10);
|
||||||
|
|
||||||
|
String CurrentUser = "" + user.getUID();
|
||||||
|
String CurrentUserName = "" + user.getUsername();
|
||||||
|
String SWFAccepter;
|
||||||
|
String SWFTitle;
|
||||||
|
String SWFRemark;
|
||||||
|
String SWFSubmiter;
|
||||||
|
String Subject;
|
||||||
|
Subject = SystemEnv.getHtmlLabelName(15670, user.getLanguage());
|
||||||
|
Subject += ":" + lastname;
|
||||||
|
|
||||||
|
//modifier by lvyi 2013-12-31
|
||||||
|
if ("1".equals(settings.getEntervalid())) {//入职提醒
|
||||||
|
String thesql = "select hrmids from HrmInfoMaintenance where id<4 or id = 10";
|
||||||
|
rs.execute(thesql);
|
||||||
|
StringBuilder members = new StringBuilder();
|
||||||
|
while (rs.next()) {
|
||||||
|
String hrmid_tmp = Util.null2String(rs.getString("hrmids"));//TD9392
|
||||||
|
if (hrmid_tmp.length() != 0) {
|
||||||
|
members.append(",").append(rs.getString("hrmids"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!"".equals(members.toString())) {
|
||||||
|
members = new StringBuilder(members.substring(1));
|
||||||
|
members = new StringBuilder(new HrmResourceBaseService().duplicateRemoval(members.toString(), user.getUID() + ""));
|
||||||
|
SWFAccepter = members.toString();
|
||||||
|
SWFTitle = SystemEnv.getHtmlLabelName(15670, user.getLanguage());
|
||||||
|
SWFTitle += ":" + lastname;
|
||||||
|
SWFTitle += "-" + CurrentUserName;
|
||||||
|
SWFTitle += "-" + TODAY;
|
||||||
|
SWFRemark = "<a class='wea-hrm-new-employee-set' onClick=\"openHrmNewEmployeeSetDialog(" + id + ")\" style=\"cursor:pointer;\" id = '" + id + "'>" + Util.fromScreen2(Subject, user.getLanguage()) + "</a>";
|
||||||
|
SWFSubmiter = CurrentUser;
|
||||||
|
SysRemindWorkflow.setPrjSysRemind(SWFTitle, 0, Util.getIntValue(SWFSubmiter), SWFAccepter, SWFRemark);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//CustomFieldTreeManager.editCustomDataE9Add("HrmCustomFieldByInfoType", -1, fu, Util.getIntValue(id, 0));
|
||||||
|
//应聘人员的个人信息18条
|
||||||
|
if (!"".equals(rcid)) {
|
||||||
|
sql = "select * from HrmCareerApply where id = ?";
|
||||||
|
rs.executeQuery(sql, id);
|
||||||
|
if (rs.next()) {
|
||||||
|
String birthday = Util.null2String(rs.getString("birthday"));
|
||||||
|
String folk = Util.null2String(rs.getString("folk"));
|
||||||
|
String nativeplace = Util.null2String(rs.getString("nativeplace"));
|
||||||
|
String regresidentplace = Util.null2String(rs.getString("regresidentplace"));
|
||||||
|
|
||||||
|
String certificatenum = Util.null2String(rs.getString("certificatenum"));
|
||||||
|
String maritalstatus = Util.null2String(rs.getString("maritalstatus"));
|
||||||
|
String policy = Util.null2String(rs.getString("policy"));
|
||||||
|
String bememberdate = Util.null2String(rs.getString("bememberdate"));
|
||||||
|
|
||||||
|
String bepartydate = Util.null2String(rs.getString("bepartydate"));
|
||||||
|
String islabouunion = Util.null2String(rs.getString("islabouunion"));
|
||||||
|
String educationlevel = Util.null2String(rs.getString("educationlevel"));
|
||||||
|
String degree = Util.null2String(rs.getString("degree"));
|
||||||
|
|
||||||
|
String healthinfo = Util.null2String(rs.getString("healthinfo"));
|
||||||
|
|
||||||
|
String height = Util.null2String(rs.getString("height"));
|
||||||
|
if (height.contains(".")) {
|
||||||
|
height = height.substring(0, height.indexOf("."));
|
||||||
|
}
|
||||||
|
String weight = Util.null2String(rs.getString("weight"));
|
||||||
|
if (weight.contains(".")) {
|
||||||
|
weight = weight.substring(0, weight.indexOf("."));
|
||||||
|
}
|
||||||
|
|
||||||
|
String residentplace = Util.null2String(rs.getString("residentplace"));
|
||||||
|
String homeaddress = Util.null2String(rs.getString("homeaddress"));
|
||||||
|
String tempresidentnumber = Util.null2String(rs.getString("tempresidentnumber"));
|
||||||
|
|
||||||
|
para = new StringBuilder("" + id + SEPARATOR + birthday + SEPARATOR + folk + SEPARATOR + nativeplace + SEPARATOR + regresidentplace + SEPARATOR + maritalstatus + SEPARATOR + policy + SEPARATOR + bememberdate + SEPARATOR + bepartydate + SEPARATOR + islabouunion + SEPARATOR + educationlevel + SEPARATOR + degree + SEPARATOR + healthinfo + SEPARATOR + height + SEPARATOR + weight + SEPARATOR + residentplace + SEPARATOR + homeaddress + SEPARATOR + tempresidentnumber + SEPARATOR + certificatenum);
|
||||||
|
RecordSet rs1 = new RecordSet();
|
||||||
|
rs1.executeProc("HrmResourcePersonalInfo_Insert", para.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//更新虚拟组织部门id
|
||||||
|
if (departmentvirtualids.length() > 0) {
|
||||||
|
//保存前先删除需要删除的数据,因为有managerid 所以不能全部删除再保存
|
||||||
|
sql = "delete from hrmresourcevirtual where resourceid=" + id + " and departmentid not in (" + departmentvirtualids + ")";
|
||||||
|
rs.execute(sql);
|
||||||
|
|
||||||
|
String[] departmentvirtualid = departmentvirtualids.split(",");
|
||||||
|
for (String s : departmentvirtualid) {
|
||||||
|
rs.execute(" select count(*) from HrmResourceVirtual where departmentid ='" + s + "' and resourceid = " + id);
|
||||||
|
if (rs.next()) {
|
||||||
|
//如果已存在 无需处理
|
||||||
|
if (rs.getInt(1) > 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//写入
|
||||||
|
int tmpid = 0;
|
||||||
|
rs.execute("select max(id) from HrmResourceVirtual ");
|
||||||
|
if (rs.next()) {
|
||||||
|
tmpid = rs.getInt(1) + 1;
|
||||||
|
}
|
||||||
|
String subcompanyid = DepartmentVirtualComInfo.getSubcompanyid1(s);
|
||||||
|
sql = " insert into HrmResourceVirtual (id,resourceid,subcompanyid,departmentid ) " +
|
||||||
|
" values (" + tmpid + "," + id + "," + subcompanyid + "," + s + ")";
|
||||||
|
rs.execute(sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
LogUtil.writeBizLog(logger.getBizLogContexts());
|
||||||
|
|
||||||
|
HrmFaceCheckManager.sync(id, HrmFaceCheckManager.getOptInsert(), "hrm_e9_HrmResourceBaseService_addResourceBase", HrmFaceCheckManager.getOaResource());
|
||||||
|
//同步RTX端的用户信息.
|
||||||
|
new OrganisationCom().checkUser(Util.getIntValue(id));
|
||||||
|
new Thread(new OrganisationComRunnable("user", "add", "" + id)).start();
|
||||||
|
ResourceComInfo.updateResourceInfoCache("" + id);
|
||||||
|
new PluginUserCheck().clearPluginUserCache("messager");
|
||||||
|
//OA与第三方接口单条数据同步方法开始
|
||||||
|
new HrmServiceManager().SynInstantHrmResource("" + id, "1");
|
||||||
|
//OA与第三方接口单条数据同步方法结束
|
||||||
|
|
||||||
|
//新增人员实时同步到CoreMail邮件系统
|
||||||
|
//CoreMailAPI.synUser(id);
|
||||||
|
retmap.put("status", "1");
|
||||||
|
retmap.put("id", id);
|
||||||
|
} catch (Exception e) {
|
||||||
|
new BaseBean().writeLog("新建人员基本信息错误:" + e);
|
||||||
|
retmap.put("status", "-1");
|
||||||
|
}
|
||||||
|
return retmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void updateWorkInfo(String id, User user, Map<String, Object> params) {
|
||||||
|
try {
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
String sql;
|
||||||
|
String companystartdate = Util.fromScreen3(Util.null2String(params.get("companystartdate")), user.getLanguage());
|
||||||
|
String workstartdate = Util.fromScreen3(Util.null2String(params.get("workstartdate")), user.getLanguage());
|
||||||
|
|
||||||
|
List<String> lsParams = new ArrayList<>();
|
||||||
|
lsParams.add(companystartdate.length() == 0 ? null : companystartdate);
|
||||||
|
lsParams.add(workstartdate.length() == 0 ? null : workstartdate);
|
||||||
|
lsParams.add(id);
|
||||||
|
sql = " update hrmresource set companystartdate=?,workstartdate=? where id=?";
|
||||||
|
rs.executeUpdate(sql, lsParams);
|
||||||
|
HrmDateCheck hrmDateCheck = new HrmDateCheck();
|
||||||
|
hrmDateCheck.calWorkInfo(id);
|
||||||
|
} catch (Exception e) {
|
||||||
|
new BaseBean().writeLog(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建模表转换为人员表集合
|
||||||
|
*
|
||||||
|
* @param params 建模表数据集合
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Map<String, Object> convertEcResourceParams(Map<String, Object> params) {
|
||||||
|
Map<String, Object> convertParams = new HashMap<>();
|
||||||
|
convertParams.put("lastname", RecruitModeUtil.parseBlankToNull(params.get("xm")));
|
||||||
|
convertParams.put("sex", RecruitModeUtil.parseBlankToNull(params.get("xb")));
|
||||||
|
convertParams.put("mobile", RecruitModeUtil.parseBlankToNull(params.get("sjhm")));
|
||||||
|
convertParams.put("email", RecruitModeUtil.parseBlankToNull(params.get("dzyx")));
|
||||||
|
convertParams.put("departmentid", RecruitModeUtil.parseBlankToNull(params.get("rzbm")));
|
||||||
|
convertParams.put("managerid", RecruitModeUtil.parseBlankToNull(params.get("zjsj")));
|
||||||
|
convertParams.put("jobtitle", RecruitModeUtil.parseBlankToNull(params.get("gw")));
|
||||||
|
convertParams.put("password", RecruitModeUtil.parseBlankToNull(params.get("xtmm")));
|
||||||
|
convertParams.put("loginid", RecruitModeUtil.parseBlankToNull(params.get("xtzh")));
|
||||||
|
convertParams.put("status", RecruitModeUtil.parseBlankToNull(params.get("ygzt")));
|
||||||
|
|
||||||
|
// 个人信息
|
||||||
|
convertParams.put("certificatenum", RecruitModeUtil.parseBlankToNull(params.get("sfzh")));
|
||||||
|
|
||||||
|
// 工作信息
|
||||||
|
convertParams.put("companystartdate", RecruitModeUtil.parseBlankToNull(params.get("rzrq")));
|
||||||
|
convertParams.put("probationenddate", RecruitModeUtil.parseBlankToNull(params.get("jhzzrq")));
|
||||||
|
return convertParams;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,239 @@
|
||||||
|
package com.engine.recruit.thread;
|
||||||
|
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.engine.recruit.conn.ApplicantCommonInfo;
|
||||||
|
import com.engine.recruit.conn.CheckRepeatResume;
|
||||||
|
import com.engine.recruit.conn.PositionCommonInfo;
|
||||||
|
import com.engine.recruit.conn.RecruitDataMap;
|
||||||
|
import com.engine.recruit.enums.ApplicationStatusEnum;
|
||||||
|
import com.engine.recruit.enums.CommonBrowserTypeEnum;
|
||||||
|
import com.engine.recruit.enums.HighestDegreeEnum;
|
||||||
|
import com.weaver.rpa.sdk.clients.application.resume.ERPAResumeSDKClient;
|
||||||
|
import com.weaver.rpa.sdk.clients.core.ERPASDKClients;
|
||||||
|
import com.weaver.util.threadPool.entity.LocalRunnable;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import weaver.common.DateUtil;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.erpa.apps.entity.application.resume.dto.*;
|
||||||
|
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||||
|
import weaver.general.BaseBean;
|
||||||
|
import weaver.general.Util;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2023/10/16
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class SdkResumeSavedThread extends LocalRunnable {
|
||||||
|
|
||||||
|
private ResumeMqMessage resumeMqMessage;
|
||||||
|
private static final int SEC_CATEGORY = Convert.toInt(RecruitModeUtil.getRecruitPropValue("APPLICANTS_RESUMES_CATEGORY"));
|
||||||
|
|
||||||
|
public SdkResumeSavedThread(ResumeMqMessage resumeMqMessage) {
|
||||||
|
this.resumeMqMessage = resumeMqMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute() throws Exception {
|
||||||
|
parseResume(resumeMqMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解析建立,并入库
|
||||||
|
*
|
||||||
|
* @param resumeMqMessage
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
private void parseResume(ResumeMqMessage resumeMqMessage) throws Exception {
|
||||||
|
BaseBean baseBean = new BaseBean();
|
||||||
|
baseBean.writeLog("千里聆SDK简历开始解析------");
|
||||||
|
baseBean.writeLog("resumeMqMessage===" + JSON.toJSONString(resumeMqMessage));
|
||||||
|
String userId = resumeMqMessage.getUserId();
|
||||||
|
User user = new User();
|
||||||
|
if (StringUtils.isNotBlank(userId)) {
|
||||||
|
user.setUid(Convert.toInt(userId));
|
||||||
|
} else {
|
||||||
|
user.setUid(1);
|
||||||
|
}
|
||||||
|
// 千里聆简历ID
|
||||||
|
Long resumeId = resumeMqMessage.getResumeId();
|
||||||
|
|
||||||
|
ResumeInfoDto resumeInfoDto = resumeMqMessage.getResumeInfoDto();
|
||||||
|
Map<String, Object> params = new RecruitDataMap<>();
|
||||||
|
// 姓名
|
||||||
|
params.put("xm", resumeInfoDto.getName());
|
||||||
|
// 性别
|
||||||
|
params.put("xb", resumeInfoDto.getSex());
|
||||||
|
// 年龄
|
||||||
|
params.put("nl", resumeInfoDto.getAge());
|
||||||
|
// 工作经验
|
||||||
|
params.put("gzjy", getCommonBrowserKey(getExperienceText(resumeInfoDto.getExperience()), CommonBrowserTypeEnum.WORK_EXPERIENCE.getDesc()));
|
||||||
|
// 手机号码
|
||||||
|
params.put("sjhm", resumeInfoDto.getPhone());
|
||||||
|
// 电子邮箱
|
||||||
|
params.put("dzyx", resumeInfoDto.getEmail());
|
||||||
|
// 期望税前月薪
|
||||||
|
params.put("qwsqyxk", resumeInfoDto.getExpectSalaryStart());
|
||||||
|
// 最高学历
|
||||||
|
params.put("zgxl", HighestDegreeEnum.getDegreeId(resumeInfoDto.getHighestDegree()).getId());
|
||||||
|
// 原始简历
|
||||||
|
params.put("ysjl", convertStreamToE9DocId(resumeMqMessage.getResumeInfoDto().getResumeFileId(), user));
|
||||||
|
// 千里聆简历ID
|
||||||
|
params.put("qlljl", resumeId);
|
||||||
|
// 判断是否有发布职位信息,如有发布职位信息,完善招聘流程信息,并指定为待分配状态
|
||||||
|
String positionId = PositionCommonInfo.getPositionIdByQll(resumeInfoDto.getJobId());
|
||||||
|
String zt = ApplicationStatusEnum.DISTRIBUTION.getValue();
|
||||||
|
// 应聘职位
|
||||||
|
if (StringUtils.isNotBlank(positionId)) {
|
||||||
|
String flowId = PositionCommonInfo.getRecruitFlowId(positionId);
|
||||||
|
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)) {
|
||||||
|
params.put("ypzw", positionId);
|
||||||
|
params.put("zplc", flowId);
|
||||||
|
params.put("zpjd", zpjd);
|
||||||
|
params.put("dqypjd", dqypjd);
|
||||||
|
zt = ApplicationStatusEnum.CANDIDATE.getValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 应聘状态
|
||||||
|
params.put("zt", zt);
|
||||||
|
|
||||||
|
// 判断简历是否重复,插入主表
|
||||||
|
CheckRepeatResume instance = CheckRepeatResume.getInstance();
|
||||||
|
Map<String, Object> checkMap = instance.insertResumeAndReturn(params);
|
||||||
|
String mainId = Util.null2String(checkMap.get("mainId"));
|
||||||
|
String sourceId = Util.null2String(checkMap.get("sourceId"));
|
||||||
|
|
||||||
|
Thread.sleep(1000);
|
||||||
|
if ("-1".equals(mainId)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 插入明细表数据
|
||||||
|
List<RecruitDataMap<Object>> jyjl = new ArrayList<>();
|
||||||
|
List<ResumeInfoEducationExperienceDto> educationExperience = resumeInfoDto.getEducationExperience();
|
||||||
|
for (ResumeInfoEducationExperienceDto educationExperienceDto : educationExperience) {
|
||||||
|
RecruitDataMap<Object> map = new RecruitDataMap<>();
|
||||||
|
map.put("xxmc", educationExperienceDto.getSchoolName());
|
||||||
|
map.put("xl", HighestDegreeEnum.getDegreeId(educationExperienceDto.getDegree()).getId());
|
||||||
|
map.put("zy", educationExperienceDto.getMajor());
|
||||||
|
map.put("kssj", DateUtil.getDate(educationExperienceDto.getBeginTime()));
|
||||||
|
map.put("jssj", DateUtil.getDate(educationExperienceDto.getEndTime()));
|
||||||
|
jyjl.add(map);
|
||||||
|
}
|
||||||
|
instance.insertResumeDetailTable(jyjl, "uf_jcl_yppc_dt1", mainId, sourceId);
|
||||||
|
|
||||||
|
List<RecruitDataMap<Object>> gzjl = new ArrayList<>();
|
||||||
|
List<ResumeInfoWorkExperienceDto> workExperience = resumeInfoDto.getWorkExperience();
|
||||||
|
for (ResumeInfoWorkExperienceDto workExperienceDto : workExperience) {
|
||||||
|
RecruitDataMap<Object> map = new RecruitDataMap<>();
|
||||||
|
map.put("gsmc", workExperienceDto.getCompanyName());
|
||||||
|
map.put("gw", workExperienceDto.getJobName());
|
||||||
|
map.put("gzzz", workExperienceDto.getContent());
|
||||||
|
map.put("kssj", DateUtil.getDate(workExperienceDto.getBeginTime()));
|
||||||
|
map.put("jssj", DateUtil.getDate(workExperienceDto.getEndTime()));
|
||||||
|
gzjl.add(map);
|
||||||
|
|
||||||
|
}
|
||||||
|
instance.insertResumeDetailTable(gzjl, "uf_jcl_yppc_dt2", mainId, sourceId);
|
||||||
|
|
||||||
|
List<RecruitDataMap<Object>> xmjl = new ArrayList<>();
|
||||||
|
List<ResumeInfoProjectExperienceDto> projectExperience = resumeInfoDto.getProjectExperience();
|
||||||
|
for (ResumeInfoProjectExperienceDto projectExperienceDto : projectExperience) {
|
||||||
|
RecruitDataMap<Object> map = new RecruitDataMap<>();
|
||||||
|
map.put("xmmc", projectExperienceDto.getProjectName());
|
||||||
|
map.put("xmms", projectExperienceDto.getContent());
|
||||||
|
map.put("kssj", DateUtil.getDate(projectExperienceDto.getBeginTime()));
|
||||||
|
map.put("jssj", DateUtil.getDate(projectExperienceDto.getEndTime()));
|
||||||
|
xmjl.add(map);
|
||||||
|
}
|
||||||
|
instance.insertResumeDetailTable(xmjl, "uf_jcl_yppc_dt3", mainId, sourceId);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private String getCommonBrowserKey(String value, String commonBrowserType) {
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select id from uf_sjzd where zdlxmc = (select id from uf_zdlx where zdmc = ?) and xxnr =?", commonBrowserType, value);
|
||||||
|
if (rs.next()) {
|
||||||
|
return rs.getString("id");
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getExperienceText(Integer experience) {
|
||||||
|
String experienceText = "不限";
|
||||||
|
switch (experience) {
|
||||||
|
case -1:
|
||||||
|
experienceText = "不限";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
experienceText = "1年以内";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
experienceText = "1-3年";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
experienceText = "3-5年";
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
experienceText = "5-10年";
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
experienceText = "10年以上";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return experienceText;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将文件流转换为文档ID
|
||||||
|
*
|
||||||
|
* @param resumeFileId
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String convertStreamToE9DocId(Long resumeFileId, User user) {
|
||||||
|
BaseBean baseBean = new BaseBean();
|
||||||
|
baseBean.writeLog("解析千里聆SDK原始简历,resumeFileId===" + resumeFileId);
|
||||||
|
List<Integer> docIdList = new ArrayList<>();
|
||||||
|
ERPAResumeSDKClient client = ERPASDKClients.getResumeSDKClient();
|
||||||
|
client.start();
|
||||||
|
client.downloadResumeFile(resumeFileId, (fileName, stream) -> {
|
||||||
|
try {
|
||||||
|
baseBean.writeLog("解析千里聆SDK原始简历,fileName===" + fileName);
|
||||||
|
int imageFileId = RecruitModeUtil.generateImageFileId(stream, fileName);
|
||||||
|
baseBean.writeLog("解析千里聆SDK原始简历,imageFileId===" + imageFileId);
|
||||||
|
docIdList.add(RecruitModeUtil.createDocId(SEC_CATEGORY, imageFileId, user));
|
||||||
|
} catch (Exception e) {
|
||||||
|
baseBean.writeLog("解析千里聆SDK原始简历失败", e);
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return CollectionUtils.isNotEmpty(docIdList) ? Integer.toString(docIdList.get(0)) : "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ResumeMqMessage getResumeMqMessage() {
|
||||||
|
return this.resumeMqMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResumeMqMessage(ResumeMqMessage resumeMqMessage) {
|
||||||
|
this.resumeMqMessage = resumeMqMessage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.engine.recruit.util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2023/09/18
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class ExceptionUtil {
|
||||||
|
public static String getRealMessage(Throwable e) {
|
||||||
|
while (e != null) {
|
||||||
|
Throwable cause = e.getCause();
|
||||||
|
if (cause == null) {
|
||||||
|
return e.getMessage();
|
||||||
|
}
|
||||||
|
e = cause;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.engine.recruit.util;
|
||||||
|
|
||||||
|
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.general.BaseBean;
|
||||||
|
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2023/10/12
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class RecruitFlowUtil {
|
||||||
|
private static final Pattern URL_REG = Pattern.compile("\\$(.*?)\\$");
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解析url中参数信息
|
||||||
|
*
|
||||||
|
* @param urlString url地址
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Map<String, String> parseURL(String urlString) {
|
||||||
|
Map<String, String> params = new HashMap<>();
|
||||||
|
try {
|
||||||
|
if (StringUtils.isNotBlank(urlString)) {
|
||||||
|
if (urlString.contains("?")) {
|
||||||
|
urlString = urlString.split("\\?")[1];
|
||||||
|
}
|
||||||
|
String[] paramPairs = urlString.split("&");
|
||||||
|
for (String paramPair : paramPairs) {
|
||||||
|
String[] keyValue = paramPair.split("=");
|
||||||
|
if (keyValue.length == 2) {
|
||||||
|
String key = URLDecoder.decode(keyValue[0], "UTF-8");
|
||||||
|
String value = URLDecoder.decode(keyValue[1], "UTF-8");
|
||||||
|
params.put(key, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
new BaseBean().writeLog(e);
|
||||||
|
throw new CustomizeRunTimeException(urlString + "解析失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 替换URL中Id字段
|
||||||
|
*
|
||||||
|
* @param urlString
|
||||||
|
* @param billId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String replaceURL(String urlString, String billId) {
|
||||||
|
Matcher matcher = URL_REG.matcher(urlString);
|
||||||
|
Set<String> matches = new HashSet<>();
|
||||||
|
while (matcher.find()) {
|
||||||
|
matches.add(matcher.group(1));
|
||||||
|
}
|
||||||
|
matches.remove("parentid");
|
||||||
|
if (CollectionUtils.isNotEmpty(matches)) {
|
||||||
|
String fields = StringUtils.join(matches, ",");
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select " + fields + " from uf_jcl_yppc where id = ? ", billId);
|
||||||
|
if (rs.next()) {
|
||||||
|
for (String match : matches) {
|
||||||
|
urlString = urlString.replaceAll("\\$" + match + "\\$", rs.getString(match));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return urlString.replaceAll("\\$parentid\\$", billId);
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue