Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
zfhai 2023-12-05 16:18:02 +08:00
commit 18ae513d66
1 changed files with 1 additions and 6 deletions

View File

@ -475,7 +475,7 @@ public class ExcelUtil<T>
{
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.setCharacterEncoding("utf-8");
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)
{
String fileName = "物料主数据导入模板.xlsx";
String encodedFileName = null;
encodedFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8);
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment; filename=\"" + encodedFileName + "\"");
this.init(list, sheetName, title, Excel.Type.EXPORT);
exportExcel(response);
}