|
@@ -1,6 +1,5 @@
|
|
|
package com.yonge.toolset.utils.easyexcel;
|
|
|
|
|
|
-import com.alibaba.excel.annotation.ExcelProperty;
|
|
|
import com.alibaba.excel.context.AnalysisContext;
|
|
|
import com.alibaba.excel.event.AnalysisEventListener;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
@@ -10,10 +9,11 @@ import org.slf4j.LoggerFactory;
|
|
|
import javax.validation.ConstraintViolation;
|
|
|
import javax.validation.Validation;
|
|
|
import javax.validation.Validator;
|
|
|
-import javax.websocket.Session;
|
|
|
-import java.util.*;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Objects;
|
|
|
+import java.util.Set;
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
|
-import java.util.concurrent.ConcurrentHashMap;
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -88,8 +88,7 @@ public class ExcelDataReader<T> extends AnalysisEventListener<T> {
|
|
|
private ExcelDataReaderProperty<T> executed(T data, AnalysisContext context) {
|
|
|
ExcelDataReaderProperty<T> property = new ExcelDataReaderProperty<>();
|
|
|
property.setClazz(data);
|
|
|
- Integer rowIndex = context.readRowHolder().getRowIndex();
|
|
|
- property.setRowIndex(rowIndex);
|
|
|
+ property.setRowIndex(context.readRowHolder().getRowIndex());
|
|
|
//执行注解校验
|
|
|
Set<ConstraintViolation<T>> set = vf.validate(data);
|
|
|
if (CollectionUtils.isNotEmpty(set)) {
|