工作经验-类型转换[ java.lang.String]
错误代码:
logger.info("1");
Map<String,String> zxmap = (Map) zxList.get(0);
ybty.setFyze(StringUtil.stringToDouble(zxmap.get("akc264"),0.00D));
ybty.setZfze(0.00D);
错误日志:
java.math.BigDecimal cannot be cast to java.lang.String
解决方案:
double fyze = StringUtil.objectTodouble(zxmap.get("akc264"));
ybty.setFyze(fyze);