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)目之小說(shuō)在線閱讀系統(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)文章
在已經(jīng)使用mybatis的項(xiàng)目里引入mybatis-plus,結(jié)果不能共存的解決
這篇文章主要介紹了在已經(jīng)使用mybatis的項(xiàng)目里引入mybatis-plus,結(jié)果不能共存的解決方案,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-03-03
Java數(shù)據(jù)結(jié)構(gòu)及算法實(shí)例:選擇排序 Selection Sort
這篇文章主要介紹了Java數(shù)據(jù)結(jié)構(gòu)及算法實(shí)例:選擇排序 Selection Sort,本文直接給出實(shí)現(xiàn)代碼,代碼中包含詳細(xì)注釋,需要的朋友可以參考下2015-06-06
詳解spring中使用Elasticsearch的代碼實(shí)現(xiàn)
本篇文章主要介紹了詳解spring中使用Elasticsearch的代碼實(shí)現(xiàn),具有一定的參考價(jià)值,有興趣的可以了解一下2017-05-05
swagger的請(qǐng)求參數(shù)不顯示,@Apimodel的坑點(diǎn)及解決
這篇文章主要介紹了swagger的請(qǐng)求參數(shù)不顯示,@Apimodel的坑點(diǎn)及解決方案,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-11-11
關(guān)于Spring中@Transactional事務(wù)回滾的注意事項(xiàng)
這篇文章主要介紹了關(guān)于Spring中@Transactional事務(wù)回滾的注意事項(xiàng),回滾(Rollback)指的是程序或數(shù)據(jù)處理錯(cuò)誤,將程序或數(shù)據(jù)恢復(fù)到上一次正確狀態(tài)的行為?;貪L包括程序回滾和數(shù)據(jù)回滾等類型,需要的朋友可以參考下2023-05-05
Java實(shí)現(xiàn)操作JSON的便捷工具類完整實(shí)例【重寫(xiě)Google的Gson】
這篇文章主要介紹了Java實(shí)現(xiàn)操作JSON的便捷工具類,基于重寫(xiě)Google的Gson實(shí)現(xiàn),涉及java針對(duì)json數(shù)據(jù)的各種常見(jiàn)轉(zhuǎn)換操作實(shí)現(xiàn)技巧,需要的朋友可以參考下2017-10-10

