Java项目:基于遗传算法学校排课系统(java+Springboot+Maven+mybatis+Vue+Mysql)

一、项目简述

本系统功能包括:
排课管理,课程管理,讲师管理,班级管理,学生管理,教学资料,教材列表,教学设计,帮助中心等等功能。
二、项目运行

环境配置:

Jdk1.8 + IDEA+MYSQL5.7
项目技术:

Springboot + Maven + mybatis+ Vue 等等组成,B/S模式 + Maven管理等。

废话不多说,直接上演示视频查看,由于上前后端分离系统,前段安装插件有点繁琐,如需帮助或者需要项目源码,请联系作者QQ969684301.

视频1

视频二

/**
 * 教师控制器
 */
@RestController
public class TeacherController {
 
    @Resource(name = "teacherService")
    private ITeacherService teacherService;
 
    /**
     * 管理员 查询教师列表
     */
    @RequestMapping(value = "/teacher/qryPage", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
    @RoleAnnotation(types = {RoleEnum.admin})
    public ListResult qryPage(HttpRequest request) {
        Map param = new HashMap<>();
        int pageNo = request.containsKey("page_no") ? request.getInteger("page_no") : 1;
        int pageSize = request.containsKey("page_size") ? request.getInteger("page_size") : 20;
        if (request.containsKey("teacher_id")) {
            param.put("teacher_id", request.getString("teacher_id"));
        }
        if (request.containsKey("name")) {
            param.put("name", request.getString("name"));
        }
        return teacherService.qryPage(param, pageNo, pageSize);
    }
 
    /**
     * 管理员 添加教师
     */
    @RequestMapping(value = "/teacher/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
    @RoleAnnotation(types = {RoleEnum.admin})
    public Result insert(HttpRequest request) {
        Teacher teacher = new Teacher();
        teacher.setTeacherId(request.getString("teacher_id"));
        teacher.setName(request.getString("teacher_name"));
        teacher.setPwd(request.getString("teacher_id"));
        teacher.setSex(request.getInteger("sex"));
        teacher.setUpdateTime(new Date());
        return teacherService.insert(teacher, ImageUtil.stringToBytes(request.getString("teacher_image")));
    }
 
    /**
     * 管理员 更新教师属性
     */
    @RequestMapping(value = "/teacher/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
    @RoleAnnotation(types = {RoleEnum.admin})
    public Result update(HttpRequest request) {
        Teacher teacher = new Teacher();
        teacher.setTeacherId(request.getString("teacher_id"));
        teacher.setName(request.getString("teacher_name"));
        teacher.setPwd(request.getString("teacher_id"));
        teacher.setSex(request.getInteger("sex"));
        teacher.setUpdateTime(new Date());
        return teacherService.update(teacher, ImageUtil.stringToBytes(request.getString("teacher_image")));
    }
 
    /**
     * 管理员 删除教师
     */
    @RequestMapping(value = "/teacher/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
    @RoleAnnotation(types = {RoleEnum.admin})
    public Result del(HttpRequest request) {
        List teacherIdList = new ArrayList<>();
        JSONArray array = request.getJSONArray("teacher_id_list");
        for (int i = 0; i < array.size(); i++) {
            teacherIdList.add(array.getString(i));
        }
        return teacherService.del(teacherIdList);
    }
 
    /**
     * 管理员 查询所有任教老师
     */
    @RequestMapping(value = "/teacher/qryAllList", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
    @RoleAnnotation(types = {RoleEnum.admin})
    public ListResult qryAllList() {
        return teacherService.qryAllList();
    }
}

你可能感兴趣的:(自动排课系统,遗传算法,Java项目,maven,java,spring,boot,排序算法,算法)