|
@@ -228,8 +228,8 @@
|
|
|
t1.report_time,IF(t1.report_time IS NULL, 0, 1) AS is_report,
|
|
t1.report_time,IF(t1.report_time IS NULL, 0, 1) AS is_report,
|
|
|
t3.family_mobile AS parent_mobile
|
|
t3.family_mobile AS parent_mobile
|
|
|
FROM student_report_record t1
|
|
FROM student_report_record t1
|
|
|
- INNER JOIN banding_task_class_student t2 ON t1.user_id = t2.new_student_id
|
|
|
|
|
INNER JOIN base_new_student t3 ON t3.id = t1.user_id
|
|
INNER JOIN base_new_student t3 ON t3.id = t1.user_id
|
|
|
|
|
+ LEFT JOIN banding_task_class_student t2 ON t1.user_id = t2.new_student_id and t2.delete_mark = 0
|
|
|
LEFT JOIN banding_task_class t5 ON t2.banding_task_class_id = t5.id
|
|
LEFT JOIN banding_task_class t5 ON t2.banding_task_class_id = t5.id
|
|
|
LEFT JOIN xjr_user t6 ON t5.teacher_id = t6.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 t7 ON t3.gender = t7.code
|
|
@@ -240,13 +240,21 @@
|
|
|
LEFT JOIN enrollment_plan t11 ON t11.id = t3.enrollment_plan_id
|
|
LEFT JOIN enrollment_plan t11 ON t11.id = t3.enrollment_plan_id
|
|
|
LEFT JOIN student_report_plan t12 ON t12.id = t1.student_report_plan_id
|
|
LEFT JOIN student_report_plan t12 ON t12.id = t1.student_report_plan_id
|
|
|
WHERE t1.delete_mark = 0 AND t1.enabled_mark = 1
|
|
WHERE t1.delete_mark = 0 AND t1.enabled_mark = 1
|
|
|
- and t12.status = 1 and t2.delete_mark = 0
|
|
|
|
|
|
|
+ and t12.status = 1
|
|
|
and t3.enrollment_plan_id = #{dto.enrollmentPlanId}
|
|
and t3.enrollment_plan_id = #{dto.enrollmentPlanId}
|
|
|
<if test="dto.keyword != null and dto.keyword != ''">
|
|
<if test="dto.keyword != null and dto.keyword != ''">
|
|
|
and t1.name like concat('%', #{dto.keyword},'%')
|
|
and t1.name like concat('%', #{dto.keyword},'%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="dto.classId != null">
|
|
<if test="dto.classId != null">
|
|
|
- and t5.id = #{dto.classId}
|
|
|
|
|
|
|
+ <if test="dto.classId != 0">
|
|
|
|
|
+ and t5.id = #{dto.classId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="dto.classId == 0">
|
|
|
|
|
+ and t5.id is null
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="dto.teacherId != null">
|
|
|
|
|
+ and t5.teacher_id = #{dto.teacherId}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="dto.gradeId != null">
|
|
<if test="dto.gradeId != null">
|
|
|
and t4.id = #{dto.gradeId}
|
|
and t4.id = #{dto.gradeId}
|
|
@@ -285,12 +293,12 @@
|
|
|
<select id="getTryReadingList" parameterType="com.xjrsoft.module.student.dto.StudentReportRecordPageDto" resultType="com.xjrsoft.module.student.vo.StudentReportRecordPlanPageVo">
|
|
<select id="getTryReadingList" 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,
|
|
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,
|
|
t3.name,t7.name AS gender,t3.credential_number,t3.mobile,t8.name AS student_type_cn,
|
|
|
- t9.name AS stduy_status_cn,
|
|
|
|
|
|
|
+ t9.name AS stduy_status_cn,t3.gender
|
|
|
t1.report_time,IF(t1.report_time IS NULL, 0, 1) AS is_report,
|
|
t1.report_time,IF(t1.report_time IS NULL, 0, 1) AS is_report,
|
|
|
t3.family_mobile AS parent_mobile
|
|
t3.family_mobile AS parent_mobile
|
|
|
FROM student_report_record t1
|
|
FROM student_report_record t1
|
|
|
- INNER JOIN banding_task_class_student t2 ON t1.user_id = t2.new_student_id
|
|
|
|
|
INNER JOIN base_new_student t3 ON t3.id = t1.user_id
|
|
INNER JOIN base_new_student t3 ON t3.id = t1.user_id
|
|
|
|
|
+ LEFT JOIN banding_task_class_student t2 ON t1.user_id = t2.new_student_id and t2.delete_mark = 0
|
|
|
LEFT JOIN banding_task_class t5 ON t2.banding_task_class_id = t5.id
|
|
LEFT JOIN banding_task_class t5 ON t2.banding_task_class_id = t5.id
|
|
|
LEFT JOIN xjr_user t6 ON t5.teacher_id = t6.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 t7 ON t3.gender = t7.code
|
|
@@ -301,13 +309,21 @@
|
|
|
LEFT JOIN enrollment_plan t11 ON t11.id = t3.enrollment_plan_id
|
|
LEFT JOIN enrollment_plan t11 ON t11.id = t3.enrollment_plan_id
|
|
|
LEFT JOIN student_report_plan t12 ON t12.id = t1.student_report_plan_id
|
|
LEFT JOIN student_report_plan t12 ON t12.id = t1.student_report_plan_id
|
|
|
WHERE t1.delete_mark = 0 AND t1.enabled_mark = 1
|
|
WHERE t1.delete_mark = 0 AND t1.enabled_mark = 1
|
|
|
- and t12.status = 1 and t2.delete_mark = 0
|
|
|
|
|
|
|
+ and t12.status = 1
|
|
|
and t3.enrollment_plan_id = #{dto.enrollmentPlanId}
|
|
and t3.enrollment_plan_id = #{dto.enrollmentPlanId}
|
|
|
<if test="dto.keyword != null and dto.keyword != ''">
|
|
<if test="dto.keyword != null and dto.keyword != ''">
|
|
|
and t1.name like concat('%', #{dto.keyword},'%')
|
|
and t1.name like concat('%', #{dto.keyword},'%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="dto.classId != null">
|
|
<if test="dto.classId != null">
|
|
|
- and t5.id = #{dto.classId}
|
|
|
|
|
|
|
+ <if test="dto.classId != 0">
|
|
|
|
|
+ and t5.id = #{dto.classId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="dto.classId == 0">
|
|
|
|
|
+ and t5.id is null
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="dto.teacherId != null">
|
|
|
|
|
+ and t5.teacher_id = #{dto.teacherId}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="dto.gradeId != null">
|
|
<if test="dto.gradeId != null">
|
|
|
and t4.id = #{dto.gradeId}
|
|
and t4.id = #{dto.gradeId}
|