feat(study): 添加学生统计查询中的年份筛选功能
parent
f4db959e5d
commit
12407cb28a
|
|
@ -33,5 +33,7 @@ public class StudentCountQry {
|
|||
private List<Long> corpinfoIds;
|
||||
private List<String> phones;
|
||||
|
||||
private String year;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -132,6 +132,9 @@
|
|||
from
|
||||
user u
|
||||
left join training_user tu on tu.phone = u.username
|
||||
left join student s on s.phone=u.username
|
||||
left join student_exam_record ser on ser.student_id = s.student_id
|
||||
left join class c on ser.class_id = c.class_id
|
||||
where u.delete_enum = 'FALSE'
|
||||
AND u.employment_flag = '1'
|
||||
and tu.start_time <= now()
|
||||
|
|
@ -142,6 +145,10 @@
|
|||
#{corpinfoId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.year != null and params.year != ''">
|
||||
AND (DATE_FORMAT(c.start_time, '%Y') = #{params.studentId}
|
||||
OR DATE_FORMAT(c.start_time, '%Y') = #{params.studentId})
|
||||
</if>
|
||||
GROUP BY u.corpinfo_id
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue