| | |
| | | import cn.com.basic.face.util.AppApi;
|
| | | import cn.com.basic.face.util.DateUtil;
|
| | |
|
| | | public class AttendanceMng {
|
| | | public class AttendanceMng extends BaseMng{
|
| | |
|
| | | private static AttendanceMng instance = new AttendanceMng();
|
| | | public static AttendanceMng getInstance() {
|
| | |
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.ATTENDANCE_QUERY);
|
| | | params.addBodyParameter(AttendanceQueryCondition.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<AttendanceQueryItem> list = getList(AttendanceQueryItem.class);
|
| | |
| | | itemList.add(item);
|
| | | i++;
|
| | | }
|
| | | if (hasMorePages()) {
|
| | | itemList.add(CommonVariables.Page.hasMorePages);
|
| | | } else {
|
| | | if (getPageNum() > 1) {
|
| | | itemList.add(CommonVariables.Page.reachBottom);
|
| | | } else {
|
| | | if (itemList.size() > 0) {
|
| | | itemList.add(CommonVariables.Page.reachBottom);
|
| | | } else {
|
| | | itemList.add(CommonVariables.Page.noMorePage);
|
| | | }
|
| | | }
|
| | | }
|
| | | addPageFooter(hasMorePages(), getPageNum(), itemList);
|
| | | AttendanceFragment.getInstance().get_fragment_attendance_left_list_view().show(itemList, append);
|
| | | }
|
| | | });
|