Merge remote-tracking branch 'origin/beetlsql3-dev' into beetlsql3-dev

beetlsql3-dev
Mlxa0324 2 years ago
commit 8737292f10

@ -121,6 +121,19 @@ public class UserConsoleController {
return view; return view;
} }
/**
*@author
*@data 2022/11/28
*
*/
@GetMapping(MODEL + "/userCenter.do")
@Function("user.query")
public ModelAndView userCenter() {
ModelAndView view = new ModelAndView("/other/userCenter.html");
view.addObject("search", UserQuery.class.getName());
return view;
}
/* Json */ /* Json */
@PostMapping(MODEL + "/delete.json") @PostMapping(MODEL + "/delete.json")

@ -11,6 +11,8 @@ import com.ibeetl.admin.core.annotation.Dict;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.Map;
/* /*
* --PPT * --PPT
@ -37,9 +39,16 @@ public class StudentHandsOnTaskPpt extends BaseEntity{
private Long handsOnTaskId ; private Long handsOnTaskId ;
//PPT地址名称 //PPT观看进度
/**
* [{fileName:"", schedule: "", fileUrl: ""}]
* fileName
* schedule
* fileUrl
*/
private String pptFile ; private String pptFile ;
private List<Map<String, Object>> pptFiles;
//观看得分 //观看得分
@ -211,5 +220,11 @@ public class StudentHandsOnTaskPpt extends BaseEntity{
this.studentId = studentId; this.studentId = studentId;
} }
public List<Map<String, Object>> getPptFiles() {
return pptFiles;
}
public void setPptFiles(List<Map<String, Object>> pptFiles) {
this.pptFiles = pptFiles;
}
} }

@ -11,6 +11,8 @@ import com.ibeetl.admin.core.annotation.Dict;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.Map;
/* /*
* -- * --
@ -37,9 +39,16 @@ public class StudentHandsOnTaskVideo extends BaseEntity{
private Long handsOnTaskId ; private Long handsOnTaskId ;
//视频地址名称 //视频观看进度
/**
* [{fileName:"", schedule: "", fileUrl: ""}]
* fileName
* schedule
* fileUrl
*/
private String videoFile ; private String videoFile ;
private List<Map<String, Object>> videoFiles;
//观看得分 //观看得分
@ -211,5 +220,11 @@ public class StudentHandsOnTaskVideo extends BaseEntity{
this.studentId = studentId; this.studentId = studentId;
} }
public List<Map<String, Object>> getVideoFiles() {
return videoFiles;
}
public void setVideoFiles(List<Map<String, Object>> videoFiles) {
this.videoFiles = videoFiles;
}
} }

