Example #1
0
 @Override
 public void setValue() {
   if (!hasInit) {
     return;
   }
   super.setValue();
   GlobalUtil.getInstance()
       .setWidgetValue((ViewGroup) getContentView(), "脑卒中-个人信息-责任医生", Global.doctorName);
 }
Example #2
0
  public void getReportFromWeb() {
    Login1 login1 = MyApplication.getInstance().getSession().getLoginResult();
    if (login1 == null || login1.response == null) {
      mToast.setText("当前没有医生登录,请先登录!");
      mToast.show();
      return;
    }
    Jmjbxx mJmjbxx = (Jmjbxx) nzzBeanMap.get(Jmjbxx.class.getName());
    if (mJmjbxx == null || mJmjbxx.getResidentID() == null || mJmjbxx.getResidentID().equals("")) {
      mToast.setText(R.string.toast_info_none_resident);
      mToast.show();
      return;
    }
    List<String> beanClassList = new ArrayList<String>();
    beanClassList.add("HFS02 得到脑卒中管理卡详细信息");

    GlobalUtil.getInstance()
        .setSupplement(
            new Supplement() {
              @Override
              public void protocolToValueSupplement(XmlTag arg0, String arg1) {
                Jmjbxx mJmjbxx = (Jmjbxx) nzzBeanMap.get(Jmjbxx.class.getName());

                // OrgCode
                XmlTag xmlTag = GlobalUtil.getInstance().findFirstXmlTag(arg0, "Request");
                xmlTag.setAttr("OrgCode", Global.orgCode);
                // UserID
                XmlTag reqSubTag = GlobalUtil.getInstance().findFirstXmlTag(xmlTag, "UserID");
                String userID =
                    MyApplication.getInstance().getSession().getLoginResult().response.userID;
                reqSubTag.setValue(userID);

                // ResidentID
                if (mJmjbxx != null) {
                  reqSubTag = GlobalUtil.getInstance().findFirstXmlTag(xmlTag, "ResidentID");
                  reqSubTag.setValue(mJmjbxx.getResidentID());
                }
              }
            });
    BeanUtil.getInstance()
        .saveBeanToWeb2(
            beanClassList,
            new OnResultFromWeb2() {

              @Override
              public void onResult(List<String> listBean, boolean isSucc) {
                if (isSucc) {
                  String errorMsg = listBean.get(0);
                  if (errorMsg.length() > 0) {
                    mToast.setText(errorMsg);
                    mToast.show();
                    mSfglYcfsReportPage01.setValueByJmjbxx(Global.jmjbxx);
                    return;
                  } else {
                    mToast.setText("【脑卒中报卡】获取成功");
                    mToast.show();
                    setValue();
                  }
                } else {
                  mToast.setText("网络请求失败");
                  mToast.show();
                  mSfglYcfsReportPage01.setValueByJmjbxx(Global.jmjbxx);
                }
              }
            });
  }