fix: 自测bug问题修复。

This commit is contained in:
tianyongbao
2024-07-24 16:31:59 +08:00
parent 3cac9b3064
commit 4f658b7531
5 changed files with 16 additions and 4 deletions

View File

@@ -42,4 +42,8 @@ public class AccountsDto extends BaseEntity implements Serializable
@ApiModelProperty(value="储蓄卡类型") @ApiModelProperty(value="储蓄卡类型")
private String debitType; private String debitType;
/** 还款账户标识,不为空时,查询储蓄卡和网络账户 */
@ApiModelProperty(value="还款账户flag")
private String repayFlag;
} }

View File

@@ -46,4 +46,8 @@ public class BankCardLendDto extends BaseEntity implements Serializable
@ApiModelProperty(value="账户状态") @ApiModelProperty(value="账户状态")
private String status; private String status;
/** 还款账户标识,不为空时,查询储蓄卡和网络账户 */
@ApiModelProperty(value="还款账户flag")
private String repayFlag;
} }

View File

@@ -1615,12 +1615,14 @@ public class StatisticAnalysisImpl implements IStatisticAnalysisService {
dto.setStatus("1"); dto.setStatus("1");
//储蓄卡 //储蓄卡
dto.setType("1"); dto.setType("1");
//只计算储蓄卡和网络账户的余额
dto.setRepayFlag("1");
List<AccountsVo> accountsList=accountsMapper.selectAccountsList(dto); List<AccountsVo> accountsList=accountsMapper.selectAccountsList(dto);
double debetBalance =0; double debetBalance =0;
if(accountsList.size()>0){ if(accountsList.size()>0){
debetBalance=accountsList.stream().mapToDouble(AccountsVo::getAvailableLimit).sum(); debetBalance=accountsList.stream().mapToDouble(AccountsVo::getAvailableLimit).sum();
} }
map.put("debetBalance",decimalFormat.format(debetBalance)); map.put("debitBalance",decimalFormat.format(debetBalance));
//信用卡 //信用卡
dto.setType("2"); dto.setType("2");
@@ -1646,11 +1648,11 @@ public class StatisticAnalysisImpl implements IStatisticAnalysisService {
//借贷账户 //借贷账户
dto.setType("3"); dto.setType("3");
accountsList=accountsMapper.selectAccountsList(dto); accountsList=accountsMapper.selectAccountsList(dto);
double debitBalance =0; double lendAccountBalance =0;
if(accountsList.size()>0){ if(accountsList.size()>0){
debitBalance=accountsList.stream().mapToDouble(AccountsVo::getAvailableLimit).sum(); lendAccountBalance=accountsList.stream().mapToDouble(AccountsVo::getAvailableLimit).sum();
} }
map.put("debitBalance",decimalFormat.format(debitBalance)); map.put("lendAccountBalance",decimalFormat.format(lendAccountBalance));
dto.setType(analysisDto.getDataType()); dto.setType(analysisDto.getDataType());

View File

@@ -65,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="state != null and state != ''"> and a.state = #{state}</if> <if test="state != null and state != ''"> and a.state = #{state}</if>
<if test="status != null and status != ''"> and a.status = #{status}</if> <if test="status != null and status != ''"> and a.status = #{status}</if>
<if test="accountId != null and accountId != ''"> and a.account_id = #{accountId}</if> <if test="accountId != null and accountId != ''"> and a.account_id = #{accountId}</if>
<if test="repayFlag != null and repayFlag != ''"> and bcl.debit_type in('1','2','3')</if>
</where> </where>
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}

View File

@@ -76,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="creditCardId != null "> and a.id = #{creditCardId}</if> <if test="creditCardId != null "> and a.id = #{creditCardId}</if>
<if test="lendType != null and lendType != ''"> and a.lend_type = #{lendType}</if> <if test="lendType != null and lendType != ''"> and a.lend_type = #{lendType}</if>
<if test="status != null and status != ''"> and a.status = #{status}</if> <if test="status != null and status != ''"> and a.status = #{status}</if>
<if test="repayFlag != null and repayFlag != ''"> and a.debit_type in('1','2','3')</if>
</where> </where>
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}