|
|
|
@ -561,6 +561,7 @@
|
|
|
|
|
|
|
|
|
|
<select id="listSettlementLog" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
|
select cd.client_id, cd.report_date clearing_time, cd.report_date,
|
|
|
|
|
lc.editable, lc.balance_group,
|
|
|
|
|
<if test="merge_settle!=null">
|
|
|
|
|
SUM(cd.tax_amount) as tax_amount,
|
|
|
|
|
SUM(cd.total_charge) as total_charge,
|
|
|
|
@ -569,6 +570,7 @@
|
|
|
|
|
<if test="merge_settle==null">
|
|
|
|
|
cd.tax_amount,
|
|
|
|
|
cd.total_charge,
|
|
|
|
|
cd.clear_detail_id,
|
|
|
|
|
</if>
|
|
|
|
|
sum(cd.gross_amount) total,
|
|
|
|
|
sum(cd.clearing_amount) income,
|
|
|
|
@ -578,6 +580,8 @@
|
|
|
|
|
AND r.active_time <= cd.report_date) rate
|
|
|
|
|
from log_clearing_detail cd
|
|
|
|
|
inner join sys_clients sc on sc.client_id=cd.client_id
|
|
|
|
|
inner join log_clearing lc on lc.clearing_id=cd.clearing_id
|
|
|
|
|
<where>
|
|
|
|
|
<if test="client_ids!=null">
|
|
|
|
|
AND cd.client_id IN
|
|
|
|
|
<foreach collection="client_ids" open="(" close=")" separator="," item="client_id">
|
|
|
|
@ -592,6 +596,7 @@
|
|
|
|
|
<if test="merge_settle!=null">GROUP BY report_date</if>
|
|
|
|
|
<if test="merge_settle==null">GROUP BY clear_detail_id</if>
|
|
|
|
|
order by clearing_id desc
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="listSettlementLogOrigin" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
|