Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
18ae513d66
|
|
@ -475,7 +475,7 @@ public class ExcelUtil<T>
|
||||||
{
|
{
|
||||||
|
|
||||||
String encodedFileName = null;
|
String encodedFileName = null;
|
||||||
encodedFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8);
|
encodedFileName = URLEncoder.encode(fileName+".xlsx", StandardCharsets.UTF_8);
|
||||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||||
response.setCharacterEncoding("utf-8");
|
response.setCharacterEncoding("utf-8");
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + encodedFileName + "\"");
|
response.setHeader("Content-Disposition", "attachment; filename=\"" + encodedFileName + "\"");
|
||||||
|
|
@ -494,13 +494,8 @@ public class ExcelUtil<T>
|
||||||
*/
|
*/
|
||||||
public void exportExcel(HttpServletResponse response, List<T> list, String sheetName, String title)
|
public void exportExcel(HttpServletResponse response, List<T> list, String sheetName, String title)
|
||||||
{
|
{
|
||||||
|
|
||||||
String fileName = "物料主数据导入模板.xlsx";
|
|
||||||
String encodedFileName = null;
|
|
||||||
encodedFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8);
|
|
||||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||||
response.setCharacterEncoding("utf-8");
|
response.setCharacterEncoding("utf-8");
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + encodedFileName + "\"");
|
|
||||||
this.init(list, sheetName, title, Excel.Type.EXPORT);
|
this.init(list, sheetName, title, Excel.Type.EXPORT);
|
||||||
exportExcel(response);
|
exportExcel(response);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue