Package com.iteye.tianshi.web.model.support

Examples of com.iteye.tianshi.web.model.support.RankCache


      ownership.put("_lv_7", 0);
      ownership.put("_lv_8", 0);
      List<TDistributor> all = null;
      List<TDistributor> indirect = null;
      for(TDistributor child : dirchildList){
        RankCache initCache = new RankCache();
        /**查询出child下的所有子节点(包括间接节点+直接节点),TODO:这里是个大批量的操作,以后需要优化,目前没有解决思路*/
        all = tDistributorService.findAllDirChildrenDistributors(child.getId(), child.getFloors()+1);/**所有直接子节点*/
        indirect = tDistributorService.findAllIndirChildrenDistributors(child.getId(), child.getFloors()+1);
        all.addAll(indirect); /**加入所有间接子节点*/
        all.add(child);/**加入当前节点*/
        for(TDistributor tt:all){/**遍历当前节点*/
          Long rank = tgMap.get(tt.getDistributorCode()).getRank();/**从tgGrade里获取,不能从TDistributor获取,因为还没有入库*/
          if(rank==ConstantUtil._lev_3){
            initCache.set_lv_3(true);
          }else if(rank==ConstantUtil._lev_4){
            initCache.set_lv_4(true);
          }else if(rank==ConstantUtil._lev_5){
            initCache.set_lv_5(true);
          }else if(rank==ConstantUtil._lev_6){
            initCache.set_lv_6(true);
          }else if(rank==ConstantUtil._lev_7){
            initCache.set_lv_7(true);
          }else if(rank==ConstantUtil._lev_8){
            initCache.set_lv_8(true);
          }
          tt = null;
        }
        /**处理缓存内结果,填充到ownership里面计算各个分支的职级个数*/
        if(initCache.is_lv_3()){
          ownership.put("_lv_3",ownership.get("_lv_3")+1);
        }
        if(initCache.is_lv_4()){
          ownership.put("_lv_4",ownership.get("_lv_4")+1);
        }
        if(initCache.is_lv_5()){
          ownership.put("_lv_5",ownership.get("_lv_5")+1);
        }
        if(initCache.is_lv_6()){
          ownership.put("_lv_6",ownership.get("_lv_6")+1);
        }
        if(initCache.is_lv_7()){
          ownership.put("_lv_7",ownership.get("_lv_7")+1);
        }
        if(initCache.is_lv_8()){
          ownership.put("_lv_8",ownership.get("_lv_8")+1);
        }
        /**职级在每个网络分支中的个数计算完毕,清理引用*/
        initCache = null;
        all = null;
View Full Code Here

TOP

Related Classes of com.iteye.tianshi.web.model.support.RankCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.