generated from dxfeng/secondev-chapanda-feishu
应聘过程,代码暂存
This commit is contained in:
parent
06c829e92d
commit
3735a73ad4
|
|
@ -106,6 +106,23 @@ public class ApplicantCommonInfo {
|
|||
return formModeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据表名,获取表单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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 建模表数据权限重构
|
||||
*
|
||||
|
|
@ -197,7 +214,7 @@ public class ApplicantCommonInfo {
|
|||
if (-1 == recruitFlowId) {
|
||||
return stepPo;
|
||||
}
|
||||
if (StringUtils.isBlank(stageId)) {
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.recruit.entity.record;
|
||||
|
||||
import com.engine.recruit.conn.ApplicantCommonInfo;
|
||||
import com.engine.recruit.enums.RecordOperateEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
|
|
@ -8,7 +9,6 @@ import lombok.NoArgsConstructor;
|
|||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
|
|
@ -28,12 +28,10 @@ public class ApplicantRecordPo {
|
|||
private User user;
|
||||
private String content;
|
||||
private String linkUrl;
|
||||
private Map<String, String> tableParam;
|
||||
private Map<String, Object> otherParam;
|
||||
private String pcId;
|
||||
|
||||
//private String recordOperateType;
|
||||
private RecordOperateEnum recordOperateType;
|
||||
private Consumer<ApplicantRecordPo> consumer;
|
||||
|
||||
public void autoCreateLink() {
|
||||
String url = "/spa/cube/index.html#/main/cube/card?billid={billId}&type=0&modeId={modeId}&formId={formId}&guid=card";
|
||||
|
|
@ -41,8 +39,10 @@ public class ApplicantRecordPo {
|
|||
}
|
||||
|
||||
public void execute() {
|
||||
if (null != consumer) {
|
||||
consumer.accept(this);
|
||||
if (null == recordOperateType) {
|
||||
return;
|
||||
}
|
||||
recordOperateType.createOperateRecord(this);
|
||||
ApplicantCommonInfo.createOperateRecord(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
@ -1,50 +1,180 @@
|
|||
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 {
|
||||
public enum RecordOperateEnum implements RecordOperateAdapter {
|
||||
/**
|
||||
* 应聘过程操作类型
|
||||
*/
|
||||
RESUME_SUBMISSION("resumeSubmission", "简历投递", "简历投递"),
|
||||
ELIMINATE("eliminate", "淘汰", "淘汰"),
|
||||
TRANSFER_STAGE("transferStage", "转移阶段", "转移阶段"),
|
||||
ARCHIVE_TALENT_POOL("archiveTalentPool", "归档人才库", "归档人才库"),
|
||||
JOIN_BLACKLIST("joinBlacklist", "加入黑名单", "加入黑名单"),
|
||||
ADD_SCREEN("addSCREEN", "部门筛选反馈", "部门筛选反馈"),
|
||||
UPDATE_SCREEN("updateSCREEN", "修改筛选反馈", "部门筛选反馈"),
|
||||
DELETE_SCREEN("deleteSCREEN", "删除筛选反馈", "部门筛选反馈"),
|
||||
ADD_INTERVIEW_RESULT("addInterviewResult", "面试评价反馈", "面试评价反馈"),
|
||||
UPDATE_INTERVIEW_RESULT("updateInterviewResult", "修改面试评价反馈", "面试评价反馈"),
|
||||
DELETE_INTERVIEW("deleteInterview", "删除面试", "面试评价反馈"),
|
||||
ADD_WRITTEN_RESULT("addWrittenResult", "笔试结果录入", "笔试"),
|
||||
UPDATE_WRITTEN_RESULT("updateWrittenResult", "编辑笔试结果", "笔试"),
|
||||
DELETE_WRITTEN_RESULT("deleteWrittenResult", "删除笔试结果", "笔试"),
|
||||
ADD_SALARY_NEGOTIATION("addSalaryNegotiation", "薪酬谈判录入", "薪酬谈判"),
|
||||
UPDATE_SALARY_NEGOTIATION("updateSalaryNegotiation", "修改薪酬谈判记录", "薪酬谈判"),
|
||||
DELETE_SALARY_NEGOTIATION("deleteSalaryNegotiation", "删除薪酬谈判记录", "薪酬谈判"),
|
||||
ADD_BACK_TONE("addBackTone", "背调录入", "背调"),
|
||||
UPDATE_BACK_TONE("updateBackTone", "修改背调记录", "背调"),
|
||||
DELETE_BACK_TONE("deleteBackTone", "删除背调记录", "背调"),
|
||||
CREATE_OFFER("createOffer", "创建offer", "创建offer"),
|
||||
SEND_OFFER("sendOffer", "发送offer", "发送offer"),
|
||||
OFFER_FEEDBACK("offerFeedback", "offer反馈", "offer反馈"),
|
||||
PENDING_EMPLOYMENT("pendingEmployment", "进入待入职", "进入待入职"),
|
||||
ENTRY_PROCESS("entryProcess", "入职流程", "入职流程"),
|
||||
INFO_COLLECT("infoCollect", "信息采集", "信息采集"),
|
||||
CANCEL_ENTRY("cancelEntry", "取消入职", "取消入职"),
|
||||
HANDLE_ENTRY("handleEntry", "办理入职", "办理入职"),
|
||||
ADD_REMARK("addRemark", "新建备注", "备注"),
|
||||
UPDATE_REMARK("updateRemark", "编辑备注", "备注"),
|
||||
DELETE_REMARK("deleteRemark", "删除备注", "备注");
|
||||
RESUME_SUBMISSION("resumeSubmission", "简历投递", "简历投递", recordPo -> {
|
||||
recordPo.setPcId(recordPo.getBillId());
|
||||
recordPo.setContent("");
|
||||
}),
|
||||
|
||||
RecordOperateEnum(String operateType, String operateName, String showName) {
|
||||
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 -> {
|
||||
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.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 -> {
|
||||
}),
|
||||
|
||||
ADD_INTERVIEW_RESULT("addInterviewResult", "面试评价反馈", "面试评价反馈", recordPo -> {
|
||||
}),
|
||||
|
||||
UPDATE_INTERVIEW_RESULT("updateInterviewResult", "修改面试评价反馈", "面试评价反馈", recordPo -> {
|
||||
}),
|
||||
|
||||
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) {
|
||||
|
|
@ -60,6 +190,8 @@ public enum RecordOperateEnum {
|
|||
private String operateName;
|
||||
private String operateType;
|
||||
private String showName;
|
||||
private RecordOperateAdapter adapter;
|
||||
|
||||
|
||||
public String getOperateName() {
|
||||
return operateName;
|
||||
|
|
@ -84,4 +216,10 @@ public enum RecordOperateEnum {
|
|||
public void setShowName(String showName) {
|
||||
this.showName = showName;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void createOperateRecord(ApplicantRecordPo recordPo) {
|
||||
adapter.createOperateRecord(recordPo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import java.util.Map;
|
|||
* @createTime: 2023/11/01
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ApplicantRecordService {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,13 +1,8 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.conn.ApplicantCommonInfo;
|
||||
import com.engine.recruit.entity.record.ApplicantRecordPo;
|
||||
import com.engine.recruit.entity.recruitflow.po.RecruitStepPo;
|
||||
import com.engine.recruit.service.ApplicantRecordService;
|
||||
import com.engine.recruit.util.RecruitUtil;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -16,60 +11,72 @@ import java.util.Map;
|
|||
* @createTime: 2023/11/01
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Deprecated
|
||||
public class ApplicantRecordServiceImpl extends Service implements ApplicantRecordService {
|
||||
|
||||
@Override
|
||||
public void createOperateRecord(Map<String, Object> param) {
|
||||
try {
|
||||
ApplicantRecordPo recordPo = RecruitUtil.parseMap2Object(param, ApplicantRecordPo.class);
|
||||
if (null == recordPo.getRecordOperateType()) {
|
||||
return;
|
||||
}
|
||||
switch (recordPo.getRecordOperateType()) {
|
||||
case RESUME_SUBMISSION:
|
||||
recordPo.setConsumer(this::resumeSubmissionMap);
|
||||
break;
|
||||
case ELIMINATE:
|
||||
recordPo.setConsumer(this::eliminate);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
recordPo.execute();
|
||||
ApplicantCommonInfo.createOperateRecord(recordPo);
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog("应聘过程记录数据插入失败", e);
|
||||
}
|
||||
//try {
|
||||
// ApplicantRecordPo recordPo = RecruitUtil.parseMap2Object(param, ApplicantRecordPo.class);
|
||||
// if (null == recordPo.getRecordOperateType()) {
|
||||
// return;
|
||||
// }
|
||||
//Method method = this.getClass().getMethod(recordPo.getRecordOperateType().getOperateType(), ApplicantRecordPo.class);
|
||||
//method.invoke(this, recordPo);
|
||||
//ApplicantCommonInfo.createOperateRecord(recordPo);
|
||||
//} catch (Exception e) {
|
||||
// new BaseBean().writeLog("应聘过程记录数据插入失败", e);
|
||||
//}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createOperateRecord(ApplicantRecordPo recordPo) {
|
||||
try {
|
||||
//RecordOperateEnum operateEnum = RecordOperateEnum.getOperateEnum(recordPo.getRecordOperateType());
|
||||
//switch (operateEnum) {
|
||||
// case RESUME_SUBMISSION:
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
//}
|
||||
//recordPo.setFunction(this::resumeSubmissionMap);
|
||||
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog("应聘过程记录数据插入失败", e);
|
||||
}
|
||||
//try {
|
||||
// if (null == recordPo.getRecordOperateType()) {
|
||||
// return;
|
||||
// }
|
||||
// Method method = this.getClass().getMethod(recordPo.getRecordOperateType().getOperateType(), ApplicantRecordPo.class);
|
||||
// method.invoke(this, recordPo);
|
||||
// ApplicantCommonInfo.createOperateRecord(recordPo);
|
||||
//} catch (Exception e) {
|
||||
// new BaseBean().writeLog("应聘过程记录数据插入失败", e);
|
||||
//}
|
||||
}
|
||||
|
||||
private void resumeSubmissionMap(ApplicantRecordPo recordPo) {
|
||||
recordPo.setPcId(recordPo.getBillId());
|
||||
recordPo.setContent("");
|
||||
}
|
||||
|
||||
private void eliminate(ApplicantRecordPo recordPo) {
|
||||
Map<String, String> tableParam = recordPo.getTableParam();
|
||||
User user = recordPo.getUser();
|
||||
RecruitStepPo currentStep = ApplicantCommonInfo.getCurrentStep(recordPo.getBillId());
|
||||
String content = user.getLastname() + "淘汰,操作阶段:" + currentStep.getDescription();
|
||||
recordPo.setPcId(recordPo.getBillId());
|
||||
recordPo.setContent(content);
|
||||
}
|
||||
//public void resumeSubmission(ApplicantRecordPo recordPo) {
|
||||
// recordPo.setPcId(recordPo.getBillId());
|
||||
// recordPo.setContent("");
|
||||
//}
|
||||
//
|
||||
//public void eliminate(ApplicantRecordPo recordPo) {
|
||||
// User user = recordPo.getUser();
|
||||
// RecruitStepPo currentStep = ApplicantCommonInfo.getCurrentStep(recordPo.getBillId());
|
||||
// String content = user.getLastname() + "淘汰,操作阶段:" + currentStep.getDescription();
|
||||
// recordPo.setPcId(recordPo.getBillId());
|
||||
// recordPo.setContent(content);
|
||||
//}
|
||||
//
|
||||
//public void transferStage(ApplicantRecordPo 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);
|
||||
//}
|
||||
//
|
||||
//public void archiveTalentPool(ApplicantRecordPo 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);
|
||||
//}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
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.ApplicantOperateEnum;
|
||||
import com.engine.recruit.enums.ApplicationStatusEnum;
|
||||
import com.engine.recruit.enums.RecordOperateEnum;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.service.ApplicantRecordService;
|
||||
import com.engine.recruit.service.ApplicantResumeService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.common.DateUtil;
|
||||
|
|
@ -17,7 +17,6 @@ import weaver.conn.RecordSet;
|
|||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.formmode.setup.ModeRightInfo;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.hrm.resource.ResourceComInfo;
|
||||
|
||||
import java.util.*;
|
||||
|
|
@ -28,9 +27,6 @@ import java.util.*;
|
|||
* @version: 1.0
|
||||
*/
|
||||
public class ApplicantResumeServiceImpl extends Service implements ApplicantResumeService {
|
||||
private ApplicantRecordService getApplicantRecordService(User user) {
|
||||
return ServiceUtil.getService(ApplicantRecordServiceImpl.class, user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getApplicantsName(String ids) {
|
||||
|
|
@ -161,14 +157,17 @@ public class ApplicantResumeServiceImpl extends Service implements ApplicantResu
|
|||
// 淘汰
|
||||
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(",")) {
|
||||
Map<String, Object> dataParam = new HashMap<>(4);
|
||||
dataParam.put("billId", s);
|
||||
dataParam.put("operateTime", dateTime);
|
||||
dataParam.put("user", user);
|
||||
dataParam.put("recordOperateType", RecordOperateEnum.ELIMINATE);
|
||||
getApplicantRecordService(user).createOperateRecord(dataParam);
|
||||
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
|
||||
.billId(s)
|
||||
.operateTime(dateTime)
|
||||
.user(user)
|
||||
.recordOperateType(RecordOperateEnum.ELIMINATE)
|
||||
.build();
|
||||
recordPo.execute();
|
||||
}
|
||||
|
||||
returnMap.put("msg", "操作成功");
|
||||
|
|
@ -176,6 +175,8 @@ public class ApplicantResumeServiceImpl extends Service implements ApplicantResu
|
|||
// 转移阶段
|
||||
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()) {
|
||||
|
|
@ -185,6 +186,18 @@ public class ApplicantResumeServiceImpl extends Service implements ApplicantResu
|
|||
} else {
|
||||
throw new CustomizeRunTimeException("转移阶段失败");
|
||||
}
|
||||
|
||||
otherParam.put("targetStep", ApplicantCommonInfo.getCurrentStep(billid).getDescription());
|
||||
|
||||
// 插入应聘过程
|
||||
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
|
||||
.billId(billid)
|
||||
.operateTime(DateUtil.getDateTime())
|
||||
.user(user)
|
||||
.recordOperateType(RecordOperateEnum.TRANSFER_STAGE)
|
||||
.otherParam(otherParam)
|
||||
.build();
|
||||
recordPo.execute();
|
||||
} else if (ApplicantOperateEnum.ASSIGN.getOperateType().equals(operateType)) {
|
||||
// 分配职位
|
||||
String billid = Util.null2String(params.get("billid"));
|
||||
|
|
@ -198,12 +211,27 @@ public class ApplicantResumeServiceImpl extends Service implements ApplicantResu
|
|||
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 {
|
||||
returnMap.put("msg", "请至少选择一条数据");
|
||||
|
|
@ -434,7 +462,7 @@ public class ApplicantResumeServiceImpl extends Service implements ApplicantResu
|
|||
dataMap.put("sgcm", RecruitModeUtil.parseBlankToNull(rs.getString("sgcm")));
|
||||
dataMap.put("tzkg", RecruitModeUtil.parseBlankToNull(rs.getString("tzkg")));
|
||||
// 归档阶段
|
||||
dataMap.put("gdjd", null);
|
||||
dataMap.put("gdjd", RecruitModeUtil.parseBlankToNull(rs.getString("dqypjd")));
|
||||
dataMap.put("gdyy", RecruitModeUtil.parseBlankToNull(rs.getString("gdyy")));
|
||||
dataMap.put("gdxxyy", RecruitModeUtil.parseBlankToNull(rs.getString("gdxxyy")));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,14 @@
|
|||
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.ApplicantRecordService;
|
||||
import com.engine.recruit.service.RecruitButtonService;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
@ -23,9 +20,6 @@ import java.util.Map;
|
|||
* @version: 1.0
|
||||
*/
|
||||
public class EliminateServiceImpl extends Service implements RecruitButtonService {
|
||||
private ApplicantRecordService getApplicantRecordService(User user) {
|
||||
return ServiceUtil.getService(ApplicantRecordServiceImpl.class, user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(Map<String, Object> params) {
|
||||
|
|
@ -33,13 +27,14 @@ public class EliminateServiceImpl extends Service implements RecruitButtonServic
|
|||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate("update uf_jcl_yppc set zt = ? where id = ? ", ApplicationStatusEnum.OBSOLETE.getValue(), billId);
|
||||
|
||||
String dateTime = DateUtil.getDateTime();
|
||||
Map<String, Object> dataParam = new HashMap<>(4);
|
||||
dataParam.put("billId", billId);
|
||||
dataParam.put("operateTime", dateTime);
|
||||
dataParam.put("user", user);
|
||||
dataParam.put("recordOperateType", RecordOperateEnum.ELIMINATE);
|
||||
getApplicantRecordService(user).createOperateRecord(dataParam);
|
||||
// 插入应聘过程
|
||||
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
|
||||
.billId(billId)
|
||||
.operateTime(DateUtil.getDateTime())
|
||||
.user(user)
|
||||
.recordOperateType(RecordOperateEnum.ELIMINATE)
|
||||
.build();
|
||||
recordPo.execute();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,11 @@ 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;
|
||||
|
|
@ -45,6 +48,14 @@ public class JoinBlacklistServiceImpl extends Service implements RecruitButtonSe
|
|||
// 更新当前应聘者关联的所有简历状态为已淘汰
|
||||
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");
|
||||
|
|
|
|||
|
|
@ -60,8 +60,8 @@ public class BatchAddDeptScreeningModeExpand extends AbstractModeExpandJavaCodeN
|
|||
String[] split = dateTime.split(" ");
|
||||
mainDataMap.put("modedatacreatedate", split[0]);
|
||||
mainDataMap.put("modedatacreatetime", split[1]);
|
||||
mainDataMap.put("modedatamodifier", user.getUID());
|
||||
mainDataMap.put("modedatamodifydatetime", dateTime);
|
||||
mainDataMap.put("modedatamodifier", null);
|
||||
mainDataMap.put("modedatamodifydatetime", null);
|
||||
mainDataMap.put("modedatacreatertype", "0");
|
||||
|
||||
List<Map<String, Object>> detailMapList = new ArrayList<>();
|
||||
|
|
@ -88,7 +88,7 @@ public class BatchAddDeptScreeningModeExpand extends AbstractModeExpandJavaCodeN
|
|||
String uuid = UUID.randomUUID().toString();
|
||||
objects.add(0, uuid);
|
||||
rs.executeUpdate(insertSql, objects);
|
||||
refreshRight(rs, uuid, formModeId);
|
||||
refreshRight(user, rs, uuid, formModeId);
|
||||
}
|
||||
}
|
||||
String applicantName = ApplicantCommonInfo.getApplicantName(Util.null2String(detailDataMap.get("ypz")));
|
||||
|
|
@ -160,7 +160,7 @@ public class BatchAddDeptScreeningModeExpand extends AbstractModeExpandJavaCodeN
|
|||
* @param uuid UUID
|
||||
* @param formModeId 建模ID
|
||||
*/
|
||||
private void refreshRight(RecordSet rs, String uuid, int formModeId) {
|
||||
private void refreshRight(User user, RecordSet rs, String uuid, int formModeId) {
|
||||
rs.executeQuery("select id from " + MODE_TABLE_NAME + " where modeuuid='" + uuid + "'");
|
||||
if (rs.next()) {
|
||||
//建模数据的id
|
||||
|
|
@ -168,7 +168,7 @@ public class BatchAddDeptScreeningModeExpand extends AbstractModeExpandJavaCodeN
|
|||
ModeRightInfo modeRightInfo = new ModeRightInfo();
|
||||
modeRightInfo.setNewRight(true);
|
||||
//新建的时候添加共享
|
||||
modeRightInfo.editModeDataShare(1, formModeId, bid);
|
||||
modeRightInfo.editModeDataShare(user.getUID(), formModeId, bid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ public class SingleAddDeptScreeningModeExpand extends AbstractModeExpandJavaCode
|
|||
String[] split = dateTime.split(" ");
|
||||
dataMap.put("modedatacreatedate", split[0]);
|
||||
dataMap.put("modedatacreatetime", split[1]);
|
||||
dataMap.put("modedatamodifier", user.getUID());
|
||||
dataMap.put("modedatamodifydatetime", dateTime);
|
||||
dataMap.put("modedatamodifier", null);
|
||||
dataMap.put("modedatamodifydatetime", null);
|
||||
dataMap.put("modedatacreatertype", "0");
|
||||
|
||||
List<List<Object>> paramList = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
package weaver.formmode.recruit.modeexpand.record;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.recruit.entity.record.ApplicantRecordPo;
|
||||
import com.engine.recruit.enums.RecordOperateEnum;
|
||||
import com.engine.recruit.service.impl.ApplicantRecordServiceImpl;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.general.Util;
|
||||
|
|
@ -20,7 +19,7 @@ import java.util.Map;
|
|||
public class AddApplicantModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
Map<String, String> result = new HashMap<>(2);
|
||||
try {
|
||||
//数据id
|
||||
int billId;
|
||||
|
|
@ -32,27 +31,15 @@ public class AddApplicantModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
billId = Util.getIntValue(requestInfo.getRequestid());
|
||||
modeId = Util.getIntValue(requestInfo.getWorkflowid());
|
||||
if (billId > 0 && modeId > 0) {
|
||||
Map<String, Object> dataParam = new HashMap<>();
|
||||
dataParam.put("billId", billId);
|
||||
dataParam.put("modeId", modeId);
|
||||
dataParam.put("formId", params.get("formId"));
|
||||
dataParam.put("layoutId", params.get("layoutid"));
|
||||
dataParam.put("operateTime", DateUtil.getDateTime());
|
||||
dataParam.put("user", params.get("user"));
|
||||
//dataParam.put("operateName", "简历投递");
|
||||
dataParam.put("recordOperateType", RecordOperateEnum.RESUME_SUBMISSION);
|
||||
//ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
|
||||
// .billId(String.valueOf(billId))
|
||||
// .modeId(String.valueOf(modeId))
|
||||
// .formId(Util.null2String(params.get("formId")))
|
||||
// .layoutId(Util.null2String(params.get("layoutid")))
|
||||
// .operateTime(DateUtil.getDateTime())
|
||||
// .operateName("简历投递")
|
||||
// .recordOperateType(RecordOperateEnum.RESUME_SUBMISSION.getOperateType())
|
||||
// .user(user)
|
||||
// .build();
|
||||
ServiceUtil.getService(ApplicantRecordServiceImpl.class, user).createOperateRecord(dataParam);
|
||||
//ServiceUtil.getService(ApplicantRecordServiceImpl.class, user).createOperateRecord(recordPo);
|
||||
|
||||
// 插入应聘过程
|
||||
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
|
||||
.billId(String.valueOf(billId))
|
||||
.operateTime(DateUtil.getDateTime())
|
||||
.user(user)
|
||||
.recordOperateType(RecordOperateEnum.RESUME_SUBMISSION)
|
||||
.build();
|
||||
recordPo.execute();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,77 @@
|
|||
package weaver.formmode.recruit.modeexpand.record;
|
||||
|
||||
import com.engine.recruit.entity.record.ApplicantRecordPo;
|
||||
import com.engine.recruit.enums.RecordOperateEnum;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.soa.workflow.request.MainTableInfo;
|
||||
import weaver.soa.workflow.request.Property;
|
||||
import weaver.soa.workflow.request.RequestInfo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/02
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class UpdateScreenExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
Map<String, String> result = new HashMap<>(2);
|
||||
try {
|
||||
//数据id
|
||||
int billId;
|
||||
//模块id
|
||||
int modeId;
|
||||
RequestInfo requestInfo = (RequestInfo) params.get("RequestInfo");
|
||||
User user = (User) params.get("user");
|
||||
String operateType = Util.null2String(params.get("operateType"));
|
||||
String layoutId = Util.null2String(params.get("layoutid"));
|
||||
String formId = Util.null2String(params.get("formId"));
|
||||
if (requestInfo != null) {
|
||||
billId = Util.getIntValue(requestInfo.getRequestid());
|
||||
modeId = Util.getIntValue(requestInfo.getWorkflowid());
|
||||
if (billId > 0 && modeId > 0) {
|
||||
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||
Property[] properties = mainTableInfo.getProperty();
|
||||
Map<String, Object> mainDataMap = new HashMap<>();
|
||||
for (Property property : properties) {
|
||||
mainDataMap.put(property.getName(), property.getValue());
|
||||
}
|
||||
|
||||
// 插入应聘过程
|
||||
String createName = RecruitModeUtil.getResourceNames(requestInfo.getCreatorid());
|
||||
//mainDataMap.put("createName",createName);
|
||||
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
|
||||
.billId(String.valueOf(billId))
|
||||
.modeId(String.valueOf(modeId))
|
||||
.formId(String.valueOf(formId))
|
||||
.layoutId(String.valueOf(layoutId))
|
||||
.operateTime(DateUtil.getDateTime())
|
||||
.user(user)
|
||||
.otherParam(mainDataMap)
|
||||
.build();
|
||||
if ("add".equals(operateType)) {
|
||||
recordPo.setRecordOperateType(RecordOperateEnum.ADD_SCREEN);
|
||||
} else {
|
||||
recordPo.setRecordOperateType(RecordOperateEnum.UPDATE_SCREEN);
|
||||
}
|
||||
recordPo.execute();
|
||||
|
||||
}
|
||||
}
|
||||
result.put("errmsg", "自定义出错信息");
|
||||
result.put("flag", "false");
|
||||
} catch (Exception e) {
|
||||
result.put("errmsg", "自定义出错信息");
|
||||
result.put("flag", "false");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue