Пример #1
0
 public List<TmkReportVo> getThisCenterEveryTmkReport(FzxDto fzx) {
   String yearMonthString = DateUtils.getCurYearMonthString();
   List<TmkReportVo> rvs = new ArrayList<TmkReportVo>();
   List<Ryxx> ryxxs = ryxxDao.getRyxxsByRole(Role.ROLE_MARKET_TMK_WORKER, fzx);
   for (Ryxx ryxx : ryxxs) {
     RC rc = new RC();
     rc.setRyxx(ryxx);
     rc.setFzx(fzx);
     TmkReportVo vo = new TmkReportVo();
     Integer target = tmkUtilsDao.getMyComeCustomerTargetInThisMonth(rc, yearMonthString);
     Integer finished = tmkUtilsDao.getMyHasComeCustomerCountInThisMonth(rc, yearMonthString);
     Integer money = tmkUtilsDao.getMyMoneyInThisMonth(rc, yearMonthString);
     vo.setMonthTarget(target);
     vo.setFinished(finished);
     vo.setName(rc.getRyxx().getYwm());
     vo.setRyxx(rc.getRyxx());
     vo.setMoney(money);
     vo.setRate(MathUtils.getPercentageString(finished, target));
     rvs.add(vo);
     // rvs.add((TmkReportVo) getObjectFromCache(tmkUtilsListCache, this
     // .getCacheKeyFromRyxxAndFzx(ryxx, fzx),
     // TmkUtilsBaseVo.TMK_REPORT));
   }
   return rvs;
 }
Пример #2
0
 public Map<CalendarDay, Map<Ryxx, BaseVo>> getEveryDayCameCustomersInOneMonth(
     FzxDto fzx, String yearMonthString) {
   List<Ryxx> tmks = ryxxDao.getRyxxsByRole(Role.ROLE_MARKET_TMK_WORKER, fzx);
   Map<CalendarDay, Map<Ryxx, BaseVo>> result = new TreeMap<CalendarDay, Map<Ryxx, BaseVo>>();
   List<CalendarDay> days =
       DateUtils.getDaysInOneMonth(DateUtils.parseDate("yyyyMM", yearMonthString));
   for (CalendarDay day : days) {
     result.put(day, new HashMap<Ryxx, BaseVo>());
     for (Ryxx tmk : tmks) {
       result.get(day).put(tmk, null);
     }
   }
   for (Ryxx tmk : tmks) {
     RC rc = new RC();
     rc.setRyxx(tmk);
     rc.setFzx(fzx);
     List<BaseVo> vs = tmkUtilsDao.getTmkCameCustomersInThisMonth(rc, yearMonthString);
     for (BaseVo v : vs) {
       CalendarDay cd = new CalendarDay(v.getSTime());
       if (result.containsKey(cd)) {
         result.get(cd).put(tmk, v);
       }
     }
   }
   return result;
 }