|
楼主 |
发表于 2018-3-27 09:17:06
|
显示全部楼层
已解决 改了下poi包 导出code跟字典转换了 导入没转换 把下面这个复制到poi-base里面的ImportBaseService 类的excelEntity.setReplace(excel.replace());的后面加上判断
if(StringUtils.isNotEmpty(excel.dicCode())){
EasypoiDictServiceI jeecgDictService = null;
try {
jeecgDictService = ApplicationContextUtil.getContext().getBean(EasypoiDictServiceI.class);
} catch (Exception e) {
}
if(jeecgDictService!=null){
String[] dictReplace = jeecgDictService.queryDict(excel.dictTable(), excel.dicCode(), excel.dicText());
if(excelEntity.getReplace()!=null && dictReplace!=null && dictReplace.length!=0){
excelEntity.setReplace(dictReplace);
}
}
} |
|