| | |
| | | |
| | | String title = StringUtils.hasText(instance.getTemplateName()) ? instance.getTemplateName() : "审批提醒"; |
| | | String message = "审批单号 " + instance.getInstanceNo() + " 需要您审批"; |
| | | String jumpPath = "/officeProcessAutomation/ApproveManage/approve-list?id=" + instance.getId(); |
| | | String jumpPath = getJumpPathByBusinessType(instance.getBusinessType(), instance.getId()); |
| | | sysNoticeService.simpleNoticeByUser(title, message, approverIds, jumpPath); |
| | | } |
| | | |
| | | private String getJumpPathByBusinessType(Long businessType, Long instanceId) { |
| | | if (businessType == null) { |
| | | return "/collaborativeApproval/approve-list?id=" + instanceId; |
| | | } |
| | | if (TypeEnums.LEAVE_APPROVAL.getCode().equals(businessType)) { |
| | | return "/collaborativeApproval/AttendManage/leave-apply?id=" + instanceId; |
| | | } |
| | | if (TypeEnums.OVERTIME_APPROVAL.getCode().equals(businessType)) { |
| | | return "/collaborativeApproval/AttendManage/overtime-apply?id=" + instanceId; |
| | | } |
| | | if (TypeEnums.TRAVEL_REIMBURSEMENT_APPROVAL.getCode().equals(businessType)) { |
| | | return "/collaborativeApproval/ReimburseManage/travel-reimburse?id=" + instanceId; |
| | | } |
| | | if (TypeEnums.EXPENSE_APPROVAL.getCode().equals(businessType)) { |
| | | return "/collaborativeApproval/ReimburseManage/cost-reimburse?id=" + instanceId; |
| | | } |
| | | return "/collaborativeApproval/approve-list?id=" + instanceId; |
| | | } |
| | | |
| | | private void sendEnterpriseNewsNotice(Long newsId) { |
| | | EnterpriseNews enterpriseNews = enterpriseNewsMapper.selectById(newsId); |
| | | if (enterpriseNews == null) { |