|
|
@@ -295,18 +295,21 @@ public class ExamSubjectScoreEnterServiceImpl extends MPJBaseServiceImpl<ExamSub
|
|
|
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
|
|
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
|
|
|
|
|
- font.setColor(IndexedColors.RED.getIndex()); // 设置字体颜色为红色
|
|
|
+ Font font2 = workbook.createFont();
|
|
|
+ font2.setFontName("宋体");
|
|
|
+ font2.setFontHeightInPoints((short)12);
|
|
|
+ font2.setColor(IndexedColors.RED.getIndex()); // 设置字体颜色为红色
|
|
|
CellStyle cellStyle2 = workbook.createCellStyle();
|
|
|
- cellStyle2.setFont(font); // 将字体应用到样式
|
|
|
+ cellStyle2.setFont(font2); // 将字体应用到样式
|
|
|
cellStyle2.setVerticalAlignment(VerticalAlignment.CENTER);
|
|
|
cellStyle2.setAlignment(HorizontalAlignment.CENTER);
|
|
|
cellStyle2.setFillForegroundColor(IndexedColors.YELLOW.getIndex());
|
|
|
|
|
|
-
|
|
|
Row row1 = sheet.createRow(rowNumber);
|
|
|
List<ImportConfig> importConfigs = ImportExcelUtil.getAllFieldCN(clazz);
|
|
|
List<ImportConfig> list = importConfigs.stream().filter(x -> x.getLabel() != null).collect(Collectors.toList());
|
|
|
for(int i = 0; i < list.size(); i ++){
|
|
|
+ sheet.setColumnWidth(i, 24 * 256);
|
|
|
ImportConfig importConfig = list.get(i);
|
|
|
Cell rowcell = row1.createCell(i);
|
|
|
rowcell.setCellValue(importConfig.getLabel());
|