Commit 0ef670a1 authored by fangxinjiang's avatar fangxinjiang

区域调整

parent 342a47c6
......@@ -137,7 +137,7 @@ public class ExcelUtil <T> implements Serializable {
}
} else if (attr.isArea()){
//区域字段处理 TODO
value = getAreaLabel("area_"+field.get(vo));
value = getAreaLabel((String) field.get(vo));
}
field.set(vo, Common.isNotNull(value)?value:field.get(vo));
}catch (Exception e){
......@@ -287,10 +287,10 @@ public class ExcelUtil <T> implements Serializable {
if (attr.isArea()) {
//区域字段处理 TODO
if (!Common.isNotNull(attr.parentField())) {
tempStr = getAreaValue("area_"+c.trim(), tempStr, attr,rowNum,errorTemp);
tempStr = getAreaValue(c.trim(), tempStr, attr,rowNum,errorTemp);
} else {
// TODO
tempStr = getAreaValue("area_"+c.trim()+ "_" + getFieldValueByName(attr.parentField(), data, DateUtil.ISO_EXPANDED_DATE_FORMAT), tempStr, attr,rowNum,errorTemp);
tempStr = getAreaValue(c.trim()+ "_" + getFieldValueByName(attr.parentField(), data, DateUtil.ISO_EXPANDED_DATE_FORMAT), tempStr, attr,rowNum,errorTemp);
}
}
}
......@@ -449,11 +449,11 @@ public class ExcelUtil <T> implements Serializable {
return propertyValue;
}
private String getAreaLabel(String c) {
return (String)RedisUtil.redis.opsForValue().get(CacheConstants.AREA_VALUE + c);
return (String)RedisUtil.redis.opsForValue().get(CacheConstants.AREA_LABEL + c);
}
private String getAreaValue(String c, String tempStr, ExcelAttribute attr,Integer rowNum, ErrorMessage errorTemp) {
tempStr = String.valueOf(RedisUtil.redis.opsForValue().get(CacheConstants.AREA_LABEL + c));
tempStr = String.valueOf(RedisUtil.redis.opsForValue().get(CacheConstants.AREA_VALUE + c));
if (Common.isEmpty(tempStr)){
errorMessageHashMap = initErrorMessage(errorMessageHashMap, new ErrorMessage(rowNum, attr.name() + ":" + c.trim() + "校验异常,请联系管理人员"), errorTemp);
return CommonConstants.EMPTY_STRING;
......
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