




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、課程設計報告題目:礦井生產及人員管理系統專業:網絡工程班級:姓名:學號:13級目 錄錯誤!未定義書簽。 引言.1管理系統的分析 . 12.12.2 可行性分析 . 1 需求分析 . 23 系統詳細設計與實現 . 23.1 數據庫設計 . 23.1.1 數據需求 . 33.1.2 關系模式 . 33.1.3 E-R圖 . 33.1.4 數據流程圖.83.1.5 數據字典. .93.2 系統功能模塊設計 . 103.3 數據初始化.124 系統測試 . 184.1 模塊測試 . 184.2 整體測試 . 194.3 測試結果 . 225 附件. 225.1 數據庫創建代碼.22錯誤!未定義書簽。5
2、.2程序設計代碼.246 結論 . 321.引言1.1設計背景近年來,隨著因特網技術的飛速發展,以及人們的生活方式、生產活動的日新月異,計算機應用已滲透到各個領域。目前,我國的礦井生產及人員管理活動龐雜、瑣碎,嚴重時甚至出現了多次礦井爆炸、塌陷等事故。這與相關制度的不完善,管理者的疏忽,人員雇傭的專業程度都密切相關。基于此問題,有必要建立一個礦井生產及人員管理系統,使礦井生產工作規范化、程序化、系統化,避免人員在生產過程中的隨意性。并提高信息處理交流的準確性,能夠及時、準確有效的查詢人員在職和生產進程的情況。全面提高礦井生產的制度化,人員工作高效化,以及礦井活動的安全化。基本實現了簡單實用的礦
3、井生產及人員管理。1.2設計目標1. 掌握計算機管理信息系統設計的一般方法,主要包括系統分析、系統設計的組織和實施。2.關系型數據庫管理系統的編程技術,并能獨立完成一般小系統的程序設計、調試運行等工作。3.培養把所學知識運用到具體對象,并能求出解決方案的能力。1.礦井生產及人員管理系統的分析2.1可行性分析本系統設計運行在Windows 7平臺上,以SQL Server 作為后臺數據庫開發工具,分析并設計“礦井生產及人員管理系統”。系統軟件和對數據庫的操作都可在計算機上完成,擁有技術可行性。隨著計算機技術的不斷發展,計算機作為知識經濟時代的產物,已被廣泛應用于社會各個行業和領域。本系統具有人員
4、的查詢、生產流程查詢等功能,系統安全穩定比起他們以前對信息管理的主要方式是基于文本、表格等紙介質的手工處理,對于工人工作情況的統計和核實等往往采用人工檢查進行.數據信息處理工作量大,容易出錯;由于數據繁多,容易丟失,且不易查找。更能適合當今社會的發展和滿足客戶的需求。2.2需求分析1為了保證系統能夠長期、安全、穩定、可靠、高效的運行,礦井生產及人員管理系統應滿足以下的性能需求:1、系統處理的準確性和及時性系統處理的準確性和及時性是系統的必要性能。在系統設計和開發過程中,要充分考慮系統當前和將來可能承受的工作量,使系統的處理能力和響應時間能夠滿足學校對信息處理的需求。2、系統的易用行和易維護性礦
5、井生產及人員管理系統是直接面對使用人員的,而使用人員往往對計算機并不是非常熟悉。就要求系統提供良好的用戶接口,易用的人機交互界面。實現這一點,就要求系統盡量使用用戶熟悉的術語和中文信息的界面:針對用戶應該使用簡單的界面使用戶便于理解和掌握。3、系統的先進性目前計算機系統的技術發展相當快的時代,因此圖書管理系統工程,在系統的生命周期盡量做到系統先進,充分完成企業信息處理的要求而不至于落后。這一方面通過系統的開發性和可擴充性,不斷改善系統功能完成。另一方面,在系統設計和開發過程中,應考慮在成本的基礎上盡量采用當前主流并且具有良好發展前途的產品。4.系統的響應速度礦井生產及人員管理系統在日常處理中的
6、速度為秒級,達到實時要求。在進行數據統計分析時,根據所需數據量的不同而從秒級到分級,原則是保證操作人員不會因為速度的問題而影響工作效率。3. 系統詳細設計與實現3.1 數據庫設計23.1.1數據需求礦井生產及人員管理系統需要完成功能主要有:1. 礦井工作人員基本信息的輸入,包括姓名、性別、工號、年齡、職務、電話號碼2. 礦井工作人員基本信息的查詢、修改,包括工人姓名、性別、工號、電話號碼等3. 礦井生產過程信息的輸入,包括類別名稱、所需人數、所需工號4. 礦井生產過程信息的查詢、修改,包括類別名稱、所需人數、所需工號5. 上工信息的輸入,包括工號、到達時間6. 上工信息的查詢、修改,包括工號、
7、到達時間7. 下工信息的輸入,包括工號、返回時間8. 下工信息的查詢、修改,包括工號、返回時間9. 缺勤信息的輸入,包括工號、到達時間、返回時間10. 缺勤信息的查詢、修改,包括工號、到達時間、返回時間3.1.2關系模式(一)礦井工作人員 (姓名,性別,工號,年齡,職務,電話號碼)(二)礦井生產過程 (類別名稱,所需人數,所需工號)(三)上工 (工號,到達時間)(四)下工 (工號,返回時間)(五)缺勤 (工號,到達時間,返回時間)3.1.3 E-R圖根據所要實現的功能設計,可能建立它們之間的關系,進而實現邏輯結構功能。 礦井生產及人員管理系統可以劃分的實體有:生產過程類別實體、工作人員信息實體
8、、上工信息實體、下工信息實體、缺勤信息實體。用E-R圖一一描述這些實體。(一) 生產過程類別實體E-R圖:3(二) 工作人員信息實體E-R圖:4(三)上工信息實體E-R圖:(四)下工信息實體E-R圖:5(五)缺勤信息實體E-R圖:(六) 總的信息實體E-R圖:63.1.4數據流程圖783.1.5數據字典表2-1 system_production 生產流程信息表表2-2 worker_information 工人信息表表2-3 start_record 上工信息表表2-4 close_record 下工信息表9表2-5 absence_record 缺勤信息表3.2系統功能模塊設計3.2.1創
9、建數據庫 USE master goCREATE DATABASE mineproductionmsg ON (NAME=productionsystem,FILENAME=d:mineproduction.mdf, SIZE=10,MAXSIZE=50, FILEGROWTH=5 )LOG ON (NAME=mine,FILENAME=d:mineproductionsystem.idf, SIZE=5MB,MAXSIZE=25MB, FILEGROWTH=5MB ) Go103.2.2 礦井工人信息表建立Create table worker_ information(Wnumber ch
10、ar (30) Not null primary key,Wname varchar (10) Not null,Wsex char(2) Not null CHECK (sex in (男,女),Wage int Not null CHECK (age>0),Job varchar (10) Not null,Telephone char(30)Not null)3.2.3 礦井生產流程表建立Create table system_production(Pname varchar(30) Not null primary key,Wnumber char(50) Not null,No
11、p char(10) Not null,Foreign key (wnumber) references worker_information(wnumber)3.2.4 上工記錄表建立Create table start_record(Wnumber char (30) Not null primary key,Arrivedate datetime Not null,Foreign key (wnumber) references worker_information(wnumber) )3.2.5下工記錄表建立Create table close_record(Wnumber char
12、(30) Not null primary key,Leavedate datetime Not null,Foreign key (wnumber) references worker_information(wnumber) )113.2.6 缺勤記錄表建立Create table absence_record(Wnumber char(30) Not null primary key,Arrivedate datetime Not null,Leavedate datetime Not null,Foreign key (wnumber) references worker_inform
13、ation(wnumber) )3.3 數據初始化3.3.1將工人信息加入表worker_information中InsertInto worker_information(wnumber,wname,wage,wsex,job,telephone) Values(201355555001,吳偉,35,男,工人,0000001)InsertInto worker_information(wnumber,wname,wage,wsex,job,telephone) Values(201355555002,王鵬,43,男,工人,0000002)InsertInto worker_informati
14、on(wnumber,wname,wage,wsex,job,telephone) Values(201355555003,劉曉東,36,男,工人,0000003)InsertInto worker_information(wnumber,wname,wage,wsex,job,telephone) Values(201355555004,沈明,38,男,工人,0000004)InsertInto worker_information(wnumber,wname,wage,wsex,job,telephone) Values(201355555005,張磊,35,男,工人,0000005)In
15、sertInto worker_information(wnumber,wname,wage,wsex,job,telephone) Values(201355555006,王亞新,40,男,組長,0000006)12InsertInto worker_information(wnumber,wname,wage,wsex,job,telephone) Values(201355555007,周曉麗,33,女,工人,0000007)InsertInto worker_information(wnumber,wname,wage,wsex,job,telephone) Values(201355
16、555008,張少平,35,男,工人,0000008)InsertInto worker_information(wnumber,wname,wage,wsex,job,telephone) Values(201355555009,劉思銘,37,男,工人,0000009)InsertInto worker_information(wnumber,wname,wage,wsex,job,telephone) Values(201355555010,陳東,35,男,組長,0000010)InsertInto worker_information(wnumber,wname,wage,wsex,jo
17、b,telephone) Values(201355555011,鄭子元,30,男,工人,0000011)InsertInto worker_information(wnumber,wname,wage,wsex,job,telephone) Values(201355555012,徐太宇,35,男,工人,0000012)InsertInto worker_information(wnumber,wname,wage,wsex,job,telephone) Values(201355555013,張世龍,39,男,工人,0000013)InsertInto worker_information
18、(wnumber,wname,wage,wsex,job,telephone) Values(201355555014,吳市方,35,女,工人,0000014)InsertInto worker_information(wnumber,wname,wage,wsex,job,telephone) Values(201355555015,陶敏,32,女,工人,0000015)InsertInto worker_information(wnumber,wname,wage,wsex,job,telephone) Values(201355555016,吳科,35,男,工人,0000016)13In
19、sertInto worker_information(wnumber,wname,wage,wsex,job,telephone) Values(201355555017,王易,34,男,組長,0000017)InsertInto worker_information(wnumber,wname,wage,wsex,job,telephone) Values(201355555018,胡強,35,男,工人,0000018)3.3.2 將生產流程類別加入表system_production中Insertinto system_production (pname , wnumber , nop)
20、Values(礦井巷道布置,20135555001 20135555002,2)Insertinto system_production (pname , wnumber , nop)Values(生產運輸系統,20135555003 20135555004 20135555006,4)Insertinto system_production (pname , wnumber , nop)Values(監測監控系統,20135555007 20135555008,2)Insertinto system_production (pname , wnumber , nop)Values(通風系統,
21、20135555009 20135555010,2)Insertinto system_production (pname , wnumber , nop)Values(供排水系統,20135555011 ,1)Insertinto system_production (pname , wnumber , nop)Values(防塵系統,20135555012 20135555013,2)Insertinto system_production (pname , wnumber , nop)Values(通信、工業電視系統,20135555014 20135555015,2) 14 20135
22、555005Insertinto system_production (pname , wnumber , nop)Values(壓風、抽放瓦斯系統,20135555016 20135555017,2)Insertinto system_production (pname , wnumber , nop)Values(避災救災系統,20135555018 ,1)3.3.3 將工人上工信息加入表start_record中,同時將缺勤的到達數間置0*/ Insertinto start_record(wnumber,arrivedate)values(20135555001,2015-06-05
23、7:45)update absence_recordset arrivedate=0Where wnumber=20135555001 and arrivedate=1Insertinto start_record(wnumber,arrivedate)values(20135555002,2015-06-05 7:55)update absence_recordset arrivedate=0Where wnumber=20135555002 and arrivedate=1Insertinto start_record(wnumber,arrivedate)values(201355550
24、03,2015-06-05 7:33)update absence_recordset arrivedate=0Where wnumber=20135555003 and arrivedate=1Insertinto start_record(wnumber,arrivedate)values(20135555004,2015-06-05 7:45)update absence_recordset arrivedate=0Where wnumber=20135555004 and arrivedate=115Insertinto start_record(wnumber,arrivedate)
25、 values(20135555005,2015-06-05 7:35) update absence_recordset arrivedate=0Where wnumber=20135555005 and arrivedate=1Insertinto start_record(wnumber,arrivedate) values(20135555006,2015-06-05 7:53) update absence_recordset arrivedate=0Where wnumber=20135555006 and arrivedate=1Insertinto start_record(w
26、number,arrivedate) values(20135555007,2015-06-05 7:39) update absence_recordset arrivedate=0Where wnumber=20135555007 and arrivedate=1Insertinto start_record(wnumber,arrivedate) values(20135555008,2015-06-05 8:15) update absence_recordset arrivedate=0Where wnumber=20135555008Insertinto start_record(
27、wnumber,arrivedate) values(20135555009,2015-06-05 7:45) update absence_recordset arrivedate=0Where wnumber=20135555009 and arrivedate=116Insertinto start_record(wnumber,arrivedate) values(20135555010,2015-06-05 7:41) update absence_recordset arrivedate=0Where wnumber=20135555010 and arrivedate=1Inse
28、rtinto start_record(wnumber,arrivedate) values(20135555011,2015-06-05 7:43) update absence_recordset arrivedate=0Where wnumber=20135555011 and arrivedate=1Insertinto start_record(wnumber,arrivedate) values(20135555012,2015-06-05 8:30) update absence_recordset arrivedate=0Where wnumber=20135555012Ins
29、ertinto start_record(wnumber,arrivedate) values(20135555013,2015-06-05 7:34) update absence_recordset arrivedate=0Where wnumber=20135555013 and arrivedate=1Insertinto start_record(wnumber,arrivedate) values(20135555014,2015-06-05 7:35) update absence_recordset arrivedate=0Where wnumber=20135555014 a
30、nd arrivedate=117Insertinto start_record(wnumber,arrivedate)values(20135555015,2015-06-05 7:45)update absence_recordset arrivedate=0Where wnumber=20135555015 and arrivedate=1Insertinto start_record(wnumber,arrivedate)values(20135555016,2015-06-05 7:52)update absence_recordset arrivedate=0Where wnumb
31、er=20135555016 and arrivedate=1Insertinto start_record(wnumber,arrivedate)values(20135555017,2015-06-05 8:25)update absence_recordset arrivedate=0Where wnumber=20135555017Insertinto start_record(wnumber,arrivedate)values(20135555018,2015-06-05 7:35)update absence_recordset arrivedate=0Where wnumber=
32、20135555018 and arrivedate=14. 系統測試4.1 模塊測試本系統的模塊測試是與系統開發的過程中同步進行。主要用于檢測各個功能模塊的數據庫操作是否規范是否滿足系統需求,代碼編寫是否規范,程序是否可以正常運行,運行結果是否可以達到預期效果等等。184.2 整體測試(一)用戶登錄界面(二)工人信息表查詢19(三)刪除工人信息(四)添加工人信息20(五)生產流程信息查詢(六)工人出勤信息查詢214.3 測試結果經過對系統整體功能的測試,本系統順利運行且功能結構清晰、運行正常。系統功能可以滿足用戶的需求,數據庫設計可以滿足系統需求,數據處理正常。且能夠正常投入礦井生產使用。5
33、.附件5.1數據庫創建代碼創建數據庫USE mastergoCREATE DATABASE mineproductionmsgON(NAME=productionsystem,FILENAME=d:mineproduction.mdf,SIZE=10,MAXSIZE=50,FILEGROWTH=5)LOG ON(NAME=mine,FILENAME=d:mineproductionsystem.idf,SIZE=5MB,MAXSIZE=25MB,FILEGROWTH=5MB)Go礦井工人信息庫Create table worker_ information(Wnumber char (30)
34、Not null primary key,Wname varchar (10) Not null,Wsex char(2) Not null CHECK (sex in (男,女),Wage int Not null CHECK (age>0),Job varchar (10) Not null,Telephone char(30)Not null)22礦井生產流程信息庫Create table system_production(Pname varchar(30) Not null primary key,Wnumber char(50) Not null,Nop char(10) N
35、ot null,Foreign key (wnumber) references worker_information(wnumber)上工記錄信息庫Create table start_record(Wnumber char (30) Not null primary key,Arrivedate datetime Not null,Foreign key (wnumber) references worker_information(wnumber) )下工記錄信息庫Create table close_record(Wnumber char (30) Not null primary k
36、ey,Leavedate datetime Not null,Foreign key (wnumber) references worker_information(wnumber) )缺勤記錄信息庫Create table absence_record(Wnumber char(30) Not null primary key,Arrivedate datetime Not null,Leavedate datetime Not null,Foreign key (wnumber) references worker_information(wnumber)5.2 程序設計代碼#includ
37、e< stdio.h>#include< stdlib.h>23#include< conio.h>int INDEX32;struct workerint num;char name21;int age;int sex;int job;int number;int telephone;int arrivetime;int leavetime;workers32;void page_title(char *menu_item)printf(" n =>>> 礦井生產及人員管<<<= nn %s nn",
38、menu_item);/void return_confirm(void)printf("n按任意鍵返回.n");getch();/24 理 系 統void worker_new(void)int n;page_title("錄入工人基本信息"); for(n=0;n<32;n+)if(workersn.num=0) break;printf("工號:");scanf("%d",&workersn.num);printf("姓名:");scanf("%s",&a
39、mp;);printf("年齡:");scanf("%d",&workersn.age);printf("性別:");scanf("%d",&workersn.sex);printf("職務:");scanf("%d",&workersn.job);printf("電話號碼:");scanf("%d",&workersn.telephone);return_confirm();/
40、int search_num(void)int n,i;printf("請輸入工人工號:");scanf("%d",&i);for(n=0;n<12;n+)if(workersn.num=i&&workersn.num!=0) 25printf("工號:%dn",workersn.num);printf("姓名:%sn",);printf("年齡:%dn",workersn.age);printf("性別:%dn",wo
41、rkersn.sex);printf("職務:%dn",workersn.job);printf("電話號碼:%dn",workersn.telephone);return n;printf("n輸入錯誤或不存在.n");return -1;/ /void worker_del(void)int n;page_title("刪除工人基本信息");if(n=search_num()!=-1) workersn.num=0;printf("n!已注銷.n");return_confirm();/vo
42、id worker_edit(void)int n;page_title(" =編輯工人基本信息="); if(n=search_num()!=-1)26printf("n請重新輸入新信息:n工號:");scanf("%d",&workersn.num);printf("姓名:");scanf("%s",&);printf("年齡:");scanf("%d",&workersn.age);printf(&q
43、uot;性別:");scanf("%d",&workersn.sex);printf("職務:");scanf("%d",&workersn.job);printf("電話號碼:");scanf("%d",&workersn.telephone);return_confirm();/void score_input(void)int s,n,t;page_title(" =錄入上下工信息=");printf("n請用數字鍵選擇項目n
44、>>>>>>1-到達時間 2-離開時間 <<<<<<n");scanf("%d",&s);for(n=0;n<12;n+)if(workersn.num!=0)printf("n工號:%d 姓名:%s >>>此項數據為:",workersn.num,); scanf("%d",&t);switch(s)27case 1 : workersn.arrivetime=t;break;case
45、2 : workersn.leavetime=t;break;return_confirm();/void score_edit(void)int n;page_title(" >>>>>>修改<<<<<< ");if(n=search_num()!=-1)printf("到達時間:%d 返回時間:%d n",workersn.arrivetime,workersn.leavetime); printf("n請重新輸入:n到達時間:");scanf("%
46、d",&workersn.arrivetime);printf("返回時間:");scanf("%s",&workersn.leavetime);return_confirm();/void sort_it(char nn)int n,m,p,x,t12;for(n=0;n<12;n+)28switch(nn)case '1' : tn=workersn.num;break;case '2' : tn=workersn.arrivetime;break; case '3' : tn=workersn.leavetime;break;for(n=0;n<12;n+)x=0;p=-1;for(m=0;m<12;m+)if(tm>x)x=tm;p=m;tp=-1;INDEXn=p;void browser(void)int n,x;char k;sort_it('1');while(1)29page_title(" =瀏覽=");printf("按數字鍵選擇排序方式或按 0 返回n");printf("工號t姓名t年齡t到達時間st返回時間sn
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 新房購房合同樣本
- 2025年設備借款合同樣本下載:獲取借款合同范本
- 《叫賣藝術》課件
- 2025年質權擔保合同適用于地產房產
- 《常見受限物質概述》課件
- 《中學教學原則》課件
- 2025年工程合同無效后的工程款項結算探討
- 2025年有償使用辦公樓合同書
- 南網安全生產禁令解讀與實施
- Unit 9 Section B 1a-1d 教案2023-2024學年八年級英語下冊同步教學(人教版)
- 2025年江蘇省徐州市銅山區中考一模道德與法治試題(原卷版+解析版)
- 制造業自檢自控流程優化計劃
- 《人工智能的進展》課件
- 風濕免疫病患者結核病診治及預防實踐指南(2025版)解讀課件
- 大建安-大連市建筑工程安全檔案編制指南
- 上海2024-2025學年五年級數學第二學期期末聯考模擬試題含答案
- GB/T 45421-2025城市公共設施非物流用智能儲物柜服務規范
- 北京市豐臺區2025屆高三一模試卷語文試題(含答案)
- 安徽省合肥市高三下學期第二次教學質量檢測數學試卷(含答案)
- 2025年河南工業貿易職業學院單招職業傾向性測試題庫往年題考
- PE特種設備焊工理論復習題庫(帶解析)
評論
0/150
提交評論