按照grouip分组,之后分组调用生成正式凭证 的接口 Map<String, List<OperatingLogVO>> resultMap = new HashMap<String, List<OperatingLogVO>>(); try{ for(OperatingLogVO tmExcpNew : list){ if(resultMap.containsKey(tmExcpNew.getGroupid())){ resultMap.get(tmExcpNew.getGroupid()).add(tmExcpNew); }else{//map中不存在,新建key,用来存放数据 List<OperatingLogVO> tmpList = new ArrayList<OperatingLogVO>(); tmpList.add(tmExcpNew); resultMap.put(tmExcpNew.getGroupid(), tmpList); } } }catch(Exception e){ Logger.error("====定时任务集中生产凭证分组异常===" + e.getMessage()); }