Java项目:SSH毕业生离校就业分析管理平台

作者主页:源码空间站2022

 简介:Java领域优质创作者、Java项目、学习资料、技术互助

文末获取源码

 

作者主页:夜未央5788

 简介:Java领域优质创作者、Java项目、学习资料、技术互助

文末获取源码

项目介绍

本项目分为管理员、辅导员、学生三种角色。

辅导员角色包含以下功能:

辅导员登陆,毕业生信息管理,招聘信息管理,学生管理,个人信息修改,数据可视化展示等功能。

管理员角色包含以下功能:
管理员登陆,学院管理,专业管理,班级管理,毕业生信息管理,招聘会宣讲管理,管理员管理,就业处老师管理,辅导员管理,学生管理,个人信息修改等功能。

学生角色包含以下功能:
学生角色登陆,学校可视化管理,学院视角,就业对比,个人信息查看,档案信息管理,就业信息登记等功能。

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 
5.数据库:MySql 5.7版本;

6.是否Maven项目:否;

技术栈

1.  后端:mysql+Spring+ SpringMVC + hibernate + SpringSecurity
2. 前端:JSP+CSS+JavaScript+jQuery+ligerUI+echarts

使用说明

1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目;
3. 将项目中jdbc.properties配置文件中的数据库配置改为自己的配置;
4. 运行项目,输入http://localhost:8080/cemap/ 登录

运行截图

辅导员角色

管理员角色

学生角色 

相关代码 

AdministrativeClassController

package com.hyf.cemap.controller.base;

import java.util.List;
import java.util.UUID;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.hyf.cemap.bean.po.base.AdministrativeClass;
import com.hyf.cemap.bean.po.base.College;
import com.hyf.cemap.bean.po.base.Profession;
import com.hyf.cemap.bean.vo.ResultVO;
import com.hyf.cemap.service.GraduateInformationServiceImpl;
import com.hyf.cemap.service.base.AdministrativeClassServiceImpl;
import com.hyf.cemap.service.base.CollegeServiceImpl;
import com.hyf.cemap.service.base.ProfessionServiceImpl;
import com.hyf.cemap.util.common.DataTableUtil;

@Controller
@RequestMapping(value = "/administrativeclass")
public class AdministrativeClassController {
    
    @Autowired
    private CollegeServiceImpl collegeService;
    
    @Autowired
    private ProfessionServiceImpl professionService;
    
    @Autowired
    private AdministrativeClassServiceImpl administrativeClassService;
    
    @Autowired
    private GraduateInformationServiceImpl graduateInformationService;
    
    
    /**
     * 主页
     * 
     * @param request
     * @param response
     * @return
     * @throws Exception 
     */
    @RequestMapping(value = "/index", method = { RequestMethod.GET })
    public ModelAndView indexPage(HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        ModelAndView modelAndView = new ModelAndView();
        List<College> colleges = collegeService.listAll("id", "ace");
        modelAndView.addObject("colleges", colleges);
        List<Profession> professions = professionService.listByCollegeId(colleges.get(0).getId());
        modelAndView.addObject("professions", professions);
        modelAndView.setViewName("base/administrativeclass/index");
        return modelAndView;
    }
    
