|
@@ -1080,8 +1080,8 @@ public class SubInfoExportController extends BaseController {
|
|
|
add(new ExcelExportEntity("解决就业人数", "numP", 12));
|
|
|
add(new ExcelExportEntity("年度投资(亿元)", "yearPlanAmt", 12));
|
|
|
add(new ExcelExportEntity("进展情况", "progress", 30));
|
|
|
- add(new ExcelExportEntity("牵头部门", "deptName", 30));
|
|
|
- add(new ExcelExportEntity("责任领导", "leader", 15));
|
|
|
+ add(new ExcelExportEntity("牵头部门", "chhDesc", 30));
|
|
|
+ add(new ExcelExportEntity("责任领导", "nameZrrLead", 15));
|
|
|
add(new ExcelExportEntity("备注", "remark", 15));
|
|
|
}};
|
|
|
List<Map<String, Object>> collect = exportList.stream().map(e -> {
|
|
@@ -1811,7 +1811,7 @@ public class SubInfoExportController extends BaseController {
|
|
|
vo.setIndex(i + 1 + "");
|
|
|
hyList.add(vo);
|
|
|
}
|
|
|
- // 添加前计算合并行
|
|
|
+ // 添加合并行
|
|
|
allSize.add(exportList.size() + 2);
|
|
|
allSize.add(2);
|
|
|
exportList.addAll(hyList);
|
|
@@ -1832,7 +1832,6 @@ public class SubInfoExportController extends BaseController {
|
|
|
// 合并单元格
|
|
|
CellStyle nonCenterCellStyle = createNonCenterBoldCellStyle(workbook);
|
|
|
Sheet sheet = workbook.getSheetAt(0);
|
|
|
- // allSize.add(2);
|
|
|
for (Integer row : new HashSet<>(allSize)) {
|
|
|
sheet.addMergedRegion(new CellRangeAddress(row, row, 1, 4));
|
|
|
// 获取合并区域的左上角单元格并设置样式
|
|
@@ -1844,7 +1843,7 @@ public class SubInfoExportController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // 设置自适应行高,i为需要自适应行高的起始行号, 起始行号为3 但是因为下标从0开始3需要减一,因为表格是循环生成,需要一行一行设置自适应高度
|
|
|
+ // 行高内容自适应
|
|
|
for (int i = 4; i <= list.size() + allSize.size() + 3; i++) {
|
|
|
Optional.ofNullable(sheet.getRow(i)).ifPresent(row -> row.setHeight((short) -1));
|
|
|
}
|