|
|
@@ -54,6 +54,124 @@
|
|
|
</if>
|
|
|
ORDER BY t1.create_date DESC, t2.create_date DESC,t3.create_date DESC,t1.id
|
|
|
</select>
|
|
|
+ <select id="getPlanPage" parameterType="com.xjrsoft.module.student.dto.StudentReportRecordPageDto" resultType="com.xjrsoft.module.student.vo.StudentReportRecordPlanPageVo">
|
|
|
+ SELECT t1.id, t1.user_id, t4.name AS grade_name,t5.name AS class_name,t6.name AS teacher_name,
|
|
|
+ t3.name,t7.name AS gender,t3.credential_number,t3.mobile,t8.name AS student_type_cn,
|
|
|
+ t9.name AS stduy_status_cn,t10.name AS archives_status_cn,
|
|
|
+ t1.report_time,IF(t1.report_time IS NULL, 0, 1) as is_report FROM student_report_record t1
|
|
|
+ INNER JOIN base_student_school_roll t2 ON t1.user_id = t2.user_id
|
|
|
+ INNER JOIN xjr_user t3 ON t3.id = t1.user_id
|
|
|
+ LEFT JOIN base_grade t4 ON t2.grade_id = t4.id
|
|
|
+ LEFT JOIN base_class t5 ON t2.class_id = t5.id
|
|
|
+ LEFT JOIN xjr_user t6 ON t5.teacher_id = t6.id
|
|
|
+ LEFT JOIN xjr_dictionary_detail t7 ON t3.gender = t7.code
|
|
|
+ LEFT JOIN xjr_dictionary_detail t8 ON t2.student_type = t8.code
|
|
|
+ LEFT JOIN xjr_dictionary_detail t9 ON t2.stduy_status = t9.code
|
|
|
+ LEFT JOIN xjr_dictionary_detail t10 ON t2.archives_status = t10.code
|
|
|
+ WHERE t1.delete_mark = 0 AND t1.enabled_mark = 1
|
|
|
+ and t1.student_report_plan_id = #{dto.studentReportPlanId}
|
|
|
+ <if test="dto.keyword != null and dto.keyword != ''">
|
|
|
+ and t1.name like concat('%', #{dto.keyword},'%')
|
|
|
+ </if>
|
|
|
+ <if test="dto.classId != null">
|
|
|
+ and t5.id = #{dto.classId}
|
|
|
+ </if>
|
|
|
+ <if test="dto.gradeId != null">
|
|
|
+ and t4.id = #{dto.gradeId}
|
|
|
+ </if>
|
|
|
+ <if test="dto.name != null and dto.name != ''">
|
|
|
+ and t3.name like concat('%', #{dto.name}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="dto.className != null and dto.className != ''">
|
|
|
+ and t5.name like concat('%', #{dto.className}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="dto.credentialNumber != null and dto.credentialNumber != ''">
|
|
|
+ and t3.credentialNumber like concat('%', #{dto.credentialNumber}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="dto.archivesStatus != null and dto.archivesStatus != ''">
|
|
|
+ and t2.archives_status = #{dto.archivesStatus}
|
|
|
+ </if>
|
|
|
+ <if test="dto.stduyStatus != null and dto.stduyStatus != ''">
|
|
|
+ and t2.stduy_status = #{dto.stduyStatus}
|
|
|
+ </if>
|
|
|
+ <if test="dto.studentType != null and dto.studentType != ''">
|
|
|
+ and t2.student_type = #{dto.studentType}
|
|
|
+ </if>
|
|
|
+ <if test="dto.studentType != null and dto.studentType != ''">
|
|
|
+ and t2.student_type = #{dto.studentType}
|
|
|
+ </if>
|
|
|
+ <if test="dto.isReport != null">
|
|
|
+ <if test="dto.isReport == 1">
|
|
|
+ and t1.report_time is not null
|
|
|
+ </if>
|
|
|
+ <if test="dto.isReport == 0">
|
|
|
+ and t1.report_time is null
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="dto.reportTimeStart != null and dto.reportTimeEnd != null">
|
|
|
+ and t1.report_time between #{dto.reportTimeStart} and #{dto.reportTimeEnd}
|
|
|
+ </if>
|
|
|
+ ORDER BY t1.id desc
|
|
|
+ </select>
|
|
|
+ <select id="getPlanPageList" parameterType="com.xjrsoft.module.student.dto.StudentReportRecordPageDto" resultType="com.xjrsoft.module.student.vo.StudentReportRecordPlanPageVo">
|
|
|
+ SELECT t1.id, t1.user_id, t4.name AS grade_name,t5.name AS class_name,t6.name AS teacher_name,
|
|
|
+ t3.name,t7.name AS gender,t3.credential_number,t3.mobile,t8.name AS student_type_cn,
|
|
|
+ t9.name AS stduy_status_cn,t10.name AS archives_status_cn,
|
|
|
+ t1.report_time,IF(t1.report_time IS NULL, 0, 1) as is_report FROM student_report_record t1
|
|
|
+ INNER JOIN base_student_school_roll t2 ON t1.user_id = t2.user_id
|
|
|
+ INNER JOIN xjr_user t3 ON t3.id = t1.user_id
|
|
|
+ LEFT JOIN base_grade t4 ON t2.grade_id = t4.id
|
|
|
+ LEFT JOIN base_class t5 ON t2.class_id = t5.id
|
|
|
+ LEFT JOIN xjr_user t6 ON t5.teacher_id = t6.id
|
|
|
+ LEFT JOIN xjr_dictionary_detail t7 ON t3.gender = t7.code
|
|
|
+ LEFT JOIN xjr_dictionary_detail t8 ON t2.student_type = t8.code
|
|
|
+ LEFT JOIN xjr_dictionary_detail t9 ON t2.stduy_status = t9.code
|
|
|
+ LEFT JOIN xjr_dictionary_detail t10 ON t2.archives_status = t10.code
|
|
|
+ WHERE t1.delete_mark = 0 AND t1.enabled_mark = 1
|
|
|
+ and t1.student_report_plan_id = #{dto.studentReportPlanId}
|
|
|
+ <if test="dto.keyword != null and dto.keyword != ''">
|
|
|
+ and t1.name like concat('%', #{dto.keyword},'%')
|
|
|
+ </if>
|
|
|
+ <if test="dto.classId != null">
|
|
|
+ and t5.id = #{dto.classId}
|
|
|
+ </if>
|
|
|
+ <if test="dto.gradeId != null">
|
|
|
+ and t4.id = #{dto.gradeId}
|
|
|
+ </if>
|
|
|
+ <if test="dto.name != null and dto.name != ''">
|
|
|
+ and t3.name like concat('%', #{dto.name}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="dto.className != null and dto.className != ''">
|
|
|
+ and t5.name like concat('%', #{dto.className}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="dto.credentialNumber != null and dto.credentialNumber != ''">
|
|
|
+ and t3.credentialNumber like concat('%', #{dto.credentialNumber}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="dto.archivesStatus != null and dto.archivesStatus != ''">
|
|
|
+ and t2.archives_status = #{dto.archivesStatus}
|
|
|
+ </if>
|
|
|
+ <if test="dto.stduyStatus != null and dto.stduyStatus != ''">
|
|
|
+ and t2.stduy_status = #{dto.stduyStatus}
|
|
|
+ </if>
|
|
|
+ <if test="dto.studentType != null and dto.studentType != ''">
|
|
|
+ and t2.student_type = #{dto.studentType}
|
|
|
+ </if>
|
|
|
+ <if test="dto.studentType != null and dto.studentType != ''">
|
|
|
+ and t2.student_type = #{dto.studentType}
|
|
|
+ </if>
|
|
|
+ <if test="dto.isReport != null">
|
|
|
+ <if test="dto.isReport == 1">
|
|
|
+ and t1.report_time is not null
|
|
|
+ </if>
|
|
|
+ <if test="dto.isReport == 0">
|
|
|
+ and t1.report_time is null
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="dto.reportTimeStart != null and dto.reportTimeEnd != null">
|
|
|
+ and t1.report_time between #{dto.reportTimeStart} and #{dto.reportTimeEnd}
|
|
|
+ </if>
|
|
|
+ ORDER BY t1.id desc
|
|
|
+ </select>
|
|
|
<select id="getStatisticsDataList" parameterType="com.xjrsoft.module.student.dto.StudentReportRecordStatisticsDto"
|
|
|
resultType="com.xjrsoft.module.student.vo.StudentReportRecordStatisticsListVo">
|
|
|
SELECT t1.name,t1.credential_number,t2.gender,t4.graduated_university,t4.stduy_status,t5.report_time ,
|