提交相关代码
This commit is contained in:
parent
d560d48070
commit
29ddfa9583
|
|
@ -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<T>
|
|||
*
|
||||
* 可以设置文件名称
|
||||
*/
|
||||
public void exportExcel(HttpServletResponse response, List<T> list, String sheetName, String title,String fileName)
|
||||
{
|
||||
public void exportExcel(HttpServletResponse response, List<T> 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 + "\"");
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -68,10 +68,7 @@
|
|||
</dependency>
|
||||
|
||||
<!-- RuoYi Common Swagger -->
|
||||
<dependency>
|
||||
<groupId>com.bonus.zlpt</groupId>
|
||||
<artifactId>zlpt-common-swagger</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.bonus.zlpt</groupId>
|
||||
<artifactId>zlpt-common-swagger</artifactId>
|
||||
|
|
|
|||
Loading…
Reference in New Issue