From 22881a4d6409c7d17867e1d40bf81a13578208df Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 31 十月 2025 15:16:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/wuhuyancao' into wuhuyancao

---
 keyCabinet-android/lib_coremodel/src/main/res/values/colors.xml                                         |    1 
 keyCabinet-android/app/src/main/res/layout/manage_cabinet_rcv_item.xml                                  |   12 
 keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/bean/event/ActionEventData.java |    7 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/event/OpenGridEvent.java                     |   13 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/adapter/FaceUserAdapter.java         |    2 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/KeyCabinetActivity.java        |  113 +++++-
 keyCabinet-android/app/src/main/res/layout/face_activity.xml                                            |   57 ++-
 keyCabinet-android/app/src/main/res/layout/manage_login_activity.xml                                    |    4 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/http/param/AlcoholTestAlarmParam.java        |   10 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/update/UpdateUtil.java                 |   21 +
 keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/base/BaseViewModel.java         |    4 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/CrashHandler.java                      |   37 +
 keyCabinet-android/app/src/main/res/layout/layout_download.xml                                          |    2 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/FaceActivity.java                    |   29 +
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/face/FaceSDKManager.java               |    2 
 keyCabinet-android/app/build.gradle                                                                     |    4 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/bean/FaceUserBean.java                       |    2 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/FaceVM.java                          |    9 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/main/MainActivity.java                    |  394 +++++++++++++++-------
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ManageCabinetVM.java           |    2 
 keyCabinet-android/datalibrary/src/main/java/com/example/datalibrary/manager/FaceSDKManager.java        |    9 
 keyCabinet-android/app/src/main/res/layout/main_activity.xml                                            |   30 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/update/UpdateDialog.java               |    2 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/main/MainVM.java                          |   14 
 keyCabinet-android/app/src/main/res/layout/ui_update_dialog.xml                                         |    2 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ChangeUrlActivity.java         |    6 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ManageCabinetActivity.java     |  117 ++++++
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/AddFaceVM.java                       |    4 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/http/Apis.java                               |    2 
 keyCabinet-android/app/src/main/res/values/strings.xml                                                  |    4 
 keyCabinet-android/app/src/main/AndroidManifest.xml                                                     |   10 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/event/OpenErrEvent.java                      |   17 +
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ManageLoginActivity.java       |   15 
 keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/util/SpUtil.java                |   10 
 keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/http/param/GetMemberIdByCodeParam.java       |   14 
 35 files changed, 707 insertions(+), 274 deletions(-)

diff --git a/keyCabinet-android/app/build.gradle b/keyCabinet-android/app/build.gradle
index 903c1df..ff276e1 100644
--- a/keyCabinet-android/app/build.gradle
+++ b/keyCabinet-android/app/build.gradle
@@ -10,8 +10,8 @@
         applicationId "com.doumee.keyCabinet"
         minSdkVersion build_versions.min_sdk
         targetSdkVersion build_versions.target_sdk
-        versionCode 1
-        versionName "1.0.0"
+        versionCode 2
+        versionName "1.0.1"
 
         //鏀寔vectorDrawables鐭㈤噺鍥�
         vectorDrawables.useSupportLibrary = true
diff --git a/keyCabinet-android/app/src/main/AndroidManifest.xml b/keyCabinet-android/app/src/main/AndroidManifest.xml
index 31877b1..9b7b0e1 100644
--- a/keyCabinet-android/app/src/main/AndroidManifest.xml
+++ b/keyCabinet-android/app/src/main/AndroidManifest.xml
@@ -76,19 +76,19 @@
                 android:resource="@xml/provider_paths" />
         </provider>
 
-        <receiver
+        <!--<receiver
             android:name="com.doumee.keyCabinet.ui.service.BootCompleteReceiver"
             android:enabled="true"
             android:exported="true">
 
-            <!-- 鎺ユ敹鍚姩瀹屾垚鐨勫箍鎾� -->
+            &lt;!&ndash; 鎺ユ敹鍚姩瀹屾垚鐨勫箍鎾� &ndash;&gt;
             <intent-filter android:priority="1000">
                 <action android:name="android.intent.action.BOOT_COMPLETED" />
             </intent-filter>
-        </receiver>
+        </receiver>-->
 
-        <service android:name="com.doumee.keyCabinet.ui.service.HeartbeatService" />
-        <service android:name="com.doumee.keyCabinet.ui.service.FaceUpdateService" />
+        <!--<service android:name="com.doumee.keyCabinet.ui.service.HeartbeatService" />
+        <service android:name="com.doumee.keyCabinet.ui.service.FaceUpdateService" />-->
 
         <uses-library
             android:name="org.apache.http.legacy"
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/bean/FaceUserBean.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/bean/FaceUserBean.java
index f271c05..b73d5bc 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/bean/FaceUserBean.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/bean/FaceUserBean.java
@@ -8,7 +8,7 @@
     private Integer memberId;
     private String memberName;
 
