diff --git a/epmet-commons/epmet-commons-extapp-auth/pom.xml b/epmet-commons/epmet-commons-extapp-auth/pom.xml
index 8ff0d46ada..bf2e9a71c7 100644
--- a/epmet-commons/epmet-commons-extapp-auth/pom.xml
+++ b/epmet-commons/epmet-commons-extapp-auth/pom.xml
@@ -18,7 +18,7 @@
1.3.3
2.6
4.6.1
- 4.4.0
+ 4.3.0
2.9.9
1.2.79
2.8.6
diff --git a/epmet-commons/epmet-commons-tools/pom.xml b/epmet-commons/epmet-commons-tools/pom.xml
index e516c5fba7..867fcf47c7 100644
--- a/epmet-commons/epmet-commons-tools/pom.xml
+++ b/epmet-commons/epmet-commons-tools/pom.xml
@@ -18,7 +18,7 @@
1.3.3
2.6
4.6.1
- 4.4.0
+ 4.3.0
2.9.9
1.2.79
2.8.6
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/config/AsyncConfig.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/config/AsyncConfig.java
index c95c9f8ade..ab8efec85e 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/config/AsyncConfig.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/config/AsyncConfig.java
@@ -88,7 +88,7 @@ public class AsyncConfig {
@Bean
public ExecutorService executorService() {
ThreadPoolTaskExecutor executor = (ThreadPoolTaskExecutor) executor();
- return TtlExecutors.getTtlExecutorService(executor.getThreadPoolExecutor());
+ return executor.getThreadPoolExecutor();
}
/**
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerStaffRedis.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerStaffRedis.java
index 509b12339f..37904be02b 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerStaffRedis.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerStaffRedis.java
@@ -65,6 +65,10 @@ public class CustomerStaffRedis {
* @remark 此方法仅用于 获取某个工作人员的信息,不用于获取客户下所有工作人员信息
*/
public static CustomerStaffInfoCacheResult getStaffInfo(String customerId, String staffId) {
+ if (StringUtils.isBlank(customerId) || StringUtils.isBlank(staffId)){
+ log.warn("getStaffInfo param is blank,customerId:{},staffId:{}",customerId,staffId);
+ return null;
+ }
String key = RedisKeys.getCustomerStaffInfoKey(customerId, staffId);
Map roleMap = customerStaffRedis.redisUtils.hGetAll(key);
if (!CollectionUtils.isEmpty(roleMap)) {
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 9bc34d0a39..bd5c5597c0 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
@@ -11,12 +11,13 @@ 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 com.epmet.commons.tools.utils.poi.excel.EasyPoiExcelExportStylerImpl;
+import com.epmet.commons.tools.utils.poi.excel.ExportMultiView;
+import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.BeanUtils;
-import org.springframework.util.CollectionUtils;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
@@ -30,6 +31,7 @@ import java.util.*;
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
+@Slf4j
public class ExcelUtils {
/**
@@ -47,15 +49,16 @@ public class ExcelUtils {
fileName = DateUtils.format(new Date());
}
- Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), pojoClass, list);
+ ExportParams exportParams = new ExportParams();
+ //设置导出的样式
+ exportParams.setStyle(EasyPoiExcelExportStylerImpl.class);
+ //设置sheet名称
+ exportParams.setSheetName("Sheet1");
+ Workbook workbook = ExcelExportUtil.exportExcel(exportParams, pojoClass, list);
Sheet sheet1 = workbook.getSheetAt(0);
sheet1.setDefaultColumnWidth(50*256);
- sheet1.setDefaultRowHeight((short)(2*256));
- response.setCharacterEncoding("UTF-8");
- response.setHeader("content-Type", "application/vnd.ms-excel");
- response.setHeader("Content-Disposition",
- "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8") + ".xls");
- ServletOutputStream out = response.getOutputStream();
+ //sheet1.setDefaultRowHeight((short)(2*256));
+ ServletOutputStream out = ExcelUtils.getOutputStreamForExcel(fileName,response);
workbook.write(out);
out.flush();
out.close();
@@ -81,47 +84,9 @@ public class ExcelUtils {
exportExcel(response, fileName, targetList, targetClass);
}
- public static void exportExcelToTargetDisposeAll(HttpServletResponse response, String fileName, Collection> sourceList,
- Class> targetClass) throws Exception {
- if (!CollectionUtils.isEmpty(sourceList)){
- List