| | |
| | | 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"); |
| | | } |
| | | |
| | | /** |