| | |
| | | import cn.com.basic.face.discern.query.item.CheckInQueryItem;
|
| | | import cn.com.basic.face.util.CharacterParser;
|
| | |
|
| | | public class CheckInMng {
|
| | | public class CheckInMng extends BaseMng {
|
| | |
|
| | | public static CheckInMng instance = new CheckInMng();
|
| | |
|
| | |
| | | }
|
| | | params.addBodyParameter(CheckInQueryCondition.FieldNames.username, searchText);
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_NUM, pageNum+"");
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_SIZE, "20");
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_SIZE, CommonVariables.Page.DEFAULT_PAGE_SIZE);
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | List<CheckInQueryItem> list = getList(CheckInQueryItem.class);
|
| | |
| | | }
|
| | |
|
| | | sort(list, isSortByDept);
|
| | | List allItems = new ArrayList();
|
| | | List itemList = new ArrayList();
|
| | | String name = "";
|
| | | String prev = "";
|
| | | for (int i = 0; i < list.size(); i++) {
|
| | |
| | | name = CharacterParser.getInstance().getSelling(item.getUsername()).substring(0, 1);
|
| | | }
|
| | | if (!name.equals(prev)) {
|
| | | allItems.add(name);
|
| | | itemList.add(name);
|
| | | }
|
| | | allItems.add(item);
|
| | | itemList.add(item);
|
| | | prev = name;
|
| | | }
|
| | | if (hasMorePages()) {
|
| | | allItems.add(CommonVariables.Page.hasMorePages);
|
| | | } else {
|
| | | if (getPageNum() > 1) {
|
| | | allItems.add(CommonVariables.Page.reachBottom);
|
| | | } else {
|
| | | if (allItems.size() > 0) {
|
| | | allItems.add(CommonVariables.Page.reachBottom);
|
| | | } else {
|
| | | allItems.add(CommonVariables.Page.noMorePage);
|
| | | }
|
| | | }
|
| | | }
|
| | | addPageFooter(hasMorePages(), getPageNum(), itemList);
|
| | | if (isVisitorList) {
|
| | | CheckInFragment.getInstance().get_fragment_check_in_left_visitor().show(allItems);
|
| | | CheckInFragment.getInstance().get_fragment_check_in_left_visitor().show(itemList);
|
| | | } else {
|
| | | CheckInFragment.getInstance().get_fragment_check_in_left_interviewee().show(allItems, isSortByDept, append);
|
| | | CheckInFragment.getInstance().get_fragment_check_in_left_interviewee().show(itemList, isSortByDept, append);
|
| | | }
|
| | | }
|
| | | });
|