版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、毕业设计选题管理系统前言每年毕业临近,都有大量的毕业生需要进行毕业设计,这其中的首要关节就是课题的选择,以往指导老师都是采用人工手写方式给学生们提供相关的课题供学生选择, 如果指导老师带领的学生比较多,或者是当年毕业的学生比较多,这样就容易造成学生的课题选择很混乱, 指导教师难于统计学生的课题选择情况等一系列问题,基于这些传统问题, 我们需要一个能够自动统计、实时分配课题的一个管理平台来帮助学生、指导老师。此系统的开发,主要的目的是使老师能更好的管理课程设计, 也能使学生能更好的把自己想要选的课程正确无误的选出来。 使处在选课时期的学生能有条不紊的进行。系统的需求分析2.1 功能需求毕业设计选
2、题管理系统功能要求:毕业设计题目维护和查询: 毕业设计题目的2.2 开发环境需求操作系统: windowXP或更高版本因为毕业设计课题管理系统针对的用户是学生和教师,学生和教师普遍使用 windows 操作系统,所以选着 windowsXP或更高版本的操作系统web服务器: apache-tomcat6apache-tomcat6 是开源的免费的 web 服务器,节省开发成本数据库: MySQLMySQL 是一款免费的数据库,节省成本开发工具: myeclipse8.5myeclipse8.5 功能强大的 JavaEE 开发工具,该管理系统选用 JavaEE 开发。系统设计3.1 基本设计概念
3、和处理流程本系统采用结构化分析,设计顺序为自顶向下,层层逐步细化。毕业设计课题管理系统图 13.2 软件功能设计选题管理用户登录指指导学教导老学生师老师生信信师上选息息选传题管管题学1理理生目毕业设计课题管理系统图 23.2 数据库设计图年龄姓名roleId1选择1Flag课程 ID性别用户 Id密码用户1拥有n课程课题内容课题名2毕业设计课题管理系统图 3角色 ID角色名角色1拥有n功能功能编码功能指标父级功能编码功能地址功能类型功能文本说明图 43毕业设计课题管理系统数据库表用户表 (user)字段类型备注useridVarchar ( 20) 用户 IDprimary keyPwdvar
4、char(32)用户密码roleIdInt外键tnameVarchar(20)姓名sexVarchar(5)性别AgeInt年龄表 1课题表 (task)字段类型备注taskIdIntprimary课题 IDkeytasknamevarchar(20)课题名sflagint状态(是否被选)taskTextvarchar(50)课题内容表 24毕业设计课题管理系统选择课题 (chosetask)字段类型备注ctIdintprimary学生选课题 idkeyuIdvarchar(10)外键taskIdInt课题 ID表 3上传课题 (puttask)字段类型备注ptIdintprimary教师上传
5、课题keyiduIdvarchar(10)外键taskIdInt课题 ID表 4角色表 (roleinfo)字段类型备注roleIdIntprimary角色 ID5毕业设计课题管理系统keyrolenamevarchar(10)角色名表 5权限表 (rightinfo)字段类型备注rightCodevarchar(20)primary权限keyrightParentCodevarchar(30)父权限rightTypevarchar(20)rightTextvarchar(50)RightUrlvarchar(30)url 地址RightTipvarchar(50)表 6角色权限表( role
6、right)rr_idIntprimary主键keyrr_roleidInt外键 role 表rr_rightCodevarchar(20)外键 rightinfo表表 76毕业设计课题管理系统典型功能模块的详细设计和实现过程用户模块登录功能代码:publicString doLogin()Userinfo uu=userService.checkUser(user);if(uu!=null)ServletActionContext.getRequest().getSession().setAttribute(USER , uu);introleId=uu.getRoleinfo().getR
7、oleId();Roleinfo r=roleService.getRoleWithRights(roleId);String menuString=buildDTreeMenuString(r);ServletActionContext.getRequest().getSession().setAttribute(MENU_STRING, menuString);returnmain;elsereturninput;7毕业设计课题管理系统publicUserinfo checkUser(Userinfo u) Userinfo uu=null;String hql=from Userinfo
8、 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);returnuu;publicList list(String hql, Object args) List list=this.getHibernateTemplate().find(hql,args);returnlist;查询信息功能代码:publicString toList(
9、)SPageBean spb =new SPageBean();HttpServletRequestrequest= ServletActionContext.getRequest();intoffset = 0;if(request.getParameter(pager.offset) =null ) offset = 0;elseoffset =Integer.parseInt(request.getParameter(pager.offset);intmaxPageItems;if (request.getAttribute(maxPageItems)= null) maxPageIte
10、ms = 5;elsemaxPageItems =Integer.parseInt(request.getParameter(maxPageItems);spb.setOffset(offset);spb.setPageSize(maxPageItems);infoService.getList(spb);request.setAttribute(SPB, spb);returnlist;publicvoid getList(SPageBean spb) 8毕业设计课题管理系统String hql=from Userinfo;commonDao .listByPage(hql, spb);pu
11、blicvoidlistByPage(String hql, SPageBean spb) finalString hql1=hql;finalSPageBean spb1=spb;if(hql!=null)inttotal=(Integer)this.getHibernateTemplate().execute(newHibernateCallback() publicObject doInHibernate(Session sess)throwsHibernateException,SQLException String qString= ;if(hql1.toLowerCase().in
12、dexOf(select )!=-1)intidx=hql1.toLowerCase().indexOf(from);qString=select count(*)+hql1.substring(idx,hql1.length();else qString=select count(*) +hql1;Query cQuery=sess.createQuery(qString);cQuery.setCacheable(true);longo= (Long)cQuery.uniqueResult();intii=(int)o;returnii;);spb.setTotal(total);List
13、data=(List)this.getHibernateTemplate().execute(newHibernateCallback() publicObject doInHibernate(Session sess)throwsHibernateException,SQLException Query query= sess.createQuery(hql1);query.setFirstResult(spb1.getOffset();query.setMaxResults(spb1.getPageSize();returnquery.list(););9毕业设计课题管理系统spb.set
14、Datas(data);publicclass SPageBean privateintoffset;privateintpageSize;privateinttotal;privateListdatas ;publicintgetTotal() returntotal;publicvoidsetTotal(int total) this. total= total;publicList getDatas() returndatas;publicvoidsetDatas(List datas) this. datas= datas;publicintgetOffset() returnoffs
15、et;publicvoidsetOffset(intoffset) this. offset= offset;publicintgetPageSize() returnpageSize;publicvoidsetPageSize(intpageSize) this. pageSize= pageSize;上传课题功能代码:publicString toadd()returnadd;publicString doadd()if( taskService.doAdd(task)=true)10毕业设计课题管理系统SPageBean spb =new SPageBean();HttpServletR
16、equest request =ServletActionContext.getRequest();intoffset = 0;if(request.getParameter(pager.offset) =null) offset = 0; else offset =Integer.parseInt(request.getParameter(pager.offset);intmaxPageItems;if(request.getAttribute(maxPageItems) =null) maxPageItems = 5; else maxPageItems =Integer.parseInt
17、(request.getParameter(maxPageItems);spb.setOffset(offset);spb.setPageSize(maxPageItems);taskService.getTaskinfo(spb);ServletActionContext.getRequest().setAttribute(SPB1,spb);returnlist;elsereturnadd;publicbooleandoAdd(TaskInfo t) Serializable ret =commonDao .add(t);returnret!=null;管理员模块管理员对角色管理功能:pu
18、blicclassRoleActionextendsActionSupportprivateIRoleServiceroleService;privateIRightServicerightService;privateRoleinforole ;publicvoid setRoleService(IRoleService roleService) 11毕业设计课题管理系统this. roleService= roleService;publicvoidsetRightService(IRightService rightService) this. rightService= rightSe
19、rvice;publicRoleinfo getRole() returnrole;publicvoidsetRole(Roleinfo role) this. role= role;publicString toList()List roles=roleService.getList();ServletActionContext.getRequest().setAttribute(ROLES ,roles);returnlist;publicString toAssign()List rights=rightService.getAllRights();Roleinfo r =roleSer
20、vice.getRoleWithRights(role.getRoleId();for(Rightinfo right:rights)if(r.getRights().contains(right)right.setChecked(checked);ServletActionContext.getRequest().setAttribute(ROLE , r);ServletActionContext.getRequest().setAttribute(RIGHTS,rights);returnassign;publicString doAssign()throwsExceptionHttpS
21、ervletRequest request=ServletActionContext.getRequest();StringnewRights=request.getParameterValues(CheckBox_Rights);roleService.updateRoleRights(role.getRoleId(),newRights);12毕业设计课题管理系统HttpServletResponseresponse=ServletActionContext.getResponse();response.sendRedirect(role!toAssign.action?role.rold
22、Id=+ role.getRoleId()+&message=ok);returnnull;publicclassRightServiceImpl_HimplementsIRightServiceprivateICommonDAOcommonDao ;publicvoidsetCommonDao(ICommonDAO commonDao) this. commonDao= commonDao;publicList getAllRights() String hql=from Rightinfo;List list =commonDao .list(hql);returnlist;管理员对用户管
23、理功能: (增、删、改、查)publicString delete()intuid =Integer.parseInt(ServletActionContext.getRequest().getParameter(userid);booleanflag =userService.delete(uid);if(flag)returnlist1;elsereturnlist;编辑用户publicString toedit()int13毕业设计课题管理系统uid=Integer.parseInt(ServletActionContext.getRequest().getParameter(useri
24、d);Userinfo uu =userService.detail(uid);ServletActionContext.getRequest().setAttribute(USER2 , uu);returnedit;publicString edit()booleanflag =userService.update(user);if(flag)returnlist;elsereturnedit_error;publicString detail()intuid=Integer.parseInt(ServletActionContext.getRequest().getParameter(u
25、serid);Userinfo uu =userService.detail(uid);ServletActionContext.getRequest().setAttribute(USER1 , uu);returndetail;publicString add()if( userService.addUser(user)=true)List user =userService.list();ServletActionContext.getRequest().setAttribute(USERS ,user);returnlist;elsereturnadd;publicString toa
26、dd()14毕业设计课题管理系统returnadd;publicString doLogin()Userinfo uu=userService.checkUser(user);if(uu!=null)ServletActionContext.getRequest().getSession().setAttribute(USER , uu);introleId=uu.getRoleinfo().getRoleId();Roleinfo r=roleService.getRoleWithRights(roleId);String menuString=buildDTreeMenuString(r)
27、;ServletActionContext.getRequest().getSession().setAttribute(MENU_STRING, menuString);returnmain;elsereturninput;publicbooleanaddUser(Userinfo u) Serializable ret =commonDao .add(u);returnret!=null;publicList list() String hql =from Userinfo;List list =commonDao .list(hql);returnlist;publicUserinfo detail(intuserid) Userinfo uu=null;String hql=from Userinfo u left outer join fetch u.role whereu.userid=
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2027年综合评价招生校测笔试模拟试卷(常识+逻辑专项)
- 行测试题剖析及答案呈现
- 高校宠物解剖学考试题目及答案
- 产品质量延保服务合同(一般)
- 焊工考试基础试题及答案梳理
- 物料泄露专项试题及完整答案
- 2026-2030硬质柔性电路板行业市场现状供需分析及重点企业投资评估规划分析研究报告
- 2026-2030中国万向轴行业需求趋向及未来发展机遇剖析研究报告
- 2026年交通安全法规与常识模拟考试题
- 2026年高一物理必修一第九章原子物理测试题
- 2025年教师招聘考试(心理健康教育)(中小学)综合能力测试题及答案
- 2026新版生产安全事故应急预案+两个报告
- 工艺纪律检查方案
- 江苏盐城东台市2026年专职网格员招聘考试试卷-含答案解析
- 2026年消化系统内镜报告规范解读手册
- 2026年南昌县医疗健康集团县120急救中心自主招聘16人考试备考题库及答案详解
- 2026年CCAA国家注册审核员考试(有机产品认证基础)复习题及答案
- 汽车维修管理制度大全
- 2025年国家文物保护工程监理师考试试卷(附答案)
- 2026内蒙古工程建设行业供需现状调研及战略发展规划分析报告
- 2026年初级注册安全工程师《安全生产专业实务(其他安全)》真题试卷(附答案解析)
评论
0/150
提交评论