Search in sources :

Example 1 with WanjiaInfo

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

the class MoneyService method changeYicunJifen.

/**
 * 编辑实时金额后修改对应的已存积分
 * 备注:如果没有找到供修改的记录,也要让其通过
 */
public static boolean changeYicunJifen(TableView<WanjiaInfo> tablePaiju, String playerName, String newYicunJifen) {
    boolean isOK = false;
    if (!StringUtil.isBlank(newYicunJifen)) {
        try {
            Double.valueOf(newYicunJifen);
        } catch (Exception e) {
            ShowUtil.show(newYicunJifen + "不是数值!!");
        }
    }
    ObservableList<WanjiaInfo> wanjiaList = tablePaiju.getItems();
    if (wanjiaList != null && wanjiaList.size() > 0) {
        boolean isInPaiju = false;
        for (WanjiaInfo info : wanjiaList) {
            if (info.getWanjiaName().equals(playerName)) {
                if ("1".equals(info.getHasPayed())) {
                    ShowUtil.show("抱歉,已支付过,请到下一场修改", 2);
                } else {
                    String zj = info.getZhangji();
                    info.setYicunJifen(newYicunJifen);
                    info.setHeji(digit0(Double.sum(Double.valueOf(zj), Double.valueOf(newYicunJifen))));
                    ShowUtil.show("已经更新到已存积分", 2);
                    tablePaiju.setItems(wanjiaList);
                    isOK = true;
                    break;
                }
                isInPaiju = true;
            }
        }
        ;
        if (!isInPaiju) {
            // 如果没有找到供修改的记录,也要让其通过
            isOK = true;
        }
    } else {
        isOK = true;
    }
    return isOK;
}
Also used : WanjiaInfo(com.kendy.entity.WanjiaInfo)

Example 2 with WanjiaInfo

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

the class MoneyService method lock10Tables.

/**
 * 缓存十个表数据
 * @param tableTeamHuishui
 * @return
 */
