示例#1
0
 /**
  * 缓存分中心级别的统计数据
  *
  * @param yearMonthString
  */
 private void cacheCenterCount(String yearMonthString) {
   // 取得所有 有效的分中心
   List<Fzx> fzxs = fzxDao.getAllValid(true);
   for (Fzx center : fzxs) {
     FzxDto fzx = center.getFzxDto();
     // 分中心本月新增客户数
     Integer centerAdded =
         tmkUtilsDao.getThisCenterAddedCustomerCountInThisMonth(fzx, yearMonthString);
     this.putObjectInCache(
         tmkUtilsCountCache, fzx.getZdbm(), TmkUtilsBaseVo.CENTER_ADDED, centerAdded);
     // 分中心客户总数
     Integer centerTotal = tmkUtilsDao.getAllCustomerCountInThisCenter(fzx);
     this.putObjectInCache(
         tmkUtilsCountCache, fzx.getZdbm(), TmkUtilsBaseVo.CENTER_TOTAL, centerTotal);
     // 分中心本月到访客户数
     Integer centerCame =
         tmkUtilsDao.getThisCenterCustomerHasComeCountInThisMonth(fzx, yearMonthString);
     this.putObjectInCache(
         tmkUtilsCountCache, fzx.getZdbm(), TmkUtilsBaseVo.CENTER_CAME, centerCame);
     // 分中心到访目标
     Integer centerTarget =
         tmkUtilsDao.getThisCenterCameCustomerTargetInThisMonth(fzx, yearMonthString);
     this.putObjectInCache(
         tmkUtilsCountCache, fzx.getZdbm(), TmkUtilsBaseVo.CENTER_TARGET, centerTarget);
   }
 }
示例#2
0
 public Map<String, Object> getThisCenterTmksResutlt(Ryxx ryxx, FzxDto fzx) {
   String yearMonthString = DateUtils.getCurYearMonthString();
   Map<String, Object> result = new HashMap<String, Object>();
   result.put(TmkUtilsBaseVo.CENTER_TOTAL, tmkUtilsDao.getAllCustomerCountInThisCenter(fzx));
   result.put(
       TmkUtilsBaseVo.CENTER_ADDED,
       tmkUtilsDao.getThisCenterAddedCustomerCountInThisMonth(fzx, yearMonthString));
   result.put(
       TmkUtilsBaseVo.CENTER_TARGET,
       tmkUtilsDao.getThisCenterCameCustomerTargetInThisMonth(fzx, yearMonthString));
   result.put(
       TmkUtilsBaseVo.CENTER_CAME,
       tmkUtilsDao.getThisCenterCustomerHasComeCountInThisMonth(fzx, yearMonthString));
   return result;
 }