lxw
2022-03-24 b4b2787bb4d3b238ea2e31e7a3f0fcda1b866b86
//A059一体机导出文件名
1个文件已修改
9 ■■■■ 已修改文件
src/com/fgkj/servlets/EchartPictureDowloadServlet.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/com/fgkj/servlets/EchartPictureDowloadServlet.java
@@ -1054,7 +1054,14 @@
                sheet1.getRow(rownum).createCell(5).setCellValue(qth.getQh() + "%");
                sheet1.getRow(rownum).createCell(6).setCellValue(qth.getTitle());
            }
            //取出电池组信息构建excel文件的名称
            String excelName =new BattInfImpl().serchExcelName(bmd.getBinf().getBattGroupId());
            //excel文件名
            String testTime = new SimpleDateFormat("yyyy-MM-dd").format(bmd.getSdata().getTest_starttime());
            excelName = excelName+"-"+testTime;
            String regEx="[\n`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。, 、?]";
            excelName = excelName.replace(regEx,"");
            // 转码防止乱码
            resp.addHeader("Content-Disposition", "attachment;filename="
                    + new String(excelName.getBytes("gb2312"), "ISO8859-1")