| | |
| | | import com.dayu.qihealonelibrary.card.ConfigurationPowerCard; |
| | | import com.dayu.qihealonelibrary.card.DomainCard; |
| | | import com.dayu.qihealonelibrary.card.ElectricPriceCard; |
| | | import com.dayu.qihealonelibrary.card.ManageCard; |
| | | import com.dayu.qihealonelibrary.card.RegionCard; |
| | | import com.dayu.qihealonelibrary.card.UserCard; |
| | | import com.dayu.qihealonelibrary.databinding.ActivityRedCardQhaBinding; |
| | |
| | | redCardBinding.redRechargeDate.setText("本卡最后购水日期:无"); |
| | | } |
| | | redCardBinding.redInitCode.setText(cardNumber); |
| | | redCardBinding.redRechargeNumber.setText("本卡充值次数:" + userCard.getRechargeTimes() + " 次"); |
| | | redCardBinding.redTotalWater.setText("总用水量:" + MornyUtil.changeF2Y(userCard.getTotalWater()) + " 吨"); |
| | | redCardBinding.redTotalPower.setText("总用电量:" + MornyUtil.changeF2Y(userCard.getTotalElectric())+" 度"); |
| | | redCardBinding.redRemainderBlance.setText("剩余金额:" + MornyUtil.changeF2Y(userCard.getBalance()) + " 元"); |
| | | redCardBinding.redRemainderWater.setText("剩余水量:" + MornyUtil.changeF2Y(userCard.getSurplusWater())+" 吨"); |
| | | // redCardBinding.redRechargeNumber.setText("本卡充值次数:" + userCard.getRechargeTimes() + " 次"); |
| | | // redCardBinding.redTotalWater.setText("总用水量:" + MornyUtil.changeF2Y(userCard.getTotalWater()) + " 吨"); |
| | | // redCardBinding.redTotalPower.setText("总用电量:" + MornyUtil.changeF2Y(userCard.getTotalElectric()) + " 度"); |
| | | // redCardBinding.redRemainderBlance.setText("剩余金额:" + MornyUtil.changeF2Y(userCard.getBalance()) + " 元"); |
| | | redCardBinding.redRemainderWater.setText("剩余水量:" + MornyUtil.changeF2Y(userCard.getSurplusWater()) + " 吨"); |
| | | } |
| | | } |
| | | |
| | |
| | | String[] cardTypes = cardType.split(","); |
| | | if (cardTypes != null && cardTypes.length == 2) { |
| | | cardNumber = cardType.split(",")[0]; |
| | | cardNumber = HexUtil.spaceHex(cardNumber); |
| | | cardNumber = HexUtil.HighLowHex(cardNumber); |
| | | cardType = cardType.split(",")[1]; |
| | | } |
| | | List<byte[]> data = NfcReadHelper.getInstence(intent, this).getOnesectorData(); |
| | |
| | | |
| | | break; |
| | | case CardCommon.MANAGE_CRAD: |
| | | ManageCard manageCard = ManageCard.getBean(data); |
| | | viweGone(false); |
| | | redCardBinding.readCardTypeTV.setText("当前为管理卡"); |
| | | String hex = manageCard.getUserCard().toUpperCase(); |
| | | hex = HexUtil.spaceHex(hex); |
| | | hex = HexUtil.HighLowHex(hex); |
| | | redCardBinding.readCardTypeTV.setText("当前为管理卡" + "\n\n" |
| | | + "原始卡号:" + hex); |
| | | break; |
| | | case CardCommon.CLEAN_CARD_TYPE: |
| | | viweGone(false); |