diff --git a/epmet-admin/epmet-admin-server/pom.xml b/epmet-admin/epmet-admin-server/pom.xml
index 0b37977879..e73766c59b 100644
--- a/epmet-admin/epmet-admin-server/pom.xml
+++ b/epmet-admin/epmet-admin-server/pom.xml
@@ -215,7 +215,7 @@
elink@833066
0
- r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com
+ 192.168.10.150
6379
EpmEtrEdIs!q@w
diff --git a/epmet-auth/pom.xml b/epmet-auth/pom.xml
index b4c31f05cc..e6c3b6823a 100644
--- a/epmet-auth/pom.xml
+++ b/epmet-auth/pom.xml
@@ -301,7 +301,7 @@
0
- r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com
+ 192.168.10.150
6379
EpmEtrEdIs!q@w
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java
index 754cdf012d..9bc34d0a39 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java
@@ -10,6 +10,8 @@ package com.epmet.commons.tools.utils;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
+import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
+import com.epmet.commons.tools.utils.excel.ExportMultiView;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
@@ -19,12 +21,8 @@ import org.springframework.util.CollectionUtils;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
-import java.io.OutputStream;
import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
/**
* Excel工具类
@@ -121,8 +119,11 @@ public class ExcelUtils {
out.flush();
out.close();
}
- public static OutputStream getOutputStreamForExcel(String fileName, HttpServletResponse response) throws Exception {
+ public static ServletOutputStream getOutputStreamForExcel(String fileName, HttpServletResponse response) throws Exception {
fileName = URLEncoder.encode(fileName, "UTF-8");
+ if (!fileName.endsWith(".xls") ||!fileName.endsWith(".xlsx")){
+ fileName = fileName + ".xlsx";
+ }
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf8");
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
@@ -131,4 +132,27 @@ public class ExcelUtils {
return response.getOutputStream();
}
+ /**
+ * desc:easypoi导出多个sheet
+ * @param fileName
+ * @param list
+ * @param response
+ * @throws Exception
+ */
+ public static void exportMultiSheetExcel(String fileName, List list, HttpServletResponse response) throws Exception {
+ List