Sfoglia il codice sorgente

所有员工学习时长通排

lamphua 2 mesi fa
parent
commit
324e60461b

+ 4
- 4
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcStudyMapper.xml Vedi File

57
 
57
 
58
     <select id="selectCmcStudyStatistic" parameterType="CmcStudy" resultMap="CmcStudyResult">
58
     <select id="selectCmcStudyStatistic" parameterType="CmcStudy" resultMap="CmcStudyResult">
59
         select * from
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
         left join sys_dept as d on d.dept_id = u.dept_id
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
         <where>
64
         <where>
65
+            t.status = '0'
66
             <if test="deptId != null "> and t.dept_id = #{deptId}</if>
66
             <if test="deptId != null "> and t.dept_id = #{deptId}</if>
67
         </where>
67
         </where>
68
         order by t.get_hours desc
68
         order by t.get_hours desc

Loading…
Annulla
Salva