Browse Source

修复:导出非空判断

zhongwei
ty 4 months ago
parent
commit
0e8cf93ac0
  1. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java

@ -148,7 +148,7 @@ public class ImsAnalyseExampleServiceImpl extends ServiceImpl<ImsAnalyseExampleM
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系 // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
String fileName = URLEncoder.encode( name, "UTF-8"); String fileName = URLEncoder.encode( name, "UTF-8");
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
if(page.getRecords()!=null){ if(ObjectUtils.isNotEmpty(page.getRecords())){
List<List<String>> head=new ArrayList<>(); List<List<String>> head=new ArrayList<>();
List<String> title = new ArrayList<>(Collections.singletonList("时间")); List<String> title = new ArrayList<>(Collections.singletonList("时间"));
head.add(title); head.add(title);

Loading…
Cancel
Save