private void setView() {

    if (policyMsgInsuranceType != null) {
      tvType.setText(policyMsgInsuranceType.getItemKindCode());
      tvValue.setText(policyMsgInsuranceType.getItemKindAmount());
    } else {
      Log.i(Tag, "查看信息保单中的承保信息数据为空");
    }
  }
Beispiel #2
0
  private void setData() {
    Log.i(SBasicActivity.class.getSimpleName(), "报案号" + registNo);
    Log.i(SBasicActivity.class.getSimpleName(), "案件类型" + checkStatue);
    if (!TextUtils.isEmpty(checkStatue) || !TextUtils.isEmpty(registNo)) {
      new AsyncTask<String, Void, DetailTaskQueryResponse>() {
        @Override
        protected void onPreExecute() {
          handler.sendEmptyMessage(ConstantValue.PROGRESS_OPEN);
        };

        @Override
        protected DetailTaskQueryResponse doInBackground(String... params) {
          // 联系客户时间和任务是否受理了
          DetailTaskQueryRequest detailTaskQueryRequest = new DetailTaskQueryRequest();
          detailTaskQueryRequest.setCheckStatus(params[1]);
          detailTaskQueryRequest.setRegistNo(params[0]);
          boolean isUpdate = true;
          if (registNo != null) {
            if (CheckTaskAccess.findByRegistno(registNo).getSynchrostatus().equals("synchroApply"))
              isUpdate = true;
          }
          DetailTaskQueryResponse detailTaskQueryResponse = null;
          if (checkStatue != null) {
            if (checkStatue.equals("1")
                || checkStatue.equals("")
                || (checkStatue.equals("2")
                    && !checkTask.getSynchrostatus().equals("synchroApply"))) {
              SQLiteDatabase db = dbHelper.getReadableDatabase();
              if (TblTaskQuery.isExist(
                  db, "REGISTNO=?", "TASKQUERY", new String[] {params[0]}, true)) {
                detailTaskQueryResponse = DetailTaskQueryResponse.getDetailTaskQueryResponse();
                detailTaskQueryResponse.setResponseCode("YES");
              } else {
                detailTaskQueryResponse =
                    DetailTaskQueryHttpService.detailTaskQuerySercive(
                        detailTaskQueryRequest, context.getString(R.string.http_url), isUpdate);
              }
            } else {
              detailTaskQueryResponse =
                  DetailTaskQueryHttpService.detailTaskQuerySercive(
                      detailTaskQueryRequest, context.getString(R.string.http_url), isUpdate);
            }
          }
          return detailTaskQueryResponse;
        }

        @Override
        protected void onPostExecute(DetailTaskQueryResponse result) {
          handler.sendEmptyMessage(ConstantValue.PROGRESS_CLOSE);
          if (result != null && "YES".equals(result.getResponseCode())) {
            SQLiteDatabase db = dbHelper.getReadableDatabase();
            // 把数据放在全局变量里面
            DataConfig.tblTaskQuery = TblTaskQuery.getTaskQuery(db, registNo);
            DataConfig.tblTaskQuery.setLinkcustomTime(String.valueOf(checkTask.getContacttime()));
            // 显示联系人信息
            if (!SystemConfig.UserRightIsAdvanced)
              if (sContactView != null) sContactView.setXiePeiViewValue();
          } else {
            if (result != null) {
              Message message = Message.obtain();
              message.obj = result.getResponseMessage();
              message.what = ConstantValue.ERROE;
              handler.sendMessage(message);
              UiManager.getInstance().changeView(SurveyTaskActivity.class, false, null, true);
            }
          }
          SQLiteDatabase db = dbHelper.getReadableDatabase();
          // 把数据放在全局变量里面
          DetailTaskQueryResponse.detailTaskQueryResponse = null;
          DataConfig.tblTaskQuery = DetailTaskQueryResponse.getDetailTaskQueryResponse();
          DataConfig.tblTaskQuery = TblTaskQuery.getTaskQuery(db, registNo);
          // 联系客户时间
          Log.i(SBasicActivity.class.getSimpleName(), "联系客户时间" + checkTask.getContacttime());
          DataConfig.tblTaskQuery.setLinkcustomTime(String.valueOf(checkTask.getContacttime()));
          db = dbHelper.getReadableDatabase();
          TblTaskQuery.insertOrUpdate(db, DataConfig.tblTaskQuery, true, false, false);
          Log.i(SBasicActivity.class.getSimpleName(), "显示同步撤销" + checkTask.getSynchrostatus());

          if ("synchroApply".equals(checkTask.getSynchrostatus())) {
            // 显示同步撤销
            TopManager.getInstance().TongBuSurveryContinue(false);
          } else {
            // 显示理赔同步
            TopManager.getInstance().TongBuSurveryContinue(true);
          }
          String compensateRate = DataConfig.tblTaskQuery.getCompensateRate();
          android.util.Log.i("yxf", "----compensateRate--" + compensateRate);
          if ("".equals(compensateRate.trim()) || compensateRate == null) {

          } else {
            PromptManager.showUpdateDialog(
                context,
                "赔付率系数为" + compensateRate + "%",
                new DialogInterface.OnClickListener() {
                  @Override
                  public void onClick(DialogInterface arg0, int arg1) {}
                });
          }
        };
      }.execute(registNo, checkStatue);
    } else {
      Toast.showToast(context, "报案号和任务类型为空");
    }
  }