| | |
| | | */ |
| | | @PostMapping(value = "add") |
| | | public Result add(String className, String classNumber, String startTime, String endTime, String subjectId, |
| | | String teacherId) { |
| | | String teacherId,String chargeClassName ) { |
| | | try { |
| | | return classService.insertClass(className, classNumber, DateUtils.convertStringToDate(startTime), |
| | | DateUtils.convertStringToDate(endTime), subjectId, teacherId); |
| | | DateUtils.convertStringToDate(endTime), subjectId, teacherId,chargeClassName); |
| | | |
| | | } catch (ParseException e) { |
| | | log.error(e, e); |
| | |
| | | int count = classService.getClassLstCount(keyword, teacherId, pageType); |
| | | // 转成前端所需字段和结构 |
| | | List<Map<String, Object>> lstResult = QBeanUtils.listBean2ListMap(clsLst, |
| | | CollectionUtils.newStringMap("chargeClassName","chargeClassId","name", "className", "classId", "classId", "classNumber", "classNumber","classTypes","classTypes", |
| | | CollectionUtils.newStringMap("name", "className", "classId", "classId", "classNumber", "classNumber","classTypes","classTypes", |
| | | "studentCount", "studentCount", "createTime", "createTime", "startTime", "startTime", "endTime", |
| | | "endTime", "subjects", "sbjLst")); |
| | | "endTime", "subjects", "sbjLst","chargeClassName","chargeClassName","chargeClassId","chargeClassId")); |
| | | |
| | | // 单独处理课程的字段和结构 |
| | | for (Map<String, Object> item : lstResult) { |
| | |
| | | "studentCount", "studentCount", "createTime", "createTime", "startTime", "startTime", "endTime","endTime","classTypes", |
| | | "classTypes", "subjects", "subjectLst", "needJoinAudit", "needJoinAudit", "needQuitAudit", |
| | | "needQuitAudit", "showAnalysisAfterExer", "showAnalysisAfterExer", "canMultiExer", |
| | | "canMultiExer", "needForum", "needForum", "teacherId", "teacherId"))); |
| | | "canMultiExer", "needForum", "needForum", "teacherId", "teacherId","chargeClassName","chargeClassName"))); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param showAnalysisAfterExer 完成练习后是否显示答案 |
| | | * @param canMultiExer 是否允许重复学习 |
| | | * @param needForum 是否开通论坛 |
| | | * @param chargeClassName 班主任名称 |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "update") |
| | |
| | | @RequestParam(defaultValue = "false") Boolean needQuitAudit, |
| | | @RequestParam(defaultValue = "false") Boolean showAnalysisAfterExer, |
| | | @RequestParam(defaultValue = "false") Boolean canMultiExer, |
| | | @RequestParam(defaultValue = "false") Boolean needForum) { |
| | | @RequestParam(defaultValue = "false") Boolean needForum, |
| | | String chargeClassName) { |
| | | try { |
| | | return classService.updateClass(classId, className, classNumber, DateUtils.convertStringToDate(startTime), |
| | | DateUtils.convertStringToDate(endTime), subjectId, needJoinAudit, needQuitAudit, |
| | | showAnalysisAfterExer, canMultiExer, needForum, teacherId); |
| | | showAnalysisAfterExer, canMultiExer, needForum, teacherId,chargeClassName); |
| | | } catch (ParseException e) { |
| | | log.error(e, e); |
| | | return new Result(false, "日期参数错误"); |