Commit 3ed4396b4705b93eb9e8ee3224ec97f8b5515202
1 parent
c8e3a22d3d
Exists in
master
and in
8 other branches
code update
Showing 1 changed file with 4 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
3ed4396
... | ... | @@ -1787,6 +1787,10 @@ |
1787 | 1787 | cnames.put("nextDate","下次预约时间"); |
1788 | 1788 | cnames.put("monthAge","月龄"); |
1789 | 1789 | cnames.put("diagnose","高危诊断"); |
1790 | + | |
1791 | + httpServletResponse.setContentType("multipart/form-data"); | |
1792 | + //2.设置文件头:最后一个参数是设置下载文件名(假如我们叫a.pdf) | |
1793 | + httpServletResponse.setHeader("Content-Disposition", "attachment;fileName="+"childDatas.xls"); | |
1790 | 1794 | ExcelUtil.toExcel(out,datas,cnames); |
1791 | 1795 | } catch (IOException e) { |
1792 | 1796 | e.printStackTrace(); |