-    //0:绠$悊鍛橈紝1锛氱敤鎴�
+    //0:绠$悊鍛橈紝1锛氬徃鏈�
     private String groupId;
 
     private boolean checked;
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/event/OpenErrEvent.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/event/OpenErrEvent.java
new file mode 100644
index 0000000..3f00a57
--- /dev/null
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/event/OpenErrEvent.java
@@ -0,0 +1,17 @@
+package com.doumee.keyCabinet.event;
+
+public class OpenErrEvent {
+    private String key;
+
+    public OpenErrEvent(String key) {
+        this.key = key;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+}
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/event/OpenGridEvent.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/event/OpenGridEvent.java
index 2996037..5c140c5 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/event/OpenGridEvent.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/event/OpenGridEvent.java
@@ -5,12 +5,25 @@
     private String channelCode;
     //鏉垮彿
     private String boardCode;
+    private String key;
 
     public OpenGridEvent(String channelCode, String boardCode) {
         this.channelCode = channelCode;
         this.boardCode = boardCode;
     }
 
+    public OpenGridEvent(String key) {
+        this.key = key;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+
     public String getChannelCode() {
         return channelCode;
     }
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/http/Apis.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/http/Apis.java
index 423637c..cecbf1b 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/http/Apis.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/http/Apis.java
@@ -61,7 +61,7 @@
      * 鑾峰彇IC鍗$敤鎴蜂富閿� - 鍙告満
      */
     @POST("visitsAdmin/cloudService/web/cabinet/getMemberIdByCode")
-    Observable<BaseResponse<Integer>> getMemberIdByCode(@Query("code")String code);
+    Observable<BaseResponse<Integer>> getMemberIdByCode(@Body RequestBody requestBody);
 
     /**
      * 閰掔簿妫�娴嬪憡璀�
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/http/param/AlcoholTestAlarmParam.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/http/param/AlcoholTestAlarmParam.java
index f39bb62..d263064 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/http/param/AlcoholTestAlarmParam.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/http/param/AlcoholTestAlarmParam.java
@@ -1,6 +1,8 @@
 package com.doumee.keyCabinet.http.param;
 
 public class AlcoholTestAlarmParam {
+    //鏌滃瓙id
+    private Integer cabinetId;
     //浼氬憳id
     private Integer memberId;
     private String alcoholNum;
@@ -20,4 +22,12 @@
     public void setAlcoholNum(String alcoholNum) {
         this.alcoholNum = alcoholNum;
     }
+
+    public Integer getCabinetId() {
+        return cabinetId;
+    }
+
+    public void setCabinetId(Integer cabinetId) {
+        this.cabinetId = cabinetId;
+    }
 }
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/http/param/GetMemberIdByCodeParam.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/http/param/GetMemberIdByCodeParam.java
index 67fbdf9..244247e 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/http/param/GetMemberIdByCodeParam.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/http/param/GetMemberIdByCodeParam.java
@@ -1,11 +1,9 @@
 package com.doumee.keyCabinet.http.param;
 
 public class GetMemberIdByCodeParam {
+    //鍏宠仈浜哄憳绫诲瀷锛�0=鍙告満锛�1=鏍¢獙浜哄憳
+    private Integer userType;
     private String code;
-
-    public GetMemberIdByCodeParam(String code) {
-        this.code = code;
-    }
 
     public String getCode() {
         return code;
@@ -14,4 +12,12 @@
     public void setCode(String code) {
         this.code = code;
     }
+
+    public Integer getUserType() {
+        return userType;
+    }
+
+    public void setUserType(Integer userType) {
+        this.userType = userType;
+    }
 }
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/AddFaceVM.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/AddFaceVM.java
index b46bdf9..1ac2b4b 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/AddFaceVM.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/AddFaceVM.java
@@ -51,13 +51,13 @@
                                 List<FaceUserBean> datas = new ArrayList<>();
                                 if(faceBean!=null&&faceBean.getAutoFaceList()!=null){
                                     for(FaceUserBean bean:faceBean.getAutoFaceList()){
-                                        bean.setGroupId("1");
+                                        bean.setGroupId("0");
                                     }
                                     datas.addAll(faceBean.getAutoFaceList());
                                 }
                                 if(faceBean!=null&&faceBean.getDriverFaceList()!=null){
                                     for(FaceUserBean bean:faceBean.getDriverFaceList()){
-                                        bean.setGroupId("0");
+                                        bean.setGroupId("1");
                                     }
                                     datas.addAll(faceBean.getDriverFaceList());
                                 }
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/FaceActivity.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/FaceActivity.java
index e935ae4..c4c3570 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/FaceActivity.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/FaceActivity.java
@@ -27,6 +27,7 @@
 import com.doumee.keyCabinet.base.MyBaseActivity;
 import com.doumee.keyCabinet.databinding.FaceActivityBinding;
 import com.doumee.keyCabinet.event.FaceStatusChangeEvent;
+import com.doumee.keyCabinet.event.HttpEvent;
 import com.doumee.keyCabinet.event.JiujinBeginEvent;
 import com.doumee.keyCabinet.event.JiujinResultEvent;
 import com.doumee.keyCabinet.event.TimeClockEvent;
@@ -130,6 +131,7 @@
     private void statusFsm(int toStatus){
         status = toStatus;
         isToChose = false;
+        getDB().etEwm.requestFocus();
         switch (toStatus){
             case 0:
                 //鍙�-绠$悊鍛樹汉鑴搁獙璇�
@@ -141,7 +143,6 @@
             case 1:
                 //鍙�-绠$悊鍛樺埛鍗¢獙璇�
                 getDB().etEwm.setText("");
-                getDB().etEwm.requestFocus();
                 getDB().tvTitle.setText("绠$悊鍛樿韩浠介獙璇�");
                 getDB().clFace.setVisibility(View.GONE);
                 getDB().clCard.setVisibility(View.VISIBLE);
@@ -198,7 +199,7 @@
                 //鍙�-鍙告満閰掔簿妫�娴嬪け璐�
                 //Toast.makeText(mContext, "鍙告満閰掔簿妫�娴嬪け璐�", Toast.LENGTH_SHORT).show();
                 getDB().clJiu.setVisibility(View.GONE);
-                getDB().tvJg1.setText("閰掔簿妫�娴嬪紓甯革紝璇烽噸鏂版娴�");
+                getDB().tvJg1.setText("閰掔簿妫�娴嬫搷浣滀笉褰擄紝璇烽噸鏂版娴�");
                 getDB().clTip1.setVisibility(View.VISIBLE);
                 break;
             case 7:
@@ -297,6 +298,14 @@
                     finish();
                 }
                 break;
+            case 8:
+                getDB().message.setText(data.getData().get("obj").toString());
+                getDB().message.setVisibility(View.VISIBLE);
+                handler.sendEmptyMessageDelayed(6,2000);
+                getDB().message.invalidate();
+                getDB().message.requestLayout();
+                EventBus.getDefault().post(new HttpEvent("ic鍗�+++++++"+data.getData().get("type").toString()));
+                break;
             default:
                 break;
         }
@@ -328,7 +337,7 @@
         //ic鍗¤鍙�
         getDB().etEwm.requestFocus();
         getDB().etEwm.setFocusable(true);
-        getDB().etEwm.setShowSoftInputOnFocus(true);
+        getDB().etEwm.setShowSoftInputOnFocus(false);
         hideSoftKeyboard(getDB().etEwm);
         getDB().etEwm.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
             @Override
@@ -336,6 +345,7 @@
                 hideSoftKeyboard(getDB().etEwm);
             }
         });
+
         getDB().etEwm.addTextChangedListener(new TextWatcher() {
             @Override
             public void beforeTextChanged(CharSequence s, int start, int count, int after) {
@@ -354,6 +364,8 @@
                     return;
                 }
                 if(status!=1&&status!=3&&status!=8){
+                    getDB().etEwm.setText("");
+                    getDB().etEwm.requestFocus();
                     return;
                 }
                 if(handler.hasMessages(5)){
@@ -498,6 +510,8 @@
                         getVM().alcoholTestAlarm(resultEvent.getConcentration().toString());
                         //Toast.makeText(mContext, "閰掔簿妫�娴嬭秴鏍�", Toast.LENGTH_SHORT).show();
                         statusFsm(9);
+                        //鍐嶆娴嬶紝灏嗗0闊冲叧闂�
+                        EventBus.getDefault().post(new JiujinBeginEvent());
                     }
                     break;
                 case 4:
@@ -515,6 +529,9 @@
                     }
                     getDB().etEwm.setText("");
                     getDB().etEwm.requestFocus();
+                    break;
+                case 6:
+                    getDB().message.setVisibility(View.GONE);
                     break;
                 default:
                     break;
@@ -593,6 +610,7 @@
                     User user = livenessModel.getUser();
                     if (user == null) {
                         mUser = null;
+                        //EventBus.getDefault().post(new HttpEvent("浜鸿劯鐢ㄦ埛妫�娴嬪け璐�------->"+(status==0?"绠$悊鍛樹汉鑴告娴嬶細":"鍙告満浜鸿劯妫�娴嬶細")));
                         if (isCompareCheck) {
                             /*getDB().clFail.setVisibility(View.VISIBLE);
                             getDB().tv4.setText(getString(R.string.face_tip2));
@@ -601,6 +619,8 @@
 
                     } else {
                         mUser = user;
+                        /*EventBus.getDefault().post(new HttpEvent("浜鸿劯鐢ㄦ埛------->"+(status==0?"绠$悊鍛樹汉鑴告娴嬶細":"鍙告満浜鸿劯妫�娴嬶細")
+                                +(user.getGroupId().equals("0")?"绠$悊鍛�":"鍙告満")));*/
                         if (isCompareCheck) {
                             getDB().clFail.setVisibility(View.GONE);
                             if(handler.hasMessages(0)) {
@@ -665,6 +685,9 @@
     @Subscribe(threadMode = ThreadMode.MAIN)
     public void JiujinResultEvent(JiujinResultEvent e){
         if(!isFinishing()){
+            if(status!=4&&status!=6){
+                return;
+            }
             //Toast.makeText(mContext, "閰掔簿妫�娴嬭繑鍥烇細"+e.isOk(), Toast.LENGTH_SHORT).show();
             if(!e.isOk()){
                 getDB().clJiujinProgress.setVisibility(View.GONE);
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/FaceVM.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/FaceVM.java
index db88e0b..e1a695a 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/FaceVM.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/FaceVM.java
@@ -49,8 +49,10 @@
      * @param type //0锛氱鐞嗗憳锛�1锛氬徃鏈�
      */
     public void getMemberIdByCode(String code,String type){
-        //showLoading(true);
-        getRetrofitService(Apis.class).getMemberIdByCode(code)
+        GetMemberIdByCodeParam param = new GetMemberIdByCodeParam();
+        param.setUserType("0".equals(type)?1:0);
+        param.setCode(code);
+        getRetrofitService(Apis.class).getMemberIdByCode(ParamsUtil.encodeRequestBody(param))
                 .compose(RxUtils.schedulersTransformer())
                 .subscribe(new SimpleObserver<BaseResponse<Integer>>(rxJavaGcManager) {
                     @Override
@@ -70,7 +72,7 @@
                                 }
                             }
                         }else {
-                            //toast(response.getMessage());
+                            doAction(8,response.getMessage());
                         }
                     }
 
@@ -92,6 +94,7 @@
      */
     public void alcoholTestAlarm(String data){
         AlcoholTestAlarmParam param = new AlcoholTestAlarmParam();
+        param.setCabinetId(MApplication.getConfigBean().getId());
         param.setMemberId(MApplication.getLoginBean().getMemberId());
         param.setAlcoholNum(data);
         showLoading(true);
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/adapter/FaceUserAdapter.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/adapter/FaceUserAdapter.java
index c5ce604..057eab0 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/adapter/FaceUserAdapter.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/face/adapter/FaceUserAdapter.java
@@ -69,7 +69,7 @@
         // 娣诲姞鏁版嵁
         holder.text_user_ctime.setText(mList.get(position).getId()+"");
         holder.textUserName.setText(mList.get(position).getUserName());
-        holder.textSf.setText(mList.get(position).getGroupId().equals("0")?
+        holder.textSf.setText(mList.get(position).getGroupId().equals("1")?
                 MApplication.mContext.getString(R.string.face_hy) :MApplication.mContext.getString(R.string.face_xy));
         FrescoUtils.displayImageFresco(mList.get(position).getImageName(),holder.circleUserHead);
     }
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ChangeUrlActivity.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ChangeUrlActivity.java
index 91a9912..ad4c731 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ChangeUrlActivity.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ChangeUrlActivity.java
@@ -45,7 +45,7 @@
     @Override
     public void initData(@Nullable Bundle savedInstanceState) {
         getDB().etUrl.setText(SpUtil.getString("base_url", Apis.HTTP));
-        getDB().etTime.setText(SpUtil.getInt("loop_time",30)+"");
+        getDB().etTime.setText(SpUtil.getInt("loop_time",60)+"");
     }
 
     @Override
@@ -57,7 +57,9 @@
                     ToastView.show(MApplication.mContext,"鎺ュ彛鍦板潃涓嶈兘涓虹┖");
                     return;
                 }
-                if(!url.startsWith("http://")||!url.startsWith("https://")||!url.endsWith("/")){
+                if((url.startsWith("http://")||url.startsWith("https://"))&&url.endsWith("/")){
+                    //姝g‘
+                }else {
                     ToastView.show(MApplication.mContext,"鎺ュ彛鍦板潃閿欒");
                     return;
                 }
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/KeyCabinetActivity.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/KeyCabinetActivity.java
index b9a76ca..2377446 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/KeyCabinetActivity.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/KeyCabinetActivity.java
@@ -25,6 +25,7 @@
 import com.doumee.keyCabinet.event.CloseGridOneResultEvent;
 import com.doumee.keyCabinet.event.KeyResultEvent;
 import com.doumee.keyCabinet.event.GetKeyStatusEvent;
+import com.doumee.keyCabinet.event.OpenErrEvent;
 import com.doumee.keyCabinet.event.OpenGridEvent;
 import com.doumee.keyCabinet.event.OpenGridListEvent;
 import com.doumee.keyCabinet.event.OpenGridOneResultEvent;
@@ -58,6 +59,7 @@
     private int status;
 
     private int ysDownCount = 10;
+    private boolean isChose;
 
     @Override
     public int getLayoutId() {
@@ -73,6 +75,9 @@
         adapter = new CabinetRcvAdapter(this, R.layout.cabinet_rcv_item, new CabinetRcvAdapter.OnItemClick() {
             @Override
             public void onItemClick(KeyCabinetBean item) {
+                if(isChose){
+                    return;
+                }
                 selectBean = item;
             }
         });
@@ -151,6 +156,10 @@
                     Toast.makeText(mContext, "璇烽�夋嫨鏌滈棬", Toast.LENGTH_SHORT).show();
                     return;
                 }
+                if(isChose){
+                    return;
+                }
+                isChose = true;
                 if(isOpening){
                     return;
                 }
@@ -160,7 +169,7 @@
                 downTime = 60;
                 break;
             case 2:
-                getDB().clTip1.setVisibility(View.GONE);
+                //getDB().clTip1.setVisibility(View.GONE);
                 if(status==0) {
                     //閲嶆柊寮�闂�
                     openTime = StringUtil.DateToStr(new Date());
@@ -183,7 +192,7 @@
                 isOpening = false;
                 //寮�鍚垚鍔�
                 status=1;
-                if("0".equals(flag)) {
+                if(flag==0) {
                     getDB().imgTip2.setImageResource(R.mipmap.ic_notclose_key);
                     getDB().tvTip22.setText("璇烽鍙栭挜鍖欏悗鍏抽棴鏌滈棬");
                 }else {
@@ -193,7 +202,6 @@
                 getDB().tvTip21.setText(getTipText(selectBean.getCode(),"鏌滈棬鎵撳紑鎴愬姛"), TextView.BufferType.SPANNABLE);
                 getDB().clTip1.setVisibility(View.GONE);
                 getDB().clTip2.setVisibility(View.VISIBLE);
-                EventBus.getDefault().post(new GetKeyStatusEvent());
                 ysDownCount = 8;
                 break;
             case 7:
@@ -291,6 +299,8 @@
     @Override
     protected void onDestroy() {
         super.onDestroy();
+        handler.removeCallbacksAndMessages(null);
+        handler = null;
     }
 
     private String openTime = "";
@@ -300,6 +310,10 @@
             if(selectBean!=null){
                 String key = SportUtils.intToHex(Integer.parseInt(selectBean.getBoardCode()))
                         +SportUtils.intToHex(Integer.parseInt(selectBean.getChannelCode()));
+                //寮�闂ㄦ垚鍔燂紝绉婚櫎寮�闂�
+                if(handler.hasMessages(1)){
+                    handler.removeMessages(1);
+                }
                 if(key.equals(e.getKey())) {
                     if (e.getIsOpen()==1) {
                         //寮�闂ㄦ垚鍔�
@@ -307,8 +321,7 @@
                             return;
                         }
                         isOpened = true;
-                        Toast.makeText(mContext, "鎿嶄綔4", Toast.LENGTH_LONG).show();
-                        doRegister(4, null);
+                        getVM().doAction(4);
                     } else {
                         //澶辫触
                         //濡傛灉鏄挜鍖欎笉瀵圭户缁紑闂�
@@ -321,25 +334,35 @@
                             }
                             if (!gridDo.getCurKeyCode().equals(selectBean.getKeyCode())) {
                                 //閽ュ寵涓嶅尮閰�
-                                doRegister(10,null);
+                                getVM().doAction(10,null);
                                 EventBus.getDefault().post(new OpenGridEvent(selectBean.getChannelCode(), selectBean.getBoardCode()));
                                 return;
                             }
                         }
-                        doRegister(3, null);
+                        getVM().doAction(3);
                     }
                 }
             }
         }
     }
 
+    private Long keyTime;
     private boolean isOpened = false;
     @Subscribe(threadMode= ThreadMode.MAIN)
     public void CloseGridOneResultEvent(CloseGridOneResultEvent e){
         if(!isFinishing()){
+            //鍏抽棬鎴愬姛锛岀Щ闄ゅ紑闂�
+            if(handler.hasMessages(1)){
+                handler.removeMessages(1);
+            }
             //鑾峰彇鍗″彿
             EventBus.getDefault().post(new GetKeyStatusEvent());
-            if(selectBean!=null){
+            keyTime = new Date().getTime()+500;
+            if(handler.hasMessages(0)){
+                handler.removeMessages(0);
+            }
+            handler.sendEmptyMessageDelayed(0,1200);
+            /*if(selectBean!=null){
                 String key = SportUtils.intToHex(Integer.parseInt(selectBean.getBoardCode()))
                         +SportUtils.intToHex(Integer.parseInt(selectBean.getChannelCode()));
                 if(key.equals(e.getKey())) {
@@ -361,18 +384,17 @@
                                     if (gridDo.getCurKeyCode().equals(selectBean.getKeyCode())) {
                                         //棰嗗彇澶辫触
                                         isOpened = false;
-                                        doRegister(6, null);
+                                        getVM().doAction(6);
                                         getVM().closeGrid(gridDo);
                                     }else {
                                         //閽ュ寵涓嶅尮閰�
-                                        //Toast.makeText(mContext, "鎿嶄綔10", Toast.LENGTH_LONG).show();
-                                        doRegister(10,null);
+                                        getVM().doAction(10,null);
                                         EventBus.getDefault().post(new OpenGridEvent(selectBean.getChannelCode(), selectBean.getBoardCode()));
                                     }
                                 } else {
                                     //閽ュ寵鎷胯蛋浜�
                                     isOpened = false;
-                                    doRegister(5, null);
+                                    getVM().doAction(5);
                                     getVM().closeGrid(gridDo);
                                 }
                             }else {
@@ -398,17 +420,17 @@
                                     if (gridDo.getCurKeyCode().equals(selectBean.getKeyCode())) {
                                         //鐩稿悓褰掕繕鎴愬姛
                                         isOpened = false;
-                                        doRegister(8, null);
+                                        getVM().doAction(8);
                                         getVM().closeGrid(gridDo);
                                     }else {
                                         //閽ュ寵涓嶅尮閰�
-                                        doRegister(10,null);
+                                        getVM().doAction(10,null);
                                         EventBus.getDefault().post(new OpenGridEvent(selectBean.getChannelCode(), selectBean.getBoardCode()));
                                     }
                                 } else {
                                     //閽ュ寵鏈綊杩�
                                     isOpened = false;
-                                    doRegister(9, null);
+                                    getVM().doAction(9);
                                     getVM().closeGrid(gridDo);
                                 }
                             }else {
@@ -419,7 +441,20 @@
                         }
                     }
                 }
+            }*/
+        }
+    }
+
+    @Subscribe(threadMode= ThreadMode.MAIN)
+    public void OpenErrEvent(OpenErrEvent e){
+        //寮�闂ㄥけ璐�
+        if(!isFinishing()){
+            //寮�闂�
+            if(handler.hasMessages(1)){
+                handler.removeMessages(1);
             }
+            EventBus.getDefault().post(new OpenGridEvent(selectBean.getChannelCode(), selectBean.getBoardCode()));
+            handler.sendEmptyMessageDelayed(1,1000);
         }
     }
 
@@ -427,6 +462,17 @@
     public void KeyResultEvent(KeyResultEvent e){
         if(!isFinishing()){
             if(selectBean!=null){
+                //鏍¢獙鏃堕棿
+                if(keyTime==null){
+                    return;
+                }
+                if(keyTime!=null&&keyTime>System.currentTimeMillis()){
+                    //鏍¢獙杩斿洖鏃堕棿<鍛戒护鏃堕棿
+                    return;
+                }
+                if(handler.hasMessages(0)){
+                    handler.removeMessages(0);
+                }
                 String key = SportUtils.intToHex(Integer.parseInt(selectBean.getBoardCode()))
                         +SportUtils.intToHex(Integer.parseInt(selectBean.getChannelCode()));
                 if(flag==0) {
@@ -440,25 +486,24 @@
                                 if (gridDo.getCurKeyCode().equals(selectBean.getKeyCode())) {
                                     //棰嗗彇澶辫触
                                     isOpened = false;
-                                    doRegister(6, null);
+                                    getVM().doAction(6);
                                     getVM().closeGrid(gridDo);
                                 }else {
                                     //閽ュ寵涓嶅尮閰�
-                                    //Toast.makeText(mContext, "鎿嶄綔10", Toast.LENGTH_LONG).show();
-                                    doRegister(10,null);
+                                    getVM().doAction(10);
                                     EventBus.getDefault().post(new OpenGridEvent(selectBean.getChannelCode(), selectBean.getBoardCode()));
                                 }
                             } else {
                                 //閽ュ寵鎷胯蛋浜�
                                 isOpened = false;
-                                doRegister(5, null);
+                                getVM().doAction(5);
                                 getVM().closeGrid(gridDo);
                             }
                         }else {
                             //娌″叧闂�
                             if(TextUtils.isEmpty(gridDo.getCurKeyCode())){
                                 //绌轰簡
-                                doRegister(7,null);
+                                getVM().doAction(7);
                             }
                         }
                     }else {
@@ -474,24 +519,24 @@
                                 if (gridDo.getCurKeyCode().equals(selectBean.getKeyCode())) {
                                     //鐩稿悓褰掕繕鎴愬姛
                                     isOpened = false;
-                                    doRegister(8, null);
+                                    getVM().doAction(8);
                                     getVM().closeGrid(gridDo);
                                 }else {
                                     //閽ュ寵涓嶅尮閰�
-                                    doRegister(10,null);
+                                    getVM().doAction(10);
                                     EventBus.getDefault().post(new OpenGridEvent(selectBean.getChannelCode(), selectBean.getBoardCode()));
                                 }
                             } else {
                                 //閽ュ寵鏈綊杩�
                                 isOpened = false;
-                                doRegister(9, null);
+                                getVM().doAction(9);
                                 getVM().closeGrid(gridDo);
                             }
                         }else {
                             //娌″叧闂�
                             if(!TextUtils.isEmpty(gridDo.getCurKeyCode())){
                                 //鏈夐挜鍖欎簡
-                                doRegister(7,null);
+                                getVM().doAction(7);
                             }
                         }
                     } else {
@@ -501,4 +546,24 @@
             }
         }
     }
+
+    private Handler handler = new Handler(){
+        @Override
+        public void handleMessage(@NonNull Message msg) {
+            switch (msg.what){
+                case 0:
+                    //閲嶆柊鍙戦�侀挜鍖欐煡璇�
+                    //鍙戦�佹煡璇㈤挜鍖欏彿
+                    EventBus.getDefault().post(new GetKeyStatusEvent());
+                    handler.sendEmptyMessageDelayed(0,1200);
+                    break;
+                case 1:
+                    EventBus.getDefault().post(new OpenGridEvent(selectBean.getChannelCode(), selectBean.getBoardCode()));
+                    handler.sendEmptyMessageDelayed(1,1000);
+                    break;
+                default:
+                    break;
+            }
+        }
+    };
 }
\ No newline at end of file
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ManageCabinetActivity.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ManageCabinetActivity.java
index a38a64b..7ab3232 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ManageCabinetActivity.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ManageCabinetActivity.java
@@ -1,10 +1,13 @@
 package com.doumee.keyCabinet.ui.keyCabinet;
 
+import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.lifecycle.Observer;
 
 import android.os.Build;
 import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
 import android.text.SpannableString;
 import android.text.Spanned;
 import android.text.TextUtils;
@@ -14,6 +17,7 @@
 import android.widget.TextView;
 import android.widget.Toast;
 
+import com.doumee.keyCabinet.MApplication;
 import com.doumee.keyCabinet.R;
 import com.doumee.keyCabinet.base.MyBaseActivity;
 import com.doumee.keyCabinet.bean.ManageKeyCabinetBean;
@@ -27,6 +31,7 @@
 import com.doumee.keyCabinet.event.KeyResultEvent;
 import com.doumee.keyCabinet.event.ManageOpenGridResultEvent;
 import com.doumee.keyCabinet.event.OpenAllGridEvent;
+import com.doumee.keyCabinet.event.OpenErrEvent;
 import com.doumee.keyCabinet.event.OpenGridEvent;
 import com.doumee.keyCabinet.event.OpenGridListEvent;
 import com.doumee.keyCabinet.event.OpenGridOneResultEvent;
@@ -37,6 +42,7 @@
 import com.doumee.lib_coremodel.util.RecyclerHelp;
 import com.doumee.lib_coremodel.util.StringUtil;
 import com.example.datalibrary.db.DBManager;
+import com.innohi.YNHAPI;
 
 import org.greenrobot.eventbus.EventBus;
 import org.greenrobot.eventbus.Subscribe;
@@ -100,6 +106,15 @@
             }
         });
         getVM().getCabinetDetail();
