|
@@ -290,6 +290,13 @@ public class ExamSubjectScoreEnterServiceImpl extends MPJBaseServiceImpl<ExamSub
|
|
|
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
|
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
|
|
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
|
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
|
|
|
|
|
|
|
|
|
+ font.setColor(IndexedColors.RED.getIndex()); // 设置字体颜色为红色
|
|
|
|
|
+ CellStyle cellStyle2 = workbook.createCellStyle();
|
|
|
|
|
+ cellStyle2.setFont(font); // 将字体应用到样式
|
|
|
|
|
+ cellStyle2.setVerticalAlignment(VerticalAlignment.CENTER);
|
|
|
|
|
+ cellStyle2.setAlignment(HorizontalAlignment.CENTER);
|
|
|
|
|
+ cellStyle2.setFillBackgroundColor(IndexedColors.YELLOW.getIndex());
|
|
|
|
|
+
|
|
|
|
|
|
|
|
Row row1 = sheet.createRow(rowNumber);
|
|
Row row1 = sheet.createRow(rowNumber);
|
|
|
List<ImportConfig> importConfigs = ImportExcelUtil.getAllFieldCN(clazz);
|
|
List<ImportConfig> importConfigs = ImportExcelUtil.getAllFieldCN(clazz);
|
|
@@ -298,7 +305,11 @@ public class ExamSubjectScoreEnterServiceImpl extends MPJBaseServiceImpl<ExamSub
|
|
|
ImportConfig importConfig = list.get(i);
|
|
ImportConfig importConfig = list.get(i);
|
|
|
Cell rowcell = row1.createCell(i);
|
|
Cell rowcell = row1.createCell(i);
|
|
|
rowcell.setCellValue(importConfig.getLabel());
|
|
rowcell.setCellValue(importConfig.getLabel());
|
|
|
- rowcell.setCellStyle(cellStyle);
|
|
|
|
|
|
|
+ if(importConfig.getRequired()){
|
|
|
|
|
+ rowcell.setCellStyle(cellStyle2);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ rowcell.setCellStyle(cellStyle);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|