    /**
     * 获取数据
     * 
     * @param request
     * @param response
     * @return
     */
    @RequestMapping(value = "/data", method = { RequestMethod.POST }, produces = "application/json; charset=utf-8")
    @ResponseBody
    public String data(HttpServletRequest request, HttpServletResponse response) {
        /**
         * 获取查询参数
         */
        /**
         * 获取查询参数
         */
        Integer collegeId = -1;
        Integer professionId = -1; 
        
        String scollegeId = request.getParameter("collegeId");
        if(scollegeId != null){
            collegeId = Integer.parseInt(scollegeId);
        }
        String sprofessionId = request.getParameter("professionId");
        if(sprofessionId != null){
            professionId = Integer.parseInt(sprofessionId);
        }
        String name = request.getParameter("name");
        if(name != null &&  name.equals("")){
            name = null;
        }
        DataTableUtil dataTableUtil = new DataTableUtil(request);
        System.out.println("===================================");
        System.out.println("起始偏移=" + dataTableUtil.getStart());
        System.out.println("页长=" + dataTableUtil.getLength());
        System.out.println("页码=" + dataTableUtil.getPage());
        System.out.println("排序字段=" + dataTableUtil.getOrderColumn());
        System.out.println("排序顺序=" + dataTableUtil.getOrderDirection());
        System.out.println("搜索关键字=" + dataTableUtil.getSearchValue());
        System.out.println("===================================");
        try {
            // 总记录数
            Integer recordsTotal = administrativeClassService.listAllAdministrativeClassVO(-1, -1).size();
            // 关键字过滤后总记录数
            Integer recordsFiltered = administrativeClassService.listAdministrativeClassVOByInfos(collegeId, professionId, name, -1, -1).size();
            dataTableUtil.setResult(recordsTotal, recordsFiltered,
                    administrativeClassService.listAdministrativeClassVOByInfos(collegeId, professionId, name,dataTableUtil.getPage(),
                                dataTableUtil.getLength()));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return dataTableUtil.result();
    }
    
    /**
     * 
     * @param request
     * @param response
     * @return
     * @throws Exception 
     */
    @RequestMapping(value = "/addPage", method = { RequestMethod.GET })
    public ModelAndView addPage(HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        ModelAndView modelAndView = new ModelAndView();
        List<College> colleges = collegeService.listAll("id", "ace");
        modelAndView.addObject("colleges", colleges);
        List<Profession> professions = professionService.listByCollegeId(colleges.get(0).getId());
        modelAndView.addObject("professions", professions);
        modelAndView.setViewName("base/administrativeclass/add");
        return modelAndView;
    }
    
    /**
     * 保存
     * 
     * @param request
     * @param response
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/add", method = { RequestMethod.GET,
            RequestMethod.POST }, produces = "application/json; charset=utf-8")
    public @ResponseBody String add(
            @ModelAttribute("administrativeClass") AdministrativeClass administrativeClass,
            HttpServletRequest request, HttpServletResponse response) {
        ResultVO resultVO = new ResultVO();
        UUID uuid = UUID.randomUUID();
        try {
            administrativeClass.setUuid(uuid.toString());
            administrativeClassService.save(administrativeClass);
            resultVO.setSuccess(true);
            resultVO.setCode("200");
            resultVO.setMessage("添加成功");
        } catch (Exception e) {
            resultVO.setSuccess(false);
            resultVO.setCode("500");
            resultVO.setMessage("添加异常");
            e.printStackTrace();
        }
        return resultVO.toString();
    }
    
    /**
     * 打开修改页面
     * 
     * @param request
     * @param response
     * @return
     */
    @RequestMapping(value = "/modifyPage", method = { RequestMethod.GET })
    public ModelAndView modifyPage(
            @RequestParam(value = "uuid", required = true) String uuid,
            HttpServletRequest request, HttpServletResponse response) {
        ModelAndView modelAndView = new ModelAndView();
        AdministrativeClass administrativeClass;
        try {
            administrativeClass = administrativeClassService.getByUuid(uuid);
            List<College> colleges = collegeService.listAll("id", "ace");
            List<Profession> professions = professionService.listByCollegeId(administrativeClass.getCollegeId());
            modelAndView.addObject("colleges", colleges);
            modelAndView.addObject("professions", professions);
            modelAndView.addObject("administrativeClass", administrativeClass);
            modelAndView.setViewName("base/administrativeclass/modify");
        } catch (Exception e) {
            e.printStackTrace();
        }
        return modelAndView;
    }
    
    @RequestMapping(value = "/update", method = { RequestMethod.GET,
            RequestMethod.POST }, produces = "application/json; charset=utf-8")
    public @ResponseBody String update(HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        ResultVO resultVO = new ResultVO();
        try {
            String id = request.getParameter("id");
            String code = request.getParameter("code");
            String name = request.getParameter("name");
            String collegeId = request.getParameter("collegeId");
            String professionId = request.getParameter("professionId");
            System.out.println("administrativeClassController 更新班级专业id"+professionId);
            AdministrativeClass administrativeClass = administrativeClassService.getById(Integer.parseInt(id));
            administrativeClass.setCode(code);
            administrativeClass.setName(name);
            administrativeClass.setCollegeId(Integer.parseInt(collegeId));
            administrativeClass.setProfessionId(Integer.parseInt(professionId));
            administrativeClassService.update(administrativeClass);
            
            resultVO.setSuccess(true);
            resultVO.setCode("200");
            resultVO.setMessage("更新成功");
        } catch (Exception e) {
            resultVO.setSuccess(false);
            resultVO.setCode("500");
            resultVO.setMessage("更新异常");
            e.printStackTrace();
        }
        return resultVO.toString();
    }
    
    /**
     * 删除
     * @param id
     * @param request
     * @param response
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/delete", method = { RequestMethod.GET,
            RequestMethod.POST }, produces = "application/json; charset=utf-8")
    public @ResponseBody String delete(
            @RequestParam(value = "uuid", required = true) String uuid,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        ResultVO resultVO = new ResultVO();
        try {
            AdministrativeClass administrativeClass = administrativeClassService.getByUuid(uuid);
            //该班级下是否绑定存在毕业生
            if(graduateInformationService.listByClassId(administrativeClass.getId()).size() > 0){
                resultVO.setSuccess(true);
                resultVO.setCode("202");
                resultVO.setMessage("删除失败,该专业下有学生信息,不能删除");
            }
            else{
                administrativeClass.setDeleted(true);
                administrativeClassService.update(administrativeClass);
                resultVO.setSuccess(true);
                resultVO.setCode("200");
                resultVO.setMessage("删除成功");
            }
        } catch (Exception e) {
            resultVO.setSuccess(false);
            resultVO.setCode("500");
            resultVO.setMessage("删除异常");
            e.printStackTrace();
        }
        return resultVO.toString();
    }
    
    @RequestMapping(value = "/getprofession", method = { RequestMethod.GET,
            RequestMethod.POST }, produces = "application/json; charset=utf-8")
    public @ResponseBody String getprofession(
            @RequestParam(value = "collegeId", required = true) Integer collegeId,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        ResultVO resultVO = new ResultVO();
        try {
            List<Profession> professions = professionService.listByCollegeId(collegeId);
            resultVO.setData(professions);
            resultVO.setSuccess(true);
            resultVO.setCode("200");
            resultVO.setMessage("删除成功");
            
        } catch (Exception e) {
            resultVO.setSuccess(false);
            resultVO.setCode("500");
            resultVO.setMessage("删除异常");
            e.printStackTrace();
        }
        return resultVO.toString();
    }
    
    @RequestMapping(value = "/getadministrativeclass", method = { RequestMethod.GET,
            RequestMethod.POST }, produces = "application/json; charset=utf-8")
    public @ResponseBody String getadministrativeclass(
            @RequestParam(value = "professionId", required = true) Integer professionId,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        ResultVO resultVO = new ResultVO();
        try {
            List<AdministrativeClass> administrativeClasss = administrativeClassService.listByProfessionId(professionId);
            resultVO.setData(administrativeClasss);
            resultVO.setSuccess(true);
            resultVO.setCode("200");
            resultVO.setMessage("删除成功");
            
        } catch (Exception e) {
            resultVO.setSuccess(false);
            resultVO.setCode("500");
            resultVO.setMessage("删除异常");
            e.printStackTrace();
        }
        return resultVO.toString();
    }
    
    
}

如果也想学习本系统,下面领取。关注并回复:050ssh 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值