优化 excel 工具字典数据多个的时候解析
This commit is contained in:
@@ -539,7 +539,7 @@ public class ExcelExport implements Closeable{
|
||||
// If is dict, get dict label
|
||||
if (StringUtils.isNotBlank(ef.dictType())){
|
||||
Class<?> dictUtils = Class.forName("com.jeesite.modules.sys.utils.DictUtils");
|
||||
val = dictUtils.getMethod("getDictLabel", String.class, String.class,
|
||||
val = dictUtils.getMethod("getDictLabels", String.class, String.class,
|
||||
String.class).invoke(null, ef.dictType(), val==null?"":val.toString(), "");
|
||||
//val = DictUtils.getDictLabel(val==null?"":val.toString(), ef.dictType(), "");
|
||||
}
|
||||
|
||||
@@ -405,7 +405,7 @@ public class ExcelImport implements Closeable {
|
||||
if (StringUtils.isNotBlank(ef.dictType())){
|
||||
try{
|
||||
Class<?> dictUtils = Class.forName("com.jeesite.modules.sys.utils.DictUtils");
|
||||
val = dictUtils.getMethod("getDictValue", String.class, String.class,
|
||||
val = dictUtils.getMethod("getDictValues", String.class, String.class,
|
||||
String.class).invoke(null, ef.dictType(), val.toString(), "");
|
||||
} catch (Exception ex) {
|
||||
log.info("Get cell value ["+i+","+column+"] error: " + ex.toString());
|
||||
|
||||
Reference in New Issue
Block a user