use of com.kendy.entity.ProxyTeamInfo 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;
}
use of com.kendy.entity.ProxyTeamInfo in project financial by greatkendy123.
the class TeamProxyService method refresh_TableTeamProxy_TableProxySum.
/**
* 刷新两个表,共用代码(选择团下拉框和点击刷新按钮时共用的代码)
*
* @param newValue teamID
*/
public static void refresh_TableTeamProxy_TableProxySum(Object newValue) {
if (newValue == null)
return;
Huishui hs = DataConstans.huishuiMap.get(newValue);
if (hs != null) {
if ("否".equals(hs.getZjManaged())) {
isZjManage.setSelected(false);
} else {
isZjManage.setSelected(true);
}
} else {
// add 2018-01-20
return;
}
// 加载数据{teamId={}}
double sumYSZJ = 0d;
double sumZJ = 0d;
double sumHS = 0d;
double sumHB = 0d;
double sumBX = 0d;
int sumRC = 0;
// Map<String,List<TeamHuishuiInfo>> teamMap = DataConstans.Total_Team_Huishui_Map;//锁定就保留信息,不减
Map<String, List<TeamHuishuiInfo>> teamMap = getTotalTeamHuishuiMap();
if (teamMap != null && teamMap.size() == 0) {
// 这个有问题,后期再看
log.error("----------------");
}
List<TeamHuishuiInfo> teamList = teamMap.get(newValue.toString().toUpperCase());
ObservableList<ProxyTeamInfo> obList = FXCollections.observableArrayList();
if (teamList != null) {
for (TeamHuishuiInfo info : teamList) {
obList.add(new ProxyTeamInfo(info.getTuan(), info.getWanjiaId(), info.getWanjia(), // yszj
info.getZj(), info.getShishou(), // 出回水是否等于回水
MoneyService.getNum(info.getChuHuishui()) * (-1) + "", // 保险是否等于回保
info.getHuibao(), info.getTableId(), // 保险
info.getBaoxian()));
sumYSZJ += MoneyService.getNum(info.getZj());
sumZJ += MoneyService.getNum(info.getShishou());
sumBX += MoneyService.getNum(info.getBaoxian());
sumHS += (MoneyService.getNum(info.getChuHuishui())) * (-1);
sumHB += MoneyService.getNum(info.getHuibao());
sumRC += 1;
}
}
tableProxyTeam.setItems(obList);
tableProxyTeam.refresh();
ObservableList<Node> sumHBox = proxySumHBox.getChildren();
for (Node node : sumHBox) {
Label label = (Label) node;
String labelId = label.getId();
switch(labelId) {
case "sumYSZJ":
label.setText(MoneyService.digit0(sumYSZJ));
break;
case "sumZJ":
label.setText(MoneyService.digit0(sumZJ));
break;
case "sumBX":
label.setText(MoneyService.digit0(sumBX));
break;
case "sumHS":
label.setText(MoneyService.digit1(sumHS + ""));
break;
case "sumHB":
label.setText(sumHB + "");
break;
case "sumRC":
label.setText(sumRC + "");
break;
}
}
// add by kendy 添加总回保比例,总回水比例,服务费和合计
proxyHSRate.setText(hs.getProxyHSRate());
proxyHBRate.setText(hs.getProxyHBRate());
proxyFWF.setText(hs.getProxyFWF());
double HSRate = getNumByPercent(hs.getProxyHSRate());
double HBRate = getNumByPercent(hs.getProxyHBRate());
// 服务费有效值
double FWFValid = NumUtil.getNum(hs.getProxyFWF());
// 计算服务费
double proxyFWFVal = calculateProxSumFWF(sumHS, HSRate, sumHB, HBRate, FWFValid);
// 计算合计
double proxyHeji = sumZJ + sumHS + sumHB - proxyFWFVal;
// 初始化合计表
tableProxySum.setItems(null);
ObservableList<ProxySumInfo> ob_Heji_List = FXCollections.observableArrayList();
ob_Heji_List.addAll(new ProxySumInfo("总战绩", NumUtil.digit0(sumZJ)), new ProxySumInfo("总回水", NumUtil.digit1(sumHS + "")), new ProxySumInfo("总回保", NumUtil.digit1(sumHB + "")), new ProxySumInfo("服务费", NumUtil.digit1(proxyFWFVal + "")), new ProxySumInfo("总人次", sumRC + ""));
tableProxySum.setItems(ob_Heji_List);
tableProxySum.getColumns().get(1).setText(NumUtil.digit1(proxyHeji + ""));
tableProxySum.refresh();
}
Aggregations