mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
更新查询分账金额方法
This commit is contained in:
@@ -147,7 +147,10 @@ public class PaymentTestController {
|
||||
List<String> unSplitList = Lists.newArrayList(); // 未分帐
|
||||
List<String> splitList = Lists.newArrayList(); // 已分帐
|
||||
|
||||
BigDecimal total = BigDecimal.ZERO;
|
||||
BigDecimal total = BigDecimal.ZERO; // 总分账金额
|
||||
BigDecimal totalWithdrawalAmt = BigDecimal.ZERO; // 实际到账金额汇总
|
||||
BigDecimal totalFeeAmt = BigDecimal.ZERO; // 手续费金额汇总
|
||||
|
||||
List<String> selfList = Lists.newArrayList();
|
||||
|
||||
Map<String, BigDecimal> map = Maps.newHashMap();
|
||||
@@ -178,6 +181,19 @@ public class PaymentTestController {
|
||||
adapayMemberId = jsonObject.getString("adapayMemberIds");
|
||||
}
|
||||
|
||||
BigDecimal confirmAmt = new BigDecimal(confirm.getConfirmAmt()); // 本次确认金额
|
||||
BigDecimal confirmedAmt = new BigDecimal(confirm.getConfirmedAmt()); // 已确认金额
|
||||
BigDecimal feeAmt = new BigDecimal(confirm.getFeeAmt()); // 手续费
|
||||
|
||||
// 汇总已确认金额
|
||||
total = total.add(confirmedAmt);
|
||||
|
||||
// 汇总手续费金额
|
||||
totalFeeAmt = totalFeeAmt.add(feeAmt);
|
||||
|
||||
// 汇总可提现金额
|
||||
totalWithdrawalAmt = totalWithdrawalAmt.add(confirmAmt).subtract(feeAmt);
|
||||
|
||||
// confirm
|
||||
List<DivMember> divMembers = confirm.getDivMembers();
|
||||
System.out.println("confirm:" + JSON.toJSONString(divMembers));
|
||||
@@ -185,8 +201,7 @@ public class PaymentTestController {
|
||||
// 放map
|
||||
map.merge(divMember.getMemberId(), new BigDecimal(divMember.getAmount()), BigDecimal::add);
|
||||
}
|
||||
BigDecimal confirmedAmt = new BigDecimal(confirm.getConfirmedAmt());
|
||||
total = total.add(confirmedAmt);
|
||||
|
||||
if (StringUtils.equals(adapayMemberId, "0")) {
|
||||
selfList.add(paymentId);
|
||||
}
|
||||
@@ -198,7 +213,8 @@ public class PaymentTestController {
|
||||
}
|
||||
System.out.println("=================未分账:" + JSON.toJSONString(unSplitList) + ", 数量:" + unSplitList.size());
|
||||
System.out.println("=================已分账:" + JSON.toJSONString(map) + ", 总分账:" + total + ", 数量:" + splitList.size());
|
||||
System.out.println("=================自己:" + JSON.toJSONString(selfList) + ", 数量:" + selfList.size());
|
||||
System.out.println("===============金额明细:" + "总到账金额:" + totalWithdrawalAmt + ", 总手续费:" + totalFeeAmt);
|
||||
System.out.println("===================自己:" + JSON.toJSONString(selfList) + ", 数量:" + selfList.size());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user