+        getDB().tvTitle.setOnLongClickListener(new View.OnLongClickListener() {
+            @Override
+            public boolean onLongClick(View v) {
+                //鍙互涓嬫媺
+                YNHAPI mAPI = YNHAPI.getInstance();
+                mAPI.setNavigationBarVisibility(YNHAPI.NavigationBarVisibility.VISIBLE);
+                return true;
+            }
+        });
     }
 
     private void updateBtnStatus(){
@@ -168,11 +183,6 @@
             CabinetGridDo[] upList = new CabinetGridDo[updateList.size()];
             for(int i=0;i<updateList.size();i++){
                 upList[i] = updateList.get(i);
-            }
-            //todo 鍘绘帀
-            CabinetGridDo gridDo = oldMap.get("0101");
-            if(gridDo!=null){
-                EventBus.getDefault().post(new HttpEvent(StringUtil.DateToStrSS(new Date())+"=================>鏇存柊鏁版嵁褰撳墠閽ュ寵2锛�"+gridDo.getCurKeyCode()));
             }
 
             DaoManager.getCabinetGridDao().update(upList);
@@ -344,7 +354,7 @@
         }
         if(isShowOpenTip){
             if(openTipDownCount==0){
-                doRegister(9,null);
+                getVM().doAction(9);
             }else {
                 openTipDownCount--;
                 getDB().tvClKmClose.setText(openTipDownCount+"s 鑷姩鍏抽棴");
@@ -526,15 +536,14 @@
         }
     }
 
