|
@@ -7,20 +7,20 @@
|
|
|
<select id="interfaceCallCount" resultMap="rm_InterfaceCallCount_Bean">
|
|
|
select dept_id,dept_name, IFNULL(info.cou,0) cou, IFNULL(info_gx.cou,0) cou_gx,IFNULL(info_gj.cou,0) cou_gj from sys_dept dept
|
|
|
LEFT OUTER JOIN
|
|
|
- (select c.apply_oid org_id, count(*) cou from t_u_interfaceinfo a,int_detailed b,int_record c,t_u_log d
|
|
|
+ (select c.apply_dept_id org_id, count(*) cou from t_u_interfaceinfo a,int_detailed b,int_record c,t_u_log d
|
|
|
where a.id = b.int_id and b.record_id=c.id and d.interfaceinfo_id=a.id
|
|
|
- group by c.apply_oid) info
|
|
|
+ group by c.apply_dept_id) info
|
|
|
on (dept.dept_id=info.org_id)
|
|
|
LEFT OUTER JOIN
|
|
|
- (select c.apply_oid org_id, count(*) cou from t_u_interfaceinfo a,int_detailed b,int_record c,t_u_log d
|
|
|
+ (select c.apply_dept_id org_id, count(*) cou from t_u_interfaceinfo a,int_detailed b,int_record c,t_u_log d
|
|
|
where a.id = b.int_id and b.record_id=c.id and d.interfaceinfo_id=a.id and a.share_type='share_type_1'
|
|
|
- group by c.apply_oid) info_gx
|
|
|
+ group by c.apply_dept_id) info_gx
|
|
|
on (dept.dept_id=info_gx.org_id)
|
|
|
|
|
|
LEFT OUTER JOIN
|
|
|
- (select c.apply_oid org_id, count(*) cou from t_u_interfaceinfo a,int_detailed b,int_record c,t_u_log d
|
|
|
+ (select c.apply_dept_id org_id, count(*) cou from t_u_interfaceinfo a,int_detailed b,int_record c,t_u_log d
|
|
|
where a.id = b.int_id and b.record_id=c.id and d.interfaceinfo_id=a.id and a.share_type='share_type_2'
|
|
|
- group by c.apply_oid) info_gj
|
|
|
+ group by c.apply_dept_id) info_gj
|
|
|
on (dept.dept_id=info_gj.org_id)
|
|
|
|
|
|
where dept.del_flag=0 and dept.dept_id >200
|
|
@@ -59,13 +59,13 @@ where dept.del_flag=0 and dept.dept_id >200
|
|
|
IFNULL(gx.cou,0)+IFNULL(gj.cou,0) total_cou
|
|
|
from sys_dept dept
|
|
|
LEFT OUTER JOIN
|
|
|
- (select c.apply_oid dept_id,count(*) cou from t_u_interfaceinfo a,int_detailed b,int_record c
|
|
|
+ (select c.apply_dept_id dept_id,count(*) cou from t_u_interfaceinfo a,int_detailed b,int_record c
|
|
|
where a.share_type='share_type_1' and a.id=b.int_id and b.record_id=c.id
|
|
|
- group by c.apply_oid) gx on (dept.dept_id=gx.dept_id)
|
|
|
+ group by c.apply_dept_id) gx on (dept.dept_id=gx.dept_id)
|
|
|
LEFT OUTER JOIN
|
|
|
- (select c.apply_oid dept_id,count(*) cou from t_u_interfaceinfo a,int_detailed b,int_record c
|
|
|
+ (select c.apply_dept_id dept_id,count(*) cou from t_u_interfaceinfo a,int_detailed b,int_record c
|
|
|
where a.share_type='share_type_2' and a.id=b.int_id and b.record_id=c.id
|
|
|
- group by c.apply_oid) gj on (gj.dept_id=dept.dept_id)
|
|
|
+ group by c.apply_dept_id) gj on (gj.dept_id=dept.dept_id)
|
|
|
|
|
|
where dept.del_flag =0 and dept.dept_id>200
|
|
|
</select>
|