提交 b2de13b5 authored 作者: huyufan's avatar huyufan

Merge remote-tracking branch 'origin/v5.5_settlement_20231011' into release

# Conflicts: # performance-web/src/main/java/com/clx/performance/service/impl/OrderChildServiceImpl.java
......@@ -1369,6 +1369,7 @@ public class OrderChildServiceImpl implements OrderChildService {
private BigDecimal orderChildFreightCalc(OrderChild orderChild) {
BigDecimal totalFreight = orderChild.getFreightPrice().multiply(orderChild.getWeight());
if (orderChild.getUnloadNet() != null) {
totalFreight = orderChild.getFreightPrice().multiply(orderChild.getUnloadNet().compareTo(orderChild.getLoadNet()) < 0? orderChild.getUnloadNet() : orderChild.getLoadNet());
BigDecimal dif = orderChild.getUnloadNet().subtract(orderChild.getWeight());
if (dif.compareTo(BigDecimal.ZERO) < 0) {
totalFreight = totalFreight.add(orderChild.getLossPrice().multiply(dif));
......
......@@ -183,11 +183,11 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
//账户余额
runningWaterRecord.setAccountBalance(account.getAccountBalance());
//冻结金额
runningWaterRecord.setFrozenBalance(caseOutBalance);
runningWaterRecord.setFrozenBalance(account.getFrozenBalance().add(caseOutBalance));
//扣除金额
runningWaterRecord.setTakeOutBalance(BigDecimal.ZERO);
//可用余额
runningWaterRecord.setUsableBalance(account.getUsableBalance());
runningWaterRecord.setUsableBalance(account.getUsableBalance().subtract(caseOutBalance));
runningWaterRecord.setOwnerUserNo(param.getOwnerUserNo());
runningWaterRecord.setAccountType(param.getAccountType());
......@@ -710,8 +710,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
marginAccount.setRelationId(null);
marginAccount.setAlterationBalance(ensureBalance);
marginAccount.setFrozenBalance(ensureBalance);
marginAccount.setUsableBalance(ownerAccount.getUsableBalance());
marginAccount.setFrozenBalance(ownerAccount.getFrozenBalance().add(ensureBalance));
marginAccount.setUsableBalance(ownerAccount.getUsableBalance().subtract(ensureBalance));
marginAccount.setTakeOutBalance(BigDecimal.ZERO);
marginAccount.setAccountBalance(ownerAccount.getAccountBalance());
marginAccount.setOwnerUserNo(userNo);
......@@ -731,8 +731,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
prepaidFreight.setRelationId(null);
prepaidFreight.setAlterationBalance(frozenBalance);
prepaidFreight.setFrozenBalance(frozenBalance);
prepaidFreight.setUsableBalance(ownerAccount.getUsableBalance());
prepaidFreight.setFrozenBalance(ownerAccount.getFrozenBalance().add(frozenBalance));
prepaidFreight.setUsableBalance(ownerAccount.getUsableBalance().subtract(frozenBalance));
prepaidFreight.setTakeOutBalance(BigDecimal.ZERO);
prepaidFreight.setAccountBalance(ownerAccount.getAccountBalance());
prepaidFreight.setOwnerUserNo(userNo);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论