|
|
@@ -503,7 +503,7 @@
|
|
|
|
|
|
|
|
|
<select id="deptCostRank" resultType="java.util.Map">
|
|
|
- select tb5.dept_id, tb5.dept_name,
|
|
|
+ select tb5.sub_dept_id as dept_id, concat(tb5.dept_name, '-', tb5.sub_dept_name) as dept_name,
|
|
|
rank() over (order by sum(cost_amount) desc) as rk,
|
|
|
<include refid="costAmount"/>,
|
|
|
sum(dj_cost_amount) as dj_cost_amount,
|
|
|
@@ -534,7 +534,7 @@
|
|
|
select dept_id, dept_name, dept_id as sub_dept_id, dept_name as sub_dept_name from tidb.deepthink.sys_dept where parent_id in (300)
|
|
|
) tb5
|
|
|
on tb4.dept_id = tb5.sub_dept_id
|
|
|
- group by tb5.dept_id, tb5.dept_name
|
|
|
+ group by tb5.sub_dept_id, tb5.dept_name, tb5.sub_dept_name
|
|
|
having sum(cost_amount)>1
|
|
|
order by rk asc
|
|
|
limit 10
|