mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 财务中心 电费 服务费
This commit is contained in:
@@ -204,6 +204,8 @@ public class OrderSplitRecordServiceImpl implements OrderSplitRecordService {
|
||||
summaryData.setOrderCount(orderCodeSet.size());
|
||||
BigDecimal totalSettleAmount = BigDecimal.ZERO; // 当天结算金额汇总
|
||||
BigDecimal totalMerchantSplitAmount = BigDecimal.ZERO; // 当天运营商分账金额汇总
|
||||
BigDecimal totalMerchantElecAmount = BigDecimal.ZERO; // 当天运营商分账金额汇总
|
||||
BigDecimal totalMerchantServiceAmount = BigDecimal.ZERO; // 当天运营商分账金额汇总
|
||||
BigDecimal totalOtherSplitAmount = BigDecimal.ZERO; // 当天其他人分账金额汇总
|
||||
BigDecimal totalFeeAmount = BigDecimal.ZERO; // 当天手续费金额
|
||||
Map<String, List<OrderSplitRecord>> otherSplitDetailMap = Maps.newHashMap(); // 当天其他人分账的记录
|
||||
@@ -220,6 +222,8 @@ public class OrderSplitRecordServiceImpl implements OrderSplitRecordService {
|
||||
// if (adapayMemberAccount != null && adapayMemberAccount.getAdapayMemberId().equals(record.getAdapayMemberId())) {
|
||||
// record.getAdapayMemberId() 存在usedAdapayMemberIdList
|
||||
if (CollectionUtils.isNotEmpty(usedAdapayMemberIdList) && usedAdapayMemberIdList.contains(record.getAdapayMemberId())) {
|
||||
totalMerchantElecAmount = totalMerchantElecAmount.add(record.getElectricitySplitAmount());
|
||||
totalMerchantServiceAmount = totalMerchantServiceAmount.add(record.getServiceSplitAmount());
|
||||
totalMerchantSplitAmount = totalMerchantSplitAmount.add(record.getElectricitySplitAmount()).add(record.getServiceSplitAmount());
|
||||
} else {
|
||||
totalOtherSplitAmount = totalOtherSplitAmount.add(record.getElectricitySplitAmount()).add(record.getServiceSplitAmount());
|
||||
@@ -259,6 +263,8 @@ public class OrderSplitRecordServiceImpl implements OrderSplitRecordService {
|
||||
summaryData.setTotalSettleAmount(totalSettleAmount);
|
||||
summaryData.setMerchantSplitAmount(totalMerchantSplitAmount);
|
||||
summaryData.setMerchantFeeAmount(totalFeeAmount);
|
||||
summaryData.setMerchantElecAmount(totalMerchantElecAmount);
|
||||
summaryData.setMerchantServiceAmount(totalMerchantServiceAmount);
|
||||
summaryData.setOtherSplitAmount(totalOtherSplitAmount);
|
||||
resultList.add(summaryData);
|
||||
}
|
||||
|
||||
@@ -434,20 +434,7 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
|
||||
totalAmount = totalAmount.add(amount);
|
||||
virtualAmount = virtualAmount.add(settleOrderReportVO.getVirtualAmount());
|
||||
}
|
||||
// 用电度数
|
||||
report.setUseElectricity(useElectricity);
|
||||
// 充电次数
|
||||
report.setChargeNum(chargeNum);
|
||||
// 充电时长
|
||||
report.setChargeTime(chargeTime);
|
||||
// 电费金额
|
||||
report.setElectricityAmount(electricityAmount);
|
||||
// 服务费金额
|
||||
report.setServiceAmount(serviceAmount);
|
||||
// 收入金额
|
||||
report.setTotalAmount(totalAmount);
|
||||
// 虚拟金额
|
||||
report.setVirtualAmount(virtualAmount);
|
||||
|
||||
|
||||
// 从清分账单中计算交易金额,交易手续费
|
||||
GetClearingBillDTO clearingBillDTO = GetClearingBillDTO.builder()
|
||||
@@ -476,8 +463,28 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
tradeFee = orderSplitDailySummaryData.stream().map(OrderSplitDailySummaryData::getMerchantFeeAmount)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
|
||||
electricityAmount = orderSplitDailySummaryData.stream().map(OrderSplitDailySummaryData::getMerchantElecAmount)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
|
||||
serviceAmount = orderSplitDailySummaryData.stream().map(OrderSplitDailySummaryData::getMerchantServiceAmount)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
}
|
||||
|
||||
// 用电度数
|
||||
report.setUseElectricity(useElectricity);
|
||||
// 充电次数
|
||||
report.setChargeNum(chargeNum);
|
||||
// 充电时长
|
||||
report.setChargeTime(chargeTime);
|
||||
// 电费金额
|
||||
report.setElectricityAmount(electricityAmount);
|
||||
// 服务费金额
|
||||
report.setServiceAmount(serviceAmount);
|
||||
// 收入金额
|
||||
report.setTotalAmount(totalAmount);
|
||||
// 虚拟金额
|
||||
report.setVirtualAmount(virtualAmount);
|
||||
// 交易金额
|
||||
report.setTradeAmount(tradeAmount.subtract(tradeFee));
|
||||
// 交易手续费
|
||||
|
||||
@@ -47,6 +47,16 @@ public class OrderSplitDailySummaryData {
|
||||
*/
|
||||
private BigDecimal merchantFeeAmount;
|
||||
|
||||
/**
|
||||
* 本运营商总电费金额
|
||||
*/
|
||||
private BigDecimal merchantElecAmount;
|
||||
|
||||
/**
|
||||
* 本运营商总服务费金额
|
||||
*/
|
||||
private BigDecimal merchantServiceAmount;
|
||||
|
||||
/**
|
||||
* 他人分账金额(被分走的金额)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user