private void askData() {
   Map<String, String> map = new HashMap<String, String>();
   map.put("sid", MyApplication.getInstance().getUserInfor().getUserdetail().getSid());
   map.put("token", MyApplication.getInstance().getUserInfor().getUserdetail().getToken());
   map.put("uid", data.getUid());
   map.put("action", "view");
   getData(
       IApi.NETWORK_METHOD_POST,
       TAG_DETAIL_BUSSINESS,
       IApi.URL_SALE_BUSSINESS_LIST + "/" + data.getBid(),
       map);
 }
 @Override
 public void handleMsg(Message msg) {
   String json = msg.getData().getString(Constant.JSON_DATA);
   if (TextUtils.equals(getString(R.string.try_agin), json)) {
     MethodUtils.showToast(this, getResources().getString(R.string.try_agin), Toast.LENGTH_SHORT);
     setRefreFalse();
     return;
   }
   switch (msg.what) {
     case TAG_DETAIL_BUSSINESS:
       currentData = JosnUtil.gson.fromJson(json, type);
       if (currentData == null) {
         break;
       }
       if (TextUtils.equals("0", currentData.getResult())) {
         MethodUtils.showToast(
             this, getResources().getString(R.string.try_agin), Toast.LENGTH_SHORT);
         setRefreFalse();
         break;
       }
       if (TextUtils.equals(currentData.getDetail().getStatusvalue(), "-1")) {
         progress.setBackgroundResource(R.mipmap.dark_red_bg);
       } else if (TextUtils.equals(currentData.getDetail().getStatusvalue(), "200")) {
         progress.setBackgroundResource(R.drawable.green_bg);
       } else {
         progress.setBackgroundResource(R.mipmap.dark_blue_bg);
       }
       title.setText(currentData.getDetail().getTitle());
       time.setText(MethodUtils.returnTime(currentData.getDetail().getCreatedate()));
       progress.setText(currentData.getDetail().getStatus());
       yewuNumber.setText(currentData.getDetail().getContractid());
       hetongNumber.setText(currentData.getDetail().getBusinessid());
       writeNumber.setText(MethodUtils.returnTime(currentData.getDetail().getCreatedate()));
       writePeople.setText(currentData.getDetail().getCusname());
       if (TextUtils.equals(
           MyApplication.getInstance().getUserInfor().getUserdetail().getSid(), data.getSid())) {
         if (!TextUtils.isEmpty(currentData.getDetail().getRefereename())) {
           recommentName.setText(currentData.getDetail().getRefereename());
         }
         if (!TextUtils.isEmpty(currentData.getDetail().getRefereeamount())) {
           reCommentPrice.setText(
               new DecimalFormat("0.00")
                   .format(Double.valueOf(currentData.getDetail().getRefereeamount())));
         }
         if (!TextUtils.isEmpty(currentData.getDetail().getAmount())) {
           totalPrice.setText(
               new DecimalFormat("0.00")
                   .format(Double.valueOf(currentData.getDetail().getAmount())));
         }
         if (!TextUtils.isEmpty(currentData.getDetail().getSaleamount())) {
           price.setText(
               new DecimalFormat("0.00")
                   .format(Double.valueOf(currentData.getDetail().getSaleamount())));
         }
         content = currentData.getDetail().getText();
       }
       setRefreFalse();
       break;
   }
 }
  private void initUi() {
    textChage = (TextView) findViewById(R.id.textzhuanjie);
    textTitle = (TextView) findViewById(R.id.view_title_name);
    textChage.setOnClickListener(this);
    textChage.setText("修改");
    textTitle.setText(data.getTitle());

    title = (TextView) findViewById(R.id.item_text_title);
    time = (TextView) findViewById(R.id.item_text_time);
    progress = (TextView) findViewById(R.id.item_text_progress);
    yewuNumber = (TextView) findViewById(R.id.business_number);
    hetongNumber = (TextView) findViewById(R.id.hetong_number);
    writeNumber = (TextView) findViewById(R.id.write_time);
    writePeople = (TextView) findViewById(R.id.custom_name);
    recommentName = (TextView) findViewById(R.id.business_recoment_time);
    totalPrice = (TextView) findViewById(R.id.business_totle_price);
    price = (TextView) findViewById(R.id.business_price);
    reCommentPrice = (TextView) findViewById(R.id.business_recomment_price);
    bussinessContent = (TextView) findViewById(R.id.business_content);
    bussinessJilu = (TextView) findViewById(R.id.business_jilu);

    relContent = (RelativeLayout) findViewById(R.id.relContent);
    relJilu = (RelativeLayout) findViewById(R.id.relJilu);

    mWaveSwipeRefreshLayout = (WaveSwipeRefreshLayout) findViewById(R.id.main_swipe);
    mWaveSwipeRefreshLayout.setColorSchemeColors(Color.WHITE, Color.WHITE);
    mWaveSwipeRefreshLayout.setOnRefreshListener(this);

    title.setText(data.getTitle());
    time.setText(MethodUtils.returnTime(data.getCreatedate()));
    progress.setText(data.getStatus());
    if (TextUtils.equals(data.getStatusvalue(), "-1")) {
      progress.setBackgroundResource(R.mipmap.dark_red_bg);
    } else if (TextUtils.equals(data.getStatusvalue(), "200")) {
      progress.setBackgroundResource(R.drawable.green_bg);
    } else {
      progress.setBackgroundResource(R.mipmap.dark_blue_bg);
    }
    linearRecommend = (LinearLayout) findViewById(R.id.linear_recommend);
    linearTotalPrice = (LinearLayout) findViewById(R.id.linear_totleprice);
    linearPrice = (LinearLayout) findViewById(R.id.linear_price);
    recommentPrice = (LinearLayout) findViewById(R.id.linear_recommendprice);
    relContent = (RelativeLayout) findViewById(R.id.relContent);
    relJilu = (RelativeLayout) findViewById(R.id.relJilu);

    if (!TextUtils.equals(
        MyApplication.getInstance().getUserInfor().getUserdetail().getSid(), data.getSid())) {
      linearRecommend.setVisibility(View.GONE);
      linearTotalPrice.setVisibility(View.GONE);
      linearPrice.setVisibility(View.GONE);
      recommentPrice.setVisibility(View.GONE);
      relContent.setVisibility(View.GONE);
      relJilu.setVisibility(View.GONE);
    } else {
      relContent.setOnClickListener(this);
      relJilu.setOnClickListener(this);
    }

    findViewById(R.id.view_title_back)
        .setOnClickListener(
            new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                SaleSearchDetailActivity.this.finish();
              }
            });

    type = new TypeToken<BussinessDetailData>() {}.getType();
  }