|
@@ -30,6 +30,8 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.io.File;
|
|
|
import java.io.FileOutputStream;
|
|
|
+import java.net.URLDecoder;
|
|
|
+import java.net.URLEncoder;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.HashSet;
|
|
@@ -318,7 +320,7 @@ public class CaseDownService {
|
|
|
List<CaseFiles> caseFilesList = caseFilesService.allList(caseId, null);
|
|
|
for (CaseFiles files : caseFilesList) {
|
|
|
if(StringUtils.isNotBlank(files.getFilesUrl())){
|
|
|
- downResourceParent(caseId,files.getFilesUrl());
|
|
|
+ downResource(caseId,files.getFilesUrl());
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -526,6 +528,7 @@ public class CaseDownService {
|
|
|
return;
|
|
|
}
|
|
|
url = url.replace(queryPath, "");
|
|
|
+ url = URLDecoder.decode(url);
|
|
|
String path = String.format(FilePath.OFFLINE_OSS_PATH,caseId);
|
|
|
String desPath = path + "/oss/" + url;
|
|
|
log.info("downResource:{}",url);
|
|
@@ -536,16 +539,6 @@ public class CaseDownService {
|
|
|
ShellUtil.yunDownload(url,desPath);
|
|
|
}
|
|
|
|
|
|
- public void downResourceParent(Integer caseId,String url) {
|
|
|
- if(StringUtils.isBlank(url) ){
|
|
|
- return;
|
|
|
- }
|
|
|
- url = url.replace(queryPath, "");
|
|
|
- String path = String.format(FilePath.OFFLINE_OSS_PATH,caseId);
|
|
|
- String desPath = path + "/oss/" + url;
|
|
|
- log.info("downResourceParent:{}",url);
|
|
|
- ShellUtil.yunDownload(new File(url).getParentFile().getPath(), new File(desPath).getParentFile().getParentFile().getPath());
|
|
|
- }
|
|
|
|
|
|
public void downWordByTemplate(Integer caseId,XWPFTemplate template,String name){
|
|
|
// 指定输出文件的路径
|