From 0481353111afb43a2322e18530dde26f1d841ead Mon Sep 17 00:00:00 2001
From: yanghb <yanghb>
Date: 星期五, 21 四月 2023 11:15:34 +0800
Subject: [PATCH] 代码调整

---
 ManagementTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserActivityDiscount1ServiceImpl.java |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/ManagementTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserActivityDiscount1ServiceImpl.java b/ManagementTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserActivityDiscount1ServiceImpl.java
index b539651..e7a8078 100644
--- a/ManagementTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserActivityDiscount1ServiceImpl.java
+++ b/ManagementTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserActivityDiscount1ServiceImpl.java
@@ -7,7 +7,7 @@
 import com.stylefeng.guns.modular.system.service.IUserActivityDiscount1Service;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import org.apache.poi.hssf.usermodel.*;
-//import org.apache.poi.ss.usermodel.CellType;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.HorizontalAlignment;
 import org.apache.poi.ss.util.CellRangeAddress;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -118,12 +118,12 @@
             HSSFRow hssfRow = hssfSheet.createRow(i);//设置第一行数据(标题)
             HSSFCellStyle style = hssfWorkbook.createCellStyle();
             HSSFFont font = hssfWorkbook.createFont();
-//            font.setBold(true);
+            font.setBold(true);
             style.setFont(font);
-//            style.setAlignment(HorizontalAlignment.CENTER);
+            style.setAlignment(HorizontalAlignment.CENTER);
             for (int l = 0; l < lists.get(i).size(); l++) {
                 HSSFCell hssfCell = hssfRow.createCell(l);
-//                hssfCell.setCellType(CellType.STRING);//设置表格类型
+                hssfCell.setCellType(CellType.STRING);//设置表格类型
                 hssfCell.setCellValue(lists.get(i).get(l));
                 hssfCell.setCellStyle(style);
                 if(l > 0) {
@@ -147,7 +147,7 @@
                 data = lists1.get(i).get(l);
                 for (int j = 0; j < data.size(); j++) {
                     HSSFCell hssfCell = row.createCell(j);
-//                    hssfCell.setCellType(CellType.STRING);//设置表格类型
+                    hssfCell.setCellType(CellType.STRING);//设置表格类型
                     hssfCell.setCellValue(data.get(j));
                 }
             }
@@ -235,12 +235,12 @@
             HSSFRow hssfRow = hssfSheet.createRow(i);//设置第一行数据(标题)
             HSSFCellStyle style = hssfWorkbook.createCellStyle();
             HSSFFont font = hssfWorkbook.createFont();
-//            font.setBold(true);
+            font.setBold(true);
             style.setFont(font);
-//            style.setAlignment(HorizontalAlignment.CENTER);
+            style.setAlignment(HorizontalAlignment.CENTER);
             for (int l = 0; l < lists.get(i).size(); l++) {
                 HSSFCell hssfCell = hssfRow.createCell(l);
-//                hssfCell.setCellType(CellType.STRING);//设置表格类型
+                hssfCell.setCellType(CellType.STRING);//设置表格类型
                 hssfCell.setCellValue(lists.get(i).get(l));
                 hssfCell.setCellStyle(style);
                 if(l > 0) {
@@ -258,7 +258,7 @@
                 data = lists1.get(i).get(l);
                 for (int j = 0; j < data.size(); j++) {
                     HSSFCell hssfCell = row.createCell(j);
-//                    hssfCell.setCellType(CellType.STRING);//设置表格类型
+                    hssfCell.setCellType(CellType.STRING);//设置表格类型
                     hssfCell.setCellValue(data.get(j));
                 }
             }

--
Gitblit v1.7.1