|
@@ -1690,6 +1690,7 @@
|
|
|
SELECT
|
|
|
t.*,
|
|
|
soi.*,
|
|
|
+ temp.feeCharges feeCharges,
|
|
|
cpm.proc_method_name,
|
|
|
cpt.proc_type_name,
|
|
|
trsc.company_name companyName,
|
|
@@ -1704,6 +1705,9 @@
|
|
|
LEFT JOIN tb_rst_cm_relation cr ON ci.customer_id = cr.customer_id
|
|
|
LEFT JOIN tb_rst_cm_proc_method cpm ON cr.proc_method_id = cpm.proc_method_id
|
|
|
LEFT JOIN tb_rst_cm_proc_type cpt ON cpm.proc_type_id = cpt.proc_type_id
|
|
|
+ LEFT JOIN (
|
|
|
+ SELECT relation_id, SUM(fee_charges) "feeCharges" FROM tb_rst_fee_information_info GROUP BY relation_id
|
|
|
+ ) temp on temp.relation_id = cr.relation_id
|
|
|
<where>
|
|
|
t.sales_batch_id != 'KS00000000000001'
|
|
|
<if test="salesIsDownload !=null ">
|