@ -2,7 +2,9 @@ package com.ibeetl.jlw.service;
import cn.jlw.util.ToolUtils; import cn.jlw.util.ToolUtils;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.ibeetl.admin.core.entity.CoreUser; import com.ibeetl.admin.core.entity.CoreUser;
import com.ibeetl.admin.core.service.CoreBaseService; import com.ibeetl.admin.core.service.CoreBaseService;
import com.ibeetl.admin.core.util.PlatformException; import com.ibeetl.admin.core.util.PlatformException;
@ -10,9 +12,11 @@ import com.ibeetl.admin.core.util.TimeTool;
import com.ibeetl.admin.core.web.JsonResult; import com.ibeetl.admin.core.web.JsonResult;
import com.ibeetl.admin.core.web.JsonReturnCode; import com.ibeetl.admin.core.web.JsonReturnCode;
import com.ibeetl.jlw.dao.StudentHandsOnTaskPptDao; import com.ibeetl.jlw.dao.StudentHandsOnTaskPptDao;
import com.ibeetl.jlw.entity.FileEntity; import com.ibeetl.jlw.dao.TeacherOpenCourseHandsOnSimulationTasksDao;
import com.ibeetl.jlw.entity.StudentHandsOnTaskPpt; import com.ibeetl.jlw.entity.*;
import com.ibeetl.jlw.web.query.StudentHandsOnTaskPptQuery; import com.ibeetl.jlw.web.query.StudentHandsOnTaskPptQuery;
import com.ibeetl.jlw.web.query.TeacherOpenCourseHandsOnSimulationTasksFileQuery;
import com.ibeetl.jlw.web.query.TeacherOpenCourseHandsOnSimulationTasksQuery;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Row;
@ -43,6 +47,9 @@ import static com.ibeetl.admin.core.util.ExcelUtil.getCellFormatValue;
public class StudentHandsOnTaskPptService extends CoreBaseService<StudentHandsOnTaskPpt>{ public class StudentHandsOnTaskPptService extends CoreBaseService<StudentHandsOnTaskPpt>{
@Autowired private StudentHandsOnTaskPptDao studentHandsOnTaskPptDao; @Autowired private StudentHandsOnTaskPptDao studentHandsOnTaskPptDao;
@Autowired private StudentService studentService;
@Autowired private TeacherOpenCourseHandsOnSimulationTasksDao tasksService;
@Autowired private TeacherOpenCourseHandsOnSimulationTasksFileService fileService;
public PageQuery<StudentHandsOnTaskPpt>queryByCondition(PageQuery query){ public PageQuery<StudentHandsOnTaskPpt>queryByCondition(PageQuery query){
PageQuery ret = studentHandsOnTaskPptDao.queryByCondition(query); PageQuery ret = studentHandsOnTaskPptDao.queryByCondition(query);
@ -322,4 +329,45 @@ public class StudentHandsOnTaskPptService extends CoreBaseService<StudentHandsOn
} }
public JsonResult<StudentHandsOnTaskPpt> getHandsOnTaskkPptByTaskId(Long taskId, CoreUser coreUser) {
//查询登录用的学生id
if (!coreUser.isStudent()) {
return null;
}
Student student = studentService.getByUserId(coreUser.getId());
StudentHandsOnTaskPpt studentHandsOnTaskPpt = this.sqlManager.lambdaQuery(StudentHandsOnTaskPpt.class).andEq(StudentHandsOnTaskPpt::getHandsOnTaskId, taskId)
.andEq(StudentHandsOnTaskPpt::getStudentId, student.getStudentId()).singleSimple();
if (studentHandsOnTaskPpt == null) {
TeacherOpenCourseHandsOnSimulationTasksFileQuery fileQuery = new TeacherOpenCourseHandsOnSimulationTasksFileQuery();
fileQuery.setTaskId(taskId);
//查询视频
List<TeacherOpenCourseHandsOnSimulationTasksFile> videoFile = fileService.getValuesByQueryNotWithPermission(fileQuery);
TeacherOpenCourseHandsOnSimulationTasksQuery tasksQuery = new TeacherOpenCourseHandsOnSimulationTasksQuery();
tasksQuery.setTaskId(taskId);
List<TeacherOpenCourseHandsOnSimulationTasks> tasks = tasksService.getValuesByQueryNotWithPermission(tasksQuery);
TeacherOpenCourseHandsOnSimulationTasks teacherOpenCourseHandsOnSimulationTasks = tasks.get(0);
studentHandsOnTaskPpt.setHandsOnTaskId(teacherOpenCourseHandsOnSimulationTasks.getTaskId());
studentHandsOnTaskPpt.setStudentId(student.getStudentId());
studentHandsOnTaskPpt.setHandsOnId(teacherOpenCourseHandsOnSimulationTasks.getHandsOnId());
studentHandsOnTaskPpt.setTeacherOpenCourseId(teacherOpenCourseHandsOnSimulationTasks.getTeacherOpenCourseId());
studentHandsOnTaskPpt.setCreateTime(new Date());
studentHandsOnTaskPpt.setPptScore(BigDecimal.ZERO);
List<Map<String, Object>> list = new ArrayList<>();
for (TeacherOpenCourseHandsOnSimulationTasksFile file : videoFile) {
Map<String, Object> map = new HashMap<>();
map.put("fileName", file.getFileName());
map.put("schedule", 0);
map.put("fileUrl", file.getFileUrl());
list.add(map);
}
studentHandsOnTaskPpt.setPptFile(JSONArray.toJSONString(list));
studentHandsOnTaskPpt.setPptFiles(list);
}else {
String videoFile = studentHandsOnTaskPpt.getPptFile();
if (StringUtils.isNotEmpty(videoFile)) {
studentHandsOnTaskPpt.setPptFiles(JSONArray.parseObject(videoFile, new TypeReference<List<Map<String,Object>>>(){}));
}
}
return JsonResult.success(studentHandsOnTaskPpt);
}
} }

