fix: 自测功能优化。
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
package com.ruoyi.invest.domain.vo;
|
package com.ruoyi.invest.domain.vo;
|
||||||
|
|
||||||
import com.ruoyi.invest.domain.Accounts;
|
import com.ruoyi.invest.domain.Accounts;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
/**
|
/**
|
||||||
* 记账账户Vo对象 accounts
|
* 记账账户Vo对象 accounts
|
||||||
*
|
*
|
||||||
@@ -17,4 +17,22 @@ public class AccountsVo extends Accounts
|
|||||||
@ApiModelProperty(value="银行卡名称卡号)")
|
@ApiModelProperty(value="银行卡名称卡号)")
|
||||||
private String nameCode;
|
private String nameCode;
|
||||||
|
|
||||||
|
/** 账单日 */
|
||||||
|
@ApiModelProperty(value="账单日)")
|
||||||
|
private int billDate;
|
||||||
|
|
||||||
|
/** 还款日 */
|
||||||
|
@ApiModelProperty(value="还款日)")
|
||||||
|
private int payDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="账单日)")
|
||||||
|
private String billDateName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="还款日)")
|
||||||
|
private String payDateName;
|
||||||
|
|
||||||
|
/** 储蓄卡类型,1:I类卡,2:II类卡 */
|
||||||
|
@ApiModelProperty(value="储蓄卡类型,1:I类卡,2:II类卡")
|
||||||
|
private String debitType;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,6 +73,12 @@ public class AccountsServiceImpl implements IAccountsService
|
|||||||
}else {
|
}else {
|
||||||
accounts.setNameCode(typeName+accounts.getName());
|
accounts.setNameCode(typeName+accounts.getName());
|
||||||
}
|
}
|
||||||
|
if(!"null".equals(String.valueOf(accounts.getBillDate()))) {
|
||||||
|
accounts.setBillDateName(accounts.getBillDate()+"号");
|
||||||
|
}
|
||||||
|
if(!"null".equals(String.valueOf(accounts.getPayDate()))) {
|
||||||
|
accounts.setPayDateName(accounts.getPayDate()+"号");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return accountsList;
|
return accountsList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -527,7 +527,7 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor
|
|||||||
BankCardLendVo debitCardVo=bankCardLendMapper.selectBankCardLendById(accountsTransferRecord.getInAccountId());
|
BankCardLendVo debitCardVo=bankCardLendMapper.selectBankCardLendById(accountsTransferRecord.getInAccountId());
|
||||||
|
|
||||||
//实际入账金额
|
//实际入账金额
|
||||||
accountsTransferRecord.setActualAmount(accountsTransferRecord.getAmount());
|
accountsTransferRecord.setActualAmount(accountsTransferRecord.getAmount()+accountsTransferRecord.getCommission());
|
||||||
//借贷余额计算
|
//借贷余额计算
|
||||||
AccountsVo lendAccount=accountsMapper.selectAccountsById(lendVo.getId());
|
AccountsVo lendAccount=accountsMapper.selectAccountsById(lendVo.getId());
|
||||||
|
|
||||||
@@ -581,9 +581,9 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor
|
|||||||
AccountsVo debitAccount=accountsMapper.selectAccountsById(debitCardVo.getId());
|
AccountsVo debitAccount=accountsMapper.selectAccountsById(debitCardVo.getId());
|
||||||
//1表示借款,2表示还款
|
//1表示借款,2表示还款
|
||||||
if(accountsTransferRecord.getDealType().equals("1")){
|
if(accountsTransferRecord.getDealType().equals("1")){
|
||||||
debitAccount.setBalance(debitAccount.getBalance()+accountsTransferRecord.getActualAmount());
|
debitAccount.setBalance(debitAccount.getBalance()+accountsTransferRecord.getAmount());
|
||||||
}else if(accountsTransferRecord.getDealType().equals("2")){
|
}else if(accountsTransferRecord.getDealType().equals("2")){
|
||||||
debitAccount.setBalance(debitAccount.getBalance()-accountsTransferRecord.getActualAmount()-accountsTransferRecord.getCommission());
|
debitAccount.setBalance(debitAccount.getBalance()-accountsTransferRecord.getActualAmount());
|
||||||
}
|
}
|
||||||
debitAccount.setAvailableLimit(debitAccount.getBalance());
|
debitAccount.setAvailableLimit(debitAccount.getBalance());
|
||||||
debitAccount.setUpdateTime(accountsTransferRecord.getCreateTime());
|
debitAccount.setUpdateTime(accountsTransferRecord.getCreateTime());
|
||||||
@@ -593,7 +593,7 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor
|
|||||||
dealRecord.setAccountId(debitAccount.getAccountId());
|
dealRecord.setAccountId(debitAccount.getAccountId());
|
||||||
dealRecord.setId(IdWorker.getId());
|
dealRecord.setId(IdWorker.getId());
|
||||||
//支出金额
|
//支出金额
|
||||||
dealRecord.setAmount(accountsTransferRecord.getAmount()+accountsTransferRecord.getCommission());
|
dealRecord.setAmount(accountsTransferRecord.getActualAmount());
|
||||||
//实时余额
|
//实时余额
|
||||||
dealRecord.setCurrentBalance(debitAccount.getBalance());
|
dealRecord.setCurrentBalance(debitAccount.getBalance());
|
||||||
//1储蓄卡,2 信用卡,3 网贷,4 人情,5 投资账户
|
//1储蓄卡,2 信用卡,3 网贷,4 人情,5 投资账户
|
||||||
|
|||||||
@@ -20,10 +20,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
<result property="accountId" column="account_id" />
|
<result property="accountId" column="account_id" />
|
||||||
<result property="state" column="state" />
|
<result property="state" column="state" />
|
||||||
|
<result property="billDate" column="bill_date" />
|
||||||
|
<result property="payDate" column="pay_date" />
|
||||||
|
<result property="creditLimit" column="credit_limit" />
|
||||||
|
<result property="debitType" column="debit_type" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectAccountsVo">
|
<sql id="selectAccountsVo">
|
||||||
select a.id, a.name, a.type, a.code, a.balance, a.credit_limit, a.available_limit, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, a.remark, a.account_id, a.state from accounts a
|
select
|
||||||
|
a.id,
|
||||||
|
a.name,
|
||||||
|
a.type,
|
||||||
|
a.code,
|
||||||
|
a.balance,
|
||||||
|
a.credit_limit,
|
||||||
|
a.available_limit,
|
||||||
|
a.create_by,
|
||||||
|
a.create_time,
|
||||||
|
a.update_by,
|
||||||
|
a.update_time,
|
||||||
|
a.del_flag,
|
||||||
|
a.remark,
|
||||||
|
a.account_id,
|
||||||
|
a.state,
|
||||||
|
bcl.bill_date ,
|
||||||
|
bcl.pay_date ,
|
||||||
|
bcl.credit_limit ,
|
||||||
|
bcl.debit_type
|
||||||
|
from
|
||||||
|
accounts a
|
||||||
|
left join bank_card_lend bcl on
|
||||||
|
bcl.id = a.id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectAccountsList" parameterType="AccountsDto" resultMap="AccountsResult">
|
<select id="selectAccountsList" parameterType="AccountsDto" resultMap="AccountsResult">
|
||||||
|
|||||||
Reference in New Issue
Block a user