|
|
@@ -505,13 +505,13 @@ public class ReportServiceImpl extends BaseServiceImpl<ReportMapper, Report> imp |
|
|
|
//清空缓存 |
|
|
|
response.reset(); |
|
|
|
// 定义浏览器响应表头,并定义下载名 |
|
|
|
//String urlFileName = URLEncoder.encode("汤山林场无人机巡检报告【"+ reportInfoVO.getReportNo() + "】.doc", "UTF-8"); |
|
|
|
String urlFileName =new String(("汤山林场无人机巡检报告【"+ reportInfoVO.getReportNo() + "】.doc").getBytes(), StandardCharsets.UTF_8); |
|
|
|
String urlFileName = URLEncoder.encode("汤山林场无人机巡检报告【"+ reportInfoVO.getReportNo() + "】.doc", "UTF-8"); |
|
|
|
//String urlFileName =new String(("汤山林场无人机巡检报告【"+ reportInfoVO.getReportNo() + "】.doc").getBytes(), StandardCharsets.UTF_8); |
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=" + urlFileName); |
|
|
|
response.setCharacterEncoding("utf-8"); |
|
|
|
//定义下载的类型 |
|
|
|
response.setContentType("application/msword;charset=GBK"); |
|
|
|
|
|
|
|
//response.setContentType("application/msword;charset=GBK"); |
|
|
|
response.setContentType("application/octet-stream; charset=GB2312"); |
|
|
|
OutputStream out; |
|
|
|
File files = new File(filePath,""); |
|
|
|
|