收藏 分销(赏)

毕业设计方案选题标准管理系统.doc

上传人:a199****6536 文档编号:2442653 上传时间:2024-05-30 格式:DOC 页数:23 大小:401.04KB
下载 相关 举报
毕业设计方案选题标准管理系统.doc_第1页
第1页 / 共23页
毕业设计方案选题标准管理系统.doc_第2页
第2页 / 共23页
毕业设计方案选题标准管理系统.doc_第3页
第3页 / 共23页
毕业设计方案选题标准管理系统.doc_第4页
第4页 / 共23页
毕业设计方案选题标准管理系统.doc_第5页
第5页 / 共23页
点击查看更多>>
资源描述

1、1. 序言每十二个月毕业临近,全部有大量毕业生需要进行毕业设计,这其中首要关节就是课题选择,以往指导老师全部是采取人工手写方法给学生们提供相关课题供学生选择,假如指导老师率领学生比较多,或是当年毕业学生比较多,这么就轻易造成学生课题选择很混乱,指导老师难于统计学生课题选择情况等一系列问题,基于这些传统问题,我们需要一个能够自动统计、实时分配课题一个管理平台来帮助学生、指导老师。此系统开发,关键目标是使老师能愈加好管理课程设计,也能使学生能愈加好把自己想要选课程正确无误选出来。使处于选课时期学生能有条不紊进行。2. 系统需求分析2.1功效需求2.1.1 毕业设计选题管理系统功效要求:1.毕业设计

2、题目维护和查询:毕业设计题目标添加、修改;根据项目类型、名称、编号等查询;毕业设计选题查询、登记。2.指导老师信息维护和查询:指导老师信息添加、修改、删除,查询;3.毕业生选题管理:学生选题登记;选题情况查询;4.毕业生信息维护和查询。依据以上各功效模块需求将系统功效细化为以下几点:(1)前台学生选题学生网上选题:学生登录管理系统进行选题(2)前台老师出题老师网上出题:老师进入毕业选题出题。老师管理出题:老师进入系统后对毕业设计题目进行修改和删除。选题确定:学生选好题目后,老师能够确定该题由选择该题学生做。(3)后台管理出题及选题情况用户管理模块:管理员能够对用户进行用户管理,对已存在用户进行

3、修改,查看等。角色管理模块:管理员能够对用户角色进行管理,能够给用户分配角色,对角色分配权限。2.2开发环境需求操作系统:windowXP或更高版本因为毕业设计课题管理系统针正确用户是学生和老师,学生和老师普遍使用windows操作系统,所以选着windowsXP或更高版本操作系统web服务器:apache-tomcat6apache-tomcat6是开源无偿web服务器,节省开发成本数据库:MySQLMySQL是一款无偿数据库,节省成本开发工具:myeclipse8.5myeclipse8.5功效强大JavaEE开发工具,该管理系统选择JavaEE开发。3. 系统设计3.1基础设计概念和处理

4、步骤本系统采取结构化分析,设计次序为自顶向下,层层逐步细化。图13.2软件功效设计图23.2数据库设计3.2.1 E-R图图3图43.2.2数据库表用户表(user)字段类型备注useridVarchar(20) primary key用户ID Pwdvarchar(32)用户密码roleIdInt外键tnameVarchar(20)姓名sexVarchar(5)性别AgeInt年纪表1课题表(task)字段类型备注taskIdInt primary key课题IDtasknamevarchar(20)课题名sflagint状态(是否被选)taskTextvarchar(50)课题内容表2选择

5、课题(chosetask)字段类型备注ctIdint primary key学生选课题iduIdvarchar(10)外键taskIdInt课题ID表3上传课题(puttask)字段类型备注ptIdint primary key老师上传课题iduIdvarchar(10)外键taskIdInt课题ID表4角色表(roleinfo)字段类型备注roleIdInt primary key角色IDrolenamevarchar(10)角色名表5权限表(rightinfo)字段类型备注rightCodevarchar(20)primary key权限rightParentCodevarchar(30)

6、 父权限rightTypevarchar(20)rightTextvarchar(50)RightUrlvarchar(30)url地址RightTipvarchar(50)表6角色权限表(roleright)rr_idInt primary key主键rr_roleidInt外键 role表rr_rightCodevarchar(20)外键 rightinfo表表74. 经典功效模块具体设计和实现过程用户模块登录功效代码:public String doLogin() Userinfo uu= userService.checkUser(user); if(uu!=null) Servlet

