From 158cdf0b79bfcc4ea6b776fc7d0057b43f8fa589 Mon Sep 17 00:00:00 2001 From: maLix Date: Thu, 22 Jun 2023 00:27:51 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E7=8F=AD=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jlw/web/TeacherOpenCourseChatLogController.java | 13 +++++++++++-- .../resources/sql/jlw/teacherOpenCourseChatLog.md | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseChatLogController.java b/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseChatLogController.java index 917dd48f..0eefc1c4 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseChatLogController.java +++ b/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseChatLogController.java @@ -2,7 +2,6 @@ package com.ibeetl.jlw.web; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.date.DateUtil; import cn.hutool.core.lang.Assert; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; @@ -41,9 +40,13 @@ import org.springframework.web.servlet.ModelAndView; import javax.validation.constraints.NotNull; import java.io.IOException; import java.math.BigDecimal; -import java.util.*; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; import java.util.stream.Collectors; +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; @@ -270,6 +273,12 @@ public class TeacherOpenCourseChatLogController extends BaseController { if (!coreUser.isAdmin()) { condition.setOrgId(coreUser.getOrgId()); } + + // 学生身份过滤班级 + if (coreUser.isStudent()) { + condition.setSchoolClassIds(getStudent().getClassId().toString()); + } + PageQuery page = condition.getPageQuery(); // 为空则查询顶级 condition.setTeacherOpenCourseChatLogParentId(ObjectUtil.defaultIfNull(condition.getTeacherOpenCourseChatLogParentId(), 0L)); diff --git a/web/src/main/resources/sql/jlw/teacherOpenCourseChatLog.md b/web/src/main/resources/sql/jlw/teacherOpenCourseChatLog.md index 3b50e37b..f7378be9 100644 --- a/web/src/main/resources/sql/jlw/teacherOpenCourseChatLog.md +++ b/web/src/main/resources/sql/jlw/teacherOpenCourseChatLog.md @@ -33,7 +33,7 @@ queryByCondition and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#) @} @if(!isEmpty(schoolClassIds)){ - and t.school_class_ids =#schoolClassIds# + and find_in_set(t.school_class_ids, #schoolClassIds#) @} @if(!isEmpty(teacherId)){ and t.teacher_id =#teacherId# From 4db8977b4a6b72e8d8c20bc4b362af66665ad9b5 Mon Sep 17 00:00:00 2001 From: maLix Date: Thu, 22 Jun 2023 00:31:09 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E9=A2=98=E7=9B=AE=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E5=AD=A6=E7=94=9F=E8=BA=AB=E4=BB=BD=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E7=8F=AD=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jlw/web/TeacherOpenCourseQuestionSettingController.java | 2 ++ .../resources/sql/jlw/teacherOpenCourseQuestionSetting.md | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseQuestionSettingController.java b/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseQuestionSettingController.java index afe738be..3ff8ae38 100644 --- a/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseQuestionSettingController.java +++ b/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseQuestionSettingController.java @@ -63,6 +63,8 @@ public class TeacherOpenCourseQuestionSettingController { if (coreUser.isStudent()) { condition.setTeacherOpenCourseQuestionSettingPushStatus(GlobalPushStatusEnum.PUSH); condition.setTeacherOpenCourseQuestionSettingStatus(1); + + condition.setTeacherOpenCourseQuestionSettingSchoolClassIds(getStudent().getClassId().toString()); } PageQuery page = condition.getPageQuery(); diff --git a/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionSetting.md b/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionSetting.md index c655e223..f0e495a0 100644 --- a/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionSetting.md +++ b/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionSetting.md @@ -107,7 +107,7 @@ queryByConditionQuery and t.teacher_open_course_question_setting_id =#teacherOpenCourseQuestionSettingId# @} @if(!isEmpty(teacherOpenCourseQuestionSettingIdPlural)){ - and find_in_set(t.teacher_open_course_question_setting_id,#teacherOpenCourseQuestionSettingIdPlural#) + and find_in_set(t.teacher_open_course_question_setting_id, #teacherOpenCourseQuestionSettingIdPlural#) @} @if(!isEmpty(teacherOpenCourseId)){ and t.teacher_open_course_id =#teacherOpenCourseId# @@ -116,7 +116,7 @@ queryByConditionQuery and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#) @} @if(!isEmpty(teacherOpenCourseQuestionSettingSchoolClassIds)){ - and t.teacher_open_course_question_setting_school_class_ids =#teacherOpenCourseQuestionSettingSchoolClassIds# + and find_in_set(t.teacher_open_course_question_setting_school_class_ids, #teacherOpenCourseQuestionSettingSchoolClassIds#) @} @if(!isEmpty(teacherOpenCourseQuestionSettingDoCount)){ and t.teacher_open_course_question_setting_do_count =#teacherOpenCourseQuestionSettingDoCount# From 665e4ae0f13080ad7796f2be53401f638629b081 Mon Sep 17 00:00:00 2001 From: maLix Date: Thu, 22 Jun 2023 02:09:02 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E9=A2=98=E7=9B=AE=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E5=AD=A6=E7=94=9F=E8=BA=AB=E4=BB=BD=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E7=8F=AD=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ibeetl/jlw/service/ResourcesQuestionSnapshotService.java | 1 + web/src/main/resources/sql/jlw/resourcesQuestionSnapshot.md | 3 +++ 2 files changed, 4 insertions(+) diff --git a/web/src/main/java/com/ibeetl/jlw/service/ResourcesQuestionSnapshotService.java b/web/src/main/java/com/ibeetl/jlw/service/ResourcesQuestionSnapshotService.java index 9170c309..93341b6c 100644 --- a/web/src/main/java/com/ibeetl/jlw/service/ResourcesQuestionSnapshotService.java +++ b/web/src/main/java/com/ibeetl/jlw/service/ResourcesQuestionSnapshotService.java @@ -594,6 +594,7 @@ public class ResourcesQuestionSnapshotService extends CoreBaseService questionTestSimpleInfo = resourcesQuestionSnapshotDao.getQuestionTestSimpleInfo(pageQuery); diff --git a/web/src/main/resources/sql/jlw/resourcesQuestionSnapshot.md b/web/src/main/resources/sql/jlw/resourcesQuestionSnapshot.md index 5e729fb5..02cb2948 100644 --- a/web/src/main/resources/sql/jlw/resourcesQuestionSnapshot.md +++ b/web/src/main/resources/sql/jlw/resourcesQuestionSnapshot.md @@ -743,6 +743,9 @@ getQuestionTestSimpleInfo AND t.teacher_open_course_question_setting_status = 1 AND t.teacher_open_course_question_setting_type = #teacherOpenCourseQuestionSettingType# AND t.teacher_open_course_id = #teacherOpenCourseId# + @if(!isEmpty(classIds)){ + and find_in_set(t.teacher_open_course_question_setting_school_class_ids, #classIds#) + @} AND ( select count(distinct(tb.resources_question_snapshot_id)) 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 From 34c040aaf678b1fbb28a6204a2422e84d305f14b Mon Sep 17 00:00:00 2001 From: maLix Date: Thu, 22 Jun 2023 02:16:54 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jlw/entity/TeacherOpenCourseStudentSigninSetting.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/main/java/com/ibeetl/jlw/entity/TeacherOpenCourseStudentSigninSetting.java b/web/src/main/java/com/ibeetl/jlw/entity/TeacherOpenCourseStudentSigninSetting.java index 3e7d76ed..ce6687b8 100644 --- a/web/src/main/java/com/ibeetl/jlw/entity/TeacherOpenCourseStudentSigninSetting.java +++ b/web/src/main/java/com/ibeetl/jlw/entity/TeacherOpenCourseStudentSigninSetting.java @@ -149,7 +149,7 @@ public class TeacherOpenCourseStudentSigninSetting extends BaseEntity{ // 缺勤 schoolClassIds - @FetchSql("select if((#signinStudentTotalCount# - #signinTotalCount#) < 0, 0, (#signinStudentTotalCount# - #signinTotalCount#))") + @FetchSql("select case when #teacherOpenCourseStudentSigninSettingStartStatus# = 'READY' then 0 else if((#signinStudentTotalCount# - #signinTotalCount#) < 0, 0, (#signinStudentTotalCount# - #signinTotalCount#)) end") @UpdateIgnore @InsertIgnore private Integer unsigninCount; From 6b9462afee279b505d633efd8edc7c9b329848cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E4=B8=B9ab?= <1421553879@qq.com> Date: Thu, 22 Jun 2023 03:28:28 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=AE=9E=E6=93=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/static/js/jlw/handsOn/add.js | 2 +- .../resources/static/js/jlw/handsOn/index.js | 2 +- .../js/jlw/teacherOpenCourseHandsOn/edit.js | 86 ++++++++- .../resources/templates/jlw/handsOn/add.html | 2 +- .../jlw/teacherOpenCourseHandsOn/edit.html | 172 +++++++++++++++++- 5 files changed, 250 insertions(+), 14 deletions(-) diff --git a/web/src/main/resources/static/js/jlw/handsOn/add.js b/web/src/main/resources/static/js/jlw/handsOn/add.js index 646f65b3..83ea32ed 100644 --- a/web/src/main/resources/static/js/jlw/handsOn/add.js +++ b/web/src/main/resources/static/js/jlw/handsOn/add.js @@ -114,7 +114,7 @@ layui.define(['form', 'laydate', 'table','laytpl','upload','layedit', 'handsOnAp //选择归属课程 并且根据选择的课程查询章节 resourcesQuestionIdsIsNotNull:查询题目不为空的章节 form.on('select(select_courseInfoIds)', function (obj) { - let sourceType = $("select[name='courseChildNode']").find('option:selected').attr("status"); + let sourceType = $("select[name='courseInfoId']").find('option:selected').attr("status"); let courseInfoType = 2;//courseInfoType(2 章节,3 节) Lib.getCourseInfo($("select[name='courseChildNode']"), obj.value,courseInfoType,sourceType, 1); }); diff --git a/web/src/main/resources/static/js/jlw/handsOn/index.js b/web/src/main/resources/static/js/jlw/handsOn/index.js index 215c4d1b..d46e6ae6 100644 --- a/web/src/main/resources/static/js/jlw/handsOn/index.js +++ b/web/src/main/resources/static/js/jlw/handsOn/index.js @@ -155,7 +155,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) { if (obj.event === 'edit') { var url = "/jlw/handsOn/add.do?handsOnId=" + data.handsOnId; if(data.dataType == 'FACULTY_ADD'){ - url = "/jlw/teacherOpenCourseHandsOn/edit.do?resourcesInfoId=" + data.handsOnId; + url = "/jlw/teacherOpenCourseHandsOn/edit.do?handsOnId=" + data.handsOnId; } Common.openDlg(url, "实操管理>" + data.handsOnName + ">编辑"); } else if (obj.event === "result") { diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourseHandsOn/edit.js b/web/src/main/resources/static/js/jlw/teacherOpenCourseHandsOn/edit.js index fe85dfac..bae5e4fa 100644 --- a/web/src/main/resources/static/js/jlw/teacherOpenCourseHandsOn/edit.js +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseHandsOn/edit.js @@ -1,7 +1,42 @@ -layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnApi'], function(exports) { +layui.define([ 'form', 'laydate', 'table','laytpl','upload','layedit','teacherOpenCourseHandsOnApi'], function(exports) { var form = layui.form; var teacherOpenCourseHandsOnApi = layui.teacherOpenCourseHandsOnApi; var index = layui.index; + var upload = layui.upload; + var layedit = layui.layedit; + var laytpl = layui.laytpl + + layedit.set({ //富文本上传图片 + uploadImage: { + url: Common.ctxPath + "/jlw/file/update.do", + imgUrl:Common.ctxPath + } + }); + var courseInfoParentId = $("select[name='courseInfoId']").val();//课程ID + var sourceType = $("select[name='courseInfoId']").find('option:selected').attr("status"); + var childValue = $("#courseChildNode").val(); + //反显章节下拉框(key,courseInfoParentId,courseInfoType,sourceType,resourcesQuestionIdsIsNotNull) + Lib.getCourseInfo($("select[name='courseChildNode']"),courseInfoParentId,2,sourceType,'',childValue); + form.render(); + + window.loadList = function (){//重新加载实训任务列表 + getListInfo(); + } + var handsOnId = $("input[name='handsOnId']").val(); + var teacherOpenCourseId = $("input[name='teacherOpenCourseId']").val(); + + if(!$.isEmpty(handsOnId)){ + var ret = Common.getAjax("/jlw/handsOn/view.json",{handsOnId:handsOnId}); + if(ret.code == 0){ + layedit.setContent(one,Lib.repLaceltgt(ret.data.applicationIntroduction),false); + }else { + layer.msg(ret.msg, { + offset: ['50%'], + icon: 2, + time: 1500 //2秒关闭(如果不配置,默认是3秒) + }); + } + } var view = { init:function(){ Lib.initGenrealForm($("#updateForm"),form); @@ -23,6 +58,55 @@ layui.define([ 'form', 'laydate', 'table','teacherOpenCourseHandsOnApi'], functi } } + //选择归属课程 并且根据选择的课程查询章节 resourcesQuestionIdsIsNotNull:查询题目不为空的章节 + form.on('select(select_courseInfoIds)', function (obj) { + let sourceType = $("select[name='courseInfoId']").find('option:selected').attr("status"); + let courseInfoType = 2;//courseInfoType(2 章节,3 节) + Lib.getCourseInfo($("select[name='courseChildNode']"), obj.value,courseInfoType,sourceType, 1); + }); + + $(".button_add").click(() => { + handsOnId = $("#updateForm input[name='handsOnId']").val(); + if (!$.isEmpty(handsOnId)){ + var url = "/jlw/handsOnSimulationTasks/add.do?handsOnId="+handsOnId+'&courseInfoId='+teacherOpenCourseId; + Common.openDlg(url); + } +}); + //实训任务编辑 + $(".bj").click(edit_simu) + + function edit_simu(){ + var taskId = $(this).attr("taskid"); + var url = "/jlw/handsOnSimulationTasks/add.do?taskId="+taskId + "&handsOnId="+handsOnId; + Common.openDlg(url,""); + } + //实训任务删除 + $(".sc").click(del_simu) + function del_simu(){ + var taskId = $(this).attr("taskid"); + var ret = Common.postAjax("/jlw/handsOnSimulationTasks/delete.json",{ids:taskId}) + if (ret.code == 0) { + $(this).parent().parent().remove() + } + } + $(".uploader-file-cancel").click(function () { + $(this).parent().parent().remove() + }); + + function getListInfo(){ //获取 + var ret = Common.postAjax("/api/handsOnSimulationTasks/getPageList.do",{handsOnId:$("#updateForm input[name='handsOnId']").val()}) + if (ret.code == 0) { + var getTpl = sc_demo.innerHTML + ,view = document.getElementById('sc_view'); + laytpl(getTpl).render({list:ret.data}, function(html){ + view.innerHTML = html; + $(".bj").unbind(); + $(".sc").unbind(); + $(".bj").click(edit_simu); + $(".sc").click(del_simu); + }); + } + } exports('edit',view); }); \ No newline at end of file diff --git a/web/src/main/resources/templates/jlw/handsOn/add.html b/web/src/main/resources/templates/jlw/handsOn/add.html index ef2bdb04..5ec0d7a3 100644 --- a/web/src/main/resources/templates/jlw/handsOn/add.html +++ b/web/src/main/resources/templates/jlw/handsOn/add.html @@ -225,7 +225,7 @@ - + + + + +
+
+ 返回 + 确定 +
+
+
+ +
+ + + + + + + + + +
+
+
+
+
+ +
+ + +
+
+
+
+ +
+ +
+
+
+
+
+ +
+
+ + +
+
+
+
+
+
+ +
+
+ + +
+ + + + + + + + + + + + + + + + + + +
文件名大小上传进度操作
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
任务顺序任务标题任务类型分值操作
+
+
+
+ + + + + - + +