lyhzzz 6 月之前
父节点
当前提交
4e96284b41
共有 1 个文件被更改,包括 5 次插入6 次删除
  1. 5 6
      src/main/java/com/fdkankan/fusion/down/CaseDownService.java

+ 5 - 6
src/main/java/com/fdkankan/fusion/down/CaseDownService.java

@@ -433,9 +433,10 @@ public class CaseDownService {
             String res = (String) object;
             log.info("下载模型:{}",res);
             res = res.replace(queryPath, "");
-            String desPath = path+"/oss/"+res;
-            File file = new File(desPath);
-            ShellUtil.yunDownload(res,file.getParentFile().getPath());
+            if(res.contains(".json") || res.contains(".shp") || res.contains(".obj")){
+                res = new File(res).getParentFile().getPath();
+            }
+            ShellUtil.yunDownload(res, path +"/oss/" + res);
         }
     }
     public void downResources(Integer caseId,String urls) {
@@ -457,9 +458,7 @@ public class CaseDownService {
 //            return;
 //        }
         String path = String.format(FilePath.OFFLINE_OSS_PATH,caseId);
-        String desPath = path+"/oss/"+url;
-        File file = new File(desPath);
-        ShellUtil.yunDownload(url,file.getParentFile().getPath());
+        ShellUtil.yunDownload(url,path+"/oss/"+url);
     }
 
     public void downWordByTemplate(Integer caseId,XWPFTemplate template,String name){