| | |
| | | private TLeaveService leaveService; |
| | | @Resource |
| | | private TNoticeService noticeService; |
| | | |
| | | |
| | | // 每一个小时执行一次 |
| | | // @Scheduled(cron = "0 0 0 * * ?") |
| | | // @Scheduled(fixedRate = 1500000000) |
| | | // 每天晚上22点执行 |
| | | @Scheduled(cron = "0 0 22 * * ?") |
| | | public void dayOfCreateInspection() { |
| | | try { |
| | | |
| | | // 查询任务模板 |
| | | List<TTemplate> list = templateService.list(); |
| | | if (CollectionUtils.isEmpty(list)) { |
| | |
| | | msgUtils.sendMsg2(sysUser.getPhonenumber(),count+""); |
| | | break; |
| | | case 2: |
| | | if (StringUtils.hasLength(email.getDataContent())&&StringUtils.hasLength(code.getDataContent())){ |
| | | if (StringUtils.hasLength(email.getDataContent())&&StringUtils.hasLength(code.getDataContent()) |
| | | &&StringUtils.hasLength(sysUser.getEmail())){ |
| | | EmailUtils.sendEmail(sysUser.getEmail(),email.getDataContent(),code.getDataContent(),"今日剩余"+count+"个任务未完成,请尽快处理"); |
| | | } |
| | | break; |