lyhzzz 2 роки тому
батько
коміт
012f60b55a

+ 9 - 2
src/main/java/com/fdkankan/sale/util/MyExcelUtil.java

@@ -47,8 +47,15 @@ public class MyExcelUtil {
         // 模板注意 用{} 来表示你要用的变量 如果本来就有"{","}" 特殊字符 用"\{","\}"代替
         // 填充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);
         if(!file.exists()){
             fYunFileServiceInterface.downloadFile(ossPath,localPath );