master
erzhongxmu 2023-07-20 23:57:19 +08:00
parent 9591016132
commit 1ec64e6847
1 changed files with 5 additions and 5 deletions

View File

@ -1738,14 +1738,14 @@ public class WmOmNoticeHController extends BaseController {
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
// bufferImg = ImageIO.read(BarcodeUtil.generateToStream(wmImNoticeH // bufferImg = ImageIO.read(BarcodeUtil.generateToStream(wmImNoticeH
// .getNoticeId())); // .getNoticeId()));
ClassPathResource classPathResource = new ClassPathResource("icon_sx.jpeg"); // ClassPathResource classPathResource = new ClassPathResource("icon_sx.jpeg");
bufferImg = ImageIO.read(classPathResource.getInputStream()); // bufferImg = ImageIO.read(classPathResource.getInputStream());
// 进行转码,使其支持中文文件名 // 进行转码,使其支持中文文件名
// codedFileName = java.net.URLEncoder.encode("中文", "UTF-8"); // codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
response.setHeader("content-disposition", "attachment;filename=" // response.setHeader("content-disposition", "attachment;filename="
+ wmOmNoticeH.getOmNoticeId() + ".xls"); // + wmOmNoticeH.getOmNoticeId() + ".xls");
ImageIO.write(bufferImg, "jpg", byteArrayOut); // ImageIO.write(bufferImg, "jpg", byteArrayOut);
HSSFWorkbook wb = new HSSFWorkbook(); HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("出库单"); HSSFSheet sheet = wb.createSheet("出库单");