| | |
| | | }
|
| | |
|
| | | public void add(RequestParams params) {
|
| | | params.setUri(AppApi.BASE_URL +AppApi.CHECK_IN_ADD);
|
| | | params.setUri(AppApi.BASE_URL +AppApi.VISIT_ADD);
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | @Override
|
| | | public void success() {
|
| | | Toast.makeText(BaseApplication.getInstance(),"添加成功", Toast.LENGTH_SHORT).show();
|
| | | CheckInFragment.getInstance().resetForm();
|
| | | }
|
| | | });
|
| | | }
|
| | |
| | | public void findCheckInLeftList(final boolean isVisitorList, final boolean isSortByDept, String searchText) {
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.REGISTER_QUERY);
|
| | | if (isVisitorList) {
|
| | | params.addBodyParameter(VisitorQueryCondition.FieldNames.notCompanyId, BaseApplication.getInstance().getPlace().getCompanyId());
|
| | | params.addBodyParameter(VisitorQueryCondition.FieldNames.notCompanyId, BaseApplication.getInstance().getDevice().getCompanyId());
|
| | | } else {
|
| | | params.addBodyParameter(VisitorQueryCondition.FieldNames.companyId, BaseApplication.getInstance().getPlace().getCompanyId());
|
| | | params.addBodyParameter(VisitorQueryCondition.FieldNames.companyId, BaseApplication.getInstance().getDevice().getCompanyId());
|
| | | }
|
| | | params.addBodyParameter(VisitorQueryCondition.FieldNames.name, searchText);
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | |
| | | if (isSortByDept) {
|
| | | name = CharacterParser.getInstance().getSelling(item.getDeptName()).substring(0, 1);
|
| | | } else {
|
| | | name = CharacterParser.getInstance().getSelling(item.getName()).substring(0, 1);
|
| | | name = CharacterParser.getInstance().getSelling(item.getUsername()).substring(0, 1);
|
| | | }
|
| | | if (!name.equals(prev)) {
|
| | | allItems.add(name);
|
| | |
| | | return dept1Name_a.compareTo(dept1Name_b);
|
| | | }
|
| | | }
|
| | | String name1 = t1.getName()==null?"":t1.getName();
|
| | | String name2 = t2.getName()==null?"":t2.getName();
|
| | | String name1 = t1.getUsername()==null?"":t1.getUsername();
|
| | | String name2 = t2.getUsername()==null?"":t2.getUsername();
|
| | | String dept1Name_a = CharacterParser.getInstance().getSelling(name1).toLowerCase();
|
| | | String dept1Name_b = CharacterParser.getInstance().getSelling(name2).toLowerCase();
|
| | | return dept1Name_a.compareTo(dept1Name_b);
|