mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
订单分账逻辑
This commit is contained in:
@@ -27,12 +27,12 @@ public class OrderSettleResult {
|
||||
/**
|
||||
* 确认金额
|
||||
*/
|
||||
private String confirm_amt;
|
||||
private String confirmAmt;
|
||||
|
||||
/**
|
||||
* 支付确认手续费金额
|
||||
*/
|
||||
private String fee_amt;
|
||||
private String feeAmt;
|
||||
|
||||
/**
|
||||
* 附加说明
|
||||
|
||||
@@ -1107,13 +1107,13 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
// 应清分金额 = 订单产生的电费+服务费实际消费 汇总
|
||||
shouldClearingAmount = shouldClearingAmount.add(orderBasicInfo.getSettleAmount());
|
||||
// 实际清分金额 = 汇付清分接口返回的清分金额
|
||||
actualClearingAmount = actualClearingAmount.add(new BigDecimal(orderSettleResult.getConfirm_amt()));
|
||||
actualClearingAmount = actualClearingAmount.add(new BigDecimal(orderSettleResult.getConfirmAmt()));
|
||||
// 手续费金额 = 汇付清分接口返回的手续费金额
|
||||
feeAmount = feeAmount.add(new BigDecimal(orderSettleResult.getFee_amt()));
|
||||
feeAmount = feeAmount.add(new BigDecimal(orderSettleResult.getFeeAmt()));
|
||||
// 可提现金额 = 实际清分金额 - 手续费金额
|
||||
withdrawableAmount = withdrawableAmount
|
||||
.add(new BigDecimal(orderSettleResult.getConfirm_amt()))
|
||||
.subtract(new BigDecimal(orderSettleResult.getFee_amt()));
|
||||
.add(new BigDecimal(orderSettleResult.getConfirmAmt()))
|
||||
.subtract(new BigDecimal(orderSettleResult.getFeeAmt()));
|
||||
|
||||
ClearingBillDetail clearingBillDetail = ClearingBillDetail.builder()
|
||||
.clearingBillCode(clearingBillCode)
|
||||
@@ -1261,9 +1261,9 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
|
||||
// 分账接口返回的信息
|
||||
OrderSettleResult result = new OrderSettleResult();
|
||||
result.setConfirm_amt(confirmAmt.toString());
|
||||
result.setConfirmAmt(confirmAmt.toString());
|
||||
result.setStatus(status);
|
||||
result.setFee_amt(feeAmt.toString());
|
||||
result.setFeeAmt(feeAmt.toString());
|
||||
// result.setDescription(description);
|
||||
return result;
|
||||
}
|
||||
@@ -1346,9 +1346,9 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
|
||||
// 分账接口返回的信息
|
||||
OrderSettleResult result = new OrderSettleResult();
|
||||
result.setConfirm_amt(paymentConfirmResponse.getConfirm_amt());
|
||||
result.setConfirmAmt(paymentConfirmResponse.getConfirm_amt());
|
||||
result.setStatus(paymentConfirmResponse.getStatus());
|
||||
result.setFee_amt(paymentConfirmResponse.getFee_amt());
|
||||
result.setFeeAmt(paymentConfirmResponse.getFee_amt());
|
||||
// result.setDescription(paymentConfirmResponse.getDescription());
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user