|  |  | 
 |  |  |     String statu; | 
 |  |  |     String userName; | 
 |  |  |     String morny; | 
 |  |  |     String rechageWater; | 
 |  |  |     String cardNumber; | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  | 
 |  |  |             userName = getIntent().getStringExtra("userName"); | 
 |  |  |             if (getIntent().hasExtra("morny")) { | 
 |  |  |                 morny = getIntent().getStringExtra("morny"); | 
 |  |  |                 rechageWater = getIntent().getStringExtra("rechageWater"); | 
 |  |  |             } | 
 |  |  |             if (getIntent().hasExtra("cardNumber")) { | 
 |  |  |                 cardNumber = getIntent().getStringExtra("cardNumber"); | 
 |  |  | 
 |  |  |         int balance = userCard.getBalance(); | 
 |  |  |         if (!TextUtils.isEmpty(morny)) { | 
 |  |  |             binding.tip.setText("充值成功!"); | 
 |  |  |             balance = userCard.getBalance() + MornyUtil.changeY2F(morny); | 
 |  |  |             balance = userCard.getBalance(); | 
 |  |  |             binding.redRemainderMorny.setText("充值金额:" + morny + " 元"); | 
 |  |  |             binding.redRechargeWater.setText("剩余金额:" + MornyUtil.changeF2Y(balance) + " 元"); | 
 |  |  |         } else { | 
 |  |  |             binding.tip.setText("开卡成功!"); | 
 |  |  |             balance = userCard.getBalance(); | 
 |  |  |             binding.redRemainderMorny.setVisibility(View.GONE); | 
 |  |  |             binding.redRechargeWater.setVisibility(View.GONE); | 
 |  |  |         } | 
 |  |  |         binding.redName.setText("用户姓名:" + userName); | 
 |  |  |         binding.redRemainderBlance.setText("剩余金额:" + MornyUtil.changeF2Y(balance) + " 元"); | 
 |  |  | //        binding.redRemainderBlance.setText("剩余金额:" + MornyUtil.changeF2Y(balance) + " 元"); | 
 |  |  |         binding.redSurplusWater.setText("剩余水量:" + MornyUtil.changeF2Y(userCard.getSurplusWater()) + " 吨"); | 
 |  |  |         binding.redStatu.setText("卡状态:" + statu); | 
 |  |  |         if (userCard != null) { | 
 |  |  |             binding.redInitCode.setText("当前卡号:" + cardNumber); | 
 |  |  | 
 |  |  |                 int month = calendar.get(Calendar.MONTH); // 月份从0开始,所以需要加1 | 
 |  |  |                 int day = calendar.get(Calendar.DAY_OF_MONTH); | 
 |  |  |  | 
 |  |  |                 binding.redRechargeDate.setText("本卡最后购水日期:" + year + month + day ); | 
 |  |  |                 binding.redRechargeDate.setText("本卡最后购水日期:" + year + month + day); | 
 |  |  |             } else { | 
 |  |  |                 binding.redRechargeDate.setText("本卡最后购水日期:无"); | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             binding.redRechargeNumber.setText("本卡充值次数:" + userCard.getRechargeTimes() + ""); | 
 |  |  | //            binding.redRechargeNumber.setText("本卡充值次数:" + userCard.getRechargeTimes() + ""); | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  | } |