燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2023-08-08 f2ca598d3cf73968085d5acf5d2e0488a24577e0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.yssh.service;
 
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Service;
 
import java.io.IOException;
 
/**
 * Excel导出服务类
 * @author WWW
 * @author 2023-08-05
 */
@Service
public class XlsExportService {
    /**
     * 获取Excel模板
     */
    private String getXslTemplate(String type) throws IOException {
        ClassPathResource resource = new ClassPathResource(String.format("templates/%s.xlsx", type));
 
        return resource.exists() ? resource.getFile().getPath() : null;
    }
 
}