日期:2014-05-17 浏览次数:20699 次
{DESCRIPT=客户待接收, URL=CustomerReceivingAction!toCustomerReceivingList.action?status=1, COUNTS=1}
{DESCRIPT=意向跟进待制定计划, URL=intention/IntentionPlanAction!toIntentionPlanEditList.action?IS_TASK=0, COUNTS=0}
{DESCRIPT=关系维护待回访, URL=relationmaintenance/IntentionVisitAction!toVisitList.action, COUNTS=2}
{DESCRIPT=客户审核不通过, URL=CustomerCollecAction!toCustomerCollecAddList.action?status=1, COUNTS=1}
{DESCRIPT=意向跟进计划审核未通过,URL=IntentionPlanAction!toIntentionPlanEditList.action?status=1, COUNTS=3}
{DESCRIPT=成交促进回访审核未通过, URL=promote/ItentionFollowAction!toIntentionFollowList.action, COUNTS=1}
public static List<HashMap<String,String>> order(List<HashMap<String, String>> lst){
for (int i = 0; i < lst.size(); i++) { //遍历所有的MAP
HashMap<String, String> firMap = lst.get(i); //得到当前遍历到的MAP对象
if ("成交促进回访审核未通过".equals(firMap.get("DESCRIPT"))) { //如果前面的是审核不通过的,位置就不调换它的
continue;
}
for (int j = i+1; j < lst.size(); j++) { //如果不是审核不通过的,我们就到后面的MAP中去找,找到之后,调换位置
System.out.println(j);
HashMap<String,String> lastMap = lst.get(j);
System.out.println(lastMap.get("DESCRIPT"));
if ("成交促进回访审核未通过".equals(lastMap.get("DESCRIPT"))) { //如果这个是审核不通过的,位置就调换它的
HashMap<String, String> TempMap = null; //用来给两个MAP调换位置用
TempMap = firMap;
lst.set(i, lastMap);
lst.set(j, TempMap);
System.out.println(lst);
break;
}
}
}
return lst;
}