Search in sources :

Example 1 with ShangmaInfo

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

the class ShangmaService method getDataAfterloadShangmaTable.

/**
 ********************************************************************************************************
 *
 *                          自动上码部分
 *
 *********************************************************************************************************
 */
/**
 * 获取加载上码主表后的数据
 *
 * @param teamId
 * @param tableShangma
 */
public static SMResultModel getDataAfterloadShangmaTable(String teamId, String playerID) {
    SMResultModel resultModel = new SMResultModel();
    double teamSumYiSM, teamSumZJ;
    try {
        ObservableList<ShangmaInfo> obList = FXCollections.observableArrayList();
        List<String> wanjiaIdList = teamIdAndPlayerIdMap.get(teamId);
        String playerName, edu, yicunJifen, sumAvailableEdu, sumYiSM, sumZJ;
        teamSumYiSM = 0d;
        teamSumZJ = 0d;
        if (wanjiaIdList != null) {
            // if(cmiMap == null)
            // 加载cmiMap估计
            refresh_cmiMap_if_null();
            ShangmaInfo smInfo;
            for (String playerId : wanjiaIdList) {
                // 根据玩家ID找名称和额度和已存积分
                CurrentMoneyInfo cmiInfo = cmiMap.get(playerId);
                if (cmiInfo == null) {
                    Player player = DataConstans.membersMap.get(playerId);
                    if (player == null) {
                        int a = 0;
                    }
                    playerName = player.getPlayerName();
                    edu = player.getEdu();
                    // 最关键的区别
                    yicunJifen = "";
                } else {
                    playerName = cmiInfo.getMingzi();
                    edu = cmiInfo.getCmiEdu();
                    // 实时金额就是已存积分
                    yicunJifen = cmiInfo.getShishiJine();
                }
                // 根据玩家ID找个人详情
                Double[] sumArr = getSumDetail(playerId, edu, yicunJifen);
                sumAvailableEdu = MoneyService.digit0(sumArr[0]);
                sumYiSM = MoneyService.digit0(sumArr[1]);
                sumZJ = MoneyService.digit0(sumArr[2]);
                // 组装实体
                smInfo = new ShangmaInfo(playerName, edu, sumAvailableEdu, sumYiSM, sumZJ, playerId, yicunJifen, "");
                obList.add(smInfo);
                // 设置团队总和
                teamSumYiSM += sumArr[1];
                teamSumZJ += sumArr[2];
            }
        }
        // 重新加载合并ID进去
        LinkedList<ShangmaInfo> combineSMDataList = getCombineSMDataList(obList);
        resultModel.setSmList(combineSMDataList);
        resultModel.setPlayerId(playerID);
        resultModel.setTeamId(teamId);
        setSelectedSMInfo(resultModel, playerID, combineSMDataList);
        // 赋新值
        // 获取团队信息
        Huishui hs = DataConstans.huishuiMap.get(teamId);
        if (hs != null) {
            String _teamYajin = hs.getTeamYajin();
            String _teamEdu = hs.getTeamEdu();
            // 计算团队可上码
            // 计算公式:  团队可上码= 押金 + 额度 + 团队战绩 - 团队已上码
            Double teamSMAvailable = NumUtil.getNum(NumUtil.getSum(_teamYajin, _teamEdu, MoneyService.digit0(teamSumZJ))) - NumUtil.getNum(MoneyService.digit0(teamSumYiSM));
            resultModel.setTeamTotalAvailabel(teamSMAvailable.intValue() + "");
        }
    } catch (Exception e1) {
        ErrorUtil.err("自动上码:加载上码主表失败", e1);
    }
    return resultModel;
}
Also used : ShangmaInfo(com.kendy.entity.ShangmaInfo) Huishui(com.kendy.entity.Huishui) SMResultModel(com.kendy.model.SMResultModel) Player(com.kendy.entity.Player) CurrentMoneyInfo(com.kendy.entity.CurrentMoneyInfo)

