| | |
| | | |
| | | private SpannableString getErrPhoneText(){ |
| | | String phone = MApplication.getConfigBean().getLinkPhone(); |
| | | if(phone==null){ |
| | | String text = "如有问题请联系管理员"; |
| | | SpannableString styledText = new SpannableString(text); |
| | | styledText.setSpan(new TextAppearanceSpan(this, R.style.style_tip3), 0, text.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | return styledText; |
| | | } |
| | | String text = "如有问题请联系管理员"+phone; |
| | | SpannableString styledText = new SpannableString(text); |
| | | styledText.setSpan(new TextAppearanceSpan(this, R.style.style_tip3), 0, text.length()-phone.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | |
| | | //取-管理员人脸验证 |
| | | getDB().tvTitle.setText("管理员身份验证"); |
| | | getDB().clCard.setVisibility(View.GONE); |
| | | getDB().clZw.setVisibility(View.GONE); |
| | | getDB().clFace.setVisibility(View.VISIBLE); |
| | | setFaceModel(0); |
| | | break; |
| | | case 10: |
| | | //取-管理员指纹验证 |
| | | getDB().tvTitle.setText("管理员身份验证"); |
| | | getDB().clCard.setVisibility(View.GONE); |
| | | getDB().clFace.setVisibility(View.GONE); |
| | | getDB().clZw.setVisibility(View.VISIBLE); |
| | | setFaceModel(2); |
| | | break; |
| | | case 1: |
| | | //取-管理员刷卡验证 |
| | | getDB().etEwm.setText(""); |
| | | getDB().tvTitle.setText("管理员身份验证"); |
| | | getDB().clFace.setVisibility(View.GONE); |
| | | getDB().clZw.setVisibility(View.GONE); |
| | | getDB().clCard.setVisibility(View.VISIBLE); |
| | | setFaceModel(2); |
| | | break; |
| | |
| | | //取-司机验证方式选择页 |
| | | getDB().tvTitle.setText("司机身份验证"); |
| | | getDB().clFace.setVisibility(View.GONE); |
| | | getDB().clZw.setVisibility(View.GONE); |
| | | getDB().clCard.setVisibility(View.GONE); |
| | | getDB().clTip1.setVisibility(View.GONE); |
| | | getDB().clSjXuan.setVisibility(View.VISIBLE); |
| | |
| | | //取-司机人脸验证 |
| | | getDB().tvTitle.setText("司机身份验证"); |
| | | getDB().clCard.setVisibility(View.GONE); |
| | | getDB().clZw.setVisibility(View.GONE); |
| | | getDB().clSjXuan.setVisibility(View.GONE); |
| | | getDB().clFace.setVisibility(View.VISIBLE); |
| | | setFaceModel(1); |
| | | break; |
| | | case 11: |
| | | //取-司机指纹验证 |
| | | getDB().tvTitle.setText("司机身份验证"); |
| | | getDB().clCard.setVisibility(View.GONE); |
| | | getDB().clFace.setVisibility(View.GONE); |
| | | getDB().clSjXuan.setVisibility(View.GONE); |
| | | getDB().clZw.setVisibility(View.VISIBLE); |
| | | setFaceModel(2); |
| | | break; |
| | | case 3: |
| | | //取-司机刷卡验证 |
| | |
| | | getDB().etEwm.requestFocus(); |
| | | getDB().tvTitle.setText("司机身份验证"); |
| | | getDB().clFace.setVisibility(View.GONE); |
| | | getDB().clZw.setVisibility(View.GONE); |
| | | getDB().clSjXuan.setVisibility(View.GONE); |
| | | getDB().clCard.setVisibility(View.VISIBLE); |
| | | setFaceModel(2); |
| | |
| | | getDB().tvTitle.setText("酒精检测"); |
| | | getDB().clFace.setVisibility(View.GONE); |
| | | getDB().clCard.setVisibility(View.GONE); |
| | | getDB().clZw.setVisibility(View.GONE); |
| | | getDB().clSjXuan.setVisibility(View.GONE); |
| | | getDB().clTip1.setVisibility(View.GONE); |
| | | getDB().clJiu.setVisibility(View.VISIBLE); |
| | |
| | | //还-司机人脸验证 |
| | | getDB().tvTitle.setText("司机身份验证"); |
| | | getDB().clCard.setVisibility(View.GONE); |
| | | getDB().clZw.setVisibility(View.GONE); |
| | | getDB().clFace.setVisibility(View.VISIBLE); |
| | | setFaceModel(1); |
| | | break; |
| | | case 12: |
| | | //还-司机人脸验证 |
| | | getDB().tvTitle.setText("司机身份验证"); |
| | | getDB().clCard.setVisibility(View.GONE); |
| | | getDB().clFace.setVisibility(View.GONE); |
| | | getDB().clZw.setVisibility(View.VISIBLE); |
| | | setFaceModel(2); |
| | | break; |
| | | case 8: |
| | | //还-司机刷卡验证 |
| | |
| | | protected void doRegister(int type, ActionEventData data) { |
| | | switch (type){ |
| | | case 1: |
| | | //切换到刷卡 |
| | | if(flag==0){ |
| | | if(status==0){ |
| | | //切换到管理员刷卡 |
| | | if(status==0||status==10){ |
| | | statusFsm(1); |
| | | }else if(status==2){ |
| | | }else if(status==2||status==11){ |
| | | statusFsm(3); |
| | | } |
| | | }else { |
| | | //还-司机刷卡验证 |
| | | statusFsm(8); |
| | | } |
| | | break; |
| | | case 9: |
| | | //管理员指纹验证 |
| | | statusFsm(10); |
| | | break; |
| | | case 10: |
| | | //司机指纹验证 |
| | | statusFsm(11); |
| | | break; |
| | | case 11: |
| | | //刷卡-->指纹验证 |
| | | if(flag==0){ |
| | | if(status==1){ |
| | | statusFsm(10); |
| | | }else { |
| | | statusFsm(11); |
| | | } |
| | | }else { |
| | | //还-司机指纹 |
| | | statusFsm(12); |
| | | } |
| | | break; |
| | | case 2: |
| | |
| | | case 4: |
| | | //切换到人脸 |
| | | if(flag==0){ |
| | | if(status==1){ |
| | | if(status==1||status==10){ |
| | | statusFsm(0); |
| | | }else if(status==3){ |
| | | }else if(status==3||status==11){ |
| | | statusFsm(2); |
| | | } |
| | | }else { |
| | |
| | | //司机ic卡成功 |
| | | if(flag==0) { |
| | | //取 |
| | | if(MApplication.getConfigBean()!=null&&MApplication.getConfigBean().getAlcoholStatus()==1) { |
| | | //非酒精检测 |
| | | startActivity(KeyCabinetActivity.class); |
| | | finish(); |
| | | }else { |
| | | //酒精检测 |
| | | statusFsm(4); |
| | | } |
| | | }else { |
| | | //还 |
| | | startActivity(KeyCabinetActivity.class); |
| | |
| | | getDB().message.requestLayout(); |
| | | EventBus.getDefault().post(new HttpEvent("ic卡+++++++"+data.getData().get("type").toString())); |
| | | break; |
| | | |
| | | default: |
| | | break; |
| | | } |
| | |
| | | if(new BigDecimal(MApplication.getConfigBean().getCabinetConfigDataVO().getConcentration()) |
| | | .compareTo(resultEvent.getConcentration())>=0){ |
| | | //酒精通过 |
| | | getVM().alcoholTestAlarm(resultEvent.getConcentration().toString()); |
| | | getDB().clJiujinOk.setVisibility(View.VISIBLE); |
| | | handler.sendEmptyMessageDelayed(4,1000); |
| | | }else { |
| | |
| | | MApplication.getLoginBean().setMemberId(Integer.parseInt(user.getUserId())); |
| | | MApplication.getLoginBean().setAuthType(0); |
| | | //handler.sendEmptyMessageDelayed(8,0); |
| | | //Toast.makeText(mContext, "是否酒精检测:"+MApplication.getConfigBean().getAlcoholStatus(), Toast.LENGTH_SHORT).show(); |
| | | if(MApplication.getConfigBean()!=null&&MApplication.getConfigBean().getAlcoholStatus()==1) { |
| | | //非酒精检测 |
| | | startActivity(KeyCabinetActivity.class); |
| | | finish(); |
| | | }else { |
| | | //酒精检测 |
| | | EventBus.getDefault().post(new FaceStatusChangeEvent(4)); |
| | | } |
| | | }else if(status==7){ |
| | | //还-司机 |
| | | MApplication.getLoginBean().setMemberId(Integer.parseInt(user.getUserId())); |