@ -573,31 +573,11 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
) ;
if ( StringUtils . isNotBlank ( pagerQuery . getChange ( ) ) ) {
if ( pagerQuery . getChange ( ) . equals ( "1" ) ) {
qw . apply ( "((SELECT l.vehCount FROM anrui_buscenter.bus_sales_order_loancontract as l WHERE l.loanContractNo = m.loanContractNo and l .isDelete = 0) > 1 and m.outstandingMoney != m.actualMoney and returnWay = '直还')" ) ;
qw . apply ( "((SELECT IFNULL(SUM(vehCount),0) FROM loan_repayment_schedule as s WHERE s.bankContractNo = m.bankContractNo and s .isDelete = 0) > 1 and m.outstandingMoney != m.actualMoney and returnWay = '直还')" ) ;
}
}
qw . orderByDesc ( "m.dataTime" ) ;
IPage < LoanRepaymentHistoryVo > pagging = baseMapper . monthListPage ( page , qw ) ;
// List<LoanRepaymentHistoryVo> records = pagging.getRecords();
// records.removeAll(Collections.singleton(null));
// if (!records.isEmpty()) {
// for (LoanRepaymentHistoryVo record : records) {
// String planDetailSid = record.getPlanDetailSid();
// List<LoanRepaymentHistory> histories = baseMapper.selByPlanSid(planDetailSid);
// BigDecimal returned = new BigDecimal(0);
// if (!histories.isEmpty()) {
// for (LoanRepaymentHistory history : histories) {
// returned = history.getActualMoney().add(returned);
// }
// }
// LoanRepaymentPlanDetails loanRepaymentPlanDetails = loanRepaymentPlanDetailsService.fetchBySid(record.getPlanDetailSid());
// if (null != loanRepaymentPlanDetails) {
// BigDecimal dueMoney = loanRepaymentPlanDetails.getDueMoney();
// BigDecimal subtract = dueMoney.subtract(returned);
// record.setOutstandingMoney(String.valueOf(subtract));
// }
// }
// }
PagerVo < LoanRepaymentHistoryVo > p = PagerUtil . pageToVo ( pagging , null ) ;
return p ;
}