From 74aa74355f2b0dbfea39e9b214cd9594fff26edf Mon Sep 17 00:00:00 2001 From: Mlxa0324 <mlx950324@163.com> Date: Sat, 14 Jan 2023 00:43:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E6=9F=A5=E8=AF=A2=E4=BA=A4=E5=8D=B7?= =?UTF-8?q?=E4=BA=86=E7=9A=84=E9=A2=98=E7=9B=AE=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/TeacherOpenCourseQuestionLogService.java | 8 ++------ .../resources/sql/jlw/teacherOpenCourseQuestionLog.md | 10 +++++----- .../templates/jlw/questionLogSummary/indexInfo.html | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseQuestionLogService.java b/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseQuestionLogService.java index 17abe8dc..a21400d2 100644 --- a/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseQuestionLogService.java +++ b/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseQuestionLogService.java @@ -99,7 +99,7 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService<Teacher Map<Long, List<Student>> studentMap = new HashMap<>(); if (ObjectUtil.isNotEmpty(list)) { - String studentIds = list.stream().map(TeacherOpenCourseQuestionLog::getStudentId).map(Object::toString).collect(joining(",")); + String studentIds = list.stream().map(TeacherOpenCourseQuestionLog::getStudentId).map(Object::toString).distinct().collect(joining(",")); List<Student> studentList = studentDao.getByIds(studentIds); dictParser(studentList); if (ObjectUtil.isNotEmpty(studentList)) { @@ -113,12 +113,8 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService<Teacher // 学生编号 item.set("studentSn", student.getStudentSn()); item.set("studentName", student.getStudentName()); - SchoolClass schoolClass = student.getSchoolClass(); - // 班级 - if(null != schoolClass) { - item.set("className", schoolClass.getClassName()); - } + item.set("className", defaultIfNull(student.get("classIdText"), "班级不存在")); } }); } diff --git a/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionLog.md b/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionLog.md index 52bcf5b7..a47c20af 100644 --- a/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionLog.md +++ b/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionLog.md @@ -12,7 +12,7 @@ queryByCondition 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(questionLogAddType)){ + @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 @@ -107,7 +107,7 @@ queryByCondition and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score) @} @if(!isEmpty(questionLogAddType)){ - and tc.teacher_open_course_question_setting_type =#questionLogAddType# + and tc.question_log_add_type =#questionLogAddType# @} @if(!isEmpty(orgId)){ and t.org_id =#orgId# @@ -127,7 +127,7 @@ queryByCondition @if(!isEmpty(schoolClassIdPlural)){ and find_in_set(ta.class_id, #schoolClassIdPlural#) @} - @if(!isEmpty(questionLogAddType)){ + @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 @@ -148,7 +148,7 @@ queryByConditionQuery 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(questionLogAddType)){ + @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 @@ -261,7 +261,7 @@ queryByConditionQuery @if(!isEmpty(schoolClassIdPlural)){ and find_in_set(ta.class_id, #schoolClassIdPlural#) @} - @if(!isEmpty(questionLogAddType)){ + @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 diff --git a/web/src/main/resources/templates/jlw/questionLogSummary/indexInfo.html b/web/src/main/resources/templates/jlw/questionLogSummary/indexInfo.html index 2887a385..a751adbf 100644 --- a/web/src/main/resources/templates/jlw/questionLogSummary/indexInfo.html +++ b/web/src/main/resources/templates/jlw/questionLogSummary/indexInfo.html @@ -158,7 +158,7 @@ layui.use(['form','laydate','table','laytpl'], function(){ initTable:function(){ var sx_ = localStorage.getItem("teacherOpenCourseQuestionLogTable_field_" + Common.userInfoId); //筛选值显示、隐藏缓存 if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);} - var url = '/api/teacherOpenCourseQuestionLog/list.do'; + var url = '/api/teacherOpenCourseQuestionLog/list.do?questionLogAddType=FINALLY_SUBMIT'; if(questionSettingType == 'HOMEWORK_FILE'){ url = '/jlw/teacherOpenCourseQuestionLog/homeworkFileLogPageList.json'; }