Example 2 with ShangmaInfo

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

the class ShangmaService method updateRowByPlayerId.

/**
 * 修改上码表后更新行
 * @param playerId
 * @param addedYiShangmaVal
 */
public static void updateRowByPlayerId(String playerId, String addedYiShangmaVal) {
    if (StringUtil.isBlank(playerId)) {
        ShowUtil.show("修改上码表后更新行失败,原因:程序错误,玩家ID没有检测到。");
        return;
    }
    if (!StringUtil.isBlank(addedYiShangmaVal)) {
        double addedYSMVal = MoneyService.getNum(addedYiShangmaVal);
        ObservableList<ShangmaInfo> obList = tableSM.getItems();
        for (ShangmaInfo info : obList) {
            if (playerId.equals(info.getShangmaPlayerId())) {
                String old_YSM_val = info.getShangmaYiSM();
                String old_available_edu_val = info.getShangmaAvailableEdu();
                info.setShangmaYiSM(MoneyService.digit0(MoneyService.getNum(old_YSM_val) + addedYSMVal));
                info.setShangmaAvailableEdu(MoneyService.digit0(MoneyService.getNum(old_available_edu_val) - addedYSMVal));
                labelZSM.setText(MoneyService.digit0(MoneyService.getNum(labelZSM.getText()) + addedYSMVal));
                tableSM.refresh();
                break;
            }
        }
        try {
            // 重新加载合并ID进去
            render_Shangma_info_talbe_0();
        } catch (Exception e) {
            ShowUtil.show("处理合并ID失败,原因:" + e.getMessage());
            e.printStackTrace();
        }
    }
}
Also used : ShangmaInfo(com.kendy.entity.ShangmaInfo)

Example 3 with ShangmaInfo

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

the class ShangmaService method exportShangmaExcel.

/**
 ********************************************************************************
 *
 *                                     导出Excel
 *
 **********************************************************************************
 */
public static void exportShangmaExcel() {
    SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
    // 标题
    String title = shangmaTeamIdLabel.getText() + "团队实时上码-" + sdf.format(new Date());
    // 列名
    String[] rowName = new String[] { "联合额度", "玩家ID", "玩家名称", "可上码额度", "额度", "已在积分", "已上码", "战绩总结算" };
    // 输出
    String out = "D:/" + title + System.currentTimeMillis();
    // 数据
    ObservableList<ShangmaInfo> obList = tableSM.getItems();
    if (CollectUtil.isNullOrEmpty(obList)) {
        ShowUtil.show("没有需要导出的数据!");
        return;
    }
    List<Object[]> dataList = new ArrayList<Object[]>();
    Object[] objs = null;
    String clubId = "";
    for (ShangmaInfo info : obList) {
        objs = new Object[rowName.length];
        objs[0] = info.getShangmaLianheEdu();
        objs[1] = info.getShangmaPlayerId();
        objs[2] = info.getShangmaName();
        objs[3] = info.getShangmaAvailableEdu();
        objs[4] = info.getShangmaEdu();
        objs[5] = info.getShangmaYCJF();
        objs[6] = info.getShangmaYiSM();
        objs[7] = info.getShangmaSumOfZJ();
        dataList.add(objs);
    }
    ExportShangmaExcel excel = new ExportShangmaExcel(title, rowName, dataList, out);
    try {
        excel.export();
        log.info("导出团队实时上码完成!");
    } catch (Exception e) {
        ErrorUtil.err("导出团队实时上码失败", e);
    }
}
Also used : ShangmaInfo(com.kendy.entity.ShangmaInfo) ExportShangmaExcel(com.kendy.excel.ExportShangmaExcel) ArrayList(java.util.ArrayList) SimpleDateFormat(java.text.SimpleDateFormat) Date(java.util.Date)

Example 4 with ShangmaInfo

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

the class SMAutoController method handleAutoShangma.

