Java项目:毕业生离校管理系统(java+jsp+servlet+jquery+Mysql)

news/2024/7/10 23:13:31 标签: java, jquery, servlet, mysql, jsp

源码获取:俺的博客首页 "资源" 里下载!

需求分析

使用JSP+Servlet+Mysql技术设计一个毕业生离校管理系统, 整个系统采用BS架构, 
为高校方便进行毕业生离校流程进行统一的离校流程, 极大的减少了大量学生同时离校的过程中杂乱的情况, 
整个系统分为学生, 教务处, 辅导员, 图书馆, 宿管, 财务处, 系办公室, 管理员登等角色, 不同的角色拥有不同的功能


实现功能

该项目是一个基于JSP+Servlet+Mysql实现的毕业生离校管理系统, 用于统一离校流程, 提升学校管理效率,主要分为如下模块
系统的登录注册模块, 注意只能注册学生账号
学生角色: 可以查看未归还图书信息, 未归还宿舍信息, 欠费信息, 手动发起离线申请
教务处角色: 可以添加离校信息 并确认某人离校
辅导员角色: 辅导员可以登录系统查看离校本人并进行确认离校。
图书馆人员角色: 登录系统添加未归还的图书信息。
宿管处角色: 添加未归还钥匙信息并确认离校状态
财务处角色: 添加欠费信息并确认离校状态


运行环境

jdk1.8,tomcat8.5,mysql5.7,Eclispse/IDEA/MyEclipse


项目技术

jsp, servlet, jquery


技术原理

项目是一个基于JSP+Mysql实现的毕业生离校管理系统, 采用比较传统的javaweb模式进行开发, 除了使用dwr并没有使用任何其他大型框架, 但是本项目的servlet+jsp也是构造了一个符合mvc设计模式及的封装代码, 另外此项目自带一篇毕业论文, 项目可以直接用于毕业设计中

注意事项

系统采用jsp+servlet+mysql编写, eclipse导入项目的时候properties的编码需要调整为utf8
mysql的编码utf8, 需要在dbinfo.properties中修改数据连接与密码


使用说明

1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 将项目中dbinfo.properties配置文件中的数据库配置改为自己的配置
3. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat,然后运行;
4. 运行项目,输入localhost:8080/xxx 登录

测试账号:

管理员账号:a 密码:a
教务处账号:jwc 密码:0
辅导员账号:fdy 密码:0
图书馆账号:tsg 密码:0
宿管处账号:sgc 密码:0
财务处账号:cwc 密码:0
系办公室账号:xbgs 密码:0

 

 

 

 

 

 

 

 用户管理控制层:

@Controller
public class UserController {
    @Autowired
    UserService userService;

    @RequestMapping("/employment/usermanage")
    public String index(){
        return "system/usermanage/usermanage";
    }

    @ResponseBody
    @RequestMapping("/employment/getallusers")
    public CommonResult<List<User>> getAllUsers(User user, @RequestParam("limit") int pageSize, @RequestParam("page") int pageNum){
        List<User> result = userService.getAllUsers(user, pageNum, pageSize);
        return CommonResult.generateSuccessResult(result.size(), result);
    }

    @ResponseBody
    @RequestMapping("/employment/getuserbyaccount/{userAccount}")
    public CommonResult<User> getUserByAccount(@PathVariable("userAccount") String userAccount){
        return CommonResult.generateSuccessResult(1, userService.getUserByAccount(userAccount));
    }

    @ResponseBody
    @RequestMapping("/employment/adduser")
    public CommonResult<Integer> addUser(User user){
        user.setUserId(UUID.randomUUID().toString());
        user.setUserPwd(MD5Util.getMD5(user.getUserPwd()));
        userService.addUser(user);
        return CommonResult.generateSuccessResult(1, 1);
    }

    @ResponseBody
    @RequestMapping("/employment/updateuser")
    public CommonResult<Integer> updateUser(User user){
        userService.updateUser(user);
        return CommonResult.generateSuccessResult(1, 1);
    }

