@Override public void initView() { ballParkOrderDetailsActivity = this; setTitle("订单详情"); intent = getIntent(); orderBean = (OrderBean) intent.getSerializableExtra("orderbean"); logE("---传过来的---orderBean-------" + orderBean.toString()); }
/** * @param 订单列表 * @return */ public static List<OrderBean> OrderInfo_LineTeach(String content) { List<OrderBean> dates = new ArrayList<OrderBean>(); try { JSONObject jsonobject = new JSONObject(content); OrderBean orderBean = new OrderBean(); orderBean.allOrder = jsonobject.optInt("allOrder"); orderBean.payed = jsonobject.optInt("payed"); orderBean.nopay = jsonobject.optInt("nopay"); orderBean.nocomment = jsonobject.optInt("nocomment"); JSONArray ja = new JSONArray(jsonobject.getString("data")); for (int i = 0; i < ja.length(); i++) { dates = JSON.parseArray(ja.toString(), OrderBean.class); } return dates; } catch (JSONException e) { e.printStackTrace(); } return dates; }
/** * @param 订单列表 * @return */ public static List<OrderBean> OrderInfo(String content) { List<OrderBean> dates = new ArrayList<OrderBean>(); try { JSONObject jsonobject = new JSONObject(content); OrderBean orderBean = new OrderBean(); orderBean.allOrder = jsonobject.optInt("allOrder"); orderBean.payed = jsonobject.optInt("payed"); orderBean.nopay = jsonobject.optInt("nopay"); orderBean.nocomment = jsonobject.optInt("nocomment"); Message message = new Message(); message.obj = orderBean; MarkOrderTabMAinActivity.markOrderTabMAinActivity.handler.sendMessage(message); JSONArray ja = new JSONArray(jsonobject.getString("data")); for (int i = 0; i < ja.length(); i++) { dates = JSON.parseArray(ja.toString(), OrderBean.class); } return dates; } catch (JSONException e) { e.printStackTrace(); } return dates; }