Compare commits
No commits in common. 'main' and 'master' have entirely different histories.
@ -0,0 +1,109 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo.*;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.CounselorDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.FixedClassTableDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.service.basic_info.CounselorService;
|
||||
|
||||
/**
|
||||
* 辅导员表
|
||||
*/
|
||||
@Tag(name = "管理后台 - 辅导员")
|
||||
@RestController
|
||||
@RequestMapping("/zhuguang/counselor")
|
||||
@Validated
|
||||
public class CounselorController {
|
||||
|
||||
@Resource
|
||||
private CounselorService counselorService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建辅导员")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:counselor:create')")
|
||||
public CommonResult<Long> createCounselor(@Valid @RequestBody CounselorSaveReqVO createReqVO) {
|
||||
return success(counselorService.createCounselor(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新辅导员")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:counselor:update')")
|
||||
public CommonResult<Boolean> updateCounselor(@Valid @RequestBody CounselorSaveReqVO updateReqVO) {
|
||||
counselorService.updateCounselor(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除辅导员")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:counselor:delete')")
|
||||
public CommonResult<Boolean> deleteCounselor(@RequestParam("id") Long id) {
|
||||
counselorService.deleteCounselor(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得辅导员")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:counselor:query')")
|
||||
public CommonResult<CounselorRespVO> getCounselor(@RequestParam("id") Long id) {
|
||||
CounselorDO counselor = counselorService.getCounselor(id);
|
||||
return success(BeanUtils.toBean(counselor, CounselorRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得辅导员分页")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:counselor:query')")
|
||||
public CommonResult<PageResult<CounselorRespVO>> getCounselorPage(@Valid CounselorPageReqVO pageReqVO) {
|
||||
PageResult<CounselorDO> pageResult = counselorService.getCounselorPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, CounselorRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出辅导员 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:counselor:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportCounselorExcel(@Valid CounselorPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<CounselorDO> list = counselorService.getCounselorPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "辅导员.xls", "数据", CounselorRespVO.class,
|
||||
BeanUtils.toBean(list, CounselorRespVO.class));
|
||||
}
|
||||
|
||||
// ==================== 子表(固定班级) ====================
|
||||
|
||||
@GetMapping("/fixed-class-table/list-by-counselor-id")
|
||||
@Operation(summary = "获得固定班级列表")
|
||||
@Parameter(name = "counselorId", description = "辅导员的id")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:counselor:query')")
|
||||
public CommonResult<List<FixedClassTableDO>> getFixedClassTableListByCounselorId(@RequestParam("counselorId") Long counselorId) {
|
||||
return success(counselorService.getFixedClassTableListByCounselorId(counselorId));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo.*;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.CourseClassDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.StudentCourseClassDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.service.basic_info.CourseClassService;
|
||||
|
||||
/**
|
||||
* 课程班级表
|
||||
*/
|
||||
@Tag(name = "管理后台 - 课程班级")
|
||||
@RestController
|
||||
@RequestMapping("/zhuguang/course-class")
|
||||
@Validated
|
||||
public class CourseClassController {
|
||||
|
||||
@Resource
|
||||
private CourseClassService courseClassService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建课程班级")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:course-class:create')")
|
||||
public CommonResult<Long> createCourseClass(@Valid @RequestBody CourseClassSaveReqVO createReqVO) {
|
||||
return success(courseClassService.createCourseClass(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新课程班级")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:course-class:update')")
|
||||
public CommonResult<Boolean> updateCourseClass(@Valid @RequestBody CourseClassSaveReqVO updateReqVO) {
|
||||
courseClassService.updateCourseClass(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除课程班级")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:course-class:delete')")
|
||||
public CommonResult<Boolean> deleteCourseClass(@RequestParam("id") Long id) {
|
||||
courseClassService.deleteCourseClass(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得课程班级")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:course-class:query')")
|
||||
public CommonResult<CourseClassRespVO> getCourseClass(@RequestParam("id") Long id) {
|
||||
CourseClassDO courseClass = courseClassService.getCourseClass(id);
|
||||
return success(BeanUtils.toBean(courseClass, CourseClassRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得课程班级分页")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:course-class:query')")
|
||||
public CommonResult<PageResult<CourseClassRespVO>> getCourseClassPage(@Valid CourseClassPageReqVO pageReqVO) {
|
||||
PageResult<CourseClassDO> pageResult = courseClassService.getCourseClassPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, CourseClassRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出课程班级 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:course-class:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportCourseClassExcel(@Valid CourseClassPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<CourseClassDO> list = courseClassService.getCourseClassPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "课程班级.xls", "数据", CourseClassRespVO.class,
|
||||
BeanUtils.toBean(list, CourseClassRespVO.class));
|
||||
}
|
||||
|
||||
// ==================== 子表(学生的课程班级) ====================
|
||||
|
||||
@GetMapping("/student-course-class/list-by-course-id")
|
||||
@Operation(summary = "获得学生的课程班级列表")
|
||||
@Parameter(name = "courseId", description = "课程班级的ID")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:course-class:query')")
|
||||
public CommonResult<List<StudentCourseClassDO>> getStudentCourseClassListByCourseId(@RequestParam("courseId") Long courseId) {
|
||||
return success(courseClassService.getStudentCourseClassListByCourseId(courseId));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,106 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo.*;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.CourseDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.CourseClassDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.service.basic_info.CourseService;
|
||||
|
||||
@Tag(name = "管理后台 - 课程")
|
||||
@RestController
|
||||
@RequestMapping("/zhuguang/course")
|
||||
@Validated
|
||||
public class CourseController {
|
||||
|
||||
@Resource
|
||||
private CourseService courseService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建课程")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:course:create')")
|
||||
public CommonResult<Long> createCourse(@Valid @RequestBody CourseSaveReqVO createReqVO) {
|
||||
return success(courseService.createCourse(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新课程")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:course:update')")
|
||||
public CommonResult<Boolean> updateCourse(@Valid @RequestBody CourseSaveReqVO updateReqVO) {
|
||||
courseService.updateCourse(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除课程")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:course:delete')")
|
||||
public CommonResult<Boolean> deleteCourse(@RequestParam("id") Long id) {
|
||||
courseService.deleteCourse(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得课程")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:course:query')")
|
||||
public CommonResult<CourseRespVO> getCourse(@RequestParam("id") Long id) {
|
||||
CourseDO course = courseService.getCourse(id);
|
||||
return success(BeanUtils.toBean(course, CourseRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得课程分页")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:course:query')")
|
||||
public CommonResult<PageResult<CourseRespVO>> getCoursePage(@Valid CoursePageReqVO pageReqVO) {
|
||||
PageResult<CourseDO> pageResult = courseService.getCoursePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, CourseRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出课程 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:course:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportCourseExcel(@Valid CoursePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<CourseDO> list = courseService.getCoursePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "课程.xls", "数据", CourseRespVO.class,
|
||||
BeanUtils.toBean(list, CourseRespVO.class));
|
||||
}
|
||||
|
||||
// ==================== 子表(课程班级) ====================
|
||||
|
||||
@GetMapping("/course-class/list-by-course-id")
|
||||
@Operation(summary = "获得课程班级列表")
|
||||
@Parameter(name = "courseId", description = "课程ID")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:course:query')")
|
||||
public CommonResult<List<CourseClassDO>> getCourseClassListByCourseId(@RequestParam("courseId") Long courseId) {
|
||||
return success(courseService.getCourseClassListByCourseId(courseId));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,106 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo.*;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.DepartmentDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.SpecialtyDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.service.basic_info.DepartmentService;
|
||||
|
||||
@Tag(name = "管理后台 - 系")
|
||||
@RestController
|
||||
@RequestMapping("/zhuguang/department")
|
||||
@Validated
|
||||
public class DepartmentController {
|
||||
|
||||
@Resource
|
||||
private DepartmentService departmentService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建系")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:department:create')")
|
||||
public CommonResult<Long> createDepartment(@Valid @RequestBody DepartmentSaveReqVO createReqVO) {
|
||||
return success(departmentService.createDepartment(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新系")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:department:update')")
|
||||
public CommonResult<Boolean> updateDepartment(@Valid @RequestBody DepartmentSaveReqVO updateReqVO) {
|
||||
departmentService.updateDepartment(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除系")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:department:delete')")
|
||||
public CommonResult<Boolean> deleteDepartment(@RequestParam("id") Long id) {
|
||||
departmentService.deleteDepartment(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得系")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:department:query')")
|
||||
public CommonResult<DepartmentRespVO> getDepartment(@RequestParam("id") Long id) {
|
||||
DepartmentDO department = departmentService.getDepartment(id);
|
||||
return success(BeanUtils.toBean(department, DepartmentRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得系分页")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:department:query')")
|
||||
public CommonResult<PageResult<DepartmentRespVO>> getDepartmentPage(@Valid DepartmentPageReqVO pageReqVO) {
|
||||
PageResult<DepartmentDO> pageResult = departmentService.getDepartmentPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, DepartmentRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出系 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:department:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportDepartmentExcel(@Valid DepartmentPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<DepartmentDO> list = departmentService.getDepartmentPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "系.xls", "数据", DepartmentRespVO.class,
|
||||
BeanUtils.toBean(list, DepartmentRespVO.class));
|
||||
}
|
||||
|
||||
// ==================== 子表(专业) ====================
|
||||
|
||||
@GetMapping("/specialty/list-by-department-id")
|
||||
@Operation(summary = "获得专业列表")
|
||||
@Parameter(name = "departmentId", description = "系的ID")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:department:query')")
|
||||
public CommonResult<List<SpecialtyDO>> getSpecialtyListByDepartmentId(@RequestParam("departmentId") Long departmentId) {
|
||||
return success(departmentService.getSpecialtyListByDepartmentId(departmentId));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,127 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info;
|
||||
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.dormitory_check_in.DormRuleRecordsDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.late_signing.NightRuleRecordDO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo.*;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.FixedClassTableDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.StudentDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.service.basic_info.FixedClassTableService;
|
||||
|
||||
@Tag(name = "管理后台 - 固定班级")
|
||||
@RestController
|
||||
@RequestMapping("/zhuguang/fixed-class-table")
|
||||
@Validated
|
||||
public class FixedClassTableController {
|
||||
|
||||
@Resource
|
||||
private FixedClassTableService fixedClassTableService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建固定班级")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:fixed-class-table:create')")
|
||||
public CommonResult<Long> createFixedClassTable(@Valid @RequestBody FixedClassTableSaveReqVO createReqVO) {
|
||||
return success(fixedClassTableService.createFixedClassTable(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新固定班级")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:fixed-class-table:update')")
|
||||
public CommonResult<Boolean> updateFixedClassTable(@Valid @RequestBody FixedClassTableSaveReqVO updateReqVO) {
|
||||
fixedClassTableService.updateFixedClassTable(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除固定班级")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:fixed-class-table:delete')")
|
||||
public CommonResult<Boolean> deleteFixedClassTable(@RequestParam("id") Long id) {
|
||||
fixedClassTableService.deleteFixedClassTable(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得固定班级")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:fixed-class-table:query')")
|
||||
public CommonResult<FixedClassTableRespVO> getFixedClassTable(@RequestParam("id") Long id) {
|
||||
FixedClassTableDO fixedClassTable = fixedClassTableService.getFixedClassTable(id);
|
||||
return success(BeanUtils.toBean(fixedClassTable, FixedClassTableRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得固定班级分页")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:fixed-class-table:query')")
|
||||
public CommonResult<PageResult<FixedClassTableRespVO>> getFixedClassTablePage(@Valid FixedClassTablePageReqVO pageReqVO) {
|
||||
PageResult<FixedClassTableDO> pageResult = fixedClassTableService.getFixedClassTablePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, FixedClassTableRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出固定班级 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:fixed-class-table:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportFixedClassTableExcel(@Valid FixedClassTablePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<FixedClassTableDO> list = fixedClassTableService.getFixedClassTablePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "固定班级.xls", "数据", FixedClassTableRespVO.class,
|
||||
BeanUtils.toBean(list, FixedClassTableRespVO.class));
|
||||
}
|
||||
|
||||
// ==================== 子表(宿舍规则记录) ====================
|
||||
|
||||
@GetMapping("/dorm-rule-records/list-by-class-id")
|
||||
@Operation(summary = "获得宿舍规则记录列表")
|
||||
@Parameter(name = "classId", description = "班级id")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:fixed-class-table:query')")
|
||||
public CommonResult<List<DormRuleRecordsDO>> getDormRuleRecordsListByClassId(@RequestParam("classId") Long classId) {
|
||||
return success(fixedClassTableService.getDormRuleRecordsListByClassId(classId));
|
||||
}
|
||||
|
||||
// ==================== 子表(晚自习规则记录) ====================
|
||||
|
||||
@GetMapping("/night-rule-record/list-by-class-id")
|
||||
@Operation(summary = "获得晚自习规则记录列表")
|
||||
@Parameter(name = "classId", description = "班级的id")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:fixed-class-table:query')")
|
||||
public CommonResult<List<NightRuleRecordDO>> getNightRuleRecordListByClassId(@RequestParam("classId") Long classId) {
|
||||
return success(fixedClassTableService.getNightRuleRecordListByClassId(classId));
|
||||
}
|
||||
|
||||
// ==================== 子表(学生信息) ====================
|
||||
|
||||
@GetMapping("/student/list-by-class-id")
|
||||
@Operation(summary = "获得学生信息列表")
|
||||
@Parameter(name = "classId", description = "班级ID")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:fixed-class-table:query')")
|
||||
public CommonResult<List<StudentDO>> getStudentListByClassId(@RequestParam("classId") Long classId) {
|
||||
return success(fixedClassTableService.getStudentListByClassId(classId));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,106 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo.*;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.SpecialtyDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.FixedClassTableDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.service.basic_info.SpecialtyService;
|
||||
|
||||
@Tag(name = "管理后台 - 专业")
|
||||
@RestController
|
||||
@RequestMapping("/zhuguang/specialty")
|
||||
@Validated
|
||||
public class SpecialtyController {
|
||||
|
||||
@Resource
|
||||
private SpecialtyService specialtyService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建专业")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:specialty:create')")
|
||||
public CommonResult<Long> createSpecialty(@Valid @RequestBody SpecialtySaveReqVO createReqVO) {
|
||||
return success(specialtyService.createSpecialty(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新专业")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:specialty:update')")
|
||||
public CommonResult<Boolean> updateSpecialty(@Valid @RequestBody SpecialtySaveReqVO updateReqVO) {
|
||||
specialtyService.updateSpecialty(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除专业")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:specialty:delete')")
|
||||
public CommonResult<Boolean> deleteSpecialty(@RequestParam("id") Long id) {
|
||||
specialtyService.deleteSpecialty(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得专业")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:specialty:query')")
|
||||
public CommonResult<SpecialtyRespVO> getSpecialty(@RequestParam("id") Long id) {
|
||||
SpecialtyDO specialty = specialtyService.getSpecialty(id);
|
||||
return success(BeanUtils.toBean(specialty, SpecialtyRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得专业分页")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:specialty:query')")
|
||||
public CommonResult<PageResult<SpecialtyRespVO>> getSpecialtyPage(@Valid SpecialtyPageReqVO pageReqVO) {
|
||||
PageResult<SpecialtyDO> pageResult = specialtyService.getSpecialtyPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, SpecialtyRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出专业 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:specialty:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportSpecialtyExcel(@Valid SpecialtyPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<SpecialtyDO> list = specialtyService.getSpecialtyPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "专业.xls", "数据", SpecialtyRespVO.class,
|
||||
BeanUtils.toBean(list, SpecialtyRespVO.class));
|
||||
}
|
||||
|
||||
// ==================== 子表(固定班级) ====================
|
||||
|
||||
@GetMapping("/fixed-class-table/list-by-specialty-id")
|
||||
@Operation(summary = "获得固定班级列表")
|
||||
@Parameter(name = "specialtyId", description = "专业的id")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:specialty:query')")
|
||||
public CommonResult<List<FixedClassTableDO>> getFixedClassTableListBySpecialtyId(@RequestParam("specialtyId") Long specialtyId) {
|
||||
return success(specialtyService.getFixedClassTableListBySpecialtyId(specialtyId));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,161 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo.*;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.StudentDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.leave.AskForLeaveDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.class_check_in.CourseAttendanceRecordsDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.dormitory_check_in.DormAttendanceRecordsDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.late_signing.NightAttendanceRecDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.CourseClassDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.StudentCourseClassDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.service.basic_info.StudentService;
|
||||
|
||||
@Tag(name = "管理后台 - 学生信息")
|
||||
@RestController
|
||||
@RequestMapping("/zhuguang/student")
|
||||
@Validated
|
||||
public class StudentController {
|
||||
|
||||
@Resource
|
||||
private StudentService studentService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建学生信息")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student:create')")
|
||||
public CommonResult<Long> createStudent(@Valid @RequestBody StudentSaveReqVO createReqVO) {
|
||||
return success(studentService.createStudent(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新学生信息")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student:update')")
|
||||
public CommonResult<Boolean> updateStudent(@Valid @RequestBody StudentSaveReqVO updateReqVO) {
|
||||
studentService.updateStudent(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除学生信息")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student:delete')")
|
||||
public CommonResult<Boolean> deleteStudent(@RequestParam("id") Long id) {
|
||||
studentService.deleteStudent(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得学生信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student:query')")
|
||||
public CommonResult<StudentRespVO> getStudent(@RequestParam("id") Long id) {
|
||||
StudentDO student = studentService.getStudent(id);
|
||||
return success(BeanUtils.toBean(student, StudentRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得学生信息分页")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student:query')")
|
||||
public CommonResult<PageResult<StudentRespVO>> getStudentPage(@Valid StudentPageReqVO pageReqVO) {
|
||||
PageResult<StudentDO> pageResult = studentService.getStudentPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, StudentRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出学生信息 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportStudentExcel(@Valid StudentPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<StudentDO> list = studentService.getStudentPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "学生信息.xls", "数据", StudentRespVO.class,
|
||||
BeanUtils.toBean(list, StudentRespVO.class));
|
||||
}
|
||||
|
||||
// ==================== 子表(请假) ====================
|
||||
|
||||
@GetMapping("/ask-for-leave/list-by-student-id")
|
||||
@Operation(summary = "获得请假列表")
|
||||
@Parameter(name = "studentId", description = "学生ID")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student:query')")
|
||||
public CommonResult<List<AskForLeaveDO>> getAskForLeaveListByStudentId(@RequestParam("studentId") Long studentId) {
|
||||
return success(studentService.getAskForLeaveListByStudentId(studentId));
|
||||
}
|
||||
|
||||
// ==================== 子表(上课签到记录) ====================
|
||||
|
||||
@GetMapping("/course-attendance-records/list-by-student-id")
|
||||
@Operation(summary = "获得上课签到记录列表")
|
||||
@Parameter(name = "studentId", description = "学生的id")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student:query')")
|
||||
public CommonResult<List<CourseAttendanceRecordsDO>> getCourseAttendanceRecordsListByStudentId(@RequestParam("studentId") Long studentId) {
|
||||
return success(studentService.getCourseAttendanceRecordsListByStudentId(studentId));
|
||||
}
|
||||
|
||||
// ==================== 子表(宿舍签到记录) ====================
|
||||
|
||||
@GetMapping("/dorm-attendance-records/list-by-student-id")
|
||||
@Operation(summary = "获得宿舍签到记录列表")
|
||||
@Parameter(name = "studentId", description = "学生id")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student:query')")
|
||||
public CommonResult<List<DormAttendanceRecordsDO>> getDormAttendanceRecordsListByStudentId(@RequestParam("studentId") Long studentId) {
|
||||
return success(studentService.getDormAttendanceRecordsListByStudentId(studentId));
|
||||
}
|
||||
|
||||
// ==================== 子表(晚自习签到记录) ====================
|
||||
|
||||
@GetMapping("/night-attendance-rec/list-by-student-id")
|
||||
@Operation(summary = "获得晚自习签到记录列表")
|
||||
@Parameter(name = "studentId", description = "学生的id")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student:query')")
|
||||
public CommonResult<List<NightAttendanceRecDO>> getNightAttendanceRecListByStudentId(@RequestParam("studentId") Long studentId) {
|
||||
return success(studentService.getNightAttendanceRecListByStudentId(studentId));
|
||||
}
|
||||
|
||||
// ==================== 子表(课程班级) ====================
|
||||
|
||||
@GetMapping("/course-class/list-by-student-id")
|
||||
@Operation(summary = "获得课程班级列表")
|
||||
@Parameter(name = "studentId", description = "课代表ID")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student:query')")
|
||||
public CommonResult<List<CourseClassDO>> getCourseClassListByStudentId(@RequestParam("studentId") Long studentId) {
|
||||
return success(studentService.getCourseClassListByStudentId(studentId));
|
||||
}
|
||||
|
||||
// ==================== 子表(学生的课程班级) ====================
|
||||
|
||||
@GetMapping("/student-course-class/list-by-student-id")
|
||||
@Operation(summary = "获得学生的课程班级列表")
|
||||
@Parameter(name = "studentId", description = "学生ID")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student:query')")
|
||||
public CommonResult<List<StudentCourseClassDO>> getStudentCourseClassListByStudentId(@RequestParam("studentId") Long studentId) {
|
||||
return success(studentService.getStudentCourseClassListByStudentId(studentId));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo.*;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.StudentCourseClassDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.service.basic_info.StudentCourseClassService;
|
||||
|
||||
@Tag(name = "管理后台 - 学生的课程班级")
|
||||
@RestController
|
||||
@RequestMapping("/zhuguang/student-course-class")
|
||||
@Validated
|
||||
public class StudentCourseClassController {
|
||||
|
||||
@Resource
|
||||
private StudentCourseClassService studentCourseClassService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建学生的课程班级")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student-course-class:create')")
|
||||
public CommonResult<Long> createStudentCourseClass(@Valid @RequestBody StudentCourseClassSaveReqVO createReqVO) {
|
||||
return success(studentCourseClassService.createStudentCourseClass(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新学生的课程班级")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student-course-class:update')")
|
||||
public CommonResult<Boolean> updateStudentCourseClass(@Valid @RequestBody StudentCourseClassSaveReqVO updateReqVO) {
|
||||
studentCourseClassService.updateStudentCourseClass(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除学生的课程班级")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student-course-class:delete')")
|
||||
public CommonResult<Boolean> deleteStudentCourseClass(@RequestParam("id") Long id) {
|
||||
studentCourseClassService.deleteStudentCourseClass(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得学生的课程班级")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student-course-class:query')")
|
||||
public CommonResult<StudentCourseClassRespVO> getStudentCourseClass(@RequestParam("id") Long id) {
|
||||
StudentCourseClassDO studentCourseClass = studentCourseClassService.getStudentCourseClass(id);
|
||||
return success(BeanUtils.toBean(studentCourseClass, StudentCourseClassRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得学生的课程班级分页")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student-course-class:query')")
|
||||
public CommonResult<PageResult<StudentCourseClassRespVO>> getStudentCourseClassPage(@Valid StudentCourseClassPageReqVO pageReqVO) {
|
||||
PageResult<StudentCourseClassDO> pageResult = studentCourseClassService.getStudentCourseClassPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, StudentCourseClassRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出学生的课程班级 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:student-course-class:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportStudentCourseClassExcel(@Valid StudentCourseClassPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<StudentCourseClassDO> list = studentCourseClassService.getStudentCourseClassPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "学生的课程班级.xls", "数据", StudentCourseClassRespVO.class,
|
||||
BeanUtils.toBean(list, StudentCourseClassRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,106 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo.*;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.TeacherDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.CourseClassDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.service.basic_info.TeacherService;
|
||||
|
||||
@Tag(name = "管理后台 - 老师")
|
||||
@RestController
|
||||
@RequestMapping("/zhuguang/teacher")
|
||||
@Validated
|
||||
public class TeacherController {
|
||||
|
||||
@Resource
|
||||
private TeacherService teacherService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建老师")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:teacher:create')")
|
||||
public CommonResult<Long> createTeacher(@Valid @RequestBody TeacherSaveReqVO createReqVO) {
|
||||
return success(teacherService.createTeacher(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新老师")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:teacher:update')")
|
||||
public CommonResult<Boolean> updateTeacher(@Valid @RequestBody TeacherSaveReqVO updateReqVO) {
|
||||
teacherService.updateTeacher(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除老师")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:teacher:delete')")
|
||||
public CommonResult<Boolean> deleteTeacher(@RequestParam("id") Long id) {
|
||||
teacherService.deleteTeacher(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得老师")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:teacher:query')")
|
||||
public CommonResult<TeacherRespVO> getTeacher(@RequestParam("id") Long id) {
|
||||
TeacherDO teacher = teacherService.getTeacher(id);
|
||||
return success(BeanUtils.toBean(teacher, TeacherRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得老师分页")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:teacher:query')")
|
||||
public CommonResult<PageResult<TeacherRespVO>> getTeacherPage(@Valid TeacherPageReqVO pageReqVO) {
|
||||
PageResult<TeacherDO> pageResult = teacherService.getTeacherPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, TeacherRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出老师 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:teacher:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportTeacherExcel(@Valid TeacherPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<TeacherDO> list = teacherService.getTeacherPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "老师.xls", "数据", TeacherRespVO.class,
|
||||
BeanUtils.toBean(list, TeacherRespVO.class));
|
||||
}
|
||||
|
||||
// ==================== 子表(课程班级) ====================
|
||||
|
||||
@GetMapping("/course-class/list-by-teacher-id")
|
||||
@Operation(summary = "获得课程班级列表")
|
||||
@Parameter(name = "teacherId", description = "授课老师ID")
|
||||
@PreAuthorize("@ss.hasPermission('zhuguang:teacher:query')")
|
||||
public CommonResult<List<CourseClassDO>> getCourseClassListByTeacherId(@RequestParam("teacherId") Long teacherId) {
|
||||
return success(teacherService.getCourseClassListByTeacherId(teacherId));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 辅导员分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CounselorPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "辅导员的姓名", example = "李四")
|
||||
private String counselorName;
|
||||
|
||||
@Schema(description = "辅导员的性别")
|
||||
private String counselorSex;
|
||||
|
||||
@Schema(description = "辅导员的年龄")
|
||||
private Long counselorAge;
|
||||
|
||||
@Schema(description = "辅导员的邮箱")
|
||||
private String counselorEmail;
|
||||
|
||||
@Schema(description = "电话号码")
|
||||
private String phoneNumber;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 辅导员 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class CounselorRespVO {
|
||||
|
||||
@Schema(description = "唯一标识一个辅导员", requiredMode = Schema.RequiredMode.REQUIRED, example = "21456")
|
||||
@ExcelProperty("唯一标识一个辅导员")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "辅导员的姓名", example = "李四")
|
||||
@ExcelProperty("辅导员的姓名")
|
||||
private String counselorName;
|
||||
|
||||
@Schema(description = "辅导员的性别")
|
||||
@ExcelProperty("辅导员的性别")
|
||||
private String counselorSex;
|
||||
|
||||
@Schema(description = "辅导员的年龄")
|
||||
@ExcelProperty("辅导员的年龄")
|
||||
private Long counselorAge;
|
||||
|
||||
@Schema(description = "辅导员的邮箱")
|
||||
@ExcelProperty("辅导员的邮箱")
|
||||
private String counselorEmail;
|
||||
|
||||
@Schema(description = "电话号码")
|
||||
@ExcelProperty("电话号码")
|
||||
private String phoneNumber;
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.FixedClassTableDO;
|
||||
|
||||
@Schema(description = "管理后台 - 辅导员新增/修改 Request VO")
|
||||
@Data
|
||||
public class CounselorSaveReqVO {
|
||||
|
||||
@Schema(description = "唯一标识一个辅导员", requiredMode = Schema.RequiredMode.REQUIRED, example = "21456")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "辅导员的姓名", example = "李四")
|
||||
private String counselorName;
|
||||
|
||||
@Schema(description = "辅导员的性别")
|
||||
private String counselorSex;
|
||||
|
||||
@Schema(description = "辅导员的年龄")
|
||||
private Long counselorAge;
|
||||
|
||||
@Schema(description = "辅导员的邮箱")
|
||||
private String counselorEmail;
|
||||
|
||||
@Schema(description = "电话号码")
|
||||
private String phoneNumber;
|
||||
|
||||
@Schema(description = "固定班级列表")
|
||||
private List<FixedClassTableDO> fixedClassTables;
|
||||
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 课程班级分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CourseClassPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "学期")
|
||||
private String semester;
|
||||
|
||||
@Schema(description = "课程ID", example = "21103")
|
||||
private Long courseId;
|
||||
|
||||
@Schema(description = "班级号")
|
||||
private String classNum;
|
||||
|
||||
@Schema(description = "授课老师ID", example = "11374")
|
||||
private Long teacherId;
|
||||
|
||||
@Schema(description = "学生人数")
|
||||
private Integer peopleNum;
|
||||
|
||||
@Schema(description = "说明", example = "你说的对")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "课代表ID", example = "14228")
|
||||
private Long studentId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 课程班级 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class CourseClassRespVO {
|
||||
|
||||
@Schema(description = "课程班级ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "783")
|
||||
@ExcelProperty("课程班级ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "学期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("学期")
|
||||
private String semester;
|
||||
|
||||
@Schema(description = "课程ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21103")
|
||||
@ExcelProperty("课程ID")
|
||||
private Long courseId;
|
||||
|
||||
@Schema(description = "班级号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("班级号")
|
||||
private String classNum;
|
||||
|
||||
@Schema(description = "授课老师ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11374")
|
||||
@ExcelProperty("授课老师ID")
|
||||
private Long teacherId;
|
||||
|
||||
@Schema(description = "学生人数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("学生人数")
|
||||
private Integer peopleNum;
|
||||
|
||||
@Schema(description = "说明", example = "你说的对")
|
||||
@ExcelProperty("说明")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "课代表ID", example = "14228")
|
||||
@ExcelProperty("课代表ID")
|
||||
private Long studentId;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.StudentCourseClassDO;
|
||||
|
||||
@Schema(description = "管理后台 - 课程班级新增/修改 Request VO")
|
||||
@Data
|
||||
public class CourseClassSaveReqVO {
|
||||
|
||||
@Schema(description = "课程班级ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "783")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "学期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "学期不能为空")
|
||||
private String semester;
|
||||
|
||||
@Schema(description = "课程ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21103")
|
||||
@NotNull(message = "课程ID不能为空")
|
||||
private Long courseId;
|
||||
|
||||
@Schema(description = "班级号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "班级号不能为空")
|
||||
private String classNum;
|
||||
|
||||
@Schema(description = "授课老师ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11374")
|
||||
@NotNull(message = "授课老师ID不能为空")
|
||||
private Long teacherId;
|
||||
|
||||
@Schema(description = "学生人数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "学生人数不能为空")
|
||||
private Integer peopleNum;
|
||||
|
||||
@Schema(description = "说明", example = "你说的对")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "课代表ID", example = "14228")
|
||||
private Long studentId;
|
||||
|
||||
@Schema(description = "学生的课程班级列表")
|
||||
private List<StudentCourseClassDO> studentCourseClasss;
|
||||
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 课程分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CoursePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "课程名称", example = "李四")
|
||||
private String courseName;
|
||||
|
||||
@Schema(description = "课程类型", example = "1")
|
||||
private String courseType;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 课程 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class CourseRespVO {
|
||||
|
||||
@Schema(description = "主键,唯一标识一门课程", requiredMode = Schema.RequiredMode.REQUIRED, example = "822")
|
||||
@ExcelProperty("主键,唯一标识一门课程")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "课程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@ExcelProperty("课程名称")
|
||||
private String courseName;
|
||||
|
||||
@Schema(description = "课程类型", example = "1")
|
||||
@ExcelProperty("课程类型")
|
||||
private String courseType;
|
||||
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.CourseClassDO;
|
||||
|
||||
@Schema(description = "管理后台 - 课程新增/修改 Request VO")
|
||||
@Data
|
||||
public class CourseSaveReqVO {
|
||||
|
||||
@Schema(description = "主键,唯一标识一门课程", requiredMode = Schema.RequiredMode.REQUIRED, example = "822")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "课程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@NotEmpty(message = "课程名称不能为空")
|
||||
private String courseName;
|
||||
|
||||
@Schema(description = "课程类型", example = "1")
|
||||
private String courseType;
|
||||
|
||||
@Schema(description = "课程班级列表")
|
||||
private List<CourseClassDO> courseClasss;
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 系分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class DepartmentPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "系名称", example = "张三")
|
||||
private String departmentName;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 系 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class DepartmentRespVO {
|
||||
|
||||
@Schema(description = "唯一标识一个系", requiredMode = Schema.RequiredMode.REQUIRED, example = "4336")
|
||||
@ExcelProperty("唯一标识一个系")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "系名称", example = "张三")
|
||||
@ExcelProperty("系名称")
|
||||
private String departmentName;
|
||||
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.SpecialtyDO;
|
||||
|
||||
@Schema(description = "管理后台 - 系新增/修改 Request VO")
|
||||
@Data
|
||||
public class DepartmentSaveReqVO {
|
||||
|
||||
@Schema(description = "唯一标识一个系", requiredMode = Schema.RequiredMode.REQUIRED, example = "4336")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "系名称", example = "张三")
|
||||
private String departmentName;
|
||||
|
||||
@Schema(description = "专业列表")
|
||||
private List<SpecialtyDO> specialtys;
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 固定班级分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class FixedClassTablePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "年级")
|
||||
private String classGrade;
|
||||
|
||||
@Schema(description = "专业的id", example = "244")
|
||||
private Long specialtyId;
|
||||
|
||||
@Schema(description = "班级号")
|
||||
private String classNumber;
|
||||
|
||||
@Schema(description = "辅导员的id", example = "1100")
|
||||
private Long counselorId;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 固定班级 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class FixedClassTableRespVO {
|
||||
|
||||
@Schema(description = "主键,唯一标识一个班级", requiredMode = Schema.RequiredMode.REQUIRED, example = "5093")
|
||||
@ExcelProperty("主键,唯一标识一个班级")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "年级")
|
||||
@ExcelProperty("年级")
|
||||
private String classGrade;
|
||||
|
||||
@Schema(description = "专业的id", example = "244")
|
||||
@ExcelProperty("专业的id")
|
||||
private Long specialtyId;
|
||||
|
||||
@Schema(description = "班级号")
|
||||
@ExcelProperty("班级号")
|
||||
private String classNumber;
|
||||
|
||||
@Schema(description = "辅导员的id", example = "1100")
|
||||
@ExcelProperty("辅导员的id")
|
||||
private Long counselorId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.dormitory_check_in.DormRuleRecordsDO;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.late_signing.NightRuleRecordDO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.StudentDO;
|
||||
|
||||
@Schema(description = "管理后台 - 固定班级新增/修改 Request VO")
|
||||
@Data
|
||||
public class FixedClassTableSaveReqVO {
|
||||
|
||||
@Schema(description = "主键,唯一标识一个班级", requiredMode = Schema.RequiredMode.REQUIRED, example = "5093")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "年级")
|
||||
private String classGrade;
|
||||
|
||||
@Schema(description = "专业的id", example = "244")
|
||||
private Long specialtyId;
|
||||
|
||||
@Schema(description = "班级号")
|
||||
private String classNumber;
|
||||
|
||||
@Schema(description = "辅导员的id", example = "1100")
|
||||
private Long counselorId;
|
||||
|
||||
@Schema(description = "宿舍规则记录列表")
|
||||
private List<DormRuleRecordsDO> dormRuleRecordss;
|
||||
|
||||
@Schema(description = "晚自习规则记录列表")
|
||||
private List<NightRuleRecordDO> nightRuleRecords;
|
||||
|
||||
@Schema(description = "学生信息列表")
|
||||
private List<StudentDO> students;
|
||||
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 专业分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class SpecialtyPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "专业名称", example = "芋艿")
|
||||
private String specialtyName;
|
||||
|
||||
@Schema(description = "系的ID", example = "29319")
|
||||
private Long departmentId;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 专业 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class SpecialtyRespVO {
|
||||
|
||||
@Schema(description = "唯一标识一个专业", requiredMode = Schema.RequiredMode.REQUIRED, example = "10284")
|
||||
@ExcelProperty("唯一标识一个专业")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "专业名称", example = "芋艿")
|
||||
@ExcelProperty("专业名称")
|
||||
private String specialtyName;
|
||||
|
||||
@Schema(description = "系的ID", example = "29319")
|
||||
@ExcelProperty("系的ID")
|
||||
private Long departmentId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.FixedClassTableDO;
|
||||
|
||||
@Schema(description = "管理后台 - 专业新增/修改 Request VO")
|
||||
@Data
|
||||
public class SpecialtySaveReqVO {
|
||||
|
||||
@Schema(description = "唯一标识一个专业", requiredMode = Schema.RequiredMode.REQUIRED, example = "10284")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "专业名称", example = "芋艿")
|
||||
private String specialtyName;
|
||||
|
||||
@Schema(description = "系的ID", example = "29319")
|
||||
private Long departmentId;
|
||||
|
||||
@Schema(description = "固定班级列表")
|
||||
private List<FixedClassTableDO> fixedClassTables;
|
||||
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 学生的课程班级分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class StudentCourseClassPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "学生ID", example = "23139")
|
||||
private Long studentId;
|
||||
|
||||
@Schema(description = "课程班级的ID", example = "28654")
|
||||
private Long courseId;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 学生的课程班级 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class StudentCourseClassRespVO {
|
||||
|
||||
@Schema(description = "主键,唯一标识一条签到记录", requiredMode = Schema.RequiredMode.REQUIRED, example = "19839")
|
||||
@ExcelProperty("主键,唯一标识一条签到记录")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "学生ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23139")
|
||||
@ExcelProperty("学生ID")
|
||||
private Long studentId;
|
||||
|
||||
@Schema(description = "课程班级的ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28654")
|
||||
@ExcelProperty("课程班级的ID")
|
||||
private Long courseId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 学生的课程班级新增/修改 Request VO")
|
||||
@Data
|
||||
public class StudentCourseClassSaveReqVO {
|
||||
|
||||
@Schema(description = "主键,唯一标识一条签到记录", requiredMode = Schema.RequiredMode.REQUIRED, example = "19839")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "学生ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23139")
|
||||
@NotNull(message = "学生ID不能为空")
|
||||
private Long studentId;
|
||||
|
||||
@Schema(description = "课程班级的ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28654")
|
||||
@NotNull(message = "课程班级的ID不能为空")
|
||||
private Long courseId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 老师分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class TeacherPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "老师工号")
|
||||
private String teacherNumber;
|
||||
|
||||
@Schema(description = "老师姓名", example = "张三")
|
||||
private String teacherName;
|
||||
|
||||
@Schema(description = "老师性别 (M: 男, F: 女)")
|
||||
private String teacherSex;
|
||||
|
||||
@Schema(description = "老师年龄")
|
||||
private Integer teacherAge;
|
||||
|
||||
@Schema(description = "老师邮箱")
|
||||
private String teacherEmail;
|
||||
|
||||
@Schema(description = "电话号码")
|
||||
private String phoneNumber;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
|
||||
@Schema(description = "管理后台 - 老师 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class TeacherRespVO {
|
||||
|
||||
@Schema(description = "主键,唯一标识一个老师", requiredMode = Schema.RequiredMode.REQUIRED, example = "1420")
|
||||
@ExcelProperty("主键,唯一标识一个老师")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "老师工号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("老师工号")
|
||||
private String teacherNumber;
|
||||
|
||||
@Schema(description = "老师姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("老师姓名")
|
||||
private String teacherName;
|
||||
|
||||
@Schema(description = "老师性别 (M: 男, F: 女)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty(value = "老师性别 (M: 男, F: 女)", converter = DictConvert.class)
|
||||
@DictFormat("system_user_sex") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String teacherSex;
|
||||
|
||||
@Schema(description = "老师年龄", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("老师年龄")
|
||||
private Integer teacherAge;
|
||||
|
||||
@Schema(description = "老师邮箱")
|
||||
@ExcelProperty("老师邮箱")
|
||||
private String teacherEmail;
|
||||
|
||||
@Schema(description = "电话号码")
|
||||
@ExcelProperty("电话号码")
|
||||
private String phoneNumber;
|
||||
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package cn.iocoder.yudao.module.zhuguang.controller.admin.basic_info.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.iocoder.yudao.module.zhuguang.dal.dataobject.basic_info.CourseClassDO;
|
||||
|
||||
@Schema(description = "管理后台 - 老师新增/修改 Request VO")
|
||||
@Data
|
||||
public class TeacherSaveReqVO {
|
||||
|
||||
@Schema(description = "主键,唯一标识一个老师", requiredMode = Schema.RequiredMode.REQUIRED, example = "1420")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "老师工号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "老师工号不能为空")
|
||||
private String teacherNumber;
|
||||
|
||||
@Schema(description = "老师姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "老师姓名不能为空")
|
||||
private String teacherName;
|
||||
|
||||
@Schema(description = "老师性别 (M: 男, F: 女)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "老师性别 (M: 男, F: 女)不能为空")
|
||||
private String teacherSex;
|
||||
|
||||
@Schema(description = "老师年龄", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "老师年龄不能为空")
|
||||
private Integer teacherAge;
|
||||
|
||||
@Schema(description = "老师邮箱")
|
||||
private String teacherEmail;
|
||||
|
||||
@Schema(description = "电话号码")
|
||||
private String phoneNumber;
|
||||
|
||||
@Schema(description = "课程班级列表")
|
||||
private List<CourseClassDO> courseClasss;
|
||||
|
||||
}
|
||||
Loading…
Reference in new issue