@ -92,6 +92,11 @@ public class StudentHandsOnTaskReportService extends CoreBaseService<StudentHand
public JsonResult add(StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery){ public JsonResult add(StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery){
String msg = ""; String msg = "";
StudentHandsOnTaskReport studentHandsOnTaskReport = studentHandsOnTaskReportQuery.pojo(); StudentHandsOnTaskReport studentHandsOnTaskReport = studentHandsOnTaskReportQuery.pojo();
Long handsOnTaskId = studentHandsOnTaskReport.getHandsOnTaskId();
StudentHandsOnTaskReport studentHandsOnTaskReport1 = this.sqlManager.lambdaQuery(StudentHandsOnTaskReport.class).andEq(StudentHandsOnTaskReport::getHandsOnTaskId, handsOnTaskId).singleSimple();
if (studentHandsOnTaskReport1 != null) {
deleteById(studentHandsOnTaskReport1.getStudentHandsOnTaskReportId());
}
studentHandsOnTaskReportDao.insert(studentHandsOnTaskReport); studentHandsOnTaskReportDao.insert(studentHandsOnTaskReport);
studentHandsOnTaskReportQuery.setStudentHandsOnTaskReportId(studentHandsOnTaskReport.getStudentHandsOnTaskReportId()); studentHandsOnTaskReportQuery.setStudentHandsOnTaskReportId(studentHandsOnTaskReport.getStudentHandsOnTaskReportId());
JsonResult jsonResult = new JsonResult(); JsonResult jsonResult = new JsonResult();

@ -2,7 +2,9 @@ package com.ibeetl.jlw.service;
import cn.jlw.util.ToolUtils; import cn.jlw.util.ToolUtils;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.ibeetl.admin.core.entity.CoreUser; import com.ibeetl.admin.core.entity.CoreUser;
import com.ibeetl.admin.core.service.CoreBaseService; import com.ibeetl.admin.core.service.CoreBaseService;
import com.ibeetl.admin.core.util.PlatformException; import com.ibeetl.admin.core.util.PlatformException;
@ -10,9 +12,11 @@ import com.ibeetl.admin.core.util.TimeTool;
import com.ibeetl.admin.core.web.JsonResult; import com.ibeetl.admin.core.web.JsonResult;
import com.ibeetl.admin.core.web.JsonReturnCode; import com.ibeetl.admin.core.web.JsonReturnCode;
import com.ibeetl.jlw.dao.StudentHandsOnTaskVideoDao; import com.ibeetl.jlw.dao.StudentHandsOnTaskVideoDao;
import com.ibeetl.jlw.entity.FileEntity; import com.ibeetl.jlw.dao.TeacherOpenCourseHandsOnSimulationTasksDao;
import com.ibeetl.jlw.entity.StudentHandsOnTaskVideo; import com.ibeetl.jlw.entity.*;
import com.ibeetl.jlw.web.query.StudentHandsOnTaskVideoQuery; import com.ibeetl.jlw.web.query.StudentHandsOnTaskVideoQuery;
import com.ibeetl.jlw.web.query.TeacherOpenCourseHandsOnSimulationTasksFileQuery;
import com.ibeetl.jlw.web.query.TeacherOpenCourseHandsOnSimulationTasksQuery;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Row;
@ -43,6 +47,9 @@ import static com.ibeetl.admin.core.util.ExcelUtil.getCellFormatValue;
public class StudentHandsOnTaskVideoService extends CoreBaseService<StudentHandsOnTaskVideo>{ public class StudentHandsOnTaskVideoService extends CoreBaseService<StudentHandsOnTaskVideo>{
@Autowired private StudentHandsOnTaskVideoDao studentHandsOnTaskVideoDao; @Autowired private StudentHandsOnTaskVideoDao studentHandsOnTaskVideoDao;
@Autowired private TeacherOpenCourseHandsOnSimulationTasksFileService fileService;
@Autowired private StudentService studentService;
@Autowired private TeacherOpenCourseHandsOnSimulationTasksDao tasksService;
public PageQuery<StudentHandsOnTaskVideo>queryByCondition(PageQuery query){ public PageQuery<StudentHandsOnTaskVideo>queryByCondition(PageQuery query){
PageQuery ret = studentHandsOnTaskVideoDao.queryByCondition(query); PageQuery ret = studentHandsOnTaskVideoDao.queryByCondition(query);
@ -322,4 +329,45 @@ public class StudentHandsOnTaskVideoService extends CoreBaseService<StudentHands
} }
public JsonResult<StudentHandsOnTaskVideo> getHandsOnTaskkVideoByTaskId(Long taskId, CoreUser coreUser) {
//查询登录用的学生id
if (!coreUser.isStudent()) {
return null;
}
Student student = studentService.getByUserId(coreUser.getId());
StudentHandsOnTaskVideo studentHandsOnTaskVideo = this.sqlManager.lambdaQuery(StudentHandsOnTaskVideo.class).andEq(StudentHandsOnTaskVideo::getHandsOnTaskId, taskId)
.andEq(StudentHandsOnTaskVideo::getStudentId, student.getStudentId()).singleSimple();
if (studentHandsOnTaskVideo == null) {
TeacherOpenCourseHandsOnSimulationTasksFileQuery fileQuery = new TeacherOpenCourseHandsOnSimulationTasksFileQuery();
fileQuery.setTaskId(taskId);
//查询视频
List<TeacherOpenCourseHandsOnSimulationTasksFile> videoFile = fileService.getValuesByQueryNotWithPermission(fileQuery);
TeacherOpenCourseHandsOnSimulationTasksQuery tasksQuery = new TeacherOpenCourseHandsOnSimulationTasksQuery();
tasksQuery.setTaskId(taskId);
List<TeacherOpenCourseHandsOnSimulationTasks> tasks = tasksService.getValuesByQueryNotWithPermission(tasksQuery);
TeacherOpenCourseHandsOnSimulationTasks teacherOpenCourseHandsOnSimulationTasks = tasks.get(0);
studentHandsOnTaskVideo.setHandsOnTaskId(teacherOpenCourseHandsOnSimulationTasks.getTaskId());
studentHandsOnTaskVideo.setStudentId(student.getStudentId());
studentHandsOnTaskVideo.setHandsOnId(teacherOpenCourseHandsOnSimulationTasks.getHandsOnId());
studentHandsOnTaskVideo.setTeacherOpenCourseId(teacherOpenCourseHandsOnSimulationTasks.getTeacherOpenCourseId());
studentHandsOnTaskVideo.setCreateTime(new Date());
studentHandsOnTaskVideo.setVideoScore(BigDecimal.ZERO);
List<Map<String, Object>> list = new ArrayList<>();
for (TeacherOpenCourseHandsOnSimulationTasksFile file : videoFile) {
Map<String, Object> map = new HashMap<>();
map.put("fileName", file.getFileName());
map.put("schedule", 0);
map.put("fileUrl", file.getFileUrl());
list.add(map);
}
studentHandsOnTaskVideo.setVideoFile(JSONArray.toJSONString(list));
studentHandsOnTaskVideo.setVideoFiles(list);
}else {
String videoFile = studentHandsOnTaskVideo.getVideoFile();
if (StringUtils.isNotEmpty(videoFile)) {
studentHandsOnTaskVideo.setVideoFiles(JSONArray.parseObject(videoFile, new TypeReference<List<Map<String,Object>>>(){}));
}
}
return JsonResult.success(studentHandsOnTaskVideo);
}
} }

@ -1,9 +1,12 @@
package com.ibeetl.jlw.service; package com.ibeetl.jlw.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.jlw.Interceptor.SCoreUser;
import cn.jlw.util.ToolUtils; import cn.jlw.util.ToolUtils;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.ibeetl.admin.core.entity.CoreUser;
import com.ibeetl.admin.core.service.CoreBaseService; import com.ibeetl.admin.core.service.CoreBaseService;
import com.ibeetl.admin.core.util.PlatformException; import com.ibeetl.admin.core.util.PlatformException;
import com.ibeetl.admin.core.web.JsonResult; import com.ibeetl.admin.core.web.JsonResult;
@ -271,12 +274,9 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ
public TeacherOpenCourseHandsOnSimulationTasks getInfo (TeacherOpenCourseHandsOnSimulationTasksQuery teacherOpenCourseHandsOnSimulationTasksQuery){ public TeacherOpenCourseHandsOnSimulationTasks getInfo (TeacherOpenCourseHandsOnSimulationTasksQuery teacherOpenCourseHandsOnSimulationTasksQuery){
List<TeacherOpenCourseHandsOnSimulationTasks> list = teacherOpenCourseHandsOnSimulationTasksDao.getValuesByQuery(teacherOpenCourseHandsOnSimulationTasksQuery); List<TeacherOpenCourseHandsOnSimulationTasks> list = teacherOpenCourseHandsOnSimulationTasksDao.getValuesByQuery(teacherOpenCourseHandsOnSimulationTasksQuery);
if(null != list && list.size()>0){ if(null != list && list.size()>0){
for (TeacherOpenCourseHandsOnSimulationTasks teacherOpenCourseHandsOnSimulationTasks : list) {
List<HandsOnTaskProblemVO> objectiveProblem = getObjectiveProblem(teacherOpenCourseHandsOnSimulationTasks.getTaskList(), teacherOpenCourseHandsOnSimulationTasks.getTaskId());
teacherOpenCourseHandsOnSimulationTasks.setHandsOnTaskProblemVo(objectiveProblem);
}
TeacherOpenCourseHandsOnSimulationTasks teacherOpenCourseHandsOnSimulationTasks = list.get(0); TeacherOpenCourseHandsOnSimulationTasks teacherOpenCourseHandsOnSimulationTasks = list.get(0);
List<HandsOnTaskProblemVO> objectiveProblem = getObjectiveProblem(teacherOpenCourseHandsOnSimulationTasks.getTaskList(), teacherOpenCourseHandsOnSimulationTasks.getTaskId());
teacherOpenCourseHandsOnSimulationTasks.setHandsOnTaskProblemVo(objectiveProblem);
Long taskId = teacherOpenCourseHandsOnSimulationTasks.getTaskId(); Long taskId = teacherOpenCourseHandsOnSimulationTasks.getTaskId();
TeacherOpenCourseHandsOnSimulationTasksAssessmentQuery assessmentQuery = new TeacherOpenCourseHandsOnSimulationTasksAssessmentQuery(); TeacherOpenCourseHandsOnSimulationTasksAssessmentQuery assessmentQuery = new TeacherOpenCourseHandsOnSimulationTasksAssessmentQuery();
assessmentQuery.setHandsOnTaskId(taskId); assessmentQuery.setHandsOnTaskId(taskId);
@ -404,4 +404,24 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(@NotNull(message = "开课ID不能为空") Long teacherOpenCourseId) { public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(@NotNull(message = "开课ID不能为空") Long teacherOpenCourseId) {
log.info("需要实现删除操作!"); log.info("需要实现删除操作!");
} }
public JsonResult getTaskList(Long handsOnId, CoreUser coreUser) {
TeacherOpenCourseHandsOnSimulationTasksQuery tasksQuery = new TeacherOpenCourseHandsOnSimulationTasksQuery();
tasksQuery.setHandsOnId(handsOnId);
List<TeacherOpenCourseHandsOnSimulationTasks> handsOnSimulationTasks = getValuesByQueryNotWithPermission(tasksQuery);
if (CollectionUtils.isNotEmpty(handsOnSimulationTasks)) {
List<Long> collect = handsOnSimulationTasks.stream().map(TeacherOpenCourseHandsOnSimulationTasks::getTaskId).collect(Collectors.toList());
TeacherOpenCourseHandsOnSimulationTasksFileQuery fileQuery = new TeacherOpenCourseHandsOnSimulationTasksFileQuery();
fileQuery.setTaskIdPlural(CollectionUtil.join(collect, ","));
List<TeacherOpenCourseHandsOnSimulationTasksFile> tasksFileList = teacherOpenCourseHandsOnSimulationTasksFileService.getValuesByQueryNotWithPermission(fileQuery);
for (TeacherOpenCourseHandsOnSimulationTasks handsOnSimulationTask : handsOnSimulationTasks) {
Long taskId = handsOnSimulationTask.getTaskId();
List<TeacherOpenCourseHandsOnSimulationTasksFile> tasksFiles = tasksFileList.stream().filter(v -> v.getTaskId().equals(taskId)).collect(Collectors.toList());
handsOnSimulationTask.setTeacherOpenCourseHandsOnSimulationTasksFileList(tasksFileList);
}
}
return null;
}
} }

@ -122,6 +122,34 @@ public class StudentClientLinkController{
return view; return view;
} }
/**
*@author
*@data 2022/11/28
*
*/
@GetMapping(MODEL + "/logOnLink.do")
@Function("studentClientLink.query")
@ResponseBody
public ModelAndView logOnLink() {
ModelAndView view = new ModelAndView("/jlw/studentClientLink/logOnLink.html") ;
view.addObject("search", StudentClientLinkQuery.class.getName());
return view;
}
/**
*@author
*@data 2022/11/28
* 广
*/
@GetMapping(MODEL + "/popularizeLink.do")
@Function("studentClientLink.query")
@ResponseBody
public ModelAndView popularizeLink() {
ModelAndView view = new ModelAndView("/jlw/studentClientLink/popularizeLink.html") ;
view.addObject("search", StudentClientLinkQuery.class.getName());
return view;
}
/* 后台接口 */ /* 后台接口 */
@PostMapping(MODEL + "/list.json") @PostMapping(MODEL + "/list.json")

@ -557,4 +557,29 @@ public class StudentHandsOnTaskPptController{
} }
} }
/**
* ppt
* @param taskId id
* @param coreUser
* @return
*/
@GetMapping(API + "/getHandsOnTaskkPptByTaskId")
public JsonResult<StudentHandsOnTaskPpt> getHandsOnTaskkPptByTaskId(Long taskId, @SCoreUser CoreUser coreUser) {
return studentHandsOnTaskPptService.getHandsOnTaskkPptByTaskId(taskId, coreUser);
}
@PostMapping(API + "/add.do")
public JsonResult addDo(@Validated(ValidateConfig.ADD.class) StudentHandsOnTaskPptQuery studentHandsOnTaskPptQuery, BindingResult result,@SCoreUser CoreUser coreUser){
if(result.hasErrors()){
return JsonResult.failMessage(result);
}else{
studentHandsOnTaskPptQuery.setUserId(coreUser.getId());
studentHandsOnTaskPptQuery.setOrgId(coreUser.getOrgId());
return studentHandsOnTaskPptService.add(studentHandsOnTaskPptQuery);
}
}
} }

