|
|
@@ -7,6 +7,7 @@ import cn.hutool.core.thread.ThreadUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.tr.module.export.annotation.ExcelPropertySupport;
|
|
|
+import cn.tr.module.export.annotation.ExcelSelect;
|
|
|
import com.alibaba.excel.converters.Converter;
|
|
|
import com.alibaba.excel.metadata.GlobalConfiguration;
|
|
|
import com.alibaba.excel.metadata.data.ReadCellData;
|
|
|
@@ -38,6 +39,10 @@ public abstract class AbstractCascadeSelectConverter<T> implements Converter<T>
|
|
|
//校验是否存在
|
|
|
T javaValue = excelConverterJavaValue(content,getSelectPairs(getParams(excelPropertySupport)));
|
|
|
if(ObjectUtil.isNull(javaValue)){
|
|
|
+ ExcelSelect select = excelPropertySupport.select();
|
|
|
+ if(select.allowCustom()){
|
|
|
+ return (T) content;
|
|
|
+ }
|
|
|
throw new UnsupportedOperationException("所填值{"+content+"}不合法,请重新下载模板导入");
|
|
|
}
|
|
|
return javaValue;
|