generated from dxfeng/secondev-chapanda-feishu
恒益集团招聘模块二次开发
This commit is contained in:
parent
c6c4cdf591
commit
2c7bdcb417
|
|
@ -37,6 +37,7 @@ public class RecruitConstant {
|
||||||
public static final String OFFER_MOBILE_URL;
|
public static final String OFFER_MOBILE_URL;
|
||||||
public static final String APPLICANTS_RESUMES_CATEGORY;
|
public static final String APPLICANTS_RESUMES_CATEGORY;
|
||||||
public static final String INTERVIEW_FEEDBACK_URL;
|
public static final String INTERVIEW_FEEDBACK_URL;
|
||||||
|
public static final String OFFER_FEEDBACK_URL;
|
||||||
public static final String REMIND_SEARCH_LINK;
|
public static final String REMIND_SEARCH_LINK;
|
||||||
public static final String OCR_TYPE;
|
public static final String OCR_TYPE;
|
||||||
public static final String OCR_URL;
|
public static final String OCR_URL;
|
||||||
|
|
@ -141,6 +142,12 @@ public class RecruitConstant {
|
||||||
}
|
}
|
||||||
INTERVIEW_FEEDBACK_URL = getCompleteUrl(interviewFeedbackUrl);
|
INTERVIEW_FEEDBACK_URL = getCompleteUrl(interviewFeedbackUrl);
|
||||||
|
|
||||||
|
String offerFeedbackUrl = getRecruitPropValue("OFFER_FEEDBACK_URL");
|
||||||
|
if (StringUtils.isBlank(offerFeedbackUrl)) {
|
||||||
|
offerFeedbackUrl = "/spa/custom/static/index.html#/main/cs/app/127192a8cd464d828d433c78b1dea531_Interview";
|
||||||
|
}
|
||||||
|
OFFER_FEEDBACK_URL = getCompleteUrl(offerFeedbackUrl);
|
||||||
|
|
||||||
String modeAppName = getRecruitPropValue("MODE_APP_NAME");
|
String modeAppName = getRecruitPropValue("MODE_APP_NAME");
|
||||||
if (StringUtils.isBlank(modeAppName)) {
|
if (StringUtils.isBlank(modeAppName)) {
|
||||||
modeAppName = "JCL_招聘管理";
|
modeAppName = "JCL_招聘管理";
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import com.engine.recruit.util.ResponseResult;
|
||||||
import com.engine.recruit.wrapper.InductionManageWrapper;
|
import com.engine.recruit.wrapper.InductionManageWrapper;
|
||||||
import com.engine.recruit.wrapper.OfferWrapper;
|
import com.engine.recruit.wrapper.OfferWrapper;
|
||||||
import com.engine.recruit.wrapper.RecruitInterviewWrapper;
|
import com.engine.recruit.wrapper.RecruitInterviewWrapper;
|
||||||
|
import com.engine.recruit.wrapper.RecruitOfferWrapper;
|
||||||
import weaver.hrm.HrmUserVarify;
|
import weaver.hrm.HrmUserVarify;
|
||||||
import weaver.hrm.User;
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
|
@ -34,6 +35,10 @@ public class RecruitMobileModeController {
|
||||||
return ServiceUtil.getService(RecruitInterviewWrapper.class, user);
|
return ServiceUtil.getService(RecruitInterviewWrapper.class, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RecruitOfferWrapper getRecruitOfferWrapper(User user) {
|
||||||
|
return ServiceUtil.getService(RecruitOfferWrapper.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/getOfferContent")
|
@Path("/getOfferContent")
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
|
@ -43,14 +48,14 @@ public class RecruitMobileModeController {
|
||||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getOfferWrapper(user)::getOfferContent, params);
|
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getOfferWrapper(user)::getOfferContent, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
//@POST
|
||||||
@Path("/updateOfferStatus")
|
//@Path("/updateOfferStatus")
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
//@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String updateOfferStatus(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
//public String updateOfferStatus(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||||
User user = HrmUserVarify.getUser(request, response);
|
// User user = HrmUserVarify.getUser(request, response);
|
||||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
// Map<String, Object> params = ParamUtil.request2Map(request);
|
||||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getOfferWrapper(user)::updateOfferStatus, params);
|
// return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getOfferWrapper(user)::updateOfferStatus, params);
|
||||||
}
|
//}
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/checkLoginInfo")
|
@Path("/checkLoginInfo")
|
||||||
|
|
@ -78,4 +83,13 @@ public class RecruitMobileModeController {
|
||||||
Map<String, Object> param = ParamUtil.request2Map(request);
|
Map<String, Object> param = ParamUtil.request2Map(request);
|
||||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getRecruitInterviewWrapper(user)::updateInterviewStatus, param);
|
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getRecruitInterviewWrapper(user)::updateInterviewStatus, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/updateOfferStatus")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String updateOfferStatus(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
Map<String, Object> param = ParamUtil.request2Map(request);
|
||||||
|
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getRecruitOfferWrapper(user)::updateOfferStatus, param);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,4 +15,12 @@ public interface RecruitOfferService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Map<String, Object> updatePreContent(Map<String, Object> param);
|
Map<String, Object> updatePreContent(Map<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新Offer状态
|
||||||
|
*
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> updateOfferStatus(Map<String, Object> param);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,12 @@ package com.engine.recruit.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.engine.core.impl.Service;
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.recruit.conn.RecruitRecordSet;
|
||||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||||
import com.engine.recruit.service.RecruitOfferService;
|
import com.engine.recruit.service.RecruitOfferService;
|
||||||
import com.weaver.formmodel.data.model.Formfield;
|
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.conn.RecordSet;
|
import weaver.conn.RecordSet;
|
||||||
import weaver.formmode.recruit.modeexpand.offer.CreateOfferModeExpand;
|
import weaver.formmode.recruit.modeexpand.offer.CreateOfferModeExpand;
|
||||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||||
|
|
@ -52,4 +54,55 @@ public class RecruitOfferServiceImpl extends Service implements RecruitOfferServ
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> updateOfferStatus(Map<String, Object> param) {
|
||||||
|
Map<String, Object> returnMap = new HashMap<>(3);
|
||||||
|
String status = Util.null2String(param.get("status"));
|
||||||
|
String uuid = Util.null2String(param.get("uuid"));
|
||||||
|
returnMap.put("type", "error");
|
||||||
|
returnMap.put("message", "反馈失败");
|
||||||
|
|
||||||
|
if (StringUtils.isBlank(status) || StringUtils.isBlank(uuid)) {
|
||||||
|
returnMap.put("description", "反馈失败,请直接点击邮件/短信中的链接地址访问,请勿修改链接内容。");
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select * from uf_jcl_offer where modeuuid = ? ", uuid);
|
||||||
|
Map<String, Object> mainDataMap = RecruitRecordSet.getSingleRecordMap(rs);
|
||||||
|
String zt = "";
|
||||||
|
if (!mainDataMap.isEmpty()) {
|
||||||
|
zt = Util.null2String(mainDataMap.get("zt"));
|
||||||
|
} else {
|
||||||
|
returnMap.put("description", "反馈失败,offer信息有误,请联系相应HR确认");
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ("2".equals(zt) || "3".equals(zt)) {
|
||||||
|
returnMap.put("description", "您已成功反馈,请勿重复反馈。");
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Formfield> fieldList = RecruitModeUtil.getFieldList("uf_jcl_offer");
|
||||||
|
Map<String, Formfield> fieldMap = fieldList.stream().collect(Collectors.toMap(Formfield::getFieldname, item -> item, (k1, k2) -> k1));
|
||||||
|
// 参加
|
||||||
|
if ("3".equals(status)) {
|
||||||
|
returnMap.put("type", "success");
|
||||||
|
returnMap.put("message", "已确认接受offer");
|
||||||
|
returnMap.put("description", "您已接受offer,感谢您的应聘,请按期准备入职,如有问题可以联系相应HR");
|
||||||
|
|
||||||
|
rs.executeUpdate("update uf_jcl_offer set zt = ?, fksj = ? where modeuuid = ? ", status, DateUtil.getDateTime(), uuid);
|
||||||
|
|
||||||
|
} else if ("2".equals(status)) {
|
||||||
|
returnMap.put("type", "info");
|
||||||
|
returnMap.put("message", "已拒接接受offer");
|
||||||
|
returnMap.put("description", "您已拒绝offer,感谢您的应聘。希望您能够找到真正适合自己的工作。");
|
||||||
|
|
||||||
|
rs.executeUpdate("update uf_jcl_offer set zt = ?, fksj = ? where modeuuid = ? ", status, DateUtil.getDateTime(), uuid);
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,8 @@ public class RecruitOfferWrapper extends Service {
|
||||||
public Map<String, Object> updatePreContent(Map<String, Object> param) {
|
public Map<String, Object> updatePreContent(Map<String, Object> param) {
|
||||||
return getRecruitOfferService(user).updatePreContent(param);
|
return getRecruitOfferService(user).updatePreContent(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<String, Object> updateOfferStatus(Map<String, Object> param) {
|
||||||
|
return getRecruitOfferService(user).updateOfferStatus(param);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package weaver.formmode.recruit.modeexpand.offer;
|
package weaver.formmode.recruit.modeexpand.offer;
|
||||||
|
|
||||||
|
import com.engine.recruit.conn.ApplicantCommonInfo;
|
||||||
import com.engine.recruit.constant.RecruitConstant;
|
import com.engine.recruit.constant.RecruitConstant;
|
||||||
import com.engine.recruit.enums.RecordOperateEnum;
|
import com.engine.recruit.enums.RecordOperateEnum;
|
||||||
import com.engine.recruit.util.RecruitMessageUtils;
|
import com.engine.recruit.util.RecruitMessageUtils;
|
||||||
|
|
@ -67,13 +68,11 @@ public class CreateOfferModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||||
}
|
}
|
||||||
if (sendSms) {
|
if (sendSms) {
|
||||||
String name = Util.null2String(mainDataMap.get("xm"));
|
String name = Util.null2String(mainDataMap.get("xm"));
|
||||||
|
name= ApplicantCommonInfo.getApplicantName(name);
|
||||||
String positionName = Util.null2String(mainDataMap.get("zpzwmc"));
|
String positionName = Util.null2String(mainDataMap.get("zpzwmc"));
|
||||||
|
positionName=ApplicantCommonInfo.getApplicantPosition(positionName);
|
||||||
String endDate = Util.null2String(mainDataMap.get("sxrq"));
|
String endDate = Util.null2String(mainDataMap.get("sxrq"));
|
||||||
String companyId = Util.null2String(mainDataMap.get("rzgs"));
|
String companyId = Util.null2String(mainDataMap.get("rzgs"));
|
||||||
//if (StringUtils.isAnyBlank(name, positionName, endDate, companyId)) {
|
|
||||||
// result.put("errmsg", "offer短信发送失败,应聘者信息获取失败");
|
|
||||||
// result.put("flag", "false");
|
|
||||||
//}
|
|
||||||
String mobileContent = name + "你好,恭喜你成功通过" + new SubCompanyComInfo().getSubCompanyname(companyId) + "的" + positionName + "面试,聘用通知已发送至你的邮箱,请注意查收邮件,并于" + endDate + "前确认,逾期将失效。";
|
String mobileContent = name + "你好,恭喜你成功通过" + new SubCompanyComInfo().getSubCompanyname(companyId) + "的" + positionName + "面试,聘用通知已发送至你的邮箱,请注意查收邮件,并于" + endDate + "前确认,逾期将失效。";
|
||||||
|
|
||||||
RecruitMessageUtils.sendSMS(sjh, mobileContent);
|
RecruitMessageUtils.sendSMS(sjh, mobileContent);
|
||||||
|
|
@ -103,10 +102,21 @@ public class CreateOfferModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||||
*/
|
*/
|
||||||
public static String getOfferMsgContent(String billId, List<Formfield> fieldList, Map<String, Object> mainDataMap, String tznr, String yx) {
|
public static String getOfferMsgContent(String billId, List<Formfield> fieldList, Map<String, Object> mainDataMap, String tznr, String yx) {
|
||||||
Map<String, List<Formfield>> fieldMapList = fieldList.stream().collect(Collectors.groupingBy(Formfield::getLabelName));
|
Map<String, List<Formfield>> fieldMapList = fieldList.stream().collect(Collectors.groupingBy(Formfield::getLabelName));
|
||||||
// 发送邮件
|
//// 发送邮件
|
||||||
String offerMobileUrl = RecruitConstant.OFFER_MOBILE_URL + "&billid=" + billId + "&dzyx=" + yx;
|
//String offerMobileUrl = RecruitConstant.OFFER_MOBILE_URL + "&billid=" + billId + "&dzyx=" + yx;
|
||||||
String mobileLink = "<span color='red'><a href='" + offerMobileUrl + "' target='_blank'>录用通知函</a></span>";
|
//String mobileLink = "<span color='red'><a href='" + offerMobileUrl + "' target='_blank'>录用通知函</a></span>";
|
||||||
tznr = tznr.replace("{录用通知函}", mobileLink);
|
//tznr = tznr.replace("{录用通知函}", mobileLink);
|
||||||
return RecruitModeUtil.getReplaceContent(tznr, fieldMapList, mainDataMap);
|
RecordSet rs = new RecordSet();
|
||||||
|
rs.executeQuery("select modeuuid from uf_jcl_offer where id = ? ", billId);
|
||||||
|
String uuid = "";
|
||||||
|
if (rs.next()) {
|
||||||
|
uuid = rs.getString("modeuuid");
|
||||||
|
}
|
||||||
|
// TODO
|
||||||
|
String confirmUrl = RecruitConstant.OFFER_FEEDBACK_URL + "?uuid=" + uuid;
|
||||||
|
String emailContent = "<div style=\"border:3px solid silver;width:635px;height:55px;line-height:55px;font-family:'microsoft Yahei';font-size:18px;font-weight:bold;color:#333;padding-left:10px\">请您答复是否接受offer? <a href=\"" + confirmUrl + "&status=3\" style=\"text-decoration:underline;color:#0000cc;margin-right:10px\">接受</a> <a href=\"" + confirmUrl + "&status=2\" style=\"text-decoration:underline;color:#0000cc;\">拒绝</a></div>";
|
||||||
|
// 邮件内容拼接确认信息
|
||||||
|
emailContent = tznr + emailContent;
|
||||||
|
return RecruitModeUtil.getReplaceContent(emailContent, fieldMapList, mainDataMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue