├── .gitignore ├── .project ├── LICENSE ├── README.md ├── WebContent ├── META-INF │ └── MANIFEST.MF ├── WEB-INF │ ├── lib │ │ ├── antlr-2.7.7.jar │ │ ├── asm-3.3.jar │ │ ├── asm-commons-3.3.jar │ │ ├── asm-tree-3.3.jar │ │ ├── commons-fileupload-1.3.jar │ │ ├── commons-io-2.0.1.jar │ │ ├── commons-lang3-3.1.jar │ │ ├── commons-logging-1.1.3.jar │ │ ├── dom4j-1.6.1.jar │ │ ├── freemarker-2.3.19.jar │ │ ├── javassist-3.11.0.GA.jar │ │ ├── javassist-3.15.0-GA.jar │ │ ├── jboss-logging-3.1.0.GA.jar │ │ ├── jboss-transaction-api_1.1_spec-1.0.1.Final.jar │ │ ├── log4j-1.2.17.jar │ │ ├── mongo-2.10.1.jar │ │ ├── morphia-0.107.jar │ │ ├── ognl-3.0.6.jar │ │ ├── poi-3.10-FINAL-20140208.jar │ │ ├── struts2-core-2.3.15.1.jar │ │ └── xwork-core-2.3.15.1.jar │ └── web.xml ├── css │ ├── bootstrap-switch.css │ ├── bootstrap-switch.min.css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.min.css │ ├── bootstrap.css │ ├── bootstrap.min.css │ ├── login.css │ ├── main.css │ └── side.css ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ └── glyphicons-halflings-regular.ttf ├── images │ ├── background(1).jpg │ ├── background(2).jpg │ ├── background(3).jpg │ ├── background(4).jpg │ ├── background(5).jpg │ ├── background(6).jpg │ ├── background(7).jpg │ └── favicon.ico ├── js │ ├── bootstrap-switch.js │ ├── bootstrap-switch.min.js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── jquery-1.10.2.min.js │ └── jquery-1.10.2.min.map ├── jsp │ ├── administrator │ │ ├── addStudent.jsp │ │ ├── addTeacher.jsp │ │ ├── admin.jsp │ │ ├── adminStudent.jsp │ │ ├── adminSys.jsp │ │ ├── adminTeacher.jsp │ │ ├── gradeManage.jsp │ │ ├── releaseNotice.jsp │ │ └── side.jsp │ ├── authentication.jsp │ ├── changePasswd.jsp │ ├── departmentHead │ │ ├── departmentHead.jsp │ │ ├── departmentHeadGroup.jsp │ │ ├── departmentHeadInfo.jsp │ │ ├── departmentHeadStudent.jsp │ │ ├── departmentHeadStudentDetail.jsp │ │ ├── departmentHeadStudentGrade.jsp │ │ ├── departmentHeadSubject.jsp │ │ ├── departmentHeadSubjectDetail.jsp │ │ ├── departmentHeadSubjectManage.jsp │ │ ├── departmentHeadTeacher.jsp │ │ ├── departmentHeadTeacherDetail.jsp │ │ ├── side.jsp │ │ └── studentGradeManage.jsp │ ├── footer.jsp │ ├── index.jsp │ ├── login.jsp │ ├── nav.jsp │ ├── result.jsp │ ├── student │ │ ├── selectSubject.jsp │ │ ├── side.jsp │ │ ├── student.jsp │ │ ├── studentGrade.jsp │ │ ├── studentInfo.jsp │ │ └── studentTeacher.jsp │ ├── teacher │ │ ├── side.jsp │ │ ├── teacher.jsp │ │ ├── teacherChangeSubject.jsp │ │ ├── teacherInfo.jsp │ │ ├── teacherStudent.jsp │ │ ├── teacherStudentDetail.jsp │ │ ├── teacherStudentGrade.jsp │ │ ├── teacherSubject.jsp │ │ ├── teacherSubjectManage.jsp │ │ └── teacherUploadFiles.jsp │ └── template │ │ ├── page.jsp │ │ ├── pageWithNoSide.jsp │ │ └── side.jsp └── static │ ├── student_info.xls │ └── teacher_info.xls ├── build └── classes │ └── struts.xml ├── doc └── 毕业设计管理系统软件需求说明书.docx └── src ├── com └── find1x │ └── gpms │ ├── action │ ├── AdminSysControlAction.java │ ├── ChangeIssueAction.java │ ├── ChangePasswdAction.java │ ├── DeleteIssueAction.java │ ├── DepartmentHeadGroupAction.java │ ├── DepartmentHeadStudentGradeAction.java │ ├── GradeManageAction.java │ ├── IssueInfoAction.java │ ├── LoginAction.java │ ├── LogoutAction.java │ ├── ReleaseNoticeAction.java │ ├── SelectIssueAction.java │ ├── UploadIssueAction.java │ ├── UploadStudentInfoAction.java │ ├── UploadTeacherInfoAction.java │ ├── studentGradeAction.java │ ├── studentInfoAction.java │ ├── studentTeacherAction.java │ ├── teacherChangeSubjectAction.java │ ├── teacherInfoAction.java │ ├── teacherStudentAction.java │ ├── teacherStudentDetailAction.java │ ├── teacherStudentGradeAction.java │ ├── teacherSubjectManageAction.java │ └── teacherUploadFilesAction.java │ ├── dao │ ├── ExcelPOI.java │ ├── IssueDAO.java │ ├── NoticeDAO.java │ ├── StudentDAO.java │ ├── SysControlDAO.java │ ├── TeacherDAO.java │ └── UserDAO.java │ ├── pojos │ ├── Administrator.java │ ├── DepartmentHead.java │ ├── Issue.java │ ├── Notice.java │ ├── Student.java │ ├── SysControl.java │ ├── Teacher.java │ └── User.java │ ├── test │ └── Test.java │ └── util │ └── MongoDBUtil.java ├── struts.administrator.xml ├── struts.departmentHead.xml ├── struts.general.xml ├── struts.student.xml ├── struts.teacher.xml └── struts.xml /.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /bin 3 | *.class 4 | 5 | 6 | # Package Files # 7 | *.war 8 | *.ear 9 | 10 | #Setting Files 11 | /.settings 12 | .classpath 13 | 14 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Graduation Project Management System 4 | 5 | 6 | 7 | 8 | org.eclipse.wst.jsdt.core.javascriptValidator 9 | 10 | 11 | 12 | org.eclipse.jdt.core.javabuilder 13 | 14 | 15 | 16 | org.eclipse.wst.common.project.facet.core.builder 17 | 18 | 19 | 20 | org.eclipse.wst.validation.validationbuilder 21 | 22 | 23 | 24 | 25 | org.eclipse.jem.workbench.JavaEMFNature 26 | org.eclipse.wst.common.modulecore.ModuleCoreNature 27 | org.eclipse.wst.common.project.facet.core.nature 28 | org.eclipse.jdt.core.javanature 29 | org.eclipse.wst.jsdt.core.jsNature 30 | 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 毕业设计管理系统 2 | ### Graduation Project Management System 3 | 4 | 一个Java EE的练习项目(未完善) 5 | 6 | ## 功能需求 7 | 毕业设计管理系统包括出题管理、选题管理、评分管理、教师分组管理等。根据系统需要,各个子系统的功能相互独立又相互关联,以下为毕业设计管理系统的工作基本流程: 8 | > 1. 基础数据维护 9 | > 1. 系主任设定选题上传时间 10 | > 1. 教务员开放出题子系统 11 | > 1. 教师在规定时间内上传题目 12 | > 1. 系主任审核题目,将不通过题目返回该教师,注明不合格原因 13 | > 1. 教师将修改后题目上传 14 | > 1. 系主任二次审核,将仍不合格题目废弃 15 | > 1. 系主任确定选题 16 | > 1. 系主任公布选题 17 | > 1. 教务员关闭出题子系统 18 | > 1. 系主任设定第一轮选题时间 19 | > 1. 教务员开放选题子系统 20 | > 1. 学生进行第一轮选题 21 | > 1. 系主任分配第一轮选题, 22 | > 1. 教务员关闭选题子系统 23 | > 1. 系主任设定第二轮选题时间 24 | > 1. 学生进行第二轮选题 25 | > 1. 系主任分配第二轮选题 26 | > 1. 系主任给剩余学生分配选题 27 | > 1. 教务员关闭选题子系统 28 | > 1. 学生查看自己的选题 29 | > 1. 教务员开放分组子系统 30 | > 1. 系主任给教师分组,定好评阅教师 31 | > 1. 教务员关闭分组子系统 32 | > 1. 教务员开放评分子系统 33 | > 1. 教师输入初评成绩与意见 34 | > 1. 教师输入评阅成绩与意见 35 | > 1. 答辩教师输入答辩成绩与意见 36 | > 1. 统计成绩信息 37 | > 1. 教务员关闭评分子系统 38 | > 1. 后期工作 39 | 40 | ## 技术选型 41 | 项目全部使用开源技术,可以在Windows、OS X、Linux全平台通用。 42 | > + 服务器环境:Tomcat 7 43 | > + 服务器语言:Java 44 | > + MVC框架:Struts 2 45 | > + 数据库:MongoDB 46 | > + ORM框架:morphia 47 | > + 模板:jsp 48 | > + 前端页面语言:HTML5 49 | > + 层叠样式表:CSS3 50 | > + 页面脚本语言:Javascript 51 | > + 页面框架:JQuery、Bootstrap 52 | > + 版本控制软件:Git 53 | > + 版本控制服务:Github 54 | > + IDE:Eclipse kepler 55 | 56 | 57 | ##Contributors 58 | + Author: [Sean](http://www.find1x.com) 59 | + Author: linfeng 60 | + Author: wsll 61 | 62 | ### License 63 | [Apache License](LICENSE) 64 | 65 | -------------------------------------------------------------------------------- /WebContent/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/antlr-2.7.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/antlr-2.7.7.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/asm-3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/asm-3.3.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/asm-commons-3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/asm-commons-3.3.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/asm-tree-3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/asm-tree-3.3.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/commons-fileupload-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/commons-fileupload-1.3.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/commons-io-2.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/commons-io-2.0.1.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/commons-lang3-3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/commons-lang3-3.1.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/commons-logging-1.1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/commons-logging-1.1.3.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/dom4j-1.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/dom4j-1.6.1.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/freemarker-2.3.19.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/freemarker-2.3.19.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/javassist-3.11.0.GA.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/javassist-3.11.0.GA.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/javassist-3.15.0-GA.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/javassist-3.15.0-GA.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/jboss-logging-3.1.0.GA.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/jboss-logging-3.1.0.GA.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/jboss-transaction-api_1.1_spec-1.0.1.Final.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/jboss-transaction-api_1.1_spec-1.0.1.Final.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/log4j-1.2.17.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/log4j-1.2.17.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/mongo-2.10.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/mongo-2.10.1.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/morphia-0.107.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/morphia-0.107.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/ognl-3.0.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/ognl-3.0.6.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/poi-3.10-FINAL-20140208.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/poi-3.10-FINAL-20140208.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/struts2-core-2.3.15.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/struts2-core-2.3.15.1.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/xwork-core-2.3.15.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/WEB-INF/lib/xwork-core-2.3.15.1.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | GraduationProjectManagementSystem 7 | 8 | index.html 9 | index.htm 10 | index.jsp 11 | default.html 12 | default.htm 13 | default.jsp 14 | 15 | 16 | struts2 17 | org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter 18 | 19 | 20 | struts2 21 | /* 22 | 23 | -------------------------------------------------------------------------------- /WebContent/css/login.css: -------------------------------------------------------------------------------- 1 | .form-login { 2 | margin: 30px auto auto -15px; 3 | color: #999; 4 | filter: Alpha(opacity = 80); 5 | opacity: 0.8; 6 | text-align: center; 7 | padding: 20px 10px 10px 10px; 8 | border-top: 20px solid #151515; 9 | background-color: #050505; 10 | border-radius: 6px; 11 | } 12 | 13 | .form-login .form-login-heading,.form-login .checkbox { 14 | margin-bottom: 10px; 15 | } 16 | 17 | .form-login .checkbox { 18 | font-weight: normal; 19 | color: #fff; 20 | text-shadow: 1px 1px 2px #7d552d 21 | } 22 | 23 | .form-login .form-control { 24 | position: relative; 25 | font-size: 16px; 26 | height: auto; 27 | padding: 10px; 28 | -webkit-box-sizing: border-box; 29 | -moz-box-sizing: border-box; 30 | box-sizing: border-box; 31 | } 32 | 33 | .form-login .form-control:focus { 34 | z-index: 2; 35 | } 36 | 37 | .form-login input[type="text"] { 38 | margin-bottom: -1px; 39 | border-bottom-left-radius: 0; 40 | border-bottom-right-radius: 0; 41 | } 42 | 43 | .form-login input[type="password"] { 44 | margin-bottom: 10px; 45 | border-top-left-radius: 0; 46 | border-top-right-radius: 0; 47 | } 48 | 49 | .form-signup { 50 | max-width: 330px; 51 | padding: 15px; 52 | margin: 0 auto; 53 | margin-bottom: 10px; 54 | } 55 | 56 | .form-signup .form-control { 57 | position: relative; 58 | font-size: 16px; 59 | height: auto; 60 | padding: 10px; 61 | -webkit-box-sizing: border-box; 62 | -moz-box-sizing: border-box; 63 | box-sizing: border-box; 64 | } 65 | 66 | .form-signup .form-control:focus { 67 | z-index: 2; 68 | } 69 | 70 | .form-signup input[name="user.username"] { 71 | margin-bottom: -1px; 72 | border-bottom-left-radius: 0; 73 | border-bottom-right-radius: 0; 74 | } 75 | 76 | .form-signup input[name="user.password"] { 77 | margin-bottom: -1px; 78 | border-top-left-radius: 0; 79 | border-top-right-radius: 0; 80 | border-bottom-left-radius: 0; 81 | border-bottom-right-radius: 0; 82 | } 83 | 84 | .form-signup input[name="user.repassword"] { 85 | margin-bottom: 10px; 86 | border-top-left-radius: 0; 87 | border-top-right-radius: 0; 88 | } -------------------------------------------------------------------------------- /WebContent/css/main.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/css/main.css -------------------------------------------------------------------------------- /WebContent/css/side.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2013 Twitter, Inc. 3 | * 4 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 5 | * details, see http://creativecommons.org/licenses/by/3.0/. 6 | */ 7 | 8 | /* 9 | * Bootstrap Documentation 10 | * Special styles for presenting Bootstrap's documentation and code examples. 11 | * 12 | * Table of contents: 13 | * 14 | * Scaffolding 15 | * Main navigation 16 | * Footer 17 | * Social buttons 18 | * Homepage 19 | * Page headers 20 | * Old docs callout 21 | * Ads 22 | * Side navigation 23 | * Docs sections 24 | * Callouts 25 | * Grid styles 26 | * Examples 27 | * Code snippets (highlight) 28 | * Responsive tests 29 | * Glyphicons 30 | * Customizer 31 | * Miscellaneous 32 | */ 33 | 34 | /* 35 | * Side navigation 36 | * 37 | * Scrollspy and affixed enhanced navigation to highlight sections and secondary 38 | * sections of docs content. 39 | */ 40 | 41 | /* By default it's not affixed in mobile views, so undo that */ 42 | .bs-sidebar.affix { 43 | position: static; 44 | } 45 | 46 | /* First level of nav */ 47 | .bs-sidenav { 48 | margin-top: 30px; 49 | margin-bottom: 30px; 50 | padding-top: 10px; 51 | padding-bottom: 10px; 52 | border-top: 20px solid #151515; 53 | text-shadow: 0 1px 0 #000; 54 | background-color: #050505; 55 | filter: Alpha(opacity = 80); 56 | opacity: 0.8; 57 | border-radius: 5px; 58 | } 59 | 60 | .bs-slidebar .nav>li { 61 | position: relative; 62 | } 63 | /* All levels of nav */ 64 | .bs-sidebar .nav>li>a { 65 | display: block; 66 | color: #F5F5F5; 67 | /*padding: 5px 20px;*/ 68 | } 69 | 70 | .bs-sidebar .nav>li>a:hover,.bs-sidebar .nav>li>a:focus { 71 | text-decoration: none; 72 | color: #428bca; 73 | background-color: #e5e3e9; 74 | border-right: 1px solid #dbd8e0; 75 | } 76 | 77 | .bs-sidebar .nav>.active>a,.bs-sidebar .nav>.active:hover>a,.bs-sidebar .nav>.active:focus>a 78 | { 79 | font-weight: bold; 80 | color: #563d7c; 81 | background-color: transparent; 82 | border-right: 1px solid #563d7c; 83 | } 84 | /* Nav: second level (shown on .active) */ 85 | .bs-sidebar .nav .nav { 86 | display: none; 87 | /* Hide by default, but at >768px, show it */ 88 | margin-bottom: 8px; 89 | } 90 | 91 | .bs-sidebar .nav .nav>li>a { 92 | padding-top: 3px; 93 | padding-bottom: 3px; 94 | padding-left: 30px; 95 | font-size: 90%; 96 | } 97 | /* Show and affix the side nav when space allows it */ 98 | @media ( min-width : 992px) { 99 | .bs-sidebar .nav>.active>ul { 100 | display: block; 101 | } 102 | /* Widen the fixed sidebar */ 103 | .bs-sidebar.affix,.bs-sidebar.affix-bottom { 104 | width: 213px; 105 | } 106 | .bs-sidebar.affix { 107 | position: fixed; 108 | /* Undo the static from mobile first approach */ 109 | top: 80px; 110 | } 111 | .bs-sidebar.affix-bottom { 112 | position: absolute; 113 | /* Undo the static from mobile first approach */ 114 | } 115 | .bs-sidebar.affix-bottom .bs-sidenav,.bs-sidebar.affix .bs-sidenav { 116 | margin-top: 0; 117 | margin-bottom: 0; 118 | } 119 | } 120 | 121 | @media ( min-width : 1200px) { 122 | /* Widen the fixed sidebar again */ 123 | .bs-sidebar.affix-bottom,.bs-sidebar.affix { 124 | width: 263px; 125 | } 126 | } -------------------------------------------------------------------------------- /WebContent/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /WebContent/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /WebContent/images/background(1).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/images/background(1).jpg -------------------------------------------------------------------------------- /WebContent/images/background(2).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/images/background(2).jpg -------------------------------------------------------------------------------- /WebContent/images/background(3).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/images/background(3).jpg -------------------------------------------------------------------------------- /WebContent/images/background(4).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/images/background(4).jpg -------------------------------------------------------------------------------- /WebContent/images/background(5).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/images/background(5).jpg -------------------------------------------------------------------------------- /WebContent/images/background(6).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/images/background(6).jpg -------------------------------------------------------------------------------- /WebContent/images/background(7).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/images/background(7).jpg -------------------------------------------------------------------------------- /WebContent/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/images/favicon.ico -------------------------------------------------------------------------------- /WebContent/jsp/administrator/addStudent.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 |
41 |
42 | <%--导入侧边栏 --%> 43 | <%@ include file="side.jsp"%>
44 |
45 | <%-- 在注释之间添加代码 --%> 46 | 53 |
54 |
55 | 学号:
56 | 姓名 :
57 | 学院:

58 | 专业:

59 | 性别:

60 | 联系电话:
61 | 邮箱:
62 | 63 |
64 |
65 | 66 | <%-----------------%> 67 |
68 |
69 |
70 |
71 |
72 | <%--页脚版权信息 --%> 73 | <%@ include file="/jsp/footer.jsp"%> 74 | <%--js脚本 --%> 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /WebContent/jsp/administrator/addTeacher.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 |
41 |
42 | <%--导入侧边栏 --%> 43 | <%@ include file="side.jsp"%>
44 |
45 | <%-- 在注释之间添加代码 --%> 46 | 53 | 54 |
55 |
56 | 工号:
57 | 姓名 :
58 | 学院:

59 | 职务:

60 | 性别:

61 | 联系电话:
62 | 邮箱:
63 | 64 |
65 |
66 | <%-----------------%> 67 |
68 |
69 |
70 |
71 |
72 | <%--页脚版权信息 --%> 73 | <%@ include file="/jsp/footer.jsp"%> 74 | <%--js脚本 --%> 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /WebContent/jsp/administrator/admin.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | <%@page 5 | import="com.find1x.gpms.dao.NoticeDAO,com.find1x.gpms.pojos.Notice,java.util.List"%> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 毕业设计管理系统 13 | 14 | 15 | <% 16 | // stylesheet 17 | %> 18 | 19 | 20 | <% 21 | // icon 22 | %> 23 | 24 | 25 | 26 | 27 | 31 | 32 | 33 |
34 |
35 | <%-- 此行控制是否该页面未登录无法访问 --%> 36 | <%@ include file="/jsp/authentication.jsp"%> 37 | 38 | <%-- header导航条--%> 39 | <%@ include file="/jsp/nav.jsp"%> 40 | 41 |
42 |
43 |
44 | <%--导入侧边栏 --%> 45 | <%@ include file="side.jsp"%>
46 |
47 | <%-- 在注释之间添加代码 --%> 48 |

49 | 通知 50 |

51 | <% 52 | List notices = NoticeDAO.getNotice((String) session 53 | .getAttribute("type").toString()); 54 | for (Notice n : notices) { 55 | %> 56 |

57 | <%=n.getContext()%> 58 |

59 | <% 60 | } 61 | %> 62 | <%-----------------%> 63 |
64 |
65 |
66 |
67 |
68 | <%--页脚版权信息 --%> 69 | <%@ include file="/jsp/footer.jsp"%> 70 | <%--js脚本 --%> 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /WebContent/jsp/administrator/adminStudent.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | <%@page 5 | import="com.find1x.gpms.dao.StudentDAO,com.find1x.gpms.pojos.Student,java.util.List"%> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 毕业设计管理系统 13 | 14 | 15 | <% 16 | // stylesheet 17 | %> 18 | 19 | 20 | <% 21 | // icon 22 | %> 23 | 24 | 25 | 26 | 27 | 31 | 32 | 33 |
34 |
35 | <%-- 此行控制是否该页面未登录无法访问 --%> 36 | <%@ include file="/jsp/authentication.jsp"%> 37 | 38 | <%-- header导航条--%> 39 | <%@ include file="/jsp/nav.jsp"%> 40 | 41 |
42 |
43 |
44 | <%--导入侧边栏 --%> 45 | <%@ include file="side.jsp"%>
46 |
47 | <%-- 在注释之间添加代码 --%> 48 |
导入学生信息
49 |
50 |
51 |
53 | 55 | 56 |
57 |

58 | 点击下载学生信息模板 59 |

60 |
61 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | <% 76 | List list = StudentDAO.getList(); 77 | for (Student s : list) { 78 | %> 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | <% 92 | } 93 | %> 94 |
学号姓名性别班级学院专业电话邮箱其他
<%=s.getNo()%><%=s.getName()%><%=s.getSex()%><%=s.getClassno()%><%=s.getDepartment()%><%=s.getSpecialty()%><%=s.getTelephone()%><%=s.getEmail()%>
95 | <%-----------------%> 96 |
97 |
98 |
99 |
100 |
101 | <%--页脚版权信息 --%> 102 | <%@ include file="/jsp/footer.jsp"%> 103 | <%--js脚本 --%> 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /WebContent/jsp/administrator/adminTeacher.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | <%@ page 5 | import="com.find1x.gpms.dao.TeacherDAO,com.find1x.gpms.pojos.Teacher,java.util.List"%> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 毕业设计管理系统 13 | 14 | 15 | <% 16 | // stylesheet 17 | %> 18 | 19 | 20 | <% 21 | // icon 22 | %> 23 | 24 | 25 | 26 | 27 | 31 | 32 | 33 |
34 |
35 | <%-- 此行控制是否该页面未登录无法访问 --%> 36 | <%@ include file="/jsp/authentication.jsp"%> 37 | 38 | <%-- header导航条--%> 39 | <%@ include file="/jsp/nav.jsp"%> 40 | 41 |
42 |
43 |
44 | <%--导入侧边栏 --%> 45 | <%@ include file="side.jsp"%>
46 |
47 | <%-- 在注释之间添加代码 --%> 48 |
导入教师信息
49 |
50 |
51 |
53 | 55 | 56 |
57 |

58 | 点击下载教师信息模板 59 |

60 |
61 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | <% 75 | List list = TeacherDAO.getList(); 76 | for (Teacher t : list) { 77 | %> 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | <% 90 | } 91 | %> 92 |
工号姓名性别学院电话邮箱职务其他
<%=t.getNo()%><%=t.getName()%><%=t.getSex()%><%=t.getDepartment()%><%=t.getTelephone()%><%=t.getEmail()%><%=t.getPostion()%>
93 | <%-----------------%> 94 |
95 |
96 |
97 |
98 |
99 | <%--页脚版权信息 --%> 100 | <%@ include file="/jsp/footer.jsp"%> 101 | <%--js脚本 --%> 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /WebContent/jsp/administrator/gradeManage.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 |
41 |
42 | <%--导入侧边栏 --%> 43 | <%@ include file="side.jsp"%>
44 |
45 | <%-- 在注释之间添加代码 --%> 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
姓名初评成绩评阅成绩答辩成绩总成绩
62 | <%-----------------%> 63 |
64 |
65 |
66 |
67 |
68 | <%--页脚版权信息 --%> 69 | <%@ include file="/jsp/footer.jsp"%> 70 | <%--js脚本 --%> 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /WebContent/jsp/administrator/releaseNotice.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 |
41 |
42 | <%--导入侧边栏 --%> 43 | <%@ include file="side.jsp"%>
44 |
45 | <%-- 在注释之间添加代码 --%> 46 |
47 | 编辑通知:
48 | 49 |
发布到:
教务员 50 |     系主任    51 | 教师    学生
53 |
54 |
55 | 56 |
57 |
58 | <%-----------------%> 59 |
60 |
61 |
62 |
63 |
64 | <%--页脚版权信息 --%> 65 | <%@ include file="/jsp/footer.jsp"%> 66 | <%--js脚本 --%> 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /WebContent/jsp/administrator/side.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 |
5 | 12 |
-------------------------------------------------------------------------------- /WebContent/jsp/authentication.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <% 4 | if (request.getSession().getAttribute("username") == null) { 5 | response.sendRedirect("index"); 6 | } 7 | %> -------------------------------------------------------------------------------- /WebContent/jsp/changePasswd.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 | <%-- 在注释之间添加代码 --%> 41 |
42 |
43 | <% 44 | if (request.getParameter("status") != null 45 | && request.getParameter("status").equals("error")) { 46 | %> 47 |
用户名或密码错误
48 | <% 49 | } 50 | %> 51 |
52 |
修改密码
53 |
54 | 67 |
68 |
69 |
70 |
71 | 87 | <%-----------------%> 88 |
89 |
90 |
91 | <%--页脚版权信息 --%> 92 | <%@ include file="/jsp/footer.jsp"%> 93 | <%--js脚本 --%> 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /WebContent/jsp/departmentHead/departmentHead.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | <%@page 5 | import="com.find1x.gpms.dao.NoticeDAO,com.find1x.gpms.pojos.Notice,java.util.List"%> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 毕业设计管理系统 13 | 14 | 15 | <% 16 | // stylesheet 17 | %> 18 | 19 | 20 | <% 21 | // icon 22 | %> 23 | 24 | 25 | 26 | 27 | 31 | 32 | 33 |
34 |
35 | <%-- 此行控制是否该页面未登录无法访问 --%> 36 | <%@ include file="/jsp/authentication.jsp"%> 37 | 38 | <%-- header导航条--%> 39 | <%@ include file="/jsp/nav.jsp"%> 40 | 41 |
42 |
43 |
44 | <%--导入侧边栏 --%> 45 | <%@ include file="side.jsp"%>
46 |
47 | <%-- 在注释之间添加代码 --%> 48 |

通知

49 | <% 50 | List notices=NoticeDAO.getNotice((String)session.getAttribute("type").toString()); 51 | for(Notice n:notices){ 52 | %> 53 |

<%=n.getContext() %>

54 | <% 55 | } 56 | %> 57 | <%-----------------%> 58 |
59 |
60 |
61 |
62 |
63 | <%--页脚版权信息 --%> 64 | <%@ include file="/jsp/footer.jsp"%> 65 | <%--js脚本 --%> 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /WebContent/jsp/departmentHead/departmentHeadGroup.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@page 3 | import="com.find1x.gpms.pojos.Teacher,com.find1x.gpms.dao.TeacherDAO"%> 4 | <%@ page language="java" contentType="text/html; charset=UTF-8" 5 | pageEncoding="UTF-8"%> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 毕业设计管理系统 13 | 14 | 15 | <% 16 | // stylesheet 17 | %> 18 | 19 | 20 | 21 | <% 22 | // icon 23 | %> 24 | 25 | 26 | 27 | 28 | 32 | 33 | 34 |
35 |
36 | <%-- 此行控制是否该页面未登录无法访问 --%> 37 | <%@ include file="/jsp/authentication.jsp"%> 38 | 39 | <%-- header导航条--%> 40 | <%@ include file="/jsp/nav.jsp"%> 41 | 42 |
43 |
44 |
45 | <%--导入侧边栏 --%> 46 | <%@ include file="side.jsp"%>
47 |
48 | <%-- 在注释之间添加代码 --%> 49 | <% 50 | Teacher teacher = TeacherDAO.getTeacherInfo(request 51 | .getParameter("no")); 52 | %> 53 |
54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 63 | 65 | 68 | 70 | 71 |
导师所在小组是否组长
<%=teacher.getName()%>" />
72 |
73 | <%-----------------%> 74 |
75 |
76 |
77 |
78 |
79 | <%--页脚版权信息 --%> 80 | <%@ include file="/jsp/footer.jsp"%> 81 | <%--js脚本 --%> 82 | 83 | 84 | 85 | 89 | 90 | -------------------------------------------------------------------------------- /WebContent/jsp/departmentHead/departmentHeadInfo.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | <%@page 5 | import="com.find1x.gpms.dao.TeacherDAO,com.find1x.gpms.pojos.Teacher,java.util.List"%> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 毕业设计管理系统 13 | 14 | 15 | <% 16 | // stylesheet 17 | %> 18 | 19 | 20 | <% 21 | // icon 22 | %> 23 | 24 | 25 | 26 | 27 | 31 | 32 | 33 |
34 |
35 | <%-- 此行控制是否该页面未登录无法访问 --%> 36 | <%@ include file="/jsp/authentication.jsp"%> 37 | 38 | <%-- header导航条--%> 39 | <%@ include file="/jsp/nav.jsp"%> 40 | 41 |
42 |
43 |
44 | <%--导入侧边栏 --%> 45 | <%@ include file="side.jsp"%>
46 |
47 | <%-- 在注释之间添加代码 --%> 48 | <% 49 | Teacher teacher=TeacherDAO.getTeacherInfo((String)session.getAttribute("username")); 50 | %> 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 |
工号<%=teacher.getNo() %>姓名<%=teacher.getName() %>
学院<%=teacher.getDepartment() %>职务<%=teacher.getPostion() %>
性别<%=teacher.getSex() %>联系电话<%=teacher.getTelephone() %>
邮箱<%=teacher.getEmail() %>
75 | <%-----------------%> 76 |
77 |
78 |
79 |
80 |
81 | <%--页脚版权信息 --%> 82 | <%@ include file="/jsp/footer.jsp"%> 83 | <%--js脚本 --%> 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /WebContent/jsp/departmentHead/departmentHeadStudent.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | <%@page 5 | import="com.find1x.gpms.dao.StudentDAO,com.find1x.gpms.pojos.Student,java.util.List"%> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 毕业设计管理系统 13 | 14 | 15 | <% 16 | // stylesheet 17 | %> 18 | 19 | 20 | <% 21 | // icon 22 | %> 23 | 24 | 25 | 26 | 27 | 31 | 32 | 33 |
34 |
35 | <%-- 此行控制是否该页面未登录无法访问 --%> 36 | <%@ include file="/jsp/authentication.jsp"%> 37 | 38 | <%-- header导航条--%> 39 | <%@ include file="/jsp/nav.jsp"%> 40 | 41 |
42 |
43 |
44 | <%--导入侧边栏 --%> 45 | <%@ include file="side.jsp"%>
46 |
47 | <%-- 在注释之间添加代码 --%> 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | <% 61 | List list = StudentDAO.getList(); 62 | %> 63 | <% 64 | for (Student s : list) { 65 | %> 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 77 | 78 | <% 79 | } 80 | %> 81 | 82 |
学号班级姓名学院专业性别联系电话邮箱成绩
<%=s.getNo()%><%=s.getClassno()%><%=s.getName()%><%=s.getDepartment()%><%=s.getSpecialty()%><%=s.getSex()%><%=s.getTelephone()%><%=s.getEmail()%>
83 | <%-----------------%> 84 |
85 |
86 |
87 |
88 |
89 | <%--页脚版权信息 --%> 90 | <%@ include file="/jsp/footer.jsp"%> 91 | <%--js脚本 --%> 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /WebContent/jsp/departmentHead/departmentHeadStudentDetail.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 |
41 |
42 | <%--导入侧边栏 --%> 43 | <%@ include file="side.jsp"%>
44 |
45 | <%-- 在注释之间添加代码 --%> 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |
学号姓名
班级性别
学院专业
联系方式邮箱
72 | <%-----------------%> 73 |
74 |
75 |
76 |
77 |
78 | <%--页脚版权信息 --%> 79 | <%@ include file="/jsp/footer.jsp"%> 80 | <%--js脚本 --%> 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /WebContent/jsp/departmentHead/departmentHeadStudentGrade.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 |
41 |
42 | <%--导入侧边栏 --%> 43 | <%@ include file="side.jsp"%>
44 |
45 | <%-- 在注释之间添加代码 --%> 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
初评成绩
初评意见
评阅成绩
评阅意见
答辩成绩
答辩意见
总成绩
55 |
56 | 58 |
59 | <%-----------------%> 60 |
61 |
62 |
63 |
64 |
65 | <%--页脚版权信息 --%> 66 | <%@ include file="/jsp/footer.jsp"%> 67 | <%--js脚本 --%> 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /WebContent/jsp/departmentHead/departmentHeadSubject.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 |
41 |
42 | <%--导入侧边栏 --%> 43 | <%@ include file="side.jsp"%>
44 |
45 | <%-- 在注释之间添加代码 --%> 46 |
47 | 题目名称:

48 | 题目简介:

49 | 题目要求:


50 | 面向专业:  51 |

56 | 可选人数:
57 |
58 |
59 | <%-----------------%> 60 |
61 |
62 |
63 |
64 |
65 | <%--页脚版权信息 --%> 66 | <%@ include file="/jsp/footer.jsp"%> 67 | <%--js脚本 --%> 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /WebContent/jsp/departmentHead/departmentHeadSubjectDetail.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 |
41 |
42 | <%--导入侧边栏 --%> 43 | <%@ include file="side.jsp"%>
44 |
45 | <%-- 在注释之间添加代码 --%> 46 |
47 | 题目名称:

48 | 题目简介:

49 | 题目要求:


50 | 面向专业:  51 |

56 | 可选人数:
57 |
58 |
59 | <%-----------------%> 60 |
61 |
62 |
63 |
64 |
65 | <%--页脚版权信息 --%> 66 | <%@ include file="/jsp/footer.jsp"%> 67 | <%--js脚本 --%> 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /WebContent/jsp/departmentHead/departmentHeadSubjectManage.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | <%@ taglib prefix="s" uri="/struts-tags"%> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 毕业设计管理系统 12 | 13 | 14 | <% 15 | // stylesheet 16 | %> 17 | 18 | 19 | <% 20 | // icon 21 | %> 22 | 23 | 24 | 25 | 26 | 30 | 31 | 32 |
33 |
34 | <%-- 此行控制是否该页面未登录无法访问 --%> 35 | <%@ include file="/jsp/authentication.jsp"%> 36 | 37 | <%-- header导航条--%> 38 | <%@ include file="/jsp/nav.jsp"%> 39 | 40 |
41 |
42 |
43 | <%--导入侧边栏 --%> 44 | <%@ include file="side.jsp"%>
45 |
46 | <%-- 在注释之间添加代码 --%> 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 61 | 63 | 64 | 65 |
题目名称题目简介面向专业其他
${subject.title}${subject.info}${subject.specialty}
66 | 76 |
77 | 79 |
80 | <%-----------------%> 81 |
82 |
83 |
84 |
85 |
86 | <%--页脚版权信息 --%> 87 | <%@ include file="/jsp/footer.jsp"%> 88 | <%--js脚本 --%> 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /WebContent/jsp/departmentHead/departmentHeadTeacher.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | <%@ page 5 | import="com.find1x.gpms.dao.TeacherDAO,com.find1x.gpms.pojos.Teacher,java.util.List"%> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 毕业设计管理系统 13 | 14 | 15 | <% 16 | // stylesheet 17 | %> 18 | 19 | 20 | <% 21 | // icon 22 | %> 23 | 24 | 25 | 26 | 27 | 31 | 32 | 33 |
34 |
35 | <%-- 此行控制是否该页面未登录无法访问 --%> 36 | <%@ include file="/jsp/authentication.jsp"%> 37 | 38 | <%-- header导航条--%> 39 | <%@ include file="/jsp/nav.jsp"%> 40 | 41 |
42 |
43 |
44 | <%--导入侧边栏 --%> 45 | <%@ include file="side.jsp"%>
46 |
47 | <%-- 在注释之间添加代码 --%> 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | <% 60 | List list = TeacherDAO.getList(); 61 | %> 62 | <% 63 | for (Teacher t : list) { 64 | %> 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 75 | 76 | <% 77 | } 78 | %> 79 | 80 |
工号姓名学院职务性别联系电话邮箱其他
<%=t.getNo()%><%=t.getName()%><%=t.getDepartment()%><%=t.getPostion()%><%=t.getSex()%><%=t.getTelephone()%><%=t.getEmail()%>
81 | <%-----------------%> 82 |
83 |
84 |
85 |
86 |
87 | <%--页脚版权信息 --%> 88 | <%@ include file="/jsp/footer.jsp"%> 89 | <%--js脚本 --%> 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /WebContent/jsp/departmentHead/departmentHeadTeacherDetail.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 |
41 |
42 | <%--导入侧边栏 --%> 43 | <%@ include file="side.jsp"%>
44 |
45 | <%-- 在注释之间添加代码 --%> 46 | 47 | 48 | 49 | 50 | 51 |
工号姓名
学院职务
性别联系电话
邮箱
52 | <%-----------------%> 53 |
54 |
55 |
56 |
57 |
58 | <%--页脚版权信息 --%> 59 | <%@ include file="/jsp/footer.jsp"%> 60 | <%--js脚本 --%> 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /WebContent/jsp/departmentHead/side.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 |
5 | 12 |
-------------------------------------------------------------------------------- /WebContent/jsp/departmentHead/studentGradeManage.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 |
41 |
42 | <%--导入侧边栏 --%> 43 | <%@ include file="side.jsp"%>
44 |
45 | <%-- 在注释之间添加代码 --%> 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
姓名初评成绩评阅成绩答辩成绩总成绩
62 | <%-----------------%> 63 |
64 |
65 |
66 |
67 |
68 | <%--页脚版权信息 --%> 69 | <%@ include file="/jsp/footer.jsp"%> 70 | <%--js脚本 --%> 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /WebContent/jsp/footer.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | -------------------------------------------------------------------------------- /WebContent/jsp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | 34 | <%-- header导航条--%> 35 | <%@ include file="/jsp/nav.jsp"%> 36 | 37 |
38 |
39 |
40 |
41 | <%@ include file="login.jsp"%> 42 |
43 |
44 |
45 | <%-- 在注释之间添加代码 --%> 46 | <% 47 | if (session.getAttribute("username") == null) { 48 | %> 49 |
50 |
51 |

欢迎使用毕业设计管理系统!

52 |
53 |
公告栏
54 |

55 | 各位毕业生:
56 | 本学年选题信息将通过毕业设计管理系统陆续发布,请同学登录到毕业设计管理系统进行查询。 57 | 如有疑问,请咨询所在校区教务处。 58 |
59 |

60 |
61 | <% 62 | //权限 0为学生 1为老师 2为教务员 3为系主任 63 | } else { 64 | if (session.getAttribute("type") != null 65 | && session.getAttribute("type").toString().equals("0")) { 66 | response.sendRedirect("/gpms/student"); 67 | }else if(session.getAttribute("type") != null 68 | && session.getAttribute("type").toString().equals("1")){ 69 | response.sendRedirect("/gpms/teacher"); 70 | }else if(session.getAttribute("type") != null 71 | && session.getAttribute("type").toString().equals("2")){ 72 | response.sendRedirect("/gpms/admin"); 73 | }else if(session.getAttribute("type") != null 74 | && session.getAttribute("type").toString().equals("3")){ 75 | response.sendRedirect("/gpms/departmentHead"); 76 | } 77 | } 78 | %> 79 | <%-----------------%> 80 |
81 |
82 |
83 |
84 |
85 | <%--页脚版权信息 --%> 86 | <%@ include file="/jsp/footer.jsp"%> 87 | <%--js脚本 --%> 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /WebContent/jsp/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 |
5 | <% 6 | String status = request.getParameter("status"); 7 | if (status != null && status.equals("error")) { 8 | %> 9 |
用户名或密码错误
10 | <% 11 | } 12 | %> 13 |
23 |
24 | 34 | -------------------------------------------------------------------------------- /WebContent/jsp/nav.jsp: -------------------------------------------------------------------------------- 1 | <%@page import="com.find1x.gpms.dao.UserDAO"%> 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | -------------------------------------------------------------------------------- /WebContent/jsp/result.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 | <%-- 在注释之间添加代码 --%> 41 |
42 |
44 |

${message}

45 |

46 | 点击返回 47 |

48 |
49 |
50 | <%-----------------%> 51 |
52 |
53 |
54 | <%--页脚版权信息 --%> 55 | <%@ include file="/jsp/footer.jsp"%> 56 | <%--js脚本 --%> 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /WebContent/jsp/student/side.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 |
5 | 11 |
-------------------------------------------------------------------------------- /WebContent/jsp/student/student.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | <%@page 5 | import="com.find1x.gpms.dao.NoticeDAO,com.find1x.gpms.pojos.Notice,java.util.List"%> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 毕业设计管理系统 13 | 14 | 15 | <% 16 | // stylesheet 17 | %> 18 | 19 | 20 | <% 21 | // icon 22 | %> 23 | 24 | 25 | 26 | 27 | 31 | 32 | 33 |
34 |
35 | <%-- 此行控制是否该页面未登录无法访问 --%> 36 | <%@ include file="/jsp/authentication.jsp"%> 37 | 38 | <%-- header导航条--%> 39 | <%@ include file="/jsp/nav.jsp"%> 40 | 41 |
42 |
43 |
44 | <%--导入侧边栏 --%> 45 | <%@ include file="side.jsp"%>
46 |
47 | <%-- 在注释之间添加代码 --%> 48 |

通知

49 | <% 50 | List notices=NoticeDAO.getNotice((String)session.getAttribute("type").toString()); 51 | for(Notice n:notices){ 52 | %> 53 |

<%=n.getContext() %>

54 | <% 55 | } 56 | %> 57 | <%-----------------%> 58 |
59 |
60 |
61 |
62 |
63 | <%--页脚版权信息 --%> 64 | <%@ include file="/jsp/footer.jsp"%> 65 | <%--js脚本 --%> 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /WebContent/jsp/student/studentGrade.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 |
41 |
42 | <%--导入侧边栏 --%> 43 | <%@ include file="side.jsp"%>
44 |
45 | <%-- 在注释之间添加代码 --%> 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
初评成绩
初评意见
评阅成绩
评阅意见
答辩成绩
答辩意见
总成绩
55 | <%-----------------%> 56 |
57 |
58 |
59 |
60 |
61 | <%--页脚版权信息 --%> 62 | <%@ include file="/jsp/footer.jsp"%> 63 | <%--js脚本 --%> 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /WebContent/jsp/student/studentInfo.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | <%@ taglib prefix="s" uri="/struts-tags"%> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 毕业设计管理系统 12 | 13 | 14 | <% 15 | // stylesheet 16 | %> 17 | 18 | 19 | <% 20 | // icon 21 | %> 22 | 23 | 24 | 25 | 26 | 30 | 31 | 32 |
33 |
34 | <%-- 此行控制是否该页面未登录无法访问 --%> 35 | <%@ include file="/jsp/authentication.jsp"%> 36 | 37 | <%-- header导航条--%> 38 | <%@ include file="/jsp/nav.jsp"%> 39 | 40 |
41 |
42 |
43 | <%--导入侧边栏 --%> 44 | <%@ include file="side.jsp"%>
45 |
46 | <%-- 在注释之间添加代码 --%> 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 |
学号${student.no}姓名${student.name}
班级${student.classno}性别${student.sex}
学院${student.department}专业${student.specialty}
联系方式${student.telephone}邮箱${student.email}
73 | 74 |
75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 |
选题${issue.title}
简介${issue.info}
要求${issue.requirement}
选题文档下载点击下载
93 |
94 | <%-----------------%> 95 |
96 |
97 |
98 |
99 |
100 | <%--页脚版权信息 --%> 101 | <%@ include file="/jsp/footer.jsp"%> 102 | <%--js脚本 --%> 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /WebContent/jsp/student/studentTeacher.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@page 3 | import="com.find1x.gpms.dao.*,com.find1x.gpms.pojos.*,java.util.List"%> 4 | <%@ page language="java" contentType="text/html; charset=UTF-8" 5 | pageEncoding="UTF-8"%> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 毕业设计管理系统 13 | 14 | 15 | <% 16 | // stylesheet 17 | %> 18 | 19 | 20 | <% 21 | // icon 22 | %> 23 | 24 | 25 | 26 | 27 | 31 | 32 | 33 |
34 |
35 | <%-- 此行控制是否该页面未登录无法访问 --%> 36 | <%@ include file="/jsp/authentication.jsp"%> 37 | 38 | <%-- header导航条--%> 39 | <%@ include file="/jsp/nav.jsp"%> 40 | 41 |
42 |
43 |
44 | <%--导入侧边栏 --%> 45 | <%@ include file="side.jsp"%>
46 |
47 | <%-- 在注释之间添加代码 --%> 48 | <% 49 | Teacher teacher = StudentDAO.getTeacherInfo((String)session.getAttribute("username")); 50 | if(teacher!=null){ 51 | %> 52 | 53 | 54 | 55 | 56 | 57 |
工号<%=teacher.getNo() %>姓名<%=teacher.getName() %>
学院<%=teacher.getDepartment() %>职务<%=teacher.getPostion() %>
性别<%=teacher.getSex() %>联系电话<%=teacher.getTelephone() %>
邮箱<%=teacher.getEmail() %>
58 | <% 59 | } 60 | %> 61 | <%-----------------%> 62 |
63 |
64 |
65 |
66 |
67 | <%--页脚版权信息 --%> 68 | <%@ include file="/jsp/footer.jsp"%> 69 | <%--js脚本 --%> 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /WebContent/jsp/teacher/side.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 |
5 | 12 |
-------------------------------------------------------------------------------- /WebContent/jsp/teacher/teacher.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | <%@page 5 | import="com.find1x.gpms.dao.NoticeDAO,com.find1x.gpms.pojos.Notice,java.util.List"%> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 毕业设计管理系统 13 | 14 | 15 | <% 16 | // stylesheet 17 | %> 18 | 19 | 20 | <% 21 | // icon 22 | %> 23 | 24 | 25 | 26 | 27 | 31 | 32 | 33 |
34 |
35 | <%-- 此行控制是否该页面未登录无法访问 --%> 36 | <%@ include file="/jsp/authentication.jsp"%> 37 | 38 | <%-- header导航条--%> 39 | <%@ include file="/jsp/nav.jsp"%> 40 | 41 |
42 |
43 |
44 | <%--导入侧边栏 --%> 45 | <%@ include file="side.jsp"%>
46 |
47 | <%-- 在注释之间添加代码 --%> 48 |

通知

49 | <% 50 | List notices=NoticeDAO.getNotice((String)session.getAttribute("type").toString()); 51 | for(Notice n:notices){ 52 | %> 53 |

<%=n.getContext() %>

54 | <% 55 | } 56 | %> 57 | <%-----------------%> 58 |
59 |
60 |
61 |
62 |
63 | <%--页脚版权信息 --%> 64 | <%@ include file="/jsp/footer.jsp"%> 65 | <%--js脚本 --%> 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /WebContent/jsp/teacher/teacherChangeSubject.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | <%@ taglib prefix="s" uri="/struts-tags" %> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 毕业设计管理系统 12 | 13 | 14 | <% 15 | // stylesheet 16 | %> 17 | 18 | 19 | <% 20 | // icon 21 | %> 22 | 23 | 24 | 25 | 26 | 30 | 31 | 32 |
33 |
34 | <%-- 此行控制是否该页面未登录无法访问 --%> 35 | <%@ include file="/jsp/authentication.jsp"%> 36 | 37 | <%-- header导航条--%> 38 | <%@ include file="/jsp/nav.jsp"%> 39 | 40 |
41 |
42 |
43 | <%--导入侧边栏 --%> 44 | <%@ include file="side.jsp"%>
45 |
46 | <%-- 在注释之间添加代码 --%> 47 |
48 | 题目编号:

49 | 题目名称:

50 | 题目简介:

51 | 题目要求:


52 | 面向专业:  53 |

70 | 可选人数:
71 |
72 |
73 | <%-----------------%> 74 |
75 |
76 |
77 |
78 |
79 | <%--页脚版权信息 --%> 80 | <%@ include file="/jsp/footer.jsp"%> 81 | <%--js脚本 --%> 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /WebContent/jsp/teacher/teacherInfo.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 |
41 |
42 | <%--导入侧边栏 --%> 43 | <%@ include file="side.jsp"%>
44 |
45 | <%-- 在注释之间添加代码 --%> 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 |
工号${teacher.no}姓名${teacher.name}
学院${teacher.department}职务${teacher.postion}
性别${teacher.sex}联系电话${teacher.telephone}
邮箱${teacher.email}
70 | <%-----------------%> 71 |
72 |
73 |
74 |
75 |
76 | <%--页脚版权信息 --%> 77 | <%@ include file="/jsp/footer.jsp"%> 78 | <%--js脚本 --%> 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /WebContent/jsp/teacher/teacherStudent.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | <%@ taglib prefix="s" uri="/struts-tags"%> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 毕业设计管理系统 12 | 13 | 14 | <% 15 | // stylesheet 16 | %> 17 | 18 | 19 | <% 20 | // icon 21 | %> 22 | 23 | 24 | 25 | 26 | 30 | 31 | 32 |
33 |
34 | <%-- 此行控制是否该页面未登录无法访问 --%> 35 | <%@ include file="/jsp/authentication.jsp"%> 36 | 37 | <%-- header导航条--%> 38 | <%@ include file="/jsp/nav.jsp"%> 39 | 40 |
41 |
42 |
43 | <%--导入侧边栏 --%> 44 | <%@ include file="side.jsp"%>
45 |
46 | <%-- 在注释之间添加代码 --%> 47 |

自评学生

48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 64 | 66 | 67 | 68 |
姓名学号专业选题其他
${student.name}${student.no}${student.specialty}${student.issue}
69 |

互评学生

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 |
姓名学号专业选题其他
87 |

答辩学生

88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 |
姓名学号专业选题其他
105 | 115 | <%-----------------%> 116 |
117 |
118 |
119 |
120 |
121 | <%--页脚版权信息 --%> 122 | <%@ include file="/jsp/footer.jsp"%> 123 | <%--js脚本 --%> 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /WebContent/jsp/teacher/teacherStudentDetail.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | <%@ taglib prefix="s" uri="/struts-tags"%> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 毕业设计管理系统 12 | 13 | 14 | <% 15 | // stylesheet 16 | %> 17 | 18 | 19 | <% 20 | // icon 21 | %> 22 | 23 | 24 | 25 | 26 | 30 | 31 | 32 |
33 |
34 | <%-- 此行控制是否该页面未登录无法访问 --%> 35 | <%@ include file="/jsp/authentication.jsp"%> 36 | 37 | <%-- header导航条--%> 38 | <%@ include file="/jsp/nav.jsp"%> 39 | 40 |
41 |
42 |
43 | <%--导入侧边栏 --%> 44 | <%@ include file="side.jsp"%>
45 |
46 | <%-- 在注释之间添加代码 --%> 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 |
学号${student.no}姓名${student.name}
班级${student.classno}性别${student.sex}
学院${student.department}专业${student.specialty}
联系方式${student.telephone}邮箱${student.email}
73 |
74 | 76 |
77 | <%-----------------%> 78 |
79 |
80 |
81 |
82 |
83 | <%--页脚版权信息 --%> 84 | <%@ include file="/jsp/footer.jsp"%> 85 | <%--js脚本 --%> 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /WebContent/jsp/teacher/teacherStudentGrade.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 |
41 |
42 | <%--导入侧边栏 --%> 43 | <%@ include file="side.jsp"%>
44 |
45 | <%-- 在注释之间添加代码 --%> 46 |
47 | 初评成绩

48 | 初评意见
49 | 评阅成绩

50 | 评阅意见
51 | 答辩成绩

52 | 答辩意见

53 |
54 |
55 | <%-----------------%> 56 |
57 |
58 |
59 |
60 |
61 | <%--页脚版权信息 --%> 62 | <%@ include file="/jsp/footer.jsp"%> 63 | <%--js脚本 --%> 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /WebContent/jsp/teacher/teacherSubject.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 |
41 |
42 | <%--导入侧边栏 --%> 43 | <%@ include file="side.jsp"%>
44 |
45 | <%-- 在注释之间添加代码 --%> 46 |
47 | 题目名称:

48 | 题目简介:

49 | 题目要求:


50 | 面向专业:  51 |

56 | 可选人数:
57 |
58 |
59 | <%-----------------%> 60 |
61 |
62 |
63 |
64 |
65 | <%--页脚版权信息 --%> 66 | <%@ include file="/jsp/footer.jsp"%> 67 | <%--js脚本 --%> 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /WebContent/jsp/teacher/teacherSubjectManage.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | <%@ taglib prefix="s" uri="/struts-tags"%> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 毕业设计管理系统 12 | 13 | 14 | <% 15 | // stylesheet 16 | %> 17 | 18 | 19 | <% 20 | // icon 21 | %> 22 | 23 | 24 | 25 | 26 | 30 | 31 | 32 |
33 |
34 | <%-- 此行控制是否该页面未登录无法访问 --%> 35 | <%@ include file="/jsp/authentication.jsp"%> 36 | 37 | <%-- header导航条--%> 38 | <%@ include file="/jsp/nav.jsp"%> 39 | 40 |
41 |
42 |
43 | <%--导入侧边栏 --%> 44 | <%@ include file="side.jsp"%>
45 |
46 | <%-- 在注释之间添加代码 --%> 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 61 | 63 | 64 | 65 |
题目名称题目简介面向专业其他
${subject.title}${subject.info}${subject.specialty}
66 | 76 |
77 | 79 |
80 | <%-----------------%> 81 |
82 |
83 |
84 |
85 |
86 | <%--页脚版权信息 --%> 87 | <%@ include file="/jsp/footer.jsp"%> 88 | <%--js脚本 --%> 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /WebContent/jsp/teacher/teacherUploadFiles.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 |
41 |
42 | <%--导入侧边栏 --%> 43 | <%@ include file="side.jsp"%>
44 |
45 | <%-- 在注释之间添加代码 --%> 46 |
48 | 题目名称:

文档说明: 49 | 50 |
52 |
53 |
54 |
55 | <% 56 | if (request.getAttribute("message") != null) { 57 | %> 58 |
59 | <%=request.getAttribute("message")%> 60 |
61 | <% 62 | } 63 | %> 64 | <%-----------------%> 65 |
66 |
67 |
68 |
69 |
70 | <%--页脚版权信息 --%> 71 | <%@ include file="/jsp/footer.jsp"%> 72 | <%--js脚本 --%> 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /WebContent/jsp/template/page.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 | 39 |
40 |
41 |
42 | <%--导入侧边栏 --%> 43 | <%@ include file="side.jsp"%>
44 |
45 | <%-- 在注释之间添加代码 --%> 46 | 47 | <%-----------------%> 48 |
49 |
50 |
51 |
52 |
53 | <%--页脚版权信息 --%> 54 | <%@ include file="/jsp/footer.jsp"%> 55 | <%--js脚本 --%> 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /WebContent/jsp/template/pageWithNoSide.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 毕业设计管理系统 11 | 12 | 13 | <% 14 | // stylesheet 15 | %> 16 | 17 | 18 | <% 19 | // icon 20 | %> 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 |
32 |
33 | <%-- 此行控制是否该页面未登录无法访问 --%> 34 | <%@ include file="/jsp/authentication.jsp"%> 35 | 36 | <%-- header导航条--%> 37 | <%@ include file="/jsp/nav.jsp"%> 38 |
39 |
40 |
41 | <%-- 在注释之间添加代码 --%> 42 | 43 | <%-----------------%> 44 |
45 |
46 |
47 |
48 |
49 | <%--页脚版权信息 --%> 50 | <%@ include file="/jsp/footer.jsp"%> 51 | <%--js脚本 --%> 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /WebContent/jsp/template/side.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 |
5 | 17 |
-------------------------------------------------------------------------------- /WebContent/static/student_info.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/static/student_info.xls -------------------------------------------------------------------------------- /WebContent/static/teacher_info.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/WebContent/static/teacher_info.xls -------------------------------------------------------------------------------- /build/classes/struts.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /doc/毕业设计管理系统软件需求说明书.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/findix/GPMS/f80b7c2b56f22ee27293834ce67be496f76e3b4d/doc/毕业设计管理系统软件需求说明书.docx -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/ChangeIssueAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import java.util.List; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | import javax.servlet.http.HttpSession; 8 | 9 | import org.apache.struts2.ServletActionContext; 10 | 11 | import com.find1x.gpms.dao.IssueDAO; 12 | import com.find1x.gpms.dao.UserDAO; 13 | import com.find1x.gpms.pojos.Issue; 14 | import com.opensymphony.xwork2.ActionContext; 15 | import com.opensymphony.xwork2.ActionSupport; 16 | 17 | public class ChangeIssueAction extends ActionSupport{ 18 | ActionContext context = ActionContext.getContext(); 19 | HttpServletRequest request = (HttpServletRequest) context 20 | .get(ServletActionContext.HTTP_REQUEST); 21 | HttpServletResponse response = (HttpServletResponse) context 22 | .get(ServletActionContext.HTTP_RESPONSE); 23 | HttpSession session = request.getSession(); 24 | 25 | private Issue issue; 26 | private String _id; 27 | private List issues; 28 | 29 | public List getIssues() { 30 | return issues; 31 | } 32 | 33 | public void setIssues(List issues) { 34 | this.issues = issues; 35 | } 36 | public String get_id() { 37 | return _id; 38 | } 39 | 40 | public void set_id(String _id) { 41 | this._id = _id; 42 | } 43 | 44 | public Issue getIssue() { 45 | return issue; 46 | } 47 | 48 | public void setIssue(Issue issue) { 49 | this.issue = issue; 50 | } 51 | 52 | @Override 53 | public String execute() throws Exception { 54 | if (IssueDAO.changeIssue(_id,issue.getTitle(), issue.getInfo(), issue.getRequirement(), 55 | issue.getSpecialty(), issue.getTotal())) { 56 | if(UserDAO.getType((String)session.getAttribute("username"))==3) 57 | issues = IssueDAO.getList(); 58 | else 59 | issues = IssueDAO.getList((String)session.getAttribute("username")); 60 | return SUCCESS; 61 | } else { 62 | return ERROR; 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/ChangePasswdAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import java.util.List; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | import javax.servlet.http.HttpSession; 8 | 9 | import org.apache.struts2.ServletActionContext; 10 | import org.mongodb.morphia.Datastore; 11 | 12 | import com.find1x.gpms.dao.UserDAO; 13 | import com.find1x.gpms.pojos.User; 14 | import com.find1x.gpms.util.MongoDBUtil; 15 | import com.opensymphony.xwork2.ActionContext; 16 | import com.opensymphony.xwork2.ActionSupport; 17 | 18 | public class ChangePasswdAction extends ActionSupport { 19 | 20 | ActionContext context = ActionContext.getContext(); 21 | HttpServletRequest request = (HttpServletRequest) context 22 | .get(ServletActionContext.HTTP_REQUEST); 23 | HttpServletResponse response = (HttpServletResponse) context 24 | .get(ServletActionContext.HTTP_RESPONSE); 25 | HttpSession session = request.getSession(); 26 | 27 | private static final long serialVersionUID = 1L; 28 | private String oldPassword; 29 | private String password; 30 | private String message; 31 | 32 | public String getOldPassword() { 33 | return oldPassword; 34 | } 35 | 36 | public void setOldPassword(String oldPassword) { 37 | this.oldPassword = oldPassword; 38 | } 39 | 40 | public String getPassword() { 41 | return password; 42 | } 43 | 44 | public void setPassword(String password) { 45 | this.password = password; 46 | } 47 | 48 | public String getMessage() { 49 | return message; 50 | } 51 | 52 | @Override 53 | public String execute() throws Exception { 54 | Datastore ds = MongoDBUtil.getDatastore(); 55 | List list = UserDAO.findUserList(session.getAttribute("username") 56 | .toString(), oldPassword); 57 | if (list.size() == 0) { 58 | return ERROR; 59 | } else { 60 | ds.updateFirst( 61 | ds.find(User.class, "password", oldPassword), 62 | ds.createUpdateOperations(User.class).set("password", 63 | password)); 64 | message = "您已成功修改密码!"; 65 | return SUCCESS; 66 | } 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/DeleteIssueAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import java.util.List; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | import javax.servlet.http.HttpSession; 8 | 9 | import org.apache.struts2.ServletActionContext; 10 | 11 | import com.find1x.gpms.dao.IssueDAO; 12 | import com.find1x.gpms.pojos.Issue; 13 | import com.opensymphony.xwork2.ActionContext; 14 | import com.opensymphony.xwork2.ActionSupport; 15 | 16 | public class DeleteIssueAction extends ActionSupport{ 17 | ActionContext context = ActionContext.getContext(); 18 | HttpServletRequest request = (HttpServletRequest) context 19 | .get(ServletActionContext.HTTP_REQUEST); 20 | HttpServletResponse response = (HttpServletResponse) context 21 | .get(ServletActionContext.HTTP_RESPONSE); 22 | HttpSession session = request.getSession(); 23 | 24 | private String _id; 25 | private List issues; 26 | 27 | public List getIssues() { 28 | return issues; 29 | } 30 | 31 | public void setIssues(List issues) { 32 | this.issues = issues; 33 | } 34 | 35 | public String get_id() { 36 | return _id; 37 | } 38 | 39 | public void set_id(String _id) { 40 | this._id = _id; 41 | } 42 | 43 | @Override 44 | public String execute() throws Exception { 45 | if (IssueDAO.deleteIssue(_id)) { 46 | issues = IssueDAO.getList(); 47 | return SUCCESS; 48 | } else { 49 | return ERROR; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/DepartmentHeadGroupAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.apache.jasper.tagplugins.jstl.core.If; 8 | import org.apache.struts2.ServletActionContext; 9 | 10 | import com.find1x.gpms.dao.TeacherDAO; 11 | import com.find1x.gpms.pojos.Teacher; 12 | import com.opensymphony.xwork2.ActionContext; 13 | import com.opensymphony.xwork2.ActionSupport; 14 | 15 | public class DepartmentHeadGroupAction extends ActionSupport { 16 | 17 | ActionContext context = ActionContext.getContext(); 18 | HttpServletRequest request = (HttpServletRequest) context 19 | .get(ServletActionContext.HTTP_REQUEST); 20 | HttpServletResponse response = (HttpServletResponse) context 21 | .get(ServletActionContext.HTTP_RESPONSE); 22 | HttpSession session = request.getSession(); 23 | 24 | private static final long serialVersionUID = 1L; 25 | private Teacher teacher; 26 | private String isLeader; 27 | 28 | @Override 29 | public String execute() throws Exception { 30 | Teacher t = TeacherDAO.getTeacherInfo(teacher.getNo()); 31 | t.setGroup(teacher.getGroup()); 32 | t.setLeader("true".equals(isLeader) ? true : false); 33 | TeacherDAO.saveTeacher(t); 34 | return SUCCESS; 35 | } 36 | 37 | /** 38 | * @return the teacher 39 | */ 40 | public Teacher getTeacher() { 41 | return teacher; 42 | } 43 | 44 | /** 45 | * @param teacher 46 | * the teacher to set 47 | */ 48 | public void setTeacher(Teacher teacher) { 49 | this.teacher = teacher; 50 | } 51 | 52 | /** 53 | * @return the isLeader 54 | */ 55 | public String getIsLeader() { 56 | return isLeader; 57 | } 58 | 59 | /** 60 | * @param isLeader 61 | * the isLeader to set 62 | */ 63 | public void setIsLeader(String isLeader) { 64 | this.isLeader = isLeader; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/DepartmentHeadStudentGradeAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.apache.struts2.ServletActionContext; 8 | 9 | import com.opensymphony.xwork2.ActionContext; 10 | import com.opensymphony.xwork2.ActionSupport; 11 | 12 | public class DepartmentHeadStudentGradeAction extends ActionSupport { 13 | 14 | ActionContext context = ActionContext.getContext(); 15 | HttpServletRequest request = (HttpServletRequest) context 16 | .get(ServletActionContext.HTTP_REQUEST); 17 | HttpServletResponse response = (HttpServletResponse) context 18 | .get(ServletActionContext.HTTP_RESPONSE); 19 | HttpSession session = request.getSession(); 20 | 21 | private static final long serialVersionUID = 1L; 22 | 23 | @Override 24 | public String execute() throws Exception { 25 | return SUCCESS; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/GradeManageAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.apache.struts2.ServletActionContext; 8 | 9 | import com.opensymphony.xwork2.ActionContext; 10 | import com.opensymphony.xwork2.ActionSupport; 11 | 12 | public class GradeManageAction extends ActionSupport { 13 | 14 | ActionContext context = ActionContext.getContext(); 15 | HttpServletRequest request = (HttpServletRequest) context 16 | .get(ServletActionContext.HTTP_REQUEST); 17 | HttpServletResponse response = (HttpServletResponse) context 18 | .get(ServletActionContext.HTTP_RESPONSE); 19 | HttpSession session = request.getSession(); 20 | 21 | private static final long serialVersionUID = 1L; 22 | 23 | @Override 24 | public String execute() throws Exception { 25 | return SUCCESS; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/IssueInfoAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import java.io.PrintWriter; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | import javax.servlet.http.HttpSession; 8 | 9 | import org.apache.struts2.ServletActionContext; 10 | 11 | import com.find1x.gpms.dao.IssueDAO; 12 | import com.opensymphony.xwork2.ActionContext; 13 | import com.opensymphony.xwork2.ActionSupport; 14 | 15 | public class IssueInfoAction extends ActionSupport { 16 | 17 | ActionContext context = ActionContext.getContext(); 18 | HttpServletRequest request = (HttpServletRequest) context 19 | .get(ServletActionContext.HTTP_REQUEST); 20 | HttpServletResponse response = (HttpServletResponse) context 21 | .get(ServletActionContext.HTTP_RESPONSE); 22 | HttpSession session = request.getSession(); 23 | 24 | private static final long serialVersionUID = 1L; 25 | private String firstChoice; 26 | private String secondChoice; 27 | private String thirdChoice; 28 | 29 | public String getFirstChoice() { 30 | return firstChoice; 31 | } 32 | 33 | public void setFirstChoice(String firstChoice) { 34 | this.firstChoice = firstChoice; 35 | } 36 | 37 | public String getSecondChoice() { 38 | return secondChoice; 39 | } 40 | 41 | public void setSecondChoice(String secondChoice) { 42 | this.secondChoice = secondChoice; 43 | } 44 | 45 | public String getThirdChoice() { 46 | return thirdChoice; 47 | } 48 | 49 | public void setThirdChoice(String thirdChoice) { 50 | this.thirdChoice = thirdChoice; 51 | } 52 | 53 | @Override 54 | public String execute() throws Exception { 55 | response.setCharacterEncoding("UTF-8"); 56 | PrintWriter out=response.getWriter(); 57 | if(firstChoice!=null){ 58 | out.println(IssueDAO.getIssueJson(firstChoice)); 59 | }else if(secondChoice!=null){ 60 | out.println(IssueDAO.getIssueJson(secondChoice)); 61 | }else if(thirdChoice!=null){ 62 | out.println(IssueDAO.getIssueJson(thirdChoice)); 63 | } 64 | out.flush(); 65 | out.close(); 66 | return SUCCESS; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/LoginAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import java.util.List; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | import javax.servlet.http.HttpSession; 8 | 9 | import org.apache.struts2.ServletActionContext; 10 | 11 | import com.find1x.gpms.dao.UserDAO; 12 | import com.find1x.gpms.pojos.User; 13 | import com.opensymphony.xwork2.ActionContext; 14 | import com.opensymphony.xwork2.ActionSupport; 15 | 16 | public class LoginAction extends ActionSupport { 17 | 18 | ActionContext context = ActionContext.getContext(); 19 | HttpServletRequest request = (HttpServletRequest) context 20 | .get(ServletActionContext.HTTP_REQUEST); 21 | HttpServletResponse response = (HttpServletResponse) context 22 | .get(ServletActionContext.HTTP_RESPONSE); 23 | HttpSession session = request.getSession(); 24 | 25 | private static final long serialVersionUID = 1L; 26 | private User user; 27 | private String message; 28 | 29 | public User getUser() { 30 | return user; 31 | } 32 | 33 | public void setUser(User user) { 34 | this.user = user; 35 | } 36 | 37 | public String getMessage() { 38 | return message; 39 | } 40 | 41 | public void setMessage(String message) { 42 | this.message = message; 43 | } 44 | 45 | @Override 46 | public String execute() throws Exception { 47 | List list = UserDAO.findUserList(user.getUsername(), user.getPassword()); 48 | if (list.size() > 0) { 49 | session.setAttribute("username", user.getUsername()); 50 | session.setAttribute("type", list.get(0).getType()); 51 | return SUCCESS; 52 | } else { 53 | return ERROR; 54 | } 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/LogoutAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.apache.struts2.ServletActionContext; 8 | 9 | import com.opensymphony.xwork2.ActionContext; 10 | import com.opensymphony.xwork2.ActionSupport; 11 | 12 | public class LogoutAction extends ActionSupport { 13 | 14 | ActionContext context = ActionContext.getContext(); 15 | HttpServletRequest request = (HttpServletRequest) context 16 | .get(ServletActionContext.HTTP_REQUEST); 17 | HttpServletResponse response = (HttpServletResponse) context 18 | .get(ServletActionContext.HTTP_RESPONSE); 19 | HttpSession session = request.getSession(); 20 | 21 | private static final long serialVersionUID = 1L; 22 | 23 | @Override 24 | public String execute() throws Exception { 25 | session.removeAttribute("username"); 26 | session.removeAttribute("type"); 27 | return SUCCESS; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/ReleaseNoticeAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.apache.struts2.ServletActionContext; 8 | 9 | import com.find1x.gpms.dao.NoticeDAO; 10 | import com.opensymphony.xwork2.ActionContext; 11 | import com.opensymphony.xwork2.ActionSupport; 12 | 13 | public class ReleaseNoticeAction extends ActionSupport { 14 | 15 | ActionContext context = ActionContext.getContext(); 16 | HttpServletRequest request = (HttpServletRequest) context 17 | .get(ServletActionContext.HTTP_REQUEST); 18 | HttpServletResponse response = (HttpServletResponse) context 19 | .get(ServletActionContext.HTTP_RESPONSE); 20 | HttpSession session = request.getSession(); 21 | 22 | private static final long serialVersionUID = 1L; 23 | private String admin; 24 | private String dhead; 25 | private String teacher; 26 | private String student; 27 | private String notice; 28 | 29 | public String getAdmin() { 30 | return admin; 31 | } 32 | public void setAdmin(String admin) { 33 | this.admin = admin; 34 | } 35 | public String getDhead() { 36 | return dhead; 37 | } 38 | public void setDhead(String dhead) { 39 | this.dhead = dhead; 40 | } 41 | public String getTeacher() { 42 | return teacher; 43 | } 44 | public void setTeacher(String teacher) { 45 | this.teacher = teacher; 46 | } 47 | public String getStudent() { 48 | return student; 49 | } 50 | public void setStudent(String student) { 51 | this.student = student; 52 | } 53 | public String getNotice() { 54 | return notice; 55 | } 56 | public void setNotice(String notice) { 57 | this.notice = notice; 58 | } 59 | @Override 60 | public String execute() throws Exception { 61 | if(student!=null)NoticeDAO.addNotice(notice, "0"); 62 | if(teacher!=null)NoticeDAO.addNotice(notice, "1"); 63 | if(admin!=null)NoticeDAO.addNotice(notice, "2"); 64 | if(dhead!=null)NoticeDAO.addNotice(notice, "3"); 65 | return SUCCESS; 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/SelectIssueAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.apache.struts2.ServletActionContext; 8 | 9 | import com.find1x.gpms.dao.StudentDAO; 10 | import com.opensymphony.xwork2.ActionContext; 11 | import com.opensymphony.xwork2.ActionSupport; 12 | 13 | public class SelectIssueAction extends ActionSupport { 14 | 15 | ActionContext context = ActionContext.getContext(); 16 | HttpServletRequest request = (HttpServletRequest) context 17 | .get(ServletActionContext.HTTP_REQUEST); 18 | HttpServletResponse response = (HttpServletResponse) context 19 | .get(ServletActionContext.HTTP_RESPONSE); 20 | HttpSession session = request.getSession(); 21 | 22 | private static final long serialVersionUID = 1L; 23 | 24 | private String firstChoice; 25 | private String secondChoice; 26 | private String thirdChoice; 27 | 28 | public String getFirstChoice() { 29 | return firstChoice; 30 | } 31 | 32 | public void setFirstChoice(String firstChoice) { 33 | this.firstChoice = firstChoice; 34 | } 35 | 36 | public String getSecondChoice() { 37 | return secondChoice; 38 | } 39 | 40 | public void setSecondChoice(String secondChoice) { 41 | this.secondChoice = secondChoice; 42 | } 43 | 44 | public String getThirdChoice() { 45 | return thirdChoice; 46 | } 47 | 48 | public void setThirdChoice(String thirdChoice) { 49 | this.thirdChoice = thirdChoice; 50 | } 51 | 52 | @Override 53 | public String execute() throws Exception { 54 | StudentDAO.addSubject((String)session.getAttribute("username"), 55 | firstChoice, secondChoice, thirdChoice); 56 | return SUCCESS; 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/UploadIssueAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import java.util.List; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | import javax.servlet.http.HttpSession; 8 | 9 | import org.apache.struts2.ServletActionContext; 10 | 11 | import com.find1x.gpms.dao.IssueDAO; 12 | import com.find1x.gpms.pojos.Issue; 13 | import com.opensymphony.xwork2.ActionContext; 14 | import com.opensymphony.xwork2.ActionSupport; 15 | 16 | public class UploadIssueAction extends ActionSupport{ 17 | ActionContext context = ActionContext.getContext(); 18 | HttpServletRequest request = (HttpServletRequest) context 19 | .get(ServletActionContext.HTTP_REQUEST); 20 | HttpServletResponse response = (HttpServletResponse) context 21 | .get(ServletActionContext.HTTP_RESPONSE); 22 | HttpSession session = request.getSession(); 23 | 24 | private Issue issue; 25 | private List issues; 26 | 27 | public List getIssues() { 28 | return issues; 29 | } 30 | 31 | public void setIssues(List issues) { 32 | this.issues = issues; 33 | } 34 | public Issue getIssue() { 35 | return issue; 36 | } 37 | 38 | public void setIssue(Issue issue) { 39 | this.issue = issue; 40 | } 41 | 42 | @Override 43 | public String execute() throws Exception { 44 | if (IssueDAO.addIssue(issue.getTitle(), issue.getInfo(), issue.getRequirement(), 45 | issue.getSpecialty(), issue.getTotal(),(String)session.getAttribute("username"))) { 46 | issues = IssueDAO.getList(); 47 | return SUCCESS; 48 | } else { 49 | return ERROR; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/UploadStudentInfoAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import java.io.File; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | import javax.servlet.http.HttpSession; 8 | 9 | import org.apache.commons.io.FileUtils; 10 | import org.apache.struts2.ServletActionContext; 11 | 12 | import com.find1x.gpms.dao.ExcelPOI; 13 | import com.opensymphony.xwork2.ActionContext; 14 | import com.opensymphony.xwork2.ActionSupport; 15 | 16 | public class UploadStudentInfoAction extends ActionSupport { 17 | /** 18 | * 19 | */ 20 | private static final long serialVersionUID = 6439953799272677115L; 21 | 22 | ActionContext context = ActionContext.getContext(); 23 | HttpServletRequest request = (HttpServletRequest) context 24 | .get(ServletActionContext.HTTP_REQUEST); 25 | HttpServletResponse response = (HttpServletResponse) context 26 | .get(ServletActionContext.HTTP_RESPONSE); 27 | HttpSession session = request.getSession(); 28 | 29 | private File student_info; // 上传的文件 30 | private String student_infoFileName; // 文件名称 31 | private String student_infoContentType; // 文件类型 32 | 33 | @Override 34 | public String execute() throws Exception { 35 | String realpath = ServletActionContext.getServletContext().getRealPath( 36 | "/"); 37 | if (student_info != null) { 38 | File savefile = new File(new File(realpath + "\\static\\upload"), 39 | student_infoFileName); 40 | if (!savefile.getParentFile().exists()) 41 | savefile.getParentFile().mkdirs(); 42 | FileUtils.copyFile(student_info, savefile); 43 | ActionContext.getContext().put("message", "文件上传成功"); 44 | } 45 | ExcelPOI.readStudentContent(student_info); 46 | return SUCCESS; 47 | } 48 | 49 | public File getStudent_info() { 50 | return student_info; 51 | } 52 | 53 | public void setStudent_info(File student_infoFile) { 54 | this.student_info = student_infoFile; 55 | } 56 | 57 | public String getStudent_infoFileName() { 58 | return student_infoFileName; 59 | } 60 | 61 | public void setStudent_infoFileName(String student_infoFileName) { 62 | this.student_infoFileName = student_infoFileName; 63 | } 64 | 65 | public String getStudent_infoContentType() { 66 | return student_infoContentType; 67 | } 68 | 69 | public void setStudent_infoContentType(String student_infoContentType) { 70 | this.student_infoContentType = student_infoContentType; 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/UploadTeacherInfoAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import java.io.File; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | import javax.servlet.http.HttpSession; 8 | 9 | import org.apache.commons.io.FileUtils; 10 | import org.apache.struts2.ServletActionContext; 11 | 12 | import com.find1x.gpms.dao.ExcelPOI; 13 | import com.opensymphony.xwork2.ActionContext; 14 | import com.opensymphony.xwork2.ActionSupport; 15 | 16 | public class UploadTeacherInfoAction extends ActionSupport { 17 | /** 18 | * 19 | */ 20 | private static final long serialVersionUID = 6439953799272677115L; 21 | 22 | ActionContext context = ActionContext.getContext(); 23 | HttpServletRequest request = (HttpServletRequest) context 24 | .get(ServletActionContext.HTTP_REQUEST); 25 | HttpServletResponse response = (HttpServletResponse) context 26 | .get(ServletActionContext.HTTP_RESPONSE); 27 | HttpSession session = request.getSession(); 28 | 29 | private File teacher_info; // 上传的文件 30 | private String teacher_infoFileName; // 文件名称 31 | private String teacher_infoContentType; // 文件类型 32 | 33 | @Override 34 | public String execute() throws Exception { 35 | String realpath = ServletActionContext.getServletContext().getRealPath( 36 | "/"); 37 | if (teacher_info != null) { 38 | File savefile = new File(new File(realpath + "\\static\\upload"), 39 | teacher_infoFileName); 40 | if (!savefile.getParentFile().exists()) 41 | savefile.getParentFile().mkdirs(); 42 | FileUtils.copyFile(teacher_info, savefile); 43 | ActionContext.getContext().put("message", "文件上传成功"); 44 | } 45 | ExcelPOI.readTeacherContent(teacher_info); 46 | return SUCCESS; 47 | } 48 | 49 | public File getTeacher_info() { 50 | return teacher_info; 51 | } 52 | 53 | public void setTeacher_info(File teacher_info) { 54 | this.teacher_info = teacher_info; 55 | } 56 | 57 | public String getTeacher_infoFileName() { 58 | return teacher_infoFileName; 59 | } 60 | 61 | public void setTeacher_infoFileName(String teacher_infoFileName) { 62 | this.teacher_infoFileName = teacher_infoFileName; 63 | } 64 | 65 | public String getTeacher_infoContentType() { 66 | return teacher_infoContentType; 67 | } 68 | 69 | public void setTeacher_infoContentType(String teacher_infoContentType) { 70 | this.teacher_infoContentType = teacher_infoContentType; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/studentGradeAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.apache.struts2.ServletActionContext; 8 | 9 | import com.opensymphony.xwork2.ActionContext; 10 | import com.opensymphony.xwork2.ActionSupport; 11 | 12 | public class studentGradeAction extends ActionSupport { 13 | 14 | ActionContext context = ActionContext.getContext(); 15 | HttpServletRequest request = (HttpServletRequest) context 16 | .get(ServletActionContext.HTTP_REQUEST); 17 | HttpServletResponse response = (HttpServletResponse) context 18 | .get(ServletActionContext.HTTP_RESPONSE); 19 | HttpSession session = request.getSession(); 20 | 21 | private static final long serialVersionUID = 1L; 22 | 23 | @Override 24 | public String execute() throws Exception { 25 | return SUCCESS; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/studentInfoAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.apache.struts2.ServletActionContext; 8 | 9 | import com.find1x.gpms.dao.IssueDAO; 10 | import com.find1x.gpms.dao.StudentDAO; 11 | import com.find1x.gpms.pojos.Issue; 12 | import com.find1x.gpms.pojos.Student; 13 | import com.opensymphony.xwork2.ActionContext; 14 | import com.opensymphony.xwork2.ActionSupport; 15 | 16 | public class studentInfoAction extends ActionSupport { 17 | 18 | ActionContext context = ActionContext.getContext(); 19 | HttpServletRequest request = (HttpServletRequest) context 20 | .get(ServletActionContext.HTTP_REQUEST); 21 | HttpServletResponse response = (HttpServletResponse) context 22 | .get(ServletActionContext.HTTP_RESPONSE); 23 | HttpSession session = request.getSession(); 24 | 25 | private static final long serialVersionUID = 1L; 26 | private Student student; 27 | private Issue issue; 28 | 29 | public Student getStudent() { 30 | return student; 31 | } 32 | public void setStudent(Student student) { 33 | this.student = student; 34 | } 35 | 36 | public Issue getIssue() { 37 | return issue; 38 | } 39 | public void setIssue(Issue issue) { 40 | this.issue = issue; 41 | } 42 | 43 | @Override 44 | public String execute() throws Exception { 45 | String no=(String)session.getAttribute("username"); 46 | student=StudentDAO.getStudentInfo(no); 47 | issue=IssueDAO.getIssueInfo(StudentDAO.hasIssue(no)); 48 | return SUCCESS; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/studentTeacherAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.apache.struts2.ServletActionContext; 8 | 9 | import com.opensymphony.xwork2.ActionContext; 10 | import com.opensymphony.xwork2.ActionSupport; 11 | 12 | public class studentTeacherAction extends ActionSupport { 13 | 14 | ActionContext context = ActionContext.getContext(); 15 | HttpServletRequest request = (HttpServletRequest) context 16 | .get(ServletActionContext.HTTP_REQUEST); 17 | HttpServletResponse response = (HttpServletResponse) context 18 | .get(ServletActionContext.HTTP_RESPONSE); 19 | HttpSession session = request.getSession(); 20 | 21 | private static final long serialVersionUID = 1L; 22 | 23 | @Override 24 | public String execute() throws Exception { 25 | return SUCCESS; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/teacherChangeSubjectAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.apache.struts2.ServletActionContext; 8 | 9 | import com.find1x.gpms.dao.IssueDAO; 10 | import com.find1x.gpms.pojos.Issue; 11 | import com.opensymphony.xwork2.ActionContext; 12 | import com.opensymphony.xwork2.ActionSupport; 13 | 14 | public class teacherChangeSubjectAction extends ActionSupport { 15 | 16 | ActionContext context = ActionContext.getContext(); 17 | HttpServletRequest request = (HttpServletRequest) context 18 | .get(ServletActionContext.HTTP_REQUEST); 19 | HttpServletResponse response = (HttpServletResponse) context 20 | .get(ServletActionContext.HTTP_RESPONSE); 21 | HttpSession session = request.getSession(); 22 | 23 | private static final long serialVersionUID = 1L; 24 | private String _id; 25 | private Issue issue; 26 | 27 | public Issue getIssue() { 28 | return issue; 29 | } 30 | 31 | public void setIssue(Issue issue) { 32 | this.issue = issue; 33 | } 34 | 35 | public String get_id() { 36 | return _id; 37 | } 38 | 39 | public void set_id(String _id) { 40 | this._id = _id; 41 | } 42 | 43 | @Override 44 | public String execute() throws Exception { 45 | //_id=new String(request.getParameter("_id").getBytes("iso-8859-1"),"UTF-8"); 46 | issue=IssueDAO.getIssue(_id); 47 | return SUCCESS; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/teacherInfoAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.apache.struts2.ServletActionContext; 8 | 9 | import com.find1x.gpms.dao.StudentDAO; 10 | import com.find1x.gpms.dao.TeacherDAO; 11 | import com.find1x.gpms.pojos.Teacher; 12 | import com.opensymphony.xwork2.ActionContext; 13 | import com.opensymphony.xwork2.ActionSupport; 14 | 15 | public class teacherInfoAction extends ActionSupport { 16 | 17 | ActionContext context = ActionContext.getContext(); 18 | HttpServletRequest request = (HttpServletRequest) context 19 | .get(ServletActionContext.HTTP_REQUEST); 20 | HttpServletResponse response = (HttpServletResponse) context 21 | .get(ServletActionContext.HTTP_RESPONSE); 22 | HttpSession session = request.getSession(); 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | private Teacher teacher; 27 | 28 | public Teacher getTeacher() { 29 | return teacher; 30 | } 31 | 32 | public void setTeacher(Teacher teacher) { 33 | this.teacher = teacher; 34 | } 35 | 36 | @Override 37 | public String execute() throws Exception { 38 | teacher=TeacherDAO.getTeacherInfo((String)session.getAttribute("username")); 39 | return SUCCESS; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/teacherStudentAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import java.util.List; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | import javax.servlet.http.HttpSession; 8 | 9 | import org.apache.struts2.ServletActionContext; 10 | 11 | import com.find1x.gpms.dao.TeacherDAO; 12 | import com.find1x.gpms.pojos.Student; 13 | import com.opensymphony.xwork2.ActionContext; 14 | import com.opensymphony.xwork2.ActionSupport; 15 | 16 | public class teacherStudentAction extends ActionSupport { 17 | 18 | ActionContext context = ActionContext.getContext(); 19 | HttpServletRequest request = (HttpServletRequest) context 20 | .get(ServletActionContext.HTTP_REQUEST); 21 | HttpServletResponse response = (HttpServletResponse) context 22 | .get(ServletActionContext.HTTP_RESPONSE); 23 | HttpSession session = request.getSession(); 24 | 25 | private static final long serialVersionUID = 1L; 26 | private List students; 27 | 28 | public List getStudents() { 29 | return students; 30 | } 31 | 32 | 33 | public void setStudents(List students) { 34 | this.students = students; 35 | } 36 | 37 | @Override 38 | public String execute() throws Exception { 39 | students=TeacherDAO.getStudents((String)session.getAttribute("username")); 40 | return SUCCESS; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/teacherStudentDetailAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.apache.struts2.ServletActionContext; 8 | 9 | import com.find1x.gpms.dao.StudentDAO; 10 | import com.find1x.gpms.pojos.Student; 11 | import com.opensymphony.xwork2.ActionContext; 12 | import com.opensymphony.xwork2.ActionSupport; 13 | 14 | public class teacherStudentDetailAction extends ActionSupport { 15 | 16 | ActionContext context = ActionContext.getContext(); 17 | HttpServletRequest request = (HttpServletRequest) context 18 | .get(ServletActionContext.HTTP_REQUEST); 19 | HttpServletResponse response = (HttpServletResponse) context 20 | .get(ServletActionContext.HTTP_RESPONSE); 21 | HttpSession session = request.getSession(); 22 | 23 | private static final long serialVersionUID = 1L; 24 | private String no; 25 | private Student student; 26 | 27 | public String getNo() { 28 | return no; 29 | } 30 | 31 | public void setNo(String no) { 32 | this.no = no; 33 | } 34 | 35 | public Student getStudent() { 36 | return student; 37 | } 38 | 39 | public void setStudent(Student student) { 40 | this.student = student; 41 | } 42 | 43 | @Override 44 | public String execute() throws Exception { 45 | student=StudentDAO.getStudentInfo(no); 46 | return SUCCESS; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/teacherStudentGradeAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import org.apache.struts2.ServletActionContext; 8 | 9 | import com.opensymphony.xwork2.ActionContext; 10 | import com.opensymphony.xwork2.ActionSupport; 11 | 12 | public class teacherStudentGradeAction extends ActionSupport { 13 | 14 | ActionContext context = ActionContext.getContext(); 15 | HttpServletRequest request = (HttpServletRequest) context 16 | .get(ServletActionContext.HTTP_REQUEST); 17 | HttpServletResponse response = (HttpServletResponse) context 18 | .get(ServletActionContext.HTTP_RESPONSE); 19 | HttpSession session = request.getSession(); 20 | 21 | private static final long serialVersionUID = 1L; 22 | 23 | @Override 24 | public String execute() throws Exception { 25 | return SUCCESS; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/teacherSubjectManageAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import java.util.List; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | import javax.servlet.http.HttpSession; 8 | 9 | import org.apache.struts2.ServletActionContext; 10 | 11 | import com.find1x.gpms.dao.IssueDAO; 12 | import com.find1x.gpms.dao.UserDAO; 13 | import com.find1x.gpms.pojos.Issue; 14 | import com.opensymphony.xwork2.ActionContext; 15 | import com.opensymphony.xwork2.ActionSupport; 16 | 17 | public class teacherSubjectManageAction extends ActionSupport { 18 | 19 | ActionContext context = ActionContext.getContext(); 20 | HttpServletRequest request = (HttpServletRequest) context 21 | .get(ServletActionContext.HTTP_REQUEST); 22 | HttpServletResponse response = (HttpServletResponse) context 23 | .get(ServletActionContext.HTTP_RESPONSE); 24 | HttpSession session = request.getSession(); 25 | 26 | private static final long serialVersionUID = 1L; 27 | 28 | private List issues; 29 | 30 | public List getIssues() { 31 | return issues; 32 | } 33 | 34 | public void setIssues(List issues) { 35 | this.issues = issues; 36 | } 37 | 38 | @Override 39 | public String execute() throws Exception { 40 | if(UserDAO.getType((String)session.getAttribute("username"))==3) 41 | issues = IssueDAO.getList(); 42 | else 43 | issues = IssueDAO.getList((String)session.getAttribute("username")); 44 | return SUCCESS; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/action/teacherUploadFilesAction.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.action; 2 | 3 | import java.io.File; 4 | import java.security.Principal; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | import javax.servlet.http.HttpSession; 9 | 10 | import org.apache.commons.io.FileUtils; 11 | import org.apache.struts2.ServletActionContext; 12 | 13 | import com.find1x.gpms.dao.ExcelPOI; 14 | import com.opensymphony.xwork2.ActionContext; 15 | import com.opensymphony.xwork2.ActionSupport; 16 | 17 | public class teacherUploadFilesAction extends ActionSupport { 18 | 19 | ActionContext context = ActionContext.getContext(); 20 | HttpServletRequest request = (HttpServletRequest) context 21 | .get(ServletActionContext.HTTP_REQUEST); 22 | HttpServletResponse response = (HttpServletResponse) context 23 | .get(ServletActionContext.HTTP_RESPONSE); 24 | HttpSession session = request.getSession(); 25 | 26 | private static final long serialVersionUID = 1L; 27 | 28 | private String name; 29 | private File issueFile; // 上传的文件 30 | private String issueFileFileName; // 文件名称 31 | private String issueFileContentType; // 文件类型 32 | 33 | @Override 34 | public String execute() throws Exception { 35 | String realpath = ServletActionContext.getServletContext().getRealPath( 36 | "/"); 37 | if (issueFile != null) { 38 | File savefile = new File(new File(realpath + "\\static\\file"), 39 | name+".doc"); 40 | if (!savefile.getParentFile().exists()) 41 | savefile.getParentFile().mkdirs(); 42 | FileUtils.copyFile(issueFile, savefile); 43 | ActionContext.getContext().put("message", "文件上传成功"); 44 | } 45 | return SUCCESS; 46 | } 47 | 48 | public File getIssueFile() { 49 | return issueFile; 50 | } 51 | 52 | public void setIssueFile(File issueFile) { 53 | this.issueFile = issueFile; 54 | } 55 | 56 | public String getIssueFileFileName() { 57 | return issueFileFileName; 58 | } 59 | 60 | public void setIssueFileFileName(String issueFileFileName) { 61 | this.issueFileFileName = issueFileFileName; 62 | } 63 | 64 | public String getIssueFileContentType() { 65 | return issueFileContentType; 66 | } 67 | 68 | public void setIssueFileContentType(String issueFileContentType) { 69 | this.issueFileContentType = issueFileContentType; 70 | } 71 | 72 | public String getName() { 73 | return name; 74 | } 75 | 76 | public void setName(String name) { 77 | this.name = name; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/dao/IssueDAO.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.bson.types.ObjectId; 6 | import org.mongodb.morphia.Datastore; 7 | import com.find1x.gpms.pojos.Issue; 8 | import com.find1x.gpms.util.MongoDBUtil; 9 | 10 | 11 | public class IssueDAO { 12 | public static List getList(String teacher) { 13 | List list = MongoDBUtil.getDatastore() 14 | .find(Issue.class).filter("teacher", teacher).asList(); 15 | return list; 16 | } 17 | 18 | public static List getList() { 19 | List list = MongoDBUtil.getDatastore() 20 | .find(Issue.class).asList(); 21 | return list; 22 | } 23 | 24 | public static Issue getIssue(String _id){ 25 | List list = MongoDBUtil.getDatastore() 26 | .find(Issue.class).filter("_id", new ObjectId(_id)).asList(); 27 | return list.get(0); 28 | } 29 | 30 | public static Issue getIssue(ObjectId _id){ 31 | List list = MongoDBUtil.getDatastore() 32 | .find(Issue.class).filter("_id", _id).asList(); 33 | return list.get(0); 34 | } 35 | 36 | public static boolean addIssue(String title, String info, 37 | String requirement, String specialty, String total, String teacher) { 38 | try { 39 | Issue issue=new Issue(); 40 | issue.setTitle(title); 41 | issue.setInfo(info); 42 | issue.setRequirement(requirement); 43 | issue.setSpecialty(specialty); 44 | issue.setTotal(total); 45 | issue.setRemain(Integer.valueOf(total)); 46 | issue.setTeacher(teacher); 47 | MongoDBUtil.getDatastore().save(issue); 48 | return true; 49 | } catch (Exception e) { 50 | e.printStackTrace(); 51 | return false; 52 | } 53 | } 54 | 55 | public static boolean changeIssue(String _id,String title, String info, 56 | String requirement, String specialty, String total) { 57 | try { 58 | Datastore ds = MongoDBUtil.getDatastore(); 59 | ds.update(ds.find(Issue.class).filter("_id", new ObjectId(_id)), 60 | ds.createUpdateOperations(Issue.class) 61 | .set("title", title).set("info", info).set("requirement", requirement) 62 | .set("specialty", specialty).set("total", total)); 63 | 64 | return true; 65 | } catch (Exception e) { 66 | e.printStackTrace(); 67 | return false; 68 | } 69 | } 70 | 71 | public static boolean deleteIssue(String _id) { 72 | try { 73 | Datastore ds = MongoDBUtil.getDatastore(); 74 | ds.delete(ds.find(Issue.class).filter("_id", new ObjectId(_id))); 75 | return true; 76 | } catch (Exception e) { 77 | e.printStackTrace(); 78 | return false; 79 | } 80 | } 81 | 82 | public static String getIssueJson(String title){ 83 | try { 84 | String json; 85 | Issue issue=MongoDBUtil.getDatastore().find(Issue.class).filter("title", title).get(); 86 | json="{\"title\":\""+issue.getTitle()+"\","+"\"info\":\""+issue.getInfo()+"\","+"\"requirement\":\""+issue.getRequirement()+"\"," 87 | +"\"specialty\":\""+issue.getSpecialty()+"\","+"\"total\":\""+issue.getTotal()+"\","+"\"remain\":\""+issue.getRemain()+"\","+"\"teacher\":\"" 88 | +TeacherDAO.getName(issue.getTeacher())+"\"}"; 89 | //json="{\"title\":\"adadfs\",\"info\":\"fdsdf\"}"; 90 | return json; 91 | } catch (Exception e) { 92 | e.printStackTrace(); 93 | return null; 94 | } 95 | } 96 | 97 | public static Issue getIssueInfo(String title){ 98 | return MongoDBUtil.getDatastore().find(Issue.class).filter("title", title).get(); 99 | } 100 | 101 | public static String selectSubject(String title){ 102 | Datastore ds = MongoDBUtil.getDatastore(); 103 | Issue issue=ds.find(Issue.class).filter("title", title).get(); 104 | if(issue.getRemain()>0){ 105 | ds.update(issue, 106 | ds.createUpdateOperations(Issue.class).set("remain", issue.getRemain()-1)); 107 | return issue.getTeacher(); 108 | } 109 | else return null; 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/dao/NoticeDAO.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.dao; 2 | 3 | import java.util.List; 4 | 5 | import com.find1x.gpms.pojos.Notice; 6 | import com.find1x.gpms.util.MongoDBUtil; 7 | 8 | public class NoticeDAO { 9 | public static boolean addNotice(String context, String type) { 10 | try { 11 | Notice notice = new Notice(); 12 | notice.setContext(context); 13 | notice.setType(type); 14 | MongoDBUtil.getDatastore().save(notice); 15 | return true; 16 | } catch (Exception e) { 17 | e.printStackTrace(); 18 | return false; 19 | } 20 | } 21 | 22 | public static List getNotice(String type) { 23 | List list = MongoDBUtil.getDatastore().find(Notice.class) 24 | .filter("type", type).asList(); 25 | return list; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/dao/StudentDAO.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.bson.types.ObjectId; 6 | import org.mongodb.morphia.Datastore; 7 | 8 | import com.find1x.gpms.pojos.Student; 9 | import com.find1x.gpms.pojos.Teacher; 10 | import com.find1x.gpms.pojos.User; 11 | import com.find1x.gpms.util.MongoDBUtil; 12 | 13 | public class StudentDAO { 14 | public static List getList() { 15 | List list = MongoDBUtil.getDatastore().find(Student.class).order("no") 16 | .asList(); 17 | return list; 18 | } 19 | 20 | public static Student getStudentInfo(String no) { 21 | Student student = MongoDBUtil.getDatastore().find(Student.class) 22 | .filter("no", no).get(); 23 | return student; 24 | } 25 | 26 | public static Teacher getTeacherInfo(String no){ 27 | Student student = MongoDBUtil.getDatastore().find(Student.class) 28 | .filter("no", no).get(); 29 | Teacher teacher=TeacherDAO.getTeacherInfo(student.getTeacher()); 30 | return teacher; 31 | } 32 | 33 | public static ObjectId addStudent(String no, String name, String sex, 34 | String classno, String department, String specialty, 35 | String telephone, String email) { 36 | try { 37 | Student student = new Student(); 38 | student.setNo(no); 39 | student.setName(name); 40 | student.setSex(sex); 41 | student.setClassno(classno); 42 | student.setDepartment(department); 43 | student.setSpecialty(specialty); 44 | student.setTelephone(telephone); 45 | student.setEmail(email); 46 | MongoDBUtil.getDatastore().save(student); 47 | return MongoDBUtil.getDatastore().find(Student.class) 48 | .filter("no", no).get().get_id(); 49 | } catch (Exception e) { 50 | e.printStackTrace(); 51 | return null; 52 | } 53 | } 54 | 55 | public static boolean createUser(ObjectId _id, String username) { 56 | try { 57 | User user = new User(); 58 | user.setRefId(_id); 59 | user.setUsername(username); 60 | user.setType(0); 61 | user.setPassword("123456"); 62 | MongoDBUtil.getDatastore().save(user); 63 | return true; 64 | } catch (Exception e) { 65 | e.printStackTrace(); 66 | return false; 67 | } 68 | } 69 | 70 | public static boolean existStudent(String no) { 71 | if (MongoDBUtil.getDatastore().find(Student.class).filter("no", no) 72 | .get() == null) 73 | return false; 74 | else 75 | return true; 76 | } 77 | 78 | public static boolean addSubject(String no, String firstChoice, 79 | String secondChoice, String thirdChoice) { 80 | try { 81 | String teacher; 82 | Datastore ds = MongoDBUtil.getDatastore(); 83 | ds.update( 84 | ds.find(Student.class).filter("no", no), 85 | ds.createUpdateOperations(Student.class) 86 | .set("firstChoice", firstChoice) 87 | .set("secondChoice", secondChoice) 88 | .set("thirdChoice", thirdChoice)); 89 | if((teacher=IssueDAO.selectSubject(firstChoice))!=null){ 90 | ds.update( 91 | ds.find(Student.class).filter("no", no), 92 | ds.createUpdateOperations(Student.class) 93 | .set("teacher", teacher).set("issue", firstChoice)); 94 | }else if((teacher=IssueDAO.selectSubject(secondChoice))!=null){ 95 | ds.update( 96 | ds.find(Student.class).filter("no", no), 97 | ds.createUpdateOperations(Student.class) 98 | .set("teacher", teacher).set("issue", secondChoice)); 99 | }else if((teacher=IssueDAO.selectSubject(thirdChoice))!=null){ 100 | ds.update( 101 | ds.find(Student.class).filter("no", no), 102 | ds.createUpdateOperations(Student.class) 103 | .set("teacher", teacher).set("issue", thirdChoice)); 104 | } 105 | return true; 106 | } catch (Exception e) { 107 | e.printStackTrace(); 108 | return false; 109 | } 110 | } 111 | 112 | public static String hasIssue(String no){ 113 | Student student=MongoDBUtil.getDatastore().find(Student.class).filter("no", no).get(); 114 | if(student.getIssue()!=null){ 115 | return student.getIssue(); 116 | }else{ 117 | return null; 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/dao/SysControlDAO.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.dao; 2 | 3 | import com.find1x.gpms.pojos.SysControl; 4 | import com.find1x.gpms.util.MongoDBUtil; 5 | 6 | public class SysControlDAO { 7 | public static SysControl GetSysControl() { 8 | SysControl sysControl = MongoDBUtil.getDatastore() 9 | .find(SysControl.class).get(); 10 | if (sysControl == null) { 11 | saveSysControl(new SysControl()); 12 | } 13 | return sysControl; 14 | } 15 | 16 | public static void saveSysControl(SysControl sysControl) { 17 | MongoDBUtil.getDatastore().save(sysControl); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/dao/TeacherDAO.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.bson.types.ObjectId; 6 | 7 | import com.find1x.gpms.pojos.Student; 8 | import com.find1x.gpms.pojos.Teacher; 9 | import com.find1x.gpms.pojos.User; 10 | import com.find1x.gpms.util.MongoDBUtil; 11 | 12 | public class TeacherDAO { 13 | public static List getList() { 14 | List list = MongoDBUtil.getDatastore().find(Teacher.class).order("no") 15 | .asList(); 16 | return list; 17 | } 18 | 19 | public static List getStudents(String teacher) { 20 | List list = MongoDBUtil.getDatastore().find(Student.class) 21 | .filter("teacher", teacher).order("no").asList(); 22 | return list; 23 | } 24 | 25 | public static Teacher getTeacherInfo(String no) { 26 | Teacher teacher = MongoDBUtil.getDatastore().find(Teacher.class) 27 | .filter("no", no).get(); 28 | return teacher; 29 | } 30 | 31 | public static ObjectId addTeacher(String no, String name, String sex, 32 | String department, String telephone, String email, String postion) { 33 | try { 34 | Teacher teacher = new Teacher(); 35 | teacher.setNo(no); 36 | teacher.setName(name); 37 | teacher.setSex(sex); 38 | teacher.setDepartment(department); 39 | teacher.setTelephone(telephone); 40 | teacher.setEmail(email); 41 | teacher.setPostion(postion); 42 | MongoDBUtil.getDatastore().save(teacher); 43 | return MongoDBUtil.getDatastore().find(Teacher.class) 44 | .filter("no", no).get().get_id(); 45 | } catch (Exception e) { 46 | e.printStackTrace(); 47 | return null; 48 | } 49 | } 50 | 51 | public static boolean createUser(ObjectId _id, String username, 52 | String postion) { 53 | try { 54 | User user = new User(); 55 | user.setRefId(_id); 56 | user.setUsername(username); 57 | if (postion.equals("教师")) 58 | user.setType(1); 59 | else if (postion.equals("教务员")) 60 | user.setType(2); 61 | else if (postion.equals("系主任")) 62 | user.setType(3); 63 | else 64 | user.setType(1); 65 | user.setPassword("123456"); 66 | MongoDBUtil.getDatastore().save(user); 67 | return true; 68 | } catch (Exception e) { 69 | e.printStackTrace(); 70 | return false; 71 | } 72 | } 73 | 74 | public static boolean existTeacher(String no) { 75 | if (MongoDBUtil.getDatastore().find(Teacher.class).filter("no", no) 76 | .get() == null) 77 | return false; 78 | else 79 | return true; 80 | } 81 | 82 | public static String getName(String no) { 83 | return MongoDBUtil.getDatastore().find(Teacher.class).filter("no", no) 84 | .get().getName(); 85 | 86 | } 87 | 88 | public static void saveTeacher(Teacher teacher) { 89 | MongoDBUtil.getDatastore().save(teacher); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/dao/UserDAO.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.dao; 2 | 3 | import java.util.List; 4 | 5 | import org.bson.types.ObjectId; 6 | 7 | import com.find1x.gpms.pojos.Administrator; 8 | import com.find1x.gpms.pojos.DepartmentHead; 9 | import com.find1x.gpms.pojos.Student; 10 | import com.find1x.gpms.pojos.Teacher; 11 | import com.find1x.gpms.pojos.User; 12 | import com.find1x.gpms.util.MongoDBUtil; 13 | 14 | public class UserDAO { 15 | public static List findUserList(String username, String Password) { 16 | List list = MongoDBUtil.getDatastore().find(User.class) 17 | .filter("username", username).filter("password", Password) 18 | .asList(); 19 | return list; 20 | } 21 | 22 | public static String getUserName(String username, int type) { 23 | ObjectId refId = MongoDBUtil.getDatastore().find(User.class) 24 | .filter("username", username).get().getRefId(); 25 | switch (type) { 26 | case 0: 27 | Student student = MongoDBUtil.getDatastore().find(Student.class) 28 | .filter("_id", refId).get(); 29 | return (student == null ? username : student.getName()); 30 | case 1: 31 | case 2: 32 | case 3: 33 | Teacher teacher = MongoDBUtil.getDatastore().find(Teacher.class) 34 | .filter("_id", refId).get(); 35 | return (teacher == null ? username : teacher.getName()); 36 | } 37 | return null; 38 | } 39 | 40 | public static int getType(String username){ 41 | return MongoDBUtil.getDatastore() 42 | .find(User.class).filter("username", username).get().getType(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/pojos/Administrator.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.pojos; 2 | 3 | import org.bson.types.ObjectId; 4 | import org.mongodb.morphia.annotations.Entity; 5 | import org.mongodb.morphia.annotations.Id; 6 | 7 | @Entity("administrators") 8 | public class Administrator { 9 | @Id 10 | private ObjectId _id; 11 | private String name; 12 | private String sex; 13 | private String no; 14 | private String department; 15 | private String telephone; 16 | private String email; 17 | private String type; 18 | 19 | public ObjectId get_id() { 20 | return _id; 21 | } 22 | public void set_id(ObjectId _id) { 23 | this._id = _id; 24 | } 25 | public String getName() { 26 | return name; 27 | } 28 | public void setName(String name) { 29 | this.name = name; 30 | } 31 | public String getSex() { 32 | return sex; 33 | } 34 | public void setSex(String sex) { 35 | this.sex = sex; 36 | } 37 | public String getNo() { 38 | return no; 39 | } 40 | public void setNo(String no) { 41 | this.no = no; 42 | } 43 | public String getDepartment() { 44 | return department; 45 | } 46 | public void setDepartment(String department) { 47 | this.department = department; 48 | } 49 | public String getTelephone() { 50 | return telephone; 51 | } 52 | public void setTelephone(String telephone) { 53 | this.telephone = telephone; 54 | } 55 | public String getEmail() { 56 | return email; 57 | } 58 | public void setEmail(String email) { 59 | this.email = email; 60 | } 61 | public String getType() { 62 | return type; 63 | } 64 | public void setType(String type) { 65 | this.type = type; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/pojos/DepartmentHead.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.pojos; 2 | 3 | import org.bson.types.ObjectId; 4 | import org.mongodb.morphia.annotations.Entity; 5 | import org.mongodb.morphia.annotations.Id; 6 | 7 | @Entity("departmentHeads") 8 | public class DepartmentHead { 9 | @Id 10 | private ObjectId _id; 11 | private String name; 12 | private String sex; 13 | private String no; 14 | private String department; 15 | private String telephone; 16 | private String email; 17 | private String type; 18 | 19 | public ObjectId get_id() { 20 | return _id; 21 | } 22 | public void set_id(ObjectId _id) { 23 | this._id = _id; 24 | } 25 | public String getName() { 26 | return name; 27 | } 28 | public void setName(String name) { 29 | this.name = name; 30 | } 31 | public String getSex() { 32 | return sex; 33 | } 34 | public void setSex(String sex) { 35 | this.sex = sex; 36 | } 37 | public String getNo() { 38 | return no; 39 | } 40 | public void setNo(String no) { 41 | this.no = no; 42 | } 43 | public String getDepartment() { 44 | return department; 45 | } 46 | public void setDepartment(String department) { 47 | this.department = department; 48 | } 49 | public String getTelephone() { 50 | return telephone; 51 | } 52 | public void setTelephone(String telephone) { 53 | this.telephone = telephone; 54 | } 55 | public String getEmail() { 56 | return email; 57 | } 58 | public void setEmail(String email) { 59 | this.email = email; 60 | } 61 | public String getType() { 62 | return type; 63 | } 64 | public void setType(String type) { 65 | this.type = type; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/pojos/Issue.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.pojos; 2 | 3 | import org.bson.types.ObjectId; 4 | import org.mongodb.morphia.annotations.Entity; 5 | import org.mongodb.morphia.annotations.Id; 6 | 7 | @Entity("issues") 8 | public class Issue { 9 | @Id 10 | private ObjectId _id; 11 | private String title; 12 | private String info; 13 | private String requirement; 14 | private String specialty; 15 | private String total; 16 | private Integer remain; 17 | 18 | public Integer getRemain() { 19 | return remain; 20 | } 21 | public void setRemain(Integer remain) { 22 | this.remain = remain; 23 | } 24 | private String teacher; 25 | //private String[] student; 26 | 27 | public String getTeacher() { 28 | return teacher; 29 | } 30 | public void setTeacher(String teacher) { 31 | this.teacher = teacher; 32 | } 33 | public ObjectId get_id() { 34 | return _id; 35 | } 36 | public void set_id(ObjectId _id) { 37 | this._id = _id; 38 | } 39 | public String getTitle() { 40 | return title; 41 | } 42 | public void setTitle(String title) { 43 | this.title = title; 44 | } 45 | public String getInfo() { 46 | return info; 47 | } 48 | public void setInfo(String info) { 49 | this.info = info; 50 | } 51 | public String getRequirement() { 52 | return requirement; 53 | } 54 | public void setRequirement(String requirement) { 55 | this.requirement = requirement; 56 | } 57 | public String getSpecialty() { 58 | return specialty; 59 | } 60 | public void setSpecialty(String specialty) { 61 | this.specialty = specialty; 62 | } 63 | public String getTotal() { 64 | return total; 65 | } 66 | public void setTotal(String total) { 67 | this.total = total; 68 | } 69 | //public String[] getStudent() { 70 | // return student; 71 | //} 72 | //public void setStudent(String[] student) { 73 | // this.student = student; 74 | //} 75 | } 76 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/pojos/Notice.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.pojos; 2 | 3 | import org.bson.types.ObjectId; 4 | import org.mongodb.morphia.annotations.Entity; 5 | import org.mongodb.morphia.annotations.Id; 6 | 7 | @Entity("notices") 8 | public class Notice { 9 | @Id 10 | private ObjectId _id; 11 | private String context; 12 | private String type; 13 | 14 | public ObjectId get_id() { 15 | return _id; 16 | } 17 | public void set_id(ObjectId _id) { 18 | this._id = _id; 19 | } 20 | public String getContext() { 21 | return context; 22 | } 23 | public void setContext(String context) { 24 | this.context = context; 25 | } 26 | public String getType() { 27 | return type; 28 | } 29 | public void setType(String type) { 30 | this.type = type; 31 | } 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/pojos/Student.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.pojos; 2 | 3 | import org.bson.types.ObjectId; 4 | import org.mongodb.morphia.annotations.Entity; 5 | import org.mongodb.morphia.annotations.Id; 6 | 7 | @Entity("students") 8 | public class Student { 9 | @Id 10 | private ObjectId _id; 11 | private String name; 12 | private String sex; 13 | private String no; 14 | private String classno; 15 | private String department; 16 | private String specialty; 17 | private String telephone; 18 | private String email; 19 | private String teacher; 20 | private String issue; 21 | private String firstChoice; 22 | private String secondChoice; 23 | private String thirdChoice; 24 | 25 | public String getFirstChoice() { 26 | return firstChoice; 27 | } 28 | public void setFirstChoice(String firstChoice) { 29 | this.firstChoice = firstChoice; 30 | } 31 | public String getSecondChoice() { 32 | return secondChoice; 33 | } 34 | public void setSecondChoice(String secondChoice) { 35 | this.secondChoice = secondChoice; 36 | } 37 | public String getThirdChoice() { 38 | return thirdChoice; 39 | } 40 | public void setThirdChoice(String thirdChoice) { 41 | this.thirdChoice = thirdChoice; 42 | } 43 | public String getIssue() { 44 | return issue; 45 | } 46 | public void setIssue(String issue) { 47 | this.issue = issue; 48 | } 49 | public String getTeacher() { 50 | return teacher; 51 | } 52 | public void setTeacher(String teacher) { 53 | this.teacher = teacher; 54 | } 55 | public ObjectId get_id() { 56 | return _id; 57 | } 58 | public void set_id(ObjectId _id) { 59 | this._id = _id; 60 | } 61 | public String getName() { 62 | return name; 63 | } 64 | public void setName(String name) { 65 | this.name = name; 66 | } 67 | public String getSex() { 68 | return sex; 69 | } 70 | public void setSex(String sex) { 71 | this.sex = sex; 72 | } 73 | public String getNo() { 74 | return no; 75 | } 76 | public void setNo(String no) { 77 | this.no = no; 78 | } 79 | public String getClassno() { 80 | return classno; 81 | } 82 | public void setClassno(String classno) { 83 | this.classno = classno; 84 | } 85 | public String getDepartment() { 86 | return department; 87 | } 88 | public void setDepartment(String department) { 89 | this.department = department; 90 | } 91 | public String getSpecialty() { 92 | return specialty; 93 | } 94 | public void setSpecialty(String specialty) { 95 | this.specialty = specialty; 96 | } 97 | public String getTelephone() { 98 | return telephone; 99 | } 100 | public void setTelephone(String telephone) { 101 | this.telephone = telephone; 102 | } 103 | public String getEmail() { 104 | return email; 105 | } 106 | public void setEmail(String email) { 107 | this.email = email; 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/pojos/SysControl.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.pojos; 2 | 3 | import org.bson.types.ObjectId; 4 | import org.mongodb.morphia.annotations.Entity; 5 | import org.mongodb.morphia.annotations.Id; 6 | 7 | @Entity("syscontrol") 8 | public class SysControl { 9 | @Id 10 | private ObjectId _id; 11 | private boolean s1; 12 | private boolean s2; 13 | private boolean s3; 14 | private boolean s4; 15 | private boolean s5; 16 | private boolean s6; 17 | private boolean s7; 18 | private boolean s8; 19 | private boolean s9; 20 | private boolean s10; 21 | private boolean s11; 22 | 23 | /** 24 | * @return the _id 25 | */ 26 | public ObjectId get_id() { 27 | return _id; 28 | } 29 | 30 | /** 31 | * @param _id 32 | * the _id to set 33 | */ 34 | public void set_id(ObjectId _id) { 35 | this._id = _id; 36 | } 37 | 38 | /** 39 | * @return the s1 40 | */ 41 | public boolean isS1() { 42 | return s1; 43 | } 44 | 45 | /** 46 | * @param s1 47 | * the s1 to set 48 | */ 49 | public void setS1(boolean s1) { 50 | this.s1 = s1; 51 | } 52 | 53 | /** 54 | * @return the s2 55 | */ 56 | public boolean isS2() { 57 | return s2; 58 | } 59 | 60 | /** 61 | * @param s2 62 | * the s2 to set 63 | */ 64 | public void setS2(boolean s2) { 65 | this.s2 = s2; 66 | } 67 | 68 | /** 69 | * @return the s3 70 | */ 71 | public boolean isS3() { 72 | return s3; 73 | } 74 | 75 | /** 76 | * @param s3 77 | * the s3 to set 78 | */ 79 | public void setS3(boolean s3) { 80 | this.s3 = s3; 81 | } 82 | 83 | /** 84 | * @return the s4 85 | */ 86 | public boolean isS4() { 87 | return s4; 88 | } 89 | 90 | /** 91 | * @param s4 92 | * the s4 to set 93 | */ 94 | public void setS4(boolean s4) { 95 | this.s4 = s4; 96 | } 97 | 98 | /** 99 | * @return the s5 100 | */ 101 | public boolean isS5() { 102 | return s5; 103 | } 104 | 105 | /** 106 | * @param s5 107 | * the s5 to set 108 | */ 109 | public void setS5(boolean s5) { 110 | this.s5 = s5; 111 | } 112 | 113 | /** 114 | * @return the s6 115 | */ 116 | public boolean isS6() { 117 | return s6; 118 | } 119 | 120 | /** 121 | * @param s6 122 | * the s6 to set 123 | */ 124 | public void setS6(boolean s6) { 125 | this.s6 = s6; 126 | } 127 | 128 | /** 129 | * @return the s7 130 | */ 131 | public boolean isS7() { 132 | return s7; 133 | } 134 | 135 | /** 136 | * @param s7 137 | * the s7 to set 138 | */ 139 | public void setS7(boolean s7) { 140 | this.s7 = s7; 141 | } 142 | 143 | /** 144 | * @return the s8 145 | */ 146 | public boolean isS8() { 147 | return s8; 148 | } 149 | 150 | /** 151 | * @param s8 152 | * the s8 to set 153 | */ 154 | public void setS8(boolean s8) { 155 | this.s8 = s8; 156 | } 157 | 158 | /** 159 | * @return the s9 160 | */ 161 | public boolean isS9() { 162 | return s9; 163 | } 164 | 165 | /** 166 | * @param s9 167 | * the s9 to set 168 | */ 169 | public void setS9(boolean s9) { 170 | this.s9 = s9; 171 | } 172 | 173 | /** 174 | * @return the s10 175 | */ 176 | public boolean isS10() { 177 | return s10; 178 | } 179 | 180 | /** 181 | * @param s10 182 | * the s10 to set 183 | */ 184 | public void setS10(boolean s10) { 185 | this.s10 = s10; 186 | } 187 | 188 | /** 189 | * @return the s11 190 | */ 191 | public boolean isS11() { 192 | return s11; 193 | } 194 | 195 | /** 196 | * @param s11 197 | * the s11 to set 198 | */ 199 | public void setS11(boolean s11) { 200 | this.s11 = s11; 201 | } 202 | 203 | } 204 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/pojos/Teacher.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.pojos; 2 | 3 | import org.bson.types.ObjectId; 4 | import org.mongodb.morphia.annotations.Entity; 5 | import org.mongodb.morphia.annotations.Id; 6 | 7 | @Entity("teachers") 8 | public class Teacher { 9 | @Id 10 | private ObjectId _id; 11 | private String name; 12 | private String sex; 13 | private String no; 14 | private String department; 15 | private String telephone; 16 | private String email; 17 | private String postion; 18 | private String group; 19 | private boolean isLeader; 20 | 21 | /** 22 | * @return the _id 23 | */ 24 | public ObjectId get_id() { 25 | return _id; 26 | } 27 | /** 28 | * @param _id the _id to set 29 | */ 30 | public void set_id(ObjectId _id) { 31 | this._id = _id; 32 | } 33 | /** 34 | * @return the name 35 | */ 36 | public String getName() { 37 | return name; 38 | } 39 | /** 40 | * @param name the name to set 41 | */ 42 | public void setName(String name) { 43 | this.name = name; 44 | } 45 | /** 46 | * @return the sex 47 | */ 48 | public String getSex() { 49 | return sex; 50 | } 51 | /** 52 | * @param sex the sex to set 53 | */ 54 | public void setSex(String sex) { 55 | this.sex = sex; 56 | } 57 | /** 58 | * @return the no 59 | */ 60 | public String getNo() { 61 | return no; 62 | } 63 | /** 64 | * @param no the no to set 65 | */ 66 | public void setNo(String no) { 67 | this.no = no; 68 | } 69 | /** 70 | * @return the department 71 | */ 72 | public String getDepartment() { 73 | return department; 74 | } 75 | /** 76 | * @param department the department to set 77 | */ 78 | public void setDepartment(String department) { 79 | this.department = department; 80 | } 81 | /** 82 | * @return the telephone 83 | */ 84 | public String getTelephone() { 85 | return telephone; 86 | } 87 | /** 88 | * @param telephone the telephone to set 89 | */ 90 | public void setTelephone(String telephone) { 91 | this.telephone = telephone; 92 | } 93 | /** 94 | * @return the email 95 | */ 96 | public String getEmail() { 97 | return email; 98 | } 99 | /** 100 | * @param email the email to set 101 | */ 102 | public void setEmail(String email) { 103 | this.email = email; 104 | } 105 | /** 106 | * @return the postion 107 | */ 108 | public String getPostion() { 109 | return postion; 110 | } 111 | /** 112 | * @param postion the postion to set 113 | */ 114 | public void setPostion(String postion) { 115 | this.postion = postion; 116 | } 117 | /** 118 | * @return the group 119 | */ 120 | public String getGroup() { 121 | return group; 122 | } 123 | /** 124 | * @param group the group to set 125 | */ 126 | public void setGroup(String group) { 127 | this.group = group; 128 | } 129 | /** 130 | * @return the isLeader 131 | */ 132 | public boolean isLeader() { 133 | return isLeader; 134 | } 135 | /** 136 | * @param isLeader the isLeader to set 137 | */ 138 | public void setLeader(boolean isLeader) { 139 | this.isLeader = isLeader; 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/pojos/User.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.pojos; 2 | 3 | import org.bson.types.ObjectId; 4 | import org.mongodb.morphia.annotations.Entity; 5 | import org.mongodb.morphia.annotations.Id; 6 | 7 | @Entity("users") 8 | public class User { 9 | 10 | @Id 11 | private ObjectId _id; 12 | private ObjectId refId; 13 | private String username; 14 | private String password; 15 | private int type; 16 | 17 | public User() { 18 | } 19 | 20 | public User(ObjectId _id, String _username, String _password, int _type) { 21 | this._id = _id; 22 | this.username = _username; 23 | this.password = _password; 24 | this.type = _type; 25 | } 26 | 27 | public ObjectId get_id() { 28 | return _id; 29 | } 30 | 31 | public void set_id(ObjectId _id) { 32 | this._id = _id; 33 | } 34 | 35 | public ObjectId getRefId() { 36 | return refId; 37 | } 38 | 39 | public void setRefId(ObjectId refId) { 40 | this.refId = refId; 41 | } 42 | 43 | public String getUsername() { 44 | return username; 45 | } 46 | 47 | public void setUsername(String username) { 48 | this.username = username; 49 | } 50 | 51 | public String getPassword() { 52 | return password; 53 | } 54 | 55 | public void setPassword(String password) { 56 | this.password = password; 57 | } 58 | 59 | public int getType() { 60 | return type; 61 | } 62 | 63 | public void setType(int type) { 64 | this.type = type; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/test/Test.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.test; 2 | 3 | import com.find1x.gpms.dao.SysControlDAO; 4 | import com.find1x.gpms.pojos.SysControl; 5 | 6 | public class Test { 7 | 8 | @org.junit.Test 9 | public void myTest() { 10 | // List list = MongoDBUtil.getDatastore().find(User.class) 11 | // .filter("username", "20113092").filter("password", "123456") 12 | // .asList(); 13 | // System.out.println(list.size()); 14 | 15 | // Student stu = new Student(); 16 | // stu.setName("凤翔"); 17 | // MongoDBUtil.getDatastore().save(stu); 18 | 19 | // User user = new User(); 20 | // user.setRefId(MongoDBUtil.getDatastore().find(Student.class).filter("name", 21 | // "凤翔").get().get_id()); 22 | // MongoDBUtil.getDatastore().save(user); 23 | // ObjectId refId = MongoDBUtil.getDatastore().find(User.class) 24 | // .filter("username", "20113092").get().getRefId(); 25 | // System.out.println(refId); 26 | // System.out.println(UserDAO.getUserName("20113092", 0)); 27 | // List list = IssueDAO.getList(); 28 | // for(Issue i:list){ 29 | // System.out.println(i.getTitle()); 30 | // } 31 | SysControlDAO.saveSysControl(new SysControl()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/com/find1x/gpms/util/MongoDBUtil.java: -------------------------------------------------------------------------------- 1 | package com.find1x.gpms.util; 2 | 3 | import java.net.UnknownHostException; 4 | 5 | import org.mongodb.morphia.Datastore; 6 | import org.mongodb.morphia.Morphia; 7 | 8 | import com.mongodb.DB; 9 | import com.mongodb.DBCollection; 10 | import com.mongodb.Mongo; 11 | 12 | public class MongoDBUtil { 13 | private final static String DATABASE = "GPMS"; 14 | 15 | private static volatile MongoDBUtil INSTANCE; 16 | 17 | private static Mongo mongo; 18 | private static Morphia morphia; 19 | private static Datastore ds; 20 | private static DB db; 21 | private static DBCollection dbCollection; 22 | 23 | private MongoDBUtil() { 24 | try { 25 | mongo = new Mongo("rank.litpo.com", 27017); 26 | } catch (UnknownHostException e) { 27 | e.printStackTrace(); 28 | } 29 | morphia = new Morphia(); 30 | morphia.mapPackage("com.find1x.gpms.pojos"); 31 | ds = morphia.createDatastore(mongo, DATABASE); 32 | } 33 | 34 | private static MongoDBUtil getInstance() { 35 | if (INSTANCE == null) { 36 | synchronized (MongoDBUtil.class) { 37 | // when more than two threads run into the first null check same 38 | // time, to avoid instanced more than one time, it needs to be 39 | // checked again. 40 | if (INSTANCE == null) { 41 | INSTANCE = new MongoDBUtil(); 42 | } 43 | } 44 | } 45 | return INSTANCE; 46 | } 47 | 48 | public static Datastore getDatastore() { 49 | MongoDBUtil.getInstance(); 50 | return MongoDBUtil.ds; 51 | } 52 | 53 | public static DBCollection getCollection(String collection) { 54 | MongoDBUtil.getInstance(); 55 | db = mongo.getDB(DATABASE); 56 | dbCollection = db.getCollection(collection); 57 | return MongoDBUtil.dbCollection; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/struts.administrator.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | jsp/administrator/admin.jsp 14 | 15 | 16 | 17 | 18 | 19 | jsp/administrator/adminSys.jsp 20 | 21 | 22 | 23 | 24 | 25 | jsp/administrator/adminTeacher.jsp 26 | 27 | 28 | 29 | 30 | 31 | jsp/administrator/addTeacher.jsp 32 | 33 | 34 | 35 | 36 | 37 | jsp/administrator/adminStudent.jsp 38 | 39 | 40 | 41 | 42 | 43 | jsp/administrator/addStudent.jsp 44 | 45 | 46 | 47 | 48 | 49 | jsp/administrator/gradeManage.jsp 50 | 51 | 52 | 53 | 54 | 55 | jsp/administrator/releaseNotice.jsp 56 | 57 | 58 | 59 | 60 | 61 | 62 | adminStudent 63 | 64 | 65 | 66 | 67 | adminTeacher 68 | 69 | 70 | 71 | 72 | admin 73 | 74 | 75 | 76 | 77 | adminSys 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /src/struts.departmentHead.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | jsp/departmentHead/departmentHead.jsp 14 | 15 | 16 | 17 | 18 | 19 | jsp/departmentHead/departmentHeadInfo.jsp 20 | 21 | 22 | 23 | 24 | 25 | jsp/departmentHead/departmentHeadTeacher.jsp 26 | 27 | 28 | 29 | 30 | 31 | jsp/departmentHead/departmentHeadTeacherDetail.jsp 32 | 33 | 34 | 35 | 36 | 37 | jsp/departmentHead/departmentHeadStudent.jsp 38 | 39 | 40 | 41 | 42 | 43 | jsp/departmentHead/departmentHeadStudentDetail.jsp 44 | 45 | 46 | 47 | 48 | 49 | jsp/departmentHead/departmentHeadStudentGrade.jsp 50 | 51 | 52 | 53 | 54 | jsp/departmentHead/departmentHeadSubject.jsp 55 | 56 | 57 | 58 | 59 | jsp/departmentHead/departmentHeadSubjectDetail.jsp 60 | 61 | 62 | 63 | 64 | 65 | jsp/departmentHead/departmentHeadSubjectManage.jsp 66 | 67 | 68 | 69 | 70 | 71 | jsp/departmentHead/departmentHeadGroup.jsp 72 | 73 | 74 | 75 | 76 | 77 | jsp/departmentHead/studentGradeManage.jsp 78 | 79 | 80 | 81 | 82 | 84 | 85 | jsp/departmentHead/departmentHeadStudentGrade.jsp 86 | 87 | 88 | 89 | 91 | 92 | jsp/departmentHead/departmentHeadSubjectManage.jsp 93 | 94 | 95 | 96 | 97 | 98 | jsp/departmentHead/departmentHeadSubjectManage.jsp 99 | 100 | 101 | 102 | 103 | 104 | jsp/departmentHead/departmentHeadTeacher.jsp 105 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /src/struts.general.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | jsp/index.jsp 14 | 15 | 16 | 17 | 18 | jsp/login.jsp 19 | 20 | 21 | 22 | 23 | jsp/changePasswd.jsp 24 | 25 | 26 | 27 | 28 | jsp/template/page.jsp 29 | 30 | 31 | 32 | 33 | 34 | 35 | / 36 | 37 | 38 | 39 | 40 | / 41 | 42 | 43 | /?status=error 44 | 45 | 46 | 47 | 48 | jsp/result.jsp 49 | 50 | 51 | jsp/changePasswd?status=error 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/struts.student.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | jsp/student/student.jsp 14 | 15 | 16 | 17 | 18 | jsp/student/selectSubject.jsp 19 | 20 | 21 | 22 | 23 | 24 | jsp/student/studentInfo.jsp 25 | 26 | 27 | 28 | 29 | 30 | jsp/student/studentTeacher.jsp 31 | 32 | 33 | 34 | 35 | jsp/student/studentGrade.jsp 36 | 37 | 38 | 39 | 40 | jsp/student/student.jsp 41 | 42 | 43 | 44 | 45 | jsp/student/selectSubject.jsp 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/struts.teacher.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | jsp/teacher/teacher.jsp 14 | 15 | 16 | 17 | 18 | jsp/teacher/teacherSubject.jsp 19 | 20 | 21 | 22 | 23 | 24 | 25 | jsp/teacher/teacherSubjectManage.jsp 26 | 27 | 28 | 29 | 30 | jsp/teacher/teacherSubjectManage.jsp 31 | 32 | 33 | 34 | 35 | jsp/teacher/teacherSubjectManage.jsp 36 | 37 | 38 | 40 | 41 | jsp/teacher/teacherSubjectManage.jsp 42 | 43 | 44 | 46 | 47 | jsp/teacher/teacherChangeSubject.jsp 48 | 49 | 50 | 51 | 52 | jsp/teacher/teacherInfo.jsp 53 | 54 | 55 | 56 | 57 | jsp/teacher/teacherStudent.jsp 58 | 59 | 60 | 61 | 62 | jsp/teacher/teacherStudentGrade.jsp 63 | 64 | 65 | 67 | 68 | jsp/teacher/teacherStudentDetail.jsp 69 | 70 | 71 | 72 | 73 | 74 | jsp/teacher/teacherUploadFiles.jsp 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /src/struts.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | --------------------------------------------------------------------------------