Commit 5329db318bb152634f7e21152bff2e49c05df5d9
Merge branch 'master_cj_zq' into master_sample_order
Showing
2 changed files
with
4 additions
and
2 deletions
| ... | ... | @@ -535,6 +535,7 @@ public class ReceiptLedgerInfoServiceImpl extends BaseMpServiceImpl<ReceiptLedge |
| 535 | 535 | if (CollectionUtils.isEmpty(list)) { |
| 536 | 536 | continue; |
| 537 | 537 | } |
| 538 | + BigDecimal totalDebt = BigDecimal.ZERO; | |
| 538 | 539 | long waitDeliveredOrderTotal = 0; |
| 539 | 540 | Map<String, ReceiptLedgerReportDetail> reportDetailMap = new LinkedHashMap<>(); |
| 540 | 541 | for (Map<String, Object> map : list) { |
| ... | ... | @@ -575,9 +576,11 @@ public class ReceiptLedgerInfoServiceImpl extends BaseMpServiceImpl<ReceiptLedge |
| 575 | 576 | } |
| 576 | 577 | debtTotal = debtTotal.add(debtAmount); |
| 577 | 578 | reportDetail.setDebtTotal(debtTotal); |
| 579 | + totalDebt = totalDebt.add(debtAmount); | |
| 578 | 580 | |
| 579 | 581 | reportDetailMap.put(reportDetail.getCustomerName(), reportDetail); |
| 580 | 582 | } |
| 583 | + report.setDebtTotal(totalDebt); | |
| 581 | 584 | List<ReceiptLedgerReportDetail> details = new ArrayList<>(reportDetailMap.values()); |
| 582 | 585 | if (CollectionUtils.isNotEmpty(details)) { |
| 583 | 586 | for (ReceiptLedgerReportDetail detail : details) { | ... | ... |
| ... | ... | @@ -231,8 +231,7 @@ |
| 231 | 231 | tb.region, |
| 232 | 232 | r.name as region_name, |
| 233 | 233 | max(cc.company_credit_limit) as quota, |
| 234 | - max(cc.company_settlement_period) as settle_term, | |
| 235 | - sum(rl.end_account_receivable) as debtTotal | |
| 234 | + max(cc.company_settlement_period) as settle_term | |
| 236 | 235 | from base_data_customer_short tb |
| 237 | 236 | left join sys_dept d on tb.dept_id = d.id |
| 238 | 237 | left join sys_dept r on tb.region = r.id | ... | ... |