Commit 646c7906 authored by fangxinjiang's avatar fangxinjiang

excel导入导出组件

parent b27cd6ba
...@@ -99,14 +99,15 @@ public class ExcelUtil <T> implements Serializable { ...@@ -99,14 +99,15 @@ public class ExcelUtil <T> implements Serializable {
} else { } else {
if (attr.isArea()) { if (attr.isArea()) {
//区域字段处理 TODO //区域字段处理 TODO
/*if (!Common.isNotNull(attr.parentField())) { if (!Common.isNotNull(attr.parentField())) {
tempStr = dicMap.get(c.trim() + "_0"); tempStr = getDicValue("area_"+c.trim() + "_0", tempStr, attr,rowNum,errorTemp);
} else { } else {
tempStr = dicMap.get(c.trim() + "_" + getFieldValueByName(attr.parentField(), entity, DateUtil.ISO_EXPANDED_DATE_FORMAT)); // TODO
}*/ tempStr = getDicValue("area_"+c.trim()+ "_" + getFieldValueByName(attr.parentField(), data, DateUtil.ISO_EXPANDED_DATE_FORMAT), tempStr, attr,rowNum,errorTemp);
}
} else { } else {
//直接按值去找数据 TODO //直接按值去找数据 TODO
//tempStr = dicMap.get(c.trim()); tempStr = getDicValue(c.trim() , tempStr, attr,rowNum,errorTemp);
} }
} }
if (!StringUtils.isNotBlank(tempStr)) { if (!StringUtils.isNotBlank(tempStr)) {
......
...@@ -47,7 +47,7 @@ public class DictItemRedisInit { ...@@ -47,7 +47,7 @@ public class DictItemRedisInit {
List<SysArea> allAreas = sysAreaService.getAllArea(); List<SysArea> allAreas = sysAreaService.getAllArea();
if (Common.isNotNull(allAreas)){ if (Common.isNotNull(allAreas)){
for (SysArea area:allAreas){ for (SysArea area:allAreas){
redisUtil.set(area.getId() redisUtil.set("area_" + area.getId()
+ CommonConstants.DOWN_LINE_STRING + CommonConstants.DOWN_LINE_STRING
+(Common.isEmpty(area.getParentId())?"0":area.getParentId()),area.getId()); +(Common.isEmpty(area.getParentId())?"0":area.getParentId()),area.getId());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment