generated from dxfeng/secondev-chapanda-feishu
记录应聘过程
This commit is contained in:
parent
b251a3e424
commit
135b7ee44a
|
|
@ -21,7 +21,6 @@ import java.util.List;
|
|||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/18 4:34 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class WorkBenchPortalController {
|
||||
|
|
|
|||
|
|
@ -35,9 +35,8 @@ public class ApplicantRecordPo {
|
|||
private RecordOperateEnum recordOperateType;
|
||||
|
||||
public void autoCreateLink() {
|
||||
// TODO layoutId
|
||||
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);
|
||||
String url = "/spa/cube/index.html#/main/cube/card?billid={billId}&type=0&modeId={modeId}&formId={formId}&layoutid={layoutId}&guid=card";
|
||||
linkUrl = url.replace("{billId}", billId).replace("{modeId}", modeId).replace("{formId}", formId).replace("{layoutId}", layoutId);
|
||||
}
|
||||
|
||||
public void execute() {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import java.util.List;
|
|||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/19 3:03 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import lombok.NoArgsConstructor;
|
|||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/19 11:39 AM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import lombok.NoArgsConstructor;
|
|||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/19 10:31 AM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import lombok.NoArgsConstructor;
|
|||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/9/28 2:02 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ 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;
|
||||
|
|
@ -293,6 +294,16 @@ public enum RecordOperateEnum implements RecordOperateAdapter {
|
|||
}),
|
||||
|
||||
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 -> {
|
||||
|
|
@ -305,31 +316,123 @@ public enum RecordOperateEnum implements RecordOperateAdapter {
|
|||
}),
|
||||
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
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.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;
|
||||
|
|
@ -109,6 +112,26 @@ public class InductionManageServiceImpl extends Service implements InductionMana
|
|||
|
||||
// 更新状态为已发送,反填信息采集ID
|
||||
rs.executeUpdate("update uf_jcl_rzgl set xxcj = ? ,xxcjid = ? where id = ? ", InfoCollectEnum.HAS_SENT.getId(), id, billId);
|
||||
|
||||
// 记录应聘过程
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
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;
|
||||
|
||||
|
|
@ -58,6 +61,16 @@ public class OfferServiceImpl extends Service implements OfferService {
|
|||
}
|
||||
|
||||
rs.executeUpdate("update uf_jcl_offer set zt = ? where id = ? and dzyx = ?", status, billId, email);
|
||||
|
||||
// 记录应聘过程
|
||||
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
|
||||
.billId(String.valueOf(billId))
|
||||
.operateTime(DateUtil.getDateTime())
|
||||
.user(user)
|
||||
.recordOperateType(RecordOperateEnum.OFFER_FEEDBACK)
|
||||
.build();
|
||||
recordPo.execute();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ import java.util.stream.Collectors;
|
|||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/18 4:44 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class WorkBenchPortalServiceImpl extends Service implements com.engine.recruit.service.WorkBenchPortalService {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
package weaver.formmode.recruit.modeexpand.record;
|
||||
|
||||
import com.engine.recruit.enums.RecordOperateEnum;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/06
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class AddRemarkExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
params.put("recordType", RecordOperateEnum.ADD_REMARK.getOperateType());
|
||||
return new RecruitRecordModeExpand().doModeExpand(params);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package weaver.formmode.recruit.modeexpand.record;
|
||||
|
||||
import com.engine.recruit.enums.RecordOperateEnum;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/06
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class DeleteRemarkExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
params.put("recordType", RecordOperateEnum.DELETE_REMARK.getOperateType());
|
||||
return new RecruitRecordModeExpand().doModeExpand(params);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package weaver.formmode.recruit.modeexpand.record;
|
||||
|
||||
import com.engine.recruit.enums.RecordOperateEnum;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/06
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class UpdateRemarkExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
params.put("recordType", RecordOperateEnum.UPDATE_REMARK.getOperateType());
|
||||
return new RecruitRecordModeExpand().doModeExpand(params);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +1,69 @@
|
|||
package weaver.interfaces.recruit.action;
|
||||
|
||||
import com.engine.recruit.entity.record.ApplicantRecordPo;
|
||||
import com.engine.recruit.enums.RecordOperateEnum;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.hrm.User;
|
||||
import weaver.interfaces.workflow.action.Action;
|
||||
import weaver.soa.workflow.request.MainTableInfo;
|
||||
import weaver.soa.workflow.request.Property;
|
||||
import weaver.soa.workflow.request.RequestInfo;
|
||||
import weaver.workflow.request.RequestManager;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class RecruitRecordAction implements Action {
|
||||
|
||||
private String recordType;
|
||||
|
||||
@Override
|
||||
public String execute(RequestInfo requestInfo) {
|
||||
// TODO 流程Action触发待办
|
||||
{
|
||||
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 requestId = requestInfo.getRequestid();
|
||||
RequestManager requestManager = requestInfo.getRequestManager();
|
||||
User user = requestManager.getUser();
|
||||
int formId = requestManager.getFormid();
|
||||
|
||||
|
||||
// 插入应聘过程
|
||||
if (StringUtils.isNotBlank(recordType)) {
|
||||
RecordOperateEnum operateEnum = RecordOperateEnum.getOperateEnum(recordType);
|
||||
if (null != operateEnum) {
|
||||
String createName = requestInfo.getCreatorid();
|
||||
String requestName = requestManager.getRequestname();
|
||||
mainDataMap.put("createName", createName);
|
||||
mainDataMap.put("requestName", requestName);
|
||||
String link = "/spa/workflow/static4form/index.html#/main/workflow/req?requestid=" + requestId;
|
||||
|
||||
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
|
||||
.formId(String.valueOf(formId))
|
||||
.billId(requestId)
|
||||
.operateTime(DateUtil.getDateTime())
|
||||
.user(user)
|
||||
.otherParam(mainDataMap)
|
||||
.recordOperateType(operateEnum)
|
||||
.linkUrl(link)
|
||||
.build();
|
||||
recordPo.execute();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getRecordType() {
|
||||
return recordType;
|
||||
}
|
||||
|
||||
public void setRecordType(String recordType) {
|
||||
this.recordType = recordType;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue