generated from dxfeng/secondev-chapanda-feishu
269 lines
10 KiB
Java
269 lines
10 KiB
Java
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.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 -> {
|
||
}),
|
||
|
||
ADD_WRITTEN_RESULT("addWrittenResult", "笔试结果录入", "笔试", recordPo -> {
|
||
}),
|
||
|
||
UPDATE_WRITTEN_RESULT("updateWrittenResult", "编辑笔试结果", "笔试", recordPo -> {
|
||
}),
|
||
|
||
DELETE_WRITTEN_RESULT("deleteWrittenResult", "删除笔试结果", "笔试", recordPo -> {
|
||
}),
|
||
|
||
ADD_SALARY_NEGOTIATION("addSalaryNegotiation", "薪酬谈判录入", "薪酬谈判", recordPo -> {
|
||
}),
|
||
|
||
UPDATE_SALARY_NEGOTIATION("updateSalaryNegotiation", "修改薪酬谈判记录", "薪酬谈判", recordPo -> {
|
||
}),
|
||
|
||
DELETE_SALARY_NEGOTIATION("deleteSalaryNegotiation", "删除薪酬谈判记录", "薪酬谈判", recordPo -> {
|
||
}),
|
||
|
||
ADD_BACK_TONE("addBackTone", "背调录入", "背调", recordPo -> {
|
||
}),
|
||
|
||
UPDATE_BACK_TONE("updateBackTone", "修改背调记录", "背调", recordPo -> {
|
||
}),
|
||
|
||
DELETE_BACK_TONE("deleteBackTone", "删除背调记录", "背调", recordPo -> {
|
||
}),
|
||
|
||
CREATE_OFFER("createOffer", "创建offer", "创建offer", recordPo -> {
|
||
}),
|
||
|
||
SEND_OFFER("sendOffer", "发送offer", "发送offer", recordPo -> {
|
||
}),
|
||
|
||
OFFER_FEEDBACK("offerFeedback", "offer反馈", "offer反馈", recordPo -> {
|
||
}),
|
||
|
||
PENDING_EMPLOYMENT("pendingEmployment", "进入待入职", "进入待入职", recordPo -> {
|
||
}),
|
||
|
||
ENTRY_PROCESS("entryProcess", "入职流程", "入职流程", recordPo -> {
|
||
}),
|
||
|
||
INFO_COLLECT("infoCollect", "信息采集", "信息采集", recordPo -> {
|
||
}),
|
||
|
||
CANCEL_ENTRY("cancelEntry", "取消入职", "取消入职", recordPo -> {
|
||
}),
|
||
|
||
HANDLE_ENTRY("handleEntry", "办理入职", "办理入职", recordPo -> {
|
||
}),
|
||
|
||
ADD_REMARK("addRemark", "新建备注", "备注", recordPo -> {
|
||
}),
|
||
|
||
UPDATE_REMARK("updateRemark", "编辑备注", "备注", recordPo -> {
|
||
}),
|
||
|
||
DELETE_REMARK("deleteRemark", "删除备注", "备注", recordPo -> {
|
||
});
|
||
|
||
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);
|
||
}
|
||
}
|