public static Map<String, String> lock10Tables(TableView<TotalInfo> tableTotal, TableView<WanjiaInfo> tableWanjia, TableView<TeamInfo> tableTeam, TableView<CurrentMoneyInfo> tableCurrentMoney, TableView<ZijinInfo> tableZijin, TableView<KaixiaoInfo> tableKaixiao, TableView<ProfitInfo> tableProfit, TableView<DangjuInfo> tableDangju, TableView<JiaoshouInfo> tableJiaoshou, TableView<PingzhangInfo> tablePingzhang, Label LMLabel) throws Exception {
    /**
     ********************************************** 战绩表  *************
     */
    ObservableList<TotalInfo> TotalInfoObservableList = tableTotal.getItems();
    List<TotalInfo> TotalInfoList = new LinkedList<>();
    for (TotalInfo info : TotalInfoObservableList) {
        TotalInfoList.add(info);
    }
    /**
     ********************************************** 玩家表  *************
     */
    ObservableList<WanjiaInfo> WanjiaInfoObservableList = tableWanjia.getItems();
    if (WanjiaInfoObservableList == null) {
        WanjiaInfoObservableList = FXCollections.observableArrayList();
    }
    List<WanjiaInfo> WanjiaInfoList = new LinkedList<>();
    for (WanjiaInfo info : WanjiaInfoObservableList) {
        WanjiaInfoList.add(info);
    }
    /**
     ********************************************** 团队回水表  *************
     */
    ObservableList<TeamInfo> TeamInfoInfoObservableList = tableTeam.getItems();
    List<TeamInfo> TeamInfoList = new LinkedList<>();
    for (TeamInfo info : TeamInfoInfoObservableList) {
        // 对于已结算过的不再记录
        String hasJiesuaned = info.getHasJiesuaned();
        if ("".equals(hasJiesuaned) || "0".equals(hasJiesuaned)) {
            TeamInfoList.add(info);
        }
    }
    String sumOfTeam = tableTeam.getColumns().get(4).getText();
    /**
     ********************************************** 实时金额表  *************
     */
    ObservableList<CurrentMoneyInfo> ObservableList = tableCurrentMoney.getItems();
    List<CurrentMoneyInfo> list = new LinkedList<>();
    for (CurrentMoneyInfo info : ObservableList) {
        list.add(info);
    }
    String sumOfCurrentMoney = tableCurrentMoney.getColumns().get(2).getText();
    /**
     ********************************************** 资金表  *************
     */
    ObservableList<ZijinInfo> ZijinInfoObservableList = tableZijin.getItems();
    List<ZijinInfo> listZijinInfo = new LinkedList<>();
    for (ZijinInfo info : ZijinInfoObservableList) {
        listZijinInfo.add(info);
    }
    String sumOfZijin = tableZijin.getColumns().get(1).getText();
    /**
     ********************************************** 利润表  *************
     */
    ObservableList<ProfitInfo> ProfitInfoObservableList = tableProfit.getItems();
    List<ProfitInfo> listProfitInfo = new LinkedList<>();
    for (ProfitInfo info : ProfitInfoObservableList) {
        listProfitInfo.add(info);
    }
    String sumOfProfit = tableProfit.getColumns().get(1).getText();
    /**
     ********************************************** 实时开销表  *************
     */
    ObservableList<KaixiaoInfo> KaixiaoInfoObservableList = tableKaixiao.getItems();
    List<KaixiaoInfo> listKaixiaoInfo = new LinkedList<>();
    for (KaixiaoInfo info : KaixiaoInfoObservableList) {
        log.info(info.getKaixiaoType());
        listKaixiaoInfo.add(info);
    }
    String sumOfKaixiao = tableKaixiao.getColumns().get(1).getText();
    /**
     ********************************************** 当局表  *************
     */
    ObservableList<DangjuInfo> DangjuInfoObservableList = tableDangju.getItems();
    List<DangjuInfo> listDangjuInfo = new LinkedList<>();
    for (DangjuInfo info : DangjuInfoObservableList) {
        listDangjuInfo.add(info);
    }
    String sumOfDangjuInfo = tableDangju.getColumns().get(1).getText();
    /**
     ********************************************** 交收表  *************
     */
    ObservableList<JiaoshouInfo> JiaoshouInfoObservableList = tableJiaoshou.getItems();
    List<JiaoshouInfo> listJiaoshouInfo = new LinkedList<>();
    for (JiaoshouInfo info : JiaoshouInfoObservableList) {
        listJiaoshouInfo.add(info);
    }
    String sumOfJiaoshouInfo = tableJiaoshou.getColumns().get(1).getText();
    /**
     ********************************************** 平帐表  *************
     */
    ObservableList<PingzhangInfo> PingzhangInfoObservableList = tablePingzhang.getItems();
    List<PingzhangInfo> listPingzhangInfo = new LinkedList<>();
    for (PingzhangInfo info : PingzhangInfoObservableList) {
        listPingzhangInfo.add(info);
    }
    String sumOfPingzhangInfo = tablePingzhang.getColumns().get(1).getText();
    // 汇总信息
    Map<String, String> map = new HashMap<>();
    map.put("战绩", JSON.toJSONString(TotalInfoList));
    map.put("玩家", JSON.toJSONString(WanjiaInfoList));
    map.put("团队回水", JSON.toJSONString(TeamInfoList));
    map.put("团队回水总和", sumOfTeam);
    map.put("实时金额", JSON.toJSONString(list));
    map.put("实时金额总和", sumOfCurrentMoney);
    map.put("资金", JSON.toJSONString(listZijinInfo));
    map.put("资金总和", sumOfZijin);
    map.put("利润", JSON.toJSONString(listProfitInfo));
    map.put("利润总和", sumOfProfit);
    map.put("实时开销", JSON.toJSONString(listKaixiaoInfo));
    map.put("实时开销总和", sumOfKaixiao);
    map.put("当局", JSON.toJSONString(listDangjuInfo));
    map.put("当局总和", sumOfDangjuInfo);
    map.put("交收", JSON.toJSONString(listJiaoshouInfo));
    map.put("交收总和", sumOfJiaoshouInfo);
    map.put("平帐", JSON.toJSONString(listPingzhangInfo));
    map.put("平帐总和", sumOfPingzhangInfo);
    map.put("联盟对帐", getLMLabelText(LMLabel));
    return map;
}
Also used : JiaoshouInfo(com.kendy.entity.JiaoshouInfo) HashMap(java.util.HashMap) KaixiaoInfo(com.kendy.entity.KaixiaoInfo) CurrentMoneyInfo(com.kendy.entity.CurrentMoneyInfo) ProfitInfo(com.kendy.entity.ProfitInfo) WanjiaInfo(com.kendy.entity.WanjiaInfo) PingzhangInfo(com.kendy.entity.PingzhangInfo) DangjuInfo(com.kendy.entity.DangjuInfo) TeamInfo(com.kendy.entity.TeamInfo) LinkedList(java.util.LinkedList) ZijinInfo(com.kendy.entity.ZijinInfo) TotalInfo(com.kendy.entity.TotalInfo)

Example 3 with WanjiaInfo

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

the class MoneyService method fillTablerAfterImportZJ.

