项目描述
临近学期结束,还是毕业设计,你还在做java程序网络编程,期末作业,老师的作业要求觉得大了吗?不知道毕业设计该怎么办?网页功能的数量是否太多?没有合适的类型或系统?等等。这里根据疫情当下,你想解决的问题,今天给大家介绍一篇基于JavaWeb的宿舍管理系统的设计与实现。
功能需求
系统功能要求如下:
管理员:管理员登录、教师管理、班长管理、订单管理、待发放图书管理、已发放图书信息管理、图书管理、个人信息修改、退出系统。
老师模块:老师登录注册、班级管理、班长管理、订单列表、已发放待领取列表管理、图书管理、个人信息修改、退出系统。
学生班长:学生登录注册、班长领取列表、个人信息修改、退出系统
部分效果图
数据库脚本
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for approval
-- ----------------------------
DROP TABLE IF EXISTS `approval`;
CREATE TABLE `approval` (
`id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '编号\r\n',
`book_id` int(255) NULL DEFAULT NULL COMMENT '书目编号',
`teacher_id` int(255) UNSIGNED NULL DEFAULT NULL COMMENT '教师id',
`quantity` int(255) NULL DEFAULT NULL COMMENT '订购数量',
`toclass` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订购班级',
`pass` int(3) UNSIGNED NULL DEFAULT 2 COMMENT '是否通过',
PRIMARY KEY (`id`) USING BTREE,
INDEX `book`(`book_id`) USING BTREE,
INDEX `teacher_id`(`teacher_id`) USING BTREE,
CONSTRAINT `approval_ibfk_1` FOREIGN KEY (`teacher_id`) REFERENCES `teacher` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `book` FOREIGN KEY (`book_id`) REFERENCES `books` (`id`) ON DELETE NO ACTION ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of approval
-- ----------------------------
INSERT INTO `approval` VALUES (7, 1, 10003, 50, '17070143', 3);
INSERT INTO `approval` VALUES (8, 11, 10003, 50, '17070143', 3);
INSERT INTO `approval` VALUES (9, 1, 10003, 50, '17070144', 3);
INSERT INTO `approval` VALUES (22, 2, 10011, 12, '12', 2);
-- ----------------------------
-- Table structure for books
-- ----------------------------
DROP TABLE IF EXISTS `books`;
CREATE TABLE `books` (
`id` int(255) NOT NULL AUTO_INCREMENT COMMENT '书籍编号',
`book_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '书籍名称',
`book_quantity` int(255) NULL DEFAULT NULL COMMENT '书籍数量',
`press` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '出版社',
`price` double(10, 2) NULL DEFAULT NULL COMMENT '价格',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of books
-- ----------------------------
INSERT INTO `books` VALUES (1, 'JAVAEE入门', -1269, '机械工业出版社', 50.00);
INSERT INTO `books` VALUES (2, '大学英语', 1000, '机械工业出版社', 30.50);
INSERT INTO `books` VALUES (3, '高等数学', 1000, '机械工业出版社', 30.50);
INSERT INTO `books` VALUES (4, 'C++程序设计', 1000, '电子工业出版社', 50.20);
INSERT INTO `books` VALUES (5, '大学物理', 1000, '复旦大学出版社', 30.50);
INSERT INTO `books` VALUES (6, 'Android开发', 500, '电子工业出版社', 80.20);
INSERT INTO `books` VALUES (7, 'C语言从入门到精通', 1000, '人民邮电出版社', 20.50);
-- ----------------------------
-- Table structure for classleader
-- ----------------------------
DROP TABLE IF EXISTS `classleader`;
CREATE TABLE `classleader` (
`username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户名',
`password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码',
`email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '电子邮箱',
`id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '编号',
`classid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '班级号',
`department` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '院系',
PRIMARY KEY (`id`, `username`, `classid`) USING BTREE,
INDEX `id`(`id`) USING BTREE,
INDEX `classid`(`classid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of classleader
-- ----------------------------
INSERT INTO `classleader` VALUES ('张三', '123', '123@qq.com', 5, '17070143', '大数据学院s');
-- ----------------------------
-- Table structure for grant
-- ----------------------------
DROP TABLE IF EXISTS `grant`;
CREATE TABLE `grant` (
`order_id` int(255) UNSIGNED NOT NULL COMMENT '订单号(外键)',
`grant_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发放时间',
`grant_place` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发放地点',
PRIMARY KEY (`order_id`) USING BTREE,
CONSTRAINT `grant_ibfk_1` FOREIGN KEY (`order_id`) REFERENCES `approval` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of grant
-- ----------------------------
INSERT INTO `grant` VALUES (7, '2019-12-1 9:00', '11201H');
-- ----------------------------
-- Table structure for manager
-- ----------------------------
DROP TABLE IF EXISTS `manager`;
CREATE TABLE `manager` (
`username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户名',
`password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码',
`email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '电子邮件',
`id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '编号',
PRIMARY KEY (`id`, `username`) USING BTREE,
UNIQUE INDEX `unique`(`username`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 50 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of manager
-- ----------------------------
INSERT INTO `manager` VALUES ('admin', '123', '1707004732@st.nuc.edu.cn', 5);
-- ----------------------------
-- Table structure for teacher
-- ----------------------------
DROP TABLE IF EXISTS `teacher`;
CREATE TABLE `teacher` (
`username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
`department` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`, `username`) USING BTREE,
INDEX `id`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10014 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of teacher
-- ----------------------------
INSERT INTO `teacher` VALUES ('张健华', '123', '666@QQ.com', 10002, '大数据学院');
-- ----------------------------
-- Table structure for teacher_class
-- ----------------------------
DROP TABLE IF EXISTS `teacher_class`;
CREATE TABLE `teacher_class` (
`teacher_id` int(255) UNSIGNED NOT NULL COMMENT '老师编号',
`class_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '班级号',
PRIMARY KEY (`teacher_id`, `class_id`) USING BTREE,
UNIQUE INDEX `dsa`(`teacher_id`, `class_id`) USING BTREE,
INDEX `class_id`(`class_id`) USING BTREE,
CONSTRAINT `teacher_class_ibfk_1` FOREIGN KEY (`teacher_id`) REFERENCES `teacher` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of teacher_class
-- ----------------------------
INSERT INTO `teacher_class` VALUES (10011, 'safwdf');
SET FOREIGN_KEY_CHECKS = 1;
安装部署需求
利用tomcat启动运行
总体设计
本项目用到的技术和框架
(1)采用三层架构的模式使用SSM框架式搭建后端。
(2)JavaScript前端技术搭建前端界面。
(4)采用开源免费的MySQL数据库存储业务数据。
本项目中的关键点
此系统的开发采用java语言开发,基于B/S结构,这些开发环境使系统更加完善。使用到的工具和技术都是开源免费的。
环境工具
开发工具 Eclipse/IDEA
语言 JDK1.8
硬件:笔记本电脑;
软件:Tomcat9.0 Web服务器、Navicat数据库客户端、MySQL;
操作系统:Windows 10;
以上是本系统的部分功能展示,如果你的选题正好相符,那么可以做毕业设计或课程设计使用。