Browse Source

疫苗接种信息微调

master
jianjun 3 years ago
parent
commit
1498eb13d7
  1. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java
  2. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java

2
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java

@ -246,7 +246,7 @@ public class IcNatController implements ResultDataResolver {
response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition");
//response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.ms-excel"); //response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.ms-excel");
response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); 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/ic_nat.xlsx"); InputStream is = this.getClass().getClassLoader().getResourceAsStream("excel/ic_nat.xlsx");
try { try {

4
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java

@ -130,7 +130,7 @@ public class IcVaccineController implements ResultDataResolver {
os = new FileOutputStream(fileSavePath.toString()); os = new FileOutputStream(fileSavePath.toString());
IOUtils.copy(is, os); IOUtils.copy(is, os);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.error("importExcel exception", e);
} finally { } finally {
org.apache.poi.util.IOUtils.closeQuietly(is); org.apache.poi.util.IOUtils.closeQuietly(is);
org.apache.poi.util.IOUtils.closeQuietly(os); org.apache.poi.util.IOUtils.closeQuietly(os);
@ -163,7 +163,7 @@ public class IcVaccineController implements ResultDataResolver {
response.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8");
response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition");
response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); 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/ic_vaccine.xlsx"); InputStream is = this.getClass().getClassLoader().getResourceAsStream("excel/ic_vaccine.xlsx");
try { try {

Loading…
Cancel
Save