Commit 9c1c5984 authored by nie'hong's avatar nie'hong

优化导出

parent e5de8ed3
...@@ -91,7 +91,7 @@ public class StatisticsController extends BaseController { ...@@ -91,7 +91,7 @@ public class StatisticsController extends BaseController {
// 获取excel中的第2行第2列中的部门名称 // 获取excel中的第2行第2列中的部门名称
String deptName = sheets.getSheet("Sheet1").getRow(1).getCell(1).getStringCellValue(); String deptName = sheets.getSheet("Sheet1").getRow(1).getCell(1).getStringCellValue();
// 文件名 // 文件名
String fileName = deptName + "-" + param.getYear() + "-" + param.getMonth(); String fileName = deptName + "-" + param.getYear() + "年" + param.getMonth() + "月工时汇总";
//响应类型为application/octet- stream情况下使用了这个头信息的话,那就意味着不想直接显示内容 //响应类型为application/octet- stream情况下使用了这个头信息的话,那就意味着不想直接显示内容
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE); response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
//attachment为以附件方式下载 //attachment为以附件方式下载
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment