Java 實(shí)戰(zhàn)項(xiàng)目基于遺傳算法學(xué)校排課系統(tǒng)的實(shí)現(xiàn)流程
一、項(xiàng)目簡(jiǎn)述
本系統(tǒng)功能包括:
排課管理,課程管理,講師管理,班級(jí)管理,學(xué)生管理,教學(xué)資料,學(xué)習(xí)文檔,在線測(cè)試,教材列表,教學(xué)設(shè)計(jì),幫助中心等等功能。
二、項(xiàng)目運(yùn)行
環(huán)境配置:
Jdk1.8 + Tomcat8.5 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。
項(xiàng)目技術(shù):
Springboot + Maven + mybatis+ Vue 等等組成,B/S模式 + Maven管理等等。






管理員控制器:
/**
* 管理員控制器
*/
@RestController
public class AdminController {
@Resource(name = "adminService")
private IAdminService adminService;
/**
* 管理員 查詢管理員列表
*/
@RequestMapping(value = "/admin/qryPage", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.admin})
public ListResult<Admin> qryPage(HttpRequest request) {
Map<String, Object> 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("login_name")) {
param.put("login_name", request.getString("login_name"));
}
if (request.containsKey("name")) {
param.put("name", request.getString("name"));
}
return adminService.qryPage(param, pageNo, pageSize);
}
/**
* 管理員 添加管理員
*/
@RequestMapping(value = "/admin/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.admin})
public Result<Admin> insert(HttpRequest request) {
Admin admin = new Admin();
admin.setLoginName(request.getString("login_name"));
admin.setName(request.getString("admin_name"));
admin.setPwd(request.getString("login_name"));
admin.setSex(request.getInteger("sex"));
admin.setUpdateTime(new Date());
return adminService.insert(admin, ImageUtil.stringToBytes(request.getString("admin_image")));
}
/**
* 管理員 更新管理員
*/
@RequestMapping(value = "/admin/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.admin})
public Result<Admin> update(HttpRequest request) {
Admin admin = new Admin();
admin.setLoginName(request.getString("login_name"));
admin.setName(request.getString("admin_name"));
admin.setPwd(request.getString("login_name"));
admin.setSex(request.getInteger("sex"));
admin.setUpdateTime(new Date());
return adminService.update(admin, ImageUtil.stringToBytes(request.getString("admin_image")));
}
/**
* 管理員 刪除管理員
*/
@RequestMapping(value = "/admin/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.admin})
public Result<Admin> del(HttpRequest request) {
List<String> adminIdList = new ArrayList<>();
JSONArray array = request.getJSONArray("admin_id_list");
for (int i = 0; i < array.size(); i++) {
adminIdList.add(array.getString(i));
}
return adminService.del(adminIdList);
}
}
學(xué)生控制器:
/**
* 學(xué)生控制器
*/
@RestController
public class StudentController {
@Resource(name = "studentService")
private IStudentService studentService;
/**
* 管理員 查詢學(xué)生列表
*/
@RequestMapping(value = "/student/qryPage", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.admin})
public ListResult<Student> qryPage(HttpRequest request) {
Map<String, Object> 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("student_id")) {
param.put("student_id", request.getString("student_id"));
}
if (request.containsKey("name")) {
param.put("name", request.getString("name"));
}
return studentService.qryPage(param, pageNo, pageSize);
}
@RequestMapping(value = "/student/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.admin})
public Result<Student> insert(HttpRequest request) {
Student student = new Student();
student.setStudentId(request.getString("student_id"));
student.setName(request.getString("student_name"));
student.setPwd(request.getString("student_id"));
student.setSex(request.getInteger("sex"));
student.setClassId(request.getString("class_id"));
student.setUpdateTime(new Date());
return studentService.insert(student, ImageUtil.stringToBytes(request.getString("student_image")));
}
@RequestMapping(value = "/student/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.admin})
public Result<Student> update(HttpRequest request) {
Student student = new Student();
student.setStudentId(request.getString("student_id"));
student.setName(request.getString("student_name"));
student.setPwd(request.getString("student_id"));
student.setSex(request.getInteger("sex"));
student.setClassId(request.getString("class_id"));
student.setUpdateTime(new Date());
return studentService.update(student, ImageUtil.stringToBytes(request.getString("student_image")));
}
@RequestMapping(value = "/student/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.admin})
public Result<Student> del(HttpRequest request) {
List<String> studentIdList = new ArrayList<>();
JSONArray array = request.getJSONArray("student_id_list");
for (int i = 0; i < array.size(); i++) {
studentIdList.add(array.getString(i));
}
return studentService.del(studentIdList);
}
}
教師控制器:
/**
* 教師控制器
*/
@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<Teacher> qryPage(HttpRequest request) {
Map<String, Object> 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<Teacher> 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<Teacher> 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<Teacher> del(HttpRequest request) {
List<String> 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<Teacher> qryAllList() {
return teacherService.qryAllList();
}
}
到此這篇關(guān)于Java 實(shí)戰(zhàn)項(xiàng)目基于遺傳算法學(xué)校排課系統(tǒng)的實(shí)現(xiàn)流程的文章就介紹到這了,更多相關(guān)Java 排課系統(tǒng)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
- Java?實(shí)戰(zhàn)項(xiàng)目之家政服務(wù)平臺(tái)系統(tǒng)的實(shí)現(xiàn)流程
- Java?實(shí)戰(zhàn)項(xiàng)目之學(xué)生信息管理系統(tǒng)的實(shí)現(xiàn)流程
- Java 實(shí)戰(zhàn)項(xiàng)目之畢業(yè)設(shè)計(jì)管理系統(tǒng)的實(shí)現(xiàn)流程
- Java 實(shí)戰(zhàn)項(xiàng)目之教材管理系統(tǒng)的實(shí)現(xiàn)流程
- Java 實(shí)戰(zhàn)項(xiàng)目之小說在線閱讀系統(tǒng)的實(shí)現(xiàn)流程
- Java 實(shí)戰(zhàn)項(xiàng)目之在線點(diǎn)餐系統(tǒng)的實(shí)現(xiàn)流程
- Java 實(shí)戰(zhàn)項(xiàng)目之精品養(yǎng)老院管理系統(tǒng)的實(shí)現(xiàn)流程
- Java 實(shí)戰(zhàn)項(xiàng)目之誠(chéng)途旅游系統(tǒng)的實(shí)現(xiàn)流程
- Java 實(shí)戰(zhàn)項(xiàng)目之精美物流管理系統(tǒng)的實(shí)現(xiàn)流程
- Java?實(shí)戰(zhàn)范例之校園二手市場(chǎng)系統(tǒng)的實(shí)現(xiàn)
相關(guān)文章
詳解Java是如何通過接口來創(chuàng)建代理并進(jìn)行http請(qǐng)求
今天給大家?guī)淼闹R(shí)是關(guān)于Java的,文章圍繞Java是如何通過接口來創(chuàng)建代理并進(jìn)行http請(qǐng)求展開,文中有非常詳細(xì)的介紹及代碼示例,需要的朋友可以參考下2021-06-06
Java實(shí)現(xiàn)批量下載(打包成zip)的實(shí)現(xiàn)
這篇文章主要介紹了Java實(shí)現(xiàn)批量下載(打包成zip)的實(shí)現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2020-11-11
Mybatis-plus的selectPage()分頁(yè)查詢不生效問題解決
本文主要介紹了Mybatis-plus的selectPage()分頁(yè)查詢不生效問題解決,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2023-01-01
Java多線程編程中使用Condition類操作鎖的方法詳解
Condition是java.util.concurrent.locks包下的類,提供了對(duì)線程鎖的更精細(xì)的控制方法,下面我們就來看一下Java多線程編程中使用Condition類操作鎖的方法詳解2016-07-07
擴(kuò)展Hibernate使用自定義數(shù)據(jù)庫(kù)連接池的方法
這篇文章主要介紹了擴(kuò)展Hibernate使用自定義數(shù)據(jù)庫(kù)連接池的方法,涉及Hibernate數(shù)據(jù)庫(kù)操作擴(kuò)展的相關(guān)技巧,需要的朋友可以參考下2016-03-03
使用SpringBoot整合Activiti6工作流的操作方法
這篇文章主要介紹了使用SpringBoot整合Activiti6工作流,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2022-07-07

