浏览代码

Merge branch 'develop' of gitadmin/tuoheng_air_monitor into release

tags/V1.0.1
chengwang 1年前
父节点
当前提交
54849fa732
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. +6
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/report/ExportReportService.java

+ 6
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/report/ExportReportService.java 查看文件

@@ -28,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.*;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.Comparator;
import java.util.List;
@@ -83,6 +84,11 @@ public class ExportReportService {
this.handle(request, airDataType, airDataList);
}
String filename = inspection.getName() + "-" + inspection.getCode() + "-" + airDataType.getDataType() + ".doc";
try {
filename = URLEncoder.encode(filename,"utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
String filePath = UploadFileConfig.uploadFolder + "/report/" + filename;
File fd = new File(UploadFileConfig.uploadFolder + "/report");
if (!fd.exists()) {

正在加载...
取消
保存