Search in sources :

Example 6 with TGTeamInfo

use of com.kendy.entity.TGTeamInfo in project financial by greatkendy123.

the class TGController method getTeamButton.

/**
 * 获取动态的团队按钮
 *
 * @time 2018年3月7日
 * @param teamId
 * @return
 */
private Button getTeamButton(String teamId) {
    Button teamBtn = new Button(teamId);
    teamBtn.setPrefWidth(90);
    teamBtn.setOnAction(event -> {
        // 清空数据
        clearWhenChangeTeamBtn();
        currentTGTeamLabel.setText(teamId);
        // 获取代理查询的团队数据
        final List<ProxyTeamInfo> proxyTeamInfoList = getProxyTeamInfoList(teamId);
        // 转化为托管公司的团队数据
        List<TGTeamInfo> tgTeamList = convert2TGTeamInfo(teamId, proxyTeamInfoList);
        tableTGZhanji.setItems(FXCollections.observableArrayList(tgTeamList));
        // 设置团队合计
        refreshTableTGTeamSum();
        // 设置团队的托管回水比例、回保比例、服务费
        setTGTeamRateInfo(teamId);
    });
    return teamBtn;
}
Also used : ProxyTeamInfo(com.kendy.entity.ProxyTeamInfo) Button(javafx.scene.control.Button) TGTeamInfo(com.kendy.entity.TGTeamInfo)

Example 7 with TGTeamInfo

use of com.kendy.entity.TGTeamInfo in project financial by greatkendy123.

the class TGExportExcelService method getTeamZJExcelModel.

/**
 * 导出战绩明细
 * @return
 */
private TGExcelModel getTeamZJExcelModel(String teamId, String hsRate) {
    TGExcelModel excelModel = new TGExcelModel();
    List<String> titleList = new LinkedList<>();
    List<Object[]> data = new LinkedList<>();
    List<String> titleSumList = new LinkedList<>();
    List<Object[]> dataSum = new LinkedList<>();
    titleList = new LinkedList<>(Arrays.asList("玩家ID", "玩家名称", "原始战绩", "保险", "战绩2.5%", "战绩" + hsRate, "回保", "利润", "场次"));
    ObservableList<TGTeamInfo> items = tgController.tableTGZhanji.getItems();
    if (CollectUtil.isHaveValue(items)) {
        data = items.stream().map(info -> {
            Object[] obj = new Object[9];
            obj[0] = info.getTgPlayerId();
            obj[1] = info.getTgPlayerName();
            obj[2] = info.getTgYSZJ();
            obj[3] = info.getTgBaoxian();
            obj[4] = info.getTgZJ25();
            obj[5] = info.getTgZJUnknow();
            obj[6] = info.getTgHuiBao();
            obj[7] = info.getTgProfit();
            obj[8] = info.getTgChangci();
            return obj;
        }).collect(Collectors.toList());
    }
    ObservableList<TypeValueInfo> sumItems = tgController.tableZJSum.getItems();
    if (CollectUtil.isHaveValue(sumItems)) {
        dataSum = sumItems.stream().map(info -> {
            Object[] obj = new Object[2];
            obj[0] = info.getType();
            obj[1] = info.getValue();
            return obj;
        }).collect(Collectors.toList());
    }
    excelModel.setColumnList(titleList);
    excelModel.setData(data);
    excelModel.setColumnSumList(titleSumList);
    excelModel.setDataSum(dataSum);
    excelModel.setSheetName(teamId);
    return excelModel;
}
Also used : TypeValueInfo(com.kendy.entity.TypeValueInfo) TGExcelModel(com.kendy.entity.TGExcelModel) TGTeamInfo(com.kendy.entity.TGTeamInfo) LinkedList(java.util.LinkedList)

Aggregations

TGTeamInfo (com.kendy.entity.TGTeamInfo)7 TGTeamModel (com.kendy.entity.TGTeamModel)4 ArrayList (java.util.ArrayList)4 ProxyTeamInfo (com.kendy.entity.ProxyTeamInfo)3 TGFwfinfo (com.kendy.entity.TGFwfinfo)3 TypeValueInfo (com.kendy.entity.TypeValueInfo)3 MyController (application.MyController)2 TGController (com.kendy.controller.TGController)2 DBUtil (com.kendy.db.DBUtil)2 TGCompanyModel (com.kendy.entity.TGCompanyModel)2 TGLirunInfo (com.kendy.entity.TGLirunInfo)2 CollectUtil (com.kendy.util.CollectUtil)2 NumUtil (com.kendy.util.NumUtil)2 ShowUtil (com.kendy.util.ShowUtil)2 StringUtil (com.kendy.util.StringUtil)2 List (java.util.List)2 Map (java.util.Map)2 Set (java.util.Set)2 Collectors (java.util.stream.Collectors)2 FXCollections (javafx.collections.FXCollections)2