@ -557,4 +557,31 @@ public class StudentHandsOnTaskVideoController{
} }
} }
/**
*
* @param taskId id
* @param coreUser
* @return
*/
@GetMapping(API+"/getHandsOnTaskkVideoByTaskId")
public JsonResult<StudentHandsOnTaskVideo> getHandsOnTaskkVideoByTaskId(Long taskId, @SCoreUser CoreUser coreUser) {
return studentHandsOnTaskVideoService.getHandsOnTaskkVideoByTaskId(taskId, coreUser);
}
@PostMapping(API + "/editDo")
public JsonResult<String> editDo(@Validated(ValidateConfig.UPDATE.class) StudentHandsOnTaskVideoQuery studentHandsOnTaskVideoQuery, BindingResult result) {
if(result.hasErrors()){
return JsonResult.failMessage(result);
}else {
studentHandsOnTaskVideoQuery.setUserId(null);
studentHandsOnTaskVideoQuery.setOrgId(null);
String msg = studentHandsOnTaskVideoService.edit(studentHandsOnTaskVideoQuery);
if (StringUtils.isBlank(msg)) {
return JsonResult.success();
} else {
return JsonResult.failMessage("更新失败,"+msg);
}
}
}
} }

@ -283,5 +283,13 @@ public class TeacherOpenCourseHandsOnSimulationTasksController{
return teacherOpenCourseHandsOnSimulationTasksService.getStudentScore(studentScoreParam); return teacherOpenCourseHandsOnSimulationTasksService.getStudentScore(studentScoreParam);
} }
/**
* @param handsOnId id
* @return
*/
@GetMapping(API + "/getTaskList")
public JsonResult getTaskList(Long handsOnId,@SCoreUser CoreUser coreUser) {
return teacherOpenCourseHandsOnSimulationTasksService.getTaskList(handsOnId, coreUser);
}
} }

@ -25,7 +25,14 @@ public class StudentHandsOnTaskVideoQuery extends PageParam {
private Long handsOnId; private Long handsOnId;
@Query(name = "课程实操任务ID", display = false) @Query(name = "课程实操任务ID", display = false)
private Long handsOnTaskId; private Long handsOnTaskId;
@Query(name = "视频地址名称", display = false) //视频观看进度
/**
* [{fileName:"", schedule: "", fileUrl: ""}]
* fileName
* schedule
* fileUrl
*/
@Query(name = "视频观看进度", display = false)
private String videoFile; private String videoFile;
@Query(name = "观看得分", display = false) @Query(name = "观看得分", display = false)
private BigDecimal videoScore; private BigDecimal videoScore;

@ -20,6 +20,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
height : Lib.getTableHeight(1), height : Lib.getTableHeight(1),
cellMinWidth: 100, cellMinWidth: 100,
method : 'post', method : 'post',
where:{studentClientLinkType:'LOGINED_NAV'},
url : Common.ctxPath + '/jlw/studentClientLink/list.json' // 数据接口 url : Common.ctxPath + '/jlw/studentClientLink/list.json' // 数据接口
,page : Lib.tablePage // 开启分页 ,page : Lib.tablePage // 开启分页
,toolbar: '#toolbar_studentClientLink' //自定义头部左侧工具栏 ,toolbar: '#toolbar_studentClientLink' //自定义头部左侧工具栏

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

@ -0,0 +1,223 @@
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/studentClientLink/"}){ -->
<layui:searchForm formId="searchForm" searchList="" condition="${search}">
</layui:searchForm>
<table id="studentClientLinkTable" lay-filter="studentClientLinkTable"></table>
<!--#} -->
<script type="text/html" id="toolbar_studentClientLink">
<div class="layui-btn-container">
<div class="layui-btn-group" >
<!--# if(core.searchIsShow(search)) {-->
<layui:accessButton function="studentClientLink.query" id="searchFormSearch" action="search"><i class="layui-icon">&#xe615;</i>搜索</layui:accessButton>
<!--# }-->
<layui:accessButton function="studentClientLink.add" action="add">添加</layui:accessButton>
<layui:accessButton function="studentClientLink.edit" action="edit">修改</layui:accessButton>
<layui:accessButton function="studentClientLink.del" action="del">删除</layui:accessButton>
<!--# if(!isEmpty(search)) {-->
<layui:accessButton function="studentClientLink.query" action="refresh"><i class="layui-icon">&#xe669;</i>刷新</layui:accessButton>
<!--# }-->
</div>
</div>
</script>
<script>
layui.use(['form', 'laydate', 'table'], function(){
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var studentClientLinkTable = null;
var view ={
init:function(){
this.initTable();
this.initSearchForm();
this.initToolBar();
window.dataReload = function(){
Lib.doSearchForm($("#searchForm"),studentClientLinkTable)
}
},
initTable:function(){
var sx_ = localStorage.getItem("studentClientLinkTable_field_"+Common.userInfoId); //筛选值显示、隐藏缓存
if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);}
studentClientLinkTable = table.render({
elem : '#studentClientLinkTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
where:{studentClientLinkType:'LOGIN_PAGE_NAV'},
url : Common.ctxPath + '/jlw/studentClientLink/list.json' // 数据接口
,page : Lib.tablePage // 开启分页
,toolbar: '#toolbar_studentClientLink' //自定义头部左侧工具栏
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏
,limit : 10,
cols : [ [ // 表头
{
type : 'checkbox',
},
// {
// field : 'studentClientLinkId',
// title : '导航栏ID',
// align:"center",
// hideField :false,
// hide:$.isEmpty(sx_['studentClientLinkId'])?false:sx_['studentClientLinkId'],
//
// width : 60,
// },
{
field : 'studentClientLinkOrder',
title : '导航栏排序',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['studentClientLinkOrder'])?false:sx_['studentClientLinkOrder'],
},
{
field : 'studentClientLinkTitle',
title : '导航栏标题',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['studentClientLinkTitle'])?false:sx_['studentClientLinkTitle'],
},
{
field : 'studentClientLinkContent',
title : '导航栏链接',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['studentClientLinkContent'])?false:sx_['studentClientLinkContent'],
},
{
field : 'studentClientLinkTypeText', //数据字典类型为 student_client_link_type
title : '链接类型',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['studentClientLinkTypeText'])?false:sx_['studentClientLinkTypeText'],
},
{
field : 'studentClientLinkImg',
title : '链接图片',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['studentClientLinkImg'])?false:sx_['studentClientLinkImg'],
},
{
field : 'studentClientLinkStatusText', //数据字典类型为 global_status
title : '状态',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['studentClientLinkStatusText'])?false:sx_['studentClientLinkStatusText'],
},
{
field : 'studentClientLinkOpenTypeText', //数据字典类型为 student_client_link_open_type
title : '打开方式',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['studentClientLinkOpenTypeText'])?false:sx_['studentClientLinkOpenTypeText'],
},
{
field : 'createTime',
title : '创建时间',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['createTime'])?false:sx_['createTime'],
},
// {
// field : 'userId',
// title : '用户ID',
// align:"center",
// hideField :false,
// hide:$.isEmpty(sx_['userId'])?false:sx_['userId'],
// },
// {
// field : 'orgId',
// title : '组织ID',
// align:"center",
// hideField :false,
// hide:$.isEmpty(sx_['orgId'])?false:sx_['orgId'],
// }
{
field : 'operation_',title : '操作',align:"center", templet: function (d) {
var htm = '<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</button>';
htm += '<button type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</button>';
return htm;
}
}
] ]
});
table.on('checkbox(studentClientLinkTable)', function(obj){
var studentClientLink = obj.data;
if(obj.checked){
//按钮逻辑Lib.buttonEnable()
}else{
}
})
},
initSearchForm:function(){
Lib.initSearchForm( $("#searchForm"),studentClientLinkTable,form);
},
initToolBar:function(){
toolbar = {
add: function () {
var url = "/jlw/studentClientLink/add.do";
Common.openDlg(url,"StudentClientLink管理>新增");
},
edit: function () {
var data = Common.getOneFromTable(table,"studentClientLinkTable");
if(data==null){
return ;
}
var url = "/jlw/studentClientLink/add.do?studentClientLinkId="+data.studentClientLinkId;
Common.openDlg(url,"StudentClientLink管理>"+data.studentClientLinkId+">编辑");
},
del: function () {
layui.use(['del'], function(){
var delView = layui.del
delView.delBatch();
});
},
search: function () {
Lib.doSearchForm($("#searchForm"), studentClientLinkTable, 1);
view.initToolBar()
},
refresh: function () {
searchForm.reset();
Lib.doSearchForm($("#searchForm"), studentClientLinkTable, 1);
view.initToolBar()
},
}
//触发事件
$('.ext-toolbar').on('click', function() {
var type = $(this).data('type');
toolbar[type] ? toolbar[type].call(this) : '';
});
}, initTableTool: table.on('tool(studentClientLinkTable)', function (obj) {
var data = obj.data;
if (obj.event === 'edit') {
var url = "/jlw/studentClientLink/add.do?studentClientLinkId="+data.studentClientLinkId;
Common.openDlg(url,"StudentClientLink管理>"+data.studentClientLinkId+">编辑");
}else if(obj.event === "del"){
layer.confirm('是否确定删除该信息?', function (index) {
var ret = Common.postAjax("/jlw/studentClientLink/delete.json",{ids:data.studentClientLinkId});
layer.msg(ret.code == 0?"删除成功!":ret.msg, {
offset: ['50%'],
icon: ret.code == 0?1:2,
time: 1500 //2秒关闭如果不配置默认是3秒
},function (){
if(ret.code == 0){
Lib.tableRefresh();
}
});
});
}
})
};
view.init();
});
</script>

