| | |
| | | private HistoryMonthlyService historyMonthlyService; |
| | | @Autowired |
| | | private DeviceService deviceService; |
| | | @Autowired |
| | | private EmailSpringUtil emailSpringUtil; |
| | | |
| | | private final EmailSpringUtil emailSpringUtil; |
| | | |
| | | public PubController(EmailSpringUtil emailSpringUtil) { |
| | | this.emailSpringUtil = emailSpringUtil; |
| | | } |
| | | |
| | | @GetMapping("insertHistoryDaily") |
| | | @ApiOperation(value = "天数据补录", notes = "天数据补录") |
| | |
| | | out = ExcelUtil.generateExcel(list, DeviceExcelDTO.class); |
| | | // 发送邮件 |
| | | String content = startTime+"疾控中心设备统计数据"; |
| | | String toMail = "909710561@qq.com"; |
| | | String toMail = "ad@7drlb.com"; |
| | | emailSpringUtil.sendEmail("设备分钟数据",content,false,"909710561@qq.com", |
| | | toMail,"null",null, fileName, new ByteArrayResource(out.toByteArray())); |
| | | toMail,"909710561@qq.com",null, fileName, new ByteArrayResource(out.toByteArray())); |
| | | } catch (IOException e) { |
| | | log.error(String.format("生成excel失败,原因:%s",e)); |
| | | e.printStackTrace(); |