職工工資信息管理系統(tǒng)設計_第1頁
職工工資信息管理系統(tǒng)設計_第2頁
職工工資信息管理系統(tǒng)設計_第3頁
職工工資信息管理系統(tǒng)設計_第4頁
職工工資信息管理系統(tǒng)設計_第5頁
已閱讀5頁,還剩24頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

《綜合實驗》實驗報告實驗名稱___職工工資信息管理系統(tǒng)________學生專業(yè)_____網(wǎng)絡工程_________________學生學號____________學生姓名_____________________題目職工工資信息管理系統(tǒng)Ⅰ、需要處理的基礎抒抉職工基本信息:如工資卡號、身份證號、姓名、性別、年齡、工齡、部門、技術職稱、技術職稱編號、家庭電話號碼、手機號碼等。工資基礎信息:技術職稱編號、技術職稱、基本工資、職務工資、各種補助等。費用扣除信息:工資卡號、水費、電費、清潔費(5元/月)、閉路電視費(10/月)等。工資單數(shù)據(jù):工資卡號、姓名、應發(fā)工資、水費、電費、清潔費、閉路電視費、稅金、實發(fā)工資、特別獎勵。其中:稅金計算方法為:應發(fā)工資<1800元,稅金=0;1800<應發(fā)工資<3400,稅金=(應發(fā)工資-1800)*5%應發(fā)工資>3400元,稅金=(應發(fā)工資-3400)*10%Ⅱ、系統(tǒng)功能:(1)、各種基本數(shù)據(jù)的錄入。如:職工基本信息錄入。(2)、各種基本數(shù)據(jù)的修改。如:允許對以及錄入的數(shù)據(jù)重新進行編輯、修改。(3)、各種基本數(shù)據(jù)的插入。如:在工資基礎信息中插入一條新信息。(4)、各種基本數(shù)據(jù)的刪除。如:假設某員工調(diào)離,刪除該員工的相關信息等。(5)、基于各種數(shù)據(jù)的查詢。如:技術職稱為技術員的所有員工、基本工資在1000元以上的員工等。(6)、基于各種基本數(shù)據(jù)的統(tǒng)計計算Ⅲ、數(shù)據(jù)結構說明及舉例數(shù)據(jù)結構可以采用十字交叉鏈表,也允許輔之以其他鏈表來完成對系統(tǒng)基礎數(shù)據(jù)的完整描述。系統(tǒng)功能模塊結構圖職工工資信息管理系統(tǒng)職工工資信息管理系統(tǒng)載入模塊插入模塊統(tǒng)計模塊查找模塊刪除模塊修改模塊錄入模塊載入模塊插入模塊統(tǒng)計模塊查找模塊刪除模塊修改模塊錄入模塊 各模塊功能載入模塊(structworker*loadrec())根據(jù)data.txt文件中所保存的數(shù)據(jù)送到內(nèi)存中進行處理,此時可省略錄入信息的過程。錄入模塊(structworker*enterrec())對數(shù)據(jù)進行格式化,重新錄入所有員工的信息。修改模塊(voidchange(structworker*p1))根據(jù)用戶所提供的員工身份證號查找員工并重新輸入改員工的信息。插入模塊(voidnewrec(structworker*head))新建一個員工的信息,并把該員工放到數(shù)據(jù)鏈表的最后面。刪除模塊(structworker*delrec(structworker*head))根據(jù)用戶鎖提供的員工身份證號查找員工并刪除該員工的信息。查找模塊根據(jù)用戶的操作判斷用戶所需要查找的數(shù)據(jù)類型進行查找。統(tǒng)計模塊根據(jù)用戶的操作判斷用戶所需要統(tǒng)計的數(shù)據(jù)類型進行統(tǒng)計。四、實驗結果1、2、3、4、……五、體會以前也做過很多實驗,有時候覺得做實驗沒什么用,都是些小工具、小實驗。現(xiàn)在才發(fā)現(xiàn)原來大實驗是靠平時積累出來的,沒有寫過小實驗,怎么會懂得寫像這次綜合實驗一樣的大實驗呢!能寫出想職工工資信息管理系統(tǒng)這么“龐大”的實驗真的很有成就感。總結一句話:知識是日積月累的。由于時間比較趕,所以就實現(xiàn)了大部分的功能,還有小部分內(nèi)容有待完善,敬請老師諒解,謝謝!六、參考文獻①《C程序設計》譚浩強清華大學出版社②百度知道……附錄:程序清單(程序代碼)#include<stdio.h>#include<stdlib.h>#include<malloc.h>#include<string.h>#include"stdlib.h"#defineLENsizeof(structworker)structworker{ charcredit_num[20]; charid[20]; charname[10]; charsex[10]; intage; intworkage; chardepartment[20]; charposition[20]; intposition_num; chartelephone[9]; charmobilephone[12]; doublebasepay; doublepositionpay; doubleextrapay; doublewater_fare; doublepower_fare; doubleclean_fare; doubletv_fare; doublepay; doubletax; doublerealpay; doubleothers;structworker*next;};voidmenu()//菜單{ system("cls"); printf("********************\n"); printf("*職工工資信息管理系統(tǒng)*\n"); printf("********************\n"); printf("功能有限敬請諒解\n"); printf("如有雷同純屬巧合\n");printf("**********************************************\n");printf("**********************************************\n");printf("**0、退出編輯**\n"); printf("**1、數(shù)據(jù)錄入**\n");printf("**2、數(shù)據(jù)修改**\n");printf("**3、數(shù)據(jù)插入**\n");printf("**4、數(shù)據(jù)刪除**\n"); printf("**5、數(shù)據(jù)查詢**\n"); printf("**6、數(shù)據(jù)統(tǒng)計計算**\n"); printf("**任何情況下點擊右上角的叉叉圖標即可關閉**\n");printf("**********************************************\n");printf("**********************************************\n"); printf("請輸入所選擇的序號:");}structworker*enterrec()//錄入信息{ structworker*head,*p1,*p2; FILE*fp; system("cls"); p1=p2=(structworker*)malloc(LEN); head=p1; printf("\n\n請正確輸入職工基本信息:(本項信息沒有的用""0""代替)\n請輸入身份證號碼:");scanf("%s",p1->id); while(strcmp(p1->id,"0")!=0){printf("請輸入姓名:");scanf("%s",p1->name);printf("請輸入性別:");scanf("%s",p1->sex);printf("請輸入年齡:");scanf("%d",&p1->age);printf("請輸入工齡:");scanf("%d",&p1->workage);printf("請輸入部門:");scanf("%s",p1->department);printf("請輸入技術職稱:");scanf("%s",p1->position);printf("請輸入技術職稱編號:");scanf("%d",&p1->position_num);printf("請輸入工資卡號:");scanf("%s",p1->credit_num);printf("請輸入家庭電話號碼:");scanf("%s",p1->telephone);printf("請輸入手機號碼:");scanf("%s",p1->mobilephone);printf("請輸入基本工資:");scanf("%lf",&p1->basepay);printf("請輸入職務工資:");scanf("%lf",&p1->positionpay);printf("請輸入補助資金:");scanf("%lf",&p1->extrapay);printf("請輸入水費:");scanf("%lf",&p1->water_fare);printf("請輸入電費:");scanf("%lf",&p1->power_fare);printf("請輸入特別獎勵資金:");scanf("%lf",&p1->others); p1->clean_fare=5; p1->tv_fare=10; p1->pay=p1->basepay+p1->positionpay+p1->extrapay-p1->water_fare-p1->power_fare-p1->clean_fare-p1->tv_fare; if(p1->pay<=1800)p1->tax=0; elseif(p1->pay>1800&&p1->pay<=3400)p1->tax=(p1->pay-1800)*0.05; elsep1->tax=(p1->pay-3400)*0.1; p1->realpay=p1->pay-p1->tax+p1->others; p1=(structworker*)malloc(LEN); p2->next=p1; p2=p1; printf("請輸入下一個員工身份證號碼(若錄入結束輸入0即可!)"); scanf("%s",p1->id); } p2->next=NULL; fp=fopen("data.txt","at+"); p1=head; while(p1->next!=NULL){ fprintf(fp,"%s%s%s%d%d%s%s%d%s%s%s%.2f%.2f%.2f%.2f%.2f%.2f%.2f%.2f%.2f\n",p1->id,p1->name,p1->sex,p1->age,p1->workage,p1->department,p1->position,p1->position_num,p1->credit_num,p1->telephone,p1->mobilephone,p1->basepay,p1->positionpay,p1->extrapay,p1->water_fare,p1->power_fare,p1->others,p1->pay,p1->tax,p1->realpay); p1=p1->next;} fclose(fp); printf("錄入成功\n"); system("pause"); returnhead;}voidchange(structworker*p1)//修改{ charid[20]; system("cls"); printf("請輸入要編輯的員工身份證號:"); scanf("%s",id); while(p1->next!=NULL) { if(strcmp(p1->id,id)==0)break; elsep1=p1->next;} if(strcmp(p1->id,id)==0) { printf("\n\n請重新輸入該職工基本信息:\n請輸入身份證號碼:");scanf("%s",p1->id);printf("請重新輸入姓名:");scanf("%s",p1->name);printf("請重新輸入性別:");scanf("%s",p1->sex);printf("請重新輸入年齡:");scanf("%d",&p1->age);printf("請重新輸入工齡:");scanf("%d",&p1->workage);printf("請重新輸入部門:");scanf("%s",p1->department);printf("請重新輸入技術職稱:");scanf("%s",p1->position);printf("請重新輸入技術職稱編號:");scanf("%d",&p1->position_num);printf("請重新輸入工資卡號:");scanf("%s",p1->credit_num);printf("請重新輸入家庭電話號碼:");scanf("%s",p1->telephone);printf("請重新輸入手機號碼:");scanf("%s",p1->mobilephone);printf("請重新輸入基本工資:");scanf("%lf",&p1->basepay);printf("請重新輸入職務工資:");scanf("%lf",&p1->positionpay);printf("請重新輸入補助資金:");scanf("%lf",&p1->extrapay);printf("請重新輸入水費:");scanf("%lf",&p1->water_fare);printf("請重新輸入電費:");scanf("%lf",&p1->power_fare);printf("請重新輸入特別獎勵資金:"); scanf("%lf",&p1->others); p1->clean_fare=5; p1->tv_fare=10; p1->pay=p1->basepay+p1->positionpay+p1->extrapay-p1->water_fare-p1->power_fare-p1->clean_fare-p1->tv_fare; if(p1->pay<=1800)p1->tax=0; elseif(p1->pay>1800&&p1->pay<=3400)p1->tax=(p1->pay-1800)*0.05; elsep1->tax=(p1->pay-3400)*0.1; p1->realpay=p1->pay-p1->tax+p1->others; printf("修改成功\n");} elseprintf("找不到該員工\n"); system("pause");}voidwrite(structworker*head)//寫入{ system("cls"); structworker*p1; FILE*fp; fp=fopen("data.txt","wt+"); p1=head; while(p1->next!=NULL){ fprintf(fp,"%s%s%s%d%d%s%s%d%s%s%s%.2f%.2f%.2f%.2f%.2f%.2f%.2f%.2f%.2f\n",p1->id,p1->name,p1->sex,p1->age,p1->workage,p1->department,p1->position,p1->position_num,p1->credit_num,p1->telephone,p1->mobilephone,p1->basepay,p1->positionpay,p1->extrapay,p1->water_fare,p1->power_fare,p1->others,p1->pay,p1->tax,p1->realpay); p1=p1->next;} fclose(fp); printf("數(shù)據(jù)已成功保存在data.txt中!\n");}structworker*loadrec(){ FILE*fp;structworker*head,*p1,*p2; fp=fopen("data.txt","rt"); p1=p2=(structworker*)malloc(LEN); head=p1; while(!feof(fp)) { fscanf(fp,"%s%s%s%d%d%s%s%d%s%s%s%lf%lf%lf%lf%lf%lf%lf%lf%lf\n",p1->id,p1->name,&p1->sex,&p1->age,&p1->workage,p1->department,p1->position,&p1->position_num,p1->credit_num,&p1->telephone,p1->mobilephone,&p1->basepay,&p1->positionpay,&p1->extrapay,&p1->water_fare,&p1->power_fare,&p1->others,&p1->pay,&p1->tax,&p1->realpay); p1=(structworker*)malloc(LEN); p2->next=p1; p2=p1; } p1->next=NULL; returnhead;}voidnewrec(structworker*head)//插入{ system("cls"); structworker*p1,*p2; p1=head; while(p1->next!=NULL) p1=p1->next; p2=(structworker*)malloc(LEN); p2->next=NULL; p1->next=p2; p2=p1; printf("\n\n請輸入新職工基本信息:\n請輸入身份證號碼:");scanf("%s",p1->id);printf("請輸入姓名:");scanf("%s",p1->name);printf("請輸入性別:");scanf("%s",p1->sex);printf("請輸入年齡:");scanf("%d",&p1->age);printf("請輸入工齡:");scanf("%d",&p1->workage);printf("請輸入部門:");scanf("%s",p1->department);printf("請輸入技術職稱:");scanf("%s",p1->position);printf("請輸入技術職稱編號:");scanf("%d",&p1->position_num);printf("請輸入工資卡號:");scanf("%s",p1->credit_num);printf("請輸入家庭電話號碼:");scanf("%s",p1->telephone);printf("請輸入手機號碼:");scanf("%s",p1->mobilephone);printf("請輸入基本工資:");scanf("%lf",&p1->basepay);printf("請輸入職務工資:");scanf("%lf",&p1->positionpay);printf("請輸入補助資金:");scanf("%lf",&p1->extrapay);printf("請輸入水費:");scanf("%lf",&p1->water_fare);printf("請輸入電費:");scanf("%lf",&p1->power_fare);printf("請輸入特別獎勵資金:"); scanf("%lf",&p1->others); p1->clean_fare=5; p1->tv_fare=10; p1->pay=p1->basepay+p1->positionpay+p1->extrapay-p1->water_fare-p1->power_fare-p1->clean_fare-p1->tv_fare; if(p1->pay<=1800)p1->tax=0; elseif(p1->pay>1800&&p1->pay<=3400)p1->tax=(p1->pay-1800)*0.05; elsep1->tax=(p1->pay-3400)*0.1; p1->realpay=p1->pay-p1->tax+p1->others; printf("插入信息成功\n"); system("pause");}structworker*delrec(structworker*head)//刪除{ system("cls"); structworker*p1,*p2; charstr[20]; p1=head; p2=NULL; printf("請輸入要刪除職工的身份證號:"); scanf("%s",str); while(p1->next!=NULL) { if(strcmp(p1->id,str)==0)break; else p2=p1; p1=p1->next;} if(p1->next==NULL&&(strcmp(p1->id,str)!=0))printf("找不到該員工\n"); elseif(p2==NULL){p1=p1->next;head=p1;printf("刪除成功!\n");} else{p2->next=p1->next;printf("刪除成功!\n");}system("pause"); returnhead;}voidsearch1(structworker*head){ system("cls"); structworker*p1; p1=head; printf("技術職稱為技術員的所有員工身份證號:\n"); while(p1!=NULL) { if(strcmp(p1->position,"技術員")==0){printf("%s\n",p1->id);p1=p1->next;} elsep1=p1->next;} system("pause");}voidsearch2(structworker*head){ system("cls"); structworker*p1; p1=head; printf("基本工資在1000元以上的員工身份證號:\n"); while(p1!=NULL) { if(p1->basepay>=1000){printf("%s\n",p1->id);p1=p1->next;} elsep1=p1->next;} system("pause");}voidmenu1(structworker*head){ system("cls"); intn; printf("**1、查詢技術職稱為技術員的所有員工\n");printf("**2、查詢基本工資在1000元以上的員工\n");printf("請輸入所選擇的序號:"); scanf("%d",&n); switch(n) { case1:search1(head);break; case2:search2(head);break; default:printf("輸入有誤,請退出重新輸入\n");system("pause");}}voidstatistic1(structworker*head){ structworker*p1; intn=0; p1=head; while(p1!=NULL) { if(p1->age<=20){n++;p1=p1->next;} elsep1=p1->next;} printf("年齡20歲以下青年員工數(shù):%d\n",n-1); system("pause");}voidstatistic2(structworker*head){ structworker*p1; intn=0; p1=head; while(p1!=NULL) { if(p1->age>20&&p1->age<=45){n++;p1=p1->next;} elsep1=p1->next;} printf("年齡20歲以上,45歲以下的員工數(shù):%d\n",n); system("pause");}voidstatistic3(structworker*head){ structworker*p1; intn=0; p1=head; while(p1!=NULL) { if(p1->age>=55){n++;p1=p1->next;} elsep1=p1->next;} printf("年齡55歲以上退休員工數(shù):%d\n",n); system("pause");}voidmenu2(structworker*head){ system("cls"); intn; printf("**1、計算年齡20歲以下青年員工數(shù)\n");printf("**2、年齡20歲以上,45歲以下的員工數(shù)\n"); printf("**3、年齡55歲以上退休員工數(shù)\n"); printf("請輸入所選擇的序號:"); scanf("%d",&n); switch(n) { case1:statistic1(head);break; case2:statistic2(head);break; case3:statistic3(head);break; default:printf("輸入有誤,請退出重新輸入\n");system("pause");}}main(){ system("color0A"); intn; structworker*head=NULL; menu(); head=loadrec(); scanf("%d",&n); while(n!=0) {switch(n) { case1:head=enterrec();break; case2:change(head);break; case3:newrec(head);break; case4:head=delrec(head);break; case5:menu1(head);break; case6:menu2(head);break; case0:return0; default:printf("輸入有誤,請退出重新進入!");} write(head); menu(); scanf("%d",&n); } system("cls"); printf("謝謝使用!\n"); return0;}目錄TOC\o"1-2"\h\z\u第一章總論 1第一節(jié)項目背景 1第二節(jié)項目概況 2第二章項目建設必要性 5第三章市場分析與建設規(guī)模 7第一節(jié)汽車市場需求分析 7第二節(jié)市場預測 12第三節(jié)項目產(chǎn)品市場分析 13第四節(jié)建設規(guī)模 16第四章場址選擇 17第一節(jié)場址所在位置現(xiàn)狀 17第二節(jié) 場址建設條件 17第五章技術方案、設備方案、工程方案 22第一節(jié)技術方案 22第二節(jié)設備方案 28第三節(jié)工程方案 33第六章原材料、燃料供應 38第七章總圖布置與公用輔助工程 39第一節(jié)總圖布置 39第二節(jié)公用輔助工程 43第八章環(huán)境影響評價 52第一節(jié)環(huán)境保護設計依據(jù) 52第二節(jié)項目建設和生產(chǎn)對環(huán)境的影響 52第三節(jié)環(huán)境保護措施 54第四節(jié)環(huán)境影響評價 56第九章勞動安全衛(wèi)生與消防 57第一節(jié)勞動安全衛(wèi)生 57第二節(jié)消防

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論