|
@@ -6,19 +6,24 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
|
|
import android.os.Handler;
|
|
|
import android.os.Looper;
|
|
|
import android.os.Message;
|
|
|
+import android.util.Log;
|
|
|
import android.view.View;
|
|
|
import android.widget.EditText;
|
|
|
import android.widget.ImageView;
|
|
|
import android.widget.LinearLayout;
|
|
|
import android.widget.TextView;
|
|
|
+import android.widget.Toast;
|
|
|
|
|
|
import com.example.datalibrary.api.FaceApi;
|
|
|
import com.example.datalibrary.model.KeyboardsUtils;
|
|
|
import com.example.datalibrary.model.User;
|
|
|
+import com.example.datalibrary.utils.ToastUtils;
|
|
|
import com.hanghui.senic.R;
|
|
|
import com.hanghui.senic.activity.BaseActivity;
|
|
|
+import com.hanghui.senic.activity.PassWordActivity;
|
|
|
import com.hanghui.senic.adapter.PersonnelDataAdapter;
|
|
|
import com.hanghui.senic.common.CommonUtil;
|
|
|
+import com.hanghui.senic.service.usbserialdemo.utile.ConfigManager;
|
|
|
import com.hanghui.senic.service.usbserialdemo.utile.StringIsNull;
|
|
|
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
|
|
|
|
@@ -58,7 +63,7 @@ public class PersonnelDataActivity extends BaseActivity implements View.OnClickL
|
|
|
private Future future3;
|
|
|
|
|
|
private List<User> dataList;
|
|
|
- private volatile int totalSize=0;
|
|
|
+ private volatile int totalSize= -1;
|
|
|
private final int WHAT_REFRESH=0x01;
|
|
|
|
|
|
private volatile boolean isSearching=false;
|
|
@@ -75,7 +80,7 @@ public class PersonnelDataActivity extends BaseActivity implements View.OnClickL
|
|
|
return;
|
|
|
}
|
|
|
future3 = es3.submit(() -> {
|
|
|
- dataList = FaceApi.getInstance().getUsers();
|
|
|
+ dataList = FaceApi.getInstance().getAllUserList();
|
|
|
final int tempTotalSize = dataList.size();
|
|
|
post(() -> {
|
|
|
if (!isSearching && mAdapter != null) {
|
|
@@ -148,6 +153,29 @@ public class PersonnelDataActivity extends BaseActivity implements View.OnClickL
|
|
|
, PersonnelDataActivity.this);
|
|
|
personnelData_RecyclerView.setAdapter(mAdapter);
|
|
|
personnelData_RecyclerView.setPullRefreshEnabled(false);//禁止下拉刷新
|
|
|
+ /* List<Integer> configs= ConfigManager.getAuthenticationBeanListBean().getSetPersonalList();
|
|
|
+ if (configs != null) {
|
|
|
+ boolean isShowPhoto = false;
|
|
|
+ boolean isShowIDCard = false;
|
|
|
+ boolean isShowPhone = false;
|
|
|
+ for (Integer item : configs) {
|
|
|
+ if (item == null || item == 0) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ switch (item) {
|
|
|
+ case 1:
|
|
|
+ isShowPhoto = true;
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ isShowIDCard = true;
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ isShowPhone = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ mAdapter.setConfig(isShowPhoto, isShowIDCard, isShowPhone);
|
|
|
+ }*/
|
|
|
|
|
|
}
|
|
|
|
|
@@ -187,6 +215,10 @@ public class PersonnelDataActivity extends BaseActivity implements View.OnClickL
|
|
|
//关闭软键盘
|
|
|
KeyboardsUtils.hintKeyBoards(personnelData_inquire);
|
|
|
try {
|
|
|
+ if(mAdapter.getList() == null ||mAdapter.getList().size() ==0){
|
|
|
+ Toast.makeText(this, "暂无人员数据,请稍后重试~", Toast.LENGTH_SHORT).show();
|
|
|
+ return;
|
|
|
+ }
|
|
|
personnelData_input_search.setEnabled(false);
|
|
|
mAdapter.setList(searchList(id,cardNumber,name,idNumber,phone));
|
|
|
personnelData_RecyclerView.scrollToPosition(0);
|