diff --git a/zlpt-common/zlpt-common-core/src/main/java/com/bonus/zlpt/common/core/utils/poi/ExcelUtil.java b/zlpt-common/zlpt-common-core/src/main/java/com/bonus/zlpt/common/core/utils/poi/ExcelUtil.java index 0278a6a..242f79e 100644 --- a/zlpt-common/zlpt-common-core/src/main/java/com/bonus/zlpt/common/core/utils/poi/ExcelUtil.java +++ b/zlpt-common/zlpt-common-core/src/main/java/com/bonus/zlpt/common/core/utils/poi/ExcelUtil.java @@ -2,6 +2,7 @@ package com.bonus.zlpt.common.core.utils.poi; import java.io.IOException; import java.io.InputStream; +import java.io.UnsupportedEncodingException; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; @@ -471,11 +472,10 @@ public class ExcelUtil * * 可以设置文件名称 */ - public void exportExcel(HttpServletResponse response, List list, String sheetName, String title,String fileName) - { + public void exportExcel(HttpServletResponse response, List list, String sheetName, String title,String fileName) throws UnsupportedEncodingException { String encodedFileName = null; - encodedFileName = URLEncoder.encode(fileName+".xlsx", StandardCharsets.UTF_8); + encodedFileName = URLEncoder.encode(fileName+".xlsx", String.valueOf(StandardCharsets.UTF_8)); response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); response.setCharacterEncoding("utf-8"); response.setHeader("Content-Disposition", "attachment; filename=\"" + encodedFileName + "\""); diff --git a/zlpt-modules/zlpt-equip/src/main/java/com/bonus/zlpt/equip/service/impl/DevInfoServiceImpl.java b/zlpt-modules/zlpt-equip/src/main/java/com/bonus/zlpt/equip/service/impl/DevInfoServiceImpl.java index ebd71ca..c45fa0d 100644 --- a/zlpt-modules/zlpt-equip/src/main/java/com/bonus/zlpt/equip/service/impl/DevInfoServiceImpl.java +++ b/zlpt-modules/zlpt-equip/src/main/java/com/bonus/zlpt/equip/service/impl/DevInfoServiceImpl.java @@ -17,6 +17,8 @@ import com.bonus.zlpt.common.core.domain.equip.DevInfo; import com.bonus.zlpt.equip.service.IDevInfoService; import org.springframework.util.CollectionUtils; +import javax.annotation.Resource; + /** * 设备信息Service业务层处理 * @@ -30,7 +32,7 @@ public class DevInfoServiceImpl implements IDevInfoService private final String EXAMINATION_PDF = "EXAMINATION_PDF"; private final String INSURANCE_PDF = "INSURANCE_PDF"; - @Autowired + @Resource private DevInfoMapper devInfoMapper; /** diff --git a/zlpt-modules/zlpt-file/pom.xml b/zlpt-modules/zlpt-file/pom.xml index fc0747f..89cbcfb 100644 --- a/zlpt-modules/zlpt-file/pom.xml +++ b/zlpt-modules/zlpt-file/pom.xml @@ -68,10 +68,7 @@ - - com.bonus.zlpt - zlpt-common-swagger - + com.bonus.zlpt zlpt-common-swagger