-    private String sygKey;
     @Subscribe
     public void OpenGridOneResultEvent(OpenGridOneResultEvent e){
         if(!isFinishing()){
+            //寮�闂ㄦ垚鍔燂紝绉婚櫎寮�闂�
+            if(handler.hasMessages(1)){
+                handler.removeMessages(1);
+            }
             if(e.getIsOpen()==0){
-                if(e.getKey().equals(sygKey)){
-                    return;
-                }
-                sygKey = e.getKey();
                 //寮�闂ㄥけ璐�,閲嶆柊寮�闂�
                 EventBus.getDefault().post(new OpenGridEvent(Integer.parseInt(e.getKey().substring(2,4), 16)+"",
                         Integer.parseInt(e.getKey().substring(0,2), 16)+""));
@@ -542,6 +551,8 @@
         }
     }
 
+    private Long keyTime;
+    private HashMap<String,String> closeMap = new HashMap<>();
     /**
      * 鍏抽棬
      * @param e
@@ -549,12 +560,23 @@
     @Subscribe(threadMode= ThreadMode.MAIN)
     public void CloseGridOneResultEvent(CloseGridOneResultEvent e){
         if(!isFinishing()){
-            //鑾峰彇鍗″彿
-            EventBus.getDefault().post(new GetKeyStatusEvent());
             if(isShowTip){
                 isShowTip = false;
                 getDB().clTip.setVisibility(View.GONE); 
             }
+            //鍏抽棬鎴愬姛锛岀Щ闄ゅ紑闂�
+            if(handler.hasMessages(1)){
+                handler.removeMessages(1);
+            }
+            //鍙戦�佹煡璇㈤挜鍖欏彿
+            EventBus.getDefault().post(new GetKeyStatusEvent());
+            keyTime = new Date().getTime()+500;
+            if(handler.hasMessages(0)){
+                handler.removeMessages(0);
+            }
+            handler.sendEmptyMessageDelayed(0,1200);
+            closeMap.put(e.getKey(),"");
+            /*111
             //鏍¢獙鍗″彿
             CabinetGridDo gridDo = DaoManager.getCabinetGridDao().getGridByKey(e.getKey());
             if(gridDo!=null){
@@ -580,20 +602,51 @@
                         }
                     }
                 }
-                EventBus.getDefault().post(new HttpEvent(StringUtil.DateToStrSS(new Date())+"闂ㄥ叧闂垚鍔�==>鐩爣锛�"+gridDo.getKeyCode()+",褰撳墠锛�"+gridDo.getCurKeyCode()));
+                EventBus.getDefault().post(new HttpEvent(StringUtil.DateToStrSS(new Date())+"闂ㄥ叧闂垚鍔�***************************>鐩爣锛�"+gridDo.getKeyCode()+",褰撳墠锛�"+gridDo.getCurKeyCode()));
                 getVM().closeGrid(gridDo);
+            }*/
+        }
+    }
+
+    @Subscribe(threadMode= ThreadMode.MAIN)
+    public void OpenErrEvent(OpenErrEvent e){
+        //寮�闂ㄥけ璐�
+        if(!isFinishing()){
+            //寮�闂�
+            if(handler.hasMessages(1)){
+                handler.removeMessages(1);
             }
+            EventBus.getDefault().post(new OpenGridEvent(e.getKey()));
+            Message msg = Message.obtain();
+            msg.what=1;
+            msg.obj = e.getKey();
+            handler.sendMessageDelayed(msg,1000);
         }
     }
 
     @Subscribe
     public void KeyResultEvent(KeyResultEvent e){
         if(!isFinishing()){
+            //鏍¢獙鏃堕棿
+            if(keyTime==null){
+                return;
+            }
+            if(keyTime!=null&&keyTime>System.currentTimeMillis()){
+                //鏍¢獙杩斿洖鏃堕棿<鍛戒护鏃堕棿
+                return;
+            }
+            if(handler.hasMessages(0)){
+                handler.removeMessages(0);
+            }
+            HashMap<String,String> copyMap = new HashMap<>();
+            copyMap.putAll(closeMap);
+            closeMap.clear();
             //鏍¢獙鍗″彿涓嶅鐨勶紝鐩存帴寮瑰嚭
             List<CabinetGridDo> gridDos = DaoManager.getCabinetGridDao().loadAll();
             List<String> keys = new ArrayList<>();
             StringBuilder sb = new StringBuilder();
             for(CabinetGridDo gridDo:gridDos){
+                boolean isFail = false;
                 if(TextUtils.isEmpty(gridDo.getGridKey())){
                     if(!TextUtils.isEmpty(gridDo.getCurKeyCode())&&gridDo.getIsOpen()==0){
                         //鏈粦瀹氱殑瀛樻斁浜嗛挜鍖�
@@ -602,6 +655,7 @@
                             sb.append("銆�");
                         }
                         sb.append(gridDo.getCabinetName());
+                        isFail = true;
                     }
                 }else {
                     if(!TextUtils.isEmpty(gridDo.getCurKeyCode())){
@@ -612,7 +666,15 @@
                                 sb.append("銆�");
                             }
                             sb.append(gridDo.getCabinetName());
+                            isFail = true;
                         }
+                    }
+                }
+                if(!isFail){
+                    if(copyMap.containsKey(gridDo.getGridKey())){
+                        //鍏抽棬鎴愬姛
+                        EventBus.getDefault().post(new HttpEvent(StringUtil.DateToStrSS(new Date())+"闂ㄥ叧闂垚鍔�***************************>鐩爣锛�"+gridDo.getKeyCode()+",褰撳墠锛�"+gridDo.getCurKeyCode()));
+                        getVM().closeGrid(gridDo);
                     }
                 }
             }
@@ -625,4 +687,31 @@
             }
         }
     }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        handler.removeCallbacksAndMessages(null);
+        handler = null;
+    }
+
+    private Handler handler = new Handler(){
+        @Override
+        public void handleMessage(@NonNull Message msg) {
+            switch (msg.what){
+                case 0:
+                    //閲嶆柊鍙戦�侀挜鍖欐煡璇�
+                    //鍙戦�佹煡璇㈤挜鍖欏彿
+                    EventBus.getDefault().post(new GetKeyStatusEvent());
+                    handler.sendEmptyMessageDelayed(0,1200);
+                    break;
+                case 1:
+                    EventBus.getDefault().post(new OpenGridEvent((String) msg.obj));
+                    handler.sendEmptyMessageDelayed(1,1000);
+                    break;
+                default:
+                    break;
+            }
+        }
+    };
 }
\ No newline at end of file
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ManageCabinetVM.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ManageCabinetVM.java
index 94a9439..780a18c 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ManageCabinetVM.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ManageCabinetVM.java
@@ -296,7 +296,7 @@
                     @Override
                     public void onNext(@NonNull BaseResponse response) {
                         if(response.getCode()==200){
-                            EventBus.getDefault().post(new HttpEvent("鍏抽棴鏌滄牸鎺ュ彛鎴愬姛"));
+                            EventBus.getDefault().post(new HttpEvent("鍏抽棴鏌滄牸鎺ュ彛鎴愬姛:"+gridDo.getCurKeyCode()));
                             getCabinetDetail();
                             doAction(11);
                         }
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ManageLoginActivity.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ManageLoginActivity.java
index 96baac9..2a1ffe1 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ManageLoginActivity.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/keyCabinet/ManageLoginActivity.java
@@ -11,12 +11,14 @@
 import android.widget.Toast;
 
 import com.doumee.keyCabinet.BuildConfig;
+import com.doumee.keyCabinet.MApplication;
 import com.doumee.keyCabinet.R;
 import com.doumee.keyCabinet.base.MyBaseActivity;
 import com.doumee.keyCabinet.databinding.ManageLoginActivityBinding;
 import com.doumee.keyCabinet.event.TimeClockEvent;
 import com.doumee.keyCabinet.utils.LMobileInfo;
 import com.doumee.lib_coremodel.bean.event.ActionEventData;
+import com.innohi.YNHAPI;
 
 import org.greenrobot.eventbus.Subscribe;
 
@@ -44,7 +46,18 @@
         getDB().tvNo.setText("NO锛�"+ LMobileInfo.getDeviceUniqueId());
         getDB().tvV.setText("V"+ BuildConfig.VERSION_NAME);
 
-
+        getDB().tv1.setOnLongClickListener(new View.OnLongClickListener() {
+            @Override
+            public boolean onLongClick(View v) {
+                if(MApplication.getConfigBean().getId()==null){
+                    //鍙互涓嬫媺
+                    YNHAPI mAPI = YNHAPI.getInstance();
+                    mAPI.setNavigationBarVisibility(YNHAPI.NavigationBarVisibility.VISIBLE);
+                    return true;
+                }
+                return false;
+            }
+        });
     }
 
     @Override
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/main/MainActivity.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/main/MainActivity.java
index 13b914e..2584140 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/main/MainActivity.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/main/MainActivity.java
@@ -6,9 +6,11 @@
 import android.content.Context;
 import android.content.Intent;
 import android.graphics.Bitmap;
+import android.graphics.PixelFormat;
 import android.graphics.drawable.BitmapDrawable;
 import android.hardware.Camera;
 import android.opengl.Visibility;
+import android.os.Build;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
@@ -20,6 +22,7 @@
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.WindowManager;
 import android.widget.PopupWindow;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
@@ -60,6 +63,7 @@
 import com.doumee.keyCabinet.event.KeyResultEvent;
 import com.doumee.keyCabinet.event.ManageOpenGridResultEvent;
 import com.doumee.keyCabinet.event.OpenAllGridEvent;
+import com.doumee.keyCabinet.event.OpenErrEvent;
 import com.doumee.keyCabinet.event.OpenGridEvent;
 import com.doumee.keyCabinet.event.OpenGridListEvent;
 import com.doumee.keyCabinet.event.OpenGridOneResultEvent;
@@ -109,6 +113,7 @@
 import com.example.datalibrary.model.User;
 import com.example.datalibrary.utils.ToastUtils;
 import com.example.datalibrary.view.PreviewTexture;
+import com.innohi.YNHAPI;
 import com.yanzhenjie.permission.runtime.Permission;
 
 import org.greenrobot.eventbus.EventBus;
@@ -171,8 +176,21 @@
                         getVM().getFaceLD();
                     }
                     getVM().upBraceletLog();*/
+                    case 1:
+                        if(isShowing) {
+                            EventBus.getDefault().post(new OpenGridEvent((String) msg.obj));
+                            handler.sendEmptyMessageDelayed(1, 1000);
+                        }
+                        break;
                     case 2:
-
+                        if(isShowing){
+                            //閲嶆柊鍙戦�侀挜鍖欐煡璇�
+                            //鍙戦�佹煡璇㈤挜鍖欏彿
+                            EventBus.getDefault().post(new GetKeyStatusEvent());
+                            handler.sendEmptyMessageDelayed(2,1200);
+                        }
+                        break;
+                    default:
                         break;
                 }
             }
@@ -193,12 +211,12 @@
         getDB().setModel(getVM());
         initRGBCheck();
         handler.sendEmptyMessageDelayed(0, 1000);
-        //鍚姩蹇冭烦
+        /*//鍚姩蹇冭烦
         Intent intent = new Intent(MainActivity.this, HeartbeatService.class);
         startService(intent);
         //鍚姩鏇存柊浜鸿劯
         Intent intent2 = new Intent(MainActivity.this, FaceUpdateService.class);
-        startService(intent2);
+        startService(intent2);*/
         getPermission();
         Timber.tag("====>").d(LMobileInfo.getDeviceUniqueId());
     }
@@ -212,10 +230,10 @@
         long availableMemory = memoryInfo.availMem/(1024*1024);
         long usedMemory = totalMemory - availableMemory;
         //getDB().tvM.setText("鎬诲唴瀛橈細"+totalMemory+",浣跨敤鍐呭瓨锛�"+usedMemory+",鍙敤鍐呭瓨锛�"+availableMemory);
-        if((availableMemory<400&&showTime!=null&&(System.currentTimeMillis()-showTime>5000))||
+        if((availableMemory<100&&showTime!=null&&(System.currentTimeMillis()-showTime>5000))||
                 ("02:00:00".equals(StringUtil.getHM()))){
             //鍙敤鍐呭瓨灏忎簬400M,鎴栬�呮瘡澶╁噷鏅�2鐐癸紝閲嶅惎app
-            //restartApp();
+            restartApp();
         }
     }
 
@@ -270,7 +288,7 @@
                 lastDownTime1 = System.currentTimeMillis();
                 downCount1++;
                 System.out.println();
-                Timber.tag("==>").d(""+downCount1);
+                //Timber.tag("==>").d(""+downCount1);
                 if(downCount1>4) {
                     downCount1=0;
                     lastDownTime1=null;
@@ -296,24 +314,18 @@
                 }
             }
         });
