Commit 6e4e11e8 by jianan

电子报聘回退优化6

parent 700239ab
......@@ -209,7 +209,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
//判断当前操作人是否具有当前流程的审批权限
Integer currentStepSeq = requestVO.getHiringApproveStepsSeq();
if (currentStepSeq == null) {
responseVO.setCommonResult(new CommonResult(false, "审批已结束"));
responseVO.setCommonResult(new CommonResult(false, "hiringApproveStepsSeq为空,审批已结束"));
return;
}
BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("stepSeq", currentStepSeq);
......@@ -604,9 +604,9 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
List<AclPractitionerHiringApproveRecords> recordsList = aclPractitionerHiringApproveRecordsDalService.queryListByBasicInfoId(basicInfoId);
// 筛选需要提醒的经纪人id
List<Long> practitionerIds = recordsList.stream()
.filter(i -> (Integer.valueOf(i.getStepSeq()) >= stepSeqStart && Integer.valueOf(i.getStepSeq()) < stepSeq)
.filter(i -> (Integer.parseInt(i.getStepSeq()) >= stepSeqStart && Integer.parseInt(i.getStepSeq()) < stepSeq)
)
.map(i -> i.getApprovingPractitionerId())
.map(AclPractitionerHiringApproveRecords::getApprovingPractitionerId)
.collect(Collectors.toList());
List<PractitionerInfo> practitionerList = aclPractitionerDalService.findPractitionerInfoByIdList(practitionerIds);
......@@ -623,7 +623,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
// 短信模板
String templateCode = systemConfigService.getSingleConfigValue("ALI_SMS_HiringApproveRollBackNotice");
String jumpUrl = systemConfigService.getSingleConfigValue("hiringApprove_page_url");
// 被提醒人的姓名手机号
String mobileNo;
String name;
......@@ -632,10 +632,9 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
name = practitioner.getName();
// 1.发短信
if (StringUtils.isNotBlank(mobileNo)) {
logger.error("【》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》电子报聘回退发送短信");
logger.error("【》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》电子报聘退回发送短信");
logger.error("【》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》" + name + ": " + mobileNo);
// 短信内容
// String content = "{\"name\":\"" + name + "\",\"hiringName\":\"" + "已回退: " + "\"}";
// 短信内容 ${name},您好!${hiringName}报聘审批被退回至${approveName}
JSONObject content = new JSONObject();
content.put("name", name);
content.put("hiringName", orgInfo);
......@@ -643,12 +642,12 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
content.put("approveName", "公众号,退回原因<" + rejectNote + ">");
} else {
if (name.equals(approveName)) {
content.put("approveName", "您,退回原因<" + rejectNote + ">");
content.put("approveName", "您,退回原因<" + rejectNote + ">" + ",请至“赢家平台>我的团队-报聘审批”进行查看审批,谢谢!" + jumpUrl);
} else {
content.put("approveName", approveName + ",退回原因<" + rejectNote + ">");
content.put("approveName", approveName + ",退回原因<" + rejectNote + ">" + ",请至“赢家平台>我的团队-报聘审批”进行查看审批,谢谢!" + jumpUrl);
}
}
sendService.sendEmailOrSMS("sms", mobileNo, "0", content.toJSONString(), templateCode, null, null, "电子报聘审批回退", 99, basicInfoId);
sendService.sendEmailOrSMS("sms", mobileNo, "0", content.toJSONString(), templateCode, null, null, "电子报聘审批退回", 99, basicInfoId);
} else {
logger.error("【》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》电子报聘审批人电话号码不存在");
logger.error("【》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》" + name + ": " + mobileNo);
......@@ -657,14 +656,14 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
}
// 微信模板
String firstValue = systemConfigService.getSingleConfigValue("TENCENT_WECHAT_TEMPLATE_FIRST_HIRING");
String firstValue = "name,您好!hiringName经纪人报聘审批被退回";
firstValue.replace("hiringName", orgInfo);
firstValue = firstValue.replace("hiringName", orgInfo);
StringBuffer stringBuffer = new StringBuffer(firstValue);
stringBuffer.append(";审批回退,回退原因<").append(rejectNote).append(">");
stringBuffer.append(";审批退回,退回原因<").append(rejectNote).append(">");
// 用现有方法发微信
agmsHiringDalService.noticeSendWeChatMsg(stringBuffer.toString(), "回退待审批", practitionerList, basicInfo);
agmsHiringDalService.noticeSendWeChatMsg(stringBuffer.toString(), "退回待审批", practitionerList, basicInfo);
}
private boolean isHasNextStep(Long loginPractitionerId, String mobileNo, Long basicInfoId, MdPractitionerHiringApproveSteps nextStep) {
......
......@@ -442,7 +442,7 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
hiringListInfoList = practitionerHiringDalService.queryUnhandledList(practitionerId);
} else {
// 当前经纪人通过或拒绝的记录
int status = Long.valueOf("1").equals(approvingStatus) ? 1 : 0;
int status = approvingStatus.intValue();
hiringListInfoList = practitionerHiringDalService.queryHandledList(practitionerId, status);
}
......
......@@ -188,7 +188,7 @@ public class AgmsHiringDALServiceImpl implements AgmsHiringDALService {
this.noticeSendSMS(orgInfo, practitionerList, basicInfo);
// 公众号推送通知下一位审批人进行审批
String firstValue = systemConfigService.getSingleConfigValue("TENCENT_WECHAT_TEMPLATE_FIRST_HIRING");
firstValue.replace("hiringName", orgInfo);
firstValue = firstValue.replace("hiringName", orgInfo);
this.noticeSendWeChatMsg(firstValue, "待审批", practitionerList, basicInfo);
}
......
......@@ -146,7 +146,7 @@ public class PractitionerHiringDALServiceImpl implements PractitionerHiringDALSe
continue;
}
if (step.getStepSeq() > Integer.valueOf(approveStatus)) {
if (approveStatus == null || step.getStepSeq() > Integer.parseInt(approveStatus)) {
HiringApproveRecords obj = new HiringApproveRecords();
obj.setApproveStepId(step.getId());
......
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