日期:2014-05-19 浏览次数:20819 次
List<HashMap<String, Object>> data = new ArrayList<HashMap<String, Object>>(); int x=1; for (FundShopDao fundShopDao : fundShopDaos) { HashMap<String, Object> item = new HashMap<String, Object>(); item.put("xuhao", x++); item.put("code", fundShopDao.getCode()); item.put("investobj", fundShopDao.getInvestObj()); item.put("opendate", fundShopDao.getOpendate()); item.put("scale", fundShopDao.getScale()); item.put("shortname", fundShopDao.getShortname()); item.put("type", fundShopDao.getType()); item.put("fundmangt", fundShopDao.getFundmangt()); data.add(item); }
------解决方案--------------------
List<Map<String,Object>> list = ... String ids[] = new String[list.size()]; for(int i = 0; i < list.size(); i++) { Map<String, Object> map = (Map<String, Object>)list.get(i); ids[i] = map.get("N_SELF_CUST_PRIVILEGE_ID").toString(); }