/**
 * 处理自动上码的逻辑(核心代码)
 * 备注:申请数量过两道关之后程序会去实时上码Tab中自动上码
 *
 * @time 2018年3月26日
 * @param buyinList
 */
public void handleAutoShangma(List<WanjiaApplyInfo> buyinList) {
    for (WanjiaApplyInfo wanjiaApplyInfo : buyinList) {
        /*
        	 * 玩家相关信息
        	 */
        String paijuStr = wanjiaApplyInfo.getGameRoomName();
        // 本系统桌号
        String paijuString = paijuStr.substring(wanjiaApplyInfo.getGameRoomName().lastIndexOf("-") + 1);
        // 购买数量
        String buyStack = wanjiaApplyInfo.getBuyStack().toString();
        String playerId = wanjiaApplyInfo.getShowId();
        String playerName = wanjiaApplyInfo.getStrNick();
        Player player = DataConstans.membersMap.get(playerId);
        if (player == null) {
            logInfo("玩家(" + playerName + ")未录入到系统中!!!");
            continue;
        }
        String teamId = player.getTeamName();
        Huishui huishui = DataConstans.huishuiMap.get(teamId);
        // 是否勾选了团队上码:1是  0否
        String selectTeamAvailabel = huishui.getTeamAvailabel();
        logInfo(playerName + "正在模拟更新实时上码...");
        // 模拟更新实时上码
        SMResultModel resultModel = ShangmaService.getDataAfterloadShangmaTable(teamId, playerId);
        ShangmaInfo selectedSMInfo = resultModel.getSelectedSMInfo();
        if (selectedSMInfo == null) {
            logInfo("玩家(" + playerName + ")在上码系统中不存在!!");
            continue;
        }
        // 获取团队可上码
        String teamAvailabel = resultModel.getTeamTotalAvailabel();
        // 获取可上码
        String calcAvailable = getAvailable(resultModel, selectTeamAvailabel, playerId, playerName);
        // 是否为次日上码:
        boolean isTodaySM = judgeIsTodaySM(paijuString);
        // 是否同意
        boolean passCheck = checkInRange(selectTeamAvailabel, buyStack, teamAvailabel, calcAvailable);
        /**
         *************************************
         */
        List<String> testList = new ArrayList<>();
        boolean addOK = false;
        if (hasFilterPlayerIds())
            testList = Arrays.stream(filterPlayIdFields.getText().trim().split("##")).collect(Collectors.toList());
        if (CollectUtil.isNullOrEmpty(testList) || testList.contains(playerId)) {
            // 添加上码到软件中,同时发送后台请求
            // 用户ID
            Long userUuid = wanjiaApplyInfo.getUuid();
            // 房间号
            Long roomId = wanjiaApplyInfo.getGameRoomId();
            addOK = addShangma(resultModel, isTodaySM, passCheck, playerId, playerName, paijuString, buyStack, userUuid, roomId);
        }
        /**
         *************************************
         */
        SMAutoInfo smAutoInfo = new SMAutoInfo(getTimeString(), playerId, playerName, paijuString, buyStack, // 团队可上码 (第一关)
        teamAvailabel, // 计算可上码(第二关)
        calcAvailable, // smAutoIsCurrentDay
        "1".equals(selectTeamAvailabel) ? "是" : "否", // smAutoIsCurrentDay
        isTodaySM ? "是" : "否", // smAutoIsNextDay
        isTodaySM ? "否" : "是", // smAutoIsAgree
        passCheck ? "是" : "否", // smAutoIsAgreeSuccess
        (passCheck) ? (addOK ? "成功" : "失败") : "-");
        addItem(smAutoInfo);
    }
}
Also used : Huishui(com.kendy.entity.Huishui) ShangmaInfo(com.kendy.entity.ShangmaInfo) WanjiaApplyInfo(com.kendy.spider.WanjiaApplyInfo) Player(com.kendy.entity.Player) SMResultModel(com.kendy.model.SMResultModel) ArrayList(java.util.ArrayList) SMAutoInfo(com.kendy.entity.SMAutoInfo)