/**
 * 导入战绩成功后
 * 自动填充玩家信息表、牌局表、团队表以及当局
 * 备注:这些表数据在当局范围内是固定不变的
 *
 * @param table 玩家信息表
 * @param tablePaiju 牌局表
 * @param userInfoList 导入的玩家战绩列表
 */
public static void fillTablerAfterImportZJ(TableView<TotalInfo> table, TableView<WanjiaInfo> tablePaiju, TableView<DangjuInfo> tableDangju, TableView<JiaoshouInfo> tableJiaoshou, TableView<TeamInfo> tableTeam, List<UserInfos> userInfoList, String tableId) {
    // 1清空 表数据
    table.setItems(null);
    // 2获取InfoList
    ObservableList<TotalInfo> tableTotalInfoList = FXCollections.observableArrayList();
    ObservableList<WanjiaInfo> tableWanjiaInfoList = FXCollections.observableArrayList();
    TotalInfo info = null;
    Player player;
    WanjiaInfo wanjia;
    // 用于缓存和计算团累计团队回水
    List<TeamHuishuiInfo> teamHuishuiList = null;
    // 用于只展示本次战绩的团队信息
    Set<String> relatedTeamIdSet = new HashSet<>();
    // 每次导入都去初始化当局团队战绩信息
    DataConstans.Dangju_Team_Huishui_List = new LinkedList<>();
    for (UserInfos zj : userInfoList) {
        /**
         ************************************************* 填充信息表 ****************
         */
        info = new TotalInfo();
        // 团	ID	玩家	计分	实收	保险
        String playerId = zj.getPlayerId();
        player = DataConstans.membersMap.get(playerId);
        String teamId = "";
        if (player != null) {
            teamId = player.getTeamName();
            teamId = StringUtil.isBlank(teamId) ? "" : teamId.toUpperCase();
        } else // add 2017-10-26
        {
            Player tempPlayer = DBUtil.getMemberById(playerId);
            if (tempPlayer != null && !StringUtil.isBlank(tempPlayer.getTeamName())) {
                DataConstans.membersMap.put(playerId, tempPlayer);
                teamId = tempPlayer.getTeamName();
                teamId = StringUtil.isBlank(teamId) ? "" : teamId.toUpperCase();
            }
        }
        String name = zj.getPlayerName();
        String baoxian = zj.getinsurance();
        String shishou = getShiShou(zj.getZj());
        String chuHuishui = digit1(getChuhuishui(zj.getZj(), teamId));
        String shuihouxian = digit1((-1) * Double.valueOf(zj.getinsurance()) * 0.975 + "");
        String shouHuishui = digit1(Math.abs(Double.valueOf(zj.getZj())) * 0.025 + "");
        String baohui = digit1(getHuiBao(baoxian, teamId));
        String heLirun = digit2(getHeLirun(shouHuishui, chuHuishui, shuihouxian, baohui));
        // 团(团ID)
        info.setTuan(teamId);
        // ID
        info.setWanjiaId(playerId);
        // 玩家
        info.setWanjia(name);
        // 计分
        // ?计分 = 战绩?
        info.setJifen(zj.getZj());
        // 实收
        info.setShishou(shishou);
        // 保险
        info.setBaoxian(baoxian);
        // 出回水
        info.setChuHuishui(chuHuishui);
        // 保回
        info.setBaohui(baohui);
        // 水后险
        info.setShuihouxian(shuihouxian);
        // 收回水
        info.setShouHuishui(shouHuishui);
        // 合利润
        info.setHeLirun(heLirun);
        tableTotalInfoList.add(info);
        /**
         ************************************************* 填充牌局表 ****************
         */
        wanjia = new WanjiaInfo();
        String yicunJifen = getYicunJifen(zj.getPlayerId());
        String heji = digit0(getNum(yicunJifen) + getNum(shishou) + "");
        wanjia.setPaiju("第" + tableId + "局");
        wanjia.setWanjiaName(zj.getPlayerName());
        wanjia.setYicunJifen(yicunJifen);
        wanjia.setZhangji(shishou);
        wanjia.setHeji(heji);
        wanjia.setWanjiaId(playerId);
        /**
         ************************************************* 缓存各团队回水记录 ****************
         */
        teamId = teamId.toUpperCase();
        // if(!StringUtil.isBlank(teamId) && !"公司".equals(teamId)) {
        if (!StringUtil.isBlank(teamId)) {
            // 缓存到当局团队战绩信息中
            TeamHuishuiInfo teamHuishuiInfo = new TeamHuishuiInfo(teamId, playerId, name, shishou, baoxian, chuHuishui, "第" + tableId + "局", zj.getZj(), baohui, shouHuishui, zj.getDay());
            DataConstans.Dangju_Team_Huishui_List.add(teamHuishuiInfo);
            if (!"公司".equals(teamId)) {
                relatedTeamIdSet.add(teamId);
            }
            // 缓存到总团队回水中(结算按钮后从中减少)
            teamHuishuiList = DataConstans.Team_Huishui_Map.get(teamId);
            if (teamHuishuiList == null) {
                teamHuishuiList = new ArrayList<>();
            }
            teamHuishuiList.add(teamHuishuiInfo);
            DataConstans.Team_Huishui_Map.put(teamId, teamHuishuiList);
        // //缓存到总团队回水中(不会从中减少)
        // teamHuishuiList = DataConstans.Total_Team_Huishui_Map.get(teamId);
        // if( teamHuishuiList == null ) {
        // teamHuishuiList = new ArrayList<>();
        // }
        // teamHuishuiList.add(
        // new TeamHuishuiInfo(teamId,playerId,name,shishou,baoxian,chuHuishui,"第"+tableId+"局")
        // );
        // DataConstans.Total_Team_Huishui_Map.put(teamId,teamHuishuiList);
        } else {
            log.warn("检测到团队ID是空或为公司,玩家是:" + name);
        }
        // 是否显示支付按钮
        wanjia.setHasPayed(relatedTeamIdSet.contains(teamId) ? teamId : "");
        tableWanjiaInfoList.add(wanjia);
    }
    // 3填充
    table.setItems(tableTotalInfoList);
    table.refresh();
    // tablePaiju.setItems(tableWanjiaInfoList);
    // 添加需要支付的按钮靠前排
    fillTablePaiju(tablePaiju, tableWanjiaInfoList);
    // 缓存当局固定总和
    DataConstans.SumMap.putAll(getSums(tableTotalInfoList));
    // 填充当局表和交收表
    initTableDangjuAndTableJiaoshou(tableDangju, tableJiaoshou);
    // 填充团队表
    fillTableTeam(tableTeam, relatedTeamIdSet);
    // 更新实时上码表的个人详情
    ShangmaService.updateShangDetailMap(tablePaiju);
}
Also used : Player(com.kendy.entity.Player) TeamHuishuiInfo(com.kendy.entity.TeamHuishuiInfo) UserInfos(com.kendy.entity.UserInfos) WanjiaInfo(com.kendy.entity.WanjiaInfo) TotalInfo(com.kendy.entity.TotalInfo) HashSet(java.util.HashSet)

Example 4 with WanjiaInfo

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

the class ShangmaService method isHasPayedByPlayerId.

/**
 * 如果该战绩导入后按了支付按钮,则不计算
 * 该方法逻辑不对,已将正确逻辑移至getSumDetail方法中由ShangmaHasPayed去判断
 */
@Deprecated
public static boolean isHasPayedByPlayerId(String playerId) {
    String hasPayedStr = "";
    ObservableList<WanjiaInfo> obList = tablePJ.getItems();
    if (obList != null && obList.size() > 0) {
        for (WanjiaInfo info : obList) {
            if (info.getWanjiaId() != null && info.getWanjiaId().equals(playerId) && "1".equals(info.getHasPayed())) {
                return true;
            }
        }
    }
    return false;
}
Also used : WanjiaInfo(com.kendy.entity.WanjiaInfo)

Example 5 with WanjiaInfo

use of com.kendy.entity.WanjiaInfo 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

WanjiaInfo (com.kendy.entity.WanjiaInfo)11 TotalInfo (com.kendy.entity.TotalInfo)5 LinkedList (java.util.LinkedList)4 CurrentMoneyInfo (com.kendy.entity.CurrentMoneyInfo)3 DangjuInfo (com.kendy.entity.DangjuInfo)3 JiaoshouInfo (com.kendy.entity.JiaoshouInfo)3 KaixiaoInfo (com.kendy.entity.KaixiaoInfo)3 PingzhangInfo (com.kendy.entity.PingzhangInfo)3 ProfitInfo (com.kendy.entity.ProfitInfo)3 TeamInfo (com.kendy.entity.TeamInfo)3 ZijinInfo (com.kendy.entity.ZijinInfo)3 ArrayList (java.util.ArrayList)3 ShangmaDetailInfo (com.kendy.entity.ShangmaDetailInfo)2 IOException (java.io.IOException)2 List (java.util.List)2 ObservableList (javafx.collections.ObservableList)2 GDController (com.kendy.controller.GDController)1 QuotaController (com.kendy.controller.QuotaController)1 DangtianHuizongInfo (com.kendy.entity.DangtianHuizongInfo)1 Huishui (com.kendy.entity.Huishui)1