|
|
@ -109,9 +109,9 @@ public class IcDangerousChemicalsController { |
|
|
|
response.setCharacterEncoding("UTF-8"); |
|
|
|
response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); |
|
|
|
response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); |
|
|
|
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("优势资源管理导入模板", "UTF-8") + ".xlsx"); |
|
|
|
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode("重点危化管理导入模板", "UTF-8") + ".xlsx"); |
|
|
|
|
|
|
|
InputStream is = this.getClass().getClassLoader().getResourceAsStream("excel/superior_resource_template.xlsx"); |
|
|
|
InputStream is = this.getClass().getClassLoader().getResourceAsStream("excel/dangerous_chemicals_template.xlsx"); |
|
|
|
try { |
|
|
|
ServletOutputStream os = response.getOutputStream(); |
|
|
|
IOUtils.copy(is, os); |
|
|
|