Example 5 with ShangmaInfo

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

the class MyController method initialize.

/**
 * 节点加载完后需要进行的一些初始化操作
 * Initializes the controller class. This method is automatically called
 * after the fxml file has been loaded.
 */
@SuppressWarnings("unchecked")
@Override
public void initialize(URL location, ResourceBundle resources) {
    table_Profit = this.tableProfit;
    // 第一次打开主窗口时设置当前俱乐部ID值
    String clubIdValue = PropertiesUtil.readProperty("clubId");
    currentClubId = lable_currentClubId;
    if (clubIdValue != null)
        lable_currentClubId.setText(clubIdValue);
    // 第一次打开主窗口时显示所有股东
    // //股东
    String gudongs = PropertiesUtil.readProperty("gudong");
    DataConstans.gudongList = new ArrayList<>();
    if (!StringUtil.isBlank(gudongs)) {
        for (String gudong : gudongs.split(",")) {
            DataConstans.gudongList.add(gudong);
        }
    }
    for (String gd : DataConstans.gudongList) gudongListView.getItems().add(gd);
    // 模拟初始化第一个tableView
    // kendy:绑定数据域
    // 支付按钮
    pay.setCellFactory(cellFactory);
    // 绑定玩家信息表
    bindCellValue(tuan, wanjiaId, wanjia, jifen, shishou, baoxian, chuHuishui, baohui, shuihouxian, heLirun, shouHuishui);
    jifen.setCellFactory(getColorCellFactory(new TotalInfo()));
    shishou.setCellFactory(getColorCellFactory(new TotalInfo()));
    baoxian.setCellFactory(getColorCellFactory(new TotalInfo()));
    shuihouxian.setCellFactory(getColorCellFactory(new TotalInfo()));
    chuHuishui.setCellFactory(getColorCellFactory(new TotalInfo()));
    // 绑定牌局表
    bindCellValue(paiju, wanjiaName, zhangji, yicunJifen, heji);
    // 支付按钮:单独出来
    pay.setCellFactory(cellFactory);
    pay.setStyle("-fx-alignment: CENTER;");
    // 复制按钮:单独出来
    copy.setCellFactory(cellFactoryCopy);
    copy.setStyle("-fx-alignment: CENTER;");
    zhangji.setCellFactory(getColorCellFactory(new WanjiaInfo()));
    yicunJifen.setCellFactory(getColorCellFactory(new WanjiaInfo()));
    heji.setCellFactory(getColorCellFactory(new WanjiaInfo()));
    // 绑定实时金额表
    tableCurrentMoneyInfo.setEditable(true);
    bindCellValue(cmSuperIdSum, mingzi, shishiJine, cmiEdu);
    cmSuperIdSum.setStyle("-fx-alignment: CENTER;-fx-font-weight: bold;");
    shishiJine.setCellFactory(TextFieldTableCell.forTableColumn());
    // shishiJine.setCellFactory(redAndEditCellFactory);
    shishiJine.setOnEditCommit(new EventHandler<CellEditEvent<CurrentMoneyInfo, String>>() {

        @Override
        public void handle(CellEditEvent<CurrentMoneyInfo, String> t) {
            String oldValue = t.getOldValue();
            // 修改原值
            CurrentMoneyInfo cmInfo = (CurrentMoneyInfo) t.getTableView().getItems().get(t.getTablePosition().getRow());
            if (cmInfo != null && !StringUtil.isBlank(cmInfo.getMingzi())) {
                // 更新到已存积分
                boolean isChangedOK = MoneyService.changeYicunJifen(tablePaiju, cmInfo.getMingzi(), t.getNewValue());
                if (isChangedOK) {
                    cmInfo.setShishiJine(t.getNewValue());
                } else {
                    cmInfo.setShishiJine(t.getOldValue());
                    String ss = t.getTableView().getItems().get(t.getTablePosition().getRow()).getShishiJine();
                    tableCurrentMoneyInfo.refresh();
                }
                // 最后刷新实时金额表
                MoneyService.flush_SSJE_table();
            } else if (cmInfo != null) {
                cmInfo.setShishiJine(null);
                ShowUtil.show("空行不能输入", 1);
                tableCurrentMoneyInfo.refresh();
            }
        }
    });
    // 绑定资金表
    tableZijin.setEditable(true);
    bindCellValue(zijinType, zijinAccount);
    // zijinAccount.setCellFactory(TextFieldTableCell.forTableColumn());
    zijinType.setCellFactory(zijinCellFactory);
    zijinAccount.setCellFactory(getColorCellFactory(new ZijinInfo()));
    // 绑定利润表
    bindCellValue(profitType, profitAccount);
    profitAccount.setCellFactory(getColorCellFactory(new ProfitInfo()));
    // 绑定实时开销表
    bindCellValue(kaixiaoType, kaixiaoMoney);
    kaixiaoMoney.setCellFactory(getColorCellFactory(new KaixiaoInfo()));
    // 绑定实时当局表
    bindCellValue(type, money);
    money.setCellFactory(getColorCellFactory(new DangjuInfo()));
    // 绑定交收表
    bindCellValue(jiaoshouType, jiaoshouMoney);
    jiaoshouMoney.setCellFactory(getColorCellFactory(new JiaoshouInfo()));
    // 绑定平帐表
    bindCellValue(pingzhangType, pingzhangMoney);
    pingzhangMoney.setCellFactory(getColorCellFactory(new PingzhangInfo()));
    // 绑定团队表
    bindCellValue(teamID, teamZJ, teamHS, teamBS, teamSum);
    teamJiesuan.setCellFactory(cellFactoryJiesuan);
    teamJiesuan.setStyle("-fx-alignment: CENTER;");
    teamZJ.setCellFactory(getColorCellFactory(new TeamInfo()));
    teamBS.setCellFactory(getColorCellFactory(new TeamInfo()));
    teamHS.setCellFactory(getColorCellFactory(new TeamInfo()));
    teamSum.setCellFactory(getColorCellFactory(new TeamInfo()));
    // 绑定代理查询表(团队当天查询)
    bindCellValue(proxyPlayerId, proxyPlayerName, proxyYSZJ, proxyZJ, proxyBaoxian, proxyHuishui, proxyHuiBao, proxyTableId);
    proxyYSZJ.setCellFactory(getColorCellFactory(new ProxyTeamInfo()));
    proxyZJ.setCellFactory(getColorCellFactory(new ProxyTeamInfo()));
    proxyBaoxian.setCellFactory(getColorCellFactory(new ProxyTeamInfo()));
    // 绑定代理查询中的合计表
    bindCellValue(proxySumType, proxySum);
    proxySum.setCellFactory(getColorCellFactory(new ProxySumInfo()));
    // 绑定汇总信息表(当天每一局的团队汇总查询)
    bindCellValue(zonghuiTabelId, zonghuiFuwufei, zonghuiBaoxian, zonghuiHuishui, zonghuiHuiBao);
    zonghuiBaoxian.setCellFactory(getColorCellFactory(new ZonghuiInfo()));
    zonghuiHuishui.setCellFactory(getColorCellFactory(new ZonghuiInfo()));
    zonghuiHuiBao.setCellFactory(getColorCellFactory(new ZonghuiInfo()));
    // 绑定汇总查询中的当天汇总表
    bindCellValue(huizongType, huizongMoney);
    huizongMoney.setCellFactory(getColorCellFactory(new DangtianHuizongInfo()));
    // 绑定汇总查询中的开销表表
    bindCellValue(zonghuiKaixiaoType, zonghuiKaixiaoMoney);
    zonghuiKaixiaoMoney.setCellFactory(getColorCellFactory(new ZonghuiKaixiaoInfo()));
    // 绑定会员查询中的会员当天战绩表
    bindCellValue(memberJu, memberZJ);
    memberZJ.setCellFactory(getColorCellFactory(new MemberZJInfo()));
    // 绑定实时上码表
    // ,shangmaShishou,shangmaJu
    bindCellValue(shangmaLianheEdu, shangmaName, shangmaEdu, shangmaAvailableEdu, shangmaYCJF, shangmaYiSM, shangmaSumOfZJ, shangmaPlayerId);
    tableShangma.setRowFactory(new Callback<TableView<ShangmaInfo>, TableRow<ShangmaInfo>>() {

        @Override
        public TableRow<ShangmaInfo> call(TableView<ShangmaInfo> param) {
            return new TableRowControl(tableShangma);
        }
    });
    // shangmaPlayerId.setCellFactory(shangmaLeftNameCellFactory);
    // shangmaName.setCellFactory(shangmaLeftNameCellFactory);
    // shangmaEdu.setCellFactory(shangmaLeftNameCellFactory);
    // shangmaSumOfZJ.setCellFactory(shangmaLeftNameCellFactory);
    // shangmaYiSM.setCellFactory(shangmaLeftNameCellFactory);
    // shangmaYCJF.setCellFactory(shangmaLeftNameCellFactory);
    shangmaLianheEdu.setCellFactory(getColorCellFactory(new ShangmaInfo()));
    // red_NotEdit_CellFactory
    shangmaAvailableEdu.setCellFactory(getColorCellFactory(new ShangmaInfo()));
    shangmaYCJF.setCellFactory(getColorCellFactory(new ShangmaInfo()));
    // 绑定外债信息表
    bindCellValue(waizhaiType, waizhaiMoney);
    waizhaiMoney.setCellFactory(getColorCellFactory(new WaizhaiInfo()));
    // 绑定上码个人信息表
    tableShangmaDetail.setEditable(true);
    bindCellValue(shangmaDetailName, shangmaJu, shangmaSM, shangmaShishou);
    shangmaDetailName.setCellFactory(ShangmaNameCellFactory);
    shangmaJu.setCellFactory(ShangmaNameCellFactory);
    shangmaSM.setCellFactory(ShangmaNameCellFactory);
    shangmaShishou.setCellFactory(ShangmaNameCellFactory);
    tableShangma.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {

        @Override
        public void changed(ObservableValue observable, Object oldValue, Object newValue) {
            ShangmaInfo smInfo = (ShangmaInfo) newValue;
            // 加载右边的个人详情
            if (smInfo != null) {
                String playerId = smInfo.getShangmaPlayerId();
                if (!StringUtil.isBlank(playerId)) {
                    ShangmaService.loadSMDetailTable(playerId);
                    ShangmaService.loadSMNextDayTable(playerId);
                }
            } else
                tableShangmaDetail.setItems(null);
        }
    });
    // 绑定次日信息表
    shangmaNextDayName.setCellValueFactory(new PropertyValueFactory<ShangmaDetailInfo, String>("shangmaDetailName"));
    shangmaNextDayName.setCellFactory(ShangmaNameNextdayCellFactory);
    shangmaNextDayName.setStyle("-fx-alignment: CENTER;");
    shangmaNextDayJu.setCellValueFactory(new PropertyValueFactory<ShangmaDetailInfo, String>("shangmaJu"));
    shangmaNextDayJu.setCellFactory(ShangmaNameNextdayCellFactory);
    shangmaNextDayJu.setStyle("-fx-alignment: CENTER;");
    shangmaNextDaySM.setCellValueFactory(new PropertyValueFactory<ShangmaDetailInfo, String>("shangmaSM"));
    shangmaNextDaySM.setCellFactory(ShangmaNameNextdayCellFactory);
    shangmaNextDaySM.setStyle("-fx-alignment: CENTER;");
    // 绑定积查询表
    bindCellValue(jfRank, jfPlayerName, jfValue);
    // ////初始化实时金额表
    MoneyService.iniitMoneyInfo(tableCurrentMoneyInfo);
    // tableTotalInfo.setItems(tableTotalInfoList);
    // tableKaixiao.setItems(FXCollections.observableArrayList(
    // new KaixiaoInfo("测试列","12")
    // ));
    // //////////////////总汇表中的初始化
    juTypeListView.getItems().add("合局");
    LMLabel.setTextFill(Color.web("#CD3700"));
    // 设置Label 的文本颜色。
    indexLabel.setTextFill(Color.web("#0076a3"));
    indexLabel.setFont(new Font("Arial", 30));
    // //////////////////代理查询中的团队回水选择
    TeamProxyService.initTeamProxy(tableProxyTeam, proxySumHBox, teamIDCombox, isZjManage, proxyDateLabel, tableProxySum, proxyHSRate, proxyHBRate, proxyFWF, hasTeamBaoxian);
    // //////////////////代理查询中的团队回水选择
    TeamProxyService.initTeamSelectAction(teamIDCombox, isZjManage, tableProxyTeam, proxySumHBox);
    // //////////////////会员服务类
    MemberService.initMemberQuery(memberListView, tableMemberZJ, memberDateStr, memberPlayerId, memberPlayerName, memberSumOfZJ, memberTotalZJ);
    tabsAction();
    // //////////////////实时上马系统
    initShanagma();
    // /////////////合并ID
    CombineIDController.initCombineIdController(tableCurrentMoneyInfo);
    // //////////积分查询
    JifenService.initJifenService(jfTeamIDCombox);
    // 是否启动测试模式
    initAutoTestMode();
    // 选择导入白名单的版本
    initWhiteVersion();
    try {
        FXMLLoader loader = new FXMLLoader();
        Parent root = loader.load(getClass().getResource("/com/kendy/dialog/LM_Tab_Fram.fxml").openStream());
        // loader.setController(lmController);
        lmController = loader.getController();
        Tab tab1 = new Tab();
        tab1.setText("联盟对账");
        tab1.setClosable(false);
        tab1.setContent(root);
        tabs.getTabs().add(tab1);
    } catch (IOException e) {
        ErrorUtil.err("联盟tab加载失败", e);
    }
    try {
        FXMLLoader loader = new FXMLLoader();
        Parent root = loader.load(getClass().getResource("/com/kendy/dialog/Quota_Tab_Fram.fxml").openStream());
        loader.setController(new QuotaController());
        Tab quotaTab = new Tab();
        quotaTab.setText("联盟配账");
        quotaTab.setClosable(false);
        quotaTab.setContent(root);
        tabs.getTabs().add(quotaTab);
    } catch (IOException e) {
        ErrorUtil.err("联盟配账tab加载失败", e);
    }
    try {
        FXMLLoader loader = new FXMLLoader();
        Parent root = loader.load(getClass().getResource("/com/kendy/dialog/gudong_contribution.fxml").openStream());
        loader.setController(new GDController());
        Tab gdTab = new Tab();
        gdTab.setText("股东贡献值");
        gdTab.setClosable(false);
        gdTab.setContent(root);
        tabs.getTabs().add(gdTab);
    } catch (IOException e) {
        ErrorUtil.err("股东贡献值tab加载失败", e);
    }
    try {
        FXMLLoader loader = new FXMLLoader();
        Parent root = loader.load(getClass().getResource("/com/kendy/dialog/TG_toolaa.fxml").openStream());
        Tab gdTab = new Tab();
        gdTab.setText("托管工具");
        gdTab.setClosable(false);
        gdTab.setContent(root);
        tabs.getTabs().add(gdTab);
        tgController = (TGController) loader.getController();
    } catch (IOException e) {
        ErrorUtil.err("托管小工具tab加载失败", e);
    }
    try {
        FXMLLoader loader = new FXMLLoader();
        Parent root = loader.load(getClass().getResource("/com/kendy/dialog/SM_Auto.fxml").openStream());
        Tab gdTab = new Tab();
        gdTab.setText("自动上码配置");
        gdTab.setClosable(false);
        gdTab.setContent(root);
        tabs.getTabs().add(gdTab);
        smAutoController = (SMAutoController) loader.getController();
    } catch (IOException e) {
        ErrorUtil.err("托管小工具tab加载失败", e);
    }
}
Also used : ProxyTeamInfo(com.kendy.entity.ProxyTeamInfo) QuotaController(com.kendy.controller.QuotaController) JiaoshouInfo(com.kendy.entity.JiaoshouInfo) WaizhaiInfo(com.kendy.entity.WaizhaiInfo) Parent(javafx.scene.Parent) KaixiaoInfo(com.kendy.entity.KaixiaoInfo) ZonghuiKaixiaoInfo(com.kendy.entity.ZonghuiKaixiaoInfo) ObservableValue(javafx.beans.value.ObservableValue) ShangmaDetailInfo(com.kendy.entity.ShangmaDetailInfo) CurrentMoneyInfo(com.kendy.entity.CurrentMoneyInfo) FXMLLoader(javafx.fxml.FXMLLoader) GDController(com.kendy.controller.GDController) Font(javafx.scene.text.Font) ProfitInfo(com.kendy.entity.ProfitInfo) ProxySumInfo(com.kendy.entity.ProxySumInfo) DangtianHuizongInfo(com.kendy.entity.DangtianHuizongInfo) WanjiaInfo(com.kendy.entity.WanjiaInfo) ZonghuiKaixiaoInfo(com.kendy.entity.ZonghuiKaixiaoInfo) ChangeListener(javafx.beans.value.ChangeListener) PingzhangInfo(com.kendy.entity.PingzhangInfo) TableView(javafx.scene.control.TableView) ShangmaInfo(com.kendy.entity.ShangmaInfo) ZonghuiInfo(com.kendy.entity.ZonghuiInfo) DangjuInfo(com.kendy.entity.DangjuInfo) ProxyTeamInfo(com.kendy.entity.ProxyTeamInfo) TeamInfo(com.kendy.entity.TeamInfo) IOException(java.io.IOException) CellEditEvent(javafx.scene.control.TableColumn.CellEditEvent) ZijinInfo(com.kendy.entity.ZijinInfo) Tab(javafx.scene.control.Tab) TotalInfo(com.kendy.entity.TotalInfo) TableRow(javafx.scene.control.TableRow) MemberZJInfo(com.kendy.entity.MemberZJInfo)

Aggregations

ShangmaInfo (com.kendy.entity.ShangmaInfo)13 Player (com.kendy.entity.Player)4 CurrentMoneyInfo (com.kendy.entity.CurrentMoneyInfo)3 ShangmaDetailInfo (com.kendy.entity.ShangmaDetailInfo)3 ArrayList (java.util.ArrayList)3 LinkedList (java.util.LinkedList)3 Huishui (com.kendy.entity.Huishui)2 SMResultModel (com.kendy.model.SMResultModel)2 HashMap (java.util.HashMap)2 LinkedHashMap (java.util.LinkedHashMap)2 Map (java.util.Map)2 GDController (com.kendy.controller.GDController)1 QuotaController (com.kendy.controller.QuotaController)1 DangjuInfo (com.kendy.entity.DangjuInfo)1 DangtianHuizongInfo (com.kendy.entity.DangtianHuizongInfo)1 JiaoshouInfo (com.kendy.entity.JiaoshouInfo)1 KaixiaoInfo (com.kendy.entity.KaixiaoInfo)1 MemberZJInfo (com.kendy.entity.MemberZJInfo)1 PingzhangInfo (com.kendy.entity.PingzhangInfo)1 ProfitInfo (com.kendy.entity.ProfitInfo)1