List<VO>转成List<Map>
List<A01090021BatchAddCheckVO> list = (ArrayList<A01090021BatchAddCheckVO>) result.get("list"); if (ValidateUtil.isEmpty(list)) {//上传成功但list为空会进入这里 setMsg("您上传的文件内容为空,请核对后重新上传!", "error"); setSuccess(false); return JSON; } List<Map> succList = new ArrayList(); //返回成功信息 List<Map> errorList = new ArrayList(); //返回失败信息 //将List<VO>转成List<Map> Iterator<A01090021BatchAddCheckVO> iterator = list.iterator(); A01090021BatchAddCheckVO vo; while (iterator.hasNext()){ vo = iterator.next(); succList.add(vo.toMap()); }