Browse Source

Merge branch 'develop' of gitadmin/tuoheng_air_monitor into release

tags/V1.0.1
chengwang 1 year ago
parent
commit
54849fa732
1 changed files with 6 additions and 0 deletions
  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 View File

import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;


import java.io.*; import java.io.*;
import java.net.URLDecoder;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
this.handle(request, airDataType, airDataList); this.handle(request, airDataType, airDataList);
} }
String filename = inspection.getName() + "-" + inspection.getCode() + "-" + airDataType.getDataType() + ".doc"; 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; String filePath = UploadFileConfig.uploadFolder + "/report/" + filename;
File fd = new File(UploadFileConfig.uploadFolder + "/report"); File fd = new File(UploadFileConfig.uploadFolder + "/report");
if (!fd.exists()) { if (!fd.exists()) {

Loading…
Cancel
Save