|
|
@@ -45,6 +45,7 @@
|
|
|
<if test="dto.teacherId != null">
|
|
|
and t7.teacher_id = #{dto.teacherId}
|
|
|
</if>
|
|
|
+ order by t.id desc
|
|
|
</select>
|
|
|
|
|
|
<select id="getInfo" resultType="com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionVo">
|
|
|
@@ -64,7 +65,7 @@
|
|
|
|
|
|
<select id="getMobilePage" parameterType="com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionMobilePageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobilePageVo">
|
|
|
SELECT t.id,t1.assessment_date,t2.name AS assessment_category_name,t3.name AS assessment_project_name,t5.name AS
|
|
|
- assessment_class_name,t1.reason,t1.score,t1.score_type,t4.name AS score_type_cn,
|
|
|
+ assessment_class_name,t1.reason,t1.total_score as score,t1.score_type,t4.name AS score_type_cn,
|
|
|
(
|
|
|
SELECT COUNT(*) FROM base_student_assessment_student_relation WHERE
|
|
|
base_student_assessment_inspection_id = t1.id AND class_id = t.class_id AND delete_mark = 0 and enabled_mark = 1
|
|
|
@@ -78,7 +79,7 @@
|
|
|
LEFT JOIN base_student_assessment_category t2 ON (t2.id = t1.base_student_assessment_category_id)
|
|
|
LEFT JOIN base_student_assessment_project t3 ON (t3.id = t1.base_student_assessment_project_id)
|
|
|
LEFT JOIN base_student_assessment_item t6 ON (t6.id = t1.base_student_assessment_item_id)
|
|
|
- LEFT JOIN xjr_dictionary_detail t4 ON t4.code=t1.score_type
|
|
|
+ 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.enabled_mark = 1 and t.class_id in
|
|
|
<foreach item="classId" index="index" collection="dto.classIds" open="(" close=")" separator=",">
|
|
|
@@ -96,6 +97,7 @@
|
|
|
<if test="dto.endDate != null and dto.endDate != ''">
|
|
|
and t1.assessment_date <= #{dto.endDate}
|
|
|
</if>
|
|
|
+ order by t1.id desc
|
|
|
</select>
|
|
|
|
|
|
<select id="getMobileInfo" resultType="com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionMobileVo">
|
|
|
@@ -231,7 +233,7 @@
|
|
|
<select id="getAssessmentInspectionByClassIdList" parameterType="com.xjrsoft.module.student.dto.QuantitativeAssessmentSingleScoreDto" resultType="com.xjrsoft.module.student.vo.QuantitativeAssessmentSingleScoreVo">
|
|
|
select
|
|
|
t.class_ids as class_id,
|
|
|
- SUM(t.score * (LENGTH(personal_student_user_ids) - LENGTH(REPLACE(personal_student_user_ids, ',', '')) + 1)) AS sumScore
|
|
|
+ SUM(t.score * IF(personal_student_user_ids IS NULL, 1, (SELECT COUNT(*) FROM base_student_assessment_student_relation WHERE base_student_assessment_inspection_id = t.id AND delete_mark = 0 AND enabled_mark = 1))) AS sumScore
|
|
|
from base_student_assessment_inspection t
|
|
|
inner join base_student_assessment_category t1 on t1.id = t.base_student_assessment_category_id
|
|
|
where t.delete_mark = 0 and t.enabled_mark = 1
|
|
|
@@ -256,6 +258,9 @@
|
|
|
<if test="dto.endTime != null">
|
|
|
and t.create_date < #{dto.endTime}
|
|
|
</if>
|
|
|
+ <if test="dto.year != null and dto.month != null">
|
|
|
+ and DATE_FORMAT(t.assessment_date, '%Y-%m') = concat(#{dto.year}, '-', #{dto.month})
|
|
|
+ </if>
|
|
|
group by t.class_ids;
|
|
|
</select>
|
|
|
|