|
|
@@ -4,23 +4,24 @@
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.xjrsoft.module.student.mapper.BaseStudentAssessmentInspectionMapper">
|
|
|
<select id="getPage" parameterType="com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionPageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionPageVo">
|
|
|
- select t.id,t.score,t.score_type,t.assessment_date,t.reason,t1.name as assessment_category_name,t2.name as assessment_project_name,t3.name as semester_name,t4.name as grade_name,t5.name as assessment_user_name,t6.name as score_type_cn,
|
|
|
+ SELECT t.id,t.score,t.score_type,t.create_date AS assessment_date,t.reason,t1.name AS assessment_category_name,t2.name AS assessment_project_name,t3.name AS semester_name,t4.name AS grade_name,t5.name AS assessment_user_name,t6.name AS score_type_cn,
|
|
|
(
|
|
|
- select group_concat(b.name) from base_student_assessment_class_relation a
|
|
|
- left join base_class b on a.class_id=b.id
|
|
|
- where a.base_student_assessment_inspection_id=t.id group by a.base_student_assessment_inspection_id
|
|
|
- ) as assessment_class_names,
|
|
|
+ SELECT NAME FROM base_class
|
|
|
+ WHERE id = t.class_ids
|
|
|
+ ) AS assessment_class_names,
|
|
|
(
|
|
|
- SELECT count(*) FROM base_student_assessment_student_relation WHERE base_student_assessment_inspection_id = t.id
|
|
|
- ) as student_count
|
|
|
- from base_student_assessment_inspection t
|
|
|
- left join base_student_assessment_category t1 on (t1.id = t.base_student_assessment_category_id)
|
|
|
- left join base_student_assessment_project t2 on (t2.id = t.base_student_assessment_project_id)
|
|
|
- left join base_semester t3 on t.base_semester_id=t3.id
|
|
|
- left join base_grade t4 on t.grade_id=t4.id
|
|
|
- left join xjr_user t5 on t.assessment_user_id=t5.id
|
|
|
- left join xjr_dictionary_detail t6 on t6.code=t.score_type
|
|
|
- where t.delete_mark=0 and t1.delete_mark=0 and t2.delete_mark=0 and t3.delete_mark=0 and t.status=1
|
|
|
+ (LENGTH(class_student_user_ids) - LENGTH(REPLACE(class_student_user_ids, ',', '')))
|
|
|
+ ) + 1 AS student_count
|
|
|
+ FROM base_student_assessment_inspection t
|
|
|
+ INNER JOIN xjr_workflow_form_relation t7 ON t.id = t7.form_key_value
|
|
|
+ LEFT JOIN base_student_assessment_category t1 ON (t1.id = t.base_student_assessment_category_id)
|
|
|
+ LEFT JOIN base_student_assessment_project t2 ON (t2.id = t.base_student_assessment_project_id)
|
|
|
+ LEFT JOIN base_semester t3 ON t.base_semester_id=t3.id
|
|
|
+ LEFT JOIN base_grade t4 ON t.grade_id=t4.id
|
|
|
+ LEFT JOIN xjr_user t5 ON t.create_user_id=t5.id
|
|
|
+ LEFT JOIN xjr_dictionary_detail t6 ON t6.code=t.score_type
|
|
|
+ WHERE t.delete_mark = 0 AND t1.delete_mark = 0 AND t2.delete_mark = 0 AND t3.delete_mark = 0
|
|
|
+ AND t7.current_state = 'COMPLETED'
|
|
|
<if test="dto.projectIds != null and dto.projectIds.size() > 0">
|
|
|
and t.base_student_assessment_project_id in
|
|
|
<foreach item="projectId" index="index" collection="dto.projectIds" open="(" close=")" separator=",">
|
|
|
@@ -55,7 +56,7 @@
|
|
|
left join xjr_user t5 on t.assessment_user_id=t5.id
|
|
|
left join xjr_dictionary_detail t6 on t6.code=t.score_type
|
|
|
left join xjr_user t7 on t.create_user_id=t7.id
|
|
|
- where t.id=#{id} and t.delete_mark=0 and t1.delete_mark=0 and t2.delete_mark=0 and t3.delete_mark=0 and t.status=1;
|
|
|
+ where t.id=#{id} and t.delete_mark=0 and t1.delete_mark=0 and t2.delete_mark=0 and t3.delete_mark=0;
|
|
|
</select>
|
|
|
|
|
|
<select id="getMobilePage" parameterType="com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionMobilePageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobilePageVo">
|
|
|
@@ -71,7 +72,7 @@
|
|
|
left join base_student_assessment_project t3 on (t3.id = t1.base_student_assessment_project_id)
|
|
|
left join xjr_dictionary_detail t4 on t4.code=t1.score_type
|
|
|
left join base_class t5 on t5.id=t.class_id
|
|
|
- where t1.delete_mark=0 and t1.status=1 and t.class_id in
|
|
|
+ where t1.delete_mark = 0 and t.class_id in
|
|
|
<foreach item="classId" index="index" collection="dto.classIds" open="(" close=")" separator=",">
|
|
|
#{classId}
|
|
|
</foreach>
|