Commit d91e2573 by jianan

出账检核页面查询

parent fe1d4c77
...@@ -63,13 +63,13 @@ ...@@ -63,13 +63,13 @@
<select id="getFortuneStatistics" resultType="com.yd.csf.service.dto.FortuneStatisticsVO"> <select id="getFortuneStatistics" resultType="com.yd.csf.service.dto.FortuneStatisticsVO">
SELECT SELECT
f.policy_no, f.policy_no,
SUM(CASE WHEN f.is_part = '0' THEN f.hkd_amount ELSE 0 END) AS amount, IFNULL(SUM(CASE WHEN f.is_part = '0' THEN f.hkd_amount ELSE 0 END),0) AS amount,
SUM(CASE WHEN f.status = '2' THEN f.current_payment_hkd_amount ELSE 0 END) AS sentAmount, SUM(CASE WHEN f.status = '2' THEN f.current_payment_hkd_amount ELSE 0 END) AS sentAmount,
IFNULL( IFNULL(
(select sum(unpaid_amount) (select sum(unpaid_amount)
from expected_fortune where status = '0' and policy_no = f.policy_no from expected_fortune where status = '0' and policy_no = f.policy_no
),0) AS pendingOutAmount, ),0) AS pendingOutAmount,
SUM(CASE WHEN f.status in ('6','1') THEN f.current_payment_hkd_amount ELSE 0 END) AS availableOutAmount, IFNULL(SUM(CASE WHEN f.status in ('6','1') THEN f.current_payment_hkd_amount ELSE 0 END),0) AS availableOutAmount,
COUNT(DISTINCT f.policy_no) AS totalPolicyCount COUNT(DISTINCT f.policy_no) AS totalPolicyCount
FROM fortune f FROM fortune f
WHERE 1 = 1 WHERE 1 = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment