xuxiuxi
2017-04-11 b85f1dfc0010d91c5792287bf68c5cc241c8a110
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/service/PhoneCallMng.java
@@ -28,16 +28,20 @@
        x.http().post(params, new BaseCommonCallBack() {
            public void success() {
                List<PhoneCallQueryItem> list = getList(PhoneCallQueryItem.class);
                sort(list, isSortByDept);
                //sort(list, isSortByDept);
                List allItems = new ArrayList();
                String name = "";
                String prev = "";
                for (int i = 0; i < list.size(); i++) {
                    PhoneCallQueryItem item = list.get(i);
                    if (isSortByDept) {
                        name = CharacterParser.getInstance().getSelling(item.getDeptName()).substring(0, 1);
                    } else {
                        name = CharacterParser.getInstance().getSelling(item.getName()).substring(0, 1);
                    try {
                        if (isSortByDept) {
                            //name = CharacterParser.getInstance().getSelling(item.getDeptName()).substring(0, 1);
                        } else {
                            //name = CharacterParser.getInstance().getSelling(item.getUsername()).substring(0, 1);
                        }
                    } catch (Exception e) {
                    }
                    if (!name.equals(prev)) {
                        allItems.add(name);
@@ -63,8 +67,8 @@
                        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);