@ -0,0 +1,223 @@
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/studentClientLink/"}){ -->
<layui:searchForm formId="searchForm" searchList="" condition="${search}">
</layui:searchForm>
<table id="studentClientLinkTable" lay-filter="studentClientLinkTable"></table>
<!--#} -->
<script type="text/html" id="toolbar_studentClientLink">
<div class="layui-btn-container">
<div class="layui-btn-group" >
<!--# if(core.searchIsShow(search)) {-->
<layui:accessButton function="studentClientLink.query" id="searchFormSearch" action="search"><i class="layui-icon">&#xe615;</i>搜索</layui:accessButton>
<!--# }-->
<layui:accessButton function="studentClientLink.add" action="add">添加</layui:accessButton>
<layui:accessButton function="studentClientLink.edit" action="edit">修改</layui:accessButton>
<layui:accessButton function="studentClientLink.del" action="del">删除</layui:accessButton>
<!--# if(!isEmpty(search)) {-->
<layui:accessButton function="studentClientLink.query" action="refresh"><i class="layui-icon">&#xe669;</i>刷新</layui:accessButton>
<!--# }-->
</div>
</div>
</script>
<script>
layui.use(['form', 'laydate', 'table'], function(){
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var studentClientLinkTable = null;
var view ={
init:function(){
this.initTable();
this.initSearchForm();
this.initToolBar();
window.dataReload = function(){
Lib.doSearchForm($("#searchForm"),studentClientLinkTable)
}
},
initTable:function(){
var sx_ = localStorage.getItem("studentClientLinkTable_field_"+Common.userInfoId); //筛选值显示、隐藏缓存
if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);}
studentClientLinkTable = table.render({
elem : '#studentClientLinkTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
where:{studentClientLinkType:'ADV'},
url : Common.ctxPath + '/jlw/studentClientLink/list.json' // 数据接口
,page : Lib.tablePage // 开启分页
,toolbar: '#toolbar_studentClientLink' //自定义头部左侧工具栏
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏
,limit : 10,
cols : [ [ // 表头
{
type : 'checkbox',
},
// {
// field : 'studentClientLinkId',
// title : '导航栏ID',
// align:"center",
// hideField :false,
// hide:$.isEmpty(sx_['studentClientLinkId'])?false:sx_['studentClientLinkId'],
//
// width : 60,
// },
{
field : 'studentClientLinkOrder',
title : '导航栏排序',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['studentClientLinkOrder'])?false:sx_['studentClientLinkOrder'],
},
{
field : 'studentClientLinkTitle',
title : '导航栏标题',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['studentClientLinkTitle'])?false:sx_['studentClientLinkTitle'],
},
{
field : 'studentClientLinkContent',
title : '导航栏链接',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['studentClientLinkContent'])?false:sx_['studentClientLinkContent'],
},
{
field : 'studentClientLinkTypeText', //数据字典类型为 student_client_link_type
title : '链接类型',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['studentClientLinkTypeText'])?false:sx_['studentClientLinkTypeText'],
},
{
field : 'studentClientLinkImg',
title : '链接图片',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['studentClientLinkImg'])?false:sx_['studentClientLinkImg'],
},
{
field : 'studentClientLinkStatusText', //数据字典类型为 global_status
title : '状态',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['studentClientLinkStatusText'])?false:sx_['studentClientLinkStatusText'],
},
{
field : 'studentClientLinkOpenTypeText', //数据字典类型为 student_client_link_open_type
title : '打开方式',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['studentClientLinkOpenTypeText'])?false:sx_['studentClientLinkOpenTypeText'],
},
{
field : 'createTime',
title : '创建时间',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['createTime'])?false:sx_['createTime'],
},
// {
// field : 'userId',
// title : '用户ID',
// align:"center",
// hideField :false,
// hide:$.isEmpty(sx_['userId'])?false:sx_['userId'],
// },
// {
// field : 'orgId',
// title : '组织ID',
// align:"center",
// hideField :false,
// hide:$.isEmpty(sx_['orgId'])?false:sx_['orgId'],
// }
{
field : 'operation_',title : '操作',align:"center", templet: function (d) {
var htm = '<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</button>';
htm += '<button type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</button>';
return htm;
}
}
] ]
});
table.on('checkbox(studentClientLinkTable)', function(obj){
var studentClientLink = obj.data;
if(obj.checked){
//按钮逻辑Lib.buttonEnable()
}else{
}
})
},
initSearchForm:function(){
Lib.initSearchForm( $("#searchForm"),studentClientLinkTable,form);
},
initToolBar:function(){
toolbar = {
add: function () {
var url = "/jlw/studentClientLink/add.do";
Common.openDlg(url,"StudentClientLink管理>新增");
},
edit: function () {
var data = Common.getOneFromTable(table,"studentClientLinkTable");
if(data==null){
return ;
}
var url = "/jlw/studentClientLink/add.do?studentClientLinkId="+data.studentClientLinkId;
Common.openDlg(url,"StudentClientLink管理>"+data.studentClientLinkId+">编辑");
},
del: function () {
layui.use(['del'], function(){
var delView = layui.del
delView.delBatch();
});
},
search: function () {
Lib.doSearchForm($("#searchForm"), studentClientLinkTable, 1);
view.initToolBar()
},
refresh: function () {
searchForm.reset();
Lib.doSearchForm($("#searchForm"), studentClientLinkTable, 1);
view.initToolBar()
},
}
//触发事件
$('.ext-toolbar').on('click', function() {
var type = $(this).data('type');
toolbar[type] ? toolbar[type].call(this) : '';
});
}, initTableTool: table.on('tool(studentClientLinkTable)', function (obj) {
var data = obj.data;
if (obj.event === 'edit') {
var url = "/jlw/studentClientLink/add.do?studentClientLinkId="+data.studentClientLinkId;
Common.openDlg(url,"StudentClientLink管理>"+data.studentClientLinkId+">编辑");
}else if(obj.event === "del"){
layer.confirm('是否确定删除该信息?', function (index) {
var ret = Common.postAjax("/jlw/studentClientLink/delete.json",{ids:data.studentClientLinkId});
layer.msg(ret.code == 0?"删除成功!":ret.msg, {
offset: ['50%'],
icon: ret.code == 0?1:2,
time: 1500 //2秒关闭如果不配置默认是3秒
},function (){
if(ret.code == 0){
Lib.tableRefresh();
}
});
});
}
})
};
view.init();
});
</script>

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>
Loading…
Cancel
Save