|
@@ -114,14 +114,14 @@ public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> impleme
|
|
|
imp.setGroupFinish(false);
|
|
|
imp.setStructFinish(false);
|
|
|
imp.setExamId(examId);
|
|
|
- String code = trimAndNullIfBlank(line.getValue(0));
|
|
|
+ String code = trimAndNullIfBlank(line.get(SUBJECT_EXCEL_HEADER[0]));
|
|
|
if (StringUtils.isBlank(code)) {
|
|
|
msg.append(" 科目代码不能为空");
|
|
|
} else if (code.length() > 50) {
|
|
|
msg.append(" 科目代码不能超过50个字符");
|
|
|
}
|
|
|
|
|
|
- String name = trimAndNullIfBlank(line.getValue(1));
|
|
|
+ String name = trimAndNullIfBlank(line.get(SUBJECT_EXCEL_HEADER[1]));
|
|
|
if (StringUtils.isBlank(name)) {
|
|
|
msg.append(" 科目名称不能为空");
|
|
|
} else if (name.length() > 50) {
|
|
@@ -346,7 +346,7 @@ public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> impleme
|
|
|
StringBuilder msg = new StringBuilder();
|
|
|
|
|
|
PaperStructInfoVo imp = new PaperStructInfoVo();
|
|
|
- String code = trimAndNullIfBlank(line.getValue(0));
|
|
|
+ String code = trimAndNullIfBlank(line.get(SUBJECT_STRUCT_EXCEL_HEADER[0]));
|
|
|
if (StringUtils.isBlank(code)) {
|
|
|
msg.append(" 科目代码不能为空");
|
|
|
} else if (code.length() > 50) {
|
|
@@ -354,7 +354,7 @@ public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> impleme
|
|
|
}
|
|
|
imp.setCourseCode(code);
|
|
|
|
|
|
- String name = trimAndNullIfBlank(line.getValue(1));
|
|
|
+ String name = trimAndNullIfBlank(line.get(SUBJECT_STRUCT_EXCEL_HEADER[1]));
|
|
|
if (StringUtils.isBlank(name)) {
|
|
|
msg.append(" 科目名称不能为空");
|
|
|
} else if (name.length() > 50) {
|
|
@@ -366,7 +366,7 @@ public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> impleme
|
|
|
imp.setPaperId(paper.getId());
|
|
|
}
|
|
|
|
|
|
- String detailName = trimAndNullIfBlank(line.getValue(2));
|
|
|
+ String detailName = trimAndNullIfBlank(line.get(SUBJECT_STRUCT_EXCEL_HEADER[2]));
|
|
|
if (StringUtils.isBlank(detailName)) {
|
|
|
msg.append(" 大题名称不能为空");
|
|
|
} else if (detailName.length() > 50) {
|
|
@@ -374,7 +374,7 @@ public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> impleme
|
|
|
}
|
|
|
imp.setDetailName(detailName);
|
|
|
|
|
|
- String detailNumber = trimAndNullIfBlank(line.getValue(3));
|
|
|
+ String detailNumber = trimAndNullIfBlank(line.get(SUBJECT_STRUCT_EXCEL_HEADER[3]));
|
|
|
if (StringUtils.isBlank(detailNumber)) {
|
|
|
msg.append(" 大题号不能为空");
|
|
|
} else {
|
|
@@ -391,7 +391,7 @@ public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> impleme
|
|
|
|
|
|
}
|
|
|
|
|
|
- String unitNumber = trimAndNullIfBlank(line.getValue(4));
|
|
|
+ String unitNumber = trimAndNullIfBlank(line.get(SUBJECT_STRUCT_EXCEL_HEADER[4]));
|
|
|
if (StringUtils.isBlank(unitNumber)) {
|
|
|
msg.append(" 小题号不能为空");
|
|
|
} else {
|
|
@@ -408,7 +408,7 @@ public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> impleme
|
|
|
|
|
|
}
|
|
|
|
|
|
- String score = trimAndNullIfBlank(line.getValue(5));
|
|
|
+ String score = trimAndNullIfBlank(line.get(SUBJECT_STRUCT_EXCEL_HEADER[5]));
|
|
|
if (StringUtils.isBlank(score)) {
|
|
|
msg.append(" 小题满分不能为空");
|
|
|
} else {
|
|
@@ -429,7 +429,7 @@ public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> impleme
|
|
|
|
|
|
}
|
|
|
|
|
|
- String scoreStep = trimAndNullIfBlank(line.getValue(6));
|
|
|
+ String scoreStep = trimAndNullIfBlank(line.get(SUBJECT_STRUCT_EXCEL_HEADER[6]));
|
|
|
if (StringUtils.isBlank(scoreStep)) {
|
|
|
msg.append(" 间隔分不能为空");
|
|
|
} else {
|