|
@@ -57,12 +57,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
57
|
57
|
|
58
|
58
|
<select id="selectCmcStudyStatistic" parameterType="CmcStudy" resultMap="CmcStudyResult">
|
59
|
59
|
select * from
|
60
|
|
- (select s.user_id, d.dept_id, u.nick_name, d.dept_name, sum(s.get_hours) as get_hours from cmc_study as s
|
61
|
|
- left join sys_user as u on u.user_id = s.user_id
|
|
60
|
+ (select u.user_id, u.dept_id, u.nick_name, d.dept_name, sum(s.get_hours) as get_hours, u.status from sys_user as u
|
|
61
|
+ left join cmc_study as s on u.user_id = s.user_id
|
62
|
62
|
left join sys_dept as d on d.dept_id = u.dept_id
|
63
|
|
- left join cmc_resource as r on r.resource_id = s.resource_id
|
64
|
|
- group by s.user_id ) as t
|
|
63
|
+ group by u.user_id) as t
|
65
|
64
|
<where>
|
|
65
|
+ t.status = '0'
|
66
|
66
|
<if test="deptId != null "> and t.dept_id = #{deptId}</if>
|
67
|
67
|
</where>
|
68
|
68
|
order by t.get_hours desc
|