git-svn-id: http://192.168.1.226/svn/proxy@560 454eff88-639b-444f-9e54-f578c98de674
| | |
| | | fragment_check_in_left_visitor_row_photo.setImageResource(R.drawable.u68);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | 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() {
|
| | |
| | | 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);
|
| | | }
|
| | | });
|
New file |
| | |
| | | package cn.com.basic.face.service;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import cn.com.basic.face.discern.common.CommonVariables;
|
| | |
|
| | | public class BaseMng {
|
| | |
|
| | | public void addPageFooter(boolean hasMorePages, int pageNum, List list) {
|
| | | if (hasMorePages) {
|
| | | list.add(CommonVariables.Page.hasMorePages);
|
| | | } else {
|
| | | if (pageNum > 1) {
|
| | | list.add(CommonVariables.Page.reachBottom);
|
| | | } else {
|
| | | if (list.size() > 0) {
|
| | | list.add(CommonVariables.Page.reachBottom);
|
| | | } else {
|
| | | //itemList.add(CommonVariables.Page.noMorePage);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | 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();
|
| | |
|
| | |
| | | }
|
| | |
|
| | | 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);
|
| | | }
|
| | | }
|
| | | });
|
| | |
| | | import cn.com.basic.face.util.AppApi;
|
| | | import cn.com.basic.face.util.CharacterParser;
|
| | |
|
| | | public class PhoneCallMng {
|
| | | public class PhoneCallMng extends BaseMng {
|
| | |
|
| | | private static PhoneCallMng instance = new PhoneCallMng();
|
| | | public static PhoneCallMng getInstance() {
|
| | |
| | | }
|
| | | }
|
| | | sort(list, isSortByDept);
|
| | | List allItems = new ArrayList();
|
| | | List itemList = new ArrayList();
|
| | | String name = "";
|
| | | String prev = "";
|
| | | for (int i = 0; i < list.size(); i++) {
|
| | |
| | |
|
| | | }
|
| | | 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);
|
| | | }
|
| | | }
|
| | | }
|
| | | PhoneCallFragment.getInstance().get_fragment_phone_call_left_list_view().show(isSortByDept, allItems, append);
|
| | | addPageFooter(hasMorePages(), getPageNum(), itemList);
|
| | | PhoneCallFragment.getInstance().get_fragment_phone_call_left_list_view().show(isSortByDept, itemList, append);
|
| | | }
|
| | | });
|
| | | }
|
| | |
| | | package cn.com.basic.face.service;
|
| | |
|
| | | import android.graphics.Bitmap;
|
| | | import android.util.Base64;
|
| | |
|
| | | import org.xutils.http.RequestParams;
|
| | |
| | |
|
| | | prevList.addAll(0, newList);
|
| | |
|
| | | fillBlank(prevList, doubleList);
|
| | | registerTopAndCheckInBottom(prevList, doubleList);
|
| | |
|
| | | SurveillanceFragment.getInstance().get_fragment_supervisory_bottom_visit_list_view().show(doubleList, true);
|
| | | }
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | private void fillBlank(List<SurveillanceQueryItem> list, List<SurveillanceQueryItem> doubleList) {
|
| | | private void registerTopAndCheckInBottom(List<SurveillanceQueryItem> list, List<SurveillanceQueryItem> doubleList) {
|
| | | doubleList.clear();
|
| | | List<SurveillanceQueryItem> registerList = new ArrayList<SurveillanceQueryItem>();
|
| | | List<SurveillanceQueryItem> checkInList = new ArrayList<SurveillanceQueryItem>();
|
| | | removeDuplicate(list);
|
| | | removeDuplicateCheckIn(list);
|
| | | int maxRegister = 20;
|
| | | int i1 = 0, j = 0;
|
| | | int maxCheckIn = 20;
|
| | |
| | |
|
| | | }
|
| | |
|
| | | private void removeDuplicate(List<SurveillanceQueryItem> list) {
|
| | | private void removeDuplicateCheckIn(List<SurveillanceQueryItem> list) {
|
| | | List itemsToRemove = new ArrayList();
|
| | | Set<String> registerIds = new HashSet<>();
|
| | | for (SurveillanceQueryItem item : list) {
|
| | |
| | | import cn.com.basic.face.discern.query.item.VisitQueryItem;
|
| | | import cn.com.basic.face.util.AppApi;
|
| | |
|
| | | public class VisitMng {
|
| | | public class VisitMng extends BaseMng {
|
| | |
|
| | | private static VisitMng instance = new VisitMng();
|
| | | public static VisitMng getInstance() {
|
| | |
| | | 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);
|
| | | cn.com.basic.face.fragment.VisitFragment.getInstance().get_fragment_visit_left_list_view().show(itemList, append);
|
| | | }
|
| | | });
|
| | |
| | | </RelativeLayout>
|
| | |
|
| | | <View
|
| | | android:id="@+id/fragment_check_in_left_visitor_row_line"
|
| | | android:layout_width="match_parent"
|
| | | android:layout_height="@dimen/view_size_1"
|
| | | android:background="@color/colorText_b"/>
|
| | |
| | | android:layout_marginBottom="20dp"
|
| | | android:layout_width="match_parent"
|
| | | android:layout_height="wrap_content"
|
| | | android:text="已全部加载"
|
| | | android:text=""
|
| | | android:gravity="center"
|
| | | />
|
| | | <!--已全部加载-->
|
| | | </LinearLayout> |