|
@@ -105,7 +105,7 @@ public class FzssController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
@GetMapping("/DownloadReport")
|
|
@GetMapping("/DownloadReport")
|
|
- public void fileDownload(String fileName, HttpServletResponse response, HttpServletRequest request) {
|
|
|
|
|
|
+ public void fileDownload(String filePath, HttpServletResponse response, HttpServletRequest request) {
|
|
try {
|
|
try {
|
|
String path = tempWin;
|
|
String path = tempWin;
|
|
// windows 使用 tempWin, linux 使用 tempLinux
|
|
// windows 使用 tempWin, linux 使用 tempLinux
|
|
@@ -113,12 +113,12 @@ public class FzssController extends BaseController {
|
|
path = tempLinux;
|
|
path = tempLinux;
|
|
}
|
|
}
|
|
|
|
|
|
- String realFileName = path + fileName;
|
|
|
|
|
|
+ String realFileName = path + filePath;
|
|
response.setCharacterEncoding("utf-8");
|
|
response.setCharacterEncoding("utf-8");
|
|
response.setContentType("multipart/form-data");
|
|
response.setContentType("multipart/form-data");
|
|
response.setContentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document");
|
|
response.setContentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document");
|
|
|
|
|
|
- String fileType = fileName.substring(fileName.lastIndexOf(".") + 1);
|
|
|
|
|
|
+ String fileType = filePath.substring(filePath.lastIndexOf(".") + 1);
|
|
String time = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
|
|
String time = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
|
|
String downloadName = time + "." + fileType;
|
|
String downloadName = time + "." + fileType;
|
|
|
|
|