公开征求意见 导出 bug修复

This commit is contained in:
yuezhihang
2022-01-12 10:20:28 +08:00
parent 654e7e8127
commit fed0b3dc85
2 changed files with 5 additions and 3 deletions
@@ -123,6 +123,7 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
Map<String,String> map=new HashMap<>();
map.put("1","上报");
map.put("2","处理后上报");
map.put("3","不上报");
String fileName = URLEncoder.encode(textName, "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
List<SarPublicIdeaAll> data=new ArrayList<>();
@@ -156,6 +157,7 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
.reason(sarPublicIdeaAll.getReason())
.userName(sarPublicIdeaAll.getUserName())
.deptName(sarPublicIdeaAll.getDeptName())
.state(map.get(sarPublicIdeaAll.getState()))
.cause(sarPublicIdeaAll.getCause())
.build();
standExcel.add(getExcelDto);
@@ -169,9 +171,7 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
headList.add(Lists.newArrayList("修改意见内容(包括理由或依据)","修改理由"));
headList.add(Lists.newArrayList("提出部门"));
headList.add(Lists.newArrayList("提出人"));
if ("1".equals(type)){
headList.add(Lists.newArrayList("处理意见"));
}
headList.add(Lists.newArrayList("处理意见"));
headList.add(Lists.newArrayList("原因"));
if ("1".equals(type)) {
EasyExcel.write(response.getOutputStream(), GetExcelDto2.class).head(headList).autoCloseStream(Boolean.FALSE).sheet("sheet1")
@@ -38,6 +38,8 @@ public class GetExcelDto {
// @ExcelProperty("提出人")
private String userName;
private String state;
private String cause;