Java毕业设计实战之平行志愿管理系统的实现

 更新时间:2022年02月05日 14:15:27   作者:qq_1334611189  
这是一个使用了java+Springboot+Maven+mybatis+Vue+Mysql开发的图片平行志愿管理系统,是一个毕业设计的实战练习,具有志愿管理该有的所有功能,感兴趣的朋友快来看看吧

一、项目简述

本系统功能包括: 系统管理,招生计划,学生管理,录取结果,自动分配,调剂管理等等。

二、项目运行

环境配置:

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());
    }
}

到此这篇关于Java毕业设计实战之平行志愿管理系统的实现的文章就介绍到这了,更多相关Java 平行志愿管理内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!

相关文章

  • 关于SpringBoot拦截器拦截静态资源的问题

    关于SpringBoot拦截器拦截静态资源的问题

    这篇文章主要介绍了关于SpringBoot拦截器拦截静态资源的问题,具有很好的参考价值,希望对大家有所帮助。如有错误或未考虑完全的地方,望不吝赐教
    2023-07-07
  • Hadoop MultipleOutputs输出到多个文件中的实现方法

    Hadoop MultipleOutputs输出到多个文件中的实现方法

    这篇文章主要介绍了 Hadoop MultipleOutputs输出到多个文件中的实现方法的相关资料,希望通过本文能帮助到大家,需要的朋友可以参考下
    2017-10-10
  • Java中Reactor的反应器模式详解

    Java中Reactor的反应器模式详解

    这篇文章主要介绍了Java中Reactor的反应器模式详解,Reactor反应器模式有点儿类似事件驱动模式,当有事件触发时,事件源会将事件dispatch分发到handler处理器进行事件处理,反应器模式中的反应器角色类似于事件驱动模式中的dispatcher事件分发器角色,需要的朋友可以参考下
    2023-12-12
  • Feign远程调用传递对象参数并返回自定义分页数据的过程解析

    Feign远程调用传递对象参数并返回自定义分页数据的过程解析

    这篇文章主要介绍了Feign远程调用传递对象参数并返回自定义分页数据的过程解析,具有很好的参考价值,希望对大家有所帮助。如有错误或未考虑完全的地方,望不吝赐教
    2022-03-03
  • SpringBoot超详细讲解@Value注解

    SpringBoot超详细讲解@Value注解

    在使用spring框架的项目中,@Value是经常使用的注解之一。作用是将配置文件中的键对应的值分配给某类内带注解的属性。本文使您系统地了解@Value的用法。在使用Spring框架的项目中@Value是经常使用的注解之一,其作用是将配置文件中的键对应的值分配给某类内带注解的属性
    2022-07-07
  • 关于Hystrix的监控及可视化面板

    关于Hystrix的监控及可视化面板

    这篇文章主要介绍了关于Hystrix的监控及可视化面板,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教
    2023-08-08
  • 详解Java如何优雅的实现异常捕获

    详解Java如何优雅的实现异常捕获

    在一个优秀的项目中一定少不了对程序流程良好的异常捕获与日志打印,所以本文主要为大家介绍了如何优雅的实现异常捕获与日志打印输出,有需要的可以参考下
    2023-09-09
  • 利用5分钟快速搭建一个springboot项目的全过程

    利用5分钟快速搭建一个springboot项目的全过程

    Spring Boot的监控能够使开发者更好地掌控应用程序的运行状态,下面这篇文章主要给大家介绍了关于如何利用5分钟快速搭建一个springboot项目的相关资料,文中通过示例代码介绍的非常详细,需要的朋友可以参考下
    2022-05-05
  • Java异常类型以及处理实例详解

    Java异常类型以及处理实例详解

    在程序设计中,进行异常处理是非常关键和重要的一部分,一个程序的异常处理框架的好坏直接影响到整个项目的代码质量以及后期维护成本和难度,这篇文章主要给大家介绍了关于Java异常类型以及处理的相关资料,需要的朋友可以参考下
    2021-07-07
  • 谈Java static关键字的用法与好处

    谈Java static关键字的用法与好处

    这篇文章主要为大家详细介绍了Java static关键字的用法与好处,感兴趣的朋友可以参考一下
    2016-05-05

最新评论