From 3ecb13ed5456ad33762cb41c8e6ddad07a61e1ce Mon Sep 17 00:00:00 2001 From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674> Date: 星期三, 19 七月 2017 16:54:59 +0800 Subject: [PATCH] --- VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/RegisterMng.java | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/RegisterMng.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/RegisterMng.java index 2973b37..de57fb1 100644 --- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/RegisterMng.java +++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/RegisterMng.java @@ -3,6 +3,8 @@ import android.widget.Toast; import cn.com.basic.face.base.BaseApplication; +import cn.com.basic.face.discern.common.CommonVariables; +import cn.com.basic.face.fragment.AttenderRegisterFragment; import cn.com.basic.face.fragment.VisitorRegisterFragment; import cn.com.basic.face.util.AppApi; @@ -108,15 +110,21 @@ x.http().post(params, new BaseCommonCallBack() { @Override public void success() { - if (!VisitorRegisterFragment.getInstance().isVisible()) { + if (!VisitorRegisterFragment.getInstance().visitorRegisterFragmentVisible + && !AttenderRegisterFragment.getInstance().attenderRegisterFragmentVisible + ) { return; } - List<Double> percents = resultBean.getListBeanOfType(Double.class); + List<Double> percents = resultBean.getList(Double.class); if (percents != null && percents.size() > 0) { double percent = percents.get(0); if (percent >= 70) { Toast.makeText(BaseApplication.getInstance(),"璁よ瘉閫氳繃", Toast.LENGTH_SHORT).show(); - VisitorRegisterFragment.getInstance().fillFormWithIdCard(idCard); + if (CommonVariables.Register.VISITOR_REGISTER_SELECTED) { + VisitorRegisterFragment.getInstance().fillFormWithIdCard(idCard); + } else { + AttenderRegisterFragment.getInstance().fillFormWithIdCard(idCard); + } return; } System.out.println("percent="+percent); @@ -180,7 +188,7 @@ @Override public void success() { Toast.makeText(BaseApplication.getInstance(),"娣诲姞鎴愬姛", Toast.LENGTH_SHORT).show(); - VisitorRegisterFragment.getInstance().resetForm(); + AttenderRegisterFragment.getInstance().resetForm(); } }); }catch(Exception e) { -- Gitblit v1.8.0