generated from dxfeng/secondev-chapanda-feishu
安排入职、信息采集BUG修复、功能完善
This commit is contained in:
parent
70b3bad760
commit
9dc5786e7b
|
|
@ -6,6 +6,7 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -36,8 +37,12 @@ public class ApplicantRecordPo {
|
|||
|
||||
public void autoCreateLink() {
|
||||
String url = "/spa/cube/index.html#/main/cube/card?billid={billId}&type=0&modeId={modeId}&formId={formId}&layoutid={layoutId}&guid=card";
|
||||
if (StringUtils.isBlank(layoutId)) {
|
||||
linkUrl = url.replace("{billId}", billId).replace("{modeId}", modeId).replace("{formId}", formId).replace("&layoutid={layoutId}", "");
|
||||
} else {
|
||||
linkUrl = url.replace("{billId}", billId).replace("{modeId}", modeId).replace("{formId}", formId).replace("{layoutId}", layoutId);
|
||||
}
|
||||
}
|
||||
|
||||
public void execute() {
|
||||
if (null == recordOperateType) {
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ public class ApplicantResumeServiceImpl extends Service implements ApplicantResu
|
|||
// 分配职位
|
||||
String billid = Util.null2String(params.get("billid"));
|
||||
String ypzw = Util.null2String(params.get("ypzw"));
|
||||
rs.executeUpdate("update uf_jcl_yppc set ypzw = ? where id = ?", ypzw, billid);
|
||||
rs.executeUpdate("update uf_jcl_yppc set ypzw = ? , zt = 1 where id = ?", ypzw, billid);
|
||||
returnMap.put("msg", "操作成功");
|
||||
} else if (ApplicantOperateEnum.ARCHIVE.getOperateType().equals(operateType)) {
|
||||
// 归档人才库
|
||||
|
|
@ -297,7 +297,7 @@ public class ApplicantResumeServiceImpl extends Service implements ApplicantResu
|
|||
RecordSet rs = new RecordSet();
|
||||
try {
|
||||
int docId = RecruitModeUtil.createDocId(secCategory, imageFileId, user);
|
||||
// TODO 更新原始简历信息,设置应聘状态未待分配
|
||||
// 更新原始简历信息
|
||||
rs.executeUpdate("update uf_jcl_jlzjb set jlfj=?,ocr=1 where id = ?", docId, resumeId);
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import com.engine.recruit.enums.RecordOperateEnum;
|
|||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.service.InductionManageService;
|
||||
import com.engine.recruit.util.RecruitMessageUtils;
|
||||
import com.weaver.formmodel.data.model.Formfield;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
|
|
@ -18,6 +19,7 @@ import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
|||
import weaver.general.Util;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
|
|
@ -54,18 +56,36 @@ public class InductionManageServiceImpl extends Service implements InductionMana
|
|||
creator = rs.getInt("noLoginUser");
|
||||
}
|
||||
if (-1 == creator) {
|
||||
throw new CustomizeRunTimeException("未配置免登陆访问用户,经检查移动建模应用配置");
|
||||
throw new CustomizeRunTimeException("未配置免登陆访问用户,请检查移动建模应用配置");
|
||||
}
|
||||
|
||||
// 查询信息采集模板内容
|
||||
rs.executeQuery("select yjnr,mbmc from uf_jcl_yjtzmb where mblx = 3");
|
||||
String yjnr = "";
|
||||
String mbmc = "";
|
||||
if (rs.next()) {
|
||||
yjnr = rs.getString("yjnr");
|
||||
mbmc = rs.getString("mbmc");
|
||||
}
|
||||
if (StringUtils.isBlank(yjnr)) {
|
||||
throw new CustomizeRunTimeException("未获取到信息采集邮件通知模板");
|
||||
}
|
||||
// 查询字段信息
|
||||
List<Formfield> fieldList = RecruitModeUtil.getFieldList("uf_jcl_rzgl");
|
||||
Map<String, List<Formfield>> fieldMapList = fieldList.stream().collect(Collectors.groupingBy(Formfield::getLabelName));
|
||||
|
||||
for (String billId : split) {
|
||||
// 判断是否已发送信息采集,已发送的不重复发送
|
||||
rs.executeQuery("select a.id from uf_jcl_xxcj a inner join uf_jcl_rzgl b on a.xm = b.xm and a.sjh = b.sjhm where b.id = ? ", billId);
|
||||
rs.executeQuery("select xxcjid from uf_jcl_rzgl where id = ? ", billId);
|
||||
if (rs.next()) {
|
||||
if (StringUtils.isNotBlank(rs.getString("id"))) {
|
||||
if (StringUtils.isNotBlank(rs.getString("xxcjid"))) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// 查询当前数据字段值
|
||||
rs.executeQuery("select * from uf_jcl_rzgl where id = ? ", billId);
|
||||
Map<String, Object> mainDataMap = RecruitRecordSet.getSingleRecordMap(rs);
|
||||
|
||||
|
||||
// 根据入职管理信息完善信息采集表单
|
||||
Map<String, Object> dataMap = new RecruitDataMap<>();
|
||||
|
|
@ -79,16 +99,12 @@ public class InductionManageServiceImpl extends Service implements InductionMana
|
|||
dataMap.put("formmodeid", formModeId);
|
||||
// 构建建模表基本数据
|
||||
RecruitRecordSet.buildModeInsertFields(dataMap, creator);
|
||||
|
||||
rs.executeQuery("select * from uf_jcl_rzgl where id = ? ", billId);
|
||||
if (rs.next()) {
|
||||
dataMap.put("xm", RecruitModeUtil.parseBlankToNull(rs.getString("xm")));
|
||||
dataMap.put("sfzh", RecruitModeUtil.parseBlankToNull(rs.getString("sfzh")));
|
||||
dataMap.put("nl", RecruitModeUtil.parseBlankToNull(rs.getString("nl")));
|
||||
dataMap.put("xb", RecruitModeUtil.parseBlankToNull(rs.getString("xb")));
|
||||
dataMap.put("sjh", RecruitModeUtil.parseBlankToNull(rs.getString("sjhm")));
|
||||
dataMap.put("yx", RecruitModeUtil.parseBlankToNull(rs.getString("dzyx")));
|
||||
}
|
||||
dataMap.put("xm", RecruitModeUtil.parseBlankToNull(mainDataMap.get("xm")));
|
||||
dataMap.put("sfzh", RecruitModeUtil.parseBlankToNull(mainDataMap.get("sfzh")));
|
||||
dataMap.put("nl", RecruitModeUtil.parseBlankToNull(mainDataMap.get("nl")));
|
||||
dataMap.put("xb", RecruitModeUtil.parseBlankToNull(mainDataMap.get("xb")));
|
||||
dataMap.put("sjh", RecruitModeUtil.parseBlankToNull(mainDataMap.get("sjhm")));
|
||||
dataMap.put("yx", RecruitModeUtil.parseBlankToNull(mainDataMap.get("dzyx")));
|
||||
|
||||
|
||||
// 生成登录密码
|
||||
|
|
@ -98,21 +114,30 @@ public class InductionManageServiceImpl extends Service implements InductionMana
|
|||
dataMap.put("modedatastatus", "1");
|
||||
|
||||
|
||||
// 发送短信
|
||||
String mobile = Util.null2String(dataMap.get("sjh"));
|
||||
String messageContent = RecruitModeUtil.getRecruitPropValue("COLLECT_MESSAGE_CONTENT");
|
||||
if (StringUtils.isBlank(messageContent)) {
|
||||
throw new CustomizeRunTimeException("未获取到短信内容,请检查配置");
|
||||
} else {
|
||||
RecruitMessageUtils.sendSMS(mobile, messageContent);
|
||||
}
|
||||
// 插入数据
|
||||
RecruitRecordSet.insertData(dataMap, "uf_jcl_xxcj");
|
||||
|
||||
int id = RecruitRecordSet.refreshRight(uuid, "uf_jcl_xxcj", formModeId, creator);
|
||||
|
||||
// 更新状态为已发送,反填信息采集ID
|
||||
rs.executeUpdate("update uf_jcl_rzgl set xxcj = ? ,xxcjid = ? where id = ? ", InfoCollectEnum.HAS_SENT.getId(), id, billId);
|
||||
|
||||
// 发送短信
|
||||
String mobile = Util.null2String(dataMap.get("sjh"));
|
||||
String email = Util.null2String(dataMap.get("yx"));
|
||||
|
||||
String messageLink = RecruitModeUtil.getRecruitPropValue("COLLECT_MESSAGE_LINK");
|
||||
messageLink += "&billId=" + id + "&manageId=" + billId;
|
||||
|
||||
yjnr = yjnr.replace("{链接地址}", messageLink);
|
||||
yjnr = yjnr.replace("{初始密码}", password);
|
||||
String msgContent = RecruitModeUtil.getReplaceContent(yjnr, fieldMapList, mainDataMap);
|
||||
// 发送邮件
|
||||
boolean sendEmail = RecruitMessageUtils.SendEmail(email, mbmc, msgContent);
|
||||
// 发送短信
|
||||
boolean sendSMS = RecruitMessageUtils.sendSMS(mobile, msgContent);
|
||||
|
||||
|
||||
// 记录应聘过程
|
||||
rs.executeQuery("select pcid from uf_jcl_rzgl where id = ? ", billId);
|
||||
String pcid = "";
|
||||
|
|
|
|||
Loading…
Reference in New Issue