解决方案 »

  1.   

    private List<Map<String,Object>> buildData(){
    List<Map<String,Object>> data = new ArrayList<Map<String,Object>>();
    Bdinvcl dao = new Bdinvcl(context);
    List<OrderTable> list= dao.getAllOrderTable();
    OrderTable orderTable =new OrderTable();
    for(int i=0;i<list.size();i++){
    orderTable=list.get(i);
    HashMap<String, Object> map=new HashMap<String, Object>();
    map.put("bianma", orderTable.getCp_id());
    map.put("mingcheng", orderTable.getCpname());
    map.put("cpshuliang", orderTable.getCpshuliang());
    map.put("jine", orderTable.getCpjiage());
    data.add(map);

    }
    return data;
    }
    -----------------
    这是数据源