beetlsql3-dev
Mlxa0324 2 years ago
parent f9c79c9c23
commit 656fc94194

@ -262,6 +262,9 @@ public class TeacherOpenCourseQuestionSettingService extends CoreBaseService<Tea
item.set("finishTime", scoreInfo.getFinishTime());
item.set("finishSecondTime", scoreInfo.getFinishSecondTime());
item.set("myScore", scoreInfo.getQuestionLogSummaryStudentTotalScore());
item.set("mySuccessRate", scoreInfo.getQuestionLogSummarySuccessRate());
item.set("mySuccessCount", scoreInfo.getQuestionLogSummarySuccessCount());
item.set("myErrorCount", scoreInfo.getQuestionLogSummaryErrorCount());
}
}

@ -37,6 +37,7 @@ import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
import static cn.hutool.core.util.ObjectUtil.defaultIfNull;
import static cn.jlw.util.CacheUserUtil.getStudent;
import static com.ibeetl.admin.core.util.ExcelUtil.convertData;
import static com.ibeetl.admin.core.util.ExcelUtil.write;
@ -68,6 +69,7 @@ public class TeacherOpenCourseQuestionLogController {
return JsonResult.failMessage("请登录后再操作");
}else{
PageQuery page = condition.getPageQuery();
condition.setQuestionLogAddType(defaultIfNull(condition.getQuestionLogAddType(), FINALLY_SUBMIT));
teacherOpenCourseQuestionLogService.queryByConditionQuery(page);
return JsonResult.success(page);
}

@ -5,6 +5,7 @@ import com.ibeetl.admin.core.annotation.Query;
import com.ibeetl.admin.core.web.query.PageParam;
import com.ibeetl.jlw.entity.TeacherOpenCourseQuestionLog;
import com.ibeetl.jlw.enums.QuestionLogAddTypeEnum;
import com.ibeetl.jlw.enums.ResourcesQuestionSnapshotFromTypeEnum;
import lombok.*;
import lombok.experimental.Accessors;
@ -124,6 +125,19 @@ public class TeacherOpenCourseQuestionLogQuery extends PageParam {
private String _given;//指定更新的特定字段,多个逗号隔开
// 扩展字段
// 学生姓名或者学号
private String studentSnOrName;
// 班级IDs
private String schoolClassIdPlural;
// 题目配置来源类型
private ResourcesQuestionSnapshotFromTypeEnum questionSettingType;
public TeacherOpenCourseQuestionLog pojo(){
TeacherOpenCourseQuestionLog pojo = new TeacherOpenCourseQuestionLog();
pojo.setTeacherOpenCourseQuestionLogId(this.getTeacherOpenCourseQuestionLogId());

@ -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#

Loading…
Cancel
Save