public List<Operator> sx(List<Operator> list) {
List<Operator> sxList = new ArrayList<Operator>();
for (int i = 0; i < list.size(); i++) {
long time = System.currentTimeMillis();
if (time > Long.parseLong(list.get(i).getAutoTransferTime())
&& time < Long.parseLong(list.get(i).getAutoTransterEndTime())) {
Map<String, Object> map2 = new HashMap<String, Object>();
map2.put("autoTransferService", list.get(i).getAutoTransferService());
List<Operator> transferList1 = operatorService.selectTransferByTelphone(map2);
if (transferList1 == null || transferList1.isEmpty()) {
System.err.println("没有找到此客服!");
} else {
list.remove(i);
sxList.add(transferList1.get(0));
}
} else {
sxList.add(list.get(i));
}
}
for (Operator sxLists : sxList) {
long time = System.currentTimeMillis();
if (time > Long.parseLong(sxLists.getAutoTransferTime())
&& time < Long.parseLong(sxLists.getAutoTransterEndTime())) {
sx(sxList);
}
}
return sxList;
}