fix: 班级管理
parent
85b5e9fee9
commit
b0cd9251fd
|
|
@ -0,0 +1,59 @@
|
|||
package org.qinan.cedu.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.qinan.cedu.model.dto.ClassCourseDTO;
|
||||
import org.qinan.cedu.model.query.ClassCoursePageQuery;
|
||||
import org.qinan.cedu.model.vo.ClassCourseVO;
|
||||
import org.qinan.cedu.service.ClassCourseService;
|
||||
import org.qinan.safetyeval.client.dto.PageResponse;
|
||||
import org.qinan.safetyeval.client.dto.SingleResponse;
|
||||
import org.qinan.safetyeval.infrastructure.dataobject.base.Req;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 班级课程
|
||||
*/
|
||||
@Api(tags = "班级课程")
|
||||
@RestController
|
||||
@RequestMapping("/safetyEval/classCourse")
|
||||
public class ClassCourseController {
|
||||
|
||||
@Autowired
|
||||
private ClassCourseService classCourseService;
|
||||
|
||||
@ApiOperation("新增班级课程")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<Boolean> save(@RequestBody ClassCourseDTO dto) {
|
||||
return SingleResponse.success(classCourseService.saveCourse(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("班级课程详情")
|
||||
@GetMapping("/get")
|
||||
public SingleResponse<ClassCourseVO> get(@ApiParam("主键ID") @RequestParam Long id) {
|
||||
return SingleResponse.success(classCourseService.getDetail(id));
|
||||
}
|
||||
|
||||
@ApiOperation("修改班级课程")
|
||||
@PostMapping("/modify")
|
||||
public SingleResponse<Boolean> modify(@RequestBody ClassCourseDTO dto) {
|
||||
return SingleResponse.success(classCourseService.updateCourse(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("删除班级课程")
|
||||
@PostMapping("/delete")
|
||||
public SingleResponse<Void> delete(@ApiParam("主键ID") @RequestBody Req<Long> req) {
|
||||
classCourseService.deleteById(req.getData());
|
||||
return SingleResponse.success();
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询班级课程")
|
||||
@GetMapping("/page")
|
||||
public PageResponse<ClassCourseVO> page(ClassCoursePageQuery query) {
|
||||
IPage<ClassCourseVO> page = classCourseService.pageQuery(query);
|
||||
return PageResponse.of(page.getRecords(), page.getTotal());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package org.qinan.cedu.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.qinan.cedu.model.dto.ClassManagementDTO;
|
||||
import org.qinan.cedu.model.query.ClassManagementPageQuery;
|
||||
import org.qinan.cedu.model.vo.ClassManagementVO;
|
||||
import org.qinan.cedu.service.ClassManagementService;
|
||||
import org.qinan.safetyeval.client.dto.PageResponse;
|
||||
import org.qinan.safetyeval.client.dto.SingleResponse;
|
||||
import org.qinan.safetyeval.infrastructure.dataobject.base.Req;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 班级管理
|
||||
*/
|
||||
@Api(tags = "班级管理")
|
||||
@RestController
|
||||
@RequestMapping("/safetyEval/classManagement")
|
||||
public class ClassManagementController {
|
||||
|
||||
@Autowired
|
||||
private ClassManagementService classManagementService;
|
||||
|
||||
@ApiOperation("新增班级")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<Boolean> save(@RequestBody ClassManagementDTO dto) {
|
||||
return SingleResponse.success(classManagementService.saveClass(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("班级详情")
|
||||
@GetMapping("/get")
|
||||
public SingleResponse<ClassManagementVO> get(@ApiParam("主键ID") @RequestParam Long id) {
|
||||
return SingleResponse.success(classManagementService.getDetail(id));
|
||||
}
|
||||
|
||||
@ApiOperation("修改班级")
|
||||
@PostMapping("/modify")
|
||||
public SingleResponse<Boolean> modify(@RequestBody ClassManagementDTO dto) {
|
||||
return SingleResponse.success(classManagementService.updateClass(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("删除班级")
|
||||
@PostMapping("/delete")
|
||||
public SingleResponse<Void> delete(@ApiParam("主键ID") @RequestBody Req<Long> req) {
|
||||
classManagementService.deleteById(req.getData());
|
||||
return SingleResponse.success();
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询班级")
|
||||
@GetMapping("/page")
|
||||
public PageResponse<ClassManagementVO> page(ClassManagementPageQuery query) {
|
||||
IPage<ClassManagementVO> page = classManagementService.pageQuery(query);
|
||||
return PageResponse.of(page.getRecords(), page.getTotal());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package org.qinan.cedu.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.qinan.cedu.model.dto.ClassStudentDTO;
|
||||
import org.qinan.cedu.model.query.ClassStudentPageQuery;
|
||||
import org.qinan.cedu.model.vo.ClassStudentVO;
|
||||
import org.qinan.cedu.service.ClassStudentService;
|
||||
import org.qinan.safetyeval.client.dto.PageResponse;
|
||||
import org.qinan.safetyeval.client.dto.SingleResponse;
|
||||
import org.qinan.safetyeval.infrastructure.dataobject.base.Req;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 班级学员
|
||||
*/
|
||||
@Api(tags = "班级学员")
|
||||
@RestController
|
||||
@RequestMapping("/safetyEval/classStudent")
|
||||
public class ClassStudentController {
|
||||
|
||||
@Autowired
|
||||
private ClassStudentService classStudentService;
|
||||
|
||||
@ApiOperation("新增班级学员")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<Boolean> save(@RequestBody ClassStudentDTO dto) {
|
||||
return SingleResponse.success(classStudentService.saveStudent(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("班级学员详情")
|
||||
@GetMapping("/get")
|
||||
public SingleResponse<ClassStudentVO> get(@ApiParam("主键ID") @RequestParam Long id) {
|
||||
return SingleResponse.success(classStudentService.getDetail(id));
|
||||
}
|
||||
|
||||
@ApiOperation("修改班级学员")
|
||||
@PostMapping("/modify")
|
||||
public SingleResponse<Boolean> modify(@RequestBody ClassStudentDTO dto) {
|
||||
return SingleResponse.success(classStudentService.updateStudent(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("删除班级学员")
|
||||
@PostMapping("/delete")
|
||||
public SingleResponse<Void> delete(@ApiParam("主键ID") @RequestBody Req<Long> req) {
|
||||
classStudentService.deleteById(req.getData());
|
||||
return SingleResponse.success();
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询班级学员")
|
||||
@GetMapping("/page")
|
||||
public PageResponse<ClassStudentVO> page(ClassStudentPageQuery query) {
|
||||
IPage<ClassStudentVO> page = classStudentService.pageQuery(query);
|
||||
return PageResponse.of(page.getRecords(), page.getTotal());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package org.qinan.cedu.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.qinan.cedu.model.dto.ClassStudentExamRecordDTO;
|
||||
import org.qinan.cedu.model.query.ClassStudentExamRecordPageQuery;
|
||||
import org.qinan.cedu.model.vo.ClassStudentExamRecordVO;
|
||||
import org.qinan.cedu.service.ClassStudentExamRecordService;
|
||||
import org.qinan.safetyeval.client.dto.PageResponse;
|
||||
import org.qinan.safetyeval.client.dto.SingleResponse;
|
||||
import org.qinan.safetyeval.infrastructure.dataobject.base.Req;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 学员考试记录
|
||||
*/
|
||||
@Api(tags = "学员考试记录")
|
||||
@RestController
|
||||
@RequestMapping("/safetyEval/classStudentExamRecord")
|
||||
public class ClassStudentExamRecordController {
|
||||
|
||||
@Autowired
|
||||
private ClassStudentExamRecordService classStudentExamRecordService;
|
||||
|
||||
@ApiOperation("新增学员考试记录")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<Boolean> save(@RequestBody ClassStudentExamRecordDTO dto) {
|
||||
return SingleResponse.success(classStudentExamRecordService.saveRecord(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("学员考试记录详情")
|
||||
@GetMapping("/get")
|
||||
public SingleResponse<ClassStudentExamRecordVO> get(@ApiParam("主键ID") @RequestParam Long id) {
|
||||
return SingleResponse.success(classStudentExamRecordService.getDetail(id));
|
||||
}
|
||||
|
||||
@ApiOperation("修改学员考试记录")
|
||||
@PostMapping("/modify")
|
||||
public SingleResponse<Boolean> modify(@RequestBody ClassStudentExamRecordDTO dto) {
|
||||
return SingleResponse.success(classStudentExamRecordService.updateRecord(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("删除学员考试记录")
|
||||
@PostMapping("/delete")
|
||||
public SingleResponse<Void> delete(@ApiParam("主键ID") @RequestBody Req<Long> req) {
|
||||
classStudentExamRecordService.deleteById(req.getData());
|
||||
return SingleResponse.success();
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询学员考试记录")
|
||||
@GetMapping("/page")
|
||||
public PageResponse<ClassStudentExamRecordVO> page(ClassStudentExamRecordPageQuery query) {
|
||||
IPage<ClassStudentExamRecordVO> page = classStudentExamRecordService.pageQuery(query);
|
||||
return PageResponse.of(page.getRecords(), page.getTotal());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package org.qinan.cedu.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.qinan.cedu.model.dto.ClassStudentLearningRecordDTO;
|
||||
import org.qinan.cedu.model.query.ClassStudentLearningRecordPageQuery;
|
||||
import org.qinan.cedu.model.vo.ClassStudentLearningRecordVO;
|
||||
import org.qinan.cedu.service.ClassStudentLearningRecordService;
|
||||
import org.qinan.safetyeval.client.dto.PageResponse;
|
||||
import org.qinan.safetyeval.client.dto.SingleResponse;
|
||||
import org.qinan.safetyeval.infrastructure.dataobject.base.Req;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 学员学习记录
|
||||
*/
|
||||
@Api(tags = "学员学习记录")
|
||||
@RestController
|
||||
@RequestMapping("/safetyEval/classStudentLearningRecord")
|
||||
public class ClassStudentLearningRecordController {
|
||||
|
||||
@Autowired
|
||||
private ClassStudentLearningRecordService classStudentLearningRecordService;
|
||||
|
||||
@ApiOperation("新增学员学习记录")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<Boolean> save(@RequestBody ClassStudentLearningRecordDTO dto) {
|
||||
return SingleResponse.success(classStudentLearningRecordService.saveRecord(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("学员学习记录详情")
|
||||
@GetMapping("/get")
|
||||
public SingleResponse<ClassStudentLearningRecordVO> get(@ApiParam("主键ID") @RequestParam Long id) {
|
||||
return SingleResponse.success(classStudentLearningRecordService.getDetail(id));
|
||||
}
|
||||
|
||||
@ApiOperation("修改学员学习记录")
|
||||
@PostMapping("/modify")
|
||||
public SingleResponse<Boolean> modify(@RequestBody ClassStudentLearningRecordDTO dto) {
|
||||
return SingleResponse.success(classStudentLearningRecordService.updateRecord(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("删除学员学习记录")
|
||||
@PostMapping("/delete")
|
||||
public SingleResponse<Void> delete(@ApiParam("主键ID") @RequestBody Req<Long> req) {
|
||||
classStudentLearningRecordService.deleteById(req.getData());
|
||||
return SingleResponse.success();
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询学员学习记录")
|
||||
@GetMapping("/page")
|
||||
public PageResponse<ClassStudentLearningRecordVO> page(ClassStudentLearningRecordPageQuery query) {
|
||||
IPage<ClassStudentLearningRecordVO> page = classStudentLearningRecordService.pageQuery(query);
|
||||
return PageResponse.of(page.getRecords(), page.getTotal());
|
||||
}
|
||||
}
|
||||
|
|
@ -43,6 +43,12 @@ public class CourseManagementController {
|
|||
return SingleResponse.success(courseManagementService.updateCourse(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("修改状态")
|
||||
@PostMapping("/modifyStatus")
|
||||
public SingleResponse<Boolean> modifyStatus(@RequestBody CourseManagementDTO dto) {
|
||||
return SingleResponse.success(courseManagementService.modifyStatus(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("删除课程")
|
||||
@PostMapping("/delete")
|
||||
public SingleResponse<Void> delete(@ApiParam("主键ID") @RequestBody Req<Long> req) {
|
||||
|
|
|
|||
|
|
@ -43,6 +43,12 @@ public class CoursewareManagementController {
|
|||
return SingleResponse.success(coursewareManagementService.updateCourseware(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("修改状态")
|
||||
@PostMapping("/modifyStatus")
|
||||
public SingleResponse<Boolean> modifyStatus(@RequestBody CoursewareManagementDTO dto) {
|
||||
return SingleResponse.success(coursewareManagementService.modifyStatus(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("删除课件")
|
||||
@PostMapping("/delete")
|
||||
public SingleResponse<Void> delete(@ApiParam("主键ID") @RequestBody Req<Long> req) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
package org.qinan.cedu.convertor;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.qinan.cedu.model.dto.ClassCourseDTO;
|
||||
import org.qinan.cedu.model.entity.ClassCourseDO;
|
||||
import org.qinan.cedu.model.vo.ClassCourseVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface ClassCourseConvertor {
|
||||
|
||||
ClassCourseDO convertDtoToE(ClassCourseDTO dto);
|
||||
|
||||
ClassCourseVO convertEToVo(ClassCourseDO entity);
|
||||
|
||||
List<ClassCourseDO> convertDtoListToEList(List<ClassCourseDTO> list);
|
||||
|
||||
List<ClassCourseVO> convertEListToVoList(List<ClassCourseDO> list);
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package org.qinan.cedu.convertor;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.qinan.cedu.model.dto.ClassManagementDTO;
|
||||
import org.qinan.cedu.model.entity.ClassManagementDO;
|
||||
import org.qinan.cedu.model.vo.ClassManagementVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface ClassManagementConvertor {
|
||||
|
||||
ClassManagementDO convertDtoToE(ClassManagementDTO dto);
|
||||
|
||||
ClassManagementVO convertEToVo(ClassManagementDO entity);
|
||||
|
||||
List<ClassManagementDO> convertDtoListToEList(List<ClassManagementDTO> list);
|
||||
|
||||
List<ClassManagementVO> convertEListToVoList(List<ClassManagementDO> list);
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package org.qinan.cedu.convertor;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.qinan.cedu.model.dto.ClassStudentDTO;
|
||||
import org.qinan.cedu.model.entity.ClassStudentDO;
|
||||
import org.qinan.cedu.model.vo.ClassStudentVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface ClassStudentConvertor {
|
||||
|
||||
ClassStudentDO convertDtoToE(ClassStudentDTO dto);
|
||||
|
||||
ClassStudentVO convertEToVo(ClassStudentDO entity);
|
||||
|
||||
List<ClassStudentDO> convertDtoListToEList(List<ClassStudentDTO> list);
|
||||
|
||||
List<ClassStudentVO> convertEListToVoList(List<ClassStudentDO> list);
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package org.qinan.cedu.convertor;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.qinan.cedu.model.dto.ClassStudentExamRecordDTO;
|
||||
import org.qinan.cedu.model.entity.ClassStudentExamRecordDO;
|
||||
import org.qinan.cedu.model.vo.ClassStudentExamRecordVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface ClassStudentExamRecordConvertor {
|
||||
|
||||
ClassStudentExamRecordDO convertDtoToE(ClassStudentExamRecordDTO dto);
|
||||
|
||||
ClassStudentExamRecordVO convertEToVo(ClassStudentExamRecordDO entity);
|
||||
|
||||
List<ClassStudentExamRecordDO> convertDtoListToEList(List<ClassStudentExamRecordDTO> list);
|
||||
|
||||
List<ClassStudentExamRecordVO> convertEListToVoList(List<ClassStudentExamRecordDO> list);
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package org.qinan.cedu.convertor;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.qinan.cedu.model.dto.ClassStudentLearningRecordDTO;
|
||||
import org.qinan.cedu.model.entity.ClassStudentLearningRecordDO;
|
||||
import org.qinan.cedu.model.vo.ClassStudentLearningRecordVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface ClassStudentLearningRecordConvertor {
|
||||
|
||||
ClassStudentLearningRecordDO convertDtoToE(ClassStudentLearningRecordDTO dto);
|
||||
|
||||
ClassStudentLearningRecordVO convertEToVo(ClassStudentLearningRecordDO entity);
|
||||
|
||||
List<ClassStudentLearningRecordDO> convertDtoListToEList(List<ClassStudentLearningRecordDTO> list);
|
||||
|
||||
List<ClassStudentLearningRecordVO> convertEListToVoList(List<ClassStudentLearningRecordDO> list);
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package org.qinan.cedu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.qinan.cedu.model.entity.ClassCourseDO;
|
||||
|
||||
/**
|
||||
* 班级课程 Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface ClassCourseMapper extends BaseMapper<ClassCourseDO> {
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package org.qinan.cedu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.qinan.cedu.model.entity.ClassManagementDO;
|
||||
|
||||
/**
|
||||
* 班级管理 Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface ClassManagementMapper extends BaseMapper<ClassManagementDO> {
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package org.qinan.cedu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.qinan.cedu.model.entity.ClassStudentExamRecordDO;
|
||||
|
||||
/**
|
||||
* 学员考试记录 Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface ClassStudentExamRecordMapper extends BaseMapper<ClassStudentExamRecordDO> {
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package org.qinan.cedu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.qinan.cedu.model.entity.ClassStudentLearningRecordDO;
|
||||
|
||||
/**
|
||||
* 学员学习记录 Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface ClassStudentLearningRecordMapper extends BaseMapper<ClassStudentLearningRecordDO> {
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package org.qinan.cedu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.qinan.cedu.model.entity.ClassStudentDO;
|
||||
|
||||
/**
|
||||
* 班级学员 Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface ClassStudentMapper extends BaseMapper<ClassStudentDO> {
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package org.qinan.cedu.model.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 班级课程
|
||||
* @TableName class_course
|
||||
*/
|
||||
@Data
|
||||
public class ClassCourseDTO {
|
||||
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("所属班级ID")
|
||||
private Long classId;
|
||||
|
||||
@ApiModelProperty("课程名称")
|
||||
private String courseName;
|
||||
|
||||
@ApiModelProperty("课程id")
|
||||
private Long courseId;
|
||||
|
||||
@ApiModelProperty("要求完成总学时(小时)")
|
||||
private BigDecimal requiredTotalHours;
|
||||
|
||||
@ApiModelProperty("视频累计时长(小时)")
|
||||
private BigDecimal videoDuration;
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package org.qinan.cedu.model.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 班级管理
|
||||
* @TableName class_management
|
||||
*/
|
||||
@Data
|
||||
public class ClassManagementDTO {
|
||||
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("班级编码")
|
||||
private String classCode;
|
||||
|
||||
@ApiModelProperty("班级名称")
|
||||
private String className;
|
||||
|
||||
@ApiModelProperty("培训类型")
|
||||
private String trainingType;
|
||||
|
||||
@ApiModelProperty("参训单位类型(1本企业2相关方)")
|
||||
private Integer unitType;
|
||||
|
||||
@ApiModelProperty("参训单位名称")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty("记录人员")
|
||||
private String recorder;
|
||||
|
||||
@ApiModelProperty("考核人员")
|
||||
private String assessor;
|
||||
|
||||
@ApiModelProperty("安全管理部门负责人")
|
||||
private String safetyManager;
|
||||
|
||||
@ApiModelProperty("培训开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startDate;
|
||||
|
||||
@ApiModelProperty("培训结束日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
@ApiModelProperty("是否开启考试(0-否,1-是)")
|
||||
private Integer openExam;
|
||||
|
||||
@ApiModelProperty("考试前人脸识别(0-否,1-是)")
|
||||
private Integer examFaceRecognition;
|
||||
|
||||
@ApiModelProperty("考试次数")
|
||||
private Integer examCount;
|
||||
|
||||
@ApiModelProperty("是否人脸识别(0-否,1-是)")
|
||||
private Integer faceRecognition;
|
||||
|
||||
@ApiModelProperty("人脸识别时间(分钟)")
|
||||
private Integer faceRecognitionTime;
|
||||
|
||||
@ApiModelProperty("是否打乱试题顺序(0-否,1-是)")
|
||||
private Integer shuffleQuestions;
|
||||
|
||||
@ApiModelProperty("班级状态:0-未申请,1-待开班,2-培训中,3-培训结束")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("延期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime delayTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package org.qinan.cedu.model.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 班级学员
|
||||
* @TableName class_student
|
||||
*/
|
||||
@Data
|
||||
public class ClassStudentDTO {
|
||||
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("关联班级ID")
|
||||
private Long classId;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String studentName;
|
||||
|
||||
@ApiModelProperty("参训单位")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty("部门")
|
||||
private String department;
|
||||
|
||||
@ApiModelProperty("手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("档案编号")
|
||||
private String fileNumber;
|
||||
|
||||
@ApiModelProperty("人脸认证(0-未认证,1-已认证)")
|
||||
private Integer faceAuth;
|
||||
|
||||
@ApiModelProperty("要求学时(小时)")
|
||||
private BigDecimal requiredHours;
|
||||
|
||||
@ApiModelProperty("已完成学时(小时)")
|
||||
private BigDecimal completedHours;
|
||||
|
||||
@ApiModelProperty("学习状态:0-未学习,1-学习中,2-已学完,3-已完成")
|
||||
private Integer studyStatus;
|
||||
|
||||
@ApiModelProperty("考试状态:0-不考试,1-待考试,2-考试未通过,3-考试通过,4-未参加")
|
||||
private Integer examStatus;
|
||||
|
||||
@ApiModelProperty("入班时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime entryTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package org.qinan.cedu.model.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学员考试记录
|
||||
* @TableName class_student_exam_record
|
||||
*/
|
||||
@Data
|
||||
public class ClassStudentExamRecordDTO {
|
||||
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("学员ID")
|
||||
private Long studentId;
|
||||
|
||||
@ApiModelProperty("学员名称")
|
||||
private String studentName;
|
||||
|
||||
@ApiModelProperty("所属班级ID")
|
||||
private Long classId;
|
||||
|
||||
@ApiModelProperty("试卷名称")
|
||||
private String examName;
|
||||
|
||||
@ApiModelProperty("试卷id")
|
||||
private Long examId;
|
||||
|
||||
@ApiModelProperty("得分")
|
||||
private BigDecimal score;
|
||||
|
||||
@ApiModelProperty("是否通过(0-未通过,1-通过)")
|
||||
private Integer passed;
|
||||
|
||||
@ApiModelProperty("错误题数")
|
||||
private Integer wrongCount;
|
||||
|
||||
@ApiModelProperty("正确率(百分比)")
|
||||
private BigDecimal accuracy;
|
||||
|
||||
@ApiModelProperty("考试开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@ApiModelProperty("考试结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package org.qinan.cedu.model.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学员学习记录(节点级)
|
||||
* @TableName class_student_learning_record
|
||||
*/
|
||||
@Data
|
||||
public class ClassStudentLearningRecordDTO {
|
||||
|
||||
@ApiModelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("学员ID")
|
||||
private Long studentId;
|
||||
|
||||
@ApiModelProperty("所属班级ID")
|
||||
private Long classId;
|
||||
|
||||
@ApiModelProperty("课程ID")
|
||||
private Long courseId;
|
||||
|
||||
@ApiModelProperty("课程名称")
|
||||
private String courseName;
|
||||
|
||||
@ApiModelProperty("小节点名称")
|
||||
private String coursewareName;
|
||||
|
||||
@ApiModelProperty("学习状态:0-未学习,1-学习中,2-已完成")
|
||||
private Integer studyStatus;
|
||||
|
||||
@ApiModelProperty("学习情况")
|
||||
private String learningProgress;
|
||||
|
||||
@ApiModelProperty("开始学习时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@ApiModelProperty("完成时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@ApiModelProperty("最近观看时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime lastWatchTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package org.qinan.cedu.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 班级课程
|
||||
* @TableName class_course
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("class_course")
|
||||
@Data
|
||||
public class ClassCourseDO extends BaseEntity {
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
@TableField("class_id")
|
||||
private Long classId;
|
||||
|
||||
@TableField("course_name")
|
||||
private String courseName;
|
||||
|
||||
@TableField("course_id")
|
||||
private Long courseId;
|
||||
|
||||
@TableField("required_total_hours")
|
||||
private BigDecimal requiredTotalHours;
|
||||
|
||||
@TableField("video_duration")
|
||||
private BigDecimal videoDuration;
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package org.qinan.cedu.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 班级管理
|
||||
* @TableName class_management
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("class_management")
|
||||
@Data
|
||||
public class ClassManagementDO extends BaseEntity {
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
@TableField("class_code")
|
||||
private String classCode;
|
||||
|
||||
@TableField("class_name")
|
||||
private String className;
|
||||
|
||||
@TableField("training_type")
|
||||
private String trainingType;
|
||||
|
||||
@TableField("unit_type")
|
||||
private Integer unitType;
|
||||
|
||||
@TableField("unit_name")
|
||||
private String unitName;
|
||||
|
||||
@TableField("recorder")
|
||||
private String recorder;
|
||||
|
||||
@TableField("assessor")
|
||||
private String assessor;
|
||||
|
||||
@TableField("safety_manager")
|
||||
private String safetyManager;
|
||||
|
||||
@TableField("start_date")
|
||||
private LocalDateTime startDate;
|
||||
|
||||
@TableField("end_date")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
@TableField("open_exam")
|
||||
private Integer openExam;
|
||||
|
||||
@TableField("exam_face_recognition")
|
||||
private Integer examFaceRecognition;
|
||||
|
||||
@TableField("exam_count")
|
||||
private Integer examCount;
|
||||
|
||||
@TableField("face_recognition")
|
||||
private Integer faceRecognition;
|
||||
|
||||
@TableField("face_recognition_time")
|
||||
private Integer faceRecognitionTime;
|
||||
|
||||
@TableField("shuffle_questions")
|
||||
private Integer shuffleQuestions;
|
||||
|
||||
/**
|
||||
* 班级状态:0-未申请,1-待开班,2-培训中,3-培训结束
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
@TableField("delay_time")
|
||||
private LocalDateTime delayTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package org.qinan.cedu.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 班级学员
|
||||
* @TableName class_student
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("class_student")
|
||||
@Data
|
||||
public class ClassStudentDO extends BaseEntity {
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
@TableField("class_id")
|
||||
private Long classId;
|
||||
|
||||
@TableField("student_name")
|
||||
private String studentName;
|
||||
|
||||
@TableField("unit_name")
|
||||
private String unitName;
|
||||
|
||||
@TableField("department")
|
||||
private String department;
|
||||
|
||||
@TableField("phone")
|
||||
private String phone;
|
||||
|
||||
@TableField("file_number")
|
||||
private String fileNumber;
|
||||
|
||||
@TableField("face_auth")
|
||||
private Integer faceAuth;
|
||||
|
||||
@TableField("required_hours")
|
||||
private BigDecimal requiredHours;
|
||||
|
||||
@TableField("completed_hours")
|
||||
private BigDecimal completedHours;
|
||||
|
||||
/**
|
||||
* 学习状态:0-未学习,1-学习中,2-已学完,3-已完成
|
||||
*/
|
||||
@TableField("study_status")
|
||||
private Integer studyStatus;
|
||||
|
||||
/**
|
||||
* 考试状态:0-不考试,1-待考试,2-考试未通过,3-考试通过,4-未参加
|
||||
*/
|
||||
@TableField("exam_status")
|
||||
private Integer examStatus;
|
||||
|
||||
@TableField("entry_time")
|
||||
private LocalDateTime entryTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package org.qinan.cedu.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学员考试记录
|
||||
* @TableName class_student_exam_record
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("class_student_exam_record")
|
||||
@Data
|
||||
public class ClassStudentExamRecordDO extends BaseEntity {
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
@TableField("student_id")
|
||||
private Long studentId;
|
||||
|
||||
@TableField("student_name")
|
||||
private String studentName;
|
||||
|
||||
@TableField("class_id")
|
||||
private Long classId;
|
||||
|
||||
@TableField("exam_name")
|
||||
private String examName;
|
||||
|
||||
@TableField("exam_id")
|
||||
private Long examId;
|
||||
|
||||
@TableField("score")
|
||||
private BigDecimal score;
|
||||
|
||||
@TableField("passed")
|
||||
private Integer passed;
|
||||
|
||||
@TableField("wrong_count")
|
||||
private Integer wrongCount;
|
||||
|
||||
@TableField("accuracy")
|
||||
private BigDecimal accuracy;
|
||||
|
||||
@TableField("start_time")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@TableField("end_time")
|
||||
private LocalDateTime endTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package org.qinan.cedu.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学员学习记录(节点级)
|
||||
* @TableName class_student_learning_record
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("class_student_learning_record")
|
||||
@Data
|
||||
public class ClassStudentLearningRecordDO extends BaseEntity {
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
@TableField("student_id")
|
||||
private Long studentId;
|
||||
|
||||
@TableField("class_id")
|
||||
private Long classId;
|
||||
|
||||
@TableField("course_id")
|
||||
private Long courseId;
|
||||
|
||||
@TableField("course_name")
|
||||
private String courseName;
|
||||
|
||||
@TableField("courseware_name")
|
||||
private String coursewareName;
|
||||
|
||||
/**
|
||||
* 学习状态:0-未学习,1-学习中,2-已完成
|
||||
*/
|
||||
@TableField("study_status")
|
||||
private Integer studyStatus;
|
||||
|
||||
@TableField("learning_progress")
|
||||
private String learningProgress;
|
||||
|
||||
@TableField("start_time")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@TableField("end_time")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@TableField("last_watch_time")
|
||||
private LocalDateTime lastWatchTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package org.qinan.cedu.model.query;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 班级课程分页查询
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ClassCoursePageQuery extends BasePageQuery {
|
||||
|
||||
@ApiModelProperty("所属班级ID")
|
||||
private Long classId;
|
||||
|
||||
@ApiModelProperty("课程名称")
|
||||
private String courseName;
|
||||
|
||||
@ApiModelProperty("课程id")
|
||||
private Long courseId;
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package org.qinan.cedu.model.query;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 班级分页查询
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ClassManagementPageQuery extends BasePageQuery {
|
||||
|
||||
@ApiModelProperty("班级编码")
|
||||
private String classCode;
|
||||
|
||||
@ApiModelProperty("班级名称")
|
||||
private String className;
|
||||
|
||||
@ApiModelProperty("培训类型")
|
||||
private String trainingType;
|
||||
|
||||
@ApiModelProperty("班级状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("培训开始时间起")
|
||||
private LocalDateTime startDateBegin;
|
||||
|
||||
@ApiModelProperty("培训结束时间止")
|
||||
private LocalDateTime endDateEnd;
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package org.qinan.cedu.model.query;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 学员考试记录分页查询
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ClassStudentExamRecordPageQuery extends BasePageQuery {
|
||||
|
||||
@ApiModelProperty("所属班级ID")
|
||||
private Long classId;
|
||||
|
||||
@ApiModelProperty("学员ID")
|
||||
private Long studentId;
|
||||
|
||||
@ApiModelProperty("试卷id")
|
||||
private Long examId;
|
||||
|
||||
@ApiModelProperty("是否通过(0-未通过,1-通过)")
|
||||
private Integer passed;
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package org.qinan.cedu.model.query;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 学员学习记录分页查询
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ClassStudentLearningRecordPageQuery extends BasePageQuery {
|
||||
|
||||
@ApiModelProperty("所属班级ID")
|
||||
private Long classId;
|
||||
|
||||
@ApiModelProperty("学员ID")
|
||||
private Long studentId;
|
||||
|
||||
@ApiModelProperty("课程ID")
|
||||
private Long courseId;
|
||||
|
||||
@ApiModelProperty("学习状态")
|
||||
private Integer studyStatus;
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package org.qinan.cedu.model.query;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 班级学员分页查询
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ClassStudentPageQuery extends BasePageQuery {
|
||||
|
||||
@ApiModelProperty("关联班级ID")
|
||||
private Long classId;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String studentName;
|
||||
|
||||
@ApiModelProperty("手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("学习状态")
|
||||
private Integer studyStatus;
|
||||
|
||||
@ApiModelProperty("考试状态")
|
||||
private Integer examStatus;
|
||||
}
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
package org.qinan.cedu.model.dto;
|
||||
package org.qinan.cedu.model.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.qinan.cedu.enums.DeleteEnum;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
|
@ -34,9 +36,13 @@ public class BaseVO implements Serializable {
|
|||
private Integer version;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty("修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty("创建人id")
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.qinan.cedu.model.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 班级课程
|
||||
* @TableName class_course
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ClassCourseVO extends BaseVO {
|
||||
|
||||
@ApiModelProperty("所属班级ID")
|
||||
private Long classId;
|
||||
|
||||
@ApiModelProperty("课程名称")
|
||||
private String courseName;
|
||||
|
||||
@ApiModelProperty("课程id")
|
||||
private Long courseId;
|
||||
|
||||
@ApiModelProperty("要求完成总学时(小时)")
|
||||
private BigDecimal requiredTotalHours;
|
||||
|
||||
@ApiModelProperty("视频累计时长(小时)")
|
||||
private BigDecimal videoDuration;
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package org.qinan.cedu.model.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 班级管理
|
||||
* @TableName class_management
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ClassManagementVO extends BaseVO {
|
||||
|
||||
@ApiModelProperty("班级编码")
|
||||
private String classCode;
|
||||
|
||||
@ApiModelProperty("班级名称")
|
||||
private String className;
|
||||
|
||||
@ApiModelProperty("培训类型")
|
||||
private String trainingType;
|
||||
|
||||
@ApiModelProperty("参训单位类型(1本企业2相关方)")
|
||||
private Integer unitType;
|
||||
|
||||
@ApiModelProperty("参训单位名称")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty("记录人员")
|
||||
private String recorder;
|
||||
|
||||
@ApiModelProperty("考核人员")
|
||||
private String assessor;
|
||||
|
||||
@ApiModelProperty("安全管理部门负责人")
|
||||
private String safetyManager;
|
||||
|
||||
@ApiModelProperty("培训开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startDate;
|
||||
|
||||
@ApiModelProperty("培训结束日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
@ApiModelProperty("是否开启考试(0-否,1-是)")
|
||||
private Integer openExam;
|
||||
|
||||
@ApiModelProperty("考试前人脸识别(0-否,1-是)")
|
||||
private Integer examFaceRecognition;
|
||||
|
||||
@ApiModelProperty("考试次数")
|
||||
private Integer examCount;
|
||||
|
||||
@ApiModelProperty("是否人脸识别(0-否,1-是)")
|
||||
private Integer faceRecognition;
|
||||
|
||||
@ApiModelProperty("人脸识别时间(分钟)")
|
||||
private Integer faceRecognitionTime;
|
||||
|
||||
@ApiModelProperty("是否打乱试题顺序(0-否,1-是)")
|
||||
private Integer shuffleQuestions;
|
||||
|
||||
@ApiModelProperty("班级状态:0-未申请,1-待开班,2-培训中,3-培训结束")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("延期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime delayTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package org.qinan.cedu.model.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学员考试记录
|
||||
* @TableName class_student_exam_record
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ClassStudentExamRecordVO extends BaseVO {
|
||||
|
||||
@ApiModelProperty("学员ID")
|
||||
private Long studentId;
|
||||
|
||||
@ApiModelProperty("学员名称")
|
||||
private String studentName;
|
||||
|
||||
@ApiModelProperty("所属班级ID")
|
||||
private Long classId;
|
||||
|
||||
@ApiModelProperty("试卷名称")
|
||||
private String examName;
|
||||
|
||||
@ApiModelProperty("试卷id")
|
||||
private Long examId;
|
||||
|
||||
@ApiModelProperty("得分")
|
||||
private BigDecimal score;
|
||||
|
||||
@ApiModelProperty("是否通过(0-未通过,1-通过)")
|
||||
private Integer passed;
|
||||
|
||||
@ApiModelProperty("错误题数")
|
||||
private Integer wrongCount;
|
||||
|
||||
@ApiModelProperty("正确率(百分比)")
|
||||
private BigDecimal accuracy;
|
||||
|
||||
@ApiModelProperty("考试开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@ApiModelProperty("考试结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package org.qinan.cedu.model.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学员学习记录(节点级)
|
||||
* @TableName class_student_learning_record
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ClassStudentLearningRecordVO extends BaseVO {
|
||||
|
||||
@ApiModelProperty("学员ID")
|
||||
private Long studentId;
|
||||
|
||||
@ApiModelProperty("所属班级ID")
|
||||
private Long classId;
|
||||
|
||||
@ApiModelProperty("课程ID")
|
||||
private Long courseId;
|
||||
|
||||
@ApiModelProperty("课程名称")
|
||||
private String courseName;
|
||||
|
||||
@ApiModelProperty("小节点名称")
|
||||
private String coursewareName;
|
||||
|
||||
@ApiModelProperty("学习状态:0-未学习,1-学习中,2-已完成")
|
||||
private Integer studyStatus;
|
||||
|
||||
@ApiModelProperty("学习情况")
|
||||
private String learningProgress;
|
||||
|
||||
@ApiModelProperty("开始学习时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@ApiModelProperty("完成时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@ApiModelProperty("最近观看时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime lastWatchTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package org.qinan.cedu.model.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 班级学员
|
||||
* @TableName class_student
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ClassStudentVO extends BaseVO {
|
||||
|
||||
@ApiModelProperty("关联班级ID")
|
||||
private Long classId;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String studentName;
|
||||
|
||||
@ApiModelProperty("参训单位")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty("部门")
|
||||
private String department;
|
||||
|
||||
@ApiModelProperty("手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("档案编号")
|
||||
private String fileNumber;
|
||||
|
||||
@ApiModelProperty("人脸认证(0-未认证,1-已认证)")
|
||||
private Integer faceAuth;
|
||||
|
||||
@ApiModelProperty("要求学时(小时)")
|
||||
private BigDecimal requiredHours;
|
||||
|
||||
@ApiModelProperty("已完成学时(小时)")
|
||||
private BigDecimal completedHours;
|
||||
|
||||
@ApiModelProperty("学习状态:0-未学习,1-学习中,2-已学完,3-已完成")
|
||||
private Integer studyStatus;
|
||||
|
||||
@ApiModelProperty("考试状态:0-不考试,1-待考试,2-考试未通过,3-考试通过,4-未参加")
|
||||
private Integer examStatus;
|
||||
|
||||
@ApiModelProperty("入班时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime entryTime;
|
||||
}
|
||||
|
|
@ -3,7 +3,6 @@ package org.qinan.cedu.model.vo;
|
|||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.qinan.cedu.model.dto.BaseVO;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package org.qinan.cedu.model.vo;
|
|||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.qinan.cedu.model.dto.BaseVO;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ package org.qinan.cedu.model.vo;
|
|||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.qinan.cedu.model.dto.BaseVO;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
package org.qinan.cedu.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.qinan.cedu.model.dto.ClassCourseDTO;
|
||||
import org.qinan.cedu.model.entity.ClassCourseDO;
|
||||
import org.qinan.cedu.model.query.ClassCoursePageQuery;
|
||||
import org.qinan.cedu.model.vo.ClassCourseVO;
|
||||
|
||||
/**
|
||||
* 班级课程服务
|
||||
*/
|
||||
public interface ClassCourseService extends IService<ClassCourseDO> {
|
||||
|
||||
IPage<ClassCourseVO> pageQuery(ClassCoursePageQuery query);
|
||||
|
||||
ClassCourseVO getDetail(Long id);
|
||||
|
||||
boolean saveCourse(ClassCourseDTO dto);
|
||||
|
||||
boolean updateCourse(ClassCourseDTO dto);
|
||||
|
||||
boolean deleteById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package org.qinan.cedu.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.qinan.cedu.model.dto.ClassManagementDTO;
|
||||
import org.qinan.cedu.model.entity.ClassManagementDO;
|
||||
import org.qinan.cedu.model.query.ClassManagementPageQuery;
|
||||
import org.qinan.cedu.model.vo.ClassManagementVO;
|
||||
|
||||
/**
|
||||
* 班级管理服务
|
||||
*/
|
||||
public interface ClassManagementService extends IService<ClassManagementDO> {
|
||||
|
||||
IPage<ClassManagementVO> pageQuery(ClassManagementPageQuery query);
|
||||
|
||||
ClassManagementVO getDetail(Long id);
|
||||
|
||||
boolean saveClass(ClassManagementDTO dto);
|
||||
|
||||
boolean updateClass(ClassManagementDTO dto);
|
||||
|
||||
boolean deleteById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package org.qinan.cedu.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.qinan.cedu.model.dto.ClassStudentExamRecordDTO;
|
||||
import org.qinan.cedu.model.entity.ClassStudentExamRecordDO;
|
||||
import org.qinan.cedu.model.query.ClassStudentExamRecordPageQuery;
|
||||
import org.qinan.cedu.model.vo.ClassStudentExamRecordVO;
|
||||
|
||||
/**
|
||||
* 学员考试记录服务
|
||||
*/
|
||||
public interface ClassStudentExamRecordService extends IService<ClassStudentExamRecordDO> {
|
||||
|
||||
IPage<ClassStudentExamRecordVO> pageQuery(ClassStudentExamRecordPageQuery query);
|
||||
|
||||
ClassStudentExamRecordVO getDetail(Long id);
|
||||
|
||||
boolean saveRecord(ClassStudentExamRecordDTO dto);
|
||||
|
||||
boolean updateRecord(ClassStudentExamRecordDTO dto);
|
||||
|
||||
boolean deleteById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package org.qinan.cedu.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.qinan.cedu.model.dto.ClassStudentLearningRecordDTO;
|
||||
import org.qinan.cedu.model.entity.ClassStudentLearningRecordDO;
|
||||
import org.qinan.cedu.model.query.ClassStudentLearningRecordPageQuery;
|
||||
import org.qinan.cedu.model.vo.ClassStudentLearningRecordVO;
|
||||
|
||||
/**
|
||||
* 学员学习记录服务
|
||||
*/
|
||||
public interface ClassStudentLearningRecordService extends IService<ClassStudentLearningRecordDO> {
|
||||
|
||||
IPage<ClassStudentLearningRecordVO> pageQuery(ClassStudentLearningRecordPageQuery query);
|
||||
|
||||
ClassStudentLearningRecordVO getDetail(Long id);
|
||||
|
||||
boolean saveRecord(ClassStudentLearningRecordDTO dto);
|
||||
|
||||
boolean updateRecord(ClassStudentLearningRecordDTO dto);
|
||||
|
||||
boolean deleteById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package org.qinan.cedu.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.qinan.cedu.model.dto.ClassStudentDTO;
|
||||
import org.qinan.cedu.model.entity.ClassStudentDO;
|
||||
import org.qinan.cedu.model.query.ClassStudentPageQuery;
|
||||
import org.qinan.cedu.model.vo.ClassStudentVO;
|
||||
|
||||
/**
|
||||
* 班级学员服务
|
||||
*/
|
||||
public interface ClassStudentService extends IService<ClassStudentDO> {
|
||||
|
||||
IPage<ClassStudentVO> pageQuery(ClassStudentPageQuery query);
|
||||
|
||||
ClassStudentVO getDetail(Long id);
|
||||
|
||||
boolean saveStudent(ClassStudentDTO dto);
|
||||
|
||||
boolean updateStudent(ClassStudentDTO dto);
|
||||
|
||||
boolean deleteById(Long id);
|
||||
}
|
||||
|
|
@ -21,4 +21,6 @@ public interface CourseManagementService extends IService<CourseManagementDO> {
|
|||
boolean updateCourse(CourseManagementDTO dto);
|
||||
|
||||
boolean deleteById(Long id);
|
||||
|
||||
Boolean modifyStatus(CourseManagementDTO dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,4 +21,6 @@ public interface CoursewareManagementService extends IService<CoursewareManageme
|
|||
boolean updateCourseware(CoursewareManagementDTO dto);
|
||||
|
||||
boolean deleteById(Long id);
|
||||
|
||||
Boolean modifyStatus(CoursewareManagementDTO dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,76 @@
|
|||
package org.qinan.cedu.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.qinan.cedu.convertor.ClassCourseConvertor;
|
||||
import org.qinan.cedu.enums.DeleteEnum;
|
||||
import org.qinan.cedu.mapper.ClassCourseMapper;
|
||||
import org.qinan.cedu.model.dto.ClassCourseDTO;
|
||||
import org.qinan.cedu.model.entity.ClassCourseDO;
|
||||
import org.qinan.cedu.model.query.ClassCoursePageQuery;
|
||||
import org.qinan.cedu.model.vo.ClassCourseVO;
|
||||
import org.qinan.cedu.service.ClassCourseService;
|
||||
import org.qinan.safetyeval.infrastructure.support.InsertFieldDefaults;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 班级课程服务实现
|
||||
*/
|
||||
@Service
|
||||
public class ClassCourseServiceImpl extends ServiceImpl<ClassCourseMapper, ClassCourseDO>
|
||||
implements ClassCourseService {
|
||||
|
||||
@Autowired
|
||||
private ClassCourseConvertor classCourseConvertor;
|
||||
|
||||
@Override
|
||||
public IPage<ClassCourseVO> pageQuery(ClassCoursePageQuery query) {
|
||||
return this.lambdaQuery()
|
||||
.eq(ClassCourseDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.eq(query.getClassId() != null, ClassCourseDO::getClassId, query.getClassId())
|
||||
.like(StringUtils.hasText(query.getCourseName()), ClassCourseDO::getCourseName, query.getCourseName())
|
||||
.eq(query.getCourseId() != null, ClassCourseDO::getCourseId, query.getCourseId())
|
||||
.orderByDesc(ClassCourseDO::getCreateTime)
|
||||
.page(new Page<>(query.getCurrent(), query.getSize()))
|
||||
.convert(classCourseConvertor::convertEToVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassCourseVO getDetail(Long id) {
|
||||
ClassCourseDO entity = this.lambdaQuery()
|
||||
.eq(ClassCourseDO::getId, id)
|
||||
.eq(ClassCourseDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.one();
|
||||
return classCourseConvertor.convertEToVo(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveCourse(ClassCourseDTO dto) {
|
||||
ClassCourseDO entity = classCourseConvertor.convertDtoToE(dto);
|
||||
InsertFieldDefaults.applyIgnoreOrgId(entity);
|
||||
entity.setUpdateTime(LocalDateTime.now());
|
||||
return this.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateCourse(ClassCourseDTO dto) {
|
||||
ClassCourseDO entity = classCourseConvertor.convertDtoToE(dto);
|
||||
InsertFieldDefaults.applyForUpdateIgnoreOrgId(entity);
|
||||
return this.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(Long id) {
|
||||
return this.lambdaUpdate()
|
||||
.set(ClassCourseDO::getDeleteEnum, DeleteEnum.TRUE.getCode())
|
||||
.set(ClassCourseDO::getUpdateTime, LocalDateTime.now())
|
||||
.eq(ClassCourseDO::getId, id)
|
||||
.eq(ClassCourseDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.update();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
package org.qinan.cedu.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.qinan.cedu.convertor.ClassManagementConvertor;
|
||||
import org.qinan.cedu.enums.DeleteEnum;
|
||||
import org.qinan.cedu.mapper.ClassManagementMapper;
|
||||
import org.qinan.cedu.model.dto.ClassManagementDTO;
|
||||
import org.qinan.cedu.model.entity.ClassManagementDO;
|
||||
import org.qinan.cedu.model.query.ClassManagementPageQuery;
|
||||
import org.qinan.cedu.model.vo.ClassManagementVO;
|
||||
import org.qinan.cedu.service.ClassManagementService;
|
||||
import org.qinan.safetyeval.infrastructure.support.InsertFieldDefaults;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 班级管理服务实现
|
||||
*/
|
||||
@Service
|
||||
public class ClassManagementServiceImpl extends ServiceImpl<ClassManagementMapper, ClassManagementDO>
|
||||
implements ClassManagementService {
|
||||
|
||||
@Autowired
|
||||
private ClassManagementConvertor classManagementConvertor;
|
||||
|
||||
@Override
|
||||
public IPage<ClassManagementVO> pageQuery(ClassManagementPageQuery query) {
|
||||
return this.lambdaQuery()
|
||||
.eq(ClassManagementDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.like(StringUtils.hasText(query.getClassCode()), ClassManagementDO::getClassCode, query.getClassCode())
|
||||
.like(StringUtils.hasText(query.getClassName()), ClassManagementDO::getClassName, query.getClassName())
|
||||
.eq(StringUtils.hasText(query.getTrainingType()), ClassManagementDO::getTrainingType, query.getTrainingType())
|
||||
.eq(query.getStatus() != null, ClassManagementDO::getStatus, query.getStatus())
|
||||
.ge(query.getStartDateBegin() != null, ClassManagementDO::getStartDate, query.getStartDateBegin())
|
||||
.le(query.getEndDateEnd() != null, ClassManagementDO::getEndDate, query.getEndDateEnd())
|
||||
.orderByDesc(ClassManagementDO::getCreateTime)
|
||||
.page(new Page<>(query.getCurrent(), query.getSize()))
|
||||
.convert(classManagementConvertor::convertEToVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassManagementVO getDetail(Long id) {
|
||||
ClassManagementDO entity = this.lambdaQuery()
|
||||
.eq(ClassManagementDO::getId, id)
|
||||
.eq(ClassManagementDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.one();
|
||||
return classManagementConvertor.convertEToVo(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveClass(ClassManagementDTO dto) {
|
||||
ClassManagementDO entity = classManagementConvertor.convertDtoToE(dto);
|
||||
InsertFieldDefaults.applyIgnoreOrgId(entity);
|
||||
entity.setUpdateTime(LocalDateTime.now());
|
||||
if (entity.getStatus() == null) {
|
||||
entity.setStatus(0);
|
||||
}
|
||||
if (entity.getOpenExam() == null) {
|
||||
entity.setOpenExam(0);
|
||||
}
|
||||
if (entity.getExamFaceRecognition() == null) {
|
||||
entity.setExamFaceRecognition(0);
|
||||
}
|
||||
if (entity.getFaceRecognition() == null) {
|
||||
entity.setFaceRecognition(0);
|
||||
}
|
||||
if (entity.getShuffleQuestions() == null) {
|
||||
entity.setShuffleQuestions(0);
|
||||
}
|
||||
return this.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateClass(ClassManagementDTO dto) {
|
||||
ClassManagementDO entity = classManagementConvertor.convertDtoToE(dto);
|
||||
InsertFieldDefaults.applyForUpdateIgnoreOrgId(entity);
|
||||
return this.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(Long id) {
|
||||
return this.lambdaUpdate()
|
||||
.set(ClassManagementDO::getDeleteEnum, DeleteEnum.TRUE.getCode())
|
||||
.set(ClassManagementDO::getUpdateTime, LocalDateTime.now())
|
||||
.eq(ClassManagementDO::getId, id)
|
||||
.eq(ClassManagementDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.update();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
package org.qinan.cedu.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.qinan.cedu.convertor.ClassStudentExamRecordConvertor;
|
||||
import org.qinan.cedu.enums.DeleteEnum;
|
||||
import org.qinan.cedu.mapper.ClassStudentExamRecordMapper;
|
||||
import org.qinan.cedu.model.dto.ClassStudentExamRecordDTO;
|
||||
import org.qinan.cedu.model.entity.ClassStudentExamRecordDO;
|
||||
import org.qinan.cedu.model.query.ClassStudentExamRecordPageQuery;
|
||||
import org.qinan.cedu.model.vo.ClassStudentExamRecordVO;
|
||||
import org.qinan.cedu.service.ClassStudentExamRecordService;
|
||||
import org.qinan.safetyeval.infrastructure.support.InsertFieldDefaults;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学员考试记录服务实现
|
||||
*/
|
||||
@Service
|
||||
public class ClassStudentExamRecordServiceImpl extends ServiceImpl<ClassStudentExamRecordMapper, ClassStudentExamRecordDO>
|
||||
implements ClassStudentExamRecordService {
|
||||
|
||||
@Autowired
|
||||
private ClassStudentExamRecordConvertor classStudentExamRecordConvertor;
|
||||
|
||||
@Override
|
||||
public IPage<ClassStudentExamRecordVO> pageQuery(ClassStudentExamRecordPageQuery query) {
|
||||
return this.lambdaQuery()
|
||||
.eq(ClassStudentExamRecordDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.eq(query.getClassId() != null, ClassStudentExamRecordDO::getClassId, query.getClassId())
|
||||
.eq(query.getStudentId() != null, ClassStudentExamRecordDO::getStudentId, query.getStudentId())
|
||||
.eq(query.getExamId() != null, ClassStudentExamRecordDO::getExamId, query.getExamId())
|
||||
.eq(query.getPassed() != null, ClassStudentExamRecordDO::getPassed, query.getPassed())
|
||||
.orderByDesc(ClassStudentExamRecordDO::getCreateTime)
|
||||
.page(new Page<>(query.getCurrent(), query.getSize()))
|
||||
.convert(classStudentExamRecordConvertor::convertEToVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassStudentExamRecordVO getDetail(Long id) {
|
||||
ClassStudentExamRecordDO entity = this.lambdaQuery()
|
||||
.eq(ClassStudentExamRecordDO::getId, id)
|
||||
.eq(ClassStudentExamRecordDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.one();
|
||||
return classStudentExamRecordConvertor.convertEToVo(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveRecord(ClassStudentExamRecordDTO dto) {
|
||||
ClassStudentExamRecordDO entity = classStudentExamRecordConvertor.convertDtoToE(dto);
|
||||
InsertFieldDefaults.applyIgnoreOrgId(entity);
|
||||
entity.setUpdateTime(LocalDateTime.now());
|
||||
if (entity.getPassed() == null) {
|
||||
entity.setPassed(0);
|
||||
}
|
||||
if (entity.getWrongCount() == null) {
|
||||
entity.setWrongCount(0);
|
||||
}
|
||||
return this.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateRecord(ClassStudentExamRecordDTO dto) {
|
||||
ClassStudentExamRecordDO entity = classStudentExamRecordConvertor.convertDtoToE(dto);
|
||||
InsertFieldDefaults.applyForUpdateIgnoreOrgId(entity);
|
||||
return this.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(Long id) {
|
||||
return this.lambdaUpdate()
|
||||
.set(ClassStudentExamRecordDO::getDeleteEnum, DeleteEnum.TRUE.getCode())
|
||||
.set(ClassStudentExamRecordDO::getUpdateTime, LocalDateTime.now())
|
||||
.eq(ClassStudentExamRecordDO::getId, id)
|
||||
.eq(ClassStudentExamRecordDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.update();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package org.qinan.cedu.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.qinan.cedu.convertor.ClassStudentLearningRecordConvertor;
|
||||
import org.qinan.cedu.enums.DeleteEnum;
|
||||
import org.qinan.cedu.mapper.ClassStudentLearningRecordMapper;
|
||||
import org.qinan.cedu.model.dto.ClassStudentLearningRecordDTO;
|
||||
import org.qinan.cedu.model.entity.ClassStudentLearningRecordDO;
|
||||
import org.qinan.cedu.model.query.ClassStudentLearningRecordPageQuery;
|
||||
import org.qinan.cedu.model.vo.ClassStudentLearningRecordVO;
|
||||
import org.qinan.cedu.service.ClassStudentLearningRecordService;
|
||||
import org.qinan.safetyeval.infrastructure.support.InsertFieldDefaults;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 学员学习记录服务实现
|
||||
*/
|
||||
@Service
|
||||
public class ClassStudentLearningRecordServiceImpl extends ServiceImpl<ClassStudentLearningRecordMapper, ClassStudentLearningRecordDO>
|
||||
implements ClassStudentLearningRecordService {
|
||||
|
||||
@Autowired
|
||||
private ClassStudentLearningRecordConvertor classStudentLearningRecordConvertor;
|
||||
|
||||
@Override
|
||||
public IPage<ClassStudentLearningRecordVO> pageQuery(ClassStudentLearningRecordPageQuery query) {
|
||||
return this.lambdaQuery()
|
||||
.eq(ClassStudentLearningRecordDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.eq(query.getClassId() != null, ClassStudentLearningRecordDO::getClassId, query.getClassId())
|
||||
.eq(query.getStudentId() != null, ClassStudentLearningRecordDO::getStudentId, query.getStudentId())
|
||||
.eq(query.getCourseId() != null, ClassStudentLearningRecordDO::getCourseId, query.getCourseId())
|
||||
.eq(query.getStudyStatus() != null, ClassStudentLearningRecordDO::getStudyStatus, query.getStudyStatus())
|
||||
.orderByDesc(ClassStudentLearningRecordDO::getCreateTime)
|
||||
.page(new Page<>(query.getCurrent(), query.getSize()))
|
||||
.convert(classStudentLearningRecordConvertor::convertEToVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassStudentLearningRecordVO getDetail(Long id) {
|
||||
ClassStudentLearningRecordDO entity = this.lambdaQuery()
|
||||
.eq(ClassStudentLearningRecordDO::getId, id)
|
||||
.eq(ClassStudentLearningRecordDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.one();
|
||||
return classStudentLearningRecordConvertor.convertEToVo(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveRecord(ClassStudentLearningRecordDTO dto) {
|
||||
ClassStudentLearningRecordDO entity = classStudentLearningRecordConvertor.convertDtoToE(dto);
|
||||
InsertFieldDefaults.applyIgnoreOrgId(entity);
|
||||
entity.setUpdateTime(LocalDateTime.now());
|
||||
if (entity.getStudyStatus() == null) {
|
||||
entity.setStudyStatus(0);
|
||||
}
|
||||
return this.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateRecord(ClassStudentLearningRecordDTO dto) {
|
||||
ClassStudentLearningRecordDO entity = classStudentLearningRecordConvertor.convertDtoToE(dto);
|
||||
InsertFieldDefaults.applyForUpdateIgnoreOrgId(entity);
|
||||
return this.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(Long id) {
|
||||
return this.lambdaUpdate()
|
||||
.set(ClassStudentLearningRecordDO::getDeleteEnum, DeleteEnum.TRUE.getCode())
|
||||
.set(ClassStudentLearningRecordDO::getUpdateTime, LocalDateTime.now())
|
||||
.eq(ClassStudentLearningRecordDO::getId, id)
|
||||
.eq(ClassStudentLearningRecordDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.update();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
package org.qinan.cedu.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.qinan.cedu.convertor.ClassStudentConvertor;
|
||||
import org.qinan.cedu.enums.DeleteEnum;
|
||||
import org.qinan.cedu.mapper.ClassStudentMapper;
|
||||
import org.qinan.cedu.model.dto.ClassStudentDTO;
|
||||
import org.qinan.cedu.model.entity.ClassStudentDO;
|
||||
import org.qinan.cedu.model.query.ClassStudentPageQuery;
|
||||
import org.qinan.cedu.model.vo.ClassStudentVO;
|
||||
import org.qinan.cedu.service.ClassStudentService;
|
||||
import org.qinan.safetyeval.infrastructure.support.InsertFieldDefaults;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 班级学员服务实现
|
||||
*/
|
||||
@Service
|
||||
public class ClassStudentServiceImpl extends ServiceImpl<ClassStudentMapper, ClassStudentDO>
|
||||
implements ClassStudentService {
|
||||
|
||||
@Autowired
|
||||
private ClassStudentConvertor classStudentConvertor;
|
||||
|
||||
@Override
|
||||
public IPage<ClassStudentVO> pageQuery(ClassStudentPageQuery query) {
|
||||
return this.lambdaQuery()
|
||||
.eq(ClassStudentDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.eq(query.getClassId() != null, ClassStudentDO::getClassId, query.getClassId())
|
||||
.like(StringUtils.hasText(query.getStudentName()), ClassStudentDO::getStudentName, query.getStudentName())
|
||||
.like(StringUtils.hasText(query.getPhone()), ClassStudentDO::getPhone, query.getPhone())
|
||||
.eq(query.getStudyStatus() != null, ClassStudentDO::getStudyStatus, query.getStudyStatus())
|
||||
.eq(query.getExamStatus() != null, ClassStudentDO::getExamStatus, query.getExamStatus())
|
||||
.orderByDesc(ClassStudentDO::getCreateTime)
|
||||
.page(new Page<>(query.getCurrent(), query.getSize()))
|
||||
.convert(classStudentConvertor::convertEToVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassStudentVO getDetail(Long id) {
|
||||
ClassStudentDO entity = this.lambdaQuery()
|
||||
.eq(ClassStudentDO::getId, id)
|
||||
.eq(ClassStudentDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.one();
|
||||
return classStudentConvertor.convertEToVo(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveStudent(ClassStudentDTO dto) {
|
||||
ClassStudentDO entity = classStudentConvertor.convertDtoToE(dto);
|
||||
InsertFieldDefaults.applyIgnoreOrgId(entity);
|
||||
entity.setUpdateTime(LocalDateTime.now());
|
||||
if (entity.getFaceAuth() == null) {
|
||||
entity.setFaceAuth(0);
|
||||
}
|
||||
if (entity.getCompletedHours() == null) {
|
||||
entity.setCompletedHours(BigDecimal.ZERO);
|
||||
}
|
||||
if (entity.getStudyStatus() == null) {
|
||||
entity.setStudyStatus(0);
|
||||
}
|
||||
if (entity.getExamStatus() == null) {
|
||||
entity.setExamStatus(0);
|
||||
}
|
||||
return this.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateStudent(ClassStudentDTO dto) {
|
||||
ClassStudentDO entity = classStudentConvertor.convertDtoToE(dto);
|
||||
InsertFieldDefaults.applyForUpdateIgnoreOrgId(entity);
|
||||
return this.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(Long id) {
|
||||
return this.lambdaUpdate()
|
||||
.set(ClassStudentDO::getDeleteEnum, DeleteEnum.TRUE.getCode())
|
||||
.set(ClassStudentDO::getUpdateTime, LocalDateTime.now())
|
||||
.eq(ClassStudentDO::getId, id)
|
||||
.eq(ClassStudentDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.update();
|
||||
}
|
||||
}
|
||||
|
|
@ -128,4 +128,14 @@ public class CourseManagementServiceImpl extends ServiceImpl<CourseManagementMap
|
|||
.eq(CourseManagementDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean modifyStatus(CourseManagementDTO dto) {
|
||||
return this.lambdaUpdate()
|
||||
.set(CourseManagementDO::getStatus, dto.getStatus())
|
||||
.set(CourseManagementDO::getUpdateTime, LocalDateTime.now())
|
||||
.eq(CourseManagementDO::getId, dto.getId())
|
||||
.eq(CourseManagementDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.update();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,4 +95,14 @@ public class CoursewareManagementServiceImpl extends ServiceImpl<CoursewareManag
|
|||
.eq(CoursewareManagementDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean modifyStatus(CoursewareManagementDTO dto) {
|
||||
return this.lambdaUpdate()
|
||||
.set(CoursewareManagementDO::getStatus, dto.getStatus())
|
||||
.set(CoursewareManagementDO::getUpdateTime, LocalDateTime.now())
|
||||
.eq(CoursewareManagementDO::getId, dto.getId())
|
||||
.eq(CoursewareManagementDO::getDeleteEnum, DeleteEnum.FALSE.getCode())
|
||||
.update();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue