generated from dxfeng/secondev-chapanda-feishu
offer提醒:当offer状态变为:接受offer、拒绝offer、offer逾期未回复
This commit is contained in:
parent
6f0d44b190
commit
3264b96d95
|
|
@ -1,17 +1,25 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.conn.RecruitDataMap;
|
||||
import com.engine.recruit.conn.RecruitRecordSet;
|
||||
import com.engine.recruit.constant.RecruitConstant;
|
||||
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 com.weaver.formmodel.data.model.Formfield;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
|
|
@ -72,6 +80,20 @@ public class OfferServiceImpl extends Service implements OfferService {
|
|||
// 更新反馈状态、反馈时间
|
||||
rs.executeUpdate("update uf_jcl_offer set zt = ?, fksj = ? where id = ? and dzyx = ?", status, DateUtil.getDateTime(), billId, email);
|
||||
|
||||
|
||||
rs.executeQuery("select * from uf_jcl_offer where id = ? ", billId);
|
||||
RecruitDataMap<Object> dataMap = RecruitRecordSet.getSingleRecordMap(rs);
|
||||
List<Formfield> fieldList = RecruitModeUtil.getFieldList("uf_jcl_offer");
|
||||
Map<String, Formfield> fieldMap = fieldList.stream().collect(Collectors.toMap(Formfield::getFieldname, item -> item, (k1, k2) -> k1));
|
||||
// offer提醒:当offer状态变为:接受offer、拒绝offer、offer逾期未回复 提醒发送人
|
||||
String msgTitle = "offer提醒";
|
||||
String msgContent = "应聘者已经$zt$offer <br/>" +
|
||||
"姓名:$xm$;入职部门:$rzbm$;直接上级:$zjsj$ <br/>" +
|
||||
"请知悉。";
|
||||
msgContent = RecruitModeUtil.getMsgReplaceStr(msgContent, fieldMap, dataMap);
|
||||
RecruitModeUtil.messagePush(RecruitConstant.RECRUIT_MESSAGE_TYPE, msgTitle, msgContent, Collections.singleton(dataMap.getString("fsr")), 1);
|
||||
|
||||
|
||||
// 记录应聘过程
|
||||
ApplicantRecordPo recordPo = ApplicantRecordPo.builder()
|
||||
.billId(String.valueOf(billId))
|
||||
|
|
|
|||
|
|
@ -1,13 +1,19 @@
|
|||
package weaver.interfaces.recruit.cronjob;
|
||||
|
||||
import com.engine.recruit.conn.RecruitDataMap;
|
||||
import com.engine.recruit.conn.RecruitRecordSet;
|
||||
import com.engine.recruit.constant.RecruitConstant;
|
||||
import com.weaver.formmodel.data.model.Formfield;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.general.Util;
|
||||
import weaver.interfaces.schedule.BaseCronJob;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 若当前日期大于失效日期,状态变为“逾期未回复”
|
||||
|
|
@ -31,6 +37,19 @@ public class RecruitRefreshOfferJob extends BaseCronJob {
|
|||
// 当前日期>失效日期,更新状态为逾期未回复
|
||||
if (compDate < 0) {
|
||||
rs.executeUpdate("update uf_jcl_offer set zt = 5 where id = ?", id);
|
||||
|
||||
// offer逾期未回复
|
||||
rs.executeQuery("select * from uf_jcl_offer where id = ? ", id);
|
||||
RecruitDataMap<Object> dataMap = RecruitRecordSet.getSingleRecordMap(rs);
|
||||
List<Formfield> fieldList = RecruitModeUtil.getFieldList("uf_jcl_offer");
|
||||
Map<String, Formfield> fieldMap = fieldList.stream().collect(Collectors.toMap(Formfield::getFieldname, item -> item, (k1, k2) -> k1));
|
||||
// offer提醒:当offer状态变为:接受offer、拒绝offer、offer逾期未回复 提醒发送人
|
||||
String msgTitle = "offer提醒";
|
||||
String msgContent = "应聘者offer逾期未回复 <br/>" +
|
||||
"姓名:$xm$;入职部门:$rzbm$;直接上级:$zjsj$;offer失效日期:"+sxrq+"<br/>" +
|
||||
"请知悉。";
|
||||
msgContent = RecruitModeUtil.getMsgReplaceStr(msgContent, fieldMap, dataMap);
|
||||
RecruitModeUtil.messagePush(RecruitConstant.RECRUIT_MESSAGE_TYPE, msgTitle, msgContent, Collections.singleton(dataMap.getString("fsr")), 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue