Browse Source

代码合并

chendayu 2 years ago
parent
commit
c74d6e0151
1 changed files with 4 additions and 13 deletions
  1. 4 13
      RMS/src/main/java/cn/cslg/report/controller/DownloadController.java

+ 4 - 13
RMS/src/main/java/cn/cslg/report/controller/DownloadController.java

@@ -39,19 +39,10 @@ public class DownloadController {
     public ResponseEntity<FileSystemResource> downloadSystemFile2(String url, Integer taskId) throws IOException {
         File file = new File(fileUtils.getSystemPath() + url);
         if (!file.exists()) {
-            if (taskId != null) {
-                //根据任务id,调用分析系统查询任务接口,获得任务对象
-                //String json = outInterfaceService.getTask(taskId);
-                //JSONObject jsonObject = JSONObject.parseObject(json);
-                //TaskFromPASVO task = JSONObject.parseObject(jsonObject.get("data").toString(), TaskFromPASVO.class);
-                //判断若该任务是与报告关联,则调用分析系统的下载接口(目前是为了下载Excel)
-                //if (task.getReportId() != null) {
-                String json2 = outInterfaceService.getDownLoadFile(url);
-                JSONObject jsonObject2 = JSONObject.parseObject(json2);
-                String path = jsonObject2.get("data").toString();
-                file = new File(path);
-                //}
-            }
+            String json2 = outInterfaceService.getDownLoadFile(url);
+            JSONObject jsonObject2 = JSONObject.parseObject(json2);
+            String path = jsonObject2.get("data").toString();
+            file = new File(path);
         }
         HttpHeaders headers = new HttpHeaders();
         String fileName = DateUtils.getNowTimeFormat(DateUtils.YYYYMMDDHHMMSS) + "." + FileUtil.extName(file.getName());