guihaiyidao_git
介绍
javaEE工程
普通的javaEE工程,用idea打开工程即可运行
服务器用的是Tomcat 8.5.722
数据库用的Oracle xe版
数据库可视化工具使用的是PLSQL
相关软件
需要可从百度网盘中获取
链接:https://pan.baidu.com/s/1ZrmfsvQEA4dIP0GF_psArQ
提取码:abcd
guihaiyidao_git
软件架构
软件架构说明
HTML+Css+JavaScript+JQuery+Java+Oracle
- resource里面是jdbc.properties,连接的是Oracle数据库,xe版
- src分controller层和service层
- controller层分为四个包
- controller层
- fileservlet包是文件的上传
- 里面uploadservlet
- filter包是过滤器
- EncodingFilter
- 这个专门过滤中文编码,访问乱码
- LoginAutoFilter
- 这个专门过滤登录信息,可以查看是否登陆过,如果登陆过可以直接访问其他资源
- 如果未登录,强制跳转到登录界面
- LoginFilter
- 看是不是第一次登陆,通过cookie判断
- listener包
- VisitListener主要用来统计访问量
- utils包
- 里面的ServletProcessing主要用来将字符串的内容规范一下,去掉引号
- webservlet包
- 实现一些增删改查给前端数据
- service层里面主要是JDBC
- dao,service,entity,utils
- dao里面是一些增删改查
- service是检验增删改查是否成功
- entity是实体类
- orm思想对应表的实体类,还有一些需要临时查询创建的实体类
- utils
- 里面是数据库连接需要的获取连接,以及德鲁伊连接池
关键的sql语句
//employee
//注册
//注册验证
public static String select_Register_inspection="select e.EMPLOEENAME,e.USERNAME,e.PASSWORD,e.PHONE,e.EMAIL,d.departmentname
from employee e,department d
where d.departmentid=e.departmentid
and EMPLOEENAME=? and USERNAME=?
and PASSWORD=? and PHONE=? and EMAIL=?
and d.departmentname=?;
//插入头像
public static String insert_HeadPortrait_all="insert into employee (employeeid,pic) values(EMPLOYEES_SEQ.nextval,?)";
//找到部门编号
public static String select_DepartmentName_DepartmentId="select departmentid from department where departmentname=?";
//补充其余注册信息
public static String update_EmploeeMessageByPic="update employee set status=0,role=2,departmentid=?,EMPLOEENAME=?,USERNAME=?,PASSWORD=?,PHONE=?,EMAIL=?where pic=?";
//注册检验
public static String select_EmployeeMessageByPic_AccordingDepartmentEmployee="select EMPLOEENAME,USERNAME,PASSWORD,pic,PHONE,EMAIL,departmentname
from(select e.EMPLOEENAME,e.USERNAME,e.PASSWORD,e.pic,e.PHONE,e.EMAIL,d.departmentname
from employee e,department d
where d.departmentid=e.departmentid)where pic =?";
//Employee
//登录检验
public static String select_Employee_login="select * from employee where username=?and password=?";
//登录身份检验
public static String select_Employee_identify="select role from employee where username=? and password=?";
//审批检验
public static String select_Employee_Examine="select emploeename,username,phone,email from employee where status=0 and role=2";
//审批通过/不通过
public static String update_Employee_Approve="update employee set status=? where emploeename=?";
//是否是审批通过的
public static String select_Employee_user_pass="select status from employee where username=? and password=? ";
//department
//部门管理
//查询所有部门
public static String select_Department_manga="select departmentid,departmentname from department";
//插入部门信息
public static String insert_Department_manga="insert into department values(DEPARTMENT_ID_SEQ.nextval,?,'1')";
//删除部门信息
public static String delete_Department_manga="delete department where departmentname=?";
//visit
//访问次数
//获取上次访问的次数
public static String select_Visit_Count="select * from visit";
//数据库记录访问的次数
public static String update_Visit_Count="update visit set count = ?";
//清空记录
public static String update_Visit_clear="update visit set count=''";
//搜索
//Employee
//模糊查询
public static String selectSearchEmployee="select emploeename,username,phone,email from employee where 1=1 ";
//分页查询
//总记录
public static String selectCount="select count(*) from employee";
//每页多少条记录
public static String selectPage="SELECT emploeename,username,phone,email FROM
(SELECT rownum r,e.emploeename,e.username,e.phone,e.email
from employee e)where r>=? and r<=?";
//meetingroom
//会议室
//所有会议室信息
public static String selectMeeting="select roomnum,roomname,capacity,status from meetingroom";
//插入会议室信息
public static String insertMeeting="insert into meetingroom(roomid,roomnum,roomname,capacity,status)values(MEETINGROOM_ID_SEQ.nextval,?,?,?,?)";
//修改会议室信息根据id
public static String updateMeeting="update meetingroom set roomnum=?,roomname=?,capacity=?,status=? where roomnum=?";
//meetingvo
//会议
public static String selectVo="select m.MEETINGNAME mname,r.roomname rname,m.STARTTIME stime,m.ENDTIME etime,m.RESERVETIME rtime,e.emploeename
ename, e.employeeid eid
from meeting m,meetingroom r,meetingparticipants p,employee e
where m.roomid=r.roomid and m.reservationisld=p.employeeid
and p.employeeid=e.employeeid";
public static String selectPojo="select m.MEETINGNAME mname,r.roomname rname,m.STARTTIME stime,m.ENDTIME etime,m.RESERVETIME rtime,e.emploeename
ename,e.employeeid eid
from meeting m,meetingroom r,meetingparticipants p,employee e where m.roomid=r.roomid and m.reservationisld=p.employeeid
and p.employeeid=e.employeeid and e.employeeid=?";
public static String updatePojo="update meeting set status='1',DESCRIBE=? where RESERVATIONISLD=? ";
public static String selectBo="select m.MEETINGNAME mname,r.roomname rname,m.STARTTIME stime,m.ENDTIME etime,m.RESERVETIME rtime,e.emploeename
ename, e.employeeid eid,m.status mstatus
from meeting m,meetingroom r,meetingparticipants p,employee e
where m.roomid=r.roomid and m.reservationisld=p.employeeid and p.employeeid=e.employeeid and m.status='0'";
public static String selectPo="select m.MEETINGNAME mname,r.roomname rname,m.STARTTIME stime,m.ENDTIME etime,m.RESERVETIME rtime,e.emploeename
ename, e.employeeid eid,m.status mstatus,m.describe mdescribe
from meeting m,meetingroom r,meetingparticipants p,employee e where m.roomid=r.roomid
and m.reservationisld=p.employeeid and p.employeeid=e.employeeid and m.status='1'";
public static String selectqo="select m.MEETINGNAME mname,r.roomname rname,m.STARTTIME stime,m.ENDTIME etime,m.RESERVETIME rtime,e.emploeename
ename
from meeting m,meetingroom r,meetingparticipants p,employee e where m.roomid=r.roomid and m.reservationisld=p.employeeid and
p.employeeid=e.employeeid and 1=1 ";
//分页查询
public static String qoCount= "select count(*) from meeting";
public static String qoPage="select mname,rname,stime,etime,rtime,ename
from(select rownum r,m.MEETINGNAME mname,r.roomname rname,m.STARTTIME stime,m.ENDTIME etime,
m.RESERVETIME rtime,e.emploeename ename
from meeting m,meetingroom r,meetingparticipants p,employee e where m.roomid=r.roomid and
m.reservationisld=p.employeeid and p.employeeid=e.employeeid and 1=1)where r>=? and r<=?";
public static String selectTo="select m.MEETINGNAME mname,r.roomname rname,m.STARTTIME stime,m.ENDTIME etime,m.RESERVETIME rtime,
e.emploeename ename
from meeting m,meetingroom r,meetingparticipants p,employee e
where m.roomid=r.roomid and m.reservationisld=p.employeeid and p.employeeid=e.employeeid";
public static String selectToto="select m.MEETINGNAME mname,r.roomname rname,m.STARTTIME stime,m.ENDTIME etime,m.RESERVETIME rtime,
e.emploeename ename
from meeting m,meetingroom r,meetingparticipants p,employee e
where m.roomid=r.roomid and m.reservationisld=p.employeeid and p.employeeid=e.employeeid where";
//会议室名称
//部门人员
//预定
//预定信息查询
public static String selectDto= "select m.meetingname mname,m.numberofparticipants partic,m.starttime stime,m.endtime etime,r.roomname
rname,m.describe describe,e.emploeename ename
from meeting m,employee e,department d,meetingroom r
where m.reservationisld=e.employeeid and e.departmentid=d.departmentid and r.roomid=m.roomid";
//插入会议室信息
public static String insertDto=" insert into meeting
(meetingid,meetingname,numberofparticipants,starttime,endtime,describe)
values(MEETINGID_PA_SEQ.nextval,?,?,?,?,?)";
//预定修改,根据会议名称修改人员
//先知道人员id
public static String selectByName="select employeeid from employee e where emploeename=?";
public static String updateByRname="update meeting set reservationisld=? where meetingid=? ";
//预定修改,根据会议名称修改
//先知道会议室id
public static String selectByRname="select roomid from meetingroom where roomname=?";
public static String updateByRid="update meeting set ROOMID=? where meetingid=?";
//根据部门名称得到部门有哪些人
public static String getEnameByDeptName="select emploeename from department d,employee e where d.departmentid=e.departmentid
and d.departmentname=?";
public static String getRName="select roomname from meetingroom";
public static String getMeetingID="select MEETINGID_PA_SEQ.nextval from dual";
public static String updateByDept="update meetingparticipants set meetingid=? where employeeid=?";
public static String getEmployid="select e.employeeid
from department d,employee e,meeting m
where e.employeeid=m.reservationisld and e.departmentid=d.departmentid and d.departmentname=?";
public static String updateTwice="update meeting set roomid=? where meetingid=?";
public static String updateRid="update meeting set reservationisld=? where MEETINGID=?";
public static String getEid="select EMPLOYEEID from meetingparticipants p, meeting m
where p.meetingid=m.meetingid and m.meetingid=?";
public static String addIDpm="insert into meetingparticipants
values(MEETINGID_PA_SEQ.nextval-2,MEETINGID_PA_SEQ.nextval-2)";
//已经取消
public static String selectCancel="select m.meetingname mname,r.roomname rname,m.starttime stime,m.endtime etime from meeting m,meetingroom r
where m.roomid=r.roomid order by starttime desc";
//未来七天排序
public static String selectOrder="select m.meetingname mname,r.roomname rname,m.starttime stime,m.endtime etime from meeting m,meetingroom r
where m.roomid=r.roomid and canceltime is null order by starttime desc";
效果图
功能介绍
登录
- 用户名密码登录
- 校验必须是数据库中已经有的用户名密码
- 而且必须通过注册审批
- 如果是第一次登录,会加一个cookie
- 选择不用时间,来决定cookie的生存周期
- 登录成功以后算访问一次,访问次数加1
- 并记录访问的用户名密码,
- 关闭服务器时候,数据库会记录这个数据
- 如果之前登陆过,会有弹窗提示无须再登录
- 登录时候,系统根据你的用户是一般用户
- 还是高级用户,不同用户进入界面不一样,权限也不同
- 登录成功以后会有数据显示你登录的信息,(底层是ajax实现的)
- 两次密码必须一致
注册
- 上传是一个servlet
- 填别的信息是一个servlet
- 上传成功以后不会刷新
- 会停留在当前页面(底层是ajax实现的)
- 然后继续填完其他信息,才会提示注册成功
- 两个form表单
- 一个用来上传文件(用户头像)
- 一个用来填其余信息
- 注册成功但是不代表注册审批会通过
- 会标记为待审批
- 审批通过以后才可以登录
- 用户注册的信息必须之前没有才会成功
- 两次密码必须一致
注册审批
- 管理员登录进入以后
- 可以进入注册审批界面
- 这个界面都是待审批的人
- 如果审批通过或者不通过以后
- 页面刷新
- 审批过的就不会显示
- 如果全部审批完事
- 会显示没有要审批的
部门管理
- 可以查看所有的部门
- 并添加部门
- 删除部门
网站访问次数统计
- 使用监听器
简化登录
- 一段时间内可以不用登录
搜索员工
- 可以通过员工姓名用户名状态进行模糊搜索
- 如果某一项为空,则不作为查询条件
- 对查询结果可以分页显示
会议室管理
- 添加会议室
- 查询所有会议室
- 修改会议室
- 查看某一个会议室
预定会议
- 填写会议的信息
- 查询会议的信息
- 取消会议
- 查看用户预定过的所有会议
- 查询用户需要参加的会议
安装教程
- 导入idea
- 导入Oraclexe的sql文件
使用说明
- 把代码解压到一个路径,然后用idea打开,
- 将sql文件在OracleXe里运行,
- 打开plsql,插入数据
完整代码下载地址:基于javaweb的会议管理系统源码+数据库