Example #1
0
  public Map<String, Object> getThisTmkResult(Ryxx ryxx, FzxDto fzx) {
    String yearMonthString = DateUtils.getCurYearMonthString();
    Map<String, Object> result = new HashMap<String, Object>();
    RC rc = new RC();
    rc.setFzx(fzx);
    rc.setRyxx(ryxx);

    result.put(TmkUtilsBaseVo.TMK_TOTAL, tmkUtilsDao.getAllMyCustomerCount(rc));

    result.put(
        TmkUtilsBaseVo.TMK_ADDED,
        tmkUtilsDao.getAddedMyCustomerCountInThisMonth(rc, yearMonthString));

    result.put(
        TmkUtilsBaseVo.TMK_CAME,
        tmkUtilsDao.getMyHasComeCustomerCountInThisMonth(rc, yearMonthString));

    result.put(
        TmkUtilsBaseVo.TMK_TARGET,
        tmkUtilsDao.getMyComeCustomerTargetInThisMonth(rc, yearMonthString));

    result.put(TmkUtilsBaseVo.TMK_FROM_EXTPOOL, tmkUtilsDao.getTodayFromExtPool(ryxx, fzx));
    result.put(TmkUtilsBaseVo.TMK_FROM_TMKPOOL, tmkUtilsDao.getTodayFromTmkPool(ryxx, fzx));
    return result;
  }
Example #2
0
 /**
  * 缓存每个TMK的统计数据
  *
  * @param yearMonthString
  */
 private void cacheEveryTmkCount(String yearMonthString) {
   List<RC> tmks = ryxxDao.getRyxxCenterByRole(Role.ROLE_MARKET_TMK_WORKER);
   for (RC rc : tmks) {
     Integer tmkTotal = tmkUtilsDao.getAllMyCustomerCount(rc);
     this.putObjectInCache(
         tmkUtilsCountCache, this.getCacheKeyFromRC(rc), TmkUtilsBaseVo.TMK_TOTAL, tmkTotal);
     Integer tmkAdded = tmkUtilsDao.getAddedMyCustomerCountInThisMonth(rc, yearMonthString);
     this.putObjectInCache(
         tmkUtilsCountCache, this.getCacheKeyFromRC(rc), TmkUtilsBaseVo.TMK_ADDED, tmkAdded);
     Integer tmkCame = tmkUtilsDao.getMyHasComeCustomerCountInThisMonth(rc, yearMonthString);
     this.putObjectInCache(
         tmkUtilsCountCache, this.getCacheKeyFromRC(rc), TmkUtilsBaseVo.TMK_CAME, tmkCame);
     Integer tmkTarget = tmkUtilsDao.getMyComeCustomerTargetInThisMonth(rc, yearMonthString);
     this.putObjectInCache(
         tmkUtilsCountCache, this.getCacheKeyFromRC(rc), TmkUtilsBaseVo.TMK_TARGET, tmkTarget);
   }
 }