|
|
|
@ -3,9 +3,19 @@ queryByCondition
|
|
|
|
|
* 根据不为空的参数进行分页查询
|
|
|
|
|
select
|
|
|
|
|
@pageTag(){
|
|
|
|
|
t.*
|
|
|
|
|
t.*,
|
|
|
|
|
ta.student_name,
|
|
|
|
|
ta.student_sn,
|
|
|
|
|
tb.class_name
|
|
|
|
|
@}
|
|
|
|
|
@}
|
|
|
|
|
from teacher_open_course_question_log t
|
|
|
|
|
left join student ta on ta.student_id = t.student_id and ta.student_status = 1
|
|
|
|
|
left join school_class tb on tb.class_id = ta.class_id and tb.class_status = 1
|
|
|
|
|
@ // 如果关联类型不为空,则关联题目配置表
|
|
|
|
|
@if(!isEmpty(questionSettingType)){
|
|
|
|
|
inner join teacher_open_course_question_setting tc on tc.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id
|
|
|
|
|
@}
|
|
|
|
|
where 1=1
|
|
|
|
|
@//数据权限,该sql语句功能点,如果不考虑数据权限,可以删除此行
|
|
|
|
|
and #function("teacherOpenCourseQuestionLog.query")#
|
|
|
|
@ -98,7 +108,7 @@ queryByCondition
|
|
|
|
|
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionLogAddType)){
|
|
|
|
|
and t.question_log_add_type =#questionLogAddType#
|
|
|
|
|
and tc.teacher_open_course_question_setting_type =#questionLogAddType#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(orgId)){
|
|
|
|
|
and t.org_id =#orgId#
|
|
|
|
@ -112,6 +122,17 @@ queryByCondition
|
|
|
|
|
@if(!isEmpty(userIdPlural)){
|
|
|
|
|
and find_in_set(t.user_id,#userIdPlural#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentSnOrName)){
|
|
|
|
|
and (ta.student_sn like #'%'+studentSnOrName+'%'# or ta.student_name like #'%'+studentSnOrName+'%'#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(schoolClassIdPlural)){
|
|
|
|
|
and find_in_set(ta.class_id, #schoolClassIdPlural#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionSettingType)){
|
|
|
|
|
and tc.teacher_open_course_question_setting_type = #questionSettingType#
|
|
|
|
|
and tc.teacher_open_course_question_setting_status = 1
|
|
|
|
|
and tc.teacher_open_course_question_setting_push_status = 1
|
|
|
|
|
@}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
queryByConditionQuery
|
|
|
|
@ -119,9 +140,18 @@ queryByConditionQuery
|
|
|
|
|
* 根据不为空的参数进行分页查询(无权限)
|
|
|
|
|
select
|
|
|
|
|
@pageTag(){
|
|
|
|
|
t.*
|
|
|
|
|
t.*,
|
|
|
|
|
ta.student_name,
|
|
|
|
|
ta.student_sn,
|
|
|
|
|
tb.class_name
|
|
|
|
|
@}
|
|
|
|
|
from teacher_open_course_question_log t
|
|
|
|
|
left join student ta on ta.student_id = t.student_id and ta.student_status = 1
|
|
|
|
|
left join school_class tb on tb.class_id = ta.class_id and tb.class_status = 1
|
|
|
|
|
@ // 如果关联类型不为空,则关联题目配置表
|
|
|
|
|
@if(!isEmpty(questionSettingType)){
|
|
|
|
|
inner join teacher_open_course_question_setting tc on tc.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id
|
|
|
|
|
@}
|
|
|
|
|
where 1=1
|
|
|
|
|
@if(!isEmpty(teacherOpenCourseQuestionLogId)){
|
|
|
|
|
and t.teacher_open_course_question_log_id =#teacherOpenCourseQuestionLogId#
|
|
|
|
@ -212,7 +242,7 @@ queryByConditionQuery
|
|
|
|
|
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionLogAddType)){
|
|
|
|
|
and t.question_log_add_type =#questionLogAddType#
|
|
|
|
|
and tc.teacher_open_course_question_setting_type =#questionLogAddType#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(orgId)){
|
|
|
|
|
and t.org_id =#orgId#
|
|
|
|
@ -226,6 +256,18 @@ queryByConditionQuery
|
|
|
|
|
@if(!isEmpty(userIdPlural)){
|
|
|
|
|
and find_in_set(t.user_id,#userIdPlural#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentSnOrName)){
|
|
|
|
|
and (ta.student_sn like #'%'+studentSnOrName+'%'# or ta.student_name like #'%'+studentSnOrName+'%'#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(schoolClassIdPlural)){
|
|
|
|
|
and find_in_set(ta.class_id, #schoolClassIdPlural#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionSettingType)){
|
|
|
|
|
and tc.teacher_open_course_question_setting_type = #questionSettingType#
|
|
|
|
|
and tc.teacher_open_course_question_setting_status = 1
|
|
|
|
|
and tc.teacher_open_course_question_setting_push_status = 1
|
|
|
|
|
@}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
studentScoreList
|
|
|
|
@ -334,7 +376,7 @@ studentScoreList
|
|
|
|
|
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionLogAddType)){
|
|
|
|
|
and t.question_log_add_type =#questionLogAddType#
|
|
|
|
|
and tc.teacher_open_course_question_setting_type =#questionLogAddType#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(orgId)){
|
|
|
|
|
and t.org_id =#orgId#
|
|
|
|
@ -348,6 +390,18 @@ studentScoreList
|
|
|
|
|
@if(!isEmpty(userIdPlural)){
|
|
|
|
|
and find_in_set(t.user_id,#userIdPlural#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentSnOrName)){
|
|
|
|
|
and (ta.student_sn like #'%'+studentSnOrName+'%'# or ta.student_name like #'%'+studentSnOrName+'%'#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(schoolClassIdPlural)){
|
|
|
|
|
and find_in_set(ta.class_id, #schoolClassIdPlural#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionSettingType)){
|
|
|
|
|
and tc.teacher_open_course_question_setting_type = #questionSettingType#
|
|
|
|
|
and tc.teacher_open_course_question_setting_status = 1
|
|
|
|
|
and tc.teacher_open_course_question_setting_push_status = 1
|
|
|
|
|
@}
|
|
|
|
|
|
|
|
|
|
group by
|
|
|
|
|
t.student_id,
|
|
|
|
|
ta.student_sn,
|
|
|
|
@ -488,8 +542,17 @@ getTeacherOpenCourseQuestionLogValues
|
|
|
|
|
|
|
|
|
|
* 根据不为空的参数进行查询
|
|
|
|
|
|
|
|
|
|
select t.*
|
|
|
|
|
select t.*,
|
|
|
|
|
ta.student_name,
|
|
|
|
|
ta.student_sn,
|
|
|
|
|
tb.class_name
|
|
|
|
|
from teacher_open_course_question_log t
|
|
|
|
|
left join student ta on ta.student_id = t.student_id and ta.student_status = 1
|
|
|
|
|
left join school_class tb on tb.class_id = ta.class_id and tb.class_status = 1
|
|
|
|
|
@ // 如果关联类型不为空,则关联题目配置表
|
|
|
|
|
@if(!isEmpty(questionSettingType)){
|
|
|
|
|
inner join teacher_open_course_question_setting tc on tc.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id
|
|
|
|
|
@}
|
|
|
|
|
where 1=1
|
|
|
|
|
@if(!isEmpty(teacherOpenCourseQuestionLogId)){
|
|
|
|
|
and t.teacher_open_course_question_log_id =#teacherOpenCourseQuestionLogId#
|
|
|
|
@ -531,7 +594,7 @@ getTeacherOpenCourseQuestionLogValues
|
|
|
|
|
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionLogAddType)){
|
|
|
|
|
and t.question_log_add_type =#questionLogAddType#
|
|
|
|
|
and tc.teacher_open_course_question_setting_type =#questionLogAddType#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(orgId)){
|
|
|
|
|
and t.org_id =#orgId#
|
|
|
|
@ -546,8 +609,17 @@ getValuesByQuery
|
|
|
|
|
|
|
|
|
|
* 根据不为空的参数进行查询
|
|
|
|
|
|
|
|
|
|
select t.*
|
|
|
|
|
select t.*,
|
|
|
|
|
ta.student_name,
|
|
|
|
|
ta.student_sn,
|
|
|
|
|
tb.class_name
|
|
|
|
|
from teacher_open_course_question_log t
|
|
|
|
|
left join student ta on ta.student_id = t.student_id and ta.student_status = 1
|
|
|
|
|
left join school_class tb on tb.class_id = ta.class_id and tb.class_status = 1
|
|
|
|
|
@ // 如果关联类型不为空,则关联题目配置表
|
|
|
|
|
@if(!isEmpty(questionSettingType)){
|
|
|
|
|
inner join teacher_open_course_question_setting tc on tc.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id
|
|
|
|
|
@}
|
|
|
|
|
where 1=1 and #function("teacherOpenCourseQuestionLog.query")#
|
|
|
|
|
@if(!isEmpty(teacherOpenCourseQuestionLogId)){
|
|
|
|
|
and t.teacher_open_course_question_log_id =#teacherOpenCourseQuestionLogId#
|
|
|
|
@ -605,7 +677,7 @@ getValuesByQuery
|
|
|
|
|
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionLogAddType)){
|
|
|
|
|
and t.question_log_add_type =#questionLogAddType#
|
|
|
|
|
and tc.teacher_open_course_question_setting_type =#questionLogAddType#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(orgId)){
|
|
|
|
|
and t.org_id =#orgId#
|
|
|
|
@ -619,6 +691,18 @@ getValuesByQuery
|
|
|
|
|
@if(!isEmpty(userIdPlural)){
|
|
|
|
|
and find_in_set(t.user_id,#userIdPlural#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentSnOrName)){
|
|
|
|
|
and (ta.student_sn like #'%'+studentSnOrName+'%'# or ta.student_name like #'%'+studentSnOrName+'%'#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(schoolClassIdPlural)){
|
|
|
|
|
and find_in_set(ta.class_id, #schoolClassIdPlural#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionSettingType)){
|
|
|
|
|
and tc.teacher_open_course_question_setting_type = #questionSettingType#
|
|
|
|
|
and tc.teacher_open_course_question_setting_status = 1
|
|
|
|
|
and tc.teacher_open_course_question_setting_push_status = 1
|
|
|
|
|
@}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getValuesByQueryNotWithPermission
|
|
|
|
@ -626,8 +710,17 @@ getValuesByQueryNotWithPermission
|
|
|
|
|
|
|
|
|
|
* 根据不为空的参数进行查询
|
|
|
|
|
|
|
|
|
|
select t.*
|
|
|
|
|
select t.*,
|
|
|
|
|
ta.student_name,
|
|
|
|
|
ta.student_sn,
|
|
|
|
|
tb.class_name
|
|
|
|
|
from teacher_open_course_question_log t
|
|
|
|
|
left join student ta on ta.student_id = t.student_id and ta.student_status = 1
|
|
|
|
|
left join school_class tb on tb.class_id = ta.class_id and tb.class_status = 1
|
|
|
|
|
@ // 如果关联类型不为空,则关联题目配置表
|
|
|
|
|
@if(!isEmpty(questionSettingType)){
|
|
|
|
|
inner join teacher_open_course_question_setting tc on tc.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id
|
|
|
|
|
@}
|
|
|
|
|
where 1=1
|
|
|
|
|
@if(!isEmpty(teacherOpenCourseQuestionLogId)){
|
|
|
|
|
and t.teacher_open_course_question_log_id =#teacherOpenCourseQuestionLogId#
|
|
|
|
@ -685,7 +778,7 @@ getValuesByQueryNotWithPermission
|
|
|
|
|
and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionLogAddType)){
|
|
|
|
|
and t.question_log_add_type =#questionLogAddType#
|
|
|
|
|
and tc.teacher_open_course_question_setting_type =#questionLogAddType#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(orgId)){
|
|
|
|
|
and t.org_id =#orgId#
|
|
|
|
@ -699,6 +792,18 @@ getValuesByQueryNotWithPermission
|
|
|
|
|
@if(!isEmpty(userIdPlural)){
|
|
|
|
|
and find_in_set(t.user_id,#userIdPlural#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentSnOrName)){
|
|
|
|
|
and (ta.student_sn like #'%'+studentSnOrName+'%'# or ta.student_name like #'%'+studentSnOrName+'%'#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(schoolClassIdPlural)){
|
|
|
|
|
and find_in_set(ta.class_id, #schoolClassIdPlural#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(questionSettingType)){
|
|
|
|
|
and tc.teacher_open_course_question_setting_type = #questionSettingType#
|
|
|
|
|
and tc.teacher_open_course_question_setting_status = 1
|
|
|
|
|
and tc.teacher_open_course_question_setting_push_status = 1
|
|
|
|
|
@}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getQuestionLogScoreDetailsInfo
|
|
|
|
@ -726,8 +831,12 @@ getQuestionLogScoreDetailsInfo
|
|
|
|
|
from
|
|
|
|
|
teacher_open_course_question_log t
|
|
|
|
|
left join resources_question_snapshot tc on tc.resources_question_snapshot_id = t.resources_question_snapshot_id
|
|
|
|
|
left join student ta on ta.student_id = t.student_id and ta.student_status = 1
|
|
|
|
|
left join student ta on ta.student_id = t.student_id and ta.student_status = 1
|
|
|
|
|
left join school_class tb on tb.class_id = ta.class_id and tb.class_status = 1
|
|
|
|
|
@ // 如果关联类型不为空,则关联题目配置表
|
|
|
|
|
@if(!isEmpty(questionSettingType)){
|
|
|
|
|
inner join teacher_open_course_question_setting tc on tc.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id
|
|
|
|
|
@}
|
|
|
|
|
where
|
|
|
|
|
1 = 1
|
|
|
|
|
and t.teacher_open_course_question_setting_id = #teacherOpenCourseQuestionSettingId#
|
|
|
|
|