| | |
| | | @Resource |
| | | XlsReportService xlsReportService; |
| | | |
| | | private static List<String> TYPES = new ArrayList<>(Arrays.asList("day", "week", "month")); |
| | | private static final List<String> TYPES = new ArrayList<>(Arrays.asList("day", "week", "month")); |
| | | |
| | | @ApiOperationSupport(order = 1) |
| | | @GetMapping("/selectByPage") |
| | |
| | | private double bjz; |
| | | |
| | | /** |
| | | * 报警值 |
| | | */ |
| | | @Value("${report.templates}") |
| | | private String templates; |
| | | |
| | | /** |
| | | * 获取导出路径 |
| | | */ |
| | | private String getExpPath(String type) { |
| | |
| | | * 获取Excel模板 |
| | | */ |
| | | private String getXslTemplate(String type) throws IOException { |
| | | ClassPathResource resource = new ClassPathResource(String.format("templates/%s.xlsx", type)); |
| | | //ClassPathResource resource = new ClassPathResource(String.format("templates/%s.xlsx", type)); |
| | | //return resource.exists() ? resource.getFile().getPath() : null; |
| | | |
| | | return resource.exists() ? resource.getFile().getPath() : null; |
| | | return String.format(templates + File.separator + type + ".xlsx"); |
| | | } |
| | | |
| | | /** |
| | |
| | | vocPath: 'E:\yssh_data\VOC_ALL' |
| | | #日/周/月报路径 |
| | | report: |
| | | templates: E:\terrait\TianJin\YanShan\src\main\resources\templates |
| | | path: E:\yssh_data\XlsReport |
| | | yjz: 1.6 |
| | | bjz: 2 |