From 5166240edfa484d8768228d702f0b6c48c37660a Mon Sep 17 00:00:00 2001 From: luoyang Date: Mon, 10 Sep 2018 10:10:31 +0800 Subject: [PATCH] add clearing_estimate : hf --- .../core/impls/EstimateAnalysisServiceImpl.java | 13 ++++++++++++- .../templates/settle_estimate_analysis.html | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/EstimateAnalysisServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/EstimateAnalysisServiceImpl.java index 2dc8f4195..9521c1680 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/EstimateAnalysisServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/EstimateAnalysisServiceImpl.java @@ -166,10 +166,21 @@ public class EstimateAnalysisServiceImpl implements EstimateAnalysisService { } else { dayInfo.put("t1", 0); } + + List hfSettle = platformSettlementMapper.findBySettleDate(new Date(estimateAnalysisMapper.findLastCleanDays(end_date, 1).getDate("date_str").getTime()), "hf"); + if (hfSettle !=null && hfSettle.size()>0) { + for (JSONObject logs : hfSettle) { + dayInfo.put("hfSettleFee_" + logs.getString("merchants"), logs.getBigDecimal("settlement_fee")); + dayInfo.put("platformGetSettleFee",dayInfo.getBigDecimal("hfSettleFee_" + logs.getString("merchants"))); + } + }else { + dayInfo.put("platformGetSettleFee",BigDecimal.ZERO); + } + List alipaySettleLogs = platformSettlementMapper.findBySettleDate(new Date(estimateAnalysisMapper.findLastCleanDays(end_date, 1).getDate("date_str").getTime()), "Alipay"); for (JSONObject logs : alipaySettleLogs) { dayInfo.put("aliSettleFee_" + logs.getString("merchants"), logs.getBigDecimal("settlement_fee")); - dayInfo.put("platformGetSettleFee",dayInfo.getBigDecimal("aliSettleFee_" + logs.getString("merchants"))); + dayInfo.put("platformGetSettleFee",dayInfo.getBigDecimal("platformGetSettleFee").add(dayInfo.getBigDecimal("aliSettleFee_" + logs.getString("merchants")))); } List alipayOnlineSettleLogs = platformSettlementMapper.findBySettleDate(new Date(estimateAnalysisMapper.findLastCleanDays(end_date, 1).getDate("date_str").getTime()), "AlipayOnline"); diff --git a/src/main/ui/static/analysis/templates/settle_estimate_analysis.html b/src/main/ui/static/analysis/templates/settle_estimate_analysis.html index 2de2c0e78..96315a7c2 100644 --- a/src/main/ui/static/analysis/templates/settle_estimate_analysis.html +++ b/src/main/ui/static/analysis/templates/settle_estimate_analysis.html @@ -52,6 +52,7 @@

(1487387142)到账金额:

Alipay 到账金额:

AliPayOnline 到账金额(AlipayOnline):

+

Hf 到账金额:

RoyalPay 总到账金额: