| | |
| | | import android.widget.Toast;
|
| | |
|
| | | import cn.com.basic.face.base.BaseApplication;
|
| | | import cn.com.basic.face.discern.query.condition.CheckInQueryCondition;
|
| | | import cn.com.basic.face.discern.query.item.PhoneCallQueryItem;
|
| | | import cn.com.basic.face.fragment.CheckInFragment;
|
| | | import cn.com.basic.face.util.AppApi;
|
| | |
|
| | |
| | | @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);
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.CHECK_IN_QUERY);
|
| | | if (isVisitorList) {
|
| | | params.addBodyParameter(VisitorQueryCondition.FieldNames.notCompanyId, BaseApplication.getInstance().getDevice().getCompanyId());
|
| | | params.addBodyParameter(CheckInQueryCondition.FieldNames.visitorCompanyId, BaseApplication.getInstance().getDevice().getCompanyId());
|
| | | } else {
|
| | | params.addBodyParameter(VisitorQueryCondition.FieldNames.companyId, BaseApplication.getInstance().getDevice().getCompanyId());
|
| | | params.addBodyParameter(CheckInQueryCondition.FieldNames.employeeCompanyId, BaseApplication.getInstance().getDevice().getCompanyId());
|
| | | }
|
| | | params.addBodyParameter(VisitorQueryCondition.FieldNames.name, searchText);
|
| | | params.addBodyParameter(CheckInQueryCondition.FieldNames.username, searchText);
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | List<CheckInQueryItem> list = getList(CheckInQueryItem.class);
|
| | |
| | | for (int i = 0; i < list.size(); i++) {
|
| | | CheckInQueryItem item = list.get(i);
|
| | | if (isSortByDept) {
|
| | | name = CharacterParser.getInstance().getSelling(item.getDeptName()).substring(0, 1);
|
| | | if (item.getDeptName() != null && item.getDeptName().length() > 0) {
|
| | | name = CharacterParser.getInstance().getSelling(item.getDeptName()).substring(0, 1);
|
| | | }
|
| | | } else {
|
| | | if (item.getUsername() != null && item.getUsername().length() > 0)
|
| | | name = CharacterParser.getInstance().getSelling(item.getUsername()).substring(0, 1);
|
| | | }
|
| | | if (!name.equals(prev)) {
|
| | |
| | | if (isVisitorList) {
|
| | | CheckInFragment.getInstance().get_fragment_check_in_left_visitor().show(allItems);
|
| | | } else {
|
| | | CheckInFragment.getInstance().get_fragment_check_in_left_interviewee().show(allItems);
|
| | | CheckInFragment.getInstance().get_fragment_check_in_left_interviewee().show(allItems, isSortByDept);
|
| | | }
|
| | | }
|
| | | });
|
| | |
| | | String dept1Name = t1.getDeptName()==null?"":t1.getDeptName();
|
| | | String dept2Name = t2.getDeptName()==null?"":t2.getDeptName();
|
| | | if(!dept1Name.equals(dept2Name)) {
|
| | | String dept1Name_a = CharacterParser.getInstance().getSelling(dept1Name).toLowerCase();
|
| | | String dept1Name_b = CharacterParser.getInstance().getSelling(dept2Name).toLowerCase();
|
| | | String dept1Name_a = dept1Name.trim();
|
| | | String dept1Name_b = dept2Name.trim();
|
| | | if (dept1Name_a.length() > 0 && dept1Name_b.length() > 0) {
|
| | | dept1Name_a = CharacterParser.getInstance().getSelling(dept1Name).toLowerCase();
|
| | | dept1Name_b = CharacterParser.getInstance().getSelling(dept2Name).toLowerCase();
|
| | | }
|
| | | return dept1Name_a.compareTo(dept1Name_b);
|
| | | }
|
| | | }
|
| | | 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();
|
| | | String dept1Name_a = name1.trim();
|
| | | String dept1Name_b = name2.trim();
|
| | | if (dept1Name_a.length() > 0 && dept1Name_b.length() > 0) {
|
| | | dept1Name_a = CharacterParser.getInstance().getSelling(name1).toLowerCase();
|
| | | dept1Name_b = CharacterParser.getInstance().getSelling(name2).toLowerCase();
|
| | | }
|
| | | return dept1Name_a.compareTo(dept1Name_b);
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | |
|
| | | }
|