diff --git a/src/main/java/com/rj/controller/LbDailyUserTradeReportController.java b/src/main/java/com/rj/controller/LbDailyUserTradeReportController.java index c9905ae..e22b494 100644 --- a/src/main/java/com/rj/controller/LbDailyUserTradeReportController.java +++ b/src/main/java/com/rj/controller/LbDailyUserTradeReportController.java @@ -30,8 +30,11 @@ import org.apache.poi.ss.usermodel.ComparisonOperator; import org.apache.poi.ss.usermodel.ConditionalFormattingRule; import org.apache.poi.ss.usermodel.FontFormatting; import org.apache.poi.ss.util.CellRangeAddress; +import org.apache.poi.xssf.usermodel.XSSFCellStyle; +import org.apache.poi.xssf.usermodel.XSSFColor; import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import java.awt.Color; import java.math.BigDecimal; import java.math.RoundingMode; import java.net.URLEncoder; @@ -458,7 +461,6 @@ public class LbDailyUserTradeReportController { CellStyle zebraTextStyle = workbook.createCellStyle(); zebraTextStyle.cloneStyleFrom(textStyle); - zebraTextStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex()); zebraTextStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); CellStyle intStyle = workbook.createCellStyle(); @@ -472,9 +474,13 @@ public class LbDailyUserTradeReportController { CellStyle zebraIntStyle = workbook.createCellStyle(); zebraIntStyle.cloneStyleFrom(intStyle); - zebraIntStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex()); zebraIntStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + // 更淡的斑马纹底色(接近白色) + XSSFColor zebraFill = new XSSFColor(new Color(242, 244, 248), null); + ((XSSFCellStyle) zebraTextStyle).setFillForegroundColor(zebraFill); + ((XSSFCellStyle) zebraIntStyle).setFillForegroundColor(zebraFill); + CellStyle summaryTextStyle = workbook.createCellStyle(); summaryTextStyle.cloneStyleFrom(textStyle); summaryTextStyle.setFillForegroundColor(IndexedColors.LEMON_CHIFFON.getIndex());