|
|
@ -82,13 +82,14 @@ public class ManualSettleSupportImpl implements ManualSettleSupport {
|
|
|
|
List<JSONObject> unsettleReports = transactionMapper.listClientUnsettleDataByDate(clientId);
|
|
|
|
List<JSONObject> unsettleReports = transactionMapper.listClientUnsettleDataByDate(clientId);
|
|
|
|
unsettleReports.parallelStream().forEach(report -> {
|
|
|
|
unsettleReports.parallelStream().forEach(report -> {
|
|
|
|
report.put("clearing_amount", CurrencyAmountUtils.scalePlatformCurrency(report.getBigDecimal("clearing_amount")));
|
|
|
|
report.put("clearing_amount", CurrencyAmountUtils.scalePlatformCurrency(report.getBigDecimal("clearing_amount")));
|
|
|
|
report.put("settle_amount", CurrencyAmountUtils.scalePlatformCurrency(report.getBigDecimal("settle_amount")));
|
|
|
|
BigDecimal settleAmount = report.getBigDecimal("settle_amount");
|
|
|
|
|
|
|
|
report.put("settle_amount", CurrencyAmountUtils.scalePlatformCurrency(settleAmount == null ? BigDecimal.ZERO : settleAmount));
|
|
|
|
report.put("date_str", DateFormatUtils.format(report.getDate("trans_date"), "yyyy-MM-dd"));
|
|
|
|
report.put("date_str", DateFormatUtils.format(report.getDate("trans_date"), "yyyy-MM-dd"));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
todayTask.put("unsettle", unsettleReports);
|
|
|
|
todayTask.put("unsettle", unsettleReports);
|
|
|
|
BigDecimal totalClearing = unsettleReports.stream().map(report -> report.getBigDecimal("clearing_amount")).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
|
|
|
|
BigDecimal totalClearing = unsettleReports.stream().map(report -> report.getBigDecimal("clearing_amount")).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
|
|
|
|
todayTask.put("total_clearing_amount", CurrencyAmountUtils.scalePlatformCurrency(totalClearing));
|
|
|
|
todayTask.put("total_clearing_amount", CurrencyAmountUtils.scalePlatformCurrency(totalClearing));
|
|
|
|
BigDecimal totalSettle = unsettleReports.stream().map(report -> report.getBigDecimal("settle_amount") == null ? BigDecimal.ZERO : report.getBigDecimal("settle_amount")).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
|
|
|
|
BigDecimal totalSettle = unsettleReports.stream().map(report -> report.getBigDecimal("settle_amount")).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
|
|
|
|
todayTask.put("total_settle_amount", CurrencyAmountUtils.scalePlatformCurrency(totalSettle));
|
|
|
|
todayTask.put("total_settle_amount", CurrencyAmountUtils.scalePlatformCurrency(totalSettle));
|
|
|
|
todayTask.put("desc", LocaleSupport.localeMessage("manual_settle.notice"));
|
|
|
|
todayTask.put("desc", LocaleSupport.localeMessage("manual_settle.notice"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|