




已閱讀5頁,還剩28頁未讀, 繼續(xù)免費閱讀
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
數(shù)據(jù)庫原理及應用課程設計報告題目: 考勤管理系統(tǒng) -課程設計報告 所在學院: 信息工程學院 班 級: 計科1001 學 號: 101304127 姓 名: 徐軍 指導教師: 陳才扣 2012年1月4日目錄一、 概述二、需求分析三、概念設計四、邏輯設計五、系統(tǒng)實現(xiàn)六、小結33 / 33一、概述1.1系統(tǒng)開發(fā)的背景與意義1.1.1系統(tǒng)開發(fā)背景現(xiàn)在不論哪個企業(yè),都要進行考勤,考勤管理系統(tǒng)利用計算機管理考勤工作, 提高工作效率,一些企業(yè)在考勤管理方面用了大量的人力和財力,不說準確度和可信度如何,其效率很低,而且容易出錯,不利于管理。所以人工考勤已經很難再滿足企業(yè)規(guī)范化管理的要求,隨著數(shù)據(jù)庫技術的發(fā)展和企業(yè)信息化建設的進行,使用計算機管理考勤成為一種主流趨勢,它不僅為企業(yè)減少了人力財力的付出,而且也大大減輕了考勤工作人員的工作量。對于員工們的出勤率有個明顯的記錄,對于公司的職員也有基本了解根據(jù)出勤情況可以計算員工的實際工資。本文系統(tǒng)的闡述了企業(yè)考勤管理設計開發(fā)的全過程。包括系統(tǒng)需求調查分析,概念結構設計,邏輯結構設計等部分。1.1.2系統(tǒng)開發(fā)意義開發(fā)本系統(tǒng)的目的,就是要解決目前企業(yè)中關于員工出勤管理中所面臨的一系列問題。 考勤系統(tǒng)進行企業(yè)管理越來越適應企業(yè)的需要,集信息的輸入,顯示,修改,刪除等各種處理,信息維護方便,給公司可以帶來很大的便利。開發(fā)出企業(yè)考勤管理系統(tǒng)能有效地提高企業(yè)辦事效率,解決目前員工出勤管理問題,實現(xiàn)員工請出勤信息和缺勤信息對企業(yè)領導透明,使管理人員及時把握員工的情況,及時與員工溝通,提高生產質量。二、需求分析作為一個考勤系統(tǒng)最重要的功能當數(shù)考勤了也就是能夠將員工上班簽到的日期與時間記錄下來。當然記錄下簽到信息后,應該具有其他的輔助功能比II1查詢員工某天的簽到情況”、”修改簽到情況”、”員工的維護”、”公司上班時間的設置”等下面就本系統(tǒng)完成的功能做一個簡單的需求分析。2.1系統(tǒng)功能要求2.1.1功能劃分(1)記錄每個員工每天所有進入公司的時刻和離開公司的時刻。(2)每天結束時自動統(tǒng)計當天的工作時間(3)每天結束時自動統(tǒng)計當天遲到或早退的次數(shù)。(4)對于彈性工作制,每天結束時自動統(tǒng)計當月的工時,并自動算出當月欠缺或富余的時間(5)每個月末統(tǒng)計該月的工作時間判斷是否足夠(6)每個月末統(tǒng)計該月的工作天數(shù)并判斷是否足夠(7)管理人員查詢并修改工作時間(特殊情況下修改)(8)管理人員賬戶管理(如設置密碼等)(9)管理人員設定早退及遲到的條件,每個月的工作時間(10)管理人員設定每個月的工作日期及放假日期1.1.2 功能描述實際的管理和記錄工作非常需要快速獲知各個部門員工的每日出勤情況,以便于及時向高層管理者反映員工的出勤,缺勤情況。目前,由于負責考勤的員工,工作任務比較多,而且還都是重復數(shù)據(jù),讓工作者沒有辦法及時的向上報告。工作問題不能及時處理。針對以上的情況,我們提出企業(yè)考勤管理系統(tǒng),實現(xiàn)網上考勤任務,以減輕考勤人員的工作量。我公司準備開發(fā)員工考勤管理系統(tǒng),完成員工基本信息維護、企業(yè)的部門信息維護、企業(yè)基本考勤類型的維護、員工考勤的管理、員工考勤的查詢與分析。實現(xiàn)人事考勤的需要,包括員工遲到、早退的情況的記錄,在每個月底計算工資對員工和對員工進行績效評估的時候,對員工整個月的考勤記錄進行查詢和統(tǒng)計。2.2性能需求此工資管理系統(tǒng)對工資數(shù)據(jù)精度的計算能在默認情況之下精確到小數(shù)點后3位小數(shù),即是精確到分的計算。但在用戶使用過程中,能自行根據(jù)實際情況進行小數(shù)計算精度的設定,最大能允許保留小數(shù)點后5位的精度。在時間特性上,當用戶發(fā)出命令請求時的服務器的響應時間、對數(shù)據(jù)更新處理、工資數(shù)據(jù)的查詢檢索等上,同樣要求系統(tǒng)響應時間不會超過0.5秒時間。系統(tǒng)支持多種操作系統(tǒng)的運行環(huán)境,多不同操作系統(tǒng),不同文件格式的磁盤上的數(shù)據(jù)均能實現(xiàn)信息的互通,及共享。2.3系統(tǒng)層次劃分考勤系統(tǒng)管理管理系統(tǒng)整合系統(tǒng)考勤系統(tǒng)記錄時刻統(tǒng)計工作時間統(tǒng)計工時統(tǒng)計遲到早退次數(shù)判斷工作時間足夠判斷工作天數(shù)足夠查詢修改工作時間設置密碼設定遲到早退條件設定工作放假日期2.4數(shù)據(jù)流圖頂層數(shù)據(jù)流圖數(shù)據(jù)庫操作操作數(shù)據(jù)系統(tǒng)操作管理信息考勤信息進入基本界面職工信息配置管理 管理員登陸員工考勤管理系統(tǒng) 帳號和 核對密碼 查詢考勤統(tǒng)計 考勤統(tǒng)計 密碼 錄入進出情況錄入遲到情況錄入早退情況錄入工作時間情況刷卡員工進出時間信息 數(shù)據(jù)統(tǒng)計考勤管理分析數(shù)據(jù)進出記錄 遲到記錄早退記錄 時間記錄統(tǒng)計所有記錄的信息月度考勤統(tǒng)計管理員 工作日期及放假日期2.5數(shù)據(jù)字典(1),數(shù)據(jù)項描述數(shù)據(jù)項別名類型長度取值范圍 員工工號Snochar90000000至9999999員工姓名Snamechar10員工性別Ssexchar1“男”或“女”入職時間enter_timechar2000至2050員工年齡Sagesmallint20至70職位positionChar10數(shù)據(jù)項描述表(2)數(shù)據(jù)結構描述數(shù)據(jù)結構說明組成員工信息是考勤管理子系統(tǒng)的主體數(shù)據(jù)結構,定義了一個員工的有關信息員工編號,員工姓名,員工性別,出生日期,職位,密碼部門信息是考勤管理子系統(tǒng)的主體數(shù)據(jù)結構,定義了一個部門的有關信息部門編號,部門名稱數(shù)據(jù)結構描述(3)數(shù)據(jù)流描述數(shù)據(jù)流說明數(shù)據(jù)流來源數(shù)據(jù)流去向組成核對密碼根據(jù)不同人員相應的權限登錄時的信息考勤管理系統(tǒng)管理員的帳號密碼與普通員工的帳號密碼完整的考勤數(shù)據(jù)員工的考勤數(shù)據(jù)月度考勤統(tǒng)計工資評估月度考勤編號、員工編號、日期、累計正常工作時間遲到次數(shù)、早退次數(shù)、曠工次數(shù)數(shù)據(jù)流描述(4)數(shù)據(jù)存儲數(shù)據(jù)存儲說明流入數(shù)據(jù)流流出數(shù)據(jù)流組成存取方式月度考勤統(tǒng)計記錄員工每月的考勤情況一個月的信息統(tǒng)計統(tǒng)計好的考勤數(shù)據(jù)月度考勤編號、員工編號、日期、正常工作時間、遲到次數(shù)、早退次數(shù)、曠工次數(shù)更新,順序檢索數(shù)據(jù)存儲三、概念設計入職時間3.1概念模型員 工員工號員工姓名職 位密 碼員工年齡員工性別員工屬性圖管理員號性 別管理員姓 名年 齡管理員屬性圖員工姓名員工號入職時間密 碼員 工員工性別職 位員工年齡每天工作時間 m記錄上班的時 間下班的時 間管理員號姓 名 n統(tǒng)計 管理員剩余的時間 n遲到的次數(shù)年 齡性 別工作天數(shù)早退的次數(shù)四、邏輯設計4.1關系模式員工信息(工號,姓名,性別,年齡,職位,密碼,入職時間)記錄數(shù)據(jù)(工號,上班的小時,下班的小時,上班的分鐘,下班的分鐘,每天工作時間)統(tǒng)計數(shù)據(jù)(工號,剩余的時間,遲到的次數(shù),早退的次數(shù),工作天數(shù))管理員(管理員號,姓名,性別,年齡)每天統(tǒng)計信息表(工號,姓名,小時,分鐘,動作,時間) 其中動作指的時入或離開公司員工表(employee)列名別名類型長度備注工號Snochar9primary key員工姓名Snamechar10員工性別Ssexchar1年齡Sageint3職位Positionchar10密碼Passwordchar6入職時間Enter_timechar10員工表記錄數(shù)據(jù)表(data_record):列名別名類型長度備注員工號Snochar9primary key上班的小時arrive_hour char2上班的分鐘arrive_minutechar4上班的小時leave_hourchar4下班的分鐘leave_minutechar4每天工作時間Everyday_timechar4記錄數(shù)據(jù)表每天統(tǒng)計信息表 everyday_statistics 列名別名類型長度備注員工號SnoChar9primary key員工姓名SnameChar10時間HourChar2分鐘MinuteChar2動作Actionchar8時間Timechar4 統(tǒng)計信息表月統(tǒng)計數(shù)據(jù)表(everymonth_statistics):列名別名類型長度備注員工號Snochar9primary key員工姓名SnameChar10剩余的時間remain_timechar4遲到的次數(shù)Late_timessmallint2早退的次數(shù)Early_timessmallint2工作天數(shù)Work_daysmallint2統(tǒng)計數(shù)據(jù)表管理員表(Administrator)列名別名類型長度備注管理員號anobigint6primary key姓名anamechar20性別asexchar2年齡aageint3管理員表五、系統(tǒng)實現(xiàn)一、登陸界面package kaoqin;import javax.swing.*;import java.awt.*;import java.awt.event.*;import java.io.*;import java.sql.*;public class Main_login extends JFrame implements ActionListenerpublic Main_login()super(選擇用戶類型);this.setSize(300,300);this.setContentPane(new JPanel();create();private void create()JButton b1,b2,b3;Box box1,box2,box3,box;b1=new JButton(系統(tǒng)管理員);b2=new JButton(普通用戶);b3=new JButton(退出登陸);b1.addActionListener(this);b2.addActionListener(this);b3.addActionListener(this);box1=Box.createHorizontalBox();box2=Box.createHorizontalBox();box3=Box.createHorizontalBox();box1.add(b1);box2.add(b2);box3.add(b3);box=Box.createVerticalBox();box.add(box1);box.add(Box.createVerticalStrut(20);box.add(box2);box.add(Box.createVerticalStrut(40);box.add(box3);this.add(box);public void actionPerformed(ActionEvent e)if(e.getActionCommand()=系統(tǒng)管理員)login frame=new login();dispose();else if(e.getActionCommand()=普通用戶)login1 frame=new login1();dispose();else if(e.getActionCommand()=退出登陸)System.exit(0);public static void main(String args) /ConnectionDB myDB=new ConnectionDB();int flag=0; /判斷是否創(chuàng)建過數(shù)據(jù)庫的標志File file=new File(SQL.txt); try /讀入標志FileReader in=new FileReader(file); int len;if(len=in.read()!=-1)flag=1; /已創(chuàng)建了數(shù)據(jù)庫,置1in.close(); catch (FileNotFoundException e) e.printStackTrace(); catch (IOException e) e.printStackTrace();/沒有創(chuàng)建過數(shù)據(jù)庫if(flag=0)ConnectionDB myDB=new ConnectionDB();myDB.createTable(); myDB.breakDB();try /寫入標志FileWriter out=new FileWriter(file);out.write(1);out.close(); catch (IOException e) e.printStackTrace(); Main_login frame1=new Main_login(); frame1.setVisible(true); 二、管理員登陸界面class login extends JFrame /管理員登陸界面 public login() this.setTitle(管理員登陸界面); this.setSize(300,300); this.setContentPane(new JPanel(); this.setVisible(true); init(); JTextField jTextField1; JPasswordField jPasswordField1; private void init() JLabel jLabel1=new JLabel(管理員登陸); JLabel jLabel2=new JLabel(用戶名); JLabel jLabel3=new JLabel(密碼); jTextField1=new JTextField(10); jPasswordField1=new JPasswordField(10); JButton button1=new JButton(確定); JButton button2=new JButton(取消); JButton button3=new JButton(修改密碼); Box box,box1,box2,box3,box4,box5; box1=Box.createHorizontalBox(); box1.add(jLabel1); box1.add(Box.createHorizontalStrut(10); box2=Box.createHorizontalBox(); box2.add(jLabel2); box2.add(Box.createHorizontalStrut(20); box2.add(jTextField1); box3=Box.createHorizontalBox(); box3.add(jLabel3); box3.add(Box.createHorizontalStrut(20); box3.add(jPasswordField1); box4=Box.createHorizontalBox(); box4.add(button1); box4.add(Box.createHorizontalStrut(20); box4.add(button2); box5=Box.createHorizontalBox(); box5.add(button3); box=Box.createVerticalBox(); box.add(box1); box.add(Box.createVerticalStrut(20); box.add(box2); box.add(Box.createVerticalStrut(20); box.add(box3); box.add(Box.createVerticalStrut(20); box.add(box4); box.add(Box.createVerticalStrut(20); box.add(box5); this.add(box); button1.addActionListener(new ActionListener() Override public void actionPerformed(ActionEvent e) / TODO 自動生成的方法存根 / login im=new login(); Stringname=jTextField1.getText(),password=jPasswordField1.getText(); if(name.equals(admin)&password.equals(123456) MFrame mi=new MFrame(); dispose(); else JOptionPane.showMessageDialog(new JFrame(WARNING), 用戶名或密碼錯誤); ); button2.addActionListener(new ActionListener() Override public void actionPerformed(ActionEvent e) / TODO 自動生成的方法存根 Main_login frame=new Main_login(); dispose(); ); button3.addActionListener(new ActionListener() Override public void actionPerformed(ActionEvent e) / TODO 自動生成的方法存根 MPwd f1=new MPwd(); dispose(); ); 三、主功能界面class MFrame extends JFrame /主功能界面 public MFrame() this.setTitle(主要功能); this.setContentPane(new JPanel(); this.setSize(350,200); this.setVisible(true); init(); private void init() JButton button1=new JButton(員工信息管理); JButton button2=new JButton(員工出勤信息); JButton button3=new JButton(配置信息); JButton button4=new JButton(退出登陸); Box box1=Box.createHorizontalBox(); Box box2=Box.createHorizontalBox(); Box box3=Box.createVerticalBox(); box1.add(button1); box1.add(Box.createHorizontalStrut(10); box1.add(button2); box1.add(Box.createHorizontalStrut(10); box1.add(button3); box2.add(button4); box3.add(box1); box3.add(Box.createVerticalStrut(30); box3.add(box2); this.add(box3); button1.addActionListener(new ActionListener() / Override public void actionPerformed(ActionEvent e) / TODO 自動生成的方法存根 Worker_Frame frame=new Worker_Frame(); dispose(); ); button2.addActionListener(new ActionListener() / Override public void actionPerformed(ActionEvent e) / TODO 自動生成的方法存根 AttendFrame frame=new AttendFrame(); dispose(); ); button3.addActionListener(new ActionListener() / Override public void actionPerformed(ActionEvent e) / TODO 自動生成的方法存根 Equ_Frame frame=new Equ_Frame(); dispose(); ); button4.addActionListener(new ActionListener() / Override public void actionPerformed(ActionEvent e) / TODO 自動生成的方法存根 Main_login frame=new Main_login(); dispose(); ); 四、員工信息管理class Worker_Frame extends JFrame /員工信息管理public Worker_Frame()this.setTitle(員工信息管理);this.setVisible(true);this.setSize(400,400);init();JButton button1,button2,button3,button4,button5;private void init()button1=new JButton(員工信息添加);button2=new JButton(員工信息修改);button3=new JButton(員工信息刪除);button4=new JButton(員工信息查詢);button5=new JButton(返回);Box box1=Box.createHorizontalBox();Box box2=Box.createHorizontalBox();Box box4=Box.createHorizontalBox();Box box3=Box.createVerticalBox();box1.add(button1);box1.add(Box.createHorizontalStrut(20);box1.add(button2);box2.add(button3);box2.add(Box.createHorizontalStrut(20);box2.add(button4);box4.add(button5);box3.add(box1);box3.add(box2);box3.add(Box.createVerticalStrut(30);box3.add(box4);this.add(box3);button1.addActionListener(new ActionListener() /添加員工信息 Override public void actionPerformed(ActionEvent e) / TODO 自動生成的方法存根 WoAddFrame frame=new WoAddFrame(); dispose(); );button2.addActionListener(new ActionListener() /修改員工信息 Override public void actionPerformed(ActionEvent e) / TODO 自動生成的方法存根 WoAltFrame frame=new WoAltFrame(); dispose(); );button3.addActionListener(new ActionListener() /刪除員工信息 Override public void actionPerformed(ActionEvent e) / TODO 自動生成的方法存根 WoDelFrame frame=new WoDelFrame(); dispose(); );button4.addActionListener(new ActionListener() /查詢員工信息 Override public void actionPerformed(ActionEvent e) / TODO 自動生成的方法存根 WoSerFrame frame=new WoSerFrame(); dispose(); );button5.addActionListener(new ActionListener() /返回 Override public void actionPerformed(ActionEvent e) / TODO 自動生成的方法存根 MFrame frame=new MFrame(); dispose(); );五、添加員工class WoAddFrame extends JFrame/添加員工private ConnectionDB myCon=new ConnectionDB();private JButton YesBtn,NoBtn; private static JTextField woName,woNo,woAge,woYear,woPosition,woSex,woPassword; private JLabel woNameLabel,woNoLabel,woAgeLabel,woYearLabel,woPositionLabel,woSexLabel,woPasswordLabel;/提示區(qū) private static Font font=new Font(楷體,Font.BOLD,14);public WoAddFrame()this.setTitle(添加員工); this.setBounds(200, 200, 400, 300); this.setLayout(null); this.setResizable(false); this.setVisible(true); this.addCompnents(); this.add(getwoName(); this.add(getwoNo(); this.add(getwoAge(); this.add(getwoYear(); this.add(getwoPosition(); this.add(getwoSex(); this.add(getwoPassword(); private void addCompnents() woNameLabel=new JLabel(員工姓名:); woNameLabel.setFont(font); woNameLabel.setBounds(70, 10, 70, 20); this.add(woNameLabel); woNoLabel=new JLabel(員工編號:); woNoLabel.setFont(font); woNoLabel.setBounds(70, 30, 70, 20); this.add(woNoLabel); woAgeLabel=new JLabel(員工年齡:); woAgeLabel.setFont(font); woAgeLabel.setBounds(70, 50, 70, 20); this.add(woAgeLabel); woYearLabel=new JLabel(入職時間:); woYearLabel.setFont(font); woYearLabel.setBounds(70, 70, 70, 20); this.add(woYearLabel); woPositionLabel=new JLabel(員工職位:); woPositionLabel.setFont(font); woPositionLabel.setBounds(70, 90, 70, 20); this.add(woPositionLabel); woSexLabel=new JLabel(員工性別:); woSexLabel.setFont(font); woSexLabel.setBounds(70,110,70, 20); this.add(woSexLabel); woPasswordLabel=new JLabel(員工密碼:); woPasswordLabel.setFont(font); woPasswordLabel.setBounds(70, 130, 70, 20); this.add(woPasswordLabel); YesBtn = new JButton(確定); YesBtn.setFont(font); YesBtn.setBounds(100,180,70, 20); this.add(YesBtn); NoBtn = new JButton(取消); NoBtn.setFont(font); NoBtn.setBounds(180,180,70, 20); NoBtn.addActionListener(new ActionListener() Override public void actionPerformed(ActionEvent e) / TODO 自動生成的方法存根 Worker_Frame frame=new Worker_Frame(); dispose(); ); this.add(NoBtn); YesBtn.addActionListener(new ActionListener() /添加確認按鈕響應 Override public void actionPerformed(ActionEvent e) / TODO 自動生成的方法存根 String sql=insert into staff_info(Sno,Sname,Sage,enter_time,position,sex,password)values(+woNo.getText()+, +woName.getText()+,+woAge.getText()+,+woYear.getText()+,+woPosition.getText()+,+woSex.getText()+,+woPassword.getText()+); try myCon.getStatement().executeUpdate(sql);m
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年合同法全文
- 2025關于員工的合同模板
- 2025綜合技術維護服務合同
- 2025年智能家居服務合同模板
- 2025船舶抵押借款合同范本
- 2025家居用品采購合同范本
- 2025企業(yè)解除勞動合同協(xié)議樣本
- 2025【合同范本】LED顯示屏安裝合同示例
- 2025西安房屋租賃合同范本模板
- 2025短期用工合同協(xié)議書杰出示例
- 《微觀經濟學》試題及參考答案(三)
- 智能人行通道速、擺閘建筑施工安裝布線調試方案
- 《服務型制造》課件
- 沖動傷人應急預案演練
- 郵政金融主任競聘
- 外科清創(chuàng)術課件
- 2025年中考物理考前押題密卷(湖北省卷)(考試版)A4
- 紡織材料創(chuàng)新與應用
- 保證食品安全的規(guī)章制度清單
- 防火巡查、檢查和火災隱患整改制度(2篇)
- DB36-T 953-2024 桂花苗木繁育技術規(guī)程
評論
0/150
提交評論