7、ActionContext.getRequest().getSession().setAttribute(USER, uu); int roleId=uu.getRoleinfo().getRoleId(); Roleinfo r= roleService.getRoleWithRights(roleId); String menuString=buildDTreeMenuString(r); ServletActionContext.getRequest().getSession().setAttribute(MENU_STRING, menuString); return main; el

8、se return input; public Userinfo checkUser(Userinfo u) Userinfo uu=null;String hql=from Userinfo where userid=? and pwd=?;Object args = new Objectu.getUserid(),u.getPwd();List list = commonDao.list(hql, args);if(list!=null & list.size()0)uu = list.get(0);return uu;public List list(String hql, Object

9、 args) List list= this.getHibernateTemplate().find(hql,args);return list;查询信息功效代码:public String toList()SPageBean spb = new SPageBean();HttpServletRequest request = ServletActionContext.getRequest();int offset = 0;if (request.getParameter(pager.offset) = null) offset = 0; else offset = Integer.parse

10、Int(request.getParameter(pager.offset);int maxPageItems;if (request.getAttribute(maxPageItems) = null) maxPageItems = 5; else maxPageItems = Integer.parseInt(request.getParameter(maxPageItems);spb.setOffset(offset);spb.setPageSize(maxPageItems);infoService.getList(spb);request.setAttribute(SPB, spb)

11、;return list;public void getList(SPageBean spb) String hql=from Userinfo;commonDao.listByPage(hql, spb);public void listByPage(String hql, SPageBean spb) final String hql1=hql;final SPageBean spb1=spb;if(hql!=null)int total=(Integer) this.getHibernateTemplate().execute(new HibernateCallback() public

12、 Object doInHibernate(Session sess) throws HibernateException,SQLException String qString=;if(hql1.toLowerCase().indexOf(select )!=-1)int idx=hql1.toLowerCase().indexOf(from);qString=select count(*) +hql1.substring(idx,hql1.length();elseqString=select count(*) +hql1;Query cQuery=sess.createQuery(qSt

13、ring);cQuery.setCacheable(true);long o= (Long)cQuery.uniqueResult();int ii=(int)o;return ii;);spb.setTotal(total);List data=(List)this.getHibernateTemplate().execute(new HibernateCallback() public Object doInHibernate(Session sess) throws HibernateException,SQLException Query query= sess.createQuery

14、(hql1);query.setFirstResult(spb1.getOffset();query.setMaxResults(spb1.getPageSize();return query.list(););spb.setDatas(data);public class SPageBean private int offset;private int pageSize;private int total;private List datas;public int getTotal() return total;public void setTotal(int total) this.tot

15、al = total;public List getDatas() return datas;public void setDatas(List datas) this.datas = datas;public int getOffset() return offset;public void setOffset(int offset) this.offset = offset;public int getPageSize() return pageSize;public void setPageSize(int pageSize) this.pageSize = pageSize;上传课题功

16、效代码:public String toadd()return add;public String doadd()if(taskService.doAdd(task)= true)SPageBean spb = new SPageBean();HttpServletRequest request = ServletActionContext.getRequest();int offset = 0;if (request.getParameter(pager.offset) = null) offset = 0; else offset = Integer.parseInt(request.ge

17、tParameter(pager.offset);int maxPageItems;if (request.getAttribute(maxPageItems) = null) maxPageItems = 5; else maxPageItems = Integer.parseInt(request.getParameter(maxPageItems);spb.setOffset(offset);spb.setPageSize(maxPageItems);taskService.getTaskinfo(spb);ServletActionContext.getRequest().setAtt

18、ribute(SPB1, spb);return list;elsereturn add;public boolean doAdd(TaskInfo t) Serializable ret = commonDao.add(t);return ret!=null;管理员模块管理员对角色管理功效:public class RoleAction extends ActionSupportprivate IRoleService roleService;private IRightService rightService;private Roleinfo role;public void setRol

19、eService(IRoleService roleService) this.roleService = roleService;public void setRightService(IRightService rightService) this.rightService = rightService;public Roleinfo getRole() return role;public void setRole(Roleinfo role) this.role = role;public String toList()List roles= roleService.getList()

20、;ServletActionContext.getRequest().setAttribute(ROLES, roles);return list;public String toAssign()List rights= rightService.getAllRights();Roleinfo r = roleService.getRoleWithRights(role.getRoleId();for(Rightinfo right:rights)if(r.getRights().contains(right)right.setChecked(checked);ServletActionCon

21、text.getRequest().setAttribute(ROLE, r);ServletActionContext.getRequest().setAttribute(RIGHTS,rights);return assign;public String doAssign() throws ExceptionHttpServletRequest request=ServletActionContext.getRequest();String newRights=request.getParameterValues(CheckBox_Rights);roleService.updateRol

22、eRights(role.getRoleId(),newRights);HttpServletResponse response=ServletActionContext.getResponse();response.sendRedirect(role!toAssign.action?role.roldId=+role.getRoleId()+&message=ok);return null;public class RightServiceImpl_H implements IRightServiceprivate ICommonDAO commonDao;public void setCo

23、mmonDao(ICommonDAO commonDao) monDao = commonDao;public List getAllRights() String hql=from Rightinfo;List list = commonDao.list(hql);return list;管理员对用户管理功效:(增、删、改、查)public String delete()int uid = Integer.parseInt(ServletActionContext.getRequest().getParameter(userid);boolean flag = userService.del

24、ete(uid);if(flag)return list1;elsereturn list;/编辑用户public String toedit()int uid=Integer.parseInt(ServletActionContext.getRequest().getParameter(userid);Userinfo uu = userService.detail(uid);ServletActionContext.getRequest().setAttribute(USER2, uu);return edit;public String edit()boolean flag = user

25、Service.update(user);if(flag)return list;elsereturn edit_error;public String detail()int uid=Integer.parseInt(ServletActionContext.getRequest().getParameter(userid);Userinfo uu = userService.detail(uid);ServletActionContext.getRequest().setAttribute(USER1, uu); return detail; public String add()if(u

26、serService.addUser(user)= true)List user = userService.list();ServletActionContext.getRequest().setAttribute(USERS, user);return list;elsereturn add;public String toadd()return add;public String doLogin() Userinfo uu= userService.checkUser(user); if(uu!=null) ServletActionContext.getRequest().getSes

27、sion().setAttribute(USER, uu); int roleId=uu.getRoleinfo().getRoleId(); Roleinfo r= roleService.getRoleWithRights(roleId); String menuString=buildDTreeMenuString(r); ServletActionContext.getRequest().getSession().setAttribute(MENU_STRING, menuString); return main; else return input; public boolean a

28、ddUser(Userinfo u) Serializable ret = commonDao.add(u);return ret!=null;public List list() String hql = from Userinfo;List list = commonDao.list(hql);return list;public Userinfo detail(int userid) Userinfo uu=null;String hql=from Userinfo u left outer join fetch u.role where u.userid=?;Object args=n

29、ew Objectuserid;List list= commonDao.list(hql, args);if(list!=null & list.size()0)uu=list.get(0);return uu;public Userinfo toedit(int userid) Userinfo uu=null;String hql=from Userinfo u left outer join fetch u.role where u.userid=?;Object args=new Objectuserid;List list= commonDao.list(hql, args);if

30、(list!=null & list.size()0)uu=list.get(0);return uu;public boolean update(Userinfo u) trycommonDao.update(u);return true;catch(Exception ex)return false;public boolean delete(int uid) tryUserinfo u = (Userinfo)commonDao.get(Userinfo.class,uid);u.setFlag(0);return true;catch(Exception ex)return false;5. 软件测试及运行评价测试步骤(1) 主页测试(2) 用户登录测试(3) 用户信息管理测试(4) 角色权限管理测试(5) 课题上传测试模块测试模块估计测试功效输入、输出功效造成差异原因主页正常显示,各个连接正常显示一致无用户登陆、注册验证用户名(ID,满足系统设定要求)和密码一致性一致无用户信息管理对用户进行增,删,改,查显示正确页面和数据一致无角色权限管理给用户分配角色权限一致无课题上传录入课题所用信息保留在数据库中一致无6. 软件实习总结经过实习,愈加深入了解掌握了开发平台配置,对编程有了深入掌握。明白了开发一个项目标工作次序。对项目标业务熟悉是开发项目标首要条件。

展开阅读全文
相似文档                                   自信AI助手自信AI助手
猜你喜欢                                   自信AI导航自信AI导航
搜索标签

当前位置:首页 > 学术论文 > 毕业论文/毕业设计

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服