Search in sources :

Example 1 with ExportAllLMExcel

use of com.kendy.excel.ExportAllLMExcel in project financial by greatkendy123.

the class LMController method exportAllClubAction.

/**
 * 导出所有俱乐部总帐单
 * 由沈美女负责提供接口
 *
 * @author 沈佳琳
 * @param event
 */
public void exportAllClubAction(ActionEvent event) {
    // 事先判断
    int size = allClubMap.size();
    if (allClubMap == null || allClubMap.size() == 0) {
        ShowUtil.show("无数据可以导出");
        return;
    }
    Map<String, List<Record>> current_LM_Map = LMTotalList.get(getCurrentLMType() - 1);
    if (MapUtil.isNullOrEmpty(current_LM_Map)) {
        ShowUtil.show("该联盟无数据可以导出");
        return;
    }
    // 组装当前要展示的联盟的相应俱乐部
    Map<String, Club> lmClubMap = getLMClub(current_LM_Map);
    // 获取所有俱乐部统计结果
    Map<String, List<LMSumInfo>> sumMap = getAllClubSumMap(current_LM_Map);
    // 计算总桌费
    int sumOfZF = getSumOfZF().intValue();
    try {
        // 调用佳琳的接口
        ExportAllLMExcel exportAllLMExcel = new ExportAllLMExcel();
        boolean hasExported = exportAllLMExcel.export(sumMap, lmClubMap, sumOfZF);
        if (hasExported)
            log.info("导出所有联盟总帐单完成!");
    } catch (Exception e) {
        ErrorUtil.err("导出Excel失败", e);
    }
}
Also used : Club(com.kendy.entity.Club) List(java.util.List) ObservableList(javafx.collections.ObservableList) ArrayList(java.util.ArrayList) ExportAllLMExcel(com.kendy.excel.ExportAllLMExcel)

Aggregations

Club (com.kendy.entity.Club)1 ExportAllLMExcel (com.kendy.excel.ExportAllLMExcel)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 ObservableList (javafx.collections.ObservableList)1