Java毕业设计实战之平行志愿管理系统的实现
作者:qq_1334611189 发布时间:2023-09-12 14:34:23
标签:Java,平行志愿管理,毕业设计
一、项目简述
本系统功能包括: 系统管理,招生计划,学生管理,录取结果,自动分配,调剂管理等等。
二、项目运行
环境配置:
Jdk1.8 + Tomcat8.5 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。
项目技术:
Springboot + Maven + mybatis+ Vue 等等组成,B/S模式 + Maven管理等等。
学生管理控制层:
@RestController
@RequestMapping("/student")
public class StudentController {
@Autowired
IStudentService studentService;
@RequestMapping("/getStudentRaw")
public JsonResponse getStudentRaw(@RequestParam(required = false, defaultValue = "1") Integer currentPage){
if(currentPage == null || currentPage<=0)
return new JsonResponse(JsonResponse.INVALID_REQUEST,null, null);
return new JsonResponse(JsonResponse.OK, studentService.getStudentRaw(currentPage), null);
}
@RequestMapping("/getAdjustStudentRaw")
public JsonResponse getAdjustStudentRaw(@RequestParam(required = false, defaultValue = "1") int currentPage){
return new JsonResponse(JsonResponse.OK, studentService.getAdjustStudentRaw(currentPage), null);
}
@RequestMapping("/getExitStudentRaw")
public JsonResponse getExitStudentRaw(@RequestParam(required = false, defaultValue = "1") int currentPage){
return new JsonResponse(JsonResponse.OK, studentService.getExitStudentRaw(currentPage), null);
}
@RequestMapping("/doEnroll")
public JsonResponse doEnroll(){
studentService.doEnroll();
return new JsonResponse(JsonResponse.OK, null, null);
}
@RequestMapping("/doAdjust")
public JsonResponse doAdjust(){
studentService.doAdjust();
return new JsonResponse(JsonResponse.OK, null, null);
}
// StatisticsResult getResult(int currentPage, boolean desc);
@RequestMapping("/getResult")
public JsonResponse getResult(@RequestParam(required = false, defaultValue = "1") int currentPage,
@RequestParam(required = false, defaultValue = "false") boolean desc,
QueryResultOption option){
return new JsonResponse(JsonResponse.OK, studentService.getResult(currentPage, desc, option), null);
}
// StatisticsResult getResultByDepartment( int departmentId, int currentPage, boolean desc);
/**
* @description t通过学院、专业、排名查询已弃用,请使用上面的getResult
* @author 李宏鑫
* @param null
* @return
* @updateTime 2021/1/7 20:53
* @throws
*/
@RequestMapping("/getResultByDepartment")
@Deprecated
public JsonResponse getResultByDepartment(int departmentId, @RequestParam(required = false, defaultValue = "1") int currentPage, @RequestParam(required = false, defaultValue = "false") boolean desc){
return new JsonResponse(JsonResponse.OK, studentService.getResultByDepartment(departmentId, currentPage, desc), null);
}
// StatisticsResult getResultByMajor( String majorId, int currentPage, boolean desc);
@RequestMapping("/getResultByMajor")
@Deprecated
public JsonResponse getResultByMajor(String majorId, @RequestParam(required = false, defaultValue = "1") int currentPage, @RequestParam(required = false, defaultValue = "false") boolean desc){
return new JsonResponse(JsonResponse.OK, studentService.getResultByMajor(majorId, currentPage, desc), null);
}
@RequestMapping("/searchStudent")
@Deprecated
public JsonResponse searchStudent(@RequestParam(required = false, defaultValue = "1") int currentPage,String keyword){
return new JsonResponse(JsonResponse.OK, studentService.searchStudent(currentPage,keyword), null);
}
@RequestMapping("/searchStudentByCandidate")
public JsonResponse searchStudentByCandidate(@RequestParam(required = false, defaultValue = "1") int currentPage,String keyword){
return new JsonResponse(JsonResponse.OK, studentService.searchStudentByCandidate(currentPage,keyword), null);
}
@RequestMapping("/getStudentBeforeRank")
public JsonResponse getStudentBeforeRank(@RequestParam(required = false, defaultValue = "1") int currentPage, int rank){
return new JsonResponse(JsonResponse.OK, studentService.getStudentBeforeRank(currentPage, rank), null);
}
@RequestMapping("/getStatisticsResult")
public JsonResponse getStatisticsResult(){
return new JsonResponse(JsonResponse.OK, studentService.getStatisticsResult(), null);
}
// List<Map<String, Object>> getResultInDepartment(int departmentId);
@RequestMapping("/getStatisticsResultInDepartment")
public JsonResponse getStatisticsResultInDepartment(){
return new JsonResponse(JsonResponse.OK, studentService.getStatisticsResultInDepartment(), null);
}
// List<Map<String, Object>> getResultInMajor(String majorId);
@RequestMapping("/getStatisticsResultInMajor")
public JsonResponse getStatisticsResultInMajor(){
return new JsonResponse(JsonResponse.OK, studentService.getStatisticsResultInMajor(), null);
}
// Map<String, Integer> getDistribute();
@RequestMapping("/getDistribute")
public JsonResponse getDistribute(){
return new JsonResponse(JsonResponse.OK, studentService.getDistribute(), null);
}
// Map<String, Integer> getDistributeInProvince(String province);
@RequestMapping("/getDistributeInProvince")
public JsonResponse getDistributeInProvince(String province){
return new JsonResponse(JsonResponse.OK, studentService.getDistributeInProvince(province), null);
}
// Map<String, Integer> getGradeDistribute();
@RequestMapping("/getGradeDistribute")
public JsonResponse getGradeDistribute(){
return new JsonResponse(JsonResponse.OK, studentService.getGradeDistribute(), null);
}
// Map<String, Integer> getGradeDistributeByDepartment( int departmentId);
@RequestMapping("/getGradeDistributeByDepartment")
public JsonResponse getGradeDistributeByDepartment(int departmentId){
return new JsonResponse(JsonResponse.OK, studentService.getGradeDistributeByDepartment(departmentId), null);
}
// Map<String, Integer> getGradeDistributeByMajor(String majorId);
@RequestMapping("/getGradeDistributeByMajor")
public JsonResponse getGradeDistributeByMajor(String majorId){
return new JsonResponse(JsonResponse.OK, studentService.getGradeDistributeByMajor(majorId), null);
}
// Map<String, Integer> getCountDistributeInDepartment();
@RequestMapping("/getCountDistributeInDepartment")
public JsonResponse getCountDistributeInDepartment(){
return new JsonResponse(JsonResponse.OK, studentService.getCountDistributeInDepartment(), null);
}
// Map<String, Integer> getCountDistributeInMajor();
@RequestMapping("/getCountDistributeInMajor")
public JsonResponse getCountDistributeInMajor(){
return new JsonResponse(JsonResponse.OK, studentService.getCountDistributeInMajor(), null);
}
// Map<String, Integer> getCountDistributeInMajorByDepartment(int departmentId);
@RequestMapping("/getCountDistributeInMajorByDepartment")
public JsonResponse getCountDistributeInMajorByDepartment(int departmentId){
return new JsonResponse(JsonResponse.OK, studentService.getCountDistributeInMajorByDepartment(departmentId), null);
}
@RequestMapping("/reset")
@Deprecated
public JsonResponse reset(){
studentService.reset();
return new JsonResponse(JsonResponse.OK, null, null);
}
@RequestMapping("/formalReady")
@Deprecated
public JsonResponse formalReady(){
studentService.formallyReady();
return new JsonResponse(JsonResponse.OK, null, null);
}
}
登录管理控制层:
@RestController
@RequestMapping("/login")
public class LoginController {
@Autowired
LoginProperties properties;
@Resource(name = "globalStorage")
Map<String, Object> storage;
@RequestMapping("/doLogin")
public JsonResponse doLogin(String name, String pass, HttpSession session){
if(properties.getAdminName().equals(name) && properties.getAdminPass().equals(pass)){
storage.put("authSession", session);
return new JsonResponse(JsonResponse.OK, null, null);
} else {
return new JsonResponse(JsonResponse.AUTH_ERR, null, "登陆失败");
}
}
@RequestMapping("/checkLogin")
public JsonResponse checkLogin(HttpSession session){
// if (session.equals(storage.get("authSession"))){
return new JsonResponse(JsonResponse.OK, null, "已登录");
// } else {
// return new JsonResponse(JsonResponse.AUTH_ERR, null, "未登录");
// }
}
@RequestMapping("/logout")
public JsonResponse logout(){
storage.remove("authSession");
return new JsonResponse(JsonResponse.OK, null, "注销成功");
}
}
文件管理控制层:
@Controller
@RequestMapping("/file")
public class FileController {
@Autowired
IExcelService excelService;
@ResponseBody
@RequestMapping("/uploadMajor")
public JsonResponse uploadMajorExcel(MultipartFile file) throws IOException {
excelService.ReadMajorExcel(file);
return new JsonResponse(JsonResponse.OK,null,null);
}
@ResponseBody
@RequestMapping("/uploadStudent")
public JsonResponse uploadStudentExcel(MultipartFile file) throws IOException {
excelService.ReadStudentExcel(file);
return new JsonResponse(JsonResponse.OK,null,null);
}
@RequestMapping("/exportResult")
public void export(HttpServletResponse response) throws IOException {
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
String fileName = URLEncoder.encode("录取结果", "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
excelService.doExport(response.getOutputStream());
}
@RequestMapping("/exportExit")
public void exportExit(HttpServletResponse response) throws IOException {
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
String fileName = URLEncoder.encode("退档结果", "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
excelService.exportExitStudent(response.getOutputStream());
}
}
来源:https://blog.csdn.net/m0_59687645/article/details/122209354


猜你喜欢
- 今天同事写一个查询接口的时候,出错:元素内容必须由格式正确的字符数据或标记组成。错误原因:mybatis查询的时候,需要用到运算符 小于号:
- 这篇文章主要介绍了Java模拟多线程实现抢票,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考
- 1.ArrayList 是基数组结构的,需要连续的内存空间从构造函数可以看出,ArrayList内部用一个Object数组来保存数据。对于无
- 目录第一种第二种第三种随机数的产生在一些代码中很常用,也是我们必须要掌握的。而java中产生随机数的方法主要有三种:第一种:new Rand
- 本文实例讲述了Android编程中Tween动画和Frame动画实现方法。分享给大家供大家参考,具体如下:Animation主要有两种动画模
- 原理:使用Popup控件,并且设置Popup控件的位置居中。1:新建自定义控件PopupBorder,作为Popup的child。代码如下:
- 1、java.util.concurrent.atomic 的包里有AtomicBoolean, AtomicInteger,AtomicL
- 一、什么是简单工厂模式简单工厂模式又称为静态工厂模式,实质是由一个工厂类根据传入的参数,动态决定应该创建哪一个产品类(这些产品类继承自一个父
- 在Android开发中我们经常有这样的需求,从服务器上下载xml或者JSON类型的数据,其中包括一些图片资源,本demo模拟了这个需求,从网
- PagerBottomTabStrip 是一个基本按谷歌Material Design规范完成的安卓底部导航栏控件官方设计规范:https:
- 指针是什么?指针(Pointer)是一个特殊的变量,它里面存储的数值被解释成为内存里的一个地址。换句话说就是可以通过指针找到以它为地址的内存
- 1.方法概述什么是方法方法(method)是将具有独立功能的代码块组织成为一个整体,使其具有图书功能的代码集注意:方法必须先创建才可以使用,
- 一、搭建 mvc 环境新建一个 module 模块,创建 maven 工程,步骤跟以前一样,各种配置文件内容也可以拷贝修改一下即可。二、创建
- 前面一篇文章我们介绍了使用CAS算法实现的非阻塞队列ConcurrentLinedQueue, 下面我们来介绍使用独占锁实现的阻塞队列Lin
- 1. 简介很早就听说了Google的Lifecycle组件,因为项目没有使用过,所以并没有过多的接触。不过最近看到了一篇文章,其中的一条评论
- 在最近的项目中有个需求是这样的:入参封装成JSON,EXAMPLE:{ "uuid": "iamauuid&q
- 异常的英文单词是exception,字面翻译就是“意外、例外”的意思,也就是非正常情况。事实上,异常本质上是程序上的错误,包括程序逻辑错误和
- 类的结构包括 :1. 成员变量2. 成员方法3. 构造方法4. 代码块5. 内部类第一 构造方法的作用主要有以下三方面的作用:(1)在构造方
- 问题的起源在项目里,有时候需要实现一个图片轮播的效果,用来展示Banner。同时,图片能循环播放,下面还有一排小圆点来指示当前轮播到哪一页了
- 在讲述这个模式之前,我们先看一个案例:游戏回档游戏的某个场景,一游戏角色有生命力、攻击力、防御力等数据,在打Boss前和后会不一样,我们允许