示例#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 downloadTemplate() throws Exception {

    List<BatchExceptionData> batchList = new ArrayList<BatchExceptionData>();

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("batchList", batchList);

    String srcFileName = "batch-exception-data.xls";
    String fileName = "模板.xls";

    ReportUtils.downLoadReport(map, srcFileName, fileName, response);

    return null;
  }
示例#3
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;
  }
示例#4
0
  /**
   * 下载异常数据
   *
   * @return
   * @throws Exception
   */
  @SuppressWarnings("unchecked")
  public String downloadExceptionData() throws Exception {

    List<BatchExceptionData> batchList = new ArrayList<BatchExceptionData>();

    Object obj = request.getSession().getAttribute(BATCH_EXCEPTION_DATA);
    if (obj != null) {

      batchList = (List<BatchExceptionData>) obj;
    }

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("batchList", batchList);

    map.put("message", "异常信息");

    String srcFileName = "batch-exception-data.xls";
    String fileName = "异常数据.xls";

    ReportUtils.downLoadReport(map, srcFileName, fileName, response);

    return null;
  }