public String dailySaleExcelList() {
    try {
      if (dailySaleS == null) {
        dailySaleS = new DailySale();

        // before 1 days default search
        dailySaleS.setStartDate(DateUtil.getAddDay(-7, "yyyy-MM-dd"));
        dailySaleS.setEndDate(DateUtil.getAddDay(0, "yyyy-MM-dd"));
      }

      Session session = (Session) SessionUtil.getMemberSession(this.req);
      dailySaleS.setMbrNo(session.getMbrNo());

      SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
      String yyyymmdd = sdf.format(new Date());

      // TODO 조회기간 무력화, 페이징 조건 무력화는 commonDao에서 처리되도록 되어 있슴
      this.setDownloadFile(
          this.service.dailySaleExcelList(this.dailySaleS),
          "application/vnd.ms-excel; charset=UTF-8",
          "DailySale-" + yyyymmdd + ".xls");
      return SUCCESS;

    } catch (Exception e) {
      e.printStackTrace();
    }
    return SUCCESS;
  }
  /**
   * <b>Action</b> Settlement Management :
   *
   * @return
   */
  public String dailySaleList() {
    if (dailySaleS == null) {
      dailySaleS = new DailySale();

      // before 1 days default search
      dailySaleS.setStartDate(DateUtil.getAddDay(-7, "yyyy-MM-dd"));
      dailySaleS.setEndDate(DateUtil.getAddDay(0, "yyyy-MM-dd"));
    }

    Session session = (Session) SessionUtil.getMemberSession(this.req);
    dailySaleS.setMbrNo(session.getMbrNo());
    dailySaleList = service.dailySaleList(dailySaleS);
    totalCount = ((PagenateList) dailySaleList).getTotalCount();

    return SUCCESS;
  }
Exemple #3
0
  /**
   * 기준년(flagYear) 부터 현재년+plusYear 를 담은 Map 을 리턴
   *
   * @param flagYear
   * @param plusYear
   * @return
   */
  public static Map<String, String> getYearMap(int flagYear, int plusYear) {
    Map<String, String> map = new LinkedHashMap<String, String>();
    int toYear = Integer.parseInt(DateUtil.getYYYY(new Date())) + plusYear;

    for (int i = flagYear; i < toYear; i++) {
      map.put("" + i, "" + i);
    }
    return map;
  }