generated from dxfeng/secondev-chapanda-feishu
应聘过程,代码暂存
This commit is contained in:
parent
54e38f726c
commit
f8a8e23062
|
|
@ -6,6 +6,7 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
|
@ -42,7 +43,11 @@ public class ApplicantRecordPo {
|
|||
if (null == recordOperateType) {
|
||||
return;
|
||||
}
|
||||
recordOperateType.createOperateRecord(this);
|
||||
ApplicantCommonInfo.createOperateRecord(this);
|
||||
try {
|
||||
recordOperateType.createOperateRecord(this);
|
||||
ApplicantCommonInfo.createOperateRecord(this);
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog("应聘过程记录数据插入失败", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,17 +63,17 @@ public enum RecordOperateEnum implements RecordOperateAdapter {
|
|||
}),
|
||||
|
||||
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 createName = Util.null2String(otherParam.get("createName"));
|
||||
String resourceNames = RecruitModeUtil.getResourceNames(fkr);
|
||||
String selectName = ApplicantCommonInfo.getSelectName(recordPo.getFormId(), "jg", jg);
|
||||
|
||||
String content = "创建人:" + user.getLastname() + ", 反馈人:" + resourceNames + " ,结果:" + selectName + " ,评价:" + pj;
|
||||
String content = "创建人:" + createName + ",反馈人:" + resourceNames + ",结果:" + selectName + ",评价:" + pj;
|
||||
|
||||
recordPo.setContent(content);
|
||||
recordPo.setPcId(ypz);
|
||||
|
|
@ -99,12 +99,55 @@ public enum RecordOperateEnum implements RecordOperateAdapter {
|
|||
}),
|
||||
|
||||
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 -> {
|
||||
|
|
@ -183,7 +226,7 @@ public enum RecordOperateEnum implements RecordOperateAdapter {
|
|||
return item;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("不支持的操作类型");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,61 @@
|
|||
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.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/03
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class DeleteInterviewExpand 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");
|
||||
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());
|
||||
}
|
||||
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
|
||||
.billId(String.valueOf(billId))
|
||||
.modeId(String.valueOf(modeId))
|
||||
.operateTime(DateUtil.getDateTime())
|
||||
.user(user)
|
||||
.recordOperateType(RecordOperateEnum.DELETE_INTERVIEW)
|
||||
.otherParam(mainDataMap)
|
||||
.build();
|
||||
recordPo.execute();
|
||||
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
result.put("errmsg", "自定义出错信息");
|
||||
result.put("flag", "false");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -4,7 +4,6 @@ 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;
|
||||
|
|
@ -16,10 +15,10 @@ import java.util.Map;
|
|||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/02
|
||||
* @createTime: 2023/11/03
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class UpdateScreenExpand extends AbstractModeExpandJavaCodeNew {
|
||||
public class DeleteScreenExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
Map<String, String> result = new HashMap<>(2);
|
||||
|
|
@ -30,9 +29,6 @@ public class UpdateScreenExpand extends AbstractModeExpandJavaCodeNew {
|
|||
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());
|
||||
|
|
@ -43,30 +39,18 @@ public class UpdateScreenExpand extends AbstractModeExpandJavaCodeNew {
|
|||
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)
|
||||
.recordOperateType(RecordOperateEnum.DELETE_SCREEN)
|
||||
.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");
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
package weaver.formmode.recruit.modeexpand.record;
|
||||
|
||||
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.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 RecruitRecordModeExpand 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 recordType = Util.null2String(params.get("recordType"));
|
||||
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());
|
||||
}
|
||||
|
||||
// 插入应聘过程
|
||||
if (StringUtils.isNotBlank(recordType)) {
|
||||
RecordOperateEnum operateEnum = RecordOperateEnum.getOperateEnum(recordType);
|
||||
if (null != operateEnum) {
|
||||
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)
|
||||
.recordOperateType(operateEnum)
|
||||
.build();
|
||||
recordPo.execute();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
result.put("errmsg", "自定义出错信息");
|
||||
result.put("flag", "false");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue