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
0
投稿
猜你喜欢
- 一、Json简介Json(JavaScript Object Notation) 是一种轻量级的数据交换格式。它基于JS的一个子集。 Jso
- 默认情况下,如果应用以 Android Q 为目标平台,则在访问外部存储设备中的文件时会进入过滤视图。应用可以使用 Context.getE
- 配置两个parent的方法在向pom.xml 文件中添加依赖之前需要先添加spring-boot-starter-parent。spring
- maven打包指定jdk的版本问题今天遇到个问题,项目中新写了一个接口,其中用到了lambda表达式,本地跑是没问题的,但提交到gitLab
- 在以往的 Tomcat 项目中,一直习惯用 Ant 打包,使用 build.xml 配置,通过 ant -buildfile 的方式在机器上
- 最近要实现一个功能,就是checkbox跨页多选,在网上看了一下,资料很少,而且大多是不完全的。不过经过我的努力,终于做出来了。
- @Autowired注解在抽象类中失效最近在工作中遇到这个问题,在抽象类中使用Autowired这个注解,注入mybatis的dao时,总是
- 在看别人的关于CopyOnWriteArrayList 这个类的时候,看到有人提出了关于:数组拷贝的方法Arrays.copyOf() 的问
- 静态代理: 由我们开发者自己手动创建或者在程序运行前就已经存在的代理类,静态代理通常只代理一个类, * 是代理一个接口下的多个实现类。动态
- 在android开发中,经常会遇到一个view需要它能够支持滑动的需求。下面通过本篇文章给大家介绍android view移动的六种方法。l
- Java中字符串中子串的查找共有四种方法(indexof()) indexOf 方法返回一个整数值,指出 String 对象内子字符串的开始
- 本文以实例形式详细讲述了Java的反射机制,是Java程序设计中重要的技巧。分享给大家供大家参考。具体分析如下:首先,Reflection是
- 在互联网的服务端开发的时候,我们很经常要在一个项目中去调用不同的数据库。在这种情况下,必然要涉及到多数据源问题。那么,我们该如何解决多数据源
- Java 8 lambda表达式引入详解及实例eclipse下载安装Help -> EclipseMarketplace ->
- 1. 线程转储简介线程转储(Thread Dump)就是JVM中所有线程状态信息的一次快照。线程转储一般使用文本格式, 可以将其保存到文本文
- 做快递面单打印模板,快递要求纸张大小100 x 150mm。PageSize.A4=595 x 842A4尺寸=210mm×297mm故设置
- 本文实例讲述了Java Swing中JTable渲染器与编辑器用法。分享给大家供大家参考,具体如下:JTable的内容、外观、事件响应在很大
- 配置不生效的解决办法注意:如果配置不生效,则说明spring优先加载了其他配置:解决办法:添加启动参数 -Dlogging.config=c
- Java xml出现错误 javax.xml.transform.TransformerException: java.lang.NullP
- Spring中有很多继承于aware中的接口,这些接口到底是做什么用到的。aware,翻译过来是知道的,已感知的,意识到的,所以这些接口从字