加判断

This commit is contained in:
Wangxxz
2024-09-30 11:51:47 +08:00
parent 3af3c2eedf
commit effb45c6d0

View File

@@ -312,6 +312,10 @@ public class ExamQuestionApi extends ApiBaseController {
if(row1.getCell(1).getStringCellValue().equals("多选题")){
examQuestion.setType(2);
}
if (row1.getCell(2).getStringCellValue() == null || row1.getCell(2).getStringCellValue().equals("")){
examQuestion.setDifficulty(null);
}else{
if( row1.getCell(2).getStringCellValue().equals("")){
examQuestion.setDifficulty(2f);
}else if(row1.getCell(2).getStringCellValue().equals("")){
@@ -321,6 +325,7 @@ public class ExamQuestionApi extends ApiBaseController {
}else if(row1.getCell(2).getStringCellValue().equals("")){
examQuestion.setDifficulty(null);
}
}
Cell cell = row1.getCell(3);
cell.setCellType(CellType.STRING);