fix: 借贷记账,更新余额的时候,应当是本金加利息。

This commit is contained in:
tianyongbao
2025-10-29 08:07:38 +08:00
parent 33660449e1
commit ca84b1abe0

View File

@@ -657,12 +657,12 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor
accountsTransferRecord.setInAccountId(debitCardVo.getId());
accountsTransferRecord.setOutAccountId(lendVo.getId());
accountsTransferRecord.setName(lendVo.getName()+""+StringUtils.getLastNumberChars(3,lendVo.getCode())+")借款至"+debitCardVo.getName()+""+StringUtils.getLastNumberChars(3,debitCardVo.getCode())+"");
lendAccount.setBalance(lendAccount.getBalance()-accountsTransferRecord.getAmount());
lendAccount.setBalance(lendAccount.getBalance()-accountsTransferRecord.getActualAmount());
}else if(accountsTransferRecord.getDealType().equals("2")){
accountsTransferRecord.setInAccountId(lendVo.getId());
accountsTransferRecord.setOutAccountId(debitCardVo.getId());
accountsTransferRecord.setName(debitCardVo.getName()+""+StringUtils.getLastNumberChars(3,debitCardVo.getCode())+")还款至"+lendVo.getName()+""+StringUtils.getLastNumberChars(3,lendVo.getCode())+"");
lendAccount.setBalance(lendAccount.getBalance()+accountsTransferRecord.getAmount());
lendAccount.setBalance(lendAccount.getBalance()+accountsTransferRecord.getActualAmount());
}
lendAccount.setAvailableLimit(lendAccount.getBalance());
lendAccount.setUpdateTime(accountsTransferRecord.getCreateTime());