use of com.kendy.entity.ProfitInfo in project financial by greatkendy123.
the class MoneyService method updateTableProfit.
/**
* 更新利润表
*/
public static void updateTableProfit(TableView<ProfitInfo> table, double todayKaixiao) {
// 获取ObserableList
try {
ObservableList<ProfitInfo> list = table.getItems();
for (ProfitInfo info : list) {
String type = info.getProfitType();
if ("总服务费".equals(type)) {
info.setProfitAccount(digit0(getNum(info.getProfitAccount()) + getTeamSum("服务费")));
} else if ("总保险".endsWith(type)) {
info.setProfitAccount(digit0(getNum(info.getProfitAccount()) + getTeamSum("保险")));
} else if ("总回水".endsWith(type)) {
info.setProfitAccount(digit0(getNum(info.getProfitAccount()) + getTeamSum("团队回水")));
} else if ("总开销".endsWith(type)) {
info.setProfitAccount(digit0((getNum(info.getProfitAccount()) + todayKaixiao - getTeamSum("上场开销")) + ""));
} else if ("总回保".endsWith(type)) {
// 无公式 总保回
info.setProfitAccount(digit0(getNum(info.getProfitAccount()) + (getTeamSum("总保回") * (-1)) + ""));
}
}
;
table.setItems(list);
} catch (Exception e) {
log.error("检测到更新利润表出错,可能是没有导入数据就进行平帐和锁定");
}
}
use of com.kendy.entity.ProfitInfo in project financial by greatkendy123.
the class MoneyService method reCovery10TablesByPage.
/**
* 根据分页自动恢复该页锁定的10个表数据
*/
public static void reCovery10TablesByPage(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, int pageIndex) throws Exception {
// 获取该页所有数据
Map<String, String> map = DataConstans.All_Locked_Data_Map.get(pageIndex + "");
/**
*****************************************************
*/
// List<TotalInfo> TotalInfoList = JSON.parseObject(map.get("战绩"), new TypeReference<List<TotalInfo>>() {});
List<TotalInfo> TotalInfoList = JSON.parseObject(getJsonString(map, "战绩"), new TypeReference<List<TotalInfo>>() {
});
ObservableList<TotalInfo> obList = FXCollections.observableArrayList();
for (TotalInfo infos : TotalInfoList) {
obList.add(infos);
}
tableTotal.setItems(obList);
tableTotal.refresh();
/**
*********************************************************
*/
List<WanjiaInfo> WanjiaInfoList = JSON.parseObject(getJsonString(map, "玩家"), new TypeReference<List<WanjiaInfo>>() {
});
ObservableList<WanjiaInfo> WanjiaInfo_OB_List = FXCollections.observableArrayList();
for (WanjiaInfo infos : WanjiaInfoList) {
WanjiaInfo_OB_List.add(infos);
}
tableWanjia.setItems(WanjiaInfo_OB_List);
tableWanjia.refresh();
/**
*************************************************************************
*/
List<TeamInfo> TeamInfoList = JSON.parseObject(getJsonString(map, "团队回水"), new TypeReference<List<TeamInfo>>() {
});
ObservableList<TeamInfo> TeamInfo_OB_List = FXCollections.observableArrayList();
for (TeamInfo infos : TeamInfoList) {
TeamInfo_OB_List.add(infos);
}
tableTeam.setItems(TeamInfo_OB_List);
tableTeam.getColumns().get(4).setText(getJsonString(map, "团队回水总和"));
tableTeam.refresh();
/**
*************************************************************************
*/
List<CurrentMoneyInfo> CurrentMoneyInfoList = JSON.parseObject(getJsonString(map, "实时金额"), new TypeReference<List<CurrentMoneyInfo>>() {
});
ObservableList<CurrentMoneyInfo> CurrentMoneyInfo_OB_List = FXCollections.observableArrayList();
for (CurrentMoneyInfo infos : CurrentMoneyInfoList) {
CurrentMoneyInfo_OB_List.add(infos);
}
tableCurrentMoney.setItems(CurrentMoneyInfo_OB_List);
String sumOfCurrentMoney = getJsonString(map, "实时金额总和");
tableCurrentMoney.getColumns().get(2).setText(sumOfCurrentMoney);
tableCurrentMoney.refresh();
/**
**********************************************************
*/
List<ZijinInfo> ZijinInfoList = JSON.parseObject(getJsonString(map, "资金"), new TypeReference<List<ZijinInfo>>() {
});
ObservableList<ZijinInfo> ZijinInfo_OB_List = FXCollections.observableArrayList();
for (ZijinInfo infos : ZijinInfoList) {
ZijinInfo_OB_List.add(infos);
}
tableZijin.getColumns().get(1).setText(getJsonString(map, "资金总和"));
tableZijin.setItems(ZijinInfo_OB_List);
tableZijin.refresh();
/**
***************************************************************
*/
List<ProfitInfo> ProfitInfoList = JSON.parseObject(getJsonString(map, "利润"), new TypeReference<List<ProfitInfo>>() {
});
ObservableList<ProfitInfo> ProfitInfo_OB_List = FXCollections.observableArrayList();
for (ProfitInfo infos : ProfitInfoList) {
ProfitInfo_OB_List.add(infos);
}
tableProfit.getColumns().get(1).setText(getJsonString(map, "利润总和"));
tableProfit.setItems(ProfitInfo_OB_List);
tableProfit.refresh();
/**
**********************************************************
*/
List<KaixiaoInfo> KaixiaoInfoList = JSON.parseObject(getJsonString(map, "实时开销"), new TypeReference<List<KaixiaoInfo>>() {
});
ObservableList<KaixiaoInfo> KaixiaoInfo_OB_List = FXCollections.observableArrayList();
for (KaixiaoInfo infos : KaixiaoInfoList) {
KaixiaoInfo_OB_List.add(infos);
}
tableKaixiao.getColumns().get(1).setText(getJsonString(map, "实时开销总和"));
tableKaixiao.setItems(KaixiaoInfo_OB_List);
tableKaixiao.refresh();
/**
************************************************************
*/
List<DangjuInfo> DangjuInfoList = JSON.parseObject(getJsonString(map, "当局"), new TypeReference<List<DangjuInfo>>() {
});
ObservableList<DangjuInfo> DangjuInfo_OB_List = FXCollections.observableArrayList();
for (DangjuInfo infos : DangjuInfoList) {
DangjuInfo_OB_List.add(infos);
}
tableDangju.getColumns().get(1).setText(getJsonString(map, "当局总和"));
tableDangju.setItems(DangjuInfo_OB_List);
tableDangju.refresh();
/**
*************************************************************
*/
List<JiaoshouInfo> JiaoshouInfoList = JSON.parseObject(getJsonString(map, "交收"), new TypeReference<List<JiaoshouInfo>>() {
});
ObservableList<JiaoshouInfo> JiaoshouInfo_OB_List = FXCollections.observableArrayList();
for (JiaoshouInfo infos : JiaoshouInfoList) {
JiaoshouInfo_OB_List.add(infos);
}
tableJiaoshou.getColumns().get(1).setText(getJsonString(map, "交收总和"));
tableJiaoshou.setItems(JiaoshouInfo_OB_List);
tableJiaoshou.refresh();
/**
***************************************************************
*/
List<PingzhangInfo> PingzhangInfoList = JSON.parseObject(getJsonString(map, "平帐"), new TypeReference<List<PingzhangInfo>>() {
});
ObservableList<PingzhangInfo> PingzhangInfo_OB_List = FXCollections.observableArrayList();
for (PingzhangInfo infos : PingzhangInfoList) {
PingzhangInfo_OB_List.add(infos);
}
tablePingzhang.getColumns().get(1).setText(getJsonString(map, "平帐总和"));
tablePingzhang.setItems(PingzhangInfo_OB_List);
tablePingzhang.refresh();
/**
***************************************************************
*/
LMLabel.setText(getJsonString(map, "联盟对帐"));
}
Aggregations