基于java的檔案管理系統(tǒng)
項(xiàng)目技術(shù)組成:(Spring+SpringMVC+MyBatis+shiro+vue等等)
[if !supportLists]1.?[endif]系統(tǒng)管理
[if !supportLists](1)?[endif]字典管理
[if !supportLists](2)?[endif]部門(mén)管理
[if !supportLists](3)?[endif]用戶(hù)管理
[if !supportLists](4)?[endif]角色管理
[if !supportLists](5)?[endif]權(quán)限管理
[if !supportLists](6)?[endif]系統(tǒng)菜單管理
[if !supportLists](7)?[endif]系統(tǒng)資源管理
[if !supportLists](8)?[endif]修改密碼
[if !supportLists]2.?[endif]檔案管理
[if !supportLists](1)?[endif]檔案分類(lèi)管理
[if !supportLists](2)?[endif]檔案錄入管理
[if !supportLists](3)?[endif]檔案查詢(xún)
[if !supportLists](4)?[endif]檔案借閱
[if !supportLists](5)?[endif]檔案歸還
[if !supportLists](6)?[endif]檔案導(dǎo)出
[if !supportLists](7)?[endif]檔案附件上傳
[if !supportLists](8)?[endif]檔案到期管理
[if !supportLists]3.?[endif]檔案鑒定
[if !supportLists](1)?[endif]檔案銷(xiāo)毀登記
[if !supportLists]①?[endif]在數(shù)據(jù)庫(kù)創(chuàng)建銷(xiāo)毀登記要使用的表t_destroy
字段:id(銷(xiāo)毀編號(hào)),Archive_id (檔案編號(hào)),user(銷(xiāo)毀登記人員),time(銷(xiāo)毀登記時(shí)間),reason(銷(xiāo)毀原因),remarks(備注)
②使用MyBatis-generatro,根據(jù)數(shù)據(jù)的t_destroy表生成相應(yīng)的domain和mapper
③項(xiàng)目搭建好后,使用velocity模板技術(shù)生成相應(yīng)的模板代碼
④修正、完善模板生成的代碼
⑤選擇,補(bǔ)充需要的方法
分頁(yè)查詢(xún)等
@Override public PageResult selectForList(BaseQueryObject qo) {???? PageHelper.startPage(qo.getPage() , qo.getRows());??? ?Page page = (Page) destroytMapper.selectForList(qo);???? return new PageResult(page.getTotal() ,page.getResult()); }
⑥在controller層寫(xiě)連接前臺(tái)的方法:展示數(shù)據(jù),登記或者修改
⑦完成destroy.jsp和destroy.js
檔案銷(xiāo)毀里的方法:
1.檔案銷(xiāo)毀登記:
點(diǎn)擊’檔案銷(xiāo)毀登記按鈕’,彈出框,輸入檔案編號(hào)(關(guān)聯(lián)檔案表,下拉框顯示所有檔案編號(hào)),銷(xiāo)毀登記人員(自動(dòng)獲取當(dāng)前登錄操作用戶(hù)),銷(xiāo)毀登記時(shí)間不需要出現(xiàn)在彈出框中(domain中new的Date自動(dòng)設(shè)置為當(dāng)前時(shí)間),備注。
檔案銷(xiāo)毀登記時(shí),在controller層先進(jìn)行判斷,如果,彈出框銷(xiāo)毀的檔案編號(hào)在t_destroy中已經(jīng)存在,不允許再次銷(xiāo)毀。
[if !supportLists]2.?[endif]檔案銷(xiāo)毀信息修改
選中已銷(xiāo)毀了的檔案,點(diǎn)擊’銷(xiāo)毀檔案修改’,彈出框會(huì)回顯出當(dāng)前檔案的銷(xiāo)信息,可以對(duì)銷(xiāo)毀信息進(jìn)行修改,修改人員,修改時(shí)間,備注可以改變,回顯出來(lái)的檔案編號(hào)是寫(xiě)死了的,不能被修改,修改了就沒(méi)有意義了
??
[if !supportLists](2)?[endif]銷(xiāo)毀檔案查詢(xún)
①時(shí)間段查詢(xún)+關(guān)鍵字查詢(xún)
在DestroyQuery中添加beginDate,endDate,keyword三個(gè)關(guān)鍵字,js中
'search':function () {
??//獲取關(guān)鍵字????var keyword = $("#keyword").val();????var beginDate = $("#beginDate").val();????var endDate = $("#endDate").val();????//查詢(xún)????destroyDatagrid.datagrid("load", {????????"keyword": keyword,????????//開(kāi)始時(shí)間????????"beginDate": beginDate,????????//結(jié)束時(shí)間????????"endDate": endDate????})
?
配合.xml文件中的sql語(yǔ)句
完成查詢(xún)功能。
[if !supportLists](3)?[endif]檔案損壞丟失登記
①數(shù)據(jù)庫(kù)創(chuàng)建表t_brokenorlost
依次是:損壞丟失編號(hào),檔案編號(hào),丟失損壞登記人員,丟失損壞登記時(shí)間,丟失找回人員,丟失找回時(shí)間,備注,狀態(tài)
②檔案編號(hào),關(guān)聯(lián)檔案表,下拉框選中檔案編號(hào),未被銷(xiāo)毀的正常的檔案才能夠被登記
③弄好相應(yīng)的方法,jsp,js之類(lèi)的
登記:
頁(yè)面點(diǎn)擊’檔案損壞丟失登記’按鈕,彈出框1,包含檔案編號(hào),登記人員不用顯現(xiàn),會(huì)自動(dòng)保存為當(dāng)前登錄用戶(hù),登記時(shí)間不用顯現(xiàn),new出來(lái)的為當(dāng)前操作時(shí)間,狀態(tài)為下拉框,可以選擇丟失和損壞兩種狀態(tài)(domain中寫(xiě)成0和1方便儲(chǔ)存),備注
彈出框點(diǎn)擊提交,調(diào)用controller中的方法,先進(jìn)行判斷,看此檔案編號(hào)在數(shù)據(jù)庫(kù)表中是否存在,如果存在提示信息。
銷(xiāo)毀丟失修改:
選中一條檔案信息,回顯到彈出框2中,檔案編號(hào)只讀模式,不可修改,狀態(tài)和備注都可以修改
[if !supportLists](4)?[endif]檔案損壞丟失查詢(xún)
檔案損壞登記的查詢(xún)和檔案銷(xiāo)毀的查詢(xún)的一樣的,都是使用時(shí)間段和關(guān)鍵字的組合查詢(xún)。這里是用的狀態(tài)來(lái)查比較合適。
方法和上面的查詢(xún)一樣,在Query中添加字段,在xxxMapper.xml的查詢(xún)sql語(yǔ)句中添加where ?<if>條件
[if !supportLists](5)?[endif]檔案丟失找回
狀態(tài)為丟失狀態(tài)的檔案可以進(jìn)行檔案丟失找回操作。
檔案丟失找回和檔案丟失損壞登錄這些是使用的同一張表
選中一條檔案數(shù)據(jù),點(diǎn)擊’丟失檔案找回’,備選中檔案的會(huì)回顯,通過(guò)拿到的值進(jìn)行判斷,用state判斷。只有值為0即丟失狀態(tài)才能提交,其他的會(huì)爆出相應(yīng)的錯(cuò)誤提示
彈出框3中,檔案編號(hào),登記為丟失人員,登記為丟失時(shí)間都是只讀狀態(tài),不能被修改,找回人員自動(dòng)獲取為當(dāng)前登錄人員,找回時(shí)間為當(dāng)前操作時(shí)間,提交后,狀態(tài)改變?yōu)橐颜一貭顟B(tài)
未找回的檔案,找回人員和找回時(shí)間都為空
[if !supportLists]4.?[endif]數(shù)據(jù)維護(hù)
[if !supportLists](1)?[endif]數(shù)據(jù)備份
[if !supportLists](2)?[endif]數(shù)據(jù)恢復(fù)
[if !supportLists](3)?[endif]系統(tǒng)日志