|
@@ -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());
|