dzx пре 1 месец
родитељ
комит
df78f5c8f0

+ 7 - 8
src/main/resources/mapper/student/BaseStudentAssessmentInspectionMapper.xml

@@ -4,22 +4,21 @@
         "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
+        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
+        (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 t1.id = t7.form_key_value
+        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.assessment_user_id=t5.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'