|
|
@ -703,10 +703,6 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
|
|
|
|
BigDecimal net_amount_debit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Debit")).filter(t->t.containsKey("settle_amount")).map(t-> t.getBigDecimal("settle_amount")).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
BigDecimal net_amount_debit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Debit")).filter(t->t.containsKey("settle_amount")).map(t-> t.getBigDecimal("settle_amount")).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
BigDecimal tax_amount_credit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Credit")).filter(t->t.containsKey("tax_amount")).map(t-> t.getBigDecimal("tax_amount")).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
BigDecimal tax_amount_credit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Credit")).filter(t->t.containsKey("tax_amount")).map(t-> t.getBigDecimal("tax_amount")).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
BigDecimal tax_amount_debit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Debit")).filter(t->t.containsKey("tax_amount")).map(t-> t.getBigDecimal("tax_amount")).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
BigDecimal tax_amount_debit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Debit")).filter(t->t.containsKey("tax_amount")).map(t-> t.getBigDecimal("tax_amount")).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
BigDecimal wechat_charge_credit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Credit")).filter(t->t.containsKey("wechat_charge")).map(t-> t.getBigDecimal("wechat_charge")).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
|
|
|
BigDecimal wechat_charge_debit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Debit")).filter(t->t.containsKey("wechat_charge")).map(t-> t.getBigDecimal("wechat_charge")).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
|
|
|
BigDecimal royalpay_charge_credit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Credit")).filter(t->t.containsKey("royal_surcharge")).map(t-> t.getBigDecimal("royal_surcharge")).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
|
|
|
BigDecimal royalpay_charge_debit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Debit")).filter(t->t.containsKey("royal_surcharge")).map(t-> t.getBigDecimal("royal_surcharge")).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BigDecimal tax_amount = tax_amount_credit.subtract(tax_amount_debit);
|
|
|
|
BigDecimal tax_amount = tax_amount_credit.subtract(tax_amount_debit);
|
|
|
|
analysis.put("total_credit",total_credit.setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
|
|
analysis.put("total_credit",total_credit.setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
|
@ -715,8 +711,6 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
|
|
|
|
analysis.put("tax_amount",tax_amount.setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
|
|
analysis.put("tax_amount",tax_amount.setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
|
|
analysis.put("total_charge",total_charge_credit.subtract(total_charge_debit).add(tax_amount).setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
|
|
analysis.put("total_charge",total_charge_credit.subtract(total_charge_debit).add(tax_amount).setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
|
|
analysis.put("gross_amount",total_credit.subtract(total_debit).setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
|
|
analysis.put("gross_amount",total_credit.subtract(total_debit).setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
|
|
analysis.put("wechat_charge",wechat_charge_credit.subtract(wechat_charge_debit).setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
|
|
|
|
|
|
analysis.put("royalpay_charge",royalpay_charge_credit.subtract(royalpay_charge_debit).setScale(2,BigDecimal.ROUND_HALF_UP));
|
|
|
|
|
|
|
|
dayAnalysisMap.put(entry.getKey(),analysis);
|
|
|
|
dayAnalysisMap.put(entry.getKey(),analysis);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return dayAnalysisMap;
|
|
|
|
return dayAnalysisMap;
|
|
|
|