Browse Source

Merge remote-tracking branch 'origin/master'

master
yunuo970428 7 months ago
parent
commit
5b7595d1aa
  1. 25
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryMapper.xml
  2. 22
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryService.java

25
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryMapper.xml

@ -125,31 +125,6 @@
FROM
loan_repayment_plan_details AS p
) AS t ON p.sid = t.sid) as m
-- SELECT
-- h.sid,
-- p.loanContractNo,
-- p.vinNo,
-- p.bankContractNo,
-- p.bankName,
-- p.customer,
-- p.period,
-- p.borrowerName,
-- p.dueDate,
-- p.dueMoney,
-- h.actualDate,
-- date_format(h.dataTime, '%Y-%m-%d') as dataTime,
-- h.actualMoney,
-- h.buckle,
-- h.returnWay,
-- h.planDetailSid,
-- CASE h.updateState
-- WHEN '0' THEN '未更新'
-- WHEN '1' THEN '已更新'
-- END AS updateState,
-- date_format(h.updateTime, '%Y-%m-%d') as updateTime
-- FROM
-- loan_repayment_history AS h
-- LEFT JOIN loan_repayment_plan_details AS p ON h.planDetailSid = p.sid
<where>
${ew.sqlSegment}
</where>

22
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryService.java

@ -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;
}

Loading…
Cancel
Save