-        getDB().tvVersion.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                //todo 涓存椂浠g爜
-                //setJiuConfig();
-                SpUtil.saveString("rbgCameraId","0");
-            }
-        });
+
         getDB().imgLeft.setOnClickListener(new View.OnClickListener() {
             @Override
-            public void onClick(View v) {
+            public void onClick(View v1) {
                 //todo 涓存椂浠g爜
                 if (getDB().nsv.getVisibility()== View.VISIBLE) {
                     getDB().nsv.setVisibility(View.GONE);
                 }else {
                     getDB().nsv.setVisibility(View.VISIBLE);
                 }
-
+                YNHAPI mAPI = YNHAPI.getInstance();
+                mAPI.setNavigationBarVisibility(YNHAPI.NavigationBarVisibility.VISIBLE);
             }
         });
         upErrInfo();
@@ -458,6 +470,9 @@
     protected void onResume() {
         super.onResume();
         isShowing = true;
+        YNHAPI mAPI = YNHAPI.getInstance();
+        mAPI.setNavigationBarVisibility(YNHAPI.NavigationBarVisibility.ALWAYS_INVISIBLE);
+        mAPI.setBootLaunchApk("com.doumee.keyCabinet", true);
         showTime = System.currentTimeMillis();
         if(!isFaceOk) {
             initLicense();
@@ -773,7 +788,63 @@
             waitBeans.clear();
             selectBeans.addAll(userBeans);
             finishCount=0;
-            faceHandler.sendEmptyMessage(0);
+            /*//鍒犻櫎鍏ㄩ儴
+            FaceApi.getInstance().userClean();
+            faceHandler.sendEmptyMessage(0);*/
+
+            HashMap<String,String> uMap = new HashMap<>();
+            for(FaceUserBean d:selectBeans){
+                String key = d.getMemberId().toString()+"_"+d.getGroupId();
+                uMap.put(key,"");
+            }
+            //鍒犻櫎涓嶅瓨鍦ㄧ敤鎴�
+            List<User> users = FaceApi.getInstance().getAllUserList();
+            List<User> dels = new ArrayList<>();
+            for(User u:users){
+                String key = u.getUserId()+"_"+u.getGroupId();
+                if(!uMap.containsKey(key)){
+                    dels.add(u);
+                }
+            }
+            if(dels.size()>0){
+                UserInfoManager.getInstance().deleteUserListInfo(dels,
+                        "", new UserInfoManager.UserInfoListener() {
+                            @Override
+                            public void userListDeleteSuccess() {
+                                // 鐢ㄦ埛鍒楄〃鍒犻櫎鎴愬姛
+                                faceHandler.sendEmptyMessage(0);
+                            }
+
+                            @Override
+                            public void userListDeleteFailure(String message) {
+                                // 鐢ㄦ埛鍒楄〃鍒犻櫎澶辫触
+                                faceHandler.sendEmptyMessage(0);
+                            }
+                        },
+                        new DBLoadListener() {
+                            @Override
+                            public void onStart(int successCount) {
+
+                            }
+
+                            @Override
+                            public void onLoad(int finishCount, int successCount, float progress) {
+
+                            }
+
+                            @Override
+                            public void onComplete(List<User> features, int successCount) {
+
+                            }
+
+                            @Override
+                            public void onFail(int finishCount, int successCount, List<User> features) {
+
+                            }
+                        });
+            }else {
+                faceHandler.sendEmptyMessage(0);
+            }
         }
     }
 
@@ -1041,14 +1112,21 @@
         }
     }
 
+    private UpdateUtil updateUtil;
     private void checkUpdate(){
         //鐗堟湰鏇存柊
-        new UpdateUtil(this).setShowToast(false).getServerVerCode(new UpdateUtil.VersionCallBack() {
-            @Override
-            public void isNeedUpdate(boolean isUpdate) {
-                isUpdateVersion = isUpdate;
-            }
-        });
+        if(updateUtil==null){
+            updateUtil = new UpdateUtil(this);
+            updateUtil.setShowToast(false);
+        }
+        if(!updateUtil.isShowing()){
+            updateUtil.getServerVerCode(new UpdateUtil.VersionCallBack() {
+                @Override
+                public void isNeedUpdate(boolean isUpdate) {
+                    isUpdateVersion = isUpdate;
+                }
+            });
+        }
     }
 
     private PermissiondDialog permissiondDialog;
@@ -1080,7 +1158,7 @@
     }
 
     private int tipDownCount = 10;
-    private int loopDownCount = 30;
+    private int loopDownCount = 60;
     private boolean isShowTip;
     @Subscribe
     public void TimeClockEvent(TimeClockEvent e){
@@ -1095,9 +1173,12 @@
                 }
             }
             if(loopDownCount==0){
-                loopDownCount = SpUtil.getInt("loop_time",30);
+                loopDownCount = SpUtil.getInt("loop_time",60);
                 //瀹氭椂鎷夊彇鍩烘湰淇℃伅
                 getVM().devLogin();
+                getPermission();
+                getVM().devHeart();
+                EventBus.getDefault().post(new GetFacesEvent());
             }else {
                 loopDownCount--;
             }
@@ -1112,8 +1193,12 @@
     public void OpenGridEvent(OpenGridEvent e){
         if(!isFinishing()){
             //寮�鍚煖闂�
-            String code = "8A"+SportUtils.intToHex(Integer.parseInt(e.getBoardCode()))
-                    +SportUtils.intToHex(Integer.parseInt(e.getChannelCode()))+"11";
+            String key = e.getKey();
+            if(TextUtils.isEmpty(key)) {
+                key = SportUtils.intToHex(Integer.parseInt(e.getBoardCode()))
+                        + SportUtils.intToHex(Integer.parseInt(e.getChannelCode()));
+            }
+            String code = "8A" + key + "11";
             code += SportUtils.getBCC(code);
             send485(0,code);
         }
@@ -1176,38 +1261,6 @@
         }
     }
 
-
-    @Subscribe
-    public void CloseGridOneResultEvent(CloseGridOneResultEvent e){
-        if(!isFinishing()&&isShowing){
-            //鍦ㄩ椤碉紝鏍¢獙鍏抽棬鐨勯挜鍖欐槸鍚﹀尮閰�
-            if (e.getIsOpen() == 0) {
-                //鍏抽棬鎴愬姛
-                //鏌ヨ閽ュ寵鍙�
-                CabinetGridDo gridDo = DaoManager.getCabinetGridDao().getGridByKey(e.getKey());
-                if (gridDo != null) {
-                    getVM().addInfo("姣旇緝閽ュ寵锛氬綋鍓嶏細"+gridDo.getCurKeyCode()+", 鍏宠仈閽ュ寵锛�"+gridDo.getKeyCode());
-                    if(!TextUtils.isEmpty(gridDo.getCurKeyCode())&&
-                            !TextUtils.isEmpty(gridDo.getKeyCode())&&
-                            !gridDo.getCurKeyCode().equals(gridDo.getKeyCode())){
-                        //閽ュ寵涓嶄竴鏍凤紝寮�闂�
-                        ToastView.show(MApplication.mContext,gridDo.getCabinetName()+"閽ュ寵瀛樻斁浣嶇疆閿欒");
-                        EventBus.getDefault().post(new OpenGridEvent(Integer.parseInt(e.getKey().substring(2,4), 16)+"",
-                                Integer.parseInt(e.getKey().substring(0,2), 16)+""));
-                    }else {
-                        if(isShowTip){
-                            doRegister(5,null);
-                        }
-                        if(isShowing){
-                            //鍦ㄩ椤靛叧闂ㄦ垚鍔燂紝闇�璋冪敤鍏抽棬鏂规硶
-                            getVM().closeGrid(gridDo);
-                        }
-                    }
-                }
-            }
-        }
-    }
-
     private SerialPortModel gridPort;
     private SerialPortReadObserver gridReadObserver = new SerialPortReadObserver() {
         @Override
@@ -1267,30 +1320,18 @@
                     if(gridDo!=null){
                         gridDo.setIsOpen("00".equals(open)?1:0);
                         gridDo.setUpdateTime(StringUtil.DateToStr(new Date()));
-                        //todo 鍘绘帀
-                        EventBus.getDefault().post(new HttpEvent(StringUtil.DateToStrSS(new Date())+"=================>鏇存柊鏁版嵁褰撳墠閽ュ寵3锛�"+gridDo.getCurKeyCode()));
 
                         DaoManager.getCabinetGridDao().update(gridDo);
                         EventBus.getDefault().post(new ManageOpenGridResultEvent());
                         if(gridDo.getIsOpen()==0) {
                             //寮�闂ㄥけ璐�
-                            if (isShowing) {
-                                //棣栭〉寮�闂ㄥけ璐ワ紝閽ュ寵涓嶅
-                                if (!TextUtils.isEmpty(gridDo.getCurKeyCode()) &&
-                                        !TextUtils.isEmpty(gridDo.getKeyCode()) &&
-                                        !gridDo.getCurKeyCode().equals(gridDo.getKeyCode())) {
-                                    //閽ュ寵涓嶄竴鏍凤紝寮�闂�
-                                    ToastView.show(MApplication.mContext, gridDo.getCabinetName() + "閽ュ寵瀛樻斁浣嶇疆閿欒");
-                                    EventBus.getDefault().post(new OpenGridEvent(Integer.parseInt(gridDo.getGridKey().substring(2, 4), 16) + "",
-                                            Integer.parseInt(gridDo.getGridKey().substring(0, 2), 16) + ""));
-                                }
-                            }
+                            EventBus.getDefault().post(new OpenErrEvent(key));
                         }else {
-                            //寮�闂ㄦ垚鍔�
+                            //寮�闂ㄨ繑鍥�
+                            EventBus.getDefault().post(new OpenGridOneResultEvent(key,"00".equals(open)?1:0));
                         }
                     }
-                    //寮�闂ㄨ繑鍥�
-                    EventBus.getDefault().post(new OpenGridOneResultEvent(key,"00".equals(open)?1:0));
+
                 }else if(data.length()==16){
                     //鎵归噺
                     //8A 02 00 00 00 00 11 99
@@ -1314,14 +1355,6 @@
                                 updateList.add(gridDo);
                             }
                         }
-                        runOnUiThread(() -> {
-                            getVM().addInfo("鎵归噺寮�闂ㄦ洿鏂板簱鏁版嵁:鐗堝彿锛�" +bh+","+updateList.size());
-                        });
-                        //todo 鍘绘帀
-                        CabinetGridDo gridDo = oldMap.get("0101");
-                        if(gridDo!=null) {
-                            EventBus.getDefault().post(new HttpEvent(StringUtil.DateToStrSS(new Date())+"=================>鏇存柊鏁版嵁褰撳墠閽ュ寵6锛�" + gridDo.getCurKeyCode()));
-                        }
 
                         getVM().updateGrids(updateList);
                         EventBus.getDefault().post(new ManageOpenGridResultEvent());
@@ -1341,16 +1374,13 @@
                 if(gridDo!=null){
                     gridDo.setIsOpen("00".equals(open)?1:0);
                     gridDo.setUpdateTime(StringUtil.DateToStr(new Date()));
-                    //todo 鍘绘帀
-                    EventBus.getDefault().post(new HttpEvent(StringUtil.DateToStrSS(new Date())+"=================>鏇存柊鏁版嵁褰撳墠閽ュ寵3锛�"+gridDo.getCurKeyCode()));
-
                     DaoManager.getCabinetGridDao().update(gridDo);
                 }
                 //鍏抽棬杩斿洖
                 EventBus.getDefault().post(new CloseGridOneResultEvent(key,"00".equals(open)?1:0));
                 if(isShowing&&isShowTip){
                     //淇敼鏄剧ず鎻愰啋
-                    doRegister(5,null);
+                    getVM().doAction(5);
                 }
             }else if(data.startsWith("80")){
                 //鏌ヨ鎵�鏈夐棬鐘舵��
@@ -1393,12 +1423,6 @@
                         runOnUiThread(() -> {
                             getVM().addInfo("鏇存柊搴撴暟鎹�:鐗堝彿锛�" +bh+","+ addList.size()+","+updateList.size());
                         });
-                        //todo 鍘绘帀
-                        CabinetGridDo gridDo = oldMap.get("0101");
-                        if(gridDo!=null){
-                            EventBus.getDefault().post(new HttpEvent(StringUtil.DateToStrSS(new Date())+
-                                    "=================>鏇存柊鏁版嵁褰撳墠閽ュ寵5锛�"+gridDo.getCurKeyCode()));
-                        }
 
                         getVM().updateGrids(updateList);
                         if(isShowing){
@@ -1520,12 +1544,6 @@
                 }
             }
         }
-        //todo 鍘绘帀
-        CabinetGridDo gridDo = oldMap.get("0101");
-        if(gridDo!=null) {
-            EventBus.getDefault().post(new HttpEvent(StringUtil.DateToStrSS(new Date())+
-                    "=================>鏇存柊鏁版嵁褰撳墠閽ュ寵7锛�" + gridDo.getCurKeyCode()));
-        }
 
         getVM().updateGrids(updateList);
         EventBus.getDefault().post(new KeyResultEvent());
@@ -1552,12 +1570,9 @@
             }
             try {
                 runOnUiThread(() -> {
-                    //getVM().addInfo("鑾峰彇鍒伴厭绮炬娴嬫暟鎹�:"+StringUtil.DateToStrSS(new Date())+" " + new String(bytes));
+                    getVM().addInfo("鑾峰彇鍒伴厭绮炬娴嬫暟鎹�:"+StringUtil.DateToStrSS(new Date())+" " + new String(bytes));
                 });
                 String data = new String(bytes);
-                runOnUiThread(() -> {
-                    //getVM().addInfo("鑾峰彇鍒伴厭绮炬娴嬫槸鍚︽娴嬪け璐�:" + (data.contains("blow fail")));
-                });
                 if(data.contains("blow fail")){
                     //妫�娴嬪け璐�
                     EventBus.getDefault().post(new JiujinResultEvent(false,null));
@@ -1691,18 +1706,35 @@
         sendPortHandlerMsg(2,"A002010000000003",time+400);
     }
 
+    private String jiu_blow;
+    private String jiu_mic_ad;
+    private String jiu_alarm;
+    private String jiu_unit;
     private void setJiuConfig(long time){
         CabinetConfigDataBean config = MApplication.getConfigBean().getCabinetConfigDataVO();
-        //璁剧疆鍚规皵鏃堕棿
-        sendPortHandlerMsg(3,"blow:"+config.getBlowTime(),time+100);
-        //鍘嬪姏鍊�
-        sendPortHandlerMsg(3,"mic_ad:"+config.getPressure(),time+300);
-        //娴撳害闃堝��
-        sendPortHandlerMsg(3,"alarm:"+config.getConcentration(),time+600);
-        //娴撳害闃堝�煎崟浣� (1=mg/100ml;2=mg/L;3=%BAC)
-        sendPortHandlerMsg(3,"unit:"+config.getThreshold(),time+900);
-
-        sendPortHandlerMsg(3,"read"+config.getThreshold(),time+1200);
+        if(!config.getBlowTime().equals(jiu_blow)) {
+            //璁剧疆鍚规皵鏃堕棿
+            jiu_blow = config.getBlowTime();
+            sendPortHandlerMsg(3, "blow:" + config.getBlowTime(), time += 100);
+        }
+        if(!config.getPressure().equals(jiu_mic_ad)) {
+            //鍘嬪姏鍊�
+            jiu_mic_ad = config.getPressure();
+            sendPortHandlerMsg(3, "mic_ad:" + config.getPressure(), time += 300);
+        }
+        if(!config.getConcentration().equals(jiu_alarm)) {
+            //娴撳害闃堝��
+            jiu_alarm = config.getConcentration();
+            sendPortHandlerMsg(3, "alarm:" + config.getConcentration(), time += 300);
+        }
+        if("3".equals(config.getThreshold())){
+            config.setThreshold("0");
+        }
+        if(!config.getThreshold().equals(jiu_unit)) {
+            //娴撳害闃堝�煎崟浣� (1=mg/100ml;2=mg/L;3=%BAC)
+            jiu_unit = config.getThreshold();
+            sendPortHandlerMsg(3, "unit:" + config.getThreshold(), time += 300);
+        }
     }
 
     private void sendPortHandlerMsg(int what,String obj,long time){
@@ -1715,15 +1747,15 @@
     private boolean isInitPort;
     //鍒濆鍖栦覆鍙�
     private void initPort(){
-        SpUtil.setString("port_grid","/dev/ttyS7");
-        SpUtil.setString("port_key","/dev/ttyS1");
-        SpUtil.setString("port_jiu","/dev/ttyS2");
+        //SpUtil.setString("port_grid","/dev/ttyS7");
+        //SpUtil.setString("port_key","/dev/ttyS1");
+        //SpUtil.setString("port_jiu","/dev/ttyS2");
         gridPath = SpUtil.getString("port_grid");
-        //getVM().addInfo("闂ㄤ覆鍙i摼鎺ワ細"+gridPath);
+        getVM().addInfo("闂ㄤ覆鍙i摼鎺ワ細"+gridPath);
         keyPath = SpUtil.getString("port_key");
-        //getVM().addInfo("閽ュ寵涓插彛閾炬帴锛�"+keyPath);
+        getVM().addInfo("閽ュ寵涓插彛閾炬帴锛�"+keyPath);
         jiuPath = SpUtil.getString("port_jiu");
-        //getVM().addInfo("閰掔簿涓插彛閾炬帴锛�"+jiuPath);
+        getVM().addInfo("閰掔簿涓插彛閾炬帴锛�"+jiuPath);
         if(!TextUtils.isEmpty(SpUtil.getString("port_grid"))&&
                 !TextUtils.isEmpty(SpUtil.getString("port_key"))&&
                 !TextUtils.isEmpty(SpUtil.getString("port_jiu"))){
@@ -1867,10 +1899,6 @@
         runOnUiThread(new Runnable() {
             @Override
             public void run() {
-                //todo 鍘绘帀
-                if(type==2){
-                    return;
-                }
                 getVM().addInfo("鍙戦�佹寚浠わ細"+StringUtil.DateToStrSS(new Date())+"==>"+code);
             }
         });
@@ -1937,4 +1965,124 @@
         getVM().addInfo("涓插彛鍏ㄩ儴閾炬帴鎴愬姛锛�");
         return true;
     }
+
+    //寮�闂�
+    @Subscribe
+    public void OpenGridOneResultEvent(OpenGridOneResultEvent e){
+        if(!isFinishing()&&isShowing){
+            //寮�闂ㄦ垚鍔燂紝绉婚櫎寮�闂�
+            if(handler.hasMessages(1)){
+                handler.removeMessages(1);
+                getVM().addInfo("==绉婚櫎寮�闂ㄤ换鍔�");
+            }
+        }
+    }
+
+    private Long keyTime;
+    private HashMap<String,String> closeMap = new HashMap<>();
+    /**
+     * 鍏抽棬
+     * @param e
+     */
+    @Subscribe(threadMode= ThreadMode.MAIN)
+    public void CloseGridOneResultEvent(CloseGridOneResultEvent e){
+        if(!isFinishing()&&isShowing){
+            //鍏抽棬鎴愬姛锛岀Щ闄ゅ紑闂�
+            if(handler.hasMessages(1)){
+                handler.removeMessages(1);
+                getVM().addInfo("==绉婚櫎寮�闂ㄤ换鍔�");
+            }
+            closeMap.put(e.getKey(),"");
+            //鍙戦�佹煡璇㈤挜鍖欏彿
+            EventBus.getDefault().post(new GetKeyStatusEvent());
+            keyTime = new Date().getTime()+500;
+            if(handler.hasMessages(2)){
+                handler.removeMessages(2);
+            }
+            handler.sendEmptyMessageDelayed(2,1200);
+        }
+    }
+
+    @Subscribe(threadMode= ThreadMode.MAIN)
+    public void OpenErrEvent(OpenErrEvent e){
+        //寮�闂ㄥけ璐�
+        if(!isFinishing()&&isShowing){
+            //寮�闂�
+            if(handler.hasMessages(1)){
+                handler.removeMessages(1);
+                getVM().addInfo("==绉婚櫎寮�闂ㄤ换鍔�");
+            }
+            EventBus.getDefault().post(new OpenGridEvent(e.getKey()));
+            Message msg = Message.obtain();
+            msg.what=1;
+            msg.obj = e.getKey();
+            handler.sendMessageDelayed(msg,1000);
+        }
+    }
+
+    @Subscribe
+    public void KeyResultEvent(KeyResultEvent e){
+        if(!isFinishing()&&isShowing){
+            //鏍¢獙鏃堕棿
+            if(keyTime==null){
+                return;
+            }
+            if(keyTime!=null&&keyTime>System.currentTimeMillis()){
+                //鏍¢獙杩斿洖鏃堕棿<鍛戒护鏃堕棿
+                return;
+            }
+            if(handler.hasMessages(2)){
+                handler.removeMessages(2);
+            }
+
+            HashMap<String,String> copyMap = new HashMap<>();
+            copyMap.putAll(closeMap);
+            closeMap.clear();
+            //鏍¢獙鍗″彿涓嶅鐨勶紝鐩存帴寮瑰嚭
+            List<CabinetGridDo> gridDos = DaoManager.getCabinetGridDao().loadAll();
+            List<String> keys = new ArrayList<>();
+            StringBuilder sb = new StringBuilder();
+            for(CabinetGridDo gridDo:gridDos){
+                //瑕佸湪鑼冨洿鍐�
+                if(copyMap.containsKey(gridDo.getGridKey())){
+                    boolean isFail = false;
+                    if(TextUtils.isEmpty(gridDo.getGridKey())){
+                        if(!TextUtils.isEmpty(gridDo.getCurKeyCode())&&gridDo.getIsOpen()==0){
+                            //鏈粦瀹氱殑瀛樻斁浜嗛挜鍖�
+                            keys.add(gridDo.getGridKey());
+                            if(sb.length()>0){
+                                sb.append("銆�");
+                            }
+                            sb.append(gridDo.getCabinetName());
+                            isFail = true;
+                        }
+                    }else {
+                        if(!TextUtils.isEmpty(gridDo.getCurKeyCode())){
+                            if(!gridDo.getCurKeyCode().equals(gridDo.getKeyCode())&&gridDo.getIsOpen()==0){
+                                //閽ュ寵涓嶅尮閰�
+                                keys.add(gridDo.getGridKey());
+                                if(sb.length()>0){
+                                    sb.append("銆�");
+                                }
+                                sb.append(gridDo.getCabinetName());
+                                isFail = true;
+                            }
+                        }
+                    }
+                    if(!isFail){
+                        //鍏抽棬鎴愬姛
+                        EventBus.getDefault().post(new HttpEvent(StringUtil.DateToStrSS(new Date())+"闂ㄥ叧闂垚鍔�***************************>鐩爣锛�"+gridDo.getKeyCode()+",褰撳墠锛�"+gridDo.getCurKeyCode()));
+                        getVM().closeGrid(gridDo);
+                    }
+                }
+            }
+            if(sb.length()>0){
+                ToastView.show(MApplication.mContext, sb.toString() + "閽ュ寵瀛樻斁浣嶇疆閿欒");
+            }
+            if(keys.size()>0){
+                //寮�闂�
+                EventBus.getDefault().post(new OpenGridListEvent(keys));
+            }
+        }
+    }
 }
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/main/MainVM.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/main/MainVM.java
index c511e94..40f82bc 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/main/MainVM.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/ui/main/MainVM.java
@@ -71,7 +71,6 @@
 
     public void devLogin(){
         //娓呴櫎鐧诲綍淇℃伅
-        MApplication.saveConfigBean(new DevConfigBean());
         EventBus.getDefault().post(new HttpEvent("鑾峰彇閽ュ寵鏌滃熀鏈俊鎭�-璇锋眰"));
         getRetrofitService(Apis.class).getCabinetInfoForDriver(LMobileInfo.getDeviceUniqueId())
                 .compose(RxUtils.schedulersTransformer())
@@ -89,6 +88,7 @@
                                 toast(MApplication.mContext.getString(R.string.guide_toast_1));
                             }
                         }else {
+                            MApplication.saveConfigBean(new DevConfigBean());
                             toast(response.getMessage());
                         }
                     }
@@ -158,12 +158,6 @@
             DaoManager.getCabinetGridDao().insert(addList);
         }
 
-        //todo 鍘绘帀
-        CabinetGridDo gridDo = oldMap.get("0101");
-        if(gridDo!=null){
-            EventBus.getDefault().post(new HttpEvent(StringUtil.DateToStrSS(new Date())+"=================>鏇存柊鏁版嵁褰撳墠閽ュ寵1锛�"+gridDo.getCurKeyCode()));
-        }
-
         if(updateList.size()>0){
             CabinetGridDo[] upList = new CabinetGridDo[updateList.size()];
             for(int i=0;i<updateList.size();i++){
@@ -215,13 +209,13 @@
                                 List<FaceUserBean> datas = new ArrayList<>();
                                 if(faceBean!=null&&faceBean.getAutoFaceList()!=null){
                                     for(FaceUserBean bean:faceBean.getAutoFaceList()){
-                                        bean.setGroupId("1");
+                                        bean.setGroupId("0");
                                     }
                                     datas.addAll(faceBean.getAutoFaceList());
                                 }
                                 if(faceBean!=null&&faceBean.getDriverFaceList()!=null){
                                     for(FaceUserBean bean:faceBean.getDriverFaceList()){
-                                        bean.setGroupId("0");
+                                        bean.setGroupId("1");
                                     }
                                     datas.addAll(faceBean.getDriverFaceList());
                                 }
@@ -330,7 +324,7 @@
                 .subscribe(new SimpleObserver<BaseResponse>(rxJavaGcManager) {
                     @Override
                     public void onNext(@NonNull BaseResponse response) {
-                        toast("鍏抽棬鎺ュ彛璋冪敤鎴愬姛");
+
                     }
 
                     @Override
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/CrashHandler.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/CrashHandler.java
index 56a801a..2eb455d 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/CrashHandler.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/CrashHandler.java
@@ -14,6 +14,7 @@
 import com.doumee.keyCabinet.ui.guide.GuideActivity;
 import com.doumee.keyCabinet.ui.main.MainActivity;
 import com.doumee.lib_coremodel.util.SpUtil;
+import com.innohi.YNHAPI;
 
 import java.io.BufferedWriter;
 import java.io.ByteArrayOutputStream;
@@ -86,22 +87,30 @@
 	public void uncaughtException(Thread thread, Throwable ex) {
 		try {
 			//瀵煎嚭寮傚父淇℃伅鍒癝D鍗′腑
+			YNHAPI mAPI = YNHAPI.getInstance();
+			mAPI.setNavigationBarVisibility(YNHAPI.NavigationBarVisibility.VISIBLE);
 			dumpExceptionToSDCard(ex);
-			//System.out.println("閲嶅惎搴旂敤");
-			// 鍒涘缓涓�涓柊鐨勫惎鍔ㄦ剰鍥�
-			/*Intent intent = new Intent(mContext, MainActivity.class);
-			// 璁剧疆FLAG_ACTIVITY_CLEAR_TASK鏍囧織浣�
-			intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
-			// 浣跨敤PendingIntent鍖呰鍚姩鎰忓浘
-			PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, intent, PendingIntent.FLAG_ONE_SHOT);
-			// 鑾峰彇AlarmManager瀹炰緥
-			AlarmManager alarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);
-			// 鍦�500姣鍚庤Е鍙戦噸鍚搷浣�
-			alarmManager.set(AlarmManager.RTC, System.currentTimeMillis() + 10, pendingIntent);
+			long time = SpUtil.getLong("err_app");
+			SpUtil.saveLong("err_app",System.currentTimeMillis());
+			if(System.currentTimeMillis()-time>60000){
+				//鎶ラ敊闂撮殧60绉掞紝鎵嶉噸鍚�
+				//System.out.println("閲嶅惎搴旂敤");
+				// 鍒涘缓涓�涓柊鐨勫惎鍔ㄦ剰鍥�
+				Intent intent = new Intent(mContext, MainActivity.class);
+				// 璁剧疆FLAG_ACTIVITY_CLEAR_TASK鏍囧織浣�
+				intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
+				// 浣跨敤PendingIntent鍖呰鍚姩鎰忓浘
+				PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, intent, PendingIntent.FLAG_ONE_SHOT);
+				// 鑾峰彇AlarmManager瀹炰緥
+				AlarmManager alarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);
+				// 鍦�500姣鍚庤Е鍙戦噸鍚搷浣�
+				alarmManager.set(AlarmManager.RTC, System.currentTimeMillis() + 10, pendingIntent);
 
-			android.os.Process.killProcess(android.os.Process.myPid());
-			System.exit(1);*/
+				android.os.Process.killProcess(android.os.Process.myPid());
+				System.exit(1);
+			}
 			//杩欓噷鍙互閫氳繃缃戠粶涓婁紶寮傚父淇℃伅鍒版湇鍔″櫒锛屼究浜庡紑鍙戜汉鍛樺垎鏋愭棩蹇椾粠鑰岃В鍐砨ug
+
 		} catch (IOException e) {
 			e.printStackTrace();
 			System.out.println("閿欒鏃ュ織1"+e.getMessage());
@@ -263,7 +272,7 @@
 			dumpPhoneInfo(print);
 			print.println();
 			ex.printStackTrace(print);
-			SpUtil.saveString(FILE_NAME+time,new String(out.toByteArray()));
+			//SpUtil.saveString(FILE_NAME+time,new String(out.toByteArray()));
 			print.close();
 		} catch (Exception e) {
 			e.printStackTrace();
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/face/FaceSDKManager.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/face/FaceSDKManager.java
index 1849b2c..ae6dbef 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/face/FaceSDKManager.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/face/FaceSDKManager.java
@@ -66,7 +66,7 @@
             }
             return;
         }
-        // todo 澧炲姞鍒ょ┖澶勭悊
+
         if (listener != null) {
             listener.initStart();
         }
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/update/UpdateDialog.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/update/UpdateDialog.java
index 3f6aba7..7ae003d 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/update/UpdateDialog.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/update/UpdateDialog.java
@@ -55,7 +55,7 @@
 				}
 			}
 		});
-		getWritePermision();
+		//getWritePermision();
 	}
 
 	public void setOnOtemListener(UpdialogListener lister) {
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/update/UpdateUtil.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/update/UpdateUtil.java
index cd748b5..3ee3621 100644
--- a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/update/UpdateUtil.java
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/update/UpdateUtil.java
@@ -57,6 +57,17 @@
         // thread.interrupt();
         // }
     }
+
+    public boolean isShowing() {
+        if(updateDialog!=null&&updateDialog.isShowing()){
+            return true;
+        }
+        if(downloadDialog!=null&&downloadDialog.isShowing()){
+            return true;
+        }
+        return false;
+    }
+
     public static interface VersionCallBack{
         void isNeedUpdate(boolean isUpdate);
     }
@@ -81,8 +92,8 @@
                                     versionCallBack.isNeedUpdate(true);
                                     upgradeurl=data.getFullFileUrl();
                                     updatelog=data.getContent();
-                                    newVerName = response.getData().getVersionInfo();
-                                    doNewVersionUpdate(true);
+                                    newVerName = data.getVersionInfo();
+                                    doNewVersionUpdate(data.getIsForce()==1);
                                 }else {
                                     versionCallBack.isNeedUpdate(false);
                                 }
@@ -117,6 +128,7 @@
         }
     }
 
+    private UpdateDialog updateDialog;
     // 鏇存柊鏂扮増鏈�
     public void doNewVersionUpdate(boolean type) {
         StringBuffer sb = new StringBuffer();
@@ -132,7 +144,10 @@
         }
         // sb.append(updatelog+"\n\n\r");
         // new UpdateDialog(activity).show();
-        final UpdateDialog updateDialog = new UpdateDialog(activity);
+        if(updateDialog!=null&&updateDialog.isShowing()){
+            updateDialog.dismiss();
+        }
+        updateDialog = new UpdateDialog(activity);
         updateDialog.setText(sb.toString(),newVerName);
         updateDialog.setOnOtemListener(new UpdateDialog.UpdialogListener() {
 
diff --git a/keyCabinet-android/app/src/main/res/layout/face_activity.xml b/keyCabinet-android/app/src/main/res/layout/face_activity.xml
index 53880b2..bd91c0e 100644
--- a/keyCabinet-android/app/src/main/res/layout/face_activity.xml
+++ b/keyCabinet-android/app/src/main/res/layout/face_activity.xml
@@ -17,6 +17,18 @@
         android:background="@color/white"
         >
 
+        <EditText
+            android:id="@+id/et_ewm"
+            android:layout_width="100dp"
+            android:layout_height="wrap_content"
+            android:text=""
+            android:inputType="number"
+            app:layout_constraintTop_toTopOf="@+id/viewBack"
+            app:layout_constraintBottom_toBottomOf="@+id/viewBack"
+            app:layout_constraintStart_toStartOf="parent"
+            android:background="@null"
+            />
+
         <View
             android:id="@+id/viewBack"
             android:layout_width="0dp"
@@ -482,20 +494,7 @@
             app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintEnd_toEndOf="parent"
             android:background="@color/white"
-            android:visibility="visible">
-
-            <EditText
-                android:id="@+id/et_ewm"
-                android:layout_width="100dp"
-                android:layout_height="wrap_content"
-                android:text=""
-                android:inputType="number"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintEnd_toEndOf="parent"
-                android:background="@null"
-                android:layout_marginTop="20dp"
-                />
+            android:visibility="gone">
 
             <View
                 android:id="@+id/v_c_sl"
@@ -703,10 +702,10 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:background="@drawable/shape_jiujin_ok"
-            android:paddingLeft="80dp"
-            android:paddingRight="80dp"
-            android:paddingTop="50dp"
-            android:paddingBottom="50dp"
+            android:paddingLeft="60dp"
+            android:paddingRight="60dp"
+            android:paddingTop="40dp"
+            android:paddingBottom="40dp"
             app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintStart_toStartOf="parent"
@@ -715,8 +714,8 @@
 
             <pl.droidsonroids.gif.GifImageView
                 android:id="@+id/img_progress"
-                android:layout_width="150dp"
-                android:layout_height="150dp"
+                android:layout_width="90dp"
+                android:layout_height="90dp"
                 android:src="@mipmap/zhuanquan"
                 app:layout_constraintStart_toStartOf="parent"
                 app:layout_constraintEnd_toEndOf="parent"
@@ -736,5 +735,23 @@
 
         </androidx.constraintlayout.widget.ConstraintLayout>
 
+        <TextView
+            android:id="@+id/message"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="@dimen/activity_vertical_margin"
+            android:layout_marginRight="@dimen/activity_vertical_margin"
+            android:text=""
+            android:textColor="@color/white"
+            android:textSize="24sp"
+            android:padding="@dimen/activity_horizontal_margin"
+            android:background="@drawable/toast_view_bg"
+            app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            android:gravity="center"
+            android:visibility="gone"/>
+
     </androidx.constraintlayout.widget.ConstraintLayout>
 </layout>
\ No newline at end of file
diff --git a/keyCabinet-android/app/src/main/res/layout/layout_download.xml b/keyCabinet-android/app/src/main/res/layout/layout_download.xml
index 1a118fc..e72e791 100644
--- a/keyCabinet-android/app/src/main/res/layout/layout_download.xml
+++ b/keyCabinet-android/app/src/main/res/layout/layout_download.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
+    android:layout_width="450dp"
     android:layout_height="wrap_content"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_gravity="center"
diff --git a/keyCabinet-android/app/src/main/res/layout/main_activity.xml b/keyCabinet-android/app/src/main/res/layout/main_activity.xml
index 36f24dc..4b4fc50 100644
--- a/keyCabinet-android/app/src/main/res/layout/main_activity.xml
+++ b/keyCabinet-android/app/src/main/res/layout/main_activity.xml
@@ -22,21 +22,6 @@
             app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintStart_toStartOf="parent"/>
 
-        <TextView
-            android:id="@+id/tv_m"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="鍐呭瓨"
-            android:textSize="30sp"
-            android:textColor="@color/white"
-            android:gravity="center"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintStart_toStartOf="parent"
-            android:paddingLeft="0dp"
-            android:paddingRight="10dp"
-            android:visibility="gone"
-            />
-
         <com.facebook.drawee.view.SimpleDraweeView
             android:id="@+id/img1"
             android:layout_width="match_parent"
@@ -420,5 +405,20 @@
             app:layout_constraintStart_toStartOf="parent"
             />
 
+        <TextView
+            android:id="@+id/tv_m"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text=""
+            android:textSize="30sp"
+            android:textColor="@color/black"
+            android:gravity="center"
+            app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            android:paddingLeft="0dp"
+            android:paddingRight="10dp"
+            android:visibility="gone"
+            />
+
     </androidx.constraintlayout.widget.ConstraintLayout>
 </layout>
\ No newline at end of file
diff --git a/keyCabinet-android/app/src/main/res/layout/manage_cabinet_rcv_item.xml b/keyCabinet-android/app/src/main/res/layout/manage_cabinet_rcv_item.xml
index 01997ec..20f9de2 100644
--- a/keyCabinet-android/app/src/main/res/layout/manage_cabinet_rcv_item.xml
+++ b/keyCabinet-android/app/src/main/res/layout/manage_cabinet_rcv_item.xml
@@ -37,18 +37,6 @@
             android:layout_marginLeft="15dp"
             android:layout_marginTop="10dp"
             android:paddingBottom="9dp"/>
-        <TextView
-            android:id="@+id/tv3"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@{data.keyCode}"
-            android:textColor="#ff279baa"
-            android:textSize="14sp"
-            app:layout_constraintTop_toBottomOf="@+id/tv2"
-            app:layout_constraintStart_toStartOf="parent"
-            android:layout_marginLeft="15dp"
-            android:layout_marginTop="10dp"
-            android:paddingBottom="9dp"/>
 
         <ImageView
             android:layout_width="45dp"
diff --git a/keyCabinet-android/app/src/main/res/layout/manage_login_activity.xml b/keyCabinet-android/app/src/main/res/layout/manage_login_activity.xml
index c40e433..12b356e 100644
--- a/keyCabinet-android/app/src/main/res/layout/manage_login_activity.xml
+++ b/keyCabinet-android/app/src/main/res/layout/manage_login_activity.xml
@@ -88,7 +88,7 @@
                 android:layout_width="0dp"
                 android:layout_height="75dp"
                 android:background="@null"
-                android:text="18656077929"
+                android:text=""
                 android:textColor="#111111"
                 android:hint="璇疯緭鍏ョ櫥褰曡处鍙�"
                 android:textColorHint="#999999"
@@ -138,7 +138,7 @@
                 android:layout_width="0dp"
                 android:layout_height="75dp"
                 android:background="@null"
-                android:text="Whyc2025"
+                android:text=""
                 android:hint="璇疯緭鍏ヨ处鍙峰瘑鐮�"
                 android:textColorHint="#999999"
                 android:textSize="24sp"
diff --git a/keyCabinet-android/app/src/main/res/layout/ui_update_dialog.xml b/keyCabinet-android/app/src/main/res/layout/ui_update_dialog.xml
index d43f87a..8bb1d94 100644
--- a/keyCabinet-android/app/src/main/res/layout/ui_update_dialog.xml
+++ b/keyCabinet-android/app/src/main/res/layout/ui_update_dialog.xml
@@ -2,7 +2,7 @@
 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:id="@+id/rl_root"
-    android:layout_width="match_parent"
+    android:layout_width="450dp"
     android:layout_height="wrap_content">
 
     <androidx.constraintlayout.widget.ConstraintLayout
diff --git a/keyCabinet-android/app/src/main/res/values/strings.xml b/keyCabinet-android/app/src/main/res/values/strings.xml
index e02f541..65190e7 100644
--- a/keyCabinet-android/app/src/main/res/values/strings.xml
+++ b/keyCabinet-android/app/src/main/res/values/strings.xml
@@ -114,8 +114,8 @@
     <string name="main_tip3">浜鸿劯搴撳姞杞藉け璐�,鍏�%1$d鏉℃暟鎹�, 宸插姞杞�%2$d鏉℃暟鎹�</string>
     <string name="main_tip4">妯″瀷鍔犺浇鎴愬姛锛屾杩庝娇鐢�</string>
     <string name="main_tip5">妯″瀷鍔犺浇澶辫触锛岃灏濊瘯閲嶅惎搴旂敤</string>
-    <string name="face_hy">浼氬憳</string>
-    <string name="face_xy">绠$悊鍛�</string>
+    <string name="face_hy">鍙告満</string>
+    <string name="face_xy">楠岃瘉浜�</string>
     <string name="guide_2">璁惧鏈櫥褰�</string>
     <string name="face_login">浜鸿劯璇嗗埆涓�</string>
     <string name="face_tip1">璇锋瑙嗗墠鏂癸紝涓嶈閬尅鑴搁儴</string>
diff --git a/keyCabinet-android/datalibrary/src/main/java/com/example/datalibrary/manager/FaceSDKManager.java b/keyCabinet-android/datalibrary/src/main/java/com/example/datalibrary/manager/FaceSDKManager.java
index cd1a90f..fe9db72 100644
--- a/keyCabinet-android/datalibrary/src/main/java/com/example/datalibrary/manager/FaceSDKManager.java
+++ b/keyCabinet-android/datalibrary/src/main/java/com/example/datalibrary/manager/FaceSDKManager.java
@@ -309,15 +309,14 @@
 
     private static BDFaceImageInstance rgbInstance =null;
     private LivenessModel livenessModel;
+    private String groupId;
 
     /**
      * 0:绠$悊鍛橈紝1锛氱敤鎴�
      * @param groupId
      */
     public void setGroupId(String groupId){
-        if(livenessModel!=null){
-            livenessModel.setGroupId(groupId);
-        }
+        this.groupId = groupId;
     }
     /**
      * 妫�娴�-娲讳綋-鐗瑰緛-浜鸿劯妫�绱㈡祦绋�
@@ -1215,7 +1214,7 @@
                     //System.out.println("==isOk==>鍖归厤鍒版暟閲�"+featureResult.size());
                     User user = null;
                     Feature topFeature = null;
-                    if(TextUtils.isEmpty(livenessModel.getGroupId())){
+                    if(TextUtils.isEmpty(groupId)){
                         //涓虹┖锛岄渶瑕佹帓搴忥紝浼樺厛鍙栦細鍛�
                         for(Feature feat:featureResult) {
                             threholdScore = bdFaceCheckConfig.scoreThreshold;
@@ -1242,7 +1241,7 @@
                                 //System.out.println("==isOk==>50");
                                 // 褰撳墠featureEntity 鍙湁id+feature 绱㈠紩锛屽湪鏁版嵁搴撲腑鏌ュ埌瀹屾暣淇℃伅
                                 User userOld = FaceApi.getInstance().getUserListById(feat.getId());
-                                if(livenessModel.getGroupId().equals(userOld.getGroupId())){
+                                if(groupId.equals(userOld.getGroupId())){
                                     user = userOld;
                                     topFeature = feat;
                                     break;
diff --git a/keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/base/BaseViewModel.java b/keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/base/BaseViewModel.java
index 9f62235..8b49bc5 100644
--- a/keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/base/BaseViewModel.java
+++ b/keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/base/BaseViewModel.java
@@ -228,6 +228,10 @@
         actionEvent.setValue(new ActionEventData(type));
     }
 
+    public void doAction(int type,String obj){
+        actionEvent.setValue(new ActionEventData(type,obj));
+    }
+
     public LifecycleOwner getLifecycleOwner() {
         return lifecycleOwner;
     }
diff --git a/keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/bean/event/ActionEventData.java b/keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/bean/event/ActionEventData.java
index 8085cdc..8f727c1 100644
--- a/keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/bean/event/ActionEventData.java
+++ b/keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/bean/event/ActionEventData.java
@@ -28,6 +28,13 @@
         this.data.put("type",type);
     }
 
+    public ActionEventData(int type,String obj){
+        this.action = ActionEvent.Action.DO;
+        this.data = new HashMap<>();
+        this.data.put("type",type);
+        this.data.put("obj",obj);
+    }
+
     public ActionEventData(int action,Object value) {
         this.action = action;
         this.data = new HashMap<>();
diff --git a/keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/util/SpUtil.java b/keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/util/SpUtil.java
index d3eeb11..c071a81 100644
--- a/keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/util/SpUtil.java
+++ b/keyCabinet-android/lib_coremodel/src/main/java/com/doumee/lib_coremodel/util/SpUtil.java
@@ -104,6 +104,16 @@
         return getSharedPreferences().getInt(key, 0);
     }
 
+    public static void saveLong(String key, Long value){
+        SharedPreferences.Editor editor = getSharedPreferences().edit();
+        editor.putLong(key, value);
+        editor.commit();
+    }
+
+    public static Long getLong(String key){
+        return getSharedPreferences().getLong(key, 0L);
+    }
+
     public static boolean getBoolean(String key){
         return getSharedPreferences().getBoolean(key, false);
     }
diff --git a/keyCabinet-android/lib_coremodel/src/main/res/values/colors.xml b/keyCabinet-android/lib_coremodel/src/main/res/values/colors.xml
index cfd3abf..8255037 100644
--- a/keyCabinet-android/lib_coremodel/src/main/res/values/colors.xml
+++ b/keyCabinet-android/lib_coremodel/src/main/res/values/colors.xml
@@ -8,4 +8,5 @@
     <color name="line">#E5E5E5</color>
     <color name="bg">#fff4f6f9</color>
     <color name="f7">#F7F7F7</color>
+    <color name="dialog_bg">#80000000</color>
 </resources>
\ No newline at end of file

--
Gitblit v1.9.3