/**
   * @see
   *     org.kuali.kfs.module.bc.document.service.BudgetConstructionAccountSummaryReportService#buildReports(java.lang.Integer,
   *     java.util.Collection)
   */
  public Collection<BudgetConstructionOrgAccountSummaryReport> buildReports(
      Integer universityFiscalYear, String principalName, boolean consolidated) {
    Collection<BudgetConstructionOrgAccountSummaryReport> reportSet = new ArrayList();
    Collection<BudgetConstructionAccountSummary> accountSummaryList =
        budgetConstructionReportsServiceHelper.getDataForBuildingReports(
            BudgetConstructionAccountSummary.class, principalName, buildOrderByList());

    // Making a list with same organizationChartOfAccountsCode, organizationCode,
    // chartOfAccountsCode, subFundGroupCode
    List totalList =
        BudgetConstructionReportHelper.deleteDuplicated(
            (List) accountSummaryList, fieldsForTotal());

    // Calculate Total Section
    List<BudgetConstructionOrgAccountSummaryReportTotal> orgAccountSummaryReportTotalList =
        calculateTotal((List) accountSummaryList, totalList);

    // builds report
    for (BudgetConstructionAccountSummary accountSummaryEntry : accountSummaryList) {
      BudgetConstructionOrgAccountSummaryReport orgAccountSummaryReportEntry =
          new BudgetConstructionOrgAccountSummaryReport();
      buildReportsHeader(
          universityFiscalYear, orgAccountSummaryReportEntry, accountSummaryEntry, consolidated);
      buildReportsBody(orgAccountSummaryReportEntry, accountSummaryEntry);
      buildReportsTotal(
          orgAccountSummaryReportEntry, accountSummaryEntry, orgAccountSummaryReportTotalList);
      reportSet.add(orgAccountSummaryReportEntry);
    }

    return reportSet;
  }
  /**
   * @see
   *     org.kuali.kfs.module.bc.document.service.BudgetConstructionLevelSummaryReportService#buildReports(java.lang.Integer,
   *     java.util.Collection)
   */
  public Collection<BudgetConstructionOrgLevelSummaryReport> buildReports(
      Integer universityFiscalYear, String principalName) {
    Collection<BudgetConstructionOrgLevelSummaryReport> reportSet = new ArrayList();

    BudgetConstructionOrgLevelSummaryReport orgLevelSummaryReportEntry;
    Collection<BudgetConstructionLevelSummary> levelSummaryList =
        budgetConstructionReportsServiceHelper.getDataForBuildingReports(
            BudgetConstructionLevelSummary.class, principalName, buildOrderByList());

    // Making a list with same organizationChartOfAccountsCode, organizationCode,
    // chartOfAccountsCode, subFundGroupCode
    List listForCalculateCons =
        BudgetConstructionReportHelper.deleteDuplicated((List) levelSummaryList, fieldsForCons());
    List listForCalculateGexpAndType =
        BudgetConstructionReportHelper.deleteDuplicated(
            (List) levelSummaryList, fieldsForGexpAndType());
    List listForCalculateTotal =
        BudgetConstructionReportHelper.deleteDuplicated((List) levelSummaryList, fieldsForTotal());

    // Calculate Total Section
    List<BudgetConstructionOrgLevelSummaryReportTotal> levelSummaryTotalConsList =
        calculateConsTotal((List) levelSummaryList, listForCalculateCons);
    List<BudgetConstructionOrgLevelSummaryReportTotal> levelSummaryTotalGexpAndTypeList =
        calculateGexpAndTypeTotal((List) levelSummaryList, listForCalculateGexpAndType);
    List<BudgetConstructionOrgLevelSummaryReportTotal> levelSummaryTotalList =
        calculateTotal((List) levelSummaryList, listForCalculateTotal);

    for (BudgetConstructionLevelSummary levelSummaryEntry : levelSummaryList) {
      orgLevelSummaryReportEntry = new BudgetConstructionOrgLevelSummaryReport();
      buildReportsHeader(universityFiscalYear, orgLevelSummaryReportEntry, levelSummaryEntry);
      buildReportsBody(orgLevelSummaryReportEntry, levelSummaryEntry);
      buildReportsTotal(
          orgLevelSummaryReportEntry,
          levelSummaryEntry,
          levelSummaryTotalConsList,
          levelSummaryTotalGexpAndTypeList,
          levelSummaryTotalList);
      reportSet.add(orgLevelSummaryReportEntry);
    }

    return reportSet;
  }