generated from dxfeng/secondev-chapanda-feishu
应聘过程-背调
This commit is contained in:
parent
d0c2bfca99
commit
38c9c3bdd5
|
|
@ -35,6 +35,7 @@ public class ApplicantRecordPo {
|
||||||
private RecordOperateEnum recordOperateType;
|
private RecordOperateEnum recordOperateType;
|
||||||
|
|
||||||
public void autoCreateLink() {
|
public void autoCreateLink() {
|
||||||
|
// TODO layoutId
|
||||||
String url = "/spa/cube/index.html#/main/cube/card?billid={billId}&type=0&modeId={modeId}&formId={formId}&guid=card";
|
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);
|
linkUrl = url.replace("{billId}", billId).replace("{modeId}", modeId).replace("{formId}", formId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -249,12 +249,47 @@ public enum RecordOperateEnum implements RecordOperateAdapter {
|
||||||
}),
|
}),
|
||||||
|
|
||||||
ADD_BACK_TONE("addBackTone", "背调录入", "背调", recordPo -> {
|
ADD_BACK_TONE("addBackTone", "背调录入", "背调", recordPo -> {
|
||||||
|
User user = recordPo.getUser();
|
||||||
|
Map<String, Object> otherParam = recordPo.getOtherParam();
|
||||||
|
|
||||||
|
String dcjg = Util.null2String(otherParam.get("dcjg"));
|
||||||
|
String ypz = Util.null2String(otherParam.get("ypz"));
|
||||||
|
String dcdw = Util.null2String(otherParam.get("dcdw"));
|
||||||
|
|
||||||
|
String createName = Util.null2String(otherParam.get("createName"));
|
||||||
|
String selectName = ApplicantCommonInfo.getSelectName(recordPo.getFormId(), "dcjg", dcjg);
|
||||||
|
|
||||||
|
String content = "创建人:" + createName + ",调查结果:" + selectName + " ,调查单位:" + dcdw;
|
||||||
|
|
||||||
|
recordPo.setContent(content);
|
||||||
|
recordPo.setPcId(ypz);
|
||||||
|
recordPo.autoCreateLink();
|
||||||
}),
|
}),
|
||||||
|
|
||||||
UPDATE_BACK_TONE("updateBackTone", "修改背调记录", "背调", recordPo -> {
|
UPDATE_BACK_TONE("updateBackTone", "修改背调记录", "背调", recordPo -> {
|
||||||
|
User user = recordPo.getUser();
|
||||||
|
Map<String, Object> otherParam = recordPo.getOtherParam();
|
||||||
|
|
||||||
|
String dcjg = Util.null2String(otherParam.get("dcjg"));
|
||||||
|
String ypz = Util.null2String(otherParam.get("ypz"));
|
||||||
|
String dcdw = Util.null2String(otherParam.get("dcdw"));
|
||||||
|
|
||||||
|
String selectName = ApplicantCommonInfo.getSelectName(recordPo.getFormId(), "dcjg", dcjg);
|
||||||
|
|
||||||
|
String content = "更新关联数据:最近修改人:" + user.getLastname() + ",调查结果:" + selectName + " ,调查单位" + dcdw;
|
||||||
|
recordPo.setContent(content);
|
||||||
|
|
||||||
|
recordPo.autoCreateLink();
|
||||||
|
recordPo.setPcId(ypz);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
DELETE_BACK_TONE("deleteBackTone", "删除背调记录", "背调", recordPo -> {
|
DELETE_BACK_TONE("deleteBackTone", "删除背调记录", "背调", 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);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
CREATE_OFFER("createOffer", "创建offer", "创建offer", recordPo -> {
|
CREATE_OFFER("createOffer", "创建offer", "创建offer", recordPo -> {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
public class DeleteBackToneExpand 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_BACK_TONE)
|
||||||
|
.otherParam(mainDataMap)
|
||||||
|
.build();
|
||||||
|
recordPo.execute();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
result.put("errmsg", "自定义出错信息");
|
||||||
|
result.put("flag", "false");
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package weaver.formmode.recruit.modeexpand.record;
|
||||||
|
|
||||||
|
import com.engine.recruit.enums.RecordOperateEnum;
|
||||||
|
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class UpdateBackToneExpand extends AbstractModeExpandJavaCodeNew {
|
||||||
|
@Override
|
||||||
|
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||||
|
params.put("recordType", RecordOperateEnum.UPDATE_BACK_TONE.getOperateType());
|
||||||
|
return new RecruitRecordModeExpand().doModeExpand(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue