+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END)-'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) AS <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'RMB'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END)-'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'RMB'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) AS <20><><EFBFBD><EFBFBD>RMB,'
+'(case when round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 '
+'else v_op_bscard.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 else '
+' DATEDIFF([day],t_ch_fee.Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE()) AS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+' DATEDIFF([day],t_ch_fee.Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE()) AS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0 as <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>,'
+'isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_crm_client.<2E>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>,t_crm_client.<2E><><EFBFBD>̱<EFBFBD><CCB1><EFBFBD>,'
+'(case when round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 '
+'else v_op_bscard.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 else '
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>, t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E>ұ<EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as Ӧ<>ս<EFBFBD><D5BD><EFBFBD>,'
+'t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> as <20><><EFBFBD>ս<EFBFBD><D5BD><EFBFBD>,(t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) as δ<>ս<EFBFBD><D5BD><EFBFBD>,'
+'t_ch_fee.<2E><> as <20><>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as <20><><EFBFBD><EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as <20><><EFBFBD><EFBFBD>,t_ch_fee.<2E><>ע as <20><><EFBFBD>ñ<EFBFBD>ע,'
+'(case when round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 '
+'else v_op_bscard.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 else '
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+' sum(t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'(case when round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 '
+'else v_op_bscard.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 else '
+'(case when round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 '
+'else v_op_bscard.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 else '
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>, t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E>ұ<EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> as <20>Ѹ<EFBFBD><D1B8><EFBFBD><EFBFBD><EFBFBD>,(t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_ch_fee.<2E><> as <20><>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as <20><><EFBFBD><EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as <20><><EFBFBD><EFBFBD>,t_ch_fee.<2E><>ע as <20><><EFBFBD>ñ<EFBFBD>ע,'
+'(case when round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 '
+'else v_op_bscard.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 else '
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join v_op_bscard on v_op_bscard.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill+' GROUP BY t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join v_op_bscard on v_op_bscard.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill+' GROUP BY v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
'SELECT '+''''+'<27>ϼ<EFBFBD>'+''''+' as ˳<><CBB3>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join v_op_bscard on v_op_bscard.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
+'(case when round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 '
+'else v_op_bscard.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 else '
+'1 end) as <20>ƷѶ<C6B7>,DATEDIFF([day],v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, GETDATE()) AS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+' DATEDIFF([day],t_ch_fee.Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE()) AS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+' DATEDIFF([day],t_ch_fee.Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE()) AS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'(case when round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 '
+'else v_op_bscard.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000>v_op_bscard.<2E><><EFBFBD><EFBFBD> then v_op_bscard.<2E><><EFBFBD><EFBFBD>/1000 else '
+'order by v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,v_op_bscard.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5> ';
str_bill:='where v_op_bscard.ί<>е<EFBFBD>λ in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>='''+RxDBLookupCombo9.DisplayValues[1]+''') '
else
str_bill:=str_bill+' and v_op_bscard.ί<>е<EFBFBD>λ in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>='''+RxDBLookupCombo9.DisplayValues[1]+''') '
str_bill:='where t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>='''+RxDBLookupCombo19.DisplayValues[1]+''') '
else
str_bill:=str_bill+' and t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>='''+RxDBLookupCombo19.DisplayValues[1]+''') '
str_bill:=str_bill+' and '+open_data(rp_seae_query_limited,'v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','v_op_bscard.<2E><><EFBFBD><EFBFBD>Ա','v_op_bscard.<2E>ͷ<EFBFBD>Ա','no','no','no','no');
end;
end;
case rp_seae_query_type of
1,3:
begin
if str_bill='' then
str_bill:='where t_ch_fee.<2E><><EFBFBD><EFBFBD><>t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and (t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <> ''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'') '
else
str_bill:=str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD><>t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and (t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <> ''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'') ';
str_bill:=str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>0';
end;
5:
begin
{
if str_bill='' then
str_bill:='where <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>=<3D>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD> and isnull(<28>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>,0)<>0 '
else
str_bill:=str_bill+' and <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>=<3D>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD> and isnull(<28>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>,0)<>0 ';
}
end;
end;
case rp_seae_query_num of
1:
begin
if (wwDBDateTimePicker1.text<>'') and (wwDBDateTimePicker2.text<>'') then begin
+'v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>,v_op_bscard.<2E><><EFBFBD><EFBFBD>,(select top 1 <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=v_op_bscard.ί<>е<EFBFBD>λ) ί<>е<EFBFBD>λȫ<CEBB><C8AB>,'
+' FROM v_op_bscard left join (select ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>*<2A><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,row_number() over (partition by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) as rowno from v_fee_do_jie '+stlstr+' GROUP BY ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>) j on j.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=v_op_bscard.<2E><><EFBFBD><EFBFBD> '
// +' FROM v_op_bscard left join v_fee_do_jie j on j.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=v_op_bscard.<2E><><EFBFBD><EFBFBD> and rowno=1 '
+str_bill
+'order by v_op_bscard.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,v_op_bscard.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD><EFBFBD>, v_op_bscard.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5> ';