|  |  | 
 |  |  |      * 每天9点执行一次 除了星期天 | 
 |  |  |      * 判断是否有设备到达校准有效期 | 
 |  |  |      */ | 
 |  |  | //    @Scheduled(cron = "0/5 * * * * *") | 
 |  |  | //    @Scheduled(cron = "0/10 * * * * *") | 
 |  |  |     @Scheduled(cron = "0 0 9 * * 1-6") // 每天9点执行一次 除了星期天 | 
 |  |  |     public void task2() { | 
 |  |  |         // 查询到达校准有效期的设备-提前5天 | 
 |  |  | 
 |  |  |                 // 企业微信通知填写设备使用记录 | 
 |  |  |                 User user = userMapper.selectById(userId); | 
 |  |  |                 String message = ""; | 
 |  |  |                 message += "设备使用记录未填写提醒通知"; | 
 |  |  |                 message += "设备到达校准有效期"; | 
 |  |  |                 for (Device deviceRecord : recordList) { | 
 |  |  |                     message += "\n设备名称编号: " + deviceRecord.getDeviceName() + "-" + deviceRecord.getManagementNumber(); | 
 |  |  |                     message += "\n委托编号: " + deviceRecord.getSampleCode(); | 
 |  |  |                     message += "\n设备名称: " + deviceRecord.getDeviceName(); | 
 |  |  |                     message += "\n设备编号: " + deviceRecord.getManagementNumber(); | 
 |  |  |                     message += "\n校准有效期: " + deviceRecord.getActivationDate(); | 
 |  |  |                     message += "\n"; | 
 |  |  |                 } | 
 |  |  |                 message += "\n请去填写设备使用记录"; | 
 |  |  |                 message += "\n请去进行设备校准"; | 
 |  |  |  | 
 |  |  |                 //发送企业微信消息通知 | 
 |  |  |                 try { |