Showing
2 changed files
with
14 additions
and
1 deletions
| ... | ... | @@ -573,10 +573,24 @@ public class ReceiptLedgerInfoServiceImpl extends BaseMpServiceImpl<ReceiptLedge |
| 573 | 573 | waitDeliveredOrderTotal += count; |
| 574 | 574 | reportDetail.setWaitDeliveredOrder(count); |
| 575 | 575 | } |
| 576 | + // 计算总欠款 | |
| 577 | + BigDecimal debtTotal = reportDetail.getDebtTotal(); | |
| 578 | + if (debtTotal == null) { | |
| 579 | + debtTotal = BigDecimal.ZERO; | |
| 580 | + } | |
| 581 | + debtTotal = debtTotal.add(debtAmount); | |
| 582 | + reportDetail.setDebtTotal(debtTotal); | |
| 576 | 583 | |
| 577 | 584 | reportDetailMap.put(reportDetail.getCustomerName(), reportDetail); |
| 578 | 585 | } |
| 579 | 586 | List<ReceiptLedgerReportDetail> details = new ArrayList<>(reportDetailMap.values()); |
| 587 | + if (CollectionUtils.isNotEmpty(details)) { | |
| 588 | + // 转换成万元 | |
| 589 | + for (ReceiptLedgerReportDetail detail : details) { | |
| 590 | + BigDecimal debtTotal = detail.getDebtTotal(); | |
| 591 | + detail.setDebtTotal(valueConvert(debtTotal)); | |
| 592 | + } | |
| 593 | + } | |
| 580 | 594 | report.setDetailList(details); |
| 581 | 595 | |
| 582 | 596 | // 处理约定内、一次协调、二次协调、清欠小计数据 | ... | ... |