File was renamed from qiheonlinelibrary/src/main/java/com/dayu/qiheonlinelibrary/activity/ManagerReadActivity.java |
| | |
| | | * Time: 20:10 |
| | | * 备注: 读取管理卡,从控制器读卡后在此界面读卡 |
| | | */ |
| | | public class ManagerReadActivity extends BaseNfcActivity { |
| | | public class ManagerReadActivityQHOline extends QHOlineBaseNfcActivity { |
| | | |
| | | ActivityManagerReadQhlBinding binding; |
| | | Intent intent; |
| | |
| | | private void initView() { |
| | | binding.managerNext.setOnClickListener(v -> { |
| | | if (isReadSuccess) { |
| | | Intent intent = new Intent(ManagerReadActivity.this, NFCWreatActivity.class); |
| | | Intent intent = new Intent(ManagerReadActivityQHOline.this, NFCWreatActivityQHOline.class); |
| | | intent.putExtra("iccardInfoId", cardInfoResult.getIccardInfoId()); |
| | | intent.putExtra("replaceType", BaseCommon.REPLACE_HAS_CARD); |
| | | startActivity(intent); |
| | | ManagerReadActivity.this.finish(); |
| | | ManagerReadActivityQHOline.this.finish(); |
| | | } else { |
| | | TipUtil.show(ManagerReadActivity.this, "请刷管理卡"); |
| | | TipUtil.show(ManagerReadActivityQHOline.this, "请刷管理卡"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void onNewIntent(Intent intent) { |
| | | public void onNfcBack(Intent intent) { |
| | | this.intent = intent; |
| | | ProgressDialog.show(this); |
| | | if (NfcAdapter.ACTION_TAG_DISCOVERED.equals(intent.getAction())) { |
| | |
| | | } |
| | | |
| | | if (CardCommon.MANAGE_CRAD.equalsIgnoreCase(cardType)) { |
| | | managerToUserCard = NfcReadHelper.getInstence(intent, this).getManagerToUserCardData(); |
| | | managerToUserCard = NfcReadHelper.getInstence(intent, this).getManagerToUserCardData(new ManagerToUserCard()); |
| | | if (managerToUserCard != null) { |
| | | if (QHOnLineApplication.getInstance().arerNumber.equalsIgnoreCase(String.valueOf(managerToUserCard.getArerNumber()))) { |
| | | String oldCardNumber = managerToUserCard.getOldCardNumber(); |
| | |
| | | TipUtil.show(this, "当前卡不是管理卡!!!"); |
| | | } |
| | | } |
| | | super.onNewIntent(intent); |
| | | } |
| | | |
| | | /** |
| | |
| | | userCardBean.setAddressCode(cardInfoResult.getAdcd()); |
| | | userCardBean.setAddressName(cardInfoResult.getAdcdName()); |
| | | isReadSuccess = true; |
| | | TipUtil.show(ManagerReadActivity.this, "读卡成功,下一步将写卡!", () -> { |
| | | Intent intent = new Intent(ManagerReadActivity.this, NFCWreatActivity.class); |
| | | TipUtil.show(ManagerReadActivityQHOline.this, "读卡成功,下一步将写卡!", () -> { |
| | | Intent intent = new Intent(ManagerReadActivityQHOline.this, NFCWreatActivityQHOline.class); |
| | | intent.putExtra("iccardInfoId", cardInfoResult.getIccardInfoId()); |
| | | intent.putExtra("replaceType", BaseCommon.REPLACE_HAS_CARD); |
| | | intent.putExtra("userCardBean", userCardBean); |
| | | startActivity(intent); |
| | | ManagerReadActivity.this.finish(); |
| | | ManagerReadActivityQHOline.this.finish(); |
| | | }); |
| | | } else { |
| | | TipUtil.show(ManagerReadActivity.this, "未查询到该卡信息,请检查。"); |
| | | TipUtil.show(ManagerReadActivityQHOline.this, "未查询到该卡信息,请检查。"); |
| | | } |
| | | } |
| | | } |