fix: 统计接口新增参数。

This commit is contained in:
tianyongbao
2025-01-24 09:50:04 +08:00
parent 546778307c
commit d08c0e92c4

View File

@@ -1054,12 +1054,27 @@ public class StatisticAnalysisImpl implements IStatisticAnalysisService {
detailDto.setState("0");
detailDto.setBankCardLendId(analysisDto.getId());
List<InstallmentHistoryDetailVo> detailList=installmentHistoryDetailMapper.selectInstallmentHistoryDetailList(detailDto);
//未结清本息
double unClearedDetail = 0;
if(detailList.size()>0){
unClearedDetail=detailList.stream().mapToDouble(InstallmentHistoryDetailVo::getCurrentAmount).sum();
}
map.put("unClearedDetail",decimalFormat.format(unClearedDetail));
//未结清本金
double unClearedPrincipal = 0;
if(detailList.size()>0){
unClearedPrincipal=detailList.stream().mapToDouble(InstallmentHistoryDetailVo::getPrincipal).sum();
}
map.put("unClearedPrincipal",decimalFormat.format(unClearedPrincipal));
//未结清利息
double unClearedInterest = 0;
if(detailList.size()>0){
unClearedInterest=detailList.stream().mapToDouble(InstallmentHistoryDetailVo::getInterest).sum();
}
map.put("unClearedInterest",decimalFormat.format(unClearedInterest));
//未结清账户数
installmentHistoryDto.setState("0");
installmentHistoryDto.setType(analysisDto.getDataType());
@@ -1081,6 +1096,18 @@ public class StatisticAnalysisImpl implements IStatisticAnalysisService {
}
map.put("dueDetail",decimalFormat.format(dueDetail));
double dueInterest =0;
if(detailList.size()>0){
dueInterest=detailList.stream().mapToDouble(InstallmentHistoryDetailVo::getInterest).sum();
}
map.put("dueInterest",decimalFormat.format(dueInterest));
double duePrincipal =0;
if(detailList.size()>0){
duePrincipal=detailList.stream().mapToDouble(InstallmentHistoryDetailVo::getPrincipal).sum();
}
map.put("duePrincipal",decimalFormat.format(duePrincipal));
//网贷当月已还款
detailDto.setState("1");
detailDto.setType(analysisDto.getDataType());