安排入职、信息采集BUG修复、功能完善

This commit is contained in:
dxfeng 2023-11-14 16:46:53 +08:00
parent 70b3bad760
commit 9dc5786e7b
3 changed files with 54 additions and 24 deletions

View File

@ -6,6 +6,7 @@ import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import weaver.general.BaseBean; import weaver.general.BaseBean;
import weaver.hrm.User; import weaver.hrm.User;
@ -36,7 +37,11 @@ public class ApplicantRecordPo {
public void autoCreateLink() { public void autoCreateLink() {
String url = "/spa/cube/index.html#/main/cube/card?billid={billId}&type=0&modeId={modeId}&formId={formId}&layoutid={layoutId}&guid=card"; 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); 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() { public void execute() {

View File

@ -204,7 +204,7 @@ public class ApplicantResumeServiceImpl extends Service implements ApplicantResu
// 分配职位 // 分配职位
String billid = Util.null2String(params.get("billid")); String billid = Util.null2String(params.get("billid"));
String ypzw = Util.null2String(params.get("ypzw")); 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", "操作成功"); returnMap.put("msg", "操作成功");
} else if (ApplicantOperateEnum.ARCHIVE.getOperateType().equals(operateType)) { } else if (ApplicantOperateEnum.ARCHIVE.getOperateType().equals(operateType)) {
// 归档人才库 // 归档人才库
@ -297,7 +297,7 @@ public class ApplicantResumeServiceImpl extends Service implements ApplicantResu
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
try { try {
int docId = RecruitModeUtil.createDocId(secCategory, imageFileId, user); int docId = RecruitModeUtil.createDocId(secCategory, imageFileId, user);
// TODO 更新原始简历信息设置应聘状态未待分配 // 更新原始简历信息
rs.executeUpdate("update uf_jcl_jlzjb set jlfj=?,ocr=1 where id = ?", docId, resumeId); rs.executeUpdate("update uf_jcl_jlzjb set jlfj=?,ocr=1 where id = ?", docId, resumeId);
} catch (Exception e) { } catch (Exception e) {

View File

@ -11,6 +11,7 @@ import com.engine.recruit.enums.RecordOperateEnum;
import com.engine.recruit.exception.CustomizeRunTimeException; import com.engine.recruit.exception.CustomizeRunTimeException;
import com.engine.recruit.service.InductionManageService; import com.engine.recruit.service.InductionManageService;
import com.engine.recruit.util.RecruitMessageUtils; import com.engine.recruit.util.RecruitMessageUtils;
import com.weaver.formmodel.data.model.Formfield;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import weaver.common.DateUtil; import weaver.common.DateUtil;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
@ -18,6 +19,7 @@ import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
import weaver.general.Util; import weaver.general.Util;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* @author:dxfeng * @author:dxfeng
@ -54,18 +56,36 @@ public class InductionManageServiceImpl extends Service implements InductionMana
creator = rs.getInt("noLoginUser"); creator = rs.getInt("noLoginUser");
} }
if (-1 == creator) { 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) { 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 (rs.next()) {
if (StringUtils.isNotBlank(rs.getString("id"))) { if (StringUtils.isNotBlank(rs.getString("xxcjid"))) {
continue; continue;
} }
} }
// 查询当前数据字段值
rs.executeQuery("select * from uf_jcl_rzgl where id = ? ", billId);
Map<String, Object> mainDataMap = RecruitRecordSet.getSingleRecordMap(rs);
// 根据入职管理信息完善信息采集表单 // 根据入职管理信息完善信息采集表单
Map<String, Object> dataMap = new RecruitDataMap<>(); Map<String, Object> dataMap = new RecruitDataMap<>();
@ -79,16 +99,12 @@ public class InductionManageServiceImpl extends Service implements InductionMana
dataMap.put("formmodeid", formModeId); dataMap.put("formmodeid", formModeId);
// 构建建模表基本数据 // 构建建模表基本数据
RecruitRecordSet.buildModeInsertFields(dataMap, creator); RecruitRecordSet.buildModeInsertFields(dataMap, creator);
dataMap.put("xm", RecruitModeUtil.parseBlankToNull(mainDataMap.get("xm")));
rs.executeQuery("select * from uf_jcl_rzgl where id = ? ", billId); dataMap.put("sfzh", RecruitModeUtil.parseBlankToNull(mainDataMap.get("sfzh")));
if (rs.next()) { dataMap.put("nl", RecruitModeUtil.parseBlankToNull(mainDataMap.get("nl")));
dataMap.put("xm", RecruitModeUtil.parseBlankToNull(rs.getString("xm"))); dataMap.put("xb", RecruitModeUtil.parseBlankToNull(mainDataMap.get("xb")));
dataMap.put("sfzh", RecruitModeUtil.parseBlankToNull(rs.getString("sfzh"))); dataMap.put("sjh", RecruitModeUtil.parseBlankToNull(mainDataMap.get("sjhm")));
dataMap.put("nl", RecruitModeUtil.parseBlankToNull(rs.getString("nl"))); dataMap.put("yx", RecruitModeUtil.parseBlankToNull(mainDataMap.get("dzyx")));
dataMap.put("xb", RecruitModeUtil.parseBlankToNull(rs.getString("xb")));
dataMap.put("sjh", RecruitModeUtil.parseBlankToNull(rs.getString("sjhm")));
dataMap.put("yx", RecruitModeUtil.parseBlankToNull(rs.getString("dzyx")));
}
// 生成登录密码 // 生成登录密码
@ -98,21 +114,30 @@ public class InductionManageServiceImpl extends Service implements InductionMana
dataMap.put("modedatastatus", "1"); 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"); RecruitRecordSet.insertData(dataMap, "uf_jcl_xxcj");
int id = RecruitRecordSet.refreshRight(uuid, "uf_jcl_xxcj", formModeId, creator); int id = RecruitRecordSet.refreshRight(uuid, "uf_jcl_xxcj", formModeId, creator);
// 更新状态为已发送,反填信息采集ID // 更新状态为已发送,反填信息采集ID
rs.executeUpdate("update uf_jcl_rzgl set xxcj = ? ,xxcjid = ? where id = ? ", InfoCollectEnum.HAS_SENT.getId(), id, billId); 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); rs.executeQuery("select pcid from uf_jcl_rzgl where id = ? ", billId);
String pcid = ""; String pcid = "";