From 09a49f7cd53acba5261802daf491cf01a10f8d9b Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 13 五月 2025 09:40:06 +0800
Subject: [PATCH] 最新版本541200007
---
server/system_service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/server/system_service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java b/server/system_service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java
index 5408db0..c6f70ac 100644
--- a/server/system_service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java
+++ b/server/system_service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java
@@ -447,13 +447,16 @@
List<String> rowList = dataList.get(i);
for (int j = 0; j < rowList.size(); j++) {
Cell cell = row.createCell(j);
- cell.setCellValue(rowList.get(j));
- if(i ==0 || j==0){
- // 鍒楀璁剧疆
- sheet.setColumnWidth(i, rowList.get(i).length() * 2 * 256);
- // 璁剧疆鍒楀ご鍗曞厓鏍�
- cell.setCellStyle(hstyle);
+ if(i==0&&j==0){
+ cell.setCellValue("鏁版嵁鏃ユ湡");
}else{
+ cell.setCellValue(rowList.get(j));
+ }
+
+ if(i==0){
+ sheet.setColumnWidth(i, rowList.get(i).length() * 2 * 256);
+ cell.setCellStyle(hstyle);
+ }else if(j==0){
cell.setCellStyle(rowStyle);
}
}
@@ -473,6 +476,7 @@
}
}
+
private static CellStyle configHeaderCellStatic (SXSSFWorkbook workbook) {
CellStyle style = workbook.createCellStyle();
style.setAlignment(HorizontalAlignment.CENTER);
@@ -482,7 +486,7 @@
style.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
// 瀛椾綋
Font font = workbook.createFont();
- font.setFontHeightInPoints((short) 12);
+ font.setFontHeightInPoints((short) 10);
style.setFont(font);
// 璁剧疆杈规
configCellBorder(style);
--
Gitblit v1.9.3