| | |
| | | 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.getUsername()).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);
|