|
|
@@ -27,10 +27,9 @@ import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
import java.io.FileInputStream; |
|
|
|
import java.io.FileNotFoundException; |
|
|
|
import java.io.InputStream; |
|
|
|
import java.io.*; |
|
|
|
import java.net.URLDecoder; |
|
|
|
import java.net.URLEncoder; |
|
|
|
import java.util.Comparator; |
|
|
|
import java.util.List; |
|
|
|
import java.util.stream.Collectors; |
|
|
@@ -85,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()) { |