|
@@ -828,7 +828,7 @@
|
|
|
left join department dp2 on dp2.department_id=dp.department_id
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- select us.name as userName,dp.department_name as departmentName,COUNT(rp.state=0 or null) as num
|
|
|
+ select us.name as userName,dp.department_name as departmentName,COUNT(rp.project_audit_state=0 or null) as num
|
|
|
from project_auditor pa
|
|
|
left join user us on pa.auditor_id=us.id
|
|
|
left join report rp on rp.project_auditor_id=us.id and pa.project_id=rp.project_id and rp.create_date between #{startDate} and #{endDate} and rp.is_dept_audit=0
|
|
@@ -856,14 +856,14 @@
|
|
|
select us.name as userName,dp2.department_name as departmentName,COUNT(rp.state=0 or null) as num
|
|
|
from department dp
|
|
|
left join user us on dp.manager_id=us.id
|
|
|
- left join report rp on rp.audit_deptid=us.manage_dept_id and rp.create_date between #{startDate} and #{endDate} and rp.audit_deptid !=0
|
|
|
+ left join report rp on rp.audit_deptid=us.manage_dept_id and rp.create_date between #{startDate} and #{endDate} and rp.audit_deptid !=0 and rp.is_dept_audit=1
|
|
|
left join department dp2 on dp2.department_id=dp.department_id
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- select us.name as userName,dp.department_name as departmentName,COUNT(rp.state=0 or null) as num
|
|
|
+ select us.name as userName,dp.department_name as departmentName,COUNT(rp.project_audit_state=0 or null) as num
|
|
|
from project_auditor pa
|
|
|
left join user us on pa.auditor_id=us.id
|
|
|
- left join report rp on rp.project_auditor_id=us.id and pa.project_id=rp.project_id and rp.create_date between #{startDate} and #{endDate}
|
|
|
+ left join report rp on rp.project_auditor_id=us.id and pa.project_id=rp.project_id and rp.create_date between #{startDate} and #{endDate} and rp.is_dept_audit=0
|
|
|
left join department dp on dp.department_id=us.department_id
|
|
|
</otherwise>
|
|
|
</choose>
|