public static ArrayList<GroupReport> queryTaskRoadCode(String req){ TaskDao taskDao = DaoFactory.getInstance().getTaskDao(); Connection conn = DaoFactory.getInstance().getConnection(); ArrayList<GroupReport> taskRoadCodeList = null; try { taskRoadCodeList = taskDao.queryTaskRoadCodeList(conn, req); for(int i=0;i<taskRoadCodeList.size()-1;i++){ for(int j=taskRoadCodeList.size()-1;j>i;j--){ if(taskRoadCodeList.get(j).getRoadCode().equals(taskRoadCodeList.get(i).getRoadCode())){ taskRoadCodeList.remove(j); } } } if(taskRoadCodeList!=null){ return taskRoadCodeList; } } catch (Exception e) { e.printStackTrace(); } finally { DaoFactory.getInstance().closeConnection(conn); } return null; }
去掉list重复元素,list查询
猜你喜欢
转载自ohmyg.iteye.com/blog/2248988
今日推荐
周排行