一、项目简介
本课题通过对会议信息管理工作的正常业务需求进行详细的调研,深入分析了会议信息管理系统中的业务流程,对会议信息管理工作具有较深的认识。在进行大量的文献阅读后,决定使用主流的J2EE技术加MVC设计模式,设计并实现了基于Web的会议信息管理系统。
本论文首先对课题研究背景和研究意义进行分析,对研究方法和研究内容进行说明;然后对核心开发技术、系统架构和MySQL数据库进行介绍。
二、界面展示
图6‑1 初始登录界面
图6‑2 输入错误案例后弹出提示信息
图5‑3 用户主界面
三、功能介绍
图3‑6 系统总体用例图
四、数据库
针对会议信息管理系统的业务需求及流程分析,会议信息管理系统涉及到的数据项和数据结构如下所示:
用户(用户ID,姓名,密码,性别,电话,部门ID,用户类型ID,部门名称)
用户身份类型(用户身份类型ID,用户身份,身份名称)
部门类型(部门ID,部门名称)
会议表(会议ID,会议名称,开始时间,结束时间,会议类型ID,房间ID,记录时间,审核结果,用户ID,部门ID)
考勤表(考勤ID,会议ID,用户ID,参会时间,参会情况,状态)
参会总结(参会总结ID,会议ID,持续时间,具体内容,用户ID)
会议房间(房间ID,房间名,房间地址,房间大小(可容纳人数),房间状态,进入日期)
会议类型(会议类型ID,会议类型名称)
图4‑2 会议信息管理系统全局E-R图
五、部分代码
1、核心JAVA WEB代码
系统注册与登录界面核心代码如下:
// 在meeting (servlet)上接收jsp页面传来的数据的核心代码
@Resource
private UserService userService;
@RequestMapping(value="/get")
@ResponseBody
public List<User> get(
@RequestParam(value = "userId", required = false, defaultValue = "") String userId,
@RequestParam(value = "userName", required = false, defaultValue = "") String userName,
@RequestParam(value = "deptId", required = false, defaultValue = "") String deptId,
@RequestParam(value = "authorityId", required = false, defaultValue = "") String authorityId
){
Map<String,Object> map=new HashMap<String,Object>();
map.put("userId", userId);
map.put("userName", userName);
map.put("deptId", deptId);
map.put("authorityId", authorityId);
return userService.getAll(map);
}
@RequestMapping(value="/getOne")
@ResponseBody
public User getOne(String userId){
return userService.findOne(userId);
}
@RequestMapping(value="/getBySession")
@ResponseBody
public User getBySession( HttpServletRequest request){
User user=(User)request.getSession().getAttribute("user");
String userId=user.getUserId();
return userService.findOne(user.getUserId());
}
@RequestMapping(value="/add")
@ResponseBody
public boolean add(User user){
Date now = new Date();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");//日期格式
String userTime = dateFormat.format( now );
user.setUserTime(userTime);
try{
userService.addUser(user);
return true;
}catch (Exception e) {
return false;
}
}
@RequestMapping(value="/delete")
@ResponseBody
public boolean delete(String userId){
try{
userService.deleteUser(userId);
return true;
}catch (Exception e) {
return false;
}
}
@RequestMapping(value="/update")
@ResponseBody
public boolean update(User user){
if(!StringUtil.isEmpty(user.getPassword())){
user.setPassword(MD5Utils.getMD5(user.getPassword()));
}
userService.updateUser(user);
return true;
}
//检验密码
@RequestMapping(value="/check")
@ResponseBody
public int check(User user,HttpServletRequest request){
user.setPassword(MD5Utils.getMD5(user.getPassword()));
User userT=userService.checkPasswd(user);
if(userT==null){
return 0;
}else {
request.getSession().setAttribute("user", userT);
return userT.getAuthorityId();
}
}
//退出
@RequestMapping(value="/logout")
@ResponseBody
public boolean logout( HttpServletRequest request) {
request.getSession().invalidate();
return true;
}
// 在RegistService上调用mapper中方法实现登录验证的核心代码
<mapper namespace="com.java.dao.UserDao">
<resultMap type="user" id="userResult">
<id column="user_id" property="userId" />
<result column="user_name" property="userName" />
<result column="password" property="password" />
<result column="sex" property="sex" />
<result column="phone" property="phone" />
<result column="dept_id" property="deptId" />
<result column="authority_id" property="authorityId" />
<result column="user_time" property="userTime" />
<association property="dept" javaType="Dept">
<id column="dept_id" property="deptId" />
<result column="dept_name" property="deptName" />
</association>
<association property="authority" javaType="Authority">
<id column="authority_id" property="authorityId" />
<result column="authority_name" property="authorityName" />
</association>
</resultMap>
<select id="findOne" parameterType="String" resultMap="userResult">
select *
from user u,authority a,dept d
where
u.dept_id=d.dept_id and u.authority_id=a.authority_id
and u.user_id =#{userId} ;
</select>
<select id="checkPasswd" parameterType="User" resultMap="userResult">
select *
from user
where
user_Id=#{userId} and password=#{password}
</select>
<select id="findByItem" parameterType="Map" resultMap="userResult">
select * from user u,authority a,dept d
<where>
1=1
<if test="userName !=null and userName !='' ">
and user_name like concat('%',#{userName},'%')
</if>
<if test="userId !=null and userId !='' ">
and user_id like concat('%',#{userId},'%')
</if>
<if test="deptId !=null and deptId !='' ">
and u.dept_id =#{deptId}
</if>
<if test="authorityId !=null and authorityId !='' ">
and u.authority_id =#{authorityId}
</if>
and u.dept_id=d.dept_id and u.authority_id=a.authority_id
</where>
order by user_time
</select>
<update id="updateOne" parameterType="user">
update user
<set>
<if test=" userName != null and userName != ''"> user_name= #{userName},</if>
<if test=" password != null and password != ''"> password= #{password},</if>
<if test=" sex != null and sex != ''"> sex= #{sex},</if>
<if test=" phone != null and phone != ''"> phone= #{phone},</if>
<if test=" deptId != null and deptId != ''"> dept_id= #{deptId},</if>
<if test=" authorityId != null and authorityId != ''"> authority_id= #{authorityId},</if>
<if test=" userTime != null and userTime != ''"> user_time= #{userTime},</if>
</set>
where user_id = #{userId}
</update>
<delete id="deleteOne" parameterType="String">
delete from user where
user_id=#{userId};
</delete>
<insert id="addOne" parameterType="user">
insert into
user(user_id,user_name,password,sex,phone,dept_id,authority_id,user_time)
values(#{userId},#{userName},'E10ADC3949BA59ABBE56E057F20F883E',#{sex},#{phone},#{deptId},#{authorityId},#{userTime});
</insert>
</mapper>
// applicationContext.xml中的配置(连接数据库部分)
这一部分一定要改,把数据库名称和密码改成你的mysql数据库名称和密码(倒数2,3行)
<!-- 配置数据源 -->
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url"
value="jdbc:mysql://localhost:3306/meeting?characterEncoding=utf-8&allowMultiQueries=true" />
<property name="username" value="root" />
<property name="password" value="w123" />
</bean>
2、MySQL数据库核心代码如下(建立部分表):
-- ----------------------------
-- Table structure for authority
-- ----------------------------
DROP TABLE IF EXISTS `authority`;
CREATE TABLE `authority` (
`authority_id` INT(11) NOT NULL AUTO_INCREMENT,
`authority_name` VARCHAR(255) DEFAULT NULL,
`authority_remark` VARCHAR(255) DEFAULT NULL,
PRIMARY KEY (`authority_id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `dept`;
CREATE TABLE `dept` (
`dept_id` INT(11) NOT NULL AUTO_INCREMENT,
`dept_name` VARCHAR(255) DEFAULT NULL,
PRIMARY KEY (`dept_id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `meeting`;
CREATE TABLE `meeting` (
`meeting_id` INT(11) NOT NULL AUTO_INCREMENT,
`meeting_name` VARCHAR(255) DEFAULT NULL,
`start_time` VARCHAR(255) DEFAULT NULL,
`end_time` VARCHAR(255) DEFAULT NULL,
`type_id` INT(11) DEFAULT NULL,
`room_id` VARCHAR(32) DEFAULT NULL,
`apply_time` VARCHAR(255) DEFAULT NULL,
`exam_reason` VARCHAR(255) DEFAULT NULL,
`user_id` VARCHAR(32) DEFAULT '',
`dept_id` INT(11) DEFAULT NULL,
`feed_status` INT(10) DEFAULT NULL,
`exam_status` INT(10) DEFAULT NULL,
`exam_time` VARCHAR(32) DEFAULT NULL,
`check_status` INT(10) DEFAULT NULL,
PRIMARY KEY (`meeting_id`),
KEY `fk_meeting_dept` (`dept_id`),
KEY `fk_meeting_room` (`room_id`),
KEY `fk_meeting_type` (`type_id`),
KEY `fk_meeting_user` USING BTREE (`user_id`),
CONSTRAINT `fk_meeting_dept` FOREIGN KEY (`dept_id`) REFERENCES `dept` (`dept_id`),
CONSTRAINT `fk_meeting_room` FOREIGN KEY (`room_id`) REFERENCES `room` (`room_id`),
CONSTRAINT `fk_meeting_type` FOREIGN KEY (`type_id`) REFERENCES `typelist` (`type_id`),
CONSTRAINT `fk_meeting_user` FOREIGN KEY (`user_id`) REFERENCES `user` (`user_id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='InnoDB free: 4096 kB; (`meet_type`) REFER `meeting/type`(`Id';
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`user_id` VARCHAR(32) NOT NULL DEFAULT '0',
`user_name` VARCHAR(255) DEFAULT NULL,
`password` VARCHAR(255) DEFAULT NULL,
`sex` VARCHAR(255) DEFAULT NULL,
`phone` VARCHAR(255) DEFAULT NULL,
`dept_id` INT(11) DEFAULT NULL,
`authority_id` INT(11) DEFAULT NULL,
`user_time` VARCHAR(255) DEFAULT NULL,
PRIMARY KEY (`user_id`),
KEY `fk_dept` (`dept_id`),
KEY `fk_authority` (`authority_id`),
CONSTRAINT `fk_authority` FOREIGN KEY (`authority_id`) REFERENCES `authority` (`authority_id`),
CONSTRAINT `fk_dept` FOREIGN KEY (`dept_id`) REFERENCES `dept` (`dept_id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8;
六、总结
本课题着眼于以Web和数据库的技术取代传统办公软件筹备和管理会议的目标,深入调查了举办会议的前期准备工作和参会者需求,详细设计了可满足常规会议筹办需求的通用模式,利用J2EE、MySQL、tomcat9.0等技术和应用工具进行开发,实现了一个功能较为完善的会议信息管理系统。
该系统采用动态网站的形式,实现了会议信息发布、会议信息搜索、邀请函下载、会议住宿安排和参会信息反馈等功能,大大提高了会议准备和开展的效率,工作人员与参会者的信息交互不再通过邮件或电话,而是直接通过互联网就能进行交流,十分方便且保障了个人信息的安全性[4]。
本系统的软件体系架构良好,后台数据库设计良好,系统功能模块完善,极大程度地满足了用户需求,并且系统稳定性和数据处理量也得到了保障。
本课题完成的主要工作有:
- 介绍本课题的研究背景和研究意义,查阅和深入分析大量文献后,设计出适合互联网时代发展的会议信息管理系统。系统的设计与实现使用了现代比较流行的J2EE技术和MVC设计模式,并且详细介绍了系统开发使用的软件和核心技术;
- 对会议信息管理系统的正常业务需求进行调研后,对会议信息管理工作有了较深的认识。通过对业务流程的分析,明确了系统需要分为哪几大功能模块进行开发,其中包括用户个人信息模块、会议基本信息管理模块、住宿房间信息管理模块、用户参会信息管理模块和住宿预订信息管理模块。系统设计的功能模块较为全面;
- 关于数据库进行了详细的设计,着重阐述了需求分析、概念结构设计和逻辑结构设计三个步骤,深入分析了系统设计到的实体,确定各实体的属性及其数据类型后,设计了每个实体的局部E-R图,并且进一步整合成了全局E-R图,从而确定了数据库的逻辑结构,给出了数据库涉及到的主要表结构;
- 对用户进行了行为操作分析,为每个功能的实现绘制了流程图,清楚直观地展示出了功能实现步骤。系统界面设计给出了系统的主要界面以及对于不同用户行为、不同信息提交的不同响应机制,相当于为系统使用者提供了一份简单易懂的操作手册。课题的最后给出了主要功能模块的核心代码,有助于读者进行借鉴与指导。
七、个人总结
总之,工程量较大,
这是后端
这是前端
我们学校的软件实训,刚刚答辩完,正好整理下来以免忘记。项目比较平平无奇,但是应付学校没啥问题,报告扎扎实实写了50页,程序没有bug可以正常用。如果大家想借鉴一下,可以点赞或评论一下,如果需要的人多,代码和论文后期会打包发到资源里。