From 98c10189741547556a3a6b49c25280fb273af3ab Mon Sep 17 00:00:00 2001 From: yaodan <1421553879@qq.com> Date: Mon, 29 May 2023 01:16:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E6=95=B0=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/题库导入模板.xlsx | Bin 10705 -> 10894 bytes .../TeacherOpenCourseQuestionSettingDao.java | 2 + ...enCourseHandsOnSimulationTasksService.java | 61 ++++++------ .../TeacherOpenCourseQuestionLogService.java | 23 ++++- ...eacherOpenCourseScoreDashboardService.java | 19 ++-- ...eacherOpenCourseQuestionLogController.java | 2 +- .../web/query/QuestionLogSummaryQuery.java | 11 ++- .../jlw/web/query/StudentScoreParam.java | 3 +- .../TeacherOpenCourseQuestionLogQuery.java | 4 + .../resources/sql/jlw/questionLogSummary.md | 3 + .../sql/jlw/teacherOpenCourseQuestionLog.md | 21 +++- .../jlw/teacherOpenCourseQuestionSetting.md | 90 ++++++++++++++++++ 12 files changed, 197 insertions(+), 42 deletions(-) diff --git a/web/filesystem/template/题库导入模板.xlsx b/web/filesystem/template/题库导入模板.xlsx index ddea7517f3d68efc2e2268399a6dddbd361a5c09..7a16c3c3baf7772c6bcad9ebc60b22a6a65f23b4 100644 GIT binary patch delta 3172 zcmZ9ObyySb7RNVwAhnGUaO9Furj&%lC=n$kl&+yn5Rgz|l!P<`L2|2R6FHX#~Slg_LwDD>I z@%EtSbt-qSpKeuQFLSZ2qztAMFsjq_uEfd=*h1dRkbNBRuH{7l*L`6`IHe^E^nBlcQkSOPv;mZp=aG#c|>$T?A2Au zNzR9hcO27?wzNtTaxT{Ed<{JR;Zzkfy{&~>=X*xc7@|Oui|!L$TpgL#sk?!?b5EM9 zw1cT+3gDN4eifBwYwIzAX_b6Nb?z*?b`a?;6}zspv9s}bewNU;zHoK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#p-j$fp=)KYv7qSPWO5_bL3~&>$L{0Flq_24n>G{qE4Fo44JxfN z9htncmPZ4xk36aPLez;;>E9pFUO39$L?T%X9VcV?$I-lu9GhV1MP4y7s-=X?rmok`$Da*KzpP$!>Q={W9czf3?!POI!IyG?dS;Yq--nN#4ir{G0fb z-qWz_hU(KNFw-s9YeG^Q{7%{)6V z{@X1iK>;d=ZM2}Fct54?vGkuuXV&tT!k?UiHsqP=1QDiG?2qxQ_zj*nawl%xl3O`K zcir&+8mB5b8oHnTa9}&I_DO_h_+950#GQwVu)NzY{xzmcwBzkwA=rSj9V(x%XiG>W z$D`Y5)bZnX;kb7MsE=H|F>PMZGskB<|6nq#!=!|Qbw6#^h|8{QV|M@sBMPLFEG2vE z3*>2?KV$XMVS_U^3lO%xIw^k8rp#x%DfLXWnZnf%=Oo^coZ!~G_Er+4O$Vl3tD?X# za{0`VpfyHq9z$cY7-R|1ExhG-+pW@bN zas4Utcy`=crry?i13LSw&70MzYnTOtR=35L>Ch(nbPM)E>%EFIqUIy*pe`5li7>-m z2vu2mk=VzuEt# bhp-Z|S%nEova$?^>;zX?S!Nm7AHshCYtm}x diff --git a/web/src/main/java/com/ibeetl/jlw/dao/TeacherOpenCourseQuestionSettingDao.java b/web/src/main/java/com/ibeetl/jlw/dao/TeacherOpenCourseQuestionSettingDao.java index e413b17d..55612246 100644 --- a/web/src/main/java/com/ibeetl/jlw/dao/TeacherOpenCourseQuestionSettingDao.java +++ b/web/src/main/java/com/ibeetl/jlw/dao/TeacherOpenCourseQuestionSettingDao.java @@ -83,4 +83,6 @@ public interface TeacherOpenCourseQuestionSettingDao extends BaseMapper queryByConditionQueryNotPage(TeacherOpenCourseQuestionSettingQuery condition); + + List getNotEmptyQuestionSetting(TeacherOpenCourseQuestionSettingQuery teacherOpenCourseQuestionSettingQuery); } diff --git a/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseHandsOnSimulationTasksService.java b/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseHandsOnSimulationTasksService.java index d2bc5106..37057421 100644 --- a/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseHandsOnSimulationTasksService.java +++ b/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseHandsOnSimulationTasksService.java @@ -443,22 +443,24 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ } public PageQuery getStudentScore(StudentScoreParam studentScoreParam) { + Long handsOnId = studentScoreParam.getHandsOnId(); - if (handsOnId != null) { - TeacherOpenCourseHandsOnQuery handsOnQuery = new TeacherOpenCourseHandsOnQuery(); - handsOnQuery.setHandsOnId(handsOnId); - List handsOns = teacherOpenCourseHandsOnDao.getValuesByQueryNotWithPermission(handsOnQuery); - Long teacherOpenCourseId = handsOns.get(0).getTeacherOpenCourseId(); - List select = teacherOpenCourseMergeStudentService.createLambdaQuery() - .andEq(TeacherOpenCourseMergeSchoolClass::getTeacherOpenCourseId, teacherOpenCourseId).andEq(TeacherOpenCourseMergeSchoolClass::getTeacherOpenCourseMergeSchoolClassStatus, 1).select(); - if (CollectionUtil.isNotEmpty(select)) { - List collect = select.stream().map(TeacherOpenCourseMergeSchoolClass::getSchoolClassId).collect(Collectors.toList()); - String join = CollectionUtil.join(collect, ","); - studentScoreParam.setClassIds(join); - } + if (handsOnId == null) { + throw new PlatformException("请选择实操任务"); + } + TeacherOpenCourseHandsOnQuery handsOnQuery = new TeacherOpenCourseHandsOnQuery(); + handsOnQuery.setHandsOnId(handsOnId); + List handsOns = teacherOpenCourseHandsOnDao.getValuesByQueryNotWithPermission(handsOnQuery); + Long teacherOpenCourseId = handsOns.get(0).getTeacherOpenCourseId(); + List select = teacherOpenCourseMergeStudentService.createLambdaQuery() + .andEq(TeacherOpenCourseMergeSchoolClass::getTeacherOpenCourseId, teacherOpenCourseId).andEq(TeacherOpenCourseMergeSchoolClass::getTeacherOpenCourseMergeSchoolClassStatus, 1).select(); + if (CollectionUtil.isNotEmpty(select)) { + List collect = select.stream().map(TeacherOpenCourseMergeSchoolClass::getSchoolClassId).collect(Collectors.toList()); + String join = CollectionUtil.join(collect, ","); + studentScoreParam.setClassIds(join); } PageQuery pageQuery = studentScoreParam.getPageQuery(); - pageQuery.setPara("studentStatus",1); + pageQuery.setPara("studentStatus", 1); PageQuery studentPageQuery = studentService.queryByCondition(pageQuery); List list = studentPageQuery.getList(); @@ -466,9 +468,7 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ for (Student student : list) { StudentHandsOnTaskVideoQuery studentHandsOnTaskVideoQuery = new StudentHandsOnTaskVideoQuery(); studentHandsOnTaskVideoQuery.setStudentId(student.getStudentId()); - if (handsOnId != null) { - studentHandsOnTaskVideoQuery.setHandsOnId(handsOnId); - } + studentHandsOnTaskVideoQuery.setHandsOnId(handsOnId); List valuesByQuery = studentHandsOnTaskVideoService.getValuesByQuery(studentHandsOnTaskVideoQuery); double sum = valuesByQuery.stream().mapToDouble(v -> v.getVideoScore() == null ? 0 : v.getVideoScore().doubleValue()).sum(); student.set("sumScore", sum); @@ -478,9 +478,7 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ for (Student student : list) { StudentHandsOnTaskPptQuery studentHandsOnTaskPptQuery = new StudentHandsOnTaskPptQuery(); studentHandsOnTaskPptQuery.setStudentId(student.getStudentId()); - if (handsOnId != null) { - studentHandsOnTaskPptQuery.setHandsOnId(handsOnId); - } + studentHandsOnTaskPptQuery.setHandsOnId(handsOnId); List valuesByQuery = studentHandsOnTaskPptService.getValuesByQuery(studentHandsOnTaskPptQuery); double sum = valuesByQuery.stream().mapToDouble(v -> v.getPptScore() == null ? 0 : v.getPptScore().doubleValue()).sum(); student.set("sumScore", sum); @@ -490,9 +488,7 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ for (Student student : list) { StudentHandsOnTaskTheoryQuery studentHandsOnTaskTheoryQuery = new StudentHandsOnTaskTheoryQuery(); studentHandsOnTaskTheoryQuery.setStudentId(student.getStudentId()); - if (handsOnId != null) { - studentHandsOnTaskTheoryQuery.setHandsOnId(handsOnId); - } + studentHandsOnTaskTheoryQuery.setHandsOnId(handsOnId); List valuesByQuery = studentHandsOnTaskTheoryService.getValuesByQuery(studentHandsOnTaskTheoryQuery); double sum = valuesByQuery.stream().mapToDouble(v -> v.getTheoryScore() == null ? 0 : v.getTheoryScore().doubleValue()).sum(); student.set("sumScore", sum); @@ -502,9 +498,7 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ for (Student student : list) { StudentHandsOnTaskStepQuery studentHandsOnTaskStepQuery = new StudentHandsOnTaskStepQuery(); studentHandsOnTaskStepQuery.setStudentId(student.getStudentId()); - if (handsOnId != null) { - studentHandsOnTaskStepQuery.setHandsOnId(handsOnId); - } + studentHandsOnTaskStepQuery.setHandsOnId(handsOnId); List valuesByQuery = studentHandsOnTaskStepService.getValuesByQuery(studentHandsOnTaskStepQuery); double sum = valuesByQuery.stream().mapToDouble(v -> v.getTheoryScore() == null ? 0 : v.getTheoryScore().doubleValue()).sum(); student.set("sumScore", sum); @@ -514,14 +508,25 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ for (Student student : list) { StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery = new StudentHandsOnTaskReportQuery(); studentHandsOnTaskReportQuery.setStudentId(student.getStudentId()); - if (handsOnId != null) { - studentHandsOnTaskReportQuery.setHandsOnId(handsOnId); - } + studentHandsOnTaskReportQuery.setHandsOnId(handsOnId); List valuesByQuery = studentHandsOnTaskReportService.getValuesByQuery(studentHandsOnTaskReportQuery); double sum = valuesByQuery.stream().mapToDouble(v -> v.getReportScore() == null ? 0 : v.getReportScore().doubleValue()).sum(); student.set("sumScore", sum); } } + if ("ALL".equals(studentScoreParam.getType())) { + for (Student student : list) { + HandsOnAchievement handsOnAchievement = new HandsOnAchievement(); + handsOnAchievement.setStudentId(student.getStudentId()); + handsOnAchievement.setHandOnId(handsOnId); + handsOnAchievement.setHandOnAchievementStatus(1); + HandsOnAchievement res = studentHandsOnTaskReportService.queryObject(handsOnAchievement); + String totalScore = res.getTotalScore(); + student.set("sumScore", totalScore); + } + } + + studentPageQuery.setList(list); return studentPageQuery; } 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 72a8f569..0ec86420 100644 --- a/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseQuestionLogService.java +++ b/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseQuestionLogService.java @@ -344,7 +344,7 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService updateList = teacherOpenCourseQuestionLogDao.getValuesByQueryNotWithPermission(teacherOpenCourseQuestionLogQuery); Assert.notEmpty(updateList, "未查询到做题记录!"); @@ -451,13 +451,30 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService teacherOpenCourseQuestionLogList = queryObjectList(teacherOpenCourseQuestionLog); + if (CollectionUtil.isNotEmpty(teacherOpenCourseQuestionLogList)) { + teacherOpenCourseQuestionLogList.forEach(log -> { + log.setTeacherOpenCourseQuestionLogStatus(GlobalStatusEnum.DELETED.getCode()); + log.setTeacherOpenCourseQuestionLogUpdateTime(new Date()); + }); + updateBatchTemplate(teacherOpenCourseQuestionLogList); + } + // 重新添加最新的数据 Date now = new Date(); TeacherOpenCourseQuestionLogQuery query = new TeacherOpenCourseQuestionLogQuery(); query.setTeacherOpenCourseQuestionLogUploadFile(absFilePath); query.setTeacherOpenCourseQuestionSettingId(questionSettingId); query.setTeacherOpenCourseQuestionLogAddTime(now); query.setTeacherOpenCourseQuestionLogFinishTime(RandomUtil.randomLong(100, 3600)); - query.setTeacherOpenCourseQuestionLogStatus(1); + query.setTeacherOpenCourseQuestionLogStatus(GlobalStatusEnum.NORMAL.getCode()); // 附件作业,只有一题,所有默认是全部提交的方式 query.setQuestionLogAddType(FINALLY_SUBMIT); query.setOrgId(student.getOrgId()); @@ -1230,6 +1247,8 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService teacherOpenCourseChatLogList = teacherOpenCourseChatLogService.queryObjectList(teacherOpenCourseChatLog); - //查询章节练习配置 - List chapterExerciseList = teacherOpenCourseQuestionSettingDao.createLambdaQuery() - .andEq(TeacherOpenCourseQuestionSetting::getTeacherOpenCourseId, teacherOpenCourseId) - .andEq(TeacherOpenCourseQuestionSetting::getTeacherOpenCourseQuestionSettingType, ResourcesQuestionSnapshotFromTypeEnum.CHAPTER_EXERCISE) - .andEq(TeacherOpenCourseQuestionSetting::getTeacherOpenCourseQuestionSettingStatus, 1).select(); - + //查询章节练习配置,查有题目的,上架的 + TeacherOpenCourseQuestionSettingQuery teacherOpenCourseQuestionSettingQuery = new TeacherOpenCourseQuestionSettingQuery(); + teacherOpenCourseQuestionSettingQuery.setTeacherOpenCourseId(teacherOpenCourseId); + teacherOpenCourseQuestionSettingQuery.setTeacherOpenCourseQuestionSettingType(ResourcesQuestionSnapshotFromTypeEnum.CHAPTER_EXERCISE); + teacherOpenCourseQuestionSettingQuery.setTeacherOpenCourseQuestionSettingStatus(1); + List chapterExerciseList = teacherOpenCourseQuestionSettingDao.getNotEmptyQuestionSetting(teacherOpenCourseQuestionSettingQuery); //查询本课程的所有实操任务 TeacherOpenCourseHandsOn param = new TeacherOpenCourseHandsOn(); @@ -502,13 +504,16 @@ public class TeacherOpenCourseScoreDashboardService extends CoreBaseService examList = teacherOpenCourseQuestionSettingDao.createLambdaQuery() .andEq(TeacherOpenCourseQuestionSetting::getTeacherOpenCourseId, teacherOpenCourseId) .andEq(TeacherOpenCourseQuestionSetting::getTeacherOpenCourseQuestionSettingStatus, 1) - .andEq(TeacherOpenCourseQuestionSetting::getTeacherOpenCourseQuestionSettingType, ResourcesQuestionSnapshotFromTypeEnum.EXAM).select(); + .andEq(TeacherOpenCourseQuestionSetting::getTeacherOpenCourseQuestionSettingType, ResourcesQuestionSnapshotFromTypeEnum.EXAM) + .andEq(TeacherOpenCourseQuestionSetting::getTeacherOpenCourseQuestionSettingPushStatus, GlobalPushStatusEnum.PUSH) + .select(); //查询权重 diff --git a/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseQuestionLogController.java b/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseQuestionLogController.java index 79b67b71..7a32d179 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseQuestionLogController.java +++ b/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseQuestionLogController.java @@ -193,7 +193,7 @@ public class TeacherOpenCourseQuestionLogController extends BaseController { /** - * 教师端-手动批改一些题目的分数 + * 教师端-手动批改一些题目的分数,这里被附件作业评阅调用了 * * @param questionSettingId 题目配置ID * @param studentId 学生ID diff --git a/web/src/main/java/com/ibeetl/jlw/web/query/QuestionLogSummaryQuery.java b/web/src/main/java/com/ibeetl/jlw/web/query/QuestionLogSummaryQuery.java index acaa6ef9..f3498365 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/query/QuestionLogSummaryQuery.java +++ b/web/src/main/java/com/ibeetl/jlw/web/query/QuestionLogSummaryQuery.java @@ -66,8 +66,9 @@ public class QuestionLogSummaryQuery extends PageParam { private String personIdPlural; private String questionLogSummaryStatusPlural; private String orgIdPlural; - private String userIdPlural; + private Long studentId; + private String userIdPlural; private String questionLogSummaryJsonStr;//json格式 private String _given;//指定更新的特定字段,多个逗号隔开 @@ -309,4 +310,12 @@ public class QuestionLogSummaryQuery extends PageParam { public void setSchoolClassIdPlural(String schoolClassIdPlural) { this.schoolClassIdPlural = schoolClassIdPlural; } + + public Long getStudentId() { + return studentId; + } + + public void setStudentId(Long studentId) { + this.studentId = studentId; + } } diff --git a/web/src/main/java/com/ibeetl/jlw/web/query/StudentScoreParam.java b/web/src/main/java/com/ibeetl/jlw/web/query/StudentScoreParam.java index f61a91ae..5a50eb2b 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/query/StudentScoreParam.java +++ b/web/src/main/java/com/ibeetl/jlw/web/query/StudentScoreParam.java @@ -1,6 +1,5 @@ package com.ibeetl.jlw.web.query; -import com.ibeetl.admin.core.web.query.PageParam; import lombok.Data; /** @@ -24,7 +23,7 @@ public class StudentScoreParam extends StudentQuery { private Long classId; /** - * 1:视频 2:ppt 3:理论 4:实操 5:报告 + * 1:视频 2:ppt 3:理论 4:实操 5:报告,All:全部 */ private String type; diff --git a/web/src/main/java/com/ibeetl/jlw/web/query/TeacherOpenCourseQuestionLogQuery.java b/web/src/main/java/com/ibeetl/jlw/web/query/TeacherOpenCourseQuestionLogQuery.java index 17eb82d0..62921fb6 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/query/TeacherOpenCourseQuestionLogQuery.java +++ b/web/src/main/java/com/ibeetl/jlw/web/query/TeacherOpenCourseQuestionLogQuery.java @@ -134,6 +134,10 @@ public class TeacherOpenCourseQuestionLogQuery extends PageParam { private String schoolClassIdPlural; + private Long schoolClassId; + + private String studentOrName; + // 题目配置来源类型 private ResourcesQuestionSnapshotFromTypeEnum questionSettingType; diff --git a/web/src/main/resources/sql/jlw/questionLogSummary.md b/web/src/main/resources/sql/jlw/questionLogSummary.md index d460edd8..9f8ef287 100644 --- a/web/src/main/resources/sql/jlw/questionLogSummary.md +++ b/web/src/main/resources/sql/jlw/questionLogSummary.md @@ -146,6 +146,9 @@ queryByConditionQuery @if(!isEmpty(personId)){ and t.person_id =#personId# @} + @if(!isEmpty(studentId)){ + and t.person_id =#studentId# + @} @if(!isEmpty(personIdPlural)){ and find_in_set(t.person_id,#personIdPlural#) @} diff --git a/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionLog.md b/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionLog.md index 192ff50f..3fba003d 100644 --- a/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionLog.md +++ b/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionLog.md @@ -181,6 +181,8 @@ queryByConditionQuery and qls.person_id =t.student_id @} and qls.question_log_summary_status=1 + order by qls.question_log_summary_add_time desc + limit 1 ) ) @} @@ -327,7 +329,22 @@ studentScoreList LEFT JOIN student ta ON ta.student_id = t.student_id WHERE 1 = 1 - AND ta.student_sn IS NOT NULL + @// AND ta.student_sn IS NOT NULL + @if(!isEmpty(questionSettingType)&&questionSettingType=="HOMEWORK_FILE"){ + @//附件作业不需要查,因为没评阅之前,是没有成绩表数据的,只需要查status=1的数据,逻辑保证了只有一条 + and t.teacher_open_course_question_log_status = 1 + @}else{ + @//不这么写会把多次考试的分数都加起来 + AND find_in_set(t.teacher_open_course_question_log_id ,( + select question_log_ids from (select question_log_ids from question_log_summary qls where qls.question_setting_id = t.teacher_open_course_question_setting_id and qls.person_id = t.student_id and qls.question_log_summary_status=1 order by qls.question_log_summary_add_time desc limit 1) tt + )) + @} + @if(!isEmpty(schoolClassId)){ + and ta.class_id =#schoolClassId# + @} + @if(!isEmpty(studentOrName)){ + and (ta.student_sn like #'%'+studentOrName+'%'# or ta.student_name like #'%'+studentOrName+'%'#) + @} @if(!isEmpty(teacherOpenCourseQuestionLogId)){ and t.teacher_open_course_question_log_id =#teacherOpenCourseQuestionLogId# @} @@ -1107,6 +1124,8 @@ getPageList and qls.person_id =t.student_id @} and qls.question_log_summary_status=1 + order by qls.question_log_summary_add_time desc + limit 1 ) ) @} diff --git a/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionSetting.md b/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionSetting.md index c6327330..981822e3 100644 --- a/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionSetting.md +++ b/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionSetting.md @@ -774,3 +774,93 @@ queryByConditionQueryNotPage @} ORDER BY CONVERT(regexp_replace ( t.teacher_open_course_question_setting_name, '[^0-9]+', '' ),unsigned) asc + + + +getNotEmptyQuestionSetting +=== + * 查询不为空的题目配置 + select + t.* + from teacher_open_course_question_setting t + where 1=1 + @//题目不为空 + and ( SELECT count( 1 ) FROM resources_question_snapshot tb WHERE tb.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id AND tb.question_status = 1 ) > 1 + @if(!isEmpty(teacherOpenCourseQuestionSettingId)){ + and t.teacher_open_course_question_setting_id =#teacherOpenCourseQuestionSettingId# + @} + @if(!isEmpty(teacherOpenCourseQuestionSettingIdPlural)){ + and find_in_set(t.teacher_open_course_question_setting_id,#teacherOpenCourseQuestionSettingIdPlural#) + @} + @if(!isEmpty(teacherOpenCourseId)){ + and t.teacher_open_course_id =#teacherOpenCourseId# + @} + @if(!isEmpty(teacherOpenCourseIdPlural)){ + and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#) + @} + @if(!isEmpty(teacherOpenCourseQuestionSettingSchoolClassIds)){ + and t.teacher_open_course_question_setting_school_class_ids =#teacherOpenCourseQuestionSettingSchoolClassIds# + @} + @if(!isEmpty(teacherOpenCourseQuestionSettingDoCount)){ + and t.teacher_open_course_question_setting_do_count =#teacherOpenCourseQuestionSettingDoCount# + @} + @if(!isEmpty(teacherOpenCourseQuestionSettingQuestionNoOrder)){ + and t.teacher_open_course_question_setting_question_no_order =#teacherOpenCourseQuestionSettingQuestionNoOrder# + @} + @if(!isEmpty(teacherOpenCourseQuestionSettingOptionNoOrder)){ + and t.teacher_open_course_question_setting_option_no_order =#teacherOpenCourseQuestionSettingOptionNoOrder# + @} + @if(!isEmpty(teacherOpenCourseQuestionSettingEndShowQa)){ + and t.teacher_open_course_question_setting_end_show_qa =#teacherOpenCourseQuestionSettingEndShowQa# + @} + @if(!isEmpty(teacherOpenCourseQuestionSettingEndShowTrueFalse)){ + and t.teacher_open_course_question_setting_end_show_true_false =#teacherOpenCourseQuestionSettingEndShowTrueFalse# + @} + @if(!isEmpty(teacherOpenCourseQuestionSettingName)){ + and t.teacher_open_course_question_setting_name =#teacherOpenCourseQuestionSettingName# + @} + @if(!isEmpty(teacherOpenCourseQuestionStartTime)){ + and t.teacher_open_course_question_start_time =#teacherOpenCourseQuestionStartTime# + @} + @if(!isEmpty(teacherOpenCourseQuestionEndTime)){ + and t.teacher_open_course_question_end_time =#teacherOpenCourseQuestionEndTime# + @} + @if(!isEmpty(teacherOpenCourseQuestionSettingType)){ + and t.teacher_open_course_question_setting_type =#teacherOpenCourseQuestionSettingType# + @} + @if(!isEmpty(teacherOpenCourseQuestionSettingFile)){ + and t.teacher_open_course_question_setting_file =#teacherOpenCourseQuestionSettingFile# + @} + @if(!isEmpty(teacherOpenCourseQuestionSettingPushStatus)){ + and t.teacher_open_course_question_setting_push_status =#teacherOpenCourseQuestionSettingPushStatus# + @} + @if(isEmpty(teacherOpenCourseQuestionSettingStatus) && isEmpty(teacherOpenCourseQuestionSettingStatusPlural)){ + and t.teacher_open_course_question_setting_status != 2 + @}else{ + @if(!isEmpty(teacherOpenCourseQuestionSettingStatus)){ + and t.teacher_open_course_question_setting_status =#teacherOpenCourseQuestionSettingStatus# + @}else if(!isEmpty(teacherOpenCourseQuestionSettingStatusPlural)){ + and find_in_set(t.teacher_open_course_question_setting_status,#teacherOpenCourseQuestionSettingStatusPlural#) + @} + @} + @if(!isEmpty(teacherOpenCourseQuestionSettingAddTime)){ + and t.teacher_open_course_question_setting_add_time =#teacherOpenCourseQuestionSettingAddTime# + @} + @if(!isEmpty(teacherOpenCourseQuestionSettingRequire)){ + and t.teacher_open_course_question_setting_require =#teacherOpenCourseQuestionSettingRequire# + @} + @if(!isEmpty(teacherOpenCourseMergeCourseInfoId)){ + and t.teacher_open_course_merge_course_info_id =#teacherOpenCourseMergeCourseInfoId# + @} + @if(!isEmpty(orgId)){ + and t.org_id =#orgId# + @} + @if(!isEmpty(orgIdPlural)){ + and find_in_set(t.org_id,#orgIdPlural#) + @} + @if(!isEmpty(userId)){ + and t.user_id =#userId# + @} + @if(!isEmpty(userIdPlural)){ + and find_in_set(t.user_id,#userIdPlural#) + @}