|
@@ -447,6 +447,10 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
|
|
|
Cell cell = row.getCell(index);
|
|
|
String cellValue = String.valueOf(ExcelUtil.convert(cell));
|
|
|
+ if (cellValue == null || cellValue.length() < 1 || cellValue.equals("null")){
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("excel中第[" + (r + 1) + "]行,第[" + (index + 1) + "]列,字段[" + name + "]必填");
|
|
|
+ }
|
|
|
+
|
|
|
// TODO: 2021/4/20 可以优化
|
|
|
if (ExaminationDBFieldsEnum.STUDENT_CODE.getDesc().equals(name)) {
|
|
|
studentCode = cellValue;
|
|
@@ -478,7 +482,6 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
throw ExceptionResultEnum.ERROR.exception("有数据库不需要的必选字段 : " + name);
|
|
|
}
|
|
|
if ("secondary".equals(level)) {
|
|
|
- // 备选字段处理
|
|
|
FieldsDto secondaryField = new FieldsDto();
|
|
|
secondaryField.setLevel(level);
|
|
|
secondaryField.setCode(code);
|