|
@@ -68,7 +68,7 @@ public class AbsentImportTask extends AbstractTask {
|
|
|
total++;
|
|
|
}
|
|
|
|
|
|
- log.info("导入文件全部行数共 {} 行,实际有效数据共 {} 条!", total, list.size()-1);
|
|
|
+ log.info("导入文件全部行数共 {} 行,实际有效数据共 {} 条!", total, list.size());
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
return;
|
|
|
}
|
|
@@ -122,8 +122,11 @@ public class AbsentImportTask extends AbstractTask {
|
|
|
if (!"0".equals(absent)&&!"1".equals(absent)) {
|
|
|
throw new StatusException(String.format("【第%s行】“缺考”字段只能是0或1! %s", index + 1, line));
|
|
|
}
|
|
|
- if("1".equals(absent)&&StringUtils.isNotEmpty(breachCode)) {
|
|
|
- throw new StatusException(String.format("【第%s行】违纪和缺考不能同时存在! %s", index + 1, line));
|
|
|
+ if (StringUtils.isEmpty(breachCode)) {
|
|
|
+ throw new StatusException(String.format("【第%s行】“违纪”字段不能为空! %s", index + 1, line));
|
|
|
+ }
|
|
|
+ if("1".equals(absent)&&!"0".equals(breachCode)) {
|
|
|
+ throw new StatusException(String.format("【第%s行】缺考的违纪只能是0! %s", index + 1, line));
|
|
|
}
|
|
|
ExamStudent data = new ExamStudent();
|
|
|
data.setExamNumber(examNumber);
|