|
@@ -32,6 +32,7 @@ import org.apache.poi.xssf.usermodel.XSSFClientAnchor;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFRichTextString;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
|
|
@@ -106,7 +107,8 @@ public class ExportStudentExcel {
|
|
|
Field[] fs = cls.getDeclaredFields();
|
|
|
for (Field f : fs) {
|
|
|
ExcelField ef = f.getAnnotation(ExcelField.class);
|
|
|
- if (ef != null && (ef.type() == 0 || ef.type() == type) && (cols == null || cols.contains(f.getName()))) {
|
|
|
+ if (ef != null && (ef.type() == 0 || ef.type() == type)
|
|
|
+ && (CollectionUtils.isEmpty(cols) || cols.contains(f.getName()))) {
|
|
|
if (groups != null && groups.length > 0) {
|
|
|
boolean inGroup = false;
|
|
|
for (int g : groups) {
|