| | |
| | | |
| | | @XxlJob("emilTask") |
| | | public void emilTask()throws IOException { |
| | | String startTime = DateUtils.dateToDateString(DateUtils.addDays(new Date(),-1),DateUtils.yyyy_MM_dd_EN); |
| | | List<DeviceExcelDTO> list = deviceService.ListDeviceExcel(startTime,null,72); |
| | | Date date = DateUtils.addDays(new Date(),-1); |
| | | String startTime = DateUtils.dateToDateString(date,DateUtils.yyyy_MM_dd_EN); |
| | | String mon = DateUtils.dateToDateString(date,DateUtils.yyyyMM_EN); |
| | | List<DeviceExcelDTO> list = deviceService.ListDeviceExcel(startTime,mon,72); |
| | | String path = System.getProperty("user.dir")+"/"; |
| | | String fileName = String.format("%s疾控中心数据-%s.xlsx",path,startTime); |
| | | ByteArrayOutputStream out = null; |
| | |
| | | } |
| | | log.info("邮件发送成功"); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | Date date = DateUtils.addDays(new Date(),+1); |
| | | String startTime = DateUtils.dateToDateString(date,DateUtils.yyyy_MM_dd_EN); |
| | | String mon = DateUtils.dateToDateString(date,DateUtils.yyyyMM_EN); |
| | | System.out.println(startTime); |
| | | System.out.println(mon); |
| | | } |
| | | } |