模仿

来源:互联网 发布:淘宝刷逆战刷星 编辑:程序博客网 时间:2024/04/30 11:21
public List<CsTableNameCustom>  skipToPolicyBatchDownload() throws BOException {   try {      List<CsTableNameCustom> forList=this.csPollcyMaintDao.getCsTableName();      List<CsPolicyTblCol> itemList = this.csPollcyMaintDao.getTableFieldName();      Map<Integer, List<CsPolicyTblCol>> itemMap = new HashMap<Integer,List<CsPolicyTblCol>>();      for(CsPolicyTblCol item : itemList) {         List<CsPolicyTblCol> newItemList = new ArrayList<CsPolicyTblCol>();         if(itemMap.containsKey(item.getCsAllPolicyNameTblRelId())) {            newItemList = itemMap.get(item.getCsAllPolicyNameTblRelId());         }         newItemList.add(item);         itemMap.put(item.getCsAllPolicyNameTblRelId(), newItemList);      }           for(CsTableNameCustom fo : forList) {         if(itemMap.containsKey(fo.getCsAllPolicyNameTblRelId())) {            fo.setList(itemMap.get(fo.getCsAllPolicyNameTblRelId()));         }      }      return  forList;   } catch (Exception e) {           e.printStackTrace();           throw new BOException(e.getMessage(),e);             }}

原创粉丝点击