SELECT distinct t1.id,t1.base_grade_id as gradeId,t2.name AS grade_name,t1.object_id,ifnull(t3.name, t6.name) AS object_name
FROM evaluate_object t1
LEFT JOIN base_grade t2 ON t2.id = t1.base_grade_id
LEFT JOIN xjr_user t3 ON t3.id = t1.object_id
LEFT JOIN base_class t6 ON t6.id = t1.object_id
LEFT JOIN xjr_user_dept_relation t4 ON t4.user_id = t1.object_id
LEFT JOIN base_class t5 ON t5.grade_id = t2.id
WHERE t1.delete_mark = 0 and t1.evaluate_manage_id = #{dto.evaluateManageId}
and t1.base_grade_id = #{dto.gradeId}
and t4.dept_id = #{dto.deptId}
and t5.id = #{dto.classId}
and t3.name like concat("%", #{dto.name}, "%")
ORDER BY t1.id
SELECT t1.id, t1.evaluate_object_id,t2.name AS executer_name,t1.user_id as executer_id FROM evaluate_executer t1
LEFT JOIN xjr_user t2 ON t1.user_id = t2.id
WHERE t1.delete_mark = 0 and t1.evaluate_manage_id = #{dto.evaluateManageId}
SELECT t1.id AS class_id,t2.id AS object_id,t2.name AS object_name,t1.grade_id
FROM base_class t1
LEFT JOIN xjr_user t2 ON t1.teacher_id = t2.id
WHERE t1.delete_mark = 0
SELECT t1.id AS object_id,t1.name AS object_name,t1.grade_id
FROM base_class t1
WHERE t1.delete_mark = 0
and t1.grade_id = #{dto.gradeId}
SELECT t2.id as executer_id,t2.name as executer_name,t1.class_id,t1.grade_id FROM base_student_school_roll t1
LEFT JOIN xjr_user t2 ON t1.user_id = t2.id
WHERE t1.delete_mark = 0 AND t2.delete_mark = 0
and t1.grade_id = #{dto.gradeId}
select
t.id as executer_id,t.name as executer_name
from xjr_user t
left join xjr_user_post_relation t1 on t1.user_id = t.id
where t1.post_id = 1742726034814464002
and t.delete_mark = 0
delete t from evaluate_executer t
left join evaluate_object t1 on t1.id = t.evaluate_object_id
where t1.base_grade_id = #{dto.gradeId} and t.evaluate_manage_id = #{dto.evaluateManageId};
delete from evaluate_object t
where t.base_grade_id = #{dto.gradeId} and t.evaluate_manage_id = #{dto.evaluateManageId};