From 4281f6c90e4a17845a5721ab51b3bc5c5409ab45 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期三, 07 一月 2026 23:27:04 +0800
Subject: [PATCH] 修改了对应代码

---
 ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheet.java |   23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheet.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheet.java
index 4631cea..3b53014 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheet.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheet.java
@@ -316,8 +316,10 @@
                     printSetup.setLandscape(false);  // 绾靛悜鎵撳嵃
 
                     // 璁剧疆椤佃竟璺�
-                    sheet.setMargin(Sheet.LeftMargin, 0.5);
-                    sheet.setMargin(Sheet.RightMargin, 0.5);
+                    sheet.setMargin(Sheet.LeftMargin, 0.65);
+                    sheet.setMargin(Sheet.RightMargin, 0.65);
+                    sheet.setMargin(Sheet.TopMargin,0.31);
+                    sheet.setMargin(Sheet.BottomMargin, 0.31);
                     // 璁剧疆鎵撳嵃鍖哄煙锛屼粠绗�0琛屽埌绗�1000琛岋紝绗�0鍒楀埌绗�20鍒楋紙鏍规嵁瀹為檯鎯呭喌璋冩暣锛�
                  //   sheet.setPrintArea(0, 0, 20, 0, 1000);
                     // 濡傛灉鏄痠ndex涓�1鐨剆heet锛岃缃《绔爣棰樿
@@ -401,7 +403,7 @@
                     CellStyle underlineStyle = wb.createCellStyle();
                     Font underlineFont = wb.createFont();
                     underlineFont.setFontName("瀹嬩綋");
-                    underlineFont.setFontHeightInPoints((short) 11);
+                    underlineFont.setFontHeightInPoints((short) 12);
                     underlineFont.setUnderline(Font.U_SINGLE); // 璁剧疆涓嬪垝绾�
                     underlineStyle.setFont(underlineFont);
                     recordIdCell.setCellStyle(underlineStyle);
@@ -525,6 +527,7 @@
                 row = sheet.createRow(i + 5 );
             else
                 row = sheet.createRow(i + 1 );
+
             // 寰楀埌瀵煎嚭瀵硅薄.
             T vo = (T) list.get(i);
             int column = 0;
@@ -551,17 +554,17 @@
         style.setAlignment(HorizontalAlignment.CENTER);
         style.setVerticalAlignment(VerticalAlignment.CENTER);
         style.setBorderRight(BorderStyle.THIN);
-        style.setRightBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
+        style.setRightBorderColor(IndexedColors.BLACK.getIndex());
         style.setBorderLeft(BorderStyle.THIN);
-        style.setLeftBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
+        style.setLeftBorderColor(IndexedColors.BLACK.getIndex());
         style.setBorderTop(BorderStyle.THIN);
-        style.setTopBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
+        style.setTopBorderColor(IndexedColors.BLACK.getIndex());
         style.setBorderBottom(BorderStyle.THIN);
-        style.setBottomBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
+        style.setBottomBorderColor(IndexedColors.BLACK.getIndex());
         // 璁剧疆鑷姩鎹㈣
         style.setWrapText(true);
         Font dataFont = wb.createFont();
-        dataFont.setFontName("Arial");
+        dataFont.setFontName("瀹嬩綋");
         dataFont.setFontHeightInPoints((short) 12);
         style.setFont(dataFont);
         styles.put("data", style);
@@ -600,7 +603,7 @@
         style.setAlignment(HorizontalAlignment.CENTER);
         style.setVerticalAlignment(VerticalAlignment.CENTER);
         Font totalFont = wb.createFont();
-        totalFont.setFontName("Arial");
+        totalFont.setFontName("瀹嬩綋");
         totalFont.setFontHeightInPoints((short) 12);
         style.setFont(totalFont);
         // 鎬昏琛屼篃璁剧疆鑷姩鎹㈣
@@ -1094,7 +1097,7 @@
            // header.setFontSize((short) 10);
             // 璁剧疆椤电湁鍐呭
             hssfSheet.setMargin(Sheet.HeaderMargin, 2.1);
-            header.setRight("鍏� &N 椤�   绗� &P椤�");
+            header.setRight("&\"瀹嬩綋,Bold\"鍏� &N 椤�   绗� &P 椤�");
         }
         // 濡傛灉鏄痠ndex涓�1鐨剆heet锛岃缃《绔爣棰樿
         if (index == 1) {

--
Gitblit v1.9.1