版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、精品山東建筑大學(xué)課 程 設(shè) 計(jì) 成 果 報 告畢業(yè)設(shè)計(jì)管理系統(tǒng)題 目: 教師、教研室主任用戶功能課 程: 管理信息系統(tǒng)開發(fā)實(shí)踐1院 (部): 管理工程學(xué)院專 業(yè): 信息管理與信息系統(tǒng)班 級: 信管112學(xué)生姓名:陳杰學(xué) 號: 2011021704指導(dǎo)教師: 佀同光完成日期: 2013年1月4日目 錄1.系統(tǒng)功能簡介32.系統(tǒng)組件關(guān)系33.源程序44.用戶操作手冊275.總結(jié)301. 系統(tǒng)功能簡介本系統(tǒng)是畢業(yè)設(shè)計(jì)管理系統(tǒng)中教師、教研室主任用戶的部分功能。系統(tǒng)向教師用戶提供了查看、提交課題功能,向教研室主任提供了審評查看、提交課題功能。使用eclipse-jee-europa-winter-win
2、32 +Jdk1.6+Tomcat6開發(fā)、測試。2. 系統(tǒng)組件關(guān)系本系統(tǒng)使用構(gòu)架進(jìn)行開發(fā),即使用JSP獲得用戶輸入,由Servlet處理請求,將數(shù)據(jù)存入服務(wù)器對象(session或request)中。JSP使用EL表達(dá)式和JSTL標(biāo)簽將數(shù)據(jù)從服務(wù)器對象中取出數(shù)據(jù),展示出來。2.1. 登錄功能的處理流程:login.jsp收集用戶的輸入,點(diǎn)擊“提交”按鈕后,由LoginServlet的doPost方法獲得jsp頁面的username、password參數(shù)的值,如果是合法用戶,則將userInfo存入session并轉(zhuǎn)向welcome.jsp頁面,否則將”用戶名或密碼錯誤”以“error”為名存入
3、session,該頁面顯示error的內(nèi)容。2.2. w功能2.2.1. 查看所有設(shè)計(jì)題目. 單擊超鏈接“查看所有設(shè)計(jì)題目”,即請求GraduateProjectServlet的doGet方法,由于沒有其它參數(shù),會直接執(zhí)行該類的list方法。在list方法中,通過GraduateProjectDao獲得所有的設(shè)計(jì)題目對象的集合,以“graduateProjects”為名存入request,然后請求被轉(zhuǎn)發(fā)到listGraduateProject.jsp。在該頁面中,通過JSTL的forEach標(biāo)簽遍歷graduateProjects的每個題目對象,依次將它們的所有屬性顯示出來。如果
4、某題目的指導(dǎo)教師與登錄用戶相同,且未被批準(zhǔn),則在后面列出“修改、刪除”超鏈接。. 單擊“修改”鏈接,會請求GraduateProjectServlet的doGet方法,同時將參數(shù)action=prepareEdit和id傳入。doGet方法解析參數(shù)后,通過GraduateProjectDao獲得參數(shù)id所代表的GraduateProject對象。. 單擊“刪除”鏈接,會請求GraduateProjectServlet的doGet方法,同時將參數(shù)action=delete和id傳入。doGet方法解析參數(shù)后,通過GraduateProjectDao獲得參數(shù)id所代表的
5、GraduateProject對象。. 單擊“增加設(shè)計(jì)題目”鏈接(參見2.2.2)2.2.2. 增加設(shè)計(jì)題目. 單擊“增加設(shè)計(jì)題目”鏈接,即請求GraduateProjectServlet的doGet方法, 然后請求被轉(zhuǎn)editGraduateProject.jsp。點(diǎn)修改按鈕,會請求GraduateProjectServlet的GraduateProjectDao獲得參數(shù)id所代表的GraduateProject對象,再存入doPost方法。2.2.3. 審批題目. “審批題目”鏈接時(只有教研室主任有此權(quán)限),即請求GraduateProjectS
6、ervlet4DepartmentLeader的list方法,然后請求轉(zhuǎn)到listGraduateProjectServlet4DepartmentLeader.jsp頁面。在該頁面通過forEach標(biāo)簽遍歷將所有題目列出,并且列出其審批狀態(tài)。. 審批題目 在listlistGradua同時將參數(shù)action=add和id傳入。doGet方法解析參數(shù)后,通過GraduateProjecDao中teProjectServlet4DepartmentLeader.jsp頁面,單擊操作中的“審批”時(其狀態(tài)為未審批才可點(diǎn)擊),會請求GraduateProjectServlet4Depa
7、rtmentLeader.java的doGet方法,list方法,跳轉(zhuǎn)到approveGraduateProjectServlet4DepartmentLeader.jsp頁面,然后主任進(jìn)行審批,審批方法有三種“未審批”“批準(zhǔn)”“退休”,在單擊提交審批結(jié)果后,請求GraduateProjectServlet4DepartmentLeader.java的doPost方法,然后再跳轉(zhuǎn)到listGraduateProjectServlet4DepartmentLeader.jsp頁面。并且存入數(shù)據(jù)庫GraduateProjectStatusDao集合中。此時審批狀態(tài)為“審批”時,則不可以進(jìn)去再審批,
8、其他狀態(tài)才可更改。3. 源程序3.1. 實(shí)體類(省略方法),共17個。GraduateProject/2011021704陳杰package .sdjzu.xg11.domain;import java.io.Serializable;import java.util.Collection;public final class GraduateProject implements Comparable,Serializableprivate static Integer nextID = 11;private Integer id;private String title;/限選專
9、業(yè)private Collection limitedToMajor;/類別private ProjectCategory projectCategory;/類型private ProjectType projectType;/性質(zhì)/來源/審批狀態(tài)private GraduateProjectStatus graduateProjectStatus;private Teacher teacher;GraduateProjectStatus.java/2011021704陳杰package .sdjzu.xg11.domain;import java.io.Serializable;
10、public final class GraduateProjectStatus implements Comparable,Serializableprivate Integer id;private String description;private String no;private String remarks;Degree.java/2011021704陳杰package .sdjzu.xg11.domain;alizable;public final class Degree implements Comparable,Serializableprivate Inte
11、ger id;private String description;private String no;private String remarks;public Degree(Integer id, String description, String no, String remarks) super();this.id = id;this.description = description;this.no = no;this.remarks = remarks;/2011021704陳杰package .sdjzu.xg11.domain;import java.io.Ser
12、ializable;public final class Department implements Comparable,Serializableprivate Integer id;private String description;private String no;private String remarks;private School school;public Department(Integer id, String description, String no,String remarks, School school) super();this.id = id;this.
13、description = description;this.no = no;this.remarks = remarks;this.school = school;/2011021704陳杰package .sdjzu.xg11.domain;import java.io.Serializable;public final class Major implements Comparable,Serializableprivate Integer id;private String description;private String no;private String remar
14、ks;private Department department;public Major(Integer id, String description, String no, String remarks,Department department) super();this.id = id;this.description = description;this.no = no;this.remarks = remarks;this.department = department;/2011021704陳杰package .sdjzu.xg11.domain;import jav
15、a.io.Serializable;public final class ProjectCategory implements Comparable,Serializableprivate Integer id;private String description;private String no;private String remarks;public ProjectCategory(Integer id, String description, String no,String remarks) super();this.id = id;this.description = descr
16、iption;this.no = no;this.remarks = remarks;/2011021704陳杰package .sdjzu.xg11.domain;import java.io.Serializable;public final class ProjectType implements Comparable,Serializable private Integer id;private String description;private String no;private String remarks;public ProjectType(Integer id,
17、 String description, String no, String remarks) super();this.id = id;this.description = description;this.no = no;this.remarks = remarks;/2011021704陳杰package .sdjzu.xg11.domain;import java.io.Serializable;public final class School implements Comparable,Serializableprivate Integer id;private Str
18、ing description;private String no;private String remarks;public School(Integer id, String description, String no, String remarks) super();this.id = id;this.description = description;this.no = no;this.remarks = remarks;/2011021704陳杰package .sdjzu.xg11.domain;import java.io.Serializable;import j
19、ava.util.Set;import .sdjzu.xg11.domain.authority.Actor;public final class Teacher extends Actor implements Comparable,Serializable /* * */private static final long serialVersionUID = 1L;private Integer id;private String name;private Title title;private Degree degree;private Department departme
20、nt;private Set projects;public Teacher(Integer id, String name, Title title, Degree degree,Department department) super();this.id = id; = name;this.title = title;this.degree = degree;this.department = department;/2011021704陳杰package .sdjzu.xg11.domain;import java.io.Serializable;publi
21、c final class Title implements Comparable,Serializableprivate Integer id;private String description;private String no;private String remarks;public Title(Integer id, String description, String no, String remarks) super();this.id = id;this.description = description;this.no = no;this.remarks = remarks
22、;/2011021704陳杰package .sdjzu.xg11.domain;import java.io.Serializable;import java.util.Date;public class UserInfo implements Comparable,Serializableprivate Integer id;private String username;private String password;private Date loginTime;private Teacher teacher;public UserInfo(Integer id, Strin
23、g username, String password, Date loginTime,Teacher teacher) super();this.id = id;this.username = username;this.password = password;this.loginTime = loginTime;this.teacher = teacher;/2011021704陳杰package .sdjzu.xg11.domain.authority;import java.util.Collection;public abstract class Actor privat
24、e Collection actorAssRoles;public Collection getActorAssRoles() return actorAssRoles;public void setActorAssRoles(Collection actorAssRoles) this.actorAssRoles = actorAssRoles;public abstract String getName();/2011021704陳杰package .sdjzu.xg11.domain.authority;import java.io.Serializable;e;import
25、 util.IDService;public class ActorAssRole implements Comparable,Serializableprivate Integer id;private Actor actor;private Role role;private Date createTime;this.id = IDService.getID();public ActorAssRole(Actor actor, Role role, Date createTime) super();this.actor = actor;this.role = role;this.creat
26、eTime = createTime;/2011021704陳杰package .sdjzu.xg11.domain.authority;import java.util.Collection;import java.util.Date;import java.util.HashSet;import .sdjzu.xg11.dao.TeacherDao;import .sdjzu.xg11.dao.authority.ActorAssRoleDao;11.dao.authority.ResourceDao;import .sdjzu.xg11.d
27、ao.authority.RoleDao;import .sdjzu.xg11.domain.Teacher;public class AuthorityTest public static void main(String args) Teacher t1 = TeacherDao.getInstance().getTeacher(1);Teacher t2 = TeacherDao.getInstance().getTeacher(2);/Role r1 = RoleDao.getInstance().getRole(1);Role r2 = RoleDao.getInstan
28、ce().getRole(2);/ActorAssRole ar1 = ActorAssRoleDao.getInstance().getActorAssRole(1);ActorAssRole ar21 = ActorAssRoleDao.getInstance().getActorAssRole(2);ActorAssRole ar22 = ActorAssRoleDao.getInstance().getActorAssRole(3);/2011021704陳杰package .sdjzu.xg11.domain.authority;import java.io.Serial
29、izable;import util.IDService;public class Resource implements Comparable,Serializable private static int nextID=1;private Integer id;private String description;private String url;private String no;this.id=IDService.getID();/2011021704陳杰ity;import java.io.Serializable;import java.util.Collection;impo
30、rt util.IDService;public final class Role implements Comparable,Serializable private static int nextID=1;private Integer id;private String description;private String no;private Collection roleAssResource;public Role(String description, String no) super();this.description = description;this.no = no;t
31、his.id = nextID;nextID+;/2011021704陳杰package .sdjzu.xg11.domain.authority;import java.io.Serializable;import java.util.Date;public class RoleAssResource implements Comparable,Serializableprivate static int nextID=1;private Integer id;private Role role;private Resource resource;private Date cre
32、ateTime;this.id = nextID;nextID+;3.2. Dao類(略)3.3. Servlet類,共4個。/2011021704陳杰package action;import java.io.IOException;import java.util.Collection;import java.util.HashSet;import javax.servlet.ServletException;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;
33、import javax.servlet.http.HttpSession;import .sdjzu.xg11.dao.GraduateProjectDao;import .sdjzu.xg11.dao.GraduateProjectStatusDao;import .sdjzu.xg11.dao.MajorDao;import .sdjzu.xg11.dao.ProjectCategoryDao;import .sdjzu.xg11.dao.ProjectTypeDao;import .sdjzu.xg11.domai
34、n.GraduateProject;import .sdjzu.xg11.domain.GraduateProjectStatus;import .sdjzu.xg11.domain.Major;import .sdjzu.xg11.domain.ProjectCategory;import .sdjzu.xg11.domain.ProjectType;import .sdjzu.xg11.domain.Teacher;import .sdjzu.xg11.domain.UserInfo;/* * Servlet impl
35、ementation class for Servlet: GraduateProjectServlet * */implements javax.servlet.Servlet static final long serialVersionUID = 1L;private Collection categories;private Collection types;private Collection majors;/* * (non-Java-doc) * * see javax.servlet.http.HttpServlet#HttpServlet() */public Graduat
36、eProjectServlet() super();Overrideprotected void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException HttpSession session = request.getSession();UserInfo userInfo = (UserInfo) session.getAttribute(userInfo);Teacher teacher = userInfo.getTeacher();reque
37、st.setCharacterEncoding(UTF-8);String action = request.getParameter(action);if (add.equals(action) String projectTitle = request.getParameter(title);String category_id = request.getParameter(category);String type_id = request.getParameter(type);String majors_ids = request.getParameterValues(majors);
38、System.out.println(majors_ids);ProjectCategory category = ProjectCategoryDao.getInstance().getProjectCategory(new Integer(category_id);ProjectType type = new ProjectTypeDao().getProjectType(new Integer(type_id);Collection limitedmajors = new HashSet();if(majors_ids=null)MajorDao majorDao = MajorDao.
39、getInstance();/如果用戶未選擇適用專業(yè),則將該教師所屬教研室的所有專業(yè)設(shè)置為“適用專業(yè)”Collection allMajors = MajorDao.getInstance().getMajors();for (Major major : allMajors) if(major.getDepartment().equals(teacher.getDepartment()limitedmajors.add(major);elsefor (String majorId : majors_ids) Major major = MajorDao.getInstance().getMaj
40、or(new Integer(majorId);limitedmajors.add(major);System.out.println(teacher);GraduateProjectStatus suppendStatus = GraduateProjectStatusDao.getInstance().getGraduateProjectStatus(1);GraduateProject projectCategory = new GraduateProject(projectTitle, limitedmajors, category, type,suppendStatus, teach
41、er);GraduateProjectDao.getInstance().addGraduateProject(projectCategory);else if(update.equals(action)System.out.println(action);String id_str = request.getParameter(id);GraduateProject project = GraduateProjectDao.getInstance().getGraduateProject(new Integer(id_str);String projectTitle = request.ge
42、tParameter(title);String category_id = request.getParameter(category);String type_id = request.getParameter(type);String majors_ids = request.getParameterValues(majors);ProjectCategory category = ProjectCategoryDao.getInstance().getProjectCategory(new Integer(category_id);ProjectType type = new Proj
43、ectTypeDao().getProjectType(new Integer(type_id);Collection limitedmajors = new HashSet();for (String majorId : majors_ids) Major major = MajorDao.getInstance().getMajor(new Integer(majorId);limitedmajors.add(major);project.setTitle(projectTitle);project.setProjectCategory(category);project.setProje
44、ctType(type);project.setLimitedToMajor(limitedmajors);GraduateProjectStatus graduateProjectStatus = GraduateProjectStatusDao.getInstance().getGraduateProjectStatus(1);project.setGraduateProjectStatus(graduateProjectStatus);GraduateProjectDao.getInstance().updateGraduateProject(project);this.list(req
45、uest, response);protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException HttpSession session = request.getSession();String action = request.getParameter(action);if (delete.equals(action) / 刪除String id_s = request.getParameter(id);Integer id =
46、 new Integer(id_s);this.delete(request, response, id); else if (prepareAdd.equals(action) prepareObjects(request);/ jsprequest.getRequestDispatcher(/dPages/addGraduateProject.jsp).forward(request, response);return;else if(prepareEdit.equals(action)prepareObjects(request);String id = request.getParam
47、eter(id);GraduateProject graduateProject = GraduateProjectDao.getInstance().getGraduateProject(new Integer(id);request.setAttribute(graduateProject, graduateProject);/ jsprequest.getRequestDispatcher(/dPages/editGraduateProject.jsp).forward(request, response);return;list(request, response);private v
48、oid prepareObjects(HttpServletRequest request) categories = ProjectCategoryDao.getInstance().getProjectCategorys();types = new ProjectTypeDao().getProjectTypes();majors = MajorDao.getInstance().getMajors();/ 保存到session中Attribute(categories, categories);request.setAttribute(types, types);request.setA
49、ttribute(majors, majors);private void delete(HttpServletRequest request,HttpServletResponse response, Integer id) throws ServletException,IOException System.out.println(delete id= + id);Collection projects = GraduateProjectDao.getInstance().getGraduateProjects();projects.remove(new GraduateProject(i
50、d);private void list(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException Collection projects = GraduateProjectDao.getInstance().getGraduateProjects();System.out.println(projects.size();int counter=1;final String TAB=t;for (GraduateProject graduateProject : p
51、rojects) System.out.print(counter+)+TAB);System.out.print(graduateProject.getTitle()+TAB);System.out.print(graduateProject.getProjectCategory().getDescription()+TAB);System.out.print(graduateProject.getProjectType().getDescription()+TAB);System.out.print(graduateProject.getTeacher().getName()+TAB);System.out.println();HttpSession se
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2026年陜西職業(yè)技術(shù)學(xué)院單招綜合素質(zhì)考試備考試題含詳細(xì)答案解析
- 2026年湖南化工職業(yè)技術(shù)學(xué)院單招綜合素質(zhì)筆試模擬試題含詳細(xì)答案解析
- 2026年安徽醫(yī)學(xué)高等??茖W(xué)校單招綜合素質(zhì)考試備考題庫含詳細(xì)答案解析
- 2026年畢節(jié)職業(yè)技術(shù)學(xué)院單招綜合素質(zhì)考試模擬試題含詳細(xì)答案解析
- 2026年廣東松山職業(yè)技術(shù)學(xué)院單招綜合素質(zhì)考試參考題庫含詳細(xì)答案解析
- 2026年貴州電子信息職業(yè)技術(shù)學(xué)院單招職業(yè)技能考試參考題庫含詳細(xì)答案解析
- 2026首都經(jīng)濟(jì)貿(mào)易大學(xué)招聘103人參考考試試題及答案解析
- 2026年上半年合肥高新區(qū)管委會公開招聘工作人員45名參考考試試題及答案解析
- 2026年武夷學(xué)院單招綜合素質(zhì)考試參考題庫含詳細(xì)答案解析
- 2026年貴州盛華職業(yè)學(xué)院高職單招職業(yè)適應(yīng)性測試備考題庫及答案詳細(xì)解析
- 2026年及未來5年市場數(shù)據(jù)中國鮮雞肉行業(yè)市場深度研究及投資規(guī)劃建議報告
- 診所相關(guān)衛(wèi)生管理制度
- 2024-2025學(xué)年廣東深圳實(shí)驗(yàn)學(xué)校初中部八年級(上)期中英語試題及答案
- 牛津版八年級英語知識點(diǎn)總結(jié)
- 2026中國電信四川公用信息產(chǎn)業(yè)有限責(zé)任公司社會成熟人才招聘備考題庫及完整答案詳解
- 2026中國電信四川公用信息產(chǎn)業(yè)有限責(zé)任公司社會成熟人才招聘備考題庫含答案詳解
- 國際話語體系構(gòu)建與策略分析課題申報書
- 戶外領(lǐng)隊(duì)培訓(xùn)課件
- 中考字音字形練習(xí)題(含答案)-字音字形專項(xiàng)訓(xùn)練
- CTD申報資料撰寫模板:模塊三之3.2.S.4原料藥的質(zhì)量控制
- 2024屆新高考物理沖刺復(fù)習(xí):“正則動量”解決帶電粒子在磁場中的運(yùn)動問題
評論
0/150
提交評論