Commit f024fa87 by jianan

电子报聘回退优化4

parent cd1b0e66
package com.yd.api.agms.service.impl; package com.yd.api.agms.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.yd.api.agms.service.AgmsHiringService; import com.yd.api.agms.service.AgmsHiringService;
import com.yd.api.agms.vo.hiring.*; import com.yd.api.agms.vo.hiring.*;
...@@ -567,25 +568,32 @@ public class AgmsHiringServiceImpl implements AgmsHiringService { ...@@ -567,25 +568,32 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
} }
private void setRecordsRollBack(String stepsSeqBackTo, Integer stepSeq, String rejectNote, Long basicInfoId) { private void setRecordsRollBack(String stepsSeqBackTo, Integer stepSeq, String rejectNote, Long basicInfoId) {
String approveName;
int stepSeqStart; int stepSeqStart;
switch (stepsSeqBackTo) { switch (stepsSeqBackTo) {
case "-2": case "-2":
stepSeqStart = 1; stepSeqStart = 1;
approveName = "辅导人";
break; break;
case "1": case "1":
stepSeqStart = 2; stepSeqStart = 2;
approveName = "体系负责人";
break; break;
case "2": case "2":
stepSeqStart = 3; stepSeqStart = 3;
approveName = "公司运营主管";
break; break;
case "3": case "3":
stepSeqStart = 4; stepSeqStart = 4;
approveName = "寿险总经理";
break; break;
case "4": case "4":
stepSeqStart = 5; stepSeqStart = 5;
approveName = "公司总经理";
break; break;
default: default:
stepSeqStart = 1; stepSeqStart = 1;
approveName = "辅导人";
break; break;
} }
// 查询审批记录 // 查询审批记录
...@@ -599,16 +607,18 @@ public class AgmsHiringServiceImpl implements AgmsHiringService { ...@@ -599,16 +607,18 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
List<PractitionerInfo> practitionerList = aclPractitionerDalService.findPractitionerInfoByIdList(practitionerIds); List<PractitionerInfo> practitionerList = aclPractitionerDalService.findPractitionerInfoByIdList(practitionerIds);
// 回退提醒发消息(短信和微信推送) // 回退提醒发消息(短信和微信推送)
this.approveRollBackNoticeSendMsg(rejectNote, practitionerList, basicInfoId); this.approveRollBackNoticeSendMsg(approveName, rejectNote, practitionerList, basicInfoId);
} }
private void approveRollBackNoticeSendMsg(String rejectNote, List<PractitionerInfo> practitionerList, Long basicInfoId) { private void approveRollBackNoticeSendMsg(String approveName, String rejectNote, List<PractitionerInfo> practitionerList, Long basicInfoId) {
AclPractitionerHiringBasicInfo basicInfo = aclPractitionerHiringBasicInfoDalService.findById(basicInfoId); AclPractitionerHiringBasicInfo basicInfo = aclPractitionerHiringBasicInfoDalService.findById(basicInfoId);
// 查询辅导人所在S1,S2,S3 // 查询辅导人所在S1,S2,S3
AclPractitionerHiringMembership hiringMemberShip = practitionerHiringDalService.queryHiringMemberShip(basicInfoId); AclPractitionerHiringMembership hiringMemberShip = practitionerHiringDalService.queryHiringMemberShip(basicInfoId);
// 报聘人组织关系
String orgInfo = practitionerHiringDalService.getHiringOrganizationInfo(basicInfo, hiringMemberShip);
// 短信模板 // 短信模板
String templateCode = systemConfigService.getSingleConfigValue("ALI_SMS_HiringApproveNotice"); String templateCode = systemConfigService.getSingleConfigValue("ALI_SMS_HiringApproveRollBackNotice");
// 被提醒人的姓名手机号 // 被提醒人的姓名手机号
String mobileNo; String mobileNo;
...@@ -620,9 +630,21 @@ public class AgmsHiringServiceImpl implements AgmsHiringService { ...@@ -620,9 +630,21 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
if (StringUtils.isNotBlank(mobileNo)) { if (StringUtils.isNotBlank(mobileNo)) {
logger.error("【》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》电子报聘回退发送短信"); logger.error("【》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》电子报聘回退发送短信");
logger.error("【》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》" + name + ": " + mobileNo); logger.error("【》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》" + name + ": " + mobileNo);
// 发短信 // 短信内容
String content = "{\"name\":\"" + name + "\",\"hiringName\":\"" + "已回退: " + "\"}"; // String content = "{\"name\":\"" + name + "\",\"hiringName\":\"" + "已回退: " + "\"}";
sendService.sendEmailOrSMS("sms", mobileNo, "0", content, templateCode, null, null, "电子报聘审批回退", 99, basicInfoId); JSONObject content = new JSONObject();
content.put("name", name);
content.put("hiringName", orgInfo);
if (mobileNo.equals(basicInfo.getMobileNo())) {
content.put("approveName", "公众号,退回原因<" + rejectNote + ">");
} else {
if (name.equals(approveName)) {
content.put("approveName", "您,退回原因<" + rejectNote + ">");
} else {
content.put("approveName", approveName + ",退回原因<" + rejectNote + ">");
}
}
sendService.sendEmailOrSMS("sms", mobileNo, "0", content.toJSONString(), templateCode, null, null, "电子报聘审批回退", 99, basicInfoId);
} else { } else {
logger.error("【》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》电子报聘审批人电话号码不存在"); logger.error("【》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》电子报聘审批人电话号码不存在");
logger.error("【》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》" + name + ": " + mobileNo); logger.error("【》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》" + name + ": " + mobileNo);
...@@ -632,7 +654,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService { ...@@ -632,7 +654,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
} }
// 微信模板 // 微信模板
String firstValue = systemConfigService.getSingleConfigValue("TENCENT_WECHAT_TEMPLATE_FIRST_HIRING"); String firstValue = systemConfigService.getSingleConfigValue("TENCENT_WECHAT_TEMPLATE_FIRST_HIRING");
String orgInfo = practitionerHiringDalService.getHiringOrganizationInfo(basicInfo, hiringMemberShip);
firstValue.replace("hiringName", orgInfo); firstValue.replace("hiringName", orgInfo);
StringBuffer stringBuffer = new StringBuffer(firstValue); StringBuffer stringBuffer = new StringBuffer(firstValue);
stringBuffer.append(";审批回退,回退原因<").append(rejectNote).append(">"); stringBuffer.append(";审批回退,回退原因<").append(rejectNote).append(">");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment