|
@@ -2,6 +2,8 @@ package com.sunwin.visitorapp.activity;
|
|
|
|
|
|
import android.content.Intent;
|
|
|
import android.os.Bundle;
|
|
|
+import android.os.Handler;
|
|
|
+import android.os.Message;
|
|
|
import android.text.TextUtils;
|
|
|
import android.view.View;
|
|
|
import android.widget.LinearLayout;
|
|
@@ -10,11 +12,13 @@ import android.widget.TextView;
|
|
|
import com.sunwin.visitorapp.BaseActivity;
|
|
|
import com.sunwin.visitorapp.BaseApplication;
|
|
|
import com.sunwin.visitorapp.R;
|
|
|
+import com.sunwin.visitorapp.db.BlackUserModel;
|
|
|
import com.sunwin.visitorapp.db.DatabaseManager;
|
|
|
import com.sunwin.visitorapp.db.UserInfoModel;
|
|
|
import com.sunwin.visitorapp.face.CameraPreviewData;
|
|
|
import com.sunwin.visitorapp.face.IDCardReaderUtil;
|
|
|
import com.sunwin.visitorapp.face.IdCardReadCallback;
|
|
|
+import com.sunwin.visitorapp.face.SwFaceLoop;
|
|
|
import com.sunwin.visitorapp.model.OpenDoorByFaceNetResultInfo;
|
|
|
import com.sunwin.visitorapp.model.UploadRecordRequsetModel;
|
|
|
import com.sunwin.visitorapp.net.ApiService;
|
|
@@ -69,6 +73,11 @@ public class VisitSignActivity extends BaseActivity implements IdCardReadCallbac
|
|
|
mFaceDetecterView.onDestroy();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ protected void onDestroy() {
|
|
|
+ super.onDestroy();
|
|
|
+ }
|
|
|
+
|
|
|
private void initialData() {
|
|
|
visitSignType = getIntent().getIntExtra(Constant.IIntentValue.VISIT_SIGN_TYPE, 1);
|
|
|
visitType = getIntent().getIntExtra(Constant.IIntentValue.VISIT_TYPE, 1);
|
|
@@ -100,6 +109,11 @@ public class VisitSignActivity extends BaseActivity implements IdCardReadCallbac
|
|
|
}
|
|
|
|
|
|
private void updataUserInfoByIdNum(String idNum, int type) {
|
|
|
+ List<BlackUserModel> model = DatabaseManager.getInstance().query(BlackUserModel.class, "id_card_code", idNum);
|
|
|
+ if (model.size() > 0) {
|
|
|
+ BaseApplication.getSystemTTS().playText("黑名单用户");
|
|
|
+ }
|
|
|
+
|
|
|
List<UserInfoModel> userInfoModels = DatabaseManager.getInstance().query(UserInfoModel.class, "idNum", idNum);
|
|
|
updateUserInfo(userInfoModels);
|
|
|
updateRecord(userInfoModels, type);
|
|
@@ -198,6 +212,7 @@ public class VisitSignActivity extends BaseActivity implements IdCardReadCallbac
|
|
|
@Override
|
|
|
public void detectedUser(OpenDoorByFaceNetResultInfo openDoorByFaceNetResultInfo) {
|
|
|
LogUtil.e(TAG, "-------------detectedUser--------------");
|
|
|
+
|
|
|
BaseApplication.getSystemTTS().playText("识别成功");
|
|
|
String idNum = openDoorByFaceNetResultInfo.getIdNum();
|
|
|
currentFace = openDoorByFaceNetResultInfo.getCurrentFace();
|
|
@@ -208,7 +223,7 @@ public class VisitSignActivity extends BaseActivity implements IdCardReadCallbac
|
|
|
|
|
|
@Override
|
|
|
public void detecterFail(String st) {
|
|
|
-
|
|
|
+ BaseApplication.getSystemTTS().playText(st);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -241,5 +256,4 @@ public class VisitSignActivity extends BaseActivity implements IdCardReadCallbac
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|