|
@@ -47,8 +47,15 @@ public class MyExcelUtil {
|
|
// 模板注意 用{} 来表示你要用的变量 如果本来就有"{","}" 特殊字符 用"\{","\}"代替
|
|
// 模板注意 用{} 来表示你要用的变量 如果本来就有"{","}" 特殊字符 用"\{","\}"代替
|
|
// 填充list 的时候还要注意 模板中{.} 多了个点 表示list
|
|
// 填充list 的时候还要注意 模板中{.} 多了个点 表示list
|
|
//获取文件路径
|
|
//获取文件路径
|
|
- String ossPath = String.format(FilePath.oss_file_path,FilePath.common,fileName);
|
|
|
|
- String localPath = FilePath.file_path + FilePath.common +"/" + fileName;
|
|
|
|
|
|
+ String templateName = null;
|
|
|
|
+ if(type == 0){
|
|
|
|
+ templateName = "orderTemplate.xlsx";
|
|
|
|
+ }
|
|
|
|
+ if(type == 1){
|
|
|
|
+ templateName = "repairTemplate.xlsx";
|
|
|
|
+ }
|
|
|
|
+ String ossPath = String.format(FilePath.oss_file_path,FilePath.common,templateName);
|
|
|
|
+ String localPath = FilePath.file_path + FilePath.common +"/" + templateName;
|
|
File file = new File(localPath);
|
|
File file = new File(localPath);
|
|
if(!file.exists()){
|
|
if(!file.exists()){
|
|
fYunFileServiceInterface.downloadFile(ossPath,localPath );
|
|
fYunFileServiceInterface.downloadFile(ossPath,localPath );
|