    @ResponseBody
    @RequestMapping("/employment/deluser/{userId}")
    public CommonResult<Integer> delInfo(@PathVariable("userId") String userId){
        userService.deleteUser(userId);
        return CommonResult.generateSuccessResult(1, 1);
    }
}

毕业管理控制层: 

@Controller
public class EmploymentInfoController {
    @Autowired
    EmploymentInfoService employmentInfoService;

    @RequestMapping({"/employment/index", "/employment/employmentinfo"})
    public String index(){
        return "system/employmentinfo/employmentinfo";
    }

    @ResponseBody
    @RequestMapping("/employment/getallinfo")
    public CommonResult<List<EmploymentInfo>> getAllInfo(EmploymentInfo employmentInfo, @RequestParam("limit") int pageSize, @RequestParam("page") int pageNum){
        List<EmploymentInfo> infoList = employmentInfoService.getAllEmploymentInfo(employmentInfo, pageNum, pageSize);
        CommonResult<List<EmploymentInfo>> rtInfoResult = CommonResult.generateSuccessResult(infoList.size(), infoList);

        return rtInfoResult;
    }

    @ResponseBody
    @RequestMapping("/employment/getinfo")
    public CommonResult<List<EmploymentInfo>> getinfo(EmploymentInfo info, @RequestParam("limit") int pageSize, @RequestParam("page") int pageNum){
        List<EmploymentInfo> infoList = employmentInfoService.getEmploymentInfo(info, pageNum, pageSize);
        CommonResult<List<EmploymentInfo>> rtInfoResult = CommonResult.generateSuccessResult(infoList.size(), infoList);

        return rtInfoResult;
    }

    @ResponseBody
    @RequestMapping("/employment/addinfo")
    public CommonResult<Integer> addInfo(EmploymentInfo info){
        info.setInformationId(UUID.randomUUID().toString());
        employmentInfoService.addEmploymentInfo(info);
        return CommonResult.generateSuccessResult(1, 1);
    }

    @ResponseBody
    @RequestMapping("/employment/updateinfo")
    public CommonResult<Integer> updateInfo(EmploymentInfo info){
        employmentInfoService.updateEmploymentInfo(info);
        return CommonResult.generateSuccessResult(1, 1);
    }

    @ResponseBody
    @RequestMapping("/employment/delinfo/{infoId}")
    public CommonResult<Integer> delInfo(@PathVariable("infoId") String infoId){
        employmentInfoService.deleteEmploymentInfo(infoId);
        return CommonResult.generateSuccessResult(1, 1);
    }
}

图书管理控制层:

/**
 * @description: 图书类别处理
 */
@Controller
@RequestMapping("/admin/ch/category")
public class CategoryController {
    //注入
    @Autowired
    private LibraryCategoryService libraryCategoryService;

    /**
     * 添加 图书类目
     *
     * @param category 图书类目信息
     * @param session  添加人
     * @return url
     * @author hiseico
     */
    @RequestMapping(value = "/addCategory", method = RequestMethod.POST)
    public String addCategory(TbCategory category, HttpSession session, Model model) {
        List<TbCategory> categoryList = libraryCategoryService.getCategoryAll();
        boolean is = false;
        for (TbCategory tbCategory : categoryList) {
            if (category.getCatname().equals(tbCategory.getCatname())) {
                is = true;
                break;
            }
        }
        if (!is) {
            // 添加 数据到 数据库,并 修改 父类目
            libraryCategoryService.addBookCategory(category, session);
        } else {
            model.addAttribute("errorMsg", "类目已经存在");
            return "errorMsg";
        }
        return "redirect:/admin/ch/loan_BookClassify.action";
    }

    /**
     * 删除类目信息
     *
     * @param id
     * @return
     */
    @RequestMapping(value = "/delCategory", method = RequestMethod.GET)
    public String delCategory(int id) {

        // 通过 类目id 删除数据
        libraryCategoryService.delBookCategoryById(id);

        return "redirect:/admin/ch/loan_BookClassify.action";
    }

    /**
     * 修改 类目关系
     *
     * @param category
     * @return
     */
    @RequestMapping(value = "/updateCategory", method = RequestMethod.POST)
    public String updateCategory(TbCategory category) {

        return "redirect:/admin/ch/loan_BookClassify.action";
    }

    @RequestMapping("/toUpdatePage")
    @ResponseBody
    public TbCategory toUpdatePage(int id) {
        return libraryCategoryService.getCategoryById(id);
    }
}

源码获取:俺的博客首页 "资源" 里下载!


http://www.niftyadmin.cn/n/1553737.html

相关文章

c语言sprintf函数带符号,c语言中sprintf()函数中的%使用

#include #include int main(){char a[] {};char b[] {};char c[] {};/*打印2个%*/strcpy(a, "%%");printf("a:%s\n", a);sprintf(b, "%s", a);printf("b1:%s\n", b);/*打印1个%*/sprintf(b, a);printf("b2:%s\n", b);sp…

Java项目:在线药店管理系统(java+JSP+bootstrap+jQuery+Mysql)

源码获取&#xff1a;俺的博客首页 "资源" 里下载&#xff01; 项目介绍 基于jspservlet在线药店管理系统。 该项目是一个后管系统&#xff0c;只有一个管理员角色&#xff0c;功能比较简单&#xff0c;适合java初学者或者学生做课程设计等&#xff1b; 主要功能包括…

C20语言,C20的混凝土配合比肿么计算?

您好&#xff01;我是一名学建筑的&#xff01;显然&#xff0c;建筑中的C20之类是用以表示混凝土强度等级的符号&#xff0c;其中C是“混凝土”的英文单词concrete的缩写&#xff1b;20是代表这种混凝土的立方体抗压强度fcu&#xff0c;k20MPa的意思了&#xff1b;至于各种强度…

Java项目:会议室预约系统(java+JSP+bootstrap+Servlet+Mysql)

源码获取&#xff1a;俺的博客首页 "资源" 里下载&#xff01; 项目介绍 网上会议室预约系统,该项目是一个前后台的项目&#xff1b; 前台主要功能有&#xff1a; 登录、注册&#xff1b; 首页、预约须知&#xff1b; 会议室预约&#xff1b; 会议室信息&#xff1…

Java项目:图书管理系统(java+JSP+layui+bootstrap+Servlet+Mysql)

源码获取&#xff1a;俺的博客首页 "资源" 里下载&#xff01; 项目介绍 使用jspservlet、layui、mysql完成的图书馆系统&#xff0c;包含用户图书借阅、图书管理员、系统管理员界面&#xff0c;功能齐全。 开发工具为eclipse/IDEA&#xff0c;环境java8&#xff0…

android activity 传对象,Android开发中在Activity之间传递map和普通对象的几种方法

Android开发中在Activity之间传递map和普通对象的几种方法​在android学习中&#xff0c;我们经常遇到从一个activity传参到另一个activity的问题(即界面传参)&#xff0c;如果我们要传递基本类型的参数&#xff0c;只要利用意图Intent对象intent.putExtra(name,value)方法就行…

Java项目:失物招领系统(java+JSP+Servlet+c3p0+Mysql)

源码获取&#xff1a;俺的博客首页 "资源" 里下载&#xff01; 项目介绍 本项目分为管理员、学生两种角色 学生可以查看失物、招领发布、信息浏览等&#xff1b; 管理员可以删除信息 环境需要 1.运行环境&#xff1a;最好是java jdk 1.8&#xff0c;我们在这个平台…

android studio 分页,Android Paging codelab

1、介绍你要建造什么在这个代码库中&#xff0c;您从一个示例应用程序开始&#xff0c;该应用程序已经显示了GitHub存储库列表&#xff0c;从数据库加载数据并且由网络数据支持。 只要用户滚动并到达显示列表的末尾&#xff0c;就会触发新的网络请求&#xff0c;并将其结果保存…