use of com.kendy.entity.KaixiaoInfo in project financial by greatkendy123.
the class MoneyService method fillTableCurrentMoneyInfo2.
/**
* 将前一次的实时金额数据备份到第01表=== 非2017-01-01
* @param table
* @param userInfoList
*/
public static void fillTableCurrentMoneyInfo2(TableView<TeamInfo> tableTeam, TableView<CurrentMoneyInfo> table, TableView<ZijinInfo> tableZijin, TableView<ProfitInfo> tableProfit, TableView<KaixiaoInfo> tableKaixiao, Label LMLabel) {
Map<String, String> map = DataConstans.preDataMap;
/**
********************************************** 团队回水表 *************
*/
tableTeam.setItems(null);
ObservableList<TeamInfo> obList = FXCollections.observableArrayList();
List<TeamInfo> teamList = JSON.parseObject(DataConstans.preDataMap.get("团队回水"), new TypeReference<List<TeamInfo>>() {
});
for (TeamInfo info : teamList) {
obList.add(info);
}
tableTeam.setItems(obList);
/**
********************************************** 实时金额表 *************
*/
// 1清空 表数据
table.setItems(null);
// 2获取InfoList
ObservableList<CurrentMoneyInfo> obListCurrentMoney = FXCollections.observableArrayList();
List<CurrentMoneyInfo> cmList = JSON.parseObject(DataConstans.preDataMap.get("实时金额"), new TypeReference<List<CurrentMoneyInfo>>() {
});
for (CurrentMoneyInfo info : cmList) {
obListCurrentMoney.add(info);
}
table.setItems(obListCurrentMoney);
table.refresh();
// 合并ID操作
flush_SSJE_table();
/**
********************************************** 资金表 *************
*/
// 1清空 表数据
tableZijin.setItems(null);
// 2获取InfoList
ObservableList<ZijinInfo> obListZijin = FXCollections.observableArrayList();
List<ZijinInfo> zijinList = JSON.parseObject(DataConstans.preDataMap.get("资金"), new TypeReference<List<ZijinInfo>>() {
});
for (ZijinInfo info : zijinList) {
obListZijin.add(info);
}
tableZijin.setItems(obListZijin);
/**
********************************************** 利润表 *************
*/
// 1清空 表数据
tableProfit.setItems(null);
// 2获取InfoList
ObservableList<ProfitInfo> obListProfit = FXCollections.observableArrayList();
List<ProfitInfo> profitList = JSON.parseObject(DataConstans.preDataMap.get("利润"), new TypeReference<List<ProfitInfo>>() {
});
for (ProfitInfo info : profitList) {
obListProfit.add(info);
}
tableProfit.setItems(obListProfit);
/**
********************************************** 实时开销表 *************
*/
tableKaixiao.setItems(null);
// 2获取InfoList
ObservableList<KaixiaoInfo> obListKaixiao = FXCollections.observableArrayList();
List<KaixiaoInfo> kaixiaoList = JSON.parseObject(DataConstans.preDataMap.get("实时开销"), new TypeReference<List<KaixiaoInfo>>() {
});
for (KaixiaoInfo info : kaixiaoList) {
obListKaixiao.add(info);
}
// add 注释掉:新一天的统计中实时开销为空
tableKaixiao.setItems(obListKaixiao);
// 缓存一一场的实时开销总和
DataConstans.SumMap.put("上场开销", getSumOfTableKaixiao(tableKaixiao));
/**
********************************************** 联盟对帐 *************
*/
String lm = DataConstans.preDataMap.get("联盟对帐");
// LMLabel.setText(LMLabel.getText());//注意这里是{联盟对帐={联盟对帐=3000}}
// 注意这里是{联盟对帐={联盟对帐=3000}}
LMLabel.setText(lm);
}
use of com.kendy.entity.KaixiaoInfo 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;
}
use of com.kendy.entity.KaixiaoInfo in project financial by greatkendy123.
the class MoneyService method getSumOfTableKaixiao.
/**
* 计算开销表的总和
*/
private static Double getSumOfTableKaixiao(TableView<KaixiaoInfo> table) {
Double sumOfTable = 0.0;
// 获取ObserableList
ObservableList<KaixiaoInfo> list = table.getItems();
if (list == null) {
return sumOfTable;
}
// 表中每一行的具体金额
String tempSingleVal = "";
for (KaixiaoInfo moneyInfo : list) {
tempSingleVal = moneyInfo.getKaixiaoMoney();
sumOfTable += getNum(tempSingleVal);
}
;
return sumOfTable;
}
use of com.kendy.entity.KaixiaoInfo in project financial by greatkendy123.
the class MoneyService method fillTables.
public static void fillTables(TableView<ZijinInfo> tableZijin, TableView<ProfitInfo> tableProfit, TableView<KaixiaoInfo> tableKaixiao, Label LMLabel, Map<String, String> map) {
/**
********************************************** 资金表 *************
*/
// 1清空 表数据
tableZijin.setItems(null);
// 2获取InfoList
ObservableList<ZijinInfo> observableList2 = FXCollections.observableArrayList();
Map<String, String> zijinMap = JSON.parseObject(map.get("资金"), new TypeReference<Map<String, String>>() {
});
zijinMap.forEach((type, account) -> {
observableList2.add(new ZijinInfo(type, account));
});
tableZijin.setItems(observableList2);
/**
********************************************** 利润表 *************
*/
// 1清空 表数据
tableProfit.setItems(null);
// 2获取InfoList
ObservableList<ProfitInfo> observableList3 = FXCollections.observableArrayList();
Map<String, String> profitMap = JSON.parseObject(map.get("昨日利润"), new TypeReference<Map<String, String>>() {
});
profitMap.forEach((type, account) -> {
observableList3.add(new ProfitInfo(type, digit0(account)));
});
tableProfit.setItems(observableList3);
/**
********************************************** 实时开销表 *************
*/
tableKaixiao.setItems(null);
// 2获取InfoList
ObservableList<KaixiaoInfo> observableList4 = FXCollections.observableArrayList();
Map<String, String> kaixiaoMap = JSON.parseObject(map.get("实时开销"), new TypeReference<Map<String, String>>() {
});
kaixiaoMap.forEach((type, account) -> {
observableList4.add(new KaixiaoInfo(type, digit0(account)));
});
tableKaixiao.setItems(observableList4);
// 缓存一一场的实时开销总和
DataConstans.SumMap.put("上场开销", getSumOfTableKaixiao(tableKaixiao));
/**
********************************************** 联盟对帐 *************
*/
// 注意这里是{联盟对帐={联盟对帐=3000}}
LMLabel.setText(LMLabel.getText());
}
use of com.kendy.entity.KaixiaoInfo in project financial by greatkendy123.
the class ZonghuiService method initTableKaixiaoAndGetSum.
/**
* 总汇Tab中的开销表赋值
*/
public static String initTableKaixiaoAndGetSum(TableView<ZonghuiKaixiaoInfo> tableZonghuiKaixiao) {
ObservableList<ZonghuiKaixiaoInfo> obList = FXCollections.observableArrayList();
Map<String, Map<String, String>> lockedMap = DataConstans.All_Locked_Data_Map;
String sumOfKaixiao = "0";
if (lockedMap.size() > 0) {
Map<String, String> map = lockedMap.get(DataConstans.Index_Table_Id_Map.size() + "");
List<KaixiaoInfo> KaixiaoInfoList = JSON.parseObject(MoneyService.getJsonString(map, "实时开销"), new TypeReference<List<KaixiaoInfo>>() {
});
for (KaixiaoInfo infos : KaixiaoInfoList) {
obList.add(new ZonghuiKaixiaoInfo(infos.getKaixiaoType(), infos.getKaixiaoMoney()));
}
sumOfKaixiao = MoneyService.getJsonString(map, "实时开销总和");
tableZonghuiKaixiao.getColumns().get(1).setText(sumOfKaixiao);
}
tableZonghuiKaixiao.setItems(obList);
tableZonghuiKaixiao.refresh();
return sumOfKaixiao;
}
Aggregations