예제 #1
0
  public String download() throws Exception {

    String[] thx =
        new String[] {
          "选项", "楼层", "总套数", "总面积", "总金额(定价)", "均价", "总套数", "总面积", "总金额(定价)", "均价", "总套数", "总面积",
          "总金额(定价)", "均价", "余货比例", "成交套数", "成交面积", "成交金额", "均价", "签约套数", "签约面积", "签约金额", "均价",
          "签约率", "未签约套数", "未签约面积", "未签约金额", "均价", "总量", "面积", "金额", "均价", "剩余率"
        };
    final StringBuffer sb = new StringBuffer();

    sb.append(ContTable.TABLE_START).append(ContTable.TR_START);
    sb.append(
        "<th>产品类型</th><th></th>"
            + "<th colspan='4'>总货量</th>"
            + "<th colspan='4'>推出货量</th>"
            + "<th colspan='5'>总剩余货量</th>"
            + "<th colspan='4'>认购情况</th>"
            + "<th colspan='5'>已签约情况</th>"
            + "<th colspan='4'>未签约情况</th>"
            + "<th colspan='5'>推出剩余货量</th>");

    sb.append(ContTable.TR_END).append(ContTable.TR_START);
    for (String th : thx) {
      sb.append(ContTable.TH_START).append(th).append(ContTable.TH_END);
    }
    sb.append(ContTable.TR_END);
    sb.append((String) request.getSession().getAttribute("showTrs"));
    sb.append(ContTable.TALBE_END);
    String fileName = "download-" + CustomerUtils.getNowForString() + "-.xls";
    ReportUtils.downLoadReport(sb.toString(), fileName, response);

    return SUCCESS;
  }
예제 #2
0
  /**
   * 下载
   *
   * @return
   * @throws Exception
   */
  public String download() throws Exception {
    List<Map<String, String>> dataList =
        (List<Map<String, String>>)
            request
                .getSession()
                .getAttribute(
                    ContSessionAttribute.XSGJQK_KUGJLB + ContSessionAttribute.DOWNLOAD_DATA);
    Map<String, Object> map = new HashMap<String, Object>();
    map.put("dataList", dataList);

    ReportUtils.downLoadReport(
        map,
        "customer-user-follow-customer-msg.xls",
        "download-客户跟进详细列表-销售-" + CustomerUtils.getNowForString() + "-.xls",
        response);

    return null;
  }
예제 #3
0
  @SuppressWarnings("unchecked")
  public String downLoadWeek() throws Exception {

    try {
      HttpSession session = request.getSession();

      Object getObject = session.getAttribute("saleTypeList");
      List<SaleMonitor> getList = new ArrayList<SaleMonitor>();
      if (getObject != null) {
        getList = (List<SaleMonitor>) getObject;
      }

      HengDaUtils.downLoadTemplate(
          "saleTypeList",
          getList,
          "saleType.xls",
          "download-" + CustomerUtils.getNowForString() + "-.xls",
          response);

    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }