【正文】
從 Session 中取出用戶 ID 獲得該用戶類對象,調(diào)用用戶類接口修改該用戶密碼,然后更新該用戶在數(shù)據(jù)庫中信息。該流程如圖 44 所示。系統(tǒng)還原時調(diào)用該接口。系統(tǒng)備份文件類型 BackupTypeD String 系統(tǒng)備份文件類型(0 為數(shù)據(jù)庫備份, 1 為日志備份) 。? 刪除備份文件:選擇備份文件刪除該文件。2. 獲得最早日志日期接口:通過該接口獲得庫中日志的最早記錄日志的日期。? 具體操作:用戶所執(zhí)行的具體操作內(nèi)容。? 按日期刪除日志:刪除某一時間段內(nèi)的所有日志。數(shù)據(jù)庫層調(diào)用。用戶個人信息維護時調(diào)用。3.普通用戶對所在部門設備具有一定的操作維護權限,只能查看所在部門的部門結(jié)構(gòu)和進行個人信息維護。任何系統(tǒng)用戶都能進行個人信息維護。通過該接口執(zhí)行過程為:先獲得部門5 到根部門的節(jié)點反向放入向量中(如圖 29 所示) 。只是比較用戶所屬部門 ID 與移動部門 ID 是否相等。j++) {if(UserDepID[i]!=moveUserDepID[j])判斷移動用戶所屬部門 ID 與操作用戶所屬部門是否相等{ 若不相等,調(diào)用部門類根據(jù)部門 ID(UserDepID[i] )和添加用戶所屬部門 ID 獲得以該部門為根節(jié)點的添加用戶到其它部門子樹.}然后將添加部門子樹的森林合并為一棵部門二叉樹。? 舉例說明:如圖 19 所示圖 19 部門結(jié)構(gòu)圖通過該接口獲得以部門 4 為根的部門樹。 if(!=0) 判斷該部門是否存在子部門。以圖 19 為例,系統(tǒng)管理員 1 要將部門高級用戶 1 添加到其它部門。如果沒有子部門,則允許刪除該部門。獲得用戶所能管理部門 ID 時調(diào)用。4. 合并部門接口:根據(jù)合并部門 ID 和目的部門 ID,將合并部門的設備和用戶合并到目的部門,將合并部門的所有直接下級部門移動到目的部門的下級,然后刪除合并部門信息?;谌龑咏Y(jié)構(gòu)的 B/S 模式的設備管理系統(tǒng) 設備管理系統(tǒng)的設計9部門類屬性列表屬性名 屬性標識 屬性類型部門 ID DepID int部門名稱 DepName String直接上級部門 ID SuperID int該部門下級部門子樹的根節(jié)點(二叉樹的左孩子)ChildDep Department該部門兄弟部門子樹的根節(jié)點(二叉樹的右孩子)BrotherDep Department舉例說明圖 10 系統(tǒng)部門樹結(jié)構(gòu)如圖 10 所示:根部門:? 直接上級部門 ID(SuperID)屬性為1。 (如圖 8,9 所示)圖 8 刪除前操作用戶所管轄部門樹示意圖基于三層結(jié)構(gòu)的 B/S 模式的設備管理系統(tǒng) 設備管理系統(tǒng)的設計8圖 9 刪除后操作用戶所管轄部門樹示意圖? 查看部門信息:列出操作用戶所管轄部門樹中的所有部門信息和所屬部門的部門結(jié)構(gòu)。? 系統(tǒng)維護模塊:是對系統(tǒng)數(shù)據(jù)庫的備份與恢復和備份文件的管理維護,在系統(tǒng)遇到問題時能夠及時恢復,保證系統(tǒng)的正常運行。? 數(shù)據(jù)庫:底層數(shù)據(jù)庫主要用于存儲系統(tǒng)中設備,用戶,部門,日志的基本信息。java 語言是目前非常流行的一種面向?qū)ο蟮某绦蜷_發(fā)語言。關鍵字:B/S 模式,三層結(jié)構(gòu),Java 語言,servlet 技術,部門樹,觸發(fā)機制基于三層結(jié)構(gòu)的 B/S 模式的設備管理系統(tǒng) 英文摘要IIAbstractThe paper has introduced the development and design of Device Management System. This system base on the Browser/Server model triplelayer structure and use servlet technology of java, therefore there is higher safety, expandability and portability. According to the function the system is divided into five parts, which are the Device Management Module, the Department Management Module, the User Management Module, the Log Management Module, the System Maintenance Module and the Search module.The major idea of the paper is introduction that the design and realization of the User Management, the Department Management, the Log Management and the Department Management. The Department Management adopts binary tree structure to manage the structure of departments, in order to guarantee relation among departments. The User Management base on department’s structure and guarantee that relation of user and department are correct. Log is used to record user’s operation in the system. The log saving adopt Touch off the mechanism. The system maintenance is to backup the system’s database, the log management and the system maintenance is used to guarantee system safety movement.According to the characteristic of every function module, abstracting each function model as class base on Java Object Oriented thought. According to the requirement of the system function, design and realize each function model’s interface. Therefore each function model of system is independence and the system is higher safety, expandability and portability.Keyword:B/S model,triplelayer structure,Java programming language,servlet technology,department tree,touch off the mechanism基于三層結(jié)構(gòu)的 B/S 模式的設備管理系統(tǒng) 目錄III目 錄摘要 ................................................................................................................................IABSTRACT.................................................................................................................II目 錄 .........................................................................................................................III1. 系統(tǒng)概述 ...................................................................................................................12. 設備管理系統(tǒng)的設計 ...............................................................................................2 系統(tǒng)整體設計 ......................................................................................................2 部門管理維護的設計 ..........................................................................................4 部門管理維護功能概述 ...............................................................................4 部門管理維護詳細設計 ...............................................................................8. 部門結(jié)構(gòu)與用戶維護管理間聯(lián)系的設計與實現(xiàn) ....................................12. 部門類接口算法設計 ................................................................................14 用戶管理維護設計 ............................................................................................20. 用戶管理維護功能概述 ............................................................................20. 用戶管理維護的詳細設計 ........................................................................22 日志管理維護的設計 ........................................................................................25 系統(tǒng)日志管理維護功能概述 .....................................................................25. 日志管理維護詳細設計 ............................................................................26 系統(tǒng)維護的設計 ................................................................................................28. 系統(tǒng)維護功能概述 ....................................................................................28. 系統(tǒng)維護詳細設計 ....................................................................................293. 設備管理系統(tǒng)的實現(xiàn) .............................................................................................32 部門管理維護模塊的實現(xiàn) ................................................................................32 查看部門信息功能實現(xiàn) ..............................................................................32 添加部門功能實現(xiàn) ......................................................................................33 修改部門功能實現(xiàn) ......................................................................................34 刪除部門功能實現(xiàn) ....