generated from dxfeng/secondev-chapanda-feishu
应聘过程,代码暂存
This commit is contained in:
parent
91ab7571de
commit
06c829e92d
|
|
@ -1,12 +1,16 @@
|
|||
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.formmode.setup.ModeRightInfo;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
|
|
@ -123,4 +127,85 @@ public class ApplicantCommonInfo {
|
|||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建操作记录数据
|
||||
*
|
||||
* @param operateName 操作业务
|
||||
* @param operateTime 操作时间
|
||||
* @param content 操作内容
|
||||
* @param operateId 操作者ID
|
||||
* @param linkUrl 操作链接地址
|
||||
* @return 操作记录数据ID
|
||||
*/
|
||||
public static int createOperateRecord(String operateName, String operateTime, String content, int operateId, String linkUrl) {
|
||||
try {
|
||||
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", operateName);
|
||||
dataMap.put("czsj", operateTime);
|
||||
dataMap.put("jlnr", content);
|
||||
dataMap.put("xqnr", linkUrl);
|
||||
RecruitRecordSet.insertData(dataMap, operateTableName);
|
||||
return RecruitRecordSet.refreshRight(uuid, operateTableName, formModeId, operateId);
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog("应聘过程记录数据插入失败", e);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
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.isBlank(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;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,8 @@ public class CheckRepeatResume {
|
|||
formModeId = rs.getInt("id");
|
||||
}
|
||||
dataMap.put("formmodeid", formModeId);
|
||||
RecruitRecordSet.buildModeBaseFields(dataMap, 1);
|
||||
RecruitRecordSet.buildModeInsertFields(dataMap, 1);
|
||||
RecruitRecordSet.insertData(dataMap, "uf_jcl_yppc");
|
||||
return RecruitRecordSet.refreshRight(uuid, "uf_jcl_yppc", formModeId, 1);
|
||||
}
|
||||
|
||||
|
|
@ -131,7 +132,8 @@ public class CheckRepeatResume {
|
|||
String uuid = UUID.randomUUID().toString();
|
||||
dataMap.put("modeuuid", uuid);
|
||||
RecordSet rs = new RecordSet();
|
||||
RecruitRecordSet.buildModeBaseFields(dataMap, 1);
|
||||
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"));
|
||||
|
|
@ -149,9 +151,10 @@ public class CheckRepeatResume {
|
|||
private int updateSourceResume(Map<String, Object> param, Map<String, Object> sourceResume) {
|
||||
replaceNullValues(param, sourceResume);
|
||||
// 处理操作人员、操作时间
|
||||
RecruitRecordSet.buildModeBaseFields(sourceResume, 1);
|
||||
RecruitRecordSet.buildModeUpdateFields(sourceResume, 1);
|
||||
RecruitRecordSet.updateDataById(sourceResume, "uf_jcl_yppc");
|
||||
// 更新数据
|
||||
RecruitRecordSet.buildModeInsertFields(param, 1);
|
||||
return insertHideData(param);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -105,15 +105,24 @@ public class RecruitRecordSet {
|
|||
*
|
||||
* @param mainDataMap 参数集合
|
||||
*/
|
||||
public static void buildModeBaseFields(Map<String, Object> mainDataMap, int userId) {
|
||||
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);
|
||||
mainDataMap.put("modedatacreatertype", "0");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
package com.engine.recruit.entity.record;
|
||||
|
||||
import com.engine.recruit.enums.RecordOperateEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* @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, String> tableParam;
|
||||
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";
|
||||
linkUrl = url.replace("{billId}", billId).replace("{modeId}", modeId).replace("{formId}", formId);
|
||||
}
|
||||
|
||||
public void execute() {
|
||||
if (null != consumer) {
|
||||
consumer.accept(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
package com.engine.recruit.enums;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/02
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum RecordOperateEnum {
|
||||
/**
|
||||
* 应聘过程操作类型
|
||||
*/
|
||||
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", "删除备注", "备注");
|
||||
|
||||
RecordOperateEnum(String operateType, String operateName, String showName) {
|
||||
this.operateName = operateName;
|
||||
this.operateType = operateType;
|
||||
this.showName = showName;
|
||||
}
|
||||
|
||||
public static RecordOperateEnum getOperateEnum(String operateType) {
|
||||
for (RecordOperateEnum item : RecordOperateEnum.values()) {
|
||||
if (item.operateType.equalsIgnoreCase(operateType)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("不支持的操作类型");
|
||||
}
|
||||
|
||||
|
||||
private String operateName;
|
||||
private String operateType;
|
||||
private String showName;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.engine.recruit.service;
|
||||
|
||||
import com.engine.recruit.entity.record.ApplicantRecordPo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/01
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface ApplicantRecordService {
|
||||
|
||||
/**
|
||||
* 创建操作历
|
||||
*
|
||||
* @param param
|
||||
*/
|
||||
void createOperateRecord(Map<String, Object> param);
|
||||
|
||||
/**
|
||||
* 创建操作历
|
||||
*
|
||||
* @param recordPo
|
||||
*/
|
||||
void createOperateRecord(ApplicantRecordPo recordPo);
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
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;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/01
|
||||
* @version: 1.0
|
||||
*/
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +1,23 @@
|
|||
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.RecruitDataMap;
|
||||
import com.engine.recruit.conn.RecruitRecordSet;
|
||||
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;
|
||||
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.*;
|
||||
|
|
@ -23,6 +28,10 @@ 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) {
|
||||
Map<String, Object> returnMap = new HashMap<>(1);
|
||||
|
|
@ -152,6 +161,16 @@ 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);
|
||||
}
|
||||
|
||||
returnMap.put("msg", "操作成功");
|
||||
} else if (ApplicantOperateEnum.TRANSFER.getOperateType().equals(operateType)) {
|
||||
// 转移阶段
|
||||
|
|
@ -207,7 +226,7 @@ public class ApplicantResumeServiceImpl extends Service implements ApplicantResu
|
|||
mainDataMap.put("zpjd", null);
|
||||
mainDataMap.put("dqypjd", null);
|
||||
mainDataMap.put("zt", ApplicationStatusEnum.CANDIDATE.getValue());
|
||||
RecruitRecordSet.buildModeBaseFields(mainDataMap, user.getUID());
|
||||
RecruitRecordSet.buildModeInsertFields(mainDataMap, user.getUID());
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
mainDataMap.put("modeuuid", uuid);
|
||||
// 移除不需要插入的字段
|
||||
|
|
@ -384,7 +403,7 @@ public class ApplicantResumeServiceImpl extends Service implements ApplicantResu
|
|||
}
|
||||
dataMap.put("formmodeid", formModeId);
|
||||
// 构建建模表基本数据
|
||||
RecruitRecordSet.buildModeBaseFields(dataMap, user.getUID());
|
||||
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")));
|
||||
|
|
|
|||
|
|
@ -1,11 +1,17 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
|
@ -17,11 +23,24 @@ 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) {
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class InductionManageServiceImpl extends Service implements InductionMana
|
|||
}
|
||||
dataMap.put("formmodeid", formModeId);
|
||||
// 构建建模表基本数据
|
||||
RecruitRecordSet.buildModeBaseFields(dataMap, creator);
|
||||
RecruitRecordSet.buildModeInsertFields(dataMap, creator);
|
||||
|
||||
rs.executeQuery("select * from uf_jcl_rzgl where id = ? ", billId);
|
||||
if (rs.next()) {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class NextStageServiceImpl extends Service implements RecruitButtonServic
|
|||
if (-1 == recruitFlowId) {
|
||||
throw new CustomizeRunTimeException("未设置对应招聘流程");
|
||||
}
|
||||
rs.executeQuery("select id,jdmc,hj from uf_jcl_zpjdsz where sfqy = 0 and zplc = ? order by zssx", recruitFlowId);
|
||||
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());
|
||||
|
|
@ -57,6 +57,7 @@ public class NextStageServiceImpl extends Service implements RecruitButtonServic
|
|||
|
||||
if (recruitStepPo.getKey() == Integer.parseInt(stageId)) {
|
||||
found = true;
|
||||
// 结束环节
|
||||
if ("2".equals(recruitStepPo.getType())) {
|
||||
target = -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
package com.engine.recruit.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/02
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitUtil {
|
||||
/**
|
||||
* 将Map转换为对象
|
||||
*
|
||||
* @param map
|
||||
* @param cls
|
||||
* @return
|
||||
*/
|
||||
public static <T> T parseMap2Object(Map<String, Object> map, Class<T> cls) {
|
||||
return JSONObject.parseObject(JSONObject.toJSONString(map), cls);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -11,6 +11,7 @@ import java.util.Map;
|
|||
* @createTime: 2023/10/18
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Deprecated
|
||||
public class RecruitStageBrowser extends AbstractCustomSqlConditionJavaCode {
|
||||
@Override
|
||||
public String generateSqlCondition(Map<String, Object> param) throws Exception {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import java.util.Map;
|
|||
* @Description: 保存并新建触发日程
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Deprecated
|
||||
public class CreateWorkPlanModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||
|
||||
public WorkPlanSerivice getWorkPlan(User user) {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import java.util.Map;
|
|||
* @createTime: 2023/09/28
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Deprecated
|
||||
public class UpdateApplicantModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,67 @@
|
|||
package weaver.formmode.recruit.modeexpand.record;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
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;
|
||||
import weaver.hrm.User;
|
||||
import weaver.soa.workflow.request.RequestInfo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/01
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class AddApplicantModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
try {
|
||||
//数据id
|
||||
int billId;
|
||||
//模块id
|
||||
int modeId;
|
||||
RequestInfo requestInfo = (RequestInfo) params.get("RequestInfo");
|
||||
User user = (User) params.get("user");
|
||||
if (requestInfo != null) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
result.put("errmsg", "自定义出错信息");
|
||||
result.put("flag", "false");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue