|
@@ -104,12 +104,14 @@ public class ExcelUtil {
|
|
field.set(o, map);
|
|
field.set(o, map);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- fields[j].setAccessible(true);
|
|
|
|
- fields[j].set(o, obj);
|
|
|
|
- Annotation annotation = fields[j].getAnnotation(NotNull.class);
|
|
|
|
- ExcelNote note = fields[j].getAnnotation(ExcelNote.class);
|
|
|
|
- if ((Objects.isNull(obj) || Objects.equals("", obj)) && Objects.nonNull(annotation)) {
|
|
|
|
- excelErrorList.add(y, new ExcelError(i + 1, "excel第" + (y + 1) + "个sheet第" + (i + 1) + "行[" + note.value() + "]为空"));
|
|
|
|
|
|
+ if (j <= fields.length - 1) {
|
|
|
|
+ fields[j].setAccessible(true);
|
|
|
|
+ fields[j].set(o, obj);
|
|
|
|
+ Annotation annotation = fields[j].getAnnotation(NotNull.class);
|
|
|
|
+ ExcelNote note = fields[j].getAnnotation(ExcelNote.class);
|
|
|
|
+ if ((Objects.isNull(obj) || Objects.equals("", obj)) && Objects.nonNull(annotation)) {
|
|
|
|
+ excelErrorList.add(y, new ExcelError(i + 1, "excel第" + (y + 1) + "个sheet第" + (i + 1) + "行[